- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
С/С++/C#/Java SE/Groovy/Grails/Rails/iPhone/iPad/Web developer
68 Posted Topics
Re: [QUOTE=hollywoood69;984123]I called it in the second set of code.[/QUOTE] No, you don't. There is correct code [code=cpp] void mortgagePayment::Mortgage() { double principle = 0; double rate = 0; int term = 0; double total = 0; cout << "Please enter Loan amount: "; cin >> principle; cout << "Please enter … | |
Re: your structure is linked list each element in the linked list have pointer to the next element in the list [code=c] struct list { int value; struct list *next; }; struct list *first = (struct list *)malloc(sizeof(struct list)); //pointer to the first element in the list first = first->next; //set … | |
Re: I listening music every day, while browsing, working et cetera. Now I listening Bowling For Soup - Almost good pop-punk music | |
Re: You want to create that row via javascript? In this case you can add an id to the row, then find that element by id, and copy it's innerHTML. | |
Re: Show html code of login page. | |
Re: Do you use some kind of javascript library (e.g. prototype, jquery)? If you use prototype, then you can click that button by something like this [CODE] var selector = new Selector('form > table:nth-child(1) > tbody > tr:nth-child(1) >td:nth-child(2) > table:nth-child(5) > tbody > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1) > img:nth-child(1)'); … | |
Re: Something like this [CODE=javascript] for (var i = 0; i < mySelect.options.length; i++) { if (mySelect.options[i].selected) document.write(" mySelect.options[i].text\n") } [/CODE] | |
Re: Try this [CODE=javascript] var url=("availabilitycheck.php?t="+value+"&hid="+hd1+"&chkin="+chkin); [/CODE] | |
Re: If you want to paginate at the client side, you need to load all pages of search content. After that, you need a script, which paginate your content Here is example [url]http://www.geekinterview.com/question_details/34889[/url] | |
Re: You can download all javascripts by the one request - just make one file for all of it. Css - the same. One file - for all styles. But there is no solution for images. It must be loaded separately. | |
Re: [CODE=javascript] //Set the two dates today=new Date() var christmas=new Date(today.getFullYear(), 11, 25) //Month is 0-11 in JavaScript if (today.getMonth()==11 && today.getDate()>25) //if Christmas has passed already christmas.setFullYear(christmas.getFullYear()+1) //calculate next year's Christmas //Set 1 day in milliseconds var one_day=1000*60*60*24 //Calculate difference btw the two dates, and convert to days document.write(Math.ceil((christmas.getTime()-today.getTime())/(one_day))+ " … | |
Re: It's simple - just don't use ajax for navigation. Ajax does not change address bar. | |
Re: try to [CODE=javascript] javascript:alert($('.unfollow').click()); [/CODE] But it is not working right for pages with list of followable and unfollowable people. | |
Re: If you need a nice JSP (and other) examples - visit [url]http://netbeans.org/kb/trails/java-ee.html[/url] | |
Re: [CODE=html] <table border="1"> <tr><td class="editable">text1</td><td>text2</td><td><input type="checkbox" onclick="edit_input(this);">Edit</td></tr> <tr><td>text3</td><td class="editable">text4</td><td><input type="checkbox" onclick="edit_input(this);">Edit</td></tr> <tr><td class="editable">text5</td><td>text6</td><td><input type="checkbox" onclick="edit_input(this);">Edit</td></tr> </table> <script type="text/javascript"><!-- function save_input(obj) { obj = obj.parentNode; obj.innerHTML = obj.firstChild.value; } function edit_input(obj) { var is_checked = obj.checked; while (obj.tagName!='TR') obj = obj.parentNode; var td = obj.getElementsByTagName('TD'); var len = td.length; if (is_checked) … | |
Re: Try to type this [CODE=c++] c = is.get(); // get character from file cout << (int)c; [/CODE] Or [CODE=c++] c = is.get(); // get character from file int int_c = (int)c; cout << int_c; [/CODE] ostream operator << overloaded for all primitive types. So you have to define the type … | |
Re: Show declaration of all classes. And main program. | |
Re: This is not a listbox. This is user-component which inherits from a listbox class. So you need to make your own component, based on a standard listbox. Something like listbox, which have two textboxes as a one item in it's collection. | |
Re: Make a loop for each object in the map2. Like this [code=cpp] map<string, map<string, int>>::iterator iter; for(iter = map2.begin(); iter != map2.end(); ++iter) { try { if(iter.second.size() == 0) std::cout <<"map1 doesn't exist in this record\n"; else std::cout << "map1 exists in this record. It's size is " << iter.second.size() … | |
Re: All depends on a programming language. If you use C++ or C# then install Visual Studio (it is desirable 2008, but 2005 also good) and SDK or lib, which you like to use. For example VS 2008 and DirectX SDK. | |
Re: first of all you must install DirectX SDK then I suggest you to get the book [B]Andre Lamothe - Tricks of the Windows Game Programming Gurus[/B] And if you needs examples, I have a few one. | |
Re: The most simplifying method is a structures. Like that [code=c] struct Node { int value; //data of node Node *next; //pointer to a next node in the list }; struct List { Node *first; Node *last; }; [/code] Implementation you will type by yourself. Good luck! | |
Re: For first you have to create socket. After that wait for connections. When connection is incoming, accept it and get data of connection(IP, port...) from the second argument of function [B]accept[/B]. After that - type some function, which will send some test packets and awaits for the answer (some kind … | |
Re: Show your server socket code. If I'm right - you just forget to close server socket before shutting down the server. And there are some errors in your client code. You forget to close socket after getting an error [code=cpp] //create the socket client = socket(AF_INET, SOCK_STREAM, 0); //set the … | |
Re: How did you add forms to the project? | |
Re: I dont understand why you use copyList method for just copying two pointers... For copying one list to another you must copy head and tail pointers. So your copy constructror will be like this [code=cpp] template <class T> List<T>::List(const List<T>& oldList) { this->head = oldList.head; this->tail = oldList.tail; } [/code] … | |
Re: Try to link the project with /MT key, and Release mode. And don't forget to link directX libraries into project. | |
Re: Where is a picture? If I understand you correctly, watch this [code=cpp] this->progressBar1->Maximum = this->trackBar1->Maximum; ///-------------------------------------------------------------------------- private: System::Void trackBar1_ValueChanged(System::Object^ sender, System::EventArgs^ e) { this->progressBar1->Value = this->trackBar1->Value; } [/code] | |
Re: It will be better, if you'll show a code. And error report. | |
Re: You may type some lexical analyzer, which will identify a declaration part of each variable. But for construction like type casting it will not work. So, for clear solution you have to write syntax analyzer, and grammar of C. | |
Re: I have a some class which allows to write in a *.xls (not a *.xlsx) files. [code=cpp] //XLSWriter.h //--------------------------------------------------------------------------- #ifndef XLS_WRITER_IMPL_H #define XLS_WRITER_IMPL_H #include <stdio.h> //--------------------------------------------------------------------------- #define CBOF 0x0009 #define BIT_BIFF5 0x0800 #define BOF_BIFF5 (CBOF | BIT_BIFF5) #define BIFF_EOF 0x000A #define DOCTYPE_XLS 0x0010 #define DIMENSIONS 0x0000 #define BLANK 0x0000 #define … | |
Re: Try to call [B]mq_getattr[/B] function and check current number of bytes in queue. | |
Re: After an insertion in a middle of the list you lose a pointer of pos->next To fix that you must place new pointer there Something like this [code=cpp] if(pos != head && pos != tail) { pos->prev = nodePtr; nodePtr->prev = pos->prev->prev; //sets a previous node of new node nodePtr->next … | |
Re: Try to use standard WinThreads. CreateThread / begintread / beginthreadex And don't forget to include "Windows.h" | |
Re: You can sort your array by an one field. Compare the same fields into two objects in the array. And then use Bubble sort, for example. But, i suggest you to use [B]std::vector[/B] for keeping that structures. In this case you need to overload a < operator in your structure. … | |
Re: try to type this [code=cpp] if(fn.peek() == '\n' || fn.peek() == EOF) [/code] Look this [url]http://msdn.microsoft.com/en-us/library/ebe3zf17(VS.80).aspx[/url] [QUOTE]peek method returns the next [B]character[/B][/QUOTE] | |
Re: I think the best solution is using Finite-state machine or B-tree to keep you dictionary. [URL="http://en.wikipedia.org/wiki/Finite-state_machine"]Finite-state machine(Wiki)[/URL] There is some kind of algorithm: 1. Take a letter from array. 2. Search that letter into the finite-state machine or B-tree 3. Get all of letters which follows that letter 4. Check … | |
Re: First, something like that Parent process [code=c] #include <stdio.h> #include <fcntl.h> #include <unistd.h> int main() { int child_process = 0; child_process = fork(); if(child_process < 0) exit(1); if(child_process == 0) { int res = execl("child", "child 5", "", 0); //place name of your Fibonacci programm instead of first "child", and … | |
Re: Problem of your programm is not a fork() Try to place endless for in the teststr function, and after that place calling DemoFork() function before calling teststr() Why you call teststr function without any arguments? | |
Re: You can use Qt for this purpose. [URL="http://doc.trolltech.com/4.4/desktop-screenshot.html"][B]Example[/B][/URL] | |
Re: [QUOTE]The hooking part seems to be completely global in windows, meaning that It picks it up no matter where I double click, but it doesn't pick up the clicks when I have Call of Duty 4 opened, which is the main reason I made this =([/QUOTE] Maybe Call of Duty … | |
Re: Try to use char variable of choice. Then your code will be like this [code=cpp] //declaration void decision(char action); //implementation void decision(char action) { // Are these variable & function names acceptable? string word; switch (action) { case '1': cout << "\nEnter word: \n" << flush; cin >> word; to_lower(word); … | |
Re: Can you show declaration of [B]ayarlar[/B] class? | |
Re: Try to type like this [code=cpp] send(s, buf, strlen(buf)+1, 0); [/code] or use the safe method [B]lstrlen()[/B] | |
Re: Function can't define type of T2. One way to solve it - it's using class template that indicates all types patently. Example [code=cpp] template <class A, class B, ..., class Z> class MyClass { //body }; //initializing MyClass < int, int,...,float > a; [/code] I hope it will help you. | |
Re: [code=cpp]do { total += total; //there is cout << "Please enter a length: "; cin >> length; cout << "(I)nches, (F)eet or (M)eters? "; cin >> operation; if (operation == 'M') { total = length ; } if (operation == 'F') { total = (length / 3.2808) ; } if … | |
Re: I think you have to try use Regular expressions. [URL="http://msdn.microsoft.com/en-us/library/4384yce9(VS.80).aspx"]Info[/URL] So there is algorithm: 1. Get string 2. Get first word with '?' symbols 3. Get all words from the list, which have the same first letter and length 4. Through regular expressions does compare a word from a list … | |
Re: Floating type does not have fixed precision. and if you enter 123.456 try to print that variable - you'll get something like that 123.455969706597869578956 So you have to convert its number into string and parse it. Or choose precision and your code will be like that [code=cpp] int prec = … | |
Re: When you click "Save as..." the dialog box appears. Dialog Box for choosing the file to save. For first you have to remove code, that calls the window appearing. Then you must have variable(pointer) of current file. After that you can type function, which will save changes into current file. … | |
Re: You can use functions with the variable number of parameters. Example of that function is a [B]printf()[/B] function. It define how much parameters he have by calculating '%' symbols in the first parameter. Examples: [URL="http://msdn.microsoft.com/en-us/library/aa712989(VS.71).aspx"]MSDN[/URL] [url]http://www.codersource.net/c++_variable_argument_functions.html[/url] [URL="http://technopark02.blogspot.com/2005/04/cc-functions-with-variable-numbers-of.html"]Just information[/URL] |
The End.