- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
I'm dealing with an Optiplex GX280 that was randomly freezing and then randomly shutting down. After a little bit it stopped turning on altogether and the only things that would happen were that I would get a yellow light and I could here the CPU fan speeding up to it's … | |
Re: MySQL returns dates and times in a different format than PHP, which uses timestamps. Use the MySQL function UNIX_TIMESTAMP to convert it in your query. [CODE]$q = mysql_query("SELECT UNIX_TIMESTAMP(lastAccess) FROM access");[/CODE] | |
Re: Give more details as to the problem. Are you getting an error message, and if so, what is it? If not, is it not displaying correctly? | |
Re: No. CSS is only for styling, what you're thinking of perhaps is a server-side programming language, like PHP or ASP.NET. | |
| Re: Not sure if this is your original code or not but if it is the fact that construct is misspelled in both classes would cause a problem |
Re: The query for attaining the participants returns a result, not just the id, a couple of fixes that would help: [CODE] $participants = mysql_query("SELECT userId FROM event_participants WHERE eventId = '$event_id'"); while ($id = mysql_fetch_row($participants)){ $query = "SELECT * FROM userinfo WHERE id = '".$id[0]."'"; $result = mysql_query($query); while ($row … | |
Re: in email.php put this (before any html if you insert any later): [CODE]header("Location: $HTTP_REFERER");[/CODE] Alternatively you can use this HTML for more control over the redirect: [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Your Page Title</title> <meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD> <BODY> Optional page text here. </BODY> </HTML>[/CODE] The … | |
Re: This should do it: [CODE] public void commandAction(Command c, Displayable d) { String label = c.getLabel(); if (label.equals("Exit")) { destroyApp(true); } else if(c==stop) { timer.cancel(); canvas.removeCommand(stop); canvas.addCommand(start); } else if(c==start) { timer.start(task, 0, 1500); canvas.removeCommand(start); canvas.addCommand(stop); }[/CODE] | |
Re: Not really an answer but if you use [CODE]if(choice.charAt(0)=='1')[/CODE] it works, no idea why the regular comparison won't work though | |
Re: where did you put the [code]header(Location)[/code]? It needs to be before any HTML | |
Re: Dont know if this is your original code but there's no closing curly brace at the end of the for loop | |
Re: Maybe create another thread that you terminate after 10 seconds? | |
Re: Is it on a server that is correctly configured to serve PHP files? | |
Re: [URL="http://supportforums.blackberry.com/t5/Java-Development/String-Manipulation-split-replace-replaceAll/ta-p/620038"]This page[/URL] from rim gives examples of string utility functions for j2me, the first on the page (split) should do the trick | |
Re: Did you create data.in with notepad? If you did you have to set save as type to All Files, otherwise it automatically applies an extension of .txt to your file. Alternatively you could just change to [CODE]inData.open("data.in.txt")[/CODE] and no, file types can have whatever extension you want them to have … | |
Re: There are multiple problems: You need a forward declaration of factorial since it is called before it is declared (add the line 'int factorial(int input);' after the 'using...' line) You have to write factorial as a function call with input as the argument (as opposed to a variable): cout << … | |
I was wondering if there was any way to make an ApplicationMenuItem inside the message edit screen that, when selected sends the message to the selected contacts itself, bypassing the default sending program. I am fine with the menu item and have seen how to do similar things by retrieving … | |
Re: open() needs a c-style string, use indata.open(s1.c_str()); | |
Re: You need a semicolon after the definition for the constructor for OTPay (OTPay::OTPay()) and need to declare it within the class but since it doesn't do anything might as well just get rid of it. You try to set m_name (which is declared as a double) to "Dan" (a char … | |
Re: This should do it: [CODE] bool toggle = 1; for(int i=0;i<n;i++) { for(int y=0;y<n;y++) { if(toggle) cout << c; else cout << d; toggle = !toggle; } cout << endl; } [/CODE] | |
Re: Here is the closest solution I can think of (although it's really just string processing as opposed to overloading): [CODE] void operator[](char i[]) { int size = strlen(i); int s=0; for(int y=0;y<size;y++) { char num[] = {i[y], '\0'}; if(!strcmp(num, ",")) { s++; } else { //puts numbers into an array … | |
Re: p+=4 causes p, which was originally a pointer to the first element of the array ("ab") to point 4 spots further (past the end of the array) so when it is indexed with -1 it points to the element before directly itself which would be the last element in the … | |
I am making an application for blackberries and wanted to make use of touch capabilities on touch capable phones. Is there a way to do this without making two separate projects (like I would in c with preprocessors that check the compiler)? An idea of what I'm trying to do … | |
Every time I try to install directx i get this error: "Error creating process <C:\DOCUME~1\RABBIB~1\LOCALS~1\Temp\IXP000.TMP\dxwsetup.exe>. Reason: INNT\system32\advpack.dll" Google yielded this thread: [URL="http://forums.techguy.org/all-other-software/767024-solved-erroe-creating-process.html"]http://forums.techguy.org/all-other-software/767024-solved-erroe-creating-process.html[/URL] which was solved by restoring a previous registry and blamed the problem on a registry cleaner, I have used a registry cleaner but I don't believe it changed … | |
Re: This means that class x is inheriting class y using the public method meaning that it can contains the same public members as class x. | |
Re: Your problem is that data is an ofstream which can only be written to and not read from. If you tried to read from it to test if it was open it wouldn't have worked but if you use the member function is_open() to test whether it is open it … | |
Re: \u201c is the unicode code for smart quotes which is why it slants. They come out like that because of how the file was originally written and won't change no matter how you read it. You can replace them with regular quotes using replace. | |
Re: Hey, I wouldn't mind helping either, but just for something to do as I won't be able to commit too much time. I've got experience with PHP, Python, and C++, and, like swinefish, don't mind too much about the money. | |
Re: You should use [code=javascript] document.bakeryImage.src=image [/code] | |
Re: This should do it. You must set x to the line that the info is on [code=python] file = open('myfile.txt', 'r') x = 2 while x: line = file.readline() x -= 1 words = line.split() index = words.index('=') num = words[index+1] fin_num = int(num) print fin_num file.close() [/code] |