Pavel
>printing bs into console Oh yeah the speed where it belongs
maybe he needs this for XOR-checksumming stuff :)
Pavel
checksum: xor of all bits in binary string
Pavel
such check much sum
Vlad
maybe he needs this for XOR-checksumming stuff :)
I'm pretty sure it's an assignment in his school/uni
Pavel
i don't think so
Pavel
too simple
Vlad
too simple
laba2.c amirite?)
PO
Hi I made a matrix of button with Gtk+2.0, how can I understand which button is clicked or pressed?
PO
Did you try googling that first?
yes and I'm doing now too! but the problem is I'm not good at all and it's my first time with gtk
Pavel
https://developer.gnome.org/gtk-tutorial/stable/c489.html
Pavel
Seems like what you need
Pavel
Did that help?
PO
I have created a matrix of buttons
PO
with *ptable
PO
GtkWidget *pButton[16]
J
/* A program to create three functions: i. input array of 7 string ii. check the strings in the array to see if they are palindrome iii. print only those that are palindrome */ #include <iostream> using namespace std; void InputStrings(); void CheckForPalindrome(); void PrintOnlyPalindrome(); int main() { InputStrings(); } void InputStrings() { string Words; //string to be inputted by the user int Size_Of_String=0; //size of the total strings to be inputted by the user string previous = " "; //string to hold the previous value of the word inputted by the user string current; //string to hold the current value of the word inputted by the user cout<<"What is the size of the total words: "; cin>>Size_Of_String; int array[Size_Of_String]; //array to hold the palindrome strings user will enter cout<<"Enter your words below: "<<endl; for(int i=0; i<Size_Of_String; i++) { cin>>Words; current = Words; if(previous==current) cout<<previous<<" and "<<current<<" are palindrome strings"<<endl; previous = current; } } Try this code @Hosam_47 Pls why do you always want to keep 3 functions solving tasks for you when you can just create one to solve them/ Pls I would love to hear
particaney 🐸🍲
I know it's not the right group but for bash scripting how can I get only the nearest dir of a file for example basename gives the file and realpath gives the full path but i want the last dir of a file
particaney 🐸🍲
For example dir1/dir2/file I want to have dir2
particaney 🐸🍲
Is there any command or do I need to cut and wc
Anonymous
#include<iostream> using namespace std; int main(){ string s; int l=0,u=0; cin>>s; for(char c : s) (isupper(c) ? u:l)++; for(char c : s) cout<< char((u>l) ? toupper(c) : tolower(c)); }
Anonymous
———char c : s ———isupper() ———toupper() ———tolower() what is the meaning of the above functions?
Vlad
———char c : s ———isupper() ———toupper() ———tolower() what is the meaning of the above functions?
1) for each(char named c in the string s) 2) return true if a character is upper case 3) converts character to upper case 4) converts character to lower case
Ralph
Hello does anyone have an idea of hauffman's coding v
Ralph
?*
Ralph
Or of the greedy algorithm
Harsha [M]
Or of the greedy algorithm
Google have much idea
Ralph
Yeah but i found no answer
coolthought
STATIC VAR( uint8 volatile, VAR_FAST_INIT) Mgr_Timeout; I understand this is a macro used for declaring a variable but Google search didn’t return any useful result as I try to make sense of this line.... a volatile variable declare in a function? And then use as a type for declaring another variable? Any kind soul can help explain or provide some keywords so that I can Google for an answer? 🙏🏽
Amu
hey guys if you know c x86 assembly please let me know, i’d really appreciate it
Amu
dm me
coolthought
It is not a valid C/C++ code
This is a line of code in a example_wrapper.c file. We are looking at embedded C programming
Anonymous
This is a line of code in a example_wrapper.c file. We are looking at embedded C programming
So what? It's not a valid C code We can't say something about this code if you don't provide definitions of the macros
Vlad
It just mean you do not know, just like me
Of course we don't. It is YOUR codebase
Hmaada
hi I would like to add some Cunit test to my project but i m using WSL and i code into atom and visual studio code , is there anyone who have a beautiful idea
Arya
Hi Valve Proton source is totally 5GB with all dep tried to compile and its created 60,000 process (cc1plus, cc, as...) and eating up to 10/12 GB of my ram and using 20GB of total 50GB swap (its on my ssd so not a problem) The main problem is, why is that :/ Really, is that a efficient build system? running 60,000 processes? WTF valve???
Caio
Good day for you guys, I've downloaded the kali linux on the VirtualBox and it is taking too long to load. What's the problem?
Hmaada
and also you can resize the screen it will work 100% i had the same problem and for this you have to go to display settings
Hmaada
for me it worked correctly at (1920; 720)
Caio
I will try it out
Caio
Thanks
Vlad
do make -j 4 where 4 is number of your cores
Arya
do make -j 4 where 4 is number of your cores
i know but when you have 4 cores then whats the point?
Arya
Point of what?
running that much process its just filling up the kernel process table
Arya
Point of what?
just in case it doesn't mean you shouldn't have more processes than ur cpu's cores. when ur there are like 1000 processes they get executed and goes to sleep rapidly so u can use OS more efficient, its called task switching but when compiling, having more processes that ur cpu's core count is useless cuz all of the are active and executing code so instead they should call like 4 gcc processes and when finished call 4 more and so on. until the whole compilations is done.
Anonymous
/warn Alice PM
Pankaj
/get
Pankaj
How many data types in c
klimi
How many data types in c
https://en.wikipedia.org/wiki/C_data_types
Amu
if you know x86 assembly code, i have a huge assignment im stuck on and would appreciate the help, please dm me
Amu
great
Amu
i have sent you a dm
PO
how can I get pass an integer value through (gpointer) data in g_signal_connect() ?
J
how can I get pass an integer value through (gpointer) data in g_signal_connect() ?
PO
please help
PO
me
Hermann
if I have a pointer of type uint8 which contains ip-addres, id-msg and hop can I extract these three information separately ?. in c++
Anonymous
if I have a pointer of type uint8 which contains ip-addres, id-msg and hop can I extract these three information separately ?. in c++
Could you elaborate on an example? Are you have the stored value on a variable of type uint8_t or uint8_t* ?
Ahmed
hey there
Ahmed
can someone help me fixing this weird bug,, i think it's due to a pointer thing
Ahmed
i am beginner : https://github.com/AYehia0/ToDo-APP/blob/master/doit.c char *tempArg = argv[1]; //Checking for args printf("You give : %s\n", argv[1]); if (checkValidTime(getTimeInput(tempArg))){ printf("Valid Time: %s\n", argv[1]); }else{ printf("Invalid Time: %s\n", argv[1]); } printf("You give : %s\n", tempArg);
Ahmed
should i copy the content of argv using memcpy or whatever ?? idk
Антон
Sumit why did you stop our conversation so cruelly?
J
Please 🙏 I just wanna know more...though the question might sound stupid: What's the difference between gui programming and windows programming?