199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for chudapati09

I have to write a program where the user would input multiple numbers. This is what it could look like. [CODE] 3 29 98 78 88 100 9 70 73 81 [/CODE] The input is never the same, and I just need to access each number one at a time. …

Member Avatar for chudapati09
0
156
Member Avatar for glenak

So far, from what I've learned from the c++ book I'm reading, the [B]int main()[/B] function in a c++ class is kind of like the [B]public static void main(String args[])[/B] method in java. (I'm a java person and I'm new to c++). However, I found out that within my source …

Member Avatar for gerard4143
0
144
Member Avatar for yonderyellow

Hello, i have to interface an energymeter (RS485) to the RS232 port on the PC and develope a program in Visual Basic to manipulate the data received from the meter (according to IEC1107 protocol). I must be able to read the data recieved real time and also save the data …

Member Avatar for craigcl
0
131
Member Avatar for ddalgibbang

Hello Please excuse my lack of knowledge to python, but I just cannot understand how time complexity works. I've read many threads on this forum regarding time complexity but I am still quite confused. Our prof has given us this example: [CODE]def foo(n): ! while (n > 0): ! ! …

Member Avatar for Gribouillis
0
115
Member Avatar for ceyesuma

I keep getting this error. The app is looking for a class and in fact so am I where should this class be? I can't find it in the: [b]db-derby-10.6.2.1-bin[/b] and check sup of the dl said it was unaltered? Thanks [code] java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) …

Member Avatar for ceyesuma
0
2K
Member Avatar for ricardo.crudo

Is necessary deallocate memory of pointer-to-pointer? Example: [CODE] my_type_t **example; example = (my_type_t **) calloc(10, sizeof(my_type_t *)); for (i = 0; i < 10; i++) { example[i] = (my_type_t *) malloc(sizeof(my_type_t)); } // ... free(example); // it enough? // Or is necessary do this... for (i = 0; i < …

Member Avatar for gerard4143
0
90
Member Avatar for hanvyj

