- Strength to Increase Rep
- +10
- Strength to Decrease Rep
- -2
- Upvotes Received
- 190
- Posts with Upvotes
- 163
- Upvoting Members
- 109
- Downvotes Received
- 13
- Posts with Downvotes
- 12
- Downvoting Members
- 8
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…
Re: Disturbing noises can be heard from my neighbours | |
| |
Re: 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; … | |
Re: 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 … | |
Re: Apparently it is a stand-alone account, and I needed to log in via Dazah with the new resetted password to work. | |
Re: Here's a good place to start reading about I/O operations: [Click Me!](https://docs.oracle.com/javase/tutorial/essential/io/) | |
Re: > 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 */ | |
Re: 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. :) | |
Re: """ 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 … | |
| Re: 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. |
Re: 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")) … | |
Re: To get a better answer to your problem, post your question in a new thread. | |
Re: 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? | |
Re: 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. | |
Re: 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 … | |
Re: 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>() … | |
Re: 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 … | |
Re: 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 … | |
Re: 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... | |
Re: 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); | |
Re: 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 … | |
Re: 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 … | |
Re: 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 ;) | |
Re: 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) { … | |
Re: 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 … | |
Re: 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": … | |
Re: 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 … | |
Re: 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. | |
Re: Try to take a modular approach, or a class approach, it will suite this project better than a sigle .cpp file. |