ngdream
url::add allows to specify a url and give a name and a view to this url
ngdream
i ❤️ c++ so i named library (HEART)
Anonymous
i ❤️ c++ so i named library (HEART)
reasonable & acceptable...
DaviChan
Would you suggest c++ as beginner friendly ?
I would say it is a fine language to start with. You don't need to know the whole STL and move semantics etc. to be a proficient C++ peogrammer
DaviChan
I would say the learning curve is reasonable but endlessly long
DaviChan
That is what i love about the language, but also what some hate. Its a massive ever evolving beast
Stanislav
#include "heart.h" class Home : public View { Httpresponse get(Request request) { return Httpresponse(); } }; int main(int argc, char const *argv[]) { Url::add(new Home, "/", "home"); Server::run(); return 0; } do you love this syntax ???
not, why base class called View? http methods should go to url mappings like server.map("/hello", {Http::GET}, ... it looks like you trying port some asp.net technics to C++
ngdream
its possible to render html response like this: class Bridje : public View { Httpresponse get(Request Request) { return Template::render("index.html"); } };
ngdream
please someone here know any c++ library i could use as template engine???
Stanislav
please someone here know any c++ library i could use as template engine???
if you inspired by django https://github.com/jinja2cpp/Jinja2Cpp
Stanislav
thank
it maybe looks like abondened because origin author died due COVID in 2020 and his friend continue supporting this in free time
ngdream
is there any alternative ?
Stanislav
what 😢
but it works )
ngdream
i will test it
DaviChan
I don't think that. Even without. As long as your code runs, its fine for most applications. When we get into real time stuff however. I agree, you need to know much more about the language to be proficient there. But as an example. We had a java developer allocating everything on the heap. Still the software was usable at the end. Also was an easy refactor as the other things where mostly fine. I think you should not care about too much detail unless you have to. Yes, its good to know these details, but not needed to start. I could almost bet there are professional C++ developers unfamiliar with the concept of r and lvalues
Anonymous
Okay...does anyone know how to write the sequence of bytes in an MP4 file into the graphics card...???
Anonymous
C or Assembler please...
klimi
:D
Rajo
i've been told to leave destructor default rather than empty. anyone has ideas why it's better?
Rajo
googled it i got something like trivially destructable and else, but i dont know what it means
You know me
i've been told to leave destructor default rather than empty. anyone has ideas why it's better?
It means semantictically you are aware that the member variables you have used are self destructing. On the other hand, empty dtor might mean you have left have freeing some objects knowingly or unknowingly
Pavel
googled it i got something like trivially destructable and else, but i dont know what it means
There's a compile-time check (type trait) that you can use to know if a class trivially destructable. It fails if you have non-default destructor (even if it's empty). This check may be used in some templates to determine if some optimizations may be made in case it usually destructible. So declaring it default may make it being used more efficiently compared with the case when you declare it with an empty body.
Pavel
Same goes with copy/move constructors
ngdream
hi there
Anonymous
Guys anyone of you ever created a crypto coin?
'''''''
which is better to use NULL or nullptr in C++? (say, in the structure definition of linked Lists)
Nomid Íkorni-Sciurus
which is better to use NULL or nullptr in C++? (say, in the structure definition of linked Lists)
they're kind of equivalent NULL is a macro defined in C as (void*)0 nullptr is part of the C++ languange
Nomid Íkorni-Sciurus
I'd say use nullptr
Nomid Íkorni-Sciurus
it exists, why not to use it?
'''''''
yeah, cool
⁣ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ
Can anyone help me to write a c program that can detect mobile operator by phone number?
Anonymous
Can anyone help me to write a c program that can detect mobile operator by phone number?
I don't think anyone here is really good in low level programming...just talking and writing kids code...
pavel
Can anyone help me to write a c program that can detect mobile operator by phone number?
Mobile operator by number is just a table function, nothing special
Anonymous
What do I need for c++ is there something like rustup?
Anonymous
Or is it working by manually
Daulet
What do I need for c++ is there something like rustup?
What you mean? Build system or package manager?
Anonymous
Something vor console
Anonymous
Like the python thing
Anonymous
If you type python in console
Daulet
Something vor console
gcc, clang, msvc command compile c++ programms
Daulet
Anonymous
gcc, clang, msvc command compile c++ programms
How do I implement all those things in Vscodium?
Ludovic 'Archivist'
Okay...does anyone know how to write the sequence of bytes in an MP4 file into the graphics card...???
MP4 is a container that can support several codecs. Some codecs are proprietary. Most of them have been at least reverse engineered, but all of them are convoluted and complicated messes
Deepak Chaurasia
Hay guys i am new bie ,can we use break in c if else statement
Deepak Chaurasia
Like if condition break; else prin..
Deepak Chaurasia
I am a btech student and teacher did it so still confused
Deepak Chaurasia
I read somewhere we cannot use break in if else statement
Deepak Chaurasia
Thanks to confirm
Anonymous
Anyone in here using Linux and Vscodium??
pavel
Read about mobile operator codes
Daulet
Anyone in here using Linux and Vscodium??
Install clangd and clangd extension for C++
Daulet
Compile with command gcc
Anonymous
With flatseal
Daulet
Have it in a flatpak
What is your distro?
Anonymous
Fedora
Daulet
Fedora
Is autocomplete works?
Anonymous
Is c++ Object-oriented?
Daulet
You can read c++ iso specification. But better check cppreference.
Daulet
I know how base 10 implemented. 234 equal to 200 + 30 + 4. 2*10^2 + 3*10 + 4
Anonymous
give me a list of fonts for programming, a guy who is tired of fire code.
Daulet
I know how base 10 implemented. 234 equal to 200 + 30 + 4. 2*10^2 + 3*10 + 4
234 % 10 = 4, you get last number. Other number can get with loop 10^i
Daulet
1) 234 / 10^2 = 2 // digit 2 234 - 2 * 10^2 = 34 2) 34 / 10^1 = 3 // digit 3 34 - 3 * 10^1 = 4 3) 4 % 10 = 4 // digit 4
Anonymous
Example
Yes but its not working
Daulet
Example
Last step. Convert digits to ascii symbols Add 48 to number.
Anonymous
Daulet
So there is no real documents or a book?
One book where you can read everything about C++?