Резюме для программиста
Блин, что теперь делать?
-----
Не знаю! (шепотом) у меня блок женской логики на профилактике...
а на что айтишник будет брюлики жене покупать?
Зачем ей брюлики? Мы же не в России и не РК живём, тут женщины косметикой особо не пользуются.
куда делись "обезьяны"
------
Работают над популяризацией такого замечательного продукта как спагетти...
Вот, у них есть работа. А у Мурра нет работы. Потому что он всё сделал правильно и свалил. А они постоянно переписывают спагетти и чинят баги - они всегда при делах и зарплате.
как минимум шестизнаком
------
7-ми... и не должен, а есть...
Это в моменте (за месяц) или накопленным итогом за много лет? ))
MAUI откладывают.
MAUI ругают.
Есть ли в MAUI нормальный DataGrid из коробки, или опять как в WPF ждать пару лет или искать сторонние библиотеки и всякие Community Toolkit?
В UWP оказывается не было DataGrid из коробки - только через Community Toolkit.
В WPF нормально пользоваться командами и привязывать методы к ним можно было только через библиотеку из Blend SDK. Так за всё время жизни и не прикрутили из коробки. Проблема в том, что Blend SDK остался на версиях 3.5 Дотнета (ну может там 4.1 где-то), так что в новые версии фреймворка его не потащишь.
Хотя вот вроде решение есть
interaction - Blend for Visual Studio SDK for .NET in VS2019 - Stack Overflow
Это в
-----
А есть разница?
Для меня - нету - для меня важно то, что Я не завишу от решений чиновников в финансовых вопросах...
При 75К было бы нормально поковырять говно мамонта пару лет
А зачем жизню тратить на какое то Г.? Ну и хоть какое то удовольствие от работы то должно быть.
Надо свою UI замутить. Вот тут пока прототип - https://cloud.mail.ru/public/YHAZ/sBVNHZ4QZ и https://cloud.mail.ru/public/UWRh/PfovNYdbx. Потом это обновление - https://cloud.mail.ru/public/ZHur/eia1qf5Ms
Это я создал свой checkbox на базе Button checkbox.hpp:
#ifndef CHECKBOX_H #define CHECKBOX_H #include <windows.h> #include <button.hpp> #include <string> using namespace std; class CheckBox : public Button { public: CheckBox(string text, int x, int y, int width, int height, HWND hParent); CheckBox(string text, int x, int y, int width, int height, HWND hParent, int id); void show(); void show(int style); void show(int style, int exstyle); void set_checked(int style); int get_checked(); }; #endif
Это checkbox.cpp
#include "checkbox.hpp" CheckBox::CheckBox(string text, int x, int y, int width, int height, HWND hParent) : Button(text, x, y, width, height, hParent) {} CheckBox::CheckBox(string text, int x, int y, int width, int height, HWND hParent, int id) : Button(text, x, y, width, height, hParent, id) {} void CheckBox::show() { Button::show(); LONG nNewStyle = GetWindowLong(this->get_handle(), GWL_STYLE) | BS_AUTOCHECKBOX; SetWindowLong(this->get_handle(), GWL_STYLE, nNewStyle); } void CheckBox::show(int style) { Button::show(style); LONG nNewStyle = GetWindowLong(this->get_handle(), GWL_STYLE) | BS_AUTOCHECKBOX; SetWindowLong(this->get_handle(), GWL_STYLE, nNewStyle); } void CheckBox::show(int style, int exstyle) { Button::show(style, exstyle); LONG newstyle = GetWindowLong(this->get_handle(), GWL_STYLE) | BS_AUTOCHECKBOX; SetWindowLong(this->get_handle(), GWL_STYLE, newstyle); } void CheckBox::set_checked(int style) { SendMessage(this->get_handle(), BM_SETCHECK, style, 0); } int CheckBox::get_checked() { int state = SendMessage(this->get_handle(), BM_GETCHECK, 0, 0); return state; }
Это Demo.cpp:
#include <windows.h> #include "checkbox.hpp" CheckBox *cb1; CheckBox *cb2; CheckBox *cb3; /* This is where all the input to the window goes to */ LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch(Message) { case WM_CREATE: cb1 = new CheckBox("Checkbox1", 10, 10, 100, 20, hwnd); cb1->show(); cb1->set_checked(BST_CHECKED); cb2 = new CheckBox("Checkbox2", 10, 40, 100, 20, hwnd); cb2->show(); cb2->set_checked(BST_INDETERMINATE); cb3 = new CheckBox("Checkbox3", 10, 70, 100, 20, hwnd); cb3->show(); cb3->set_checked(BST_UNCHECKED); break; /* Upon destruction, tell the main thread to stop */ case WM_DESTROY: { PostQuitMessage(0); break; } /* All other messages (a lot of them) are processed using default procedures */ default: return DefWindowProc(hwnd, Message, wParam, lParam); } return 0; } /* The 'main' function of Win32 GUI programs: this is where execution starts */ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX wc; /* A properties struct of our window */ HWND hwnd; /* A 'HANDLE', hence the H, or a pointer to our window */ MSG msg; /* A temporary location for all messages */ /* zero out the struct and set the stuff we want to modify */ memset(&wc,0,sizeof(wc)); wc.cbSize = sizeof(WNDCLASSEX); wc.lpfnWndProc = WndProc; /* This is where we will send messages to */ wc.hInstance = hInstance; wc.hCursor = LoadCursor(NULL, IDC_ARROW); /* White, COLOR_WINDOW is just a #define for a system color, try Ctrl+Clicking it */ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wc.lpszClassName = "WindowClass"; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); /* Load a standard icon */ wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); /* use the name "A" to use the project icon */ if(!RegisterClassEx(&wc)) { MessageBox(NULL, "Window Registration Failed!","Error!",MB_ICONEXCLAMATION|MB_OK); return 0; } hwnd = CreateWindowEx(WS_EX_CLIENTEDGE,"WindowClass","My Control CheckBox Demo",WS_VISIBLE|WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, /* x */ CW_USEDEFAULT, /* y */ 350, /* width */ 200, /* height */ NULL,NULL,hInstance,NULL); if(hwnd == NULL) { MessageBox(NULL, "Window Creation Failed!","Error!",MB_ICONEXCLAMATION|MB_OK); return 0; } /* This is the heart of our program where all input is processed and sent to WndProc. Note that GetMessage blocks code flow until it receives something, so this loop will not produce unreasonably high CPU usage */ while(GetMessage(&msg, NULL, 0, 0) > 0) { /* If no error is received... */ TranslateMessage(&msg); /* Translate key codes to chars if present */ DispatchMessage(&msg); /* Send it to WndProc */ } return msg.wParam; }
MAUI откладывают.
Думал что-то новенькое , а этой новости уже фиг его знает сколько тысячелетий.
После твоего поста я полез смотреть про индексы...
[] берёт элемент по индексу без сдвига - т.е. чтобы взять конечный n-й элемент, нужно написать n-1;
[..] берёт конечный n-й элемент уже со сдвигом -1
А сделать как в математике (или), где квадратная скобка [ означает включение, а круглая ( - не включение, они не могли? Что, парсер языка не сможет распарсить скобки слева и справа от оператора ".."? Дблбл!
Погуглил и быстро нашел ответ:
1. Официальный ответ:
We decided to follow Python when it comes to the from-beginning and from-end arithmetic.0
designates the first element (as always), and^0
the “length’th” element, i.e. the one right off the end. That way you get a simple relationship, where an element's position from beginning plus its position from end equals the length. thex
in^x
is what you would have subtracted from the length if you’d done the math yourself.
Why not use the minus (-
) instead of the new hat (^
) operator? This primarily has to do with ranges. Again in keeping with Python and most of the industry, we want our ranges to be inclusive at the beginning, exclusive at the end. What is the index you pass to say that a range should go all the way to the end? In C# the answer is simple:x..^0
goes fromx
to the end. In Python, there is no explicit index you can give:-0
doesn’t work, because it is equal to0
, the first element! So in Python, you have to leave the end index off completely to express a range that goes to the end:x..
. If the end of the range is computed, then you need to remember to have special logic in case it comes out to0
. As inx..-y
, wherey
was computed and came out to0
. This is a common nuisance and source of bugs.
Finally, note that indices and ranges are first class types in .NET/C#. Their behavior is not tied to what they are applied to, or even to be used in an indexer. You can totally define your own indexer that takes Index and another one that takesRange
– and we’re going to add such indexers to e.g.Span
. But you can also have methods that take ranges, for instance.
2. Понятный ответ:
I think this is to match the classic syntax we are used to:value[^1] == value[value.Length - 1]
If it used 0, it would be confusing when the two syntaxes were used side-by-side. This way it has lower cognitive load.
Погуглил и быстро нашел ответ:
1. Официальный ответ:
Да я уже находил объяснения где-то тут в комментах
Что нового в C# 8? / Хабр (habr.com)
в которых отсылали сюда
E.W. Dijkstra Archive: Why numbering should start at zero (EWD 831) (utexas.edu)
Проблема в том, что у них оператор концевого индекса ^ ведёт себя по разному внутри других операторов.
Вот такая конструкция кидает исключение
[^0]
а вот такая не кидает.
[0..^0]
Ну это следствие разных принципов работы. Ведь у нас
для оператора [] оператор концевого индекса ^0 равен Length
а для оператора [..] оператор концевого индекса ^0 равен Length-1
А запись ^1 означает Length-2.
Вам ничего не кажется странным? Пишем 1, а это на самом деле 2. Но только в этом месте в этой нотации - в концевом индексе диапазонного оператора.
И вот таких мелочей, которые надо всегда держать в голове, всё больше и больше.
Я не знаю, кому там удобнее вычислять срезы с массивов такой отличающейся нотацией, но cognitive load у меня явно повышается. Мне было неудобно и с 0 отсчитывать индекс, и от конца всегда явно единицу отнимать или писать невключающий интервал через знак < вместо <=. Но ок, раз так решили и все смирились - я тоже смирился. Но почему теперь когда с конца берём индекс, то теперь всё с ног на голову переворачиваем?
Ну и хоть какое то удовольствие от работы то должно быть.
------
Так нету. Кризис. Плюс - возраст. Плюс - апдейт стека.
Того что знаю и могу делать - просто нет на рынке...
Надо свою UI замутить.
Бросьте это дело. Если вы не Гугл или МС, это никому не нужно.
В Юнити хреначат уже третий UI-фреймворк за последние лет 10 или сколько там это Юнити существует. И даже он не обещает быть окончательным и лишённым недостатков предыдущих. Наоборот - ещё своих недостатков добавляют.
Того что знаю и могу делать - просто нет на рынке...
Лучший совет - свой себе. Бегом учить джаваскрипт, Ангуляр и Ноду. ))
Бегом учить джаваскрипт, Ангуляр и Ноду.
-----
А осознание того, что в объеме, достаточном для решения большей части задач, Я их уже знаю требует запредельных мыслительных возможностей?
Так нету.
странно, что-то, где-то значит не так.
Тоже вот можно сказать сменил стек - и ничего, в худшую сторону пока не изменилось.
Вы регулярно обновляете свои знания по JS, CSS, HTML и веб-фреймворкам?