565 Posted Topics

Member Avatar for ade.julianto

> example i want search data where month 07 in my column table 01/07/2014 Looks like you need some query for the database: //MySQL syntax: SELECT * FROM table_name WHERE DATE_FORMAT(STR_TO_DATE(column_name, '%d/%m/%y'), '%m') = 'your_month_number' -- assuming that in your table 'table_name' you have a column 'column_name' -- which is …

Member Avatar for Ketsuekiame
0
622
Member Avatar for Lucaci Andrew

I kinda like the idea behind the static/fixed header, but I was wondering if there's any chance to actually extend it, and add the user information to it, like this: ![cc7912a9152d4af5365953c22bf1c3ef](/attachments/large/3/cc7912a9152d4af5365953c22bf1c3ef.png "cc7912a9152d4af5365953c22bf1c3ef")

Member Avatar for Dani
0
581
Member Avatar for lwarshaw19

Here this should fix it: for (double n = 1; n <= i; n++){ pi += pow(-1, n+1)*(4/(2*n-1)); } Pow requires double as arguments, so you'll need to make your variable from the loop a double. Another thing you could do, when you try to print real numbers, is to …

Member Avatar for p s suvin
0
3K
Member Avatar for asker54

This is a simple string concatenation. In PHP, strings can be concatenated using the `.` (dot) operator (read more [here - Click Here](http://www.php.net/manual/en/language.operators.string.php) or [here](http://phphowto.blogspot.ro/2006/12/concatenate-strings.html)). In this case `$master_id` is a variable, so they used string concatenation to get its value and add it into the statement $master_id = "14"; …

Member Avatar for asker54
0
288
Member Avatar for christinetom

You can also use the `stringstream` class - [Click Here](http://www.cplusplus.com/reference/sstream/stringstream/) Here's a small example: #include <sstream> #include <iostream> #include <string> using namespace std; int main(){ char a = 'a'; char b = 'b'; stringstream ss; ss<<a<<b; //adds both chars to the stringstream string concat = ss.str(); //you can get a …

Member Avatar for christinetom
0
466
Member Avatar for marc.orocay

This was already tackled at this post, see the doing, and try to apply to your need: [Click Here](http://www.daniweb.com/software-development/cpp/threads/456193/output#post1982383) Search the forums first, you'll be amazed of what you can find. ;)

Member Avatar for marc.orocay
-1
351
Member Avatar for vipulsrivastava

I see only instructions, did you miss any code to post with that too? I'm asking this because our member rules (on which you agreed upon registration) state this: ***Do** provide evidence of having done some work yourself if posting questions from school or work assignments.* Some basic starters: [Classes](http://www.cplusplus.com/doc/tutorial/classes/) …

Member Avatar for Lucaci Andrew
0
148
Member Avatar for CreatorZeus

Well, you can do it using plain ifstream handling: bool existFile(string filename){ return ((ifstream(filename.c_str())).good()); } [Click Here](http://www.cplusplus.com/reference/ios/ios/good/)

Member Avatar for duskoKoscica
0
536
Member Avatar for a_1

Have a look at the `range(start, stop[, step])` function ([Click Here](http://docs.python.org/2/library/functions.html#range) ) from python. Also, you can use it to generate reverse lists: [Resource - click me](http://stackoverflow.com/a/14931024/1432385) Regarding your usage of the `map(function, iterable)` function: it applies a function to the iterable agrument, so you'll need some elements on which …

Member Avatar for woooee
0
149
Member Avatar for christinetom

`WinMain@16` usually apears when you try to compile some files, which doesn't contain the `main()`/`WinMain()` function (starting point of the program). In your case, not including the souce file with the `main()` function in it was causing your troubles.

Member Avatar for Ancient Dragon
0
18K
Member Avatar for Frank_5

If you have any problems please post your questions. If you just want to contribute to DaniWeb with Sample codes, please post your code in a Code Snippet thread format.

Member Avatar for surajsokasane
0
10K
Member Avatar for ddanbe

Here's a small Linq example: public static IEnumerable<string[]> Read(string path) { return from line in File.ReadLines(path) select line.Split(new [] {','}); }

Member Avatar for deceptikon
0
3K
Member Avatar for MidiMagic

Search for this line when you edit your profile: Disable Ads? (Please consider a small [donation](http://www.daniweb.com/home/donate) if you disable ads). If you do check that box, make sure you check that donation link too.

Member Avatar for Areyankscruel
0
237
Member Avatar for jvasher

Here, take a look at this simple example, maybe it will help you understand how smart pointers can work: #include <iostream> #include <vector> #include <memory> using namespace std; #define SIZE 10 class Test { int* nr, curElem; public: Test() { cout<<"Object created\n"; nr = new int [SIZE]; curElem = 0; …

Member Avatar for Lucaci Andrew
0
248
Member Avatar for davenie.neymar

Our member rules (on which you agreed upon registration) state this: *Do provide evidence of having done some work yourself if posting questions from school or work assignments.* We won't do your homework. Provide us with an actual problem over your code, and we might be able to help you. …

Member Avatar for Lucaci Andrew
0
204
Member Avatar for GeekPlease

As of a quick search on Daniweb I got this: [Click Here](http://www.daniweb.com/software-development/cpp/threads/67312/connecting-c-to-ms-access) which contains other links to this: [Linking MS Acess to C++](http://reydacoco.blogspot.ro/2011/10/linking-to-ms-access-data-source-using.html) [Developing Access Solutions to native C/C++ from MSDN](http://msdn.microsoft.com/en-us/library/cc811599.aspx)

Member Avatar for Ancient Dragon
0
483
Member Avatar for new_developer

**NOTE:** this should be in the C++ forum thread. You need after each input operation to increase the size of the array. Your constructor definition is good, initializing the data, but you must have another function, let's call it `extendArray()` which increases your array size. For example: void extendArray(){ string …

Member Avatar for new_developer
0
321
Member Avatar for pritaeas

Just logged in. This new layout... totally blew my eyes off. Will take some time to adjust, but I see you put a lot of effort in it. I hope others appreciate it. :)

Member Avatar for diafol
0
1K
Member Avatar for son jo

Daniweb rules state this: **Do** provide evidence of having done some work yourself if posting questions from school or work assignments. Show us what you have so far.

Member Avatar for Lucaci Andrew
-4
115
Member Avatar for irtza

Static arrays are allocated on the stack and they have fixed sized, e.g. their size cannot be changed, either shortened or expanded. Dynamic arrays are allocated on the heap. You set their size and than even change it, making them "dynamic". In order to use these kinds of arrays you'll …

Member Avatar for vijayan121
0
4K
Member Avatar for jayreis

I love how Dani was giggling almost all the interview. Immediately thought of this, I don't know why: ![5eb813f0ed7f403817d1bca3123c0072](/attachments/small/3/5eb813f0ed7f403817d1bca3123c0072.jpg "align-left")

Member Avatar for Dani
6
407
Member Avatar for Dani

Well it depends. Where I work, Daniweb is kinda slow, but when I go home (which is near the city, ~15 km away), Daniweb is ultra fast... So depends on the ISP I guess.

Member Avatar for james.lu.75491856
0
500
Member Avatar for Meir David

This is a video-driver-related problem. Check for updates on your video driver, see if anything changes. Google the error message: it will yield a lot of good links, such as this one: [Click Here](http://www.tomshardware.co.uk/forum/32085-63-display-driver-stopped-responding-successfully-recovered)

Member Avatar for Ketsuekiame
0
104
Member Avatar for Rahul47

First of all, it's int main() not void main() 2nd, line 22 sum=sum+(rem*rem*rem); should be sum=sum+pow(rem, numberOfDigits); How to get that `numberOfDigits`? Easy, apply `log10` over it: #include <math.h> #include <stdio.h> int main(){ //don't forget this!!! //code goes here //get your range for int len = (int)log10(num)+1; //get the number …

Member Avatar for Rahul47
-1
199
Member Avatar for cudawella

Search the website first, then post your question: [Click Here](http://www.daniweb.com/software-development/cpp/threads/455587/loops#post1979476)

Member Avatar for Echo89
0
126
Member Avatar for Violet_82

1. If you think that the problem at hand is not that hard, you can only sketch it and start writing code (for larger projects a deeper analysis is required). 2. Since you have to compute the carbon footprint of each of those objects, and you have the formulas, I'm …

Member Avatar for Violet_82
0
6K
Member Avatar for subash sonar

> I m new in programming languge and using turbo c . Get a moder C++ compiler first. >If u kindly give me the above said code, i will be remain thankful to you. Our member rules state this: **Do provide evidence of having done some work yourself if posting …

Member Avatar for Lucaci Andrew
0
180
Member Avatar for Petranilla

Need more info and the code that you think has to do that... See if you assigned to your menu item the jpopmenu object.

Member Avatar for Petranilla
0
164
Member Avatar for Mak!zZz
Member Avatar for RLS0812

1st, it's `int main()` and not `void main()` 2nd, You were actually doing a pointer aritmetic by this line: xx+= x + ", "; In your case, `", "` is a pointer to a sequence of characters. When you add an integer to that sequence, you are using pointer arithmetic. …

Member Avatar for Lucaci Andrew
0
165
Member Avatar for Abhinisha

Still, you could've formatted the code a bit. **nullptr**'s example points out very well the use of a default constructor. For multiple elements to be initialized, you could go the plain old fashion way of: class Foo{ int a, b, c, d; float e, f, g, h; public: Foo() { …

Member Avatar for Lucaci Andrew
0
124
Member Avatar for Petranilla

Here's a small example. You can use the `getButton()` function from `MouseEvent`. final JLabel lblRightClickMe = new JLabel("Right click me"); //create a label lblRightClickMe.setBounds(152, 119, 94, 14); final JPopupMenu jpm = new JPopupMenu("Hello"); //create a JPopupMenu jpm.add("Right");jpm.add("Clicked");jpm.add("On"); //add some elements jpm.add("This");jpm.add("Label"); lblRightClickMe.setComponentPopupMenu(jpm); //set jpm as this label's popup menu lblRightClickMe.addMouseListener(new …

Member Avatar for Petranilla
0
10K
Member Avatar for mahesh113

For a better understanding of this output, I suggest this code to run in the `main()` function: int main() { Base obj; cout<<" 1st - initialization.\n"; int b = obj+6; cout<<" 2nd - get the int via the int() conversion operator\n"; obj = b; cout<<" 3rd - create a new …

Member Avatar for Lucaci Andrew
0
153
Member Avatar for ef_mag

Try using a csv file [Click Here](http://viralpatel.net/blogs/java-read-write-csv-file/).

Member Avatar for jalpesh_007
0
156
Member Avatar for islam.fci.3

It's kinda hard for us to figure out your problems since you didn't share them with us.

Member Avatar for tinstaafl
0
274
Member Avatar for shahinalam07

Wrong thread. Post it here [Click Here](http://www.daniweb.com/software-development/python/114).

Member Avatar for stbuchok
0
105
Member Avatar for liliafan

**Abhinisha** if you have a specific question please start your own thread. Our member rules state this: *Do not hijack old forum threads by posting a new question as a reply to an old one*. This thread is 9 years old. I doubt they're still looking for answers.

Member Avatar for Lucaci Andrew
0
218
Member Avatar for rash_13

Maybe this link will share some light over this situation: [Click Here](http://tartarus.org/martin/PorterStemmer/)(never heard of it too).

Member Avatar for Lucaci Andrew
0
128
Member Avatar for abra_ka_dabra

Usually Java has some tutorials on this over their website: [Click Here](http://docs.oracle.com/javase/tutorial/essential/io/buffers.html) Full tutorial: [Click Here](http://docs.oracle.com/javase/tutorial/essential/io/index.html)

Member Avatar for abra_ka_dabra
0
182
Member Avatar for new_developer

Your problem lies in line 17: name = ""; Your `name` attribute is initialized to a read only memory having `name` to point to that memory location, but any writing is illigal, thus your error. If you would initialize `name` as this: name = new char[200]; you would allocate memory …

Member Avatar for rubberman
0
419
Member Avatar for alaba81

Our rules cleary state this: **Do** provide evidence of having done some work yourself if posting questions from school or work assignments

Member Avatar for Lucaci Andrew
0
126
Member Avatar for degarb

What is the error that comes out of your pythonw.exe? Try runnning it in a cmd window to see if you have any errors.

Member Avatar for bumsfeld
0
256
Member Avatar for vivosmith

As **iamthwee** pointed out, if you put in the constructor the name argument, that's ok, your object will set the name attribute to whatever you want, but, if along the run of your program, you want to make changes to your object, e.g. the course name has been changed, you …

Member Avatar for stultuske
0
247
Member Avatar for mr.unknown

Here, this is an example of your problem, but reversed, from top to bottom: #include <iostream> using namespace std; #define SIZE 12 int main(){ for (int i=0;i<SIZE/2;i++){ for (int j=0;j<SIZE;j++){ cout<<" "; if (j >= (SIZE/2-i)-1 && (SIZE/2-1) >= j) cout<<"X"; else if (j > SIZE/2) break; } cout<<endl; } …

Member Avatar for rubberman
0
415
Member Avatar for Eyobed Paul

Here's a good place to start: [Click Here](http://vulcan.wr.usgs.gov/Miscellaneous/ConversionTables/conversion_table.html)

Member Avatar for rubberman
-1
130
Member Avatar for Yongsmith

Maybe something along this snippets will help you: [Click Here](http://www.laurentluce.com/posts/python-threads-synchronization-locks-rlocks-semaphores-conditions-events-and-queues/) Also, this for i %2 == 1 in range(200): never, use the step argument from the range funtion: for i in range(1, 200, 2): #odd numbers for i in range(0, 200, 2): #even numbers

Member Avatar for Lucaci Andrew
0
179
Member Avatar for rash_13

If you want the `C-style` string (null terminated sequences of characters), you can get it by the `c_str()` function from the `std::string` class. [Click Here](http://www.cplusplus.com/reference/string/string/c_str/) As for getting the sufix, try using the `substr(startpos, stoppos)` function. [Click Here](http://www.cplusplus.com/reference/string/string/substr/) Also, here's a small example of how you can convert a string …

Member Avatar for Lucaci Andrew
0
319
Member Avatar for mozammel

Why would you need to `delete` p if it's not allocated by `new`? If you really want to "clear" out the `p` pointer, you could asign it to `NULL`.

Member Avatar for rubberman
0
212
Member Avatar for chikaibeneneme

averageCal; productCal; sumCal; should be averageCal(userinputs); productCal(userinputs); sumCal(userinputs); They are functions. You should call them accordingly.

Member Avatar for Lucaci Andrew
0
230
Member Avatar for ArsenalTengu

I'm guessing you already found this good tutorial on PostgreSQL and Python: [Click Here](http://zetcode.com/db/postgresqlpythontutorial/) What is your problem with your code (except the fact that it isn't even inserted in a code block...). Do you get a specific error message, or you just don't get any result at all. I'm …

Member Avatar for ArsenalTengu
0
223

The End.