301 Posted Topics
**{"title":"iamtitle","icon":"","urlHistory":["http://google.com"],"lastUsed":123}** I have tried in c++ and using json-glib. I have tried using this: g_type_init(); JsonParser *parser = json_parser_new(); json_parser_load_from_data(parser, temp.c_str(), -1, NULL); JsonReader *reader = json_reader_new(json_parser_get_root(parser)); json_reader_read_member(reader,"urlHistory"); JsonNode * value = json_reader_get_value(reader); JsonArray * value1 = json_node_get_array(value); const char * urlhistory = json_array_get_string_element(value1,0); tab.history = urlhistory; json_reader_end_element(reader); cout << … | |
Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? I mean : in C++: this '/' works fine without escape. in Java: this '\/' will result in '/'. Is … | |
I am creating one json array using Json-glib using c++. Here is the data: title="Daniweb" (string) last= 1234 (long) icon="icons" (string) url = "[\"dani.com\"]" (json array) After making one json array using exsiting APIs of json-glib library, I got this: {"id":"Nitin1","clientName":"Gourav_first_task","tabs":"[{\"title\":\"Daniweb\",\"icon\":\"icons\",\"urlHistory\":\"[\\\"Dani.com\\\"]\",\"lastUsed\":1234}]"} Is it the correct json string made? It has … | |
void func(void * ptr) { bytearray temp(10); *((bytearray*) ptr ) = temp; } This code is not going ahead if the third line while executing while this coding is working fine. void func(void * ptr) { const char * temp = "decept"; *((char*)ptr) = temp[0]; } Why is it happening? … | |
I am using Eclipse and there is one strange error coming while building. In files, it is not showing any error but when I build it, it says **Description Resource Path Location Type Program "g++ -std=c++0x" not found in PATH test [Discovery Options] page in project properties C/C++ Problem ** … | |
Today, I faced very weird problem. I have 2 classes say class A and B. Both have one .h and .cpp files. 4 files(A.cpp,B.cpp,A.h,B.h). A class is base class of B and we are using instance of B in class A. It was saying "not a type" error while compiling. … | |
Re: It is quite simple if you know the maths behind this. All these are just bases in which you can write your any number. For example, n = 9 can be written as 1001 in base 2(binary) and it is 9 in base 10(decimal). How am I writing 9 as … | |
I was just thinking that why I need headers at all? In headers, most oftenly we have the declarations only. In .cpp we have the definitons of that .h file. But, why can't we write all the functions directly in .h file and include it in my project files? Why … | |
For my project, I need to learn multithreading in C++. I have read 4-5 articles on Google, and have searched for more but they all are more or less similar. I want to learn it in depth. Can you provide me some links/source/anything for learning mutilthreading in C++? I am … | |
#include <iostream> using namespace std; class Time { private: int hours; // 0 to 23 int minutes; // 0 to 59 public: // required constructors Time(){ hours = 0; minutes = 0; } Time(int h, int m){ hours = h; minutes = m; } // method to display time void … | |
Re: You can have a Bootable CD/DVD/pendrive for fedora and put it in the device while booting up. After that, it will instruct you to have the partition and will ask you where you want to put this in your system. It would be just simple UI. It will prepare desktop … | |
Re: What, and where is the problem in the code? Mention the problem you facing so that we can help you to solve the issue. | |
Re: If you are in hurry, at least pay some time to explain the problem. We will help you if you can explain what is wrong with the code. And don't be in urgency, here things will go in their normal pace. | |
I am curious to know how I can make my own library and use it for my C/C++ programs? I mean I want to make a library say "maths_example" which will have 2-3 files having some basic functions of maths. Then, I want to use that library for my programs … | |
Re: should i take a book for android or wiki is sufficient ? you have mentioned alot of books.. how to decide which should i take ? i am just a beginner in android. | |
I am using C/C++. I am using geany for editing my codes. I want to use beecrypt in my programs. But ofcourse, it is not included by defualt. I have downloaded beecrypt library already but don't know how to use it with my programs. I have put my program in … | |
Main.cpp #include <iostream.h> #include "functions.h" int main(){ print_hello(); cout << endl; cout << "The factorial of 5 is " << factorial(5) << endl; return 0; } hello.cpp #include <iostream.h> #include "functions.h" void print_hello(){ cout << "Hello World!"; } factorial.cpp #include "functions.h" int factorial(int n){ if(n!=1){ return(n * factorial(n-1)); } else … | |
I have considered 3 laptops till now: first is: i5 4th gen/ 4GB RAM/ 500GB hard disk/ 1 GB graphic /Windows 8/ 45k INR Second: i5 4th gen/ 4GB RAM/ 1TB hard disk/ no dedicated graphic/Ubuntu/ 41k INR Third is: i5 4th gen/ 6GB RAM/ 1TB hard disk/ 2 GB … | |
I want to buy a laptop with the following requirements: 1. Daily use 2. 1 TB Hard-disk 3. 4-6 GB RAM 4. i5(4th gen) processor 5. 1GB graphic card 6. Windows 7 Basic 7. <= 50,000 INR Which company laptop should I buy? Lenovo, HP, SONY, DELL or what? and … | |
Re: that girl looks really nice!! i must say.. better than here's weather... :-) | |
Re: printf("%c",x); where x is any character variable which is defined like this : char x; hope it helps!! thanks. | |
I am new to parsers. I want to extract/parse the HTML documents. I have heard of this HTML DOM using PHP. Can ypu tell me some links or some basic introduction to start with? How can I use it to extract info from HTML document? Thanks in advance. | |
Actually, I am working on a project. I want to extract all the reviews from a website which has reviews related to movies, for example. I want to make an automated system which can extract the content of the website and save it to a file. That will be my … | |
hi, Can anyone suggest me the approach for finding the lcm of the n numbers? my approach: find the max of the n numbers and start dividing it by all numbers , if all are dividing it then print it, else take next multiple of the max number and repaet … | |
I am a Computer Science student. I have to select my final year project as soon as possible. I am confused how I should select my project. Can you help me by telling me the strategies for the same? I am interested in C++, Java, Web development, Recommender Systems. Actually, … | |
I want to buy my first guitar and I don't want to spend much money in the very beginning as I don't know how to handle it and all those things. I want to buy an acoustic one. So, can you suggest me any good and cheap guitar on which … | |
Re: I play paino. I once played in one party which was quite sucessful. But that was not me alone, it was a team work. Currently, I am focussing on my high notes voice skills. ;) ![]() | |
hello everybody, actually I want to work on some open-source project. I want to learn something new and something interesting related to computer science. I can work for 4-5 months on project and even more than that. if not open-source, still if you have something in my mind, you can … | |
I have started two courses on : 1. Intro to Recommender systems 2. An Introduction to Interactive Programming in Python From [cousera.org](https://www.coursera.org/) these days. I am in week 1 of python and week 4 of recommender systems. So are these good courses which i am doing ? Or i can … | |
hey,today someone asked me one question in my class that what is the fastest way to multiply a number by 7 ? I said yes you can use bit-wise operators. the code which i gave him is : int n=10; // for example n = (n<<3)-n; then he aksed me … | |
How many of you are entrepreneur here? Can you explain your idea which you have thought and can you give some tips to others who are also seeking in this direction ? I know Dani is one of them. If she feels , she can also share her experience. This … | |
Re: can i ask one question ? that which thing does not support header files ? Like when u say "conio.h is not supported", so compiler doesn't support ? How can it be ? We insturct compiler to inlclude these-these header files while converting code into machine language. Can you elaborate … | |
Is there any alternative for clrscr() and gotoxy in gcc ? I am using system("cls"); to clear screen but it doesn't identify cls as a valid command whereas in cmd cls is working perfectly on windows? can anyone please help ? i am using gcc as my compiler and using … | |
hello, I have started learning python these days. Although i am following a course on coursera.org for learning it , but that course is going very very slow. Also, I don't know if that course contains all things which is need to build codes in python. I have very good … | |
import sys i=0; def func1(i): print "i am in function func1" if i<5: i=i+1 func1(i) else: return return def main(): print "beginnning the function\n" func1(i) print "hello Daniweb" s='aman' print "hahha" main() it is giving me syntax error in print "hahha" statement. WHat is that ? According to me, it … | |
any one is there who has knowledge and interest in cross-domain recommender systems ? If yes, then reply so that I can discuss few points with you. thanks in advance. | |
Re: Start learning C first, You can start by reading yashwant or Let US C for learning it. Then you can try Dennis Ricthie for intensive learning. Then write some short codes and then learn what is Arithmetic progression and then try to write this code. You will learn a lot. | |
When you wake up early in the morning and rushed for college or office and after reaching over there , you came to know that it is off due to some reasons. did it happen with you at any time ? If yes, then what had you done after that … | |
Actually, I am working on project and specifications are : * using windows 7 ultimate * using Java language to develop project * using IntelliJ IDE for project now, When i run my project it give me output in the section at the bottom in the IDE itself. But, i … | |
Re: freopen() OR fopen(). try to read about them, you will find them useful. thanks. | |
Re: what is the error ? Can you explaim more about the problem ? thanks. | |
I am doing a course in recommender systems on coursera.org. I have got an assignment in that. They have told us to use IntelliJ IDE and Lenskit to use. I am very good at C, C++, but not that well in Java. So finding it difficiult to get up these … | |
my office is solved somehow. i don't know how i have done that. one more arises now. that when i click on say "micosoft powerpoint", then it opens calmly and without any problem. but along with that, (after few seconds), confiferation progress starts and then after few minutes , that … | |
If i use macros as functions , then at compilation time , that macros will me be written as function code. so is it better than inline functions and then why don't we use macro always to write the functions as it will speed up our execution. so writing macro … | |
Actually, I have a .csv file which has (userID,movieID,rating) seprated by commas. now, I have to read it and also make another .csv in the output. Can anyone tell me how to read a .csv file and take that data in integer (as userid , rating etc are integers). from … | |
I have a map like this : map<int,map<int,int> > m; in this, I can insert value like a 2-D array. like this, m[i][j]=3; so, now i want to iterate all the values in a particluar row of map. for ex. if m is like this : m["user-id"]["movie-id"], then i want … | |
what are your views for : 1.Google India 2.Google US can we have pros and cons as compared to other good companies providing software developer profile ? thanks :-) any help will be appreciated. | |
Re: please elborate your problem so that I can help you more. thanks. | |
can anyone tell me the reliable and good source from where I can keep track of all the vacancies in the companies like Amazon, Microsoft, Yahoo etc ? thanks if you can help me. source that is reliable and on which i can be somewhat "dependent". thanks. |
The End.