I have a load of methods that throw exceptions sometimes, if they throw them I want to catch them, call a functino and then try them again a few times, here is what I am currently doing: [CODE]bool loop = true; int i = 0; while (loop) { try { …

Member Avatar for nick.crane
0
236
Member Avatar for tpkemme

I have a pretty simple coding function that returns all possible substrings of a string including the string itself def main(): str = raw_input ("Enter first string: ") size = len(str) for sub_len in range (1, size + 1): for idx in range (0, size - sub_len + 1): sub_str …

Member Avatar for TrustyTony
0
137
Member Avatar for claw72

Hello everyone. i really need help on this one.. sorry for bad english! I have made 2 listbox.. listbox1 and listbox2. data on listbox 2 comes every after i double click listbox1 data. my codes for that works properly. i am working in a excel worksheet. i have these columns …

Member Avatar for AndreRet
0
179
Member Avatar for Jsplinter

The following code generates an error when the [code]//vector<int> myVofInt2(n);[/code] line is uncommented. I get: error C2059: syntax error :'constant'. Does anyone know why it treats the declaration/initializations differently when the vector is inside a class? The vector<int> in the main function creates a vector<int> with ten elements, which is …

Member Avatar for Jsplinter
0
175
Member Avatar for ganeshredcobra

am using debian lenny and tried to create a shutdwon script using python import os os.system("sudo shutdown -h now") i cant use this in debian lenny then how will i implement

Member Avatar for Gribouillis
0
2K
Member Avatar for tomlocke

Hi I am having problem connecting to my sql2000 database. The database is on a MS Server 2008. I had no problem connecting to my other server Server2003. I selected '.Net Framework Data Provider for SQL Server', entered my server name, and selected 'Use SQL Server Authentication'. But when I …

Member Avatar for tomlocke
0
112
Member Avatar for amecily

Hey everyone, I am developing a Windows application in Visual Studio 2005, V2.0 using VB.NET. I am coding part of an Emergency Response Information System. On my form, I have two combo boxes (cboBaseStationID and cboPriority). I am trying to populate the datagrid with records from my database based on …

Member Avatar for lolafuertes
0
171
Member Avatar for johnlop1

How do I write an event listener that displays an image when I click the upload button? so far i have [CODE] jButton1 = new javax.swing.JButton(); jButton1.setText("Upload"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });[/CODE] and then [CODE]//the LOAD button for loading the file private void jButton1ActionPerformed(java.awt.event.ActionEvent …

Member Avatar for Ezzaral
0
114
Member Avatar for plasticfood

[CODE] String[] names = new String[namesListSet.size()]; int[] nums = new int[namestimesSet.size()]; namesListSet.toArray(names); [B]namestimesSet.toArray(nums);[/B] for (String s : names) { System.out.print(s); } [/CODE] i'm getting an error on the bold part. getting symbol not found.

Member Avatar for plasticfood
0
82
Member Avatar for techie1991

Can someone please direct me to the code for the class <int> in python. I know that it must have written in C, but I could not understand, where to ask this query. Though I tried to figure it out myself, but could not even understand, which folder to attack …

Member Avatar for techie1991
0
156
Member Avatar for DoEds

[CODE]String[] myArray = {"Player 30","Player2 35"};[/CODE] This statement [CODE]Arrays.sort(scoreArray);[/CODE] will sort myArray by Letters. Output: [CODE]aPlayer 30 bPlayer 35[/CODE] Problem: Is there a way to sort myArray by numbers from highest to lowest? The output should be: [CODE]bPlayer 35 aPlayer 30[/CODE] I even tried foolish things like. [CODE]String[] myArray = …

Member Avatar for JamesCherrill
0
128
Member Avatar for nukabolhi

How can I get the values in Check box while loop in php. Pls give me some tips to get the values from the below php code. [CODE] $sql=mysql_query("select * from tree"); while ($result = mysql_fetch_array($sql)) { echo "<br>"; echo "<label> <input type=checkbox name=Test value=checkbox id=Test_0 > $result[fruit] | $$result[fruit_charges] …

Member Avatar for phpology
0
2K
Member Avatar for sirlink99

The [COLOR="Red"]red[/COLOR] is where the problem is: Thanks for the help. [code] // The "ChoseYourStory" class. import java.awt.*; import hsa.Console; public class ChoseYourStory { static Console c; // The output console public static void main (String[] args) { c = new Console (); int move; String start = ("yes"); int …

Member Avatar for JamesCherrill
0
159
Member Avatar for essence388

According to Codd's Tweleve rules which are considered as a basics of the relational database system, which one of the following three systems: Oracle, DB2 and SQL server is most applied and relational than the others? Please give me your opinion and why.

Member Avatar for rolandsmokit
0
121
Member Avatar for dougancil

I have two text boxes starttimeInput and endtimeInput that have regularexpression validators to only accept input of time variables (11:00 am, 12:15 pm, etc) and then a durationLabel where I want to calculate between the start time and end time and present it to the user as minutes. Here is …

Member Avatar for dougancil
0
88
Member Avatar for fobos

Hello all, well i have a problem, but it sorta works. Here is my code. [CODE=JAVASCRIPT] var toggleState = 0 function toggleMe() { if(toggleState == 0) { alert("Checked"); toggleState = 1; } else { alert("Unchecked"); toggleState = 0; } } [/CODE] HTML [CODE=HTML] <input type="checkbox" onclick="toggleMe()" />Toggle me <input type="checkbox" …

Member Avatar for fobos
0
96
Member Avatar for gedas

can somebody tell me what this code actually does? [CODE] int i = 0; while (i < -1) { double x = xCoordinates[i]; double y = yCoordinates[i]; long xx = getWidth() - Math.round((double) getWidth() * x / 1024.0); long yy = getHeight()- Math.round((double) getHeight() * y / 768.0); g2.translate(xx, yy); …

Member Avatar for gedas
0
92
Member Avatar for hanvyj

Ok, I have a huge program and I ran it today and found that its using 100% of the CPU and bogging down the system to such a degree moving the mouse is an effort - let alone opening a window. I've been trying all day to narrow down the …

Member Avatar for Ketsuekiame
0
306
Member Avatar for vavazoom

[CODE] #include <iostream> #include <fstream> using namespace std; int main (int argc, char* argv[]) { int length; char * buffer; string searchWord = argv[2]; string compareStr; int searchSize = searchWord.size(); ifstream readFile; readFile.open (argv[1], ios::in ); ofstream writeFile; writeFile.open("newData.txt", ios::out); readFile.seekg (0, ios::end); length = readFile.tellg(); readFile.seekg (0, ios::beg); buffer …

Member Avatar for vavazoom
0
171
Member Avatar for andydeans

hi, this is probably a simple solution but nothing is coming up in searches except date and time pickers. i basically have a datetime column in mysql database. i have an input field for my date part and i want to create a second input field in my form to …

Member Avatar for andydeans
0
75
Member Avatar for churva_churva

Can someone teach me or guide me using GUI..or can some one help how to understand right away the GUI..and please give the link which can help me to learn more about GUI..

Member Avatar for Ezzaral
0
145
Member Avatar for mayuri_desh

need to write the below javascript function in php..please help [CODE]myStartDate = new Date('April 1, '+curYear+' 1:59:59');[/CODE]

Member Avatar for P0lT10n
0
86
Member Avatar for TheSecOrg

Is there a way to make a variable be able to be used in another .php file? E.G In PHP1.php $age="9"; $someOtherThing="1"; In PHP2.php echo $age+$someOtherThing; I have a statement to make, I hate being a n00b.

Member Avatar for TheSecOrg
0
755
Member Avatar for shanker86

Hi all here is my pair.h file which when I run using g++ on linux I am getting error like "pair.h:39: error: expected constructor, destructor, or type conversion before ‘ostream’" any help would be greatly appreciated! Thanks WRAP template <class T1, class T2> class pair2 { private: T1 first_; T2 …

Member Avatar for shanker86
0
431
Member Avatar for rcogq7

//This is the error that i have Exception in thread "main" java.lang.NullPointerException //at CardTest.main(CardTest.java:16) /** * @(#)CardTest.java * * * @Robert Coughlin * @version 1.00 2010/10/15 */ //this is the main public class CardTest { public static void main(String [] args) { Card [] randomCard=new Card[20]; for(int i= 0; i<20; …

Member Avatar for kramerd
0
234
Member Avatar for sadhawan

Hi Guys, I want to read html file and parse it and then assign the extracted info to the dataobjects. How can i do this .Thanks

Member Avatar for hyperion
0
145
Member Avatar for xinyonz
Member Avatar for whitetigerclaws

I have the same assignment someone else ask help with. The assignment calls for a test score calculator that calculates and displays the score total, score count, and average score. If the user clicks the Display scores button, the application sorts the scores and displays them in a message box. …

Member Avatar for sean_king
0
345
Member Avatar for miss_indie

aww. i'm so sorry for posting again. i have so many questions. i'm so sorry. ahm. i was just wondering if my code is possible if ever i'm going to insert a remarks to my database. here is my code: [CODE]$totalg=($totala+$totalb+$totalc+$totald+$totale+$totalf)/6; if(totalg <= 5.00 && totalg >= 4.51){ $remark=Excellent;} else(totalg …

Member Avatar for miss_indie
0
104
Member Avatar for davidjennings

Hi all, I am having a problem with this code, When the submit button is pressed all the php code is echoed to the screen. Thanks David [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Search</title> <link href="style.css" rel="stylesheet" type="text/css" /> …

Member Avatar for davidjennings
0
177
Member Avatar for dantheman50_98

Hi There, - I've got a list similar to the following: <ul> <li><a href="item1.php">item1</a></li> <li><a href="item2.php">item2</a> <ul> <li><a href="item2-5.php">item2-5</a></li> </ul</li> <li><a href="item3.php">item3</a></li> </li> - Item 2 needs to have a class added to the li using jquery. I've tried the following but it isn't working: <script> jQuery(function(){ $(this).parent('li').addClass('current'); }); </script> …

Member Avatar for dantheman50_98
0
165
Member Avatar for vimal hemant

Hello, i'm trying to insert multiplle values into a table.. but it is being stored o in the table.. i've been trying while loop but still no progress.. the system search for user related to its specefic staff concern and then assign a course.. <form id="assign" name="assign" method="post" action="assign_training.php"> <tr><td …

Member Avatar for hielo
0
104
Member Avatar for DoEds

I have this txt file containing names and scores. "[COLOR="red"]ex. Player1 35[/COLOR]". My program able to read it and store it to an Array of String. Here's my question. Is possible to separate the name and the score and store them in different Arrays? [CODE]ex. myArray = {"Player1 35","Player2 30"};[/CODE] …

Member Avatar for DoEds
0
108
Member Avatar for Prorgamme

I have this simple script: [PHP]<?php // MySQL Connection mysql_connect($sql['host'],$sql['user'],$sql['pass']) or die("Unable to connect to SQL server"); mysql_select_db($sql['data']) or die("Unable to find DB"); // Getting rows $select = "SELECT * FROM table WHERE uid = '". $_POST['uid'] ."'"; $data = mysql_db_query($sql['data'], $select) or die("Select Failed!"); // Query results $row = …

Member Avatar for Hourglass
0
287
Member Avatar for Roadphantom13

Hello everyone. This is my first post so if something doesn't work, bear with me. I'm a beginner at python and tried to write a program that will calculate Average Word Length. I wrote what I thought should work but the final answer keeps coming out to an average of …

Member Avatar for forsakenedzero
0
5K
Member Avatar for andydeans

hi, i am struggling and it will prob be a simple answer but cannot figure it out at all today. checked online but no use. my to create my view i need to compare a column to a yes or no. at the moment i have tried this but no …

Member Avatar for andydeans
0
85
Member Avatar for VIeditorlover

Hi, I have an app generating xml output using xmlwriter. It is loooooong xml, hundreds of thousand of items, is not possible to keep it all in memory, and always few errors occurs. Is there a way how to cancel part of already writen xml within try-catch section and move …

Member Avatar for VIeditorlover
0
142
Member Avatar for shuka79

Hi guys, I have developed a menu structure that has several sub-menus which are hidden until you click on the menu item. Once this happens I have got a onclick event which will display the sub menu below, changes the font colour of the menu item you have just click …

Member Avatar for AleMonteiro
0
186
Member Avatar for gchurch

hey all i have an array stored in a variable - $SelectRoom which is put through a foreach to display each value of the array: [CODE] foreach($SelectRoom as $value) { echo $value; } [/CODE] no that works fine however i want to send this array through the url with other …

Member Avatar for gchurch
0
115
Member Avatar for ja0

Hi, I want to parse the time from a string in c#, something like, [CODE]TimeSpan a = new TimeSpan(); string pattern = @"^\d{1}:\d{1}@"; if ( dt.Rows[x][y].ToString() != "" && System.Text.RegularExpressions.Regex.IsMatch(dt.Rows[x][y].ToString(), pattern ) ) { if ( !TimeSpan.TryParse(dt.Rows[x][y].ToString(),out a ) ) { MessageBox.Show(b.ToString()); } }[/CODE] So, if I have a string …

Member Avatar for ja0
0
95
Member Avatar for DARK_BYTE

Hi I have a project in which I have to build an algorithm visualization tool. Up until now I have been going in a static direction thinking of having in built menus that allowed a user to create an animation of a sorting algorithms but now my tutor wants me …

Member Avatar for JamesCherrill
0
154
Member Avatar for jbrock31

I am exporting data to an excel file. This works, however, one of my columns doesn't format properly with currency. Through code, how can i make an entire column currency just like when i do it through Excel itself, by going to the format options. I have tried using the …

Member Avatar for jbrock31
0
119
Member Avatar for akvlko

Hi Friend, I have a Jquery Validation code in which I have written [CODE]element.focus();[/CODE] When I view that page into other browser I able to modify that previous Field if I was left next field blank or wrong input. but in chrome i wont able to do so..! Can you …

Member Avatar for akvlko
0
115
Member Avatar for spideyprasad

For Ex: There are 10 peoples who logged into the site. I need to track the name of the people who logged in at a admin side. Under what logic we can track the people. I prefer to do it on php. Please help me the logic of tracking.

Member Avatar for fusedreality
0
106

The End.