64,152 Solved Topics
Remove Filter ![]() | |
Hey guys. So I basically read in a bunch of data from a file into a data structure. But while I was doing that I included the spaces (which I dont want). So now I want to compare each element to see if it does have a blank space, and … | |
Hi guys :) Well I got an "variable might not have been initialized" error when I tried to compile the following code: [CODE=java]import java.lang.*; public class NewFrame { public static void main(String[] args) { if (args.length != 3) { System.out.println("Usage: java NewFrame <frame-name> <frame-hight> <frame-width>"); System.exit(1); } int firstArg, secondArg; … | |
Hi, Does anyone know how to use a datagridview from form1 into another form2. | |
hi I'm new user of PYTHON and I want extract a little part into a string like this example 100|1999|pepito|False|[B]27-10655374-1[/B]|False|||05/09/1952|1|4||3||1|1|8|67||4|False|True|False|oerirabtaa||||Femenino|0|0|0|0|0|0|2| the part to extract (in the example, in black letter), have two parameters 1 is the part with exclusive format ##-########-# 2 ever is locate between 4º and 5º | … | |
hi there, I have one question here is my code taken from the internet which is about the static function but i dont exactly understand for what reason we use here static function and what does mean self and code which is below can anyone explain it to me [CODE]<?php … | |
In python I have a very large string of 0s and 1s. i.e '010100100101110101001...' etc. I want to convert this to BINARY without first converting it to decimal. Then I want to take the resulting binary number and convert it to it's decimal equivalent. Fastest way possible because it is … | |
I wonder why the following code work. In the debugger i see that every thing works fine but after the "root = createNode(item);" statement I can't see the new node assigned to root? [CODE]Node *insert( Node *root, int item ) { if(root==NULL) root = createNode(item); if(root->data>item) insert(root->left,item); else if(root->data<item) insert(root->right,item); … | |
Can anyone share a resource (download or a how-to) for parsing a CSV to an associative array based on the first row of the CSV acting as the column names? I found this resource [URL="http://blog.joshuamcginnis.com/2008/12/csv-to-associate-array/"]http://blog.joshuamcginnis.com/2008/12/csv-to-associate-array/[/URL] but can't make heads or tales about the second parameter sent to the function. In … ![]() | |
I am trying to learn how to pass pointers to vectors properly, and having a bit of trouble. I am using Dev-C++ IDE here is the GIRLFRIEND class [CODE]#ifndef GIRLFRIEND_H #define GIRLFRIEND_H #include "player.h" // inheriting class's header file /* * No description */ class GIRLFRIEND : public PLAYER { … | |
Hi, Does can anyone tell me how to change the startup form? | |
i wanna check a zip file in a directory.how can do it? directory="c:\myzipfiles" listfiles="a.zip,b.zip,c.txt,d.xls" #a.zip is badfile import os import zipfile mylist=os.listdir("c:\myzipfiles") for zfile in mylist if zipfile.ZipFile.test(zfile): print"you can extract ",zfile else: print "you cant extract ",zfile and how can i use zipfile.ZipFile.testzip() thanks for answers... | |
I have a site that is a single base page that loads content based on get variables. The problem is, is that whenever a form is submitted, the url is cleared of all variables and the form data is never handled. How do you keep the url from reverting back … | |
Hi, I am saving data to text filed i want to display first 50 characters from that text field. I tried it with left() function with my sql query and also tried it with substr() function in php code also.but i am getting a problem it shows first 50 characters … | |
What i want to do is that when i click buttonX4 i want the text to change from "Copy To Clipboard" to "Your Bio Has Been Copied" Then i want it to wait for 2 seconds then i want it to change back to "Copy To Clipboard". I did this … | |
I am supposed to create a c# based visual studio application called "TaxCalApp"The purpose of the application is to determine the tax that a person has to pay based on his taxable income. i have done my homework and head cracking.....i cant run the program right.what is wrong with my … | |
Keeping getting into errors in my code...this looks to be the wierdest so far... [CODE]class bug: public living{ protected: bool ate; int energy; public: virtual void moveToFood(point hunter, point food); bool eatIt(point hunter, point food){ int hx, hy, fx, fy; hx=hunter.getx(); hy=hunter.gety(); fx=food.getx(); fy=food.gety(); if((hy==fy)&&(hx==fx)) ate=true; else ate=false; return ate; … | |
Well . this is fairly a simple question. Lets say i have a registration form, some user has registered and i have the details in my database. Now i can use the same form for letting the user edit his profile. I can prefill the textboxes by giving the following … | |
I am making a simple unit converter, and wanted the user to specify the number of decimal places to be displayed for the results. The user selects which conversion they want to perform from another combo box, and I have a select case to decide the calculation needed. Eg. [code]Select … | |
i am trying to read the following information: [CODE]Carlingford,Epping,3 Epping,Marsfield,6.5 Marsfield,North Ryde,2.4 North Ryde,Epping,5 Carlingford,North Ryde, 3.5 Carlingford,Marsfield, 4.7 North Rocks,Epping,4.8 Carlingford,North Rocks,2.4 North Ryde,Ryde,2.1 [/CODE] so i will be able to store the information into a 2 strings and a float (obviously excluding the comma. eg: string station1 = … | |
hi everyone i had been working on a project using random files (.dat) and now i want to change it to use a database instead. the thing is my project is quite long and it would be a hassle to go and change code. i had used hash tables to … | |
Hi, I have a little issue that I need some light shed on please. I have 2 forms; StartUp and MainForm. When the application starts with the StartUp form the forms load section check to see if a file exists, if it does, it closes and opens the MainForm using … | |
My program is a very simple address book program. The program works but i don't know how to make it display the same names. Like for example, the name "Mark Lee", if there are more than one Mark Lee, i would like to display all of those Mark Lee w/ … | |
this is a program to change the case of all letters input by the user to small. im getting the right output with this coding. the problem is that its giving some staircase type structure as the output as well. HOW DO I GET RID OF THIS EXTRA STUFF? [code] … | |
how would you do that? Language similar to LISP I don't think you can use cons twice. really stuck. maybe (define a '('())) | |
I can write the recursion version correctly need help with writing a do loop in DrScheme. After the do loop the variable x is sent to car L intially and then is updated to first element of everything but first element in list. [CODE] (define (sumiteration L) (do ((x (car … | |
Okay so this one should seem easy enough but I can't get past 1 issue I am having. Pretty much what ever is in the the listBox is stored in an array, but also in a text file (for loading and saving). The only issue is that I can't seem … | |
I'm having this issue displaying the results I need. The issue is that I cannot condense my results and end up with extra. The code I currently have is below. [CODE] SELECT category.*, content.* FROM `category` LEFT JOIN `content` ON category.categoryid = content.parentid WHERE category.parentid = 1 ORDER BY category.title … | |
Is there a event detect change of Listview item count? Like it will be trigger whenever i add an item or delete an item form listview. I search on MSDN Listview Event member, but cant c any usefull. Any help would be please:) Thanks | |
hello frns.. :icon_smile: i am in need of a code that does the following very very urgently.. please please help me !!! [CODE]read strings from a text file "text1.txt" (which are stored 1 per line without spaces) and store these strings in a string array A[]. then read strings from … | |
hi i'm trying to write a program that compares and manipulates certain characters from a string. heres the bit i'm having trouble with. [CODE] char c; if(c <= a && c >= x)//obvious error //do something [/CODE] is there anyway i can get this to check if 'char c' lies … | |
Lets say I have a class. It holds other classes in it. ex [CODE]class Test: def__init__(self, name): self.name = name def getname(self): print(self.name) class Holder: def __init__(self, tests): self.tests = tests def getnames(self): for i in self.tests: print( i.getname())[/CODE] so lets say I pickle an instance of Holder with 3 … | |
how do I save a dictionary, (below), to a txt file thats is in a tabular format? i also need to be able to rload the txt file back into its dictionary form... catalog = { 1:["Bread", 1.50, 10 ], 2:["Cheese", 5.00, 5], 3:["Apples", 2.50,12] } eg. 1 Bread 1.50 … | |
Can someone please show me how to implement the pickle module in this pogram!? PLS? I've tried for hours but I think programs are immune to my trying! Thnx [CODE]'''maintain a catalog''' def main(): global catalog loadCatalog() while True: pick = showMenu() if pick == 0: break elif pick == … | |
I'm using an access database to save plain textboxes. I've made a connection with the database. Now i need to find the code to add the textboxes to my database. I've tried to add with the bindingnavigator but it won't work... please help... | |
Hi there, Is there anyone here using NB platform to develop applications? Anyone using former Matisse GUI builder in NB 6.8? I can't see it in my IDE! | |
I'm working on a small social script.. The content will be in Urdu language for which I encoded the files with UTF-8. I'm having problems with the login page. The problem is that I'm unable to execute setcookie() function. I'm getting the following error; Warning: Cannot modify header information - … | |
If I have a table sales: sales {sellerid, buyerid} I'm trying to determine the buyers favourite seller... So I need to return the most frequent sellerid. I've used this query to find out the total number of times the buyer has bought something from any seller: [CODE]$countseller = mysql_query("SELECT count(sellerid) … | |
Hello, I'm having problems passing an ArrayList from a method in one class into a method of another class and accessing it. Here's my code. [CODE]private static void createData() throws IOException{ ArrayList<movie> moviesList = new ArrayList<movie>(); moviesList.add(new movie(1, "Schindler's List", 18, 19.99)); moviesList.add(new movie(2, "Red Cliff Blu-Ray", 4, 43.50)); moviesList.add(new … | |
Hey everyone, I've been working on learning the Win32 API for C++ so that I can start programming windows programs. I haven't run into any issues until last night when I tried to include a menu in my basic window through resources. I'm using Visual C++ Express 2010 which doesn't … | |
Hi there, I have a problem with the search function I designed for my code. [CODE]using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication { public class Person { public string PerName, PerSal, PerPhone, PerPcode, perState, PerAddress, PerStrenum; public Person(string rec_name, string Srec_sal, string Srec_phone, string Srec_pcode, string rec_state, string rec_address, … | |
Name: George Ingram Using: vb6 OS: Windows 2000 I have created a Splash Screen for my program with a "Dont show this screen again" checkbox. I am using the checkbox value and the Savesetting/Getsetting parms to bypass the Splash Screen if checkbox is checked. It seems to be working correctly, … | |
Hi there, I've been trying to figure out why my update script wont commit changes to the database. I'm building a simple call tracking web app for our technicians. Currently the view, add, and delete functions of the app work fine. The trouble I'm running into is when I want … | |
Hello - I need to create a utility using C/C++ to parse information from a XML audit log file that is continuously being appended by a separate process I need to read the information in and process it, then when I reach the EOF I need to wait/monitor for more … | |
I have a main form that has IsMdiContainer = true. I have a second form (FamilyForm) that is to be the MDI child. Using the code below, when the line TempForm.MdiParent = Me is executed, the FamilyForm window size, font, and all controls are larger than shown in Visual Studio, … | |
Hi everyone, I'm a moderately experienced C++ programmer working on code which must do the following: (a) Import data from a lot of little CSV files (b) Load that data into various objects (c) Do stuff with that data The code I've written does (a), (b), and (c) pretty well, … | |
Hi all, I need to initialize an array iteratively. For example array my_arryay needs to initialized with 512 characters and next with 1024 characters and next with 2048 characters etc etc, which can only be iteratively. Something as in C: for( i = 0; i<100:i++) { my_array[i] = 'a'; } … | |
Hi all, I have got several python scripts and I need to run them in one shot. So I assume that in a .py file I can give statements ./file1.py ./file2.py ./file3.py etc to run multiple scripts. I am defining global variables in a config.py file and these will be … | |
Hi all, I have got several python scripts and I need to run them in one shot. So I assume that in a .py file I can give statements ./file1.py ./file2.py ./file3.py etc to run multiple scripts. I am defining global variables in a config.py file and these will be … | |
So, I am learning Python. To help my understanding, I was wondering how someone might make this code more efficient. Purpose: Take a 32-bit value (tempCode) and output each nibble. My way was to use a string, basically shifting out the binary value from bit 0 to bit 31 into … | |
Hi everyone! So I have a XML code [code] <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="pizza.xsl"?> <pizza_list> <food> <name>Margarita</name> <description>tomato sauce</description> <price>3.60 </price> <diameter>30 cm</diameter> </food> <food> <name>Green</name> <description>tomato, oregano</description> <price>5.40 </price> <diameter>30 cm</diameter> </food> <food> <name>Primaverra</name> <description>tomato, mozzarella, cucumber</description> <price>5.30 </price> <diameter>30 cm</diameter> </food> <food> <name>Sandokan</name> <description>tomato, crab meat</description> <price>6.40 … |
The End.