Posts
 
Reputation
Joined
Last Seen
Ranked #234
Strength to Increase Rep
+10
Strength to Decrease Rep
-2
94% Quality Score
Upvotes Received
190
Posts with Upvotes
163
Upvoting Members
109
Downvotes Received
13
Posts with Downvotes
12
Downvoting Members
8
35 Commented Posts
~558.96K People Reached
About Me

Asp.Net Developer

Interests
Programming mostly.
PC Specs
Desktop: Windows 7 Ultimate 64-bit, 16384MB RAM, Processor: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz…
Favorite Tags

565 Posted Topics

Member Avatar for vegaseat
Member Avatar for The Dude
Member Avatar for Duki
Member Avatar for rajesanthu

Assuming your system time is ok, this will calculate an aproximate of your years: #include <ctime> #include <iostream> using namespace std; int main(){ struct tm date = {0}; int day, month, year; cout<<"Year: "; cin>>year; cout<<"Month: "; cin>>month; cout<<"Day: "; cin>>day; date.tm_year = year-1900; date.tm_mon = month-1; date.tm_mday = day; …

Member Avatar for Youssef Faisal
-4
44K
Member Avatar for zzmrzz

This looks more of a school asignment. Also > I have been programming C# for some time, and i recently learned about constructors and objects, but didn't fully understand. indeed looks like a contradictory statement. The questions you've put here are the basic understanding of OOP, and are not tied …

Member Avatar for Lucaci Andrew
1
529
Member Avatar for Andrei_3

Apparently it is a stand-alone account, and I needed to log in via Dazah with the new resetted password to work.

Member Avatar for Lucaci Andrew
0
466
Member Avatar for Adhya_1

Here's a good place to start reading about I/O operations: [Click Me!](https://docs.oracle.com/javase/tutorial/essential/io/)

Member Avatar for Lucaci Andrew
0
259
Member Avatar for dileepkumar235

> i can't get. what is the id and pass. They are on line 8 and 9: char uid[25],pwd[25],s_uid[][25]={"11user1","12user2","13user3"}; char s_pwd[][25]={"Pwd1","Pwd2","Pwd3"},ch='a';/*dummy character in ch */

Member Avatar for Tanmay_1
0
4K
Member Avatar for trushenion12

