199,114 Archived Topics
Remove Filter ![]() | |
i need to trim a student id below is my php code <?php $stud_id ='MCC-2011-2012-0001' //what is the code to remove the MCC-2011-2012- so that i can retrieve the 0001 //or code to remove the first 14 characters echo $stud_id; ?> //thanks a lot...:) | |
I want to iterate through a list of objects, then erase all objects from the list which meet a certain criteria. Here is an example using int type as my object: [CODE] list<int> m_list; // Fill list with int values... // Find ints == 4 and erase them auto it … | |
Hi all! I have a little problem here, I would like the width function in cout applied to all the sucesive outputs. However, it is only applied to the next output only, I mean, with this code I get 0:00:10:20:30:4 1:01:11:21:31:4 2:02:12:22:32:4 3:03:13:23:33:4 4:04:14:24:34:4 5:05:15:25:35:4 6:06:16:26:36:4 7:07:17:27:37:4 8:08:18:28:38:4 9:09:19:29:39:4 and … | |
WHY WHEN I EXECUTE THE BELOW CODE I GETS AN EXCEPTION [B]java.sql.SQLException: No ResultSet was produced[/B].........BUT EVEN THOUGH INSERTION OPERATION WORKS FINE........CAN ANYONE TELL ME WHY THIS EXCEPTION COMES [CODE=java] Connection co; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); co = DriverManager.getConnection("jdbc:odbc:hh"); Statement st1; ResultSet result; st1 = co.createStatement(); result=st1.executeQuery("select count(*) from rooms"); result.next(); … | |
its my code pleas tell me y error occur in it. impex.h file [CODE]#ifndef IMPEX1_H #define IMPEX1_H enum shapetype {Point=1,Polyline=3,Polygon=5}; struct pointD { double x; double y; }; struct item { int id; list<pointD>coordinates; shapetype type; }; class impex { public: impex(); void savekml(list<item>); private: }; #endif .cpp file #include<iostream.h> … | |
Hello, i was wondering how you would create a file association in c++ with the registry, in lua it would be something like this... [CODE] function File.SetAssociation(Ext, Exe, Icon, Long) local cKey = Long; Registry.SetValue(HKEY_CLASSES_ROOT, Ext, "", Key); Registry.SetValue(HKEY_CLASSES_ROOT, Key, "", Long); Registry.SetValue(HKEY_CLASSES_ROOT, Key.."\\DefaultIcon","",Icon..",0"); Registry.SetValue(HKEY_CLASSES_ROOT, Key.."\\shell\\open\\command", "", "\""..Exe.."\" \"%1\""); end … | |
Good evening or morning everyone.. Is there any way to understand this: $array = ('element 1','element 2','element 3'); while($x=each($array)){ echo $x['key'].' Value:'.$x['value']; } I mean where did the 'key' and 'value' come from although they're not defined in the file at all?? | |
Hi, I'm becoming more paranoid of security issues (Not Insane anyway :)) and would like to ask you guys what do you do to prevent SQL injection apart from using parametrized query and data validation. Thanks | |
.the program should use singly linked list of records.It should print he original directory then make some insertion and deletions then print the final directory. it should follow the steps 1. input initial listings such as name, address, and phone number. 2. input update records such as 'I' for insert, … | |
this is code which opens new window link in same programe [CODE] Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow ' This will be triggered only when link tries to open in new window. ' That means active element in web document will always be a … | |
Hello How do you doin I wantto know what this difference between $HTTP_POST_VARS['somevariable'] and $_POST['somevariable'] I read the first one is safer than the second one because the second one prevents hackers from hacking through the computer.. what computer is that?? And how is it safer?? | |
How do i create photo upload form with php and retrieve information from database that is not on my server | |
I designed an invoice system that add rows automatically and computes the results, print it in another file that can be downloaded by other users.can i get help on how to multiply the price and quantity to get amount? this is my code: <SCRIPT LANGUAGE="JavaScript"> function showamt() { //var unitprice … | |
Hello, I'm trying to write a simple program to finde words betwen statments like <int></int>. I converted String stream to a charArray, to get indexes of chars in the string. [CODE] public void foo(){ bucket=str.toCharArray(); System.out.println(str.substring(548,563)); System.out.println(str.substring(644,656)); System.out.println(str.substring(844,857)); System.out.println(str.substring(942,954)); System.out.println(str.length()); for(int i=0;i<str.length();i++){ if(bucket[i+0]==':' && bucket[i+1]=='i' && bucket[i+2]=='n' && bucket[i+3]=='t' && … | |
Hello, I have set up a script to add paging to a search results page. Which on the first page works fine. The recordset calculates how many pages there should be depending on the number of results returned from my search and how many records I have set it to … | |
I always get this error: "Error updating joke: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1" There's something about this part of my code that causes that error and … | |
Hey, I'm a 4th year CS student. And I need a topic for my thesis. Anything related to software or any CAI or gaming would be great. :) Please help me! :S | |
Here is the image of the table of the Question [url]http://oi55.tinypic.com/2d0gkmh.jpg[/url] Here is the First question(in the image) [url]http://oi52.tinypic.com/2ztix5l.jpg[/url] Above one is question (c) help me to answer that this is the other question(below, as Text) d) Create a database view to display the above output of part (c). help … | |
I want to wait current page with a certain period of time and then redirect onto another. Example: wait for 15 seconds and then redirect [url]www.google.com[/url] | |
I'm using ubutnu 10.10 and using eclipse php editor.But i don't know how to run the PHP file in the browser.As for simple text editor we just go to browser and write the url as "localhost/file.php".Please help. | |
Hey there, seems like this part of DaniWeb is not as active as other parts, but in hope I get an answer, I'm asking. I have this xml file: [CODE] <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="site.xsl"?> <navigation> <link> <name>About</name> <content></content> <target>www.google.com</target> </link> <link> <name>Friends</name> <content></content> <target>www.google.com</target> </link> <link> <name>Archive</name> <content></content> … | |
I launch 2 programs within my application with PROGRAMNAME->Show. Let's call them Prog1 and Prog2. I have a dummy form that I use Application::Run to keep the software running. When 1 of the program closes, I call Application::Exit to shut down the application. This doesn't allow the other program to … | |
i want to select MAX Id where i have the list database s001.1 s001.2 s001.3 s001.4 s002.1 s002.2 s002.3 s002.4 upto so On my field type is char(7) MSQL SELECT MAX(sup_id) where data type is char(7) plz help me out to perform this query in SQL. | |
This have been a problem to me for long now and I want to settle it once and for all. PHP and MySQL DateTime and date fields have been headache to me. Suppose I have fields ------Name--------------BirthDate--------LastTimeYouAte-- ------VARCHAR(255)------DATE-------------DATETIME-------- Now, When I do insert, How do I format PHP Date and … | |
I'm having a problem with Cosmos in VC# 2008 Express. I'm trying to get input as int and not string or find a way to convert from string to int. The 'Convert.Towhatever(string)' gives an error at build process in Cosmos. Thanks for any help! :icon_wink: | |
i'm not getting any results for the query. I'm sure it has something to do with the apostrophe and back slashes [code] $search = "q test'yes"; $search = mysql_real_escape_string($search); mysql_query("SELECT * FROM block WHERE name LIKE '%$search%' ORDER BY `id` DESC",$this->connect); [/code] When i echo it out i get this … | |
I'm new to C++ and here's a simple assignment. I'm not sure how to pull this off... ANY help will be appreciated . Here's the code for the assignment... You have to implement a function called approachPi that takes no parameters, and has the return type double. This function returns … | |
Can someone please explain to me the difference between ++i and i++ when written as part of an expression (i.e. within loops and if statements) ? Thanks :) | |
Which of the following are valid function prototypes? x one(int a, int b); int thisone(char x); char another(int a, b); double yetanother; void thelastone(); void (function1) void; void function2(void) void function3(n, x, a, b); x void finction4(int n, float, char c); x void function5(int, a, int n); Which of the … | |
How do I handle a requirement to put a magnifying glass feature onto my Silverlight app? It is not as easy as one might think. The previous programmer did it and thought it looked cool. It works by manipulating the scaling operation. It is a lot like the zoom feature … | |
I am writing a prg which take a value from user and check weather its present in table or not.... [code] table.getValueAt(i,j).toString().toLowerCase() == searchfield.getText().toLowerCase(); [/code] Well if yes then make that cell red... What to write to make cell red? | |
I typically make a Types.h to define all of my types in and then include that in all of my project files. I haven't ever seen this anywhere though, so I assume it is "bad/wrong". The situation is often like this: Consider a class Gardener that needs to know type … | |
How to create Linear and Data Matrix barcodes in C# and how can i decode a linear ,Data matrix from image? | |
Hello, I have been tasked with writing a test application to convert between geographic coordinate systems. Now math is not my strong suit but I was assured I wouldn't actually have to do any of the calculations since the formulas are provided. The trouble is trying to get the lengthy … | |
Guys, Can you help please to compare or check the records from Mytable1 to MyTable2 if exist or found. and i have to count the records with not null. Any idea. you can modify my script. [CODE] elect a.ESN b.ESN FROM MyTable1 as a Left outer join Mytable2 as b … | |
Hello, I am currently working on a stored procedure that shows the time of day as an integer value: 456, which means 4:56. I was wondering if there is a way in SQL that I can convert this int in to a datetime value. So instead of the time appearing … | |
I have a large data base that looks like the following: Energy position 5.639792 1.36 4.844813 1.89 4.809105 2.33 3.954150 2.69 2.924234 3.42 1.532669 4.50 0.000000 5.63 The actual data contains thousands of rows. The first column of the data is the particle energy and second column is the particle … | |
hi, im creating a simple image editor/drawer and im having problems with flicker when the canvas is refreshd on draw. ive got [CODE]frmPMain->DoubleBuffered = true;[/CODE] on my form, but im still getting bad flicker when i run my draw shape code such as [CODE]void Pixie_Draw::DragSquare( int X, int Y, int … | |
I am needing help in understanding how to declare variables properly. I am needing to write as program that calculates the commission for a sales person. I keep getting a error listed below. I thought I declared the salestextbox, costtextbox as integers correctly to use them in the calculation. I … | |
Hello everyone I am encountering a problem while using pagination with GET[] Function. Code does work well in the index page where the website displays all the categories, however i am encountering the problem when i want to use pagination with a specific category. EX:- Cars This is the URL … | |
Hi, I used the code [code] <?php $con = mysql_connect("localhost","clickim_forum","thankyou1"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("clickim_forum", $con); $result = mysql_query("SELECT userid FROM user ORDER BY userid DESC LIMIT 0,1"); echo "<table border='0'>"; echo "<tr>"; while(row = mysql_fetch_array($result)) { echo "<td style='color:#FF0000 '>" . $row['userid'] . … | |
So, I have this wordpress driven site, and I have a plugin written that runs when a post is viewed. The content of the post is loaded into $content. I also have a database of keywords and links to other posts on my site. I want to search the $content … | |
Hello: I'm trying to select specific data from code 2 below, using the variable $clientID queried from code 1 (also below). The question is if code 1 iterates a series of rows containing variables $clientID (say about 10 unique $clientID's); how can I write code 2 to go through each … | |
I am trying to do several things. 1. Intialize - engage a user in a series of questions to assign values to the class variables, no args, no return value, called from constructor. 2. Display - displays all the class values, each in an sentence, no args, no return value. … | |
I am using JBoss as my app server. My application using almost 100 jars (libraraies).So How can I specify class path for all the libraries jar's because its not possible to define individually in JBoss_CLASSPATH .Can I define xml for the classpath but I don't know how JBoss detect or … | |
Hello, Ive been working on learning opencv by example and have learned lots but have some confusions/confusion in some parts, and would appreciate if you guys could help me out.. First off I have 5 matrices, and I want to combine them into one big matrix.. for this reason I … | |
hello, I have this question to ask from you... when passing a object to a method is it pass by reference or pass by value ? I'm talking about calling another class's method... | |
Hi all I need to to read parameter value from web.xml I tried following way but it displays only null value .. [code=xml]<init-parm> <parm-name>email</parm-name> <parm-value>syz@gmail.com</parm-value> </init-parm>[/code] [code=Java]//servlet code pw.println(getServletConfig().getInitParameter("email"));[/code] | |
Wondering if someone could guide me in the right direction. I think this code is right but can't figure out why my switch loop won't access my char array of grades and add it to an int array. [code] #include <stdio.h> int main (void) { char grade[32] = { 'A', … | |
I am trying to get the total of the checkboxes selected when the user clicks the "calculate total" button. It isn't working though. What am I doing wrong? [CODE]<html> <head> <script type="text/javascript"> function calculate(f) { var nums = f.num; var ntext = f.numtext; var nitem = f.numitem; var result = … |
The End.