Hello, I need to write a stored procedure in MySQL that loops through all rows in a table (the column types are TEXT and VARCHAR) and replaces certain characters in the column values with another character. For example, a certain column contains the text "ababa" and I want to change it to "acaca". I can't quite figure out the part about replacing a character in a string with another and could use some help with this! Thank you! Sylv
Sylv33
Posts
-
String manipulation in stored procedures (MySQL 5.1) -
Strange behaviour with numeric_limits<double>::quiet_NaN ()Thanks to the both of you for the explanation! I ending up changing all the relevant code to use isnan(f) instead of direct comparisons and everything works fine now but I was still wondering why a direct comparison with a NaN always returned 0 on my compiler. Now I understand! :-D
-
Strange behaviour with numeric_limits<double>::quiet_NaN ()Hello, Ok, here's the (very simplified) code that's been causing me headaches :
double f = numeric_limits<double>::quiet_NaN ();
int n = (f == numeric_limits<double>::quiet_NaN ());Can someone *please* explain why n is always 0 here?? After the second line is executed, the debugger shows:
std::numeric_limits<double>::quiet_NaN returned 1.#QNAN00000000000 double
f 1.#QNAN00000000000 doubleIn case this is some kind of processor issue, I'll should also mention that I'm using VC++ 2005 on an AMD Turion 64 running Windows XP. Thx ! Sly
-
Displaying a "wait" page while a CGI script executes?Hello, I have a CGI script (written in C) which performs some fairly lengthy operations and I would like to display a page saying something like "Please wait while we process your request..." while the script executes. If possible I would also like to display temporary results as the script runs (but this isn't that important). Does anyone know how to do this using CGI? Thanks, Sylvain
-
MDI child windows in the task barHello, Can anyone please tell me how to add my MDI child windows to the task bar so that when a user has multiple documents open they all appear in the task bar like in Word or Excel. I've tried setting the WS_EX_APPWINDOW style of my CMDIChildWnd derived classes but this doesn't seem to work. Thanks! Sylv
-
Annoying build problem with VC++ 2005Yes I'm using PCH files. This problem only happens when I have a solution containing multiple projects. Everything builds fine when I only use a single project.
-
Annoying build problem with VC++ 2005Hello, I have a solution containing 4 different projects and whenever I try to build one of the projects VC++ rebuilds the entire solution (every single file for each project !) even if nothing has been modified since the last build. This is very annoying as certain projects are quite big and are a bit long to build. I checked for circular dependencies but this is not the case. Has anyone else had this problem?? Thanks, Sylv33
-
Problem with CHttpFile and HTMLHello, For one of my company's projects I'm using CHttpConnection and CHttpFile to download HTML files from different web sites. I then extract some data as well as certain links from these files. The problem is that sometimes the HTML files contain character codes for certain characters instead of the actual character (%3F instead of ? for example), which is problematic when extracting the data. What's strange is that sometimes the *same* HTML file will contain character codes, and sometimes it will contain the actual character, which is even more problematic. I would like the downloaded HTML files to be in a normal "readable" format. Do I have to parse the files and convert the characters myself? Maybe I'm just missing something unfortunately I'm don't know much about the details of HTTP. Here are my relevant HTTP headers in case this is the source of the problem: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Accept-Language: fr Hope someone can help!! Sylv33