Aadi♠️
Aadi♠️
I have a python script to bruteforce How do i convert to c ++ bruteforce script?
klimi
I have a python script to bruteforce How do i convert to c ++ bruteforce script?
you either: - write it by hand - convert it with some program - ask some ML model to do it for you
klimi
ML model?
yep, machine learning
morpha
you could also ask for the private key to the true owner of these 10k$
SHP
?
i didnot think about the time complexity, but it seems your while condition should be && rather than ||
SHP
and the inner if is unnecessary
SHP
and I think this method is too slow...you'll fail on hard cases
P
What is your approach?
JY
#include <stdio.h> size_t a() { return 100;} int main() { long d = -1; if ( d < a() ) { printf("1\n"); } else { printf("2\n"); } } Anyone guess what it prints?
Mark
2
April
2
𝔖𝔞𝔯𝔬
I don’t think there is something about size_t idk about
klimi
I don’t think there is something about size_t idk about
that's exactly what this is about: /tmp$ gcc test.c -Wall -Wextra test.c: In function ‘main’: test.c:6:13: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 6 | if ( d < a() ) { | ^ /tmp$ ./a.out 2
klimi
c++ is dangerous under this kind of problems
that's why you use show warnings
𝔖𝔞𝔯𝔬
that's why you use show warnings
Like i expected smt like this but that just because it’s not the first time, a newbie would not even ask himself this kind of questions
𝔖𝔞𝔯𝔬
The more I learn this le language the worst I feel
JY
Operators < > <= >= could handle such issues, agree?
JY
Int and uint comparisons
Ashutosh Kumar
while (*str++) is basically while (*str++ != '\0')
I am new in c programming. But i have experience of programming. Am I right, amn't? Idea behind this is :- Assignment or increment operation to pointer level And it will be run until null character \0 don't comes .
\Device\NUL
Int and uint comparisons
CPUs are work in binary
\Device\NUL
You may wonder why -1 == uintmax_t
\Device\NUL
Because they're using same binary numbers
\Device\NUL
unsigned overflow and signed overflow are checked via CPUs itself, and not by C / C++. Afaik there's standard about overflow checking
\Device\NUL
It points first then increment it
\Device\NUL
semantic sugar to array :P
Ashutosh Kumar
*str++ is *str; str++
I got it. Now i understand it incrementation to pointer. Because i have read my book of c programming few days ago.
sushi
Hi is there someone who's willing to help me in creating a code for my sumobot?
Hrishikesh
Please send me some e books for c coding reference
Hrishikesh
I have learnt c till pointers through yt.. continuing that .. but still need some bools for reference
Hrishikesh
Thanks in advance! 🙏🙏
Ziky
Please send me some e books for c coding reference
Here is the C reference http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf
Hrishikesh
Thanks!
Hrishikesh
🙏
Lyroy
Hi, I need some advice. I own a Microsoft Surface and I would like to write code on it. Unfortunately it's not a really powerful machine, and copmiling code on it takes time and draws a good amount of power. To get around this issue I thought about sending the code (via Git or something else) from the Surface to my PC at home, compiling it there, and returning the exe (and all the extra stuff I might need) on my Surface to be executed. Is this a good solution? Is there a better way? If this is a good approach, what's a "good setup" to make it work?
Гулящий
I guess some kind of remote access like TightVNC could work. And then you can automatize the process if you want.
Гулящий
Oh, good idea! With VSCode you can ssh-connect to a windows machine too. As far as I know.
.
how to validate a member id, name?
Lyroy
Make your PC a linux machine and connect to it using ssh You can even use VS Code with ssh to fo the remote development
I was thinking about that but my internet connection is not that stable and I would also like the program to be executed on the Surface an not remotely on the PC
Danya🔥
1. Sshfs + ssh 2. Emacs + tramp 3. Vscode + remote dev 4. Jetbrain + remote dev
Does 4 even work properly? Last time I tried it, it was garbage
klimi
Does 4 even work properly? Last time I tried it, it was garbage
I've seen people using it on our servers so I guess it does work
Digvijay Singh
cro.do reference available
romby
Can someone help me with small program on c++? The given quadrant is a matrix (the size of the matrix can be arbitrary). Display the elements of the main and side diagonals on the screen. Reset the elements below the side and above the main diagonal (marked in gray on the diagram).
romby
photo i will send in dm
romby
I have the code ready, but it resets the wrong elements
klimi
I have the code ready, but it resets the wrong elements
Maybe you... Should have posted the code along with your message?
romby
I also need to post it with photo to understand what elements needed to reset, but I can`t
klimi
abdisa
Why are my messages being delete I join few hours ago
abdisa
Nevermind
klimi
Why are my messages being delete I join few hours ago
I can look it up later if you want me to
abdisa
if someone can help me let me know in dm so I will send you full code and photo
Send it if I can I will help you but don't post your assignments here dude
HIEU
Hello everyone, can anyone help me how to write the code for multiplying n matrices. I have code to multiply 2 matrices but when n matrices, the error disappears.
Chat Boss
HIEU NGUYEN sent a code, it has been re-uploaded as a file
GOPA
hello i wanted to ask if competative programming important for good a good devloper or any suggestions
Pavel
hello i wanted to ask if competative programming important for good a good devloper or any suggestions
It is not important, it teaches algoritms and performance ideas, but can also teach wrong things about programming (it shifts focus into things that are less important in writing real code, and not allows to execute some more important skills).
Pavel
So I would say, do it if it is fun for you. But if it's not fun for you, skip it and just write hobby projects instead.
מארלוס
What is the best way to send byte string as a field of json from python to cpp (using socket, and i have nlohmann json in my cpp)? What encoding
AlanCcE
Hi, everyone I'm building a small side-project, and i want some opinions! This project should work as like some simpler version of Cargo from the forbidden language, but to C projects. I had this idea cause i really dont like to configure all my projects from scratch and all, so i was thinking that would be cool to make a C tool that could do it for me (even knowing that i could probably do it using Bash) and implement some fancy flags and stuff like that, the project it's actually in a stage that is almost usable, but i want other persons opinions in what i can improve it or change, there is the link to the repo: https://github.com/Anthhon/cForge
CALVIN
Libxl library....... Who is familiar with this library guys...?
Guillermo
Libxl or libxml?