Shourya
Again a driver question ..If someone knows ..Plz let me know..I have a driver -usb hub driver ..I need to do something based on kernel command line options which is provided by the bootloader..I know by module param I can read parameters provided to modules but I want to read from kernel cmdline..In user space I can do it by Cating /proc/cmdline or directly use "open" functions in C but I need to get it done in usb hub driver....I even have that parameters as char* in main.c of kernel but again there is headache of passing that to driver...How can I directly read it in usb driver?Already cheked major blogs ditnt quite got the solution..
Hermann
anyone use gnuplot?
Hermann
is possible merge two plot?
Shourya
Does this help? https://github.com/torvalds/linux/blob/v4.12/Documentation/admin-guide/kernel-parameters.rst
Yes even tried with setup call..But that seems to be depreciated...So was looking for more clean and trusted and time saving way .
Anonymous
Yes even tried with setup call..But that seems to be depreciated...So was looking for more clean and trusted and time saving way .
I guess you would be better off asking this question in Stackoverflow then or the kernel discussion group.
Ausir
Hi guys, I know C very well and I got a question: Is easy making desktop app (with gui) in C++? I already have a good starting point knowing C should I learn C++? I always built desktop app in Javafx with Scene Builder bit it sucks a lot. C++ allows me to make the same but without freaking out every time?
Ausir
Use SDL and draw pixels
So should I keep in Java?
HaiNahi
So should I keep in Java?
In C by using SDL you can draw pixels on the screen and change them by frames
Ausir
Oh I see now I googled it
HaiNahi
Oh I see now I googled it
Yeah there is no good in c gui that's the best make your own
Ausir
That's a little bit far from what i'm looking for. What I want is a Scene Builder alternative in C++ that urge me to learn C++, because Scene Builder works like shit
HaiNahi
Sorry I miskently missed called
Ausir
Yea yea that's fair but I don't want to write all the code that I need to make a good looking gui, the backend is already enough yk?
HaiNahi
Yea yea that's fair but I don't want to write all the code that I need to make a good looking gui, the backend is already enough yk?
I tried to make guis in C but nothing has enough tutorial or I can't install it, I just used SDL to get out of that mess
HaiNahi
If you draw pixels it's already portable, you don't need to port SDL because that the basic thing
Anonymous
Hi guys, I know C very well and I got a question: Is easy making desktop app (with gui) in C++? I already have a good starting point knowing C should I learn C++? I always built desktop app in Javafx with Scene Builder bit it sucks a lot. C++ allows me to make the same but without freaking out every time?
I don't know much about the details but Qt framework is good for making GUIs. There are also other libraries but I think Qt is the easiest, but they are all better than making GUIs using Win32 library or smth like that of course
Ausir
If you draw pixels it's already portable, you don't need to port SDL because that the basic thing
It's not what I am looking for, I need the OOP for what I want to make
HaiNahi
Buki
You guys are talking about desktop C/c++ applications..any C++ for networking programmer?
HaiNahi
Visual c++ is a secret which I failed to use
Ausir
Scene Builder is just for javafx and I love java and javafx but the scene builder software sucks and I don't want to use it anymore, I don't have fun with it
Buki
they talking about qt framework
I'm not used to Qt framework
HaiNahi
I think I need to make gui framework myself in C
Ausir
Java doesn't produce native applications which hurts my OCD
Do you ever used scene builder? Let me know how your OCD increase after one hour of Scene Builder😂
Ausir
Grid problem is one of last in very long list of problems that scene builder has.
Ausir
Scene builder delete some part of your gui after the savings
Ausir
Not always
Ausir
Just when it wants
HaiNahi
Ausir
Randomly
Ausir
Is it a bug or an AI to improve the app
Bug man, there's nothing "intelligence" in scene builder
Ausir
And it's the only app that makes fxml files you can use in java for building gui
Ausir
The only one with a simple drag and drop
Ausir
There's no alternatives, I just hate it
HaiNahi
But how do you switch through screen we need to code something in the background always no matter how is the ide or gui
HaiNahi
Like in a game engine or a scene builder there are no elements just code which places perfectly the buttons
HaiNahi
The only one with a simple drag and drop
You can't use that for bigger projects thats my guess
Ausir
Yeah you always need to code the backend of your app and some adjustments in the gui files
Ausir
You can't use that for bigger projects thats my guess
Oh yes indeed, that's the best part! You have a huge facility using programs such as scene builder
Ausir
You dont waste your time coding the position of the elements or the colors or whatever is just a "squeezingBallStuff", yea i like to speak french sometimes ahahhaha
Oumer
@admin y u dont start code competition
HaiNahi
I am ready to trade more logic work for freedom and learning curve
Ausir
I don't like making apps for money
@𝑺𝒐𝒃𝒌𝒂
Yep I already know about the lib but it's still a lib I don't want to code for my gui app I just want to drag and drop as Scene Builder
Qt Designer can be an alternative: drag and drop without wasting your time coding for layout or color...
@𝑺𝒐𝒃𝒌𝒂
Really? And it works with c++ java or what?
C++. But Qt works with other languages too(Java, python,...)
Ausir
Thank you man! I will look at Qt Designer if I'll have to learn C++ I'll do. You saved my mental health ahahahah
Anonymous
Hey can anybody explain me what is meant by stack overflow?
Shruti Debnath 376 Cse 25
Can gtk library be included in vs code? If yes, then how? Im very new to this and trying to create gui in c. If you all could help me out in this or if you have further suggestions as to which toolkit is easier to use please do share
Anonymous
use linux, and write a many cli apps before use the gui
because at linux the library linking is very simple, most of cpp packages can be install via "apt install"
Anonymous
vs code needs a write the configurations, plase use another ide for cpp gui
Shruti Debnath 376 Cse 25
Anonymous
ask you what you really want?
Anonymous
for programing the gui applications there are many simple ways then c++, but c++ is very interesting on command line (cli) development
AJAY
In windows we use fflush(stdin) for removing buffer What we do in linus for removing budget value Anyone please
AJAY
?
Anonymous
In windows we use fflush(stdin) for removing buffer What we do in linus for removing budget value Anyone please
Flushing stdin is a bad practice. It results in Undefined behavior and must be avoided. Fflush should be used on input streams only when you are working on an underlying seekable file and stdin is not.
Sachin
Flushing stdin is a bad practice. It results in Undefined behavior and must be avoided. Fflush should be used on input streams only when you are working on an underlying seekable file and stdin is not.
#include<stdio.h> #include<string.h> #include<stdlib.h> struct mobile { char brand[27]; int quantity; int price; }; int count=0; void storing(struct mobile *ptr) { fflush(stdin); printf("\n\nEnter the details of %d mobile \n",count+1); printf("Brand name :"); gets(ptr[count]->brand) ; printf("Quantity :"); scanf("%d", &ptr[count]->quantity) ; printf("Price : "); scanf("%d", &ptr[count]->price) ; count++; } void search(struct mobile a[],int n) { fflush(stdin); int key; char find[27]; printf("enter the mobile brand\n"); gets(find); for(int i=0; i<n; i++) { key = strcmp( a[i].brand , find ) ; if( key == 0 ) { printf("Mobile brand : %s \n", a[i].brand) ; printf("Quantity : %d \n", a[i].quantity) ; printf("Price : %d \n", a[i].price); } } } int main() { struct mobile m[3]; while(1) { printf("enter your choice \n 1.storting \n 2.searching\n 3.exit\n"); int ch; scanf("%d",&ch); switch(ch) { case 1: storing(m); break; case 2: search(m,3); break; case 3: exit(0); } } } what is wrong with this ?
Shruti Debnath 376 Cse 25
what does it mean if my code takes more than 10 secs to compile and run?
Sachin
It looks okay
but not working properly