DW starting page for C++: * [C++ Books](https://www.daniweb.com/software-development/cpp/threads/70096/c-books) * [Starter problems](https://www.daniweb.com/software-development/cpp/threads/67837/c-c-faqs-and-practice-problems) These two threads should put you on a good track. :)

Member Avatar for Lucaci Andrew
0
112
Member Avatar for vegaseat

""" result ... with the @Memoize decorator ... first pass: fibo1(30) takes 106.077 micro-seconds/pass second pass: fibo1(30) takes 2.281 micro-seconds/pass without (commented out) the @Memoize decorator ... first pass: fibo1(30) takes 875692.257 micro-seconds/pass second pass: fibo1(30) takes 877517.997 micro-seconds/pass """ Or wasn't that clear enough? His first test was indeed …

Member Avatar for vegaseat
4
686
Member Avatar for alan91

Maybe this topic will help you: http://www.daniweb.com/software-development/cpp/threads/426915/asterisk-right-triangle It's almost the same concept/ideea involved.

Member Avatar for Lardmeister
0
2K
Member Avatar for techker

It's kinda hard to tell what you're trying to accomplish here. Putting System.IO.StreamWriter file = new System.IO.StreamWriter("Conservateur.txt"); file.WriteLine(lines); file.Close(); inside your `foreach` statement will do you no good, because it will overwrite the same file, over and over again. var inMemoryProcessedItems = new List<string>(); using (var sw = new StreamWriter("yourfile.txt")) …

Member Avatar for techker
0
255
Member Avatar for vegaseat
Member Avatar for Gribouillis
0
20K
Member Avatar for awesomelemonade

Because he escaped from a 1900's prison. Knowing that, on a regular computer, such as the PC one, 9.9999999999999999999999999999864e+4351 * 9.9999999999999999999999999999864e+4351 = 9.9999999999999999999999999999728e+8703, and 9.9999999999999999999999999999728e+8703 * 9.9999999999999999999999999999728e+8703 = Overflow, how much is Overflow * Overflow?

Member Avatar for Slavi
1
2K
Member Avatar for Kunai9292

It would be like this: current_year<-2012 for i=current_year to current_year+123 do for j=0 to 124 do if i*i==j then print year=j print age=i print birth year=j-i end_if end_for end_for Remember, this is written in pseudo-code, so you'll have to implement it.

Member Avatar for TylerD75
0
9K
Member Avatar for IT_Techno

Maybe it's a problem related to the culture and settings on the client's PC (as in missing fonts or encoding). As **Suzie999** suggested, check the dependencies of your software with the client. Also, provide the code of your software that is loading the data into the reports, maybe you've missed …

Member Avatar for IT_Techno
0
368
Member Avatar for Yahia Farghaly

You could also use LINQ to search for that. Knowing that Hashtable uses internally DictionarEntry to store its items (since .Net 1.1), we can cast it to such and search for the item we want. var hash = new Hashtable(); hash.Add("1", "one"); hash.Add("2", "TEST"); hash.Add("3", "one"); var res = hash.Cast<DictionaryEntry>() …

Member Avatar for Lucaci Andrew
0
136
Member Avatar for Yorkiebar14

Is this: private void Popup_Load(object sender, EventArgs e) { Panel panel2 = new Panel(); panel2.Size = new Size(1280, 720); panel2.Location = new Point(20, 20); panel2.BackColor = Color.Red; this.Size = new Size(1280, 720); this.Controls.Add(panel2); } declared as an event in the Form which is calling the pop-up, or in the pop-up …

Member Avatar for Yorkiebar14
0
301
Member Avatar for Miguel24.07

Here's something for you: I/O on files: [Click Here](http://www.cplusplus.com/doc/tutorial/files/) For the XML part: **a.** use some libraries for parsing the file: TinyXML: [Click Here](https://sourceforge.net/projects/tinyxml/) Xerces: [Click Here](http://xerces.apache.org/xerces-c/) **b.** use regex for matching: Here's an online tool to test your regex:[Regex101](http://regex101.com/) **c.** brute parse the file and count the `<home>` and …

Member Avatar for Lucaci Andrew
0
230
Member Avatar for vegaseat

it's kinda improper for you to say that things lsallen, because daniweb is a free source code website, so, I don't think that any1 will 'steal' your code and sell it on ebay...

Member Avatar for lsallen
4
7K
Member Avatar for nathan.pavlovsky

You should have a look at this too: [nreco.pdfgenerator official site](http://www.nrecosite.com/pdf_generator_net.aspx) [nreco nugget](https://www.nuget.org/packages/NReco.PdfGenerator/1.0.2) Here's the basic example, after adding the library to your project: var htmlContent = String.Format("<body>Hello world: {0}</body>", DateTime.Now); var pdfBytes = (new NReco.PdfGenerator.HtmlToPdfConverter()).GeneratePdf(htmlContent);

Member Avatar for du_1
0
958
Member Avatar for myk45

Well, you could attach a signal to the button, so that when it's pushed it will perform some actions, in your case to show the help. It's been a while since I've worked with QT so I don't have a concrete example (not a correct one at least), so I'll …

Member Avatar for mike_2000_17
0
174
Member Avatar for bella.twins.94

Here's a headstart. Regex to find words starting with a lowercase vowel. #include <iostream> #include <regex> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { regex reg("\\b[aeiou]\\S*"); string str("Carry umbrella and overcoat when it rains"); smatch match; while (regex_search(str, match, reg)) { for (auto i : match) cout …

Member Avatar for Lucaci Andrew
0
3K
Member Avatar for mark103

Look at this post: [Click Here](http://stackoverflow.com/a/11822850/1432385) You can kill the thread you're opening when you press enter. Happy reading ;)

Member Avatar for DragonMastur
0
477
Member Avatar for Auroch

I suggest changing a bit your struct: struct point { float x, y; point (float x, float y) { this->x = x; this->y = y; } bool operator <(point &p){ return this->x < p.x && this->y < p.y; // comparison logic } friend ostream& operator<<(ostream& os, const point &p) { …

Member Avatar for Lucaci Andrew
0
277
Member Avatar for EarhawkPH

Since you're posting in the C++ thread, at least use the corresponding I/O functions: [Click Me!](http://www.cplusplus.com/doc/tutorial/basic_io/) In your case, you're `"syntax error"` comes from the lines 5 and 6... you forgot the `';'` ending character. Regarding the logic of the program: What is the discount in your problem? Is a …

Member Avatar for Lucaci Andrew
0
166
Member Avatar for pizzaaaa

Always read the documentation if in doubt: [PyDoc - def](https://docs.python.org/release/1.5.1p1/tut/functions.html) As for you, here's an example of a submenu (Python 3.x): def firstMenu(): print ('''This is the first menu 1. Hello 2. World 3. Submenu q - exit ''') while True: answer = input("Insert command: ") if answer == "1": …

Member Avatar for Lucaci Andrew
0
138
Member Avatar for Szabi Zsoldos

Have you looked at the specification from the website? [substring(click here)](http://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringUtils.html#substring\(java.lang.String, int, int\)) What are the actual parameters that the function takes? > Parameters: str - the String to get the substring from, may be null start - the position to start from, negative means count back from the end …

Member Avatar for Lucaci Andrew
0
275
Member Avatar for iAssistant

It's snowing here too, but it's kinda warm for a winter day (only -2C). Snow is already around 10 cm high. Who knows, maybe I'll go snowboarding this weekend.

Member Avatar for Stuugie
0
4K
Member Avatar for kumarprashant

Try to take a modular approach, or a class approach, it will suite this project better than a sigle .cpp file.

Member Avatar for Bendez Thyna
0
301
Member Avatar for darrylnuyda

I hope I didn't misunderstand your question: So let's say you have 2 forms, `Form1`, and `Form2`. Your main form is `Form1`, your popup form is `Form2`. You also have 1 textbox and one button on each of the forms, but when you click on the button from the `Form1`, …

Member Avatar for darrylnuyda
0
4K
Member Avatar for jr.sayre3

Here, this should pretty much clear everything uncertain about converting any number to base 10: [Click Here](http://mathbits.com/MathBits/CompSci/Introduction/tobase10.htm) Also, your function is wrong, don't rush through steps, it will get you confused: #include <cmath> int ToBase10(int number, int base){ int ret = 0; //return number; for (int i = 0; i …

Member Avatar for Lucaci Andrew
0
124
Member Avatar for Sevyt

Use in your main window a Dictionary with a `Key` and a specific class to store your progress information. Also, have a `StackPanel` in your main window, to display the `ProgressBar`s. private Dictionary<Key, Progress> progressBars = new Dictionary<Key, Progress> { { Key.O, new Progress() } , { Key.L, new Progress() …

Member Avatar for Sevyt
0
210
Member Avatar for lmuller89

You only declared your pointer. Also you allocate memory for your `filter_list` pointer in an `if` clause, yet you try to access that pointer in an `else if` clause. The compiler throws a warning, saying that it's possible to enter only in the `else if` clause, without entering first in …

Member Avatar for Lucaci Andrew
0
5K
Member Avatar for Stuugie

What do you mean by >quick or efficient? Function replaceNull() Dim filename = "a.txt" Dim regex As Regex = New Regex(New String(vbNullChar)) Dim replacement As String = " " Dim reader As StreamReader = My.Computer.FileSystem.OpenTextFileReader(filename) Dim writer As StreamWriter = New StreamWriter("out_" + filename, True) Dim line As String Do …

Member Avatar for Stuugie
0
844
Member Avatar for saintchuks

First of all, you'll need a MySql connector for your project [Click Here](http://dev.mysql.com/downloads/connector/net/6.8.html), or you can import it (if using VS) by managing NuGet packages. After that you'll need to have some sort of access to the database, like this: string connStr = String.Format("server={0};user id={1}; password={2};" + "database=your_database; pooling=false", "server_ip", …

Member Avatar for Lucaci Andrew
0
243
Member Avatar for xednycrex

Have you checked this thread? You can find a lot of problems to solve, and some of them are quite interresting. [Click Here](http://www.daniweb.com/software-development/cpp/threads/67837/c-c-faqs-and-practice-problems)

Member Avatar for Lucaci Andrew
0
190
Member Avatar for mixelplik

You could do it using the ifstream class [Click Here](http://www.cplusplus.com/reference/fstream/ifstream/). Here's a small example: string filename = "a.txt"; ifstream fin(filename.c_str(), ios::in); if (fin.good()){ string line = ""; while (getline(fin, line)){ cout << line << endl; } }

Member Avatar for Lucaci Andrew
0
191
Member Avatar for sohail.butt.144

All we can do is to answer (if we know) specific questions, asked upon specific code/logic related errors. I see only a statement and a request, not a question. Please formulate a question regarding a specific part of your assignment that is giving you a hard time, and also post …

Member Avatar for Learner010
0
290
Member Avatar for Learner010

Here's a small example: char* a = "abcdef"; cout << a[2] << endl; //offset 2 of a is c And here's a good link to describe that: [Click Here](http://www.cplusplus.com/doc/tutorial/pointers/#arrays)

Member Avatar for deceptikon
0
160
Member Avatar for Dani

Have you tried removing the `https:` from the frame? And link it just like `//connect.facebook.net` or whatever plugin is there? This will force the frame to load using the current page scheme (protocol relative URL).

Member Avatar for jeffcogswell
0
453
Member Avatar for noobeyne

Change `icons[i].src` to `this.src` Note that you are inside the function of `icons[i]` by `icons[i].onload = function()` Here's a small example: <html> <head> <title></title> <script> var img = []; for (i = 0;i<3;i++){ img[i] = new Image; img[i].src = "b.png"; //assuming you have a b.png img img[i].onload = function(){ alert(this.src); …

Member Avatar for noobeyne
0
304
Member Avatar for Sagarnil

You could parse the log file line by line, and see if there are duplicate lines: def uniq(inlist): return [i for i in inlist if inlist.count(i) > 1 and not inlist.remove(i)] So for your log, for i in uniq(open("log.txt").readlines()): print i, this would be the output ''' at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1326) ~[org.apache.axis2.jar:na] …

Member Avatar for Lucaci Andrew
0
809
Member Avatar for yudilegawa

Maybe this post will help you: [Click Here](http://stackoverflow.com/a/622308/1432385) If you have a proper ip to relate to your windows mysql server, then it will be a matter of setting the right properties in the python connection.

Member Avatar for Lucaci Andrew
0
246
Member Avatar for Ene Uran

Here's a small example: # en to de trans = { "house" : "haus", "car" : "auto", "food" : "lebensmittel", "sleep" : "schlaf" } while True: ans = raw_input("Translate: ") if ans == "quit": break print trans[ans] if ans in trans else "Invalid word." Basically, you search for the given …

Member Avatar for Lucaci Andrew
0
4K
Member Avatar for samtechae

In order to do this program, one should know the very basics of arrays. Here, this might help you: [Quick, Click Me!](http://www.cplusplus.com/doc/tutorial/arrays/)

Member Avatar for anku gupta
0
129
Member Avatar for maurice.waka

Here are some basic list examples: l = ["1","2","3","4","5","6"] half = len(l)/2 print (l) #normal list print (l[ : : -1]) #reverse list print (l[: half - 1 : -1]) #reverse list from last to middle print (l[half - 1 : : -1]) #reverse list from the middle to first …

Member Avatar for Lucaci Andrew
1
228
Member Avatar for iamthwee

**iamthwee** you can make a shorthand of the original link from google, like this: www.google.co.uk/search?q=what+to+search so that you can avoid having a long google link. Also, words are split by `'+'`.

Member Avatar for Dani
0
94
Member Avatar for isralruval

**sheetalphapale** if you have a question, please start your own thread. One of our rules is not to hijack old threads (this is 4 years old), especially when you have a question. That being said, here, this might help you: > You can make use of the `stringstream` class from …

Member Avatar for sheetal Phapale
0
4K
Member Avatar for nhrnjic6

You can make use of the `std::sort()` ([Click Here](http://www.cplusplus.com/reference/algorithm/sort/)) function which is found in the `<algorithm>` header. It require two random access iterators from a sequence, the first iterator should point to the beginning of the sequence, and the second to the end of the sequence. It also requires a …

Member Avatar for nhrnjic6
0
153

The End.