Posts
 
Reputation
Joined
Last Seen
Ranked #501
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
92% Quality Score
Upvotes Received
40
Posts with Upvotes
38
Upvoting Members
37
Downvotes Received
5
Posts with Downvotes
5
Downvoting Members
2
14 Commented Posts
~133.06K People Reached
Interests
Programming, Football, Music, Physics, Maths, Philosophy, Movies
PC Specs
Intel i5-2300 @2.80 GHz4 Gig RAM500 Gig HDDNvidia GT 430 Linux Ubuntu 11.04Windows XP
Favorite Tags
Member Avatar for myk45

Hi all, I am developing a Qt Gui application. Here I have a Qtreeewidget that has a list of Qtreeewidgetitems. I also have a qtablewidget beside it which displays some information when any item present in the list is clicked/selected.When the content of any of the cell in the tablewidget …

Member Avatar for mapsonyllaer
0
269
Member Avatar for myk45

Hi All, I am trying some experiments with pthread scheduling policies. I have a couple of apps and within all these apps, I set the thread policy to SCHED_RR and I set the priority to MAX - 1. Now, I see that the CPU utilization as reported by top for …

Member Avatar for iš_iš_iš
0
238
Member Avatar for myk45

Hi All, I saw some code where a `sem_init` was called with a value of 0. I didn't quite understand what this meant. I understand that semaphores can be used to protect shared data, in that we allow just one thread to access the data. And, the way to do …

Member Avatar for myk45
0
5K
Member Avatar for myk45

Hi All, I'm trying to use bools to sync between two threads. I cant' use C++11 and I thought mutexes would be slightly heavy for this. So, I do something like this: // ================================== // Thread A .. do some stuff .. // wait for signal. while (!signalFromThreadB) { pthread_yield(); …

Member Avatar for myk45
0
992
Member Avatar for myk45

Hi all I have a qt application in which I have a QTreewidget that displays some content in the QTextBrowser. I set the contents for the html document in the textbrowser using the setHtml() function. All I want now is to fetch the url of this html document so that …

Member Avatar for myk45
0
480
Member Avatar for myk45

I have a horizontal layout inside which i have added a group box. The group box is split using a QSplitter and contain a QListWidget and a QTextBrowser. I want to add two push buttons at the bottom right corner of the window to navigate inside the QTextBrowser. I'm adding …

Member Avatar for Banfa
0
450
Member Avatar for myk45

Hi all, I have a problem where i need to find to what library my code links to. Here is the scenario: a) I have two executables. Both link to pthread. But pthread seems to behave differently. b) I am not sure that they are linking to the same version …

Member Avatar for L7Sqr
0
150
Member Avatar for myk45

Hi All, I run gdb server on a remote linux target and debug with the client. Are there some gui front-ends that might come in handy? I use gdb with --tui, but still sometimes find difficulty in "watch"ing variables. Is there some way i can perhaps use a gui based …

0
149
Member Avatar for myk45

Hi All, I´m using a QTextBrowser to display an external html document (and its image resources) which is placed in the same directory as the application. Everything works fine except that images are not displayed properly. Instead of the actual picture there is a "missing image" icon. I tried different …

Member Avatar for NathanOliver
0
2K
Member Avatar for myk45

Hello All, I want to convert a markdown file to its equivalent HTML programatically and Iam looking for a way to do this properly. I would need a script that converts the markdown file into proper html.I'am aware of Doxygen which generates these .md files to hmtl just with a …

Member Avatar for pritaeas
0
208
Member Avatar for myk45

Hi All, 1)It's easy to create a window in QT that the user can resize, but when they make the window bigger, all the contents stay where they were in the top left hand corner. They don't grow with the window. 2)Also when the window is launched the size of …

Member Avatar for myk45
0
5K
Member Avatar for myk45

Hi all, I have an xml file with some information inside it. I want to load this xml during runtime and generate an equivalent HTML document for this xml file. All this needs to be done programatically and on the fly during runtime. How could i do this? I'm using …

Member Avatar for jwenting
0
265
Member Avatar for myk45

Hello. Well, im a little confused as to what exactly the terms Data Abstraction and Data Encapsulation mean: This is what i read: [B]Data Abstraction[/B]:data abstraction is a process of representing the essential features without including implementation details. [B]Data Encapsulation:[/B]: Data encapsulation, also known as data hiding, is the mechanism …

Member Avatar for naaz.kaushik.3
0
874
Member Avatar for myk45

Hi, I have a Qt based tool and I want to add a QtWidget(button) in the gui which will act as a help button for my tool just like the windows help button for any application. The help button when pressed should display some text information in the form of …

Member Avatar for mike_2000_17
0
172
Member Avatar for myk45

Hello All, Well this is not exactly a C++ question. More of a math one. But I've seen many guys work on GameDev in this forum. So, posting it here. Here it goes: I was reading an article to check if a point in view frustum and i read some …

Member Avatar for myk45
0
419
Member Avatar for hassai

You could try an algorithm as follows: Create a new list that has your sorted list. input_list -> initially has unsorted lines. while ( !input_list.empty() ) { search smallest element, add this to a new list. // this is a O(n) operation. delete this entry from input_list. } HTH.

Member Avatar for Schol-R-LEA
0
269
Member Avatar for Azmah

Personally, i feel there are no substitutes for books. A good book can never be replaced by any tutorials online. Well this is my opinion.

Member Avatar for Labdabeta
-1
468
Member Avatar for Navlag

Hi, What you need is an [idle callback](http://www.opengl.org/resources/libraries/glut/spec3/node63.html). inside the idle callback, you basically draw the frame again. This lets you decide the contents of the frame. The idea is like this: void idleFunc() { // You could add some code here, based on which you can change rotation angle, …

Member Avatar for myk45
0
271
Member Avatar for Renesme-LuCiFeR

Hello! >>If Someone Can Help Please Explain A Bit More About The Loops Take a good book and read. I'm not trying to be rude, but you can learn something only when you try to. Install a good compiler, or use an online compiler and try to start simple examples. …

Member Avatar for Ramesh.YoTLC
0
237
Member Avatar for varun51

Here is another version: You could also pass the array to the function instead of making it global. [CODE] char arr[100] = "madam"; int reverse(int start, int last) { if (arr[start] != arr[last]) return 0; if (start >= last) return 1; else return reverse(start + 1, last - 1); } …

Member Avatar for Amangpt01
0
2K
Member Avatar for Labdabeta

My first guess would be that your generated mesh might be going out of your view frustum. It would be best to go incrementally. Using an ortho projection is simpler. So, i would suggest the following: 1) Get the mesh to render in ortho, without any transforms(or minimal), just to …

Member Avatar for Ketsuekiame
0
266
Member Avatar for dospy

Maybe [this](http://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012) works: I have got the setup working on MSVC 2005, but never tried with 2012. So, i hope the above link helps.

Member Avatar for dospy
0
131
Member Avatar for vasuv

> I am planning to design mibile app using c,c++ if possible.can any one please suggest me how to design it if possible. Mobile app for which platform?(Android or iOS)? For Android, there is support for using C/C++ via the NDK. There are several tutorials on it. I had tried …

Member Avatar for myk45
0
172
Member Avatar for myk45

Hello All, i have a small question regarding casts in C++. 1) Now, dynamic_casts ensure safety with casts. ie. for example: for the below polymorphic class: class Base { public: virtual void foo() {} }; class Derived : public Base { }; int main() { Base *bPtr = new Base; …

Member Avatar for myk45
0
595
Member Avatar for on93

The "head" is not null. So, the check in line 76 fails. call `L.linklist_1();` You are setting the head as null there. PS: you can the above in the constructor. Also, next time, mention what problem you face. This time it is a runtime exception due to illegal memory access.

Member Avatar for Lucaci Andrew
0
124
Member Avatar for myk45

Hello All, I am reading the Effective C++ book by Scott Meyers. Regarding new, he mentions the following: > this additional bookkeeping data can more than double the amount > of memory needed for each dynamically allocated object (especially if the class contains no virtual functions). This is in reference …

Member Avatar for jjl.
0
218
Member Avatar for moroccanplaya

Okay, so you basically need to read filenames from the command line, then copy those contents into an archive file. Here is a small piece of code that might help: [CODE]int main(int argc, char *argv[]) { FILE *file_archive, *fp; /* let "archive" be the archive file */ if ( (file_archive …

Member Avatar for Dolby779
0
219
Member Avatar for myk45

Hi all, I am reading about non-copyable objects from this source: [Link](http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Non-copyable_Mixin) I am not able to understand how making the "=" operator for the base class as private is preventing the derived class to make copies. We could just have a public "operator =" in the derived class that …

Member Avatar for myk45
0
307
Member Avatar for myk45

Hello All, I was doing some multi-threaded programming using the new C++11. This thought came across my mind: Is there any problem if some shared data is accessed by multiple cores on a CPU? Even if it is just a read. Does this lead to some problem? Could anyone please …

Member Avatar for mike_2000_17
0
228
Member Avatar for myk45

http://www.technologyreview.com/news/406923/the-problem-with-programming/ A very good article. I myself am guilty of sometimes "just getting the work done" in a hurry :(

Member Avatar for Dani
0
77