64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for atoklas

I am trying to read in names and telephone numbers from a text file using fscanf. The format of the data is: 9073234 Colwer, Mrs J. 3823823 Le Boeuf, Mr S. To do this I am using the following line: fscanf(fpp,"%d %s %[^\n]s",&a,surnames[i],firstnames[i]); This works except for "Le Boeuf" where …

Member Avatar for milkz
0
220
Member Avatar for mbarandao

Hello: I'm using this script as an auto resize function for an iframe, but can't get it to work [U]in safari. [/U] [CODE] <script type="text/javascript"> <!-- function calcheight() { var the_iframe = document.getElementById('paymentHistory'); var the_document = (the_iframe.contentWindow ¦¦ the_iframe.contentDocument); if(the_document.document) the_document = the_document.document; var the_height= the_document.body.scrollHeight;} //--> </script> [/CODE] to …

Member Avatar for mbarandao
0
208
Member Avatar for g_riding

I am learning C++ and having a problem with adding numbers in a [10][10] array. It reads the data from a file. I have the array set up and I have to add the numbers diagonally left and right. I have to add prj6[0][0] then prj6[1][1] then[2][2] and so forth. …

Member Avatar for g_riding
0
452
Member Avatar for xuexue

could you help me guys to translate this code from PHP MySQL to PHP ODBC. i'm having a hard time to run this page using the PHP ODBC which uses MSSQL connection. any help would be very much appreciated.. thanks in advance ^^ [CODE] <?php $return_arr = array(); $sql = …

0
91
Member Avatar for Gdyson

This looks pretty simple on the face of it but I can't get my head around it. I have two tables that I'm querying: dbo.tblrespondents RespondentID FirstName Surname dbo.tblrespondentschildren RespondentsChildID RespondentID ChildFirstName ChildSurname ChildDOB ChildSex I am trying to find which Respondents who have only sons - one must be …

Member Avatar for darkagn
0
151
Member Avatar for louiscos77

Hi guys, I'm planning to make a car game & for that I'll use Microsoft Visual C++ 2010 for programming, directX 10 for the graphics, & Nvidia PhysX engine for the physics. The problem is that I can't find any tutorial of directX and Nvidia PhysX, I only find of …

Member Avatar for louiscos77
0
559
Member Avatar for rowen17

after compiling it this errors came out, what do u think is the possible solution for this? thanks! Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 9 at accountinfo.<init>(Main.java:73) at accountinfo.main(Main.java:142) [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; class accountinfo implements ActionListener { private JFrame f3; private JButton jLogout; private JPanel …

Member Avatar for rowen17
0
180
Member Avatar for theashman88

I have to create a program that requires the user to enter the zip code. The zip code must be 5 digits. I know how to do that using if statement and string.length(). What I don't know how to do is how to make sure the program only inputs and …

Member Avatar for dnambembe
0
109
Member Avatar for tanco

I'd like to control menus on a apps created by myself. Apps A.exe: Windows Form apps (C#) It has menus Menu1-MenuItem1(MenuItem of Menu1) MenuItem1 calls a EventHandler that shows a message box Apps B.exe: Windows Form apps (C#) It has a button If I click the button, I'd like to …

Member Avatar for tanco
0
101
Member Avatar for tanco

Hello, I'd like to set multiple InputScopes to one text box in a Windows Form with using C#. This application will be used in TabletPC. I found SetInputScopes API. But I'm not good at C#, so I don't have any idea how to program it in C#. Could anyone please …

Member Avatar for tanco
0
322
Member Avatar for joejoe92

Hi, I'm trying to create a piece of code which joins a line that matches a string, and the next succeeding line (no matter what this line contains). I'm getting confused at what Regular Expression (RE) to use. So far I have: [CODE] input1 = open("out.txt","r") output1 = open("outp.txt","w") with …

Member Avatar for joejoe92
0
136
Member Avatar for jsav

A program I'm trying to compile is simply not working right. I have everything defined the way it should with all the right #include statements there. However, anytime I try to compile with g++, it tells me the functions are undefined. Really, I should not be getting this error. I …

Member Avatar for jsav
0
283
Member Avatar for aoelord

I need to output the results from a .dat file then have it read in data and assign a new * for every 2% each record equals. It is meant to appear as this: 0 10 20 30 40 50 60 70 80 90 100 | | | | | …

Member Avatar for aoelord
0
150
Member Avatar for NU8

I am trying to create a queue class and then allow the user to input integers at the back of the queue and take them from the front. This is what I have so far, it runs but will not output the size of the queue correctly. Any help would …

Member Avatar for NU8
0
122
Member Avatar for jontes

Hello, I'm new here, so I hope I'll ask my question correctly. I have an assignment to create a "text-based cosmic adventure" and all went well until now. My project is separated into several header and implementation files. Problem arises only when I include certain file in another header file. …

Member Avatar for jontes
0
4K
Member Avatar for trippinz

When i drag and drop a file into my form it should give: textBox1.text = the file name (i dont have it, i need it can you help me get it) textBox2.text = file location (already know how to acquire it from a drag/drop) I want the actual file name, …

Member Avatar for trippinz
0
464
Member Avatar for frogboy77

Hey there. I'm trying to figure out how to subtract one array of integers from another. I have figured out how to add 2 together going digit by digit and carrying over. I have no idea how to go about subtracting one from another. Basically i want to do simple …

Member Avatar for frogboy77
0
208
Member Avatar for SgtMe

I have made a python program which will create an OpenGL and render a teapot (GLUT standard teapot) with a shader that I specify. The shader is specified as follows: [LIST] [*]I have a file called "index.ini" which contains the file paths to a vertex shader and pixel shader file …

Member Avatar for SgtMe
0
484
Member Avatar for genzoman

Hi, all. This is using jquery by the way. I have a list of ethnicities on a form for a person to enter that are checkboxes. One option is 'Other, specify'. When 'other specify' is checked, I would like a text box to pop up and disable the other boxes …

Member Avatar for genzoman
0
658
Member Avatar for stemiros

Hi, I need some help with OpenGL and rotation. I have a 3D door surrounded by a holder. The holder needs to move with the door and rotate when it's not on the floor. After that the door must be able to open without affecting the holder. It's based on …

Member Avatar for daviddoria
0
386
Member Avatar for kk12345

Hey, So I need help with fractal project, Pythagoras Tree, and below is the code i need to complete. And I really have no idea how to finish. [CODE]from PIL import Image from movieSolution import * import math class ETree(GO): #---------------------- Begin given functions ---------------------------- def __init__(self, color, initSize, order, …

Member Avatar for TrustyTony
0
375
Member Avatar for Archenemie

I have been tasked to learn basic JavaScript as part of my collage coarse, and i've taken this section if code from the W3C website and commented it out. Is my interpretation of what this script is doing correct? Im using this script as an example of how JavaScript can …

Member Avatar for Archenemie
0
119
Member Avatar for Peter_TARAS

Hi, I try to read line by line from a file some data. Each line in that file has the following format: x = 78.36734693877551, z = 11.428571428571429 -> amplitude: 8.62847057093655E-6 | phase -1.5707968246742405\n I am trying to extract those four float numbers using regular expression. I came with the …

Member Avatar for Gribouillis
0
180
Member Avatar for liran

( It is only in Python 3 ! ) ( The commands to operate this file are at Linux ! : I want to read a file, but it has to be through stdin ( In linux, with "< filename" ) ! And I want to write the same file …

Member Avatar for Gribouillis
0
2K
Member Avatar for Philosophy

I am working on the last part of an encryption/decryption program and have to compare the original input file to the final output file character by character to ensure that they are identical. I have tried a few different ways to do this to no avail. When I tried this …

Member Avatar for Philosophy
0
497
Member Avatar for KA2806

Hi i am trying to create a function that asks the user to enter height and width then colour to then display each pattern in the selected colours. i made a start but i cant make it work with the colour nor adding size dimensions. [CODE]# mini_project.py from graphics import* …

Member Avatar for woooee
0
80
Member Avatar for gillivt

I have a form (testform.html)as follows: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test</title> </head> <body> <form id="form1" method="post" action="datareturn.aspx" > <input type="text" id="FoxyData" name="FoxyData" /> <input id="Submit" type="submit" value="submit" name="submit" /> </form> </body> </html> [/CODE] When I enter data into the form field and …

Member Avatar for gillivt
0
265
Member Avatar for ceyesuma

Hello. I am not sure how this is supposed to work. I need to find a file that will be in a folder data/gm in my package. If I move the program around is there a way to have the program find its new absolute path [icode].getAbsolutePath()[/icode] from its path …

0
75
Member Avatar for ujjval dave

hi guys, i have confusion about comparing dates in php. i want to compare birth date with current date. here is my code. i hope u will me to solved out this problem. thanks [CODE] <?php //code for get values from session session_start(); if(isset($_SESSION['I'])){ //this code will get email id …

Member Avatar for ujjval dave
0
9K
Member Avatar for mbarandao

I'm wondering if it is possible to skip certain fields in the mysql table in a sql statement. Here is what I mean: I have a table that has the following columns: firstname lastname phone dob Suppose I write the following statement: $[CODE]mysql_query=("insert db_table (firstname, lastname, phone) VALUES ('$firstname' ,'$lastname', …

Member Avatar for mbarandao
0
190
Member Avatar for AMetnik

[B]Hej i am getting the error:[/B] [CODE]error C2440: 'initializing' : cannot convert from 'int *' to 'GarbagePointer<T>' 1> with 1> [ 1> T=int 1> ] 1> Constructor for class 'GarbagePointer<T>' is declared 'explicit' 1> with 1> [ 1> T=int 1> ][/CODE] -------------------------- But i really dont know how to either …

Member Avatar for daviddoria
0
2K
Member Avatar for ghosh22

Hi everybody..Here's an interesting problem to solve. I have a text file like this (also attached): [CODE]>first TTCCCAAAAAAGACCTACTAAGTCAAGCGGATGCGTTTTGTGTCTTATGG AAAGTCCCTGACGGATACGAGGCTTTGGGTGATTCGGTACGAATGATTCG GTTACCAGAACTTACCGAAGAAGAAATGGGACGAACCGAGGTTTCTCGTT CGTGTGCTAATCCTACATTCAAACATCGATTTCGATCAGAGTTTGTTTTT CATGAAGAACAGACATTCGTATTACGTGTTTACGATGAAGATTTGAGGTA >firsta TTCCCAAAAAAGACCTACTAAGTCAAGCGGATGCGTTTTGTGTCTTATGG AAAGTCCCTGACGGATACGAGGCTTTGG---------------------- -----------------AAGAAGAAATGGGACGAACCGAGGTTTCTCGTT CGTGTGCTAATCCTACATTCAAACATCGATTTCGATCAGAGTTT------ CATGAAGAACAGACATTCGTATTACGTGTTTACGATGAAGATTTGAGGTA[/CODE] Both >first and >firsta containing same characters except the part with hyphens. Now is it possible to write a perl script that …

Member Avatar for ghosh22
0
158
Member Avatar for Daita
Member Avatar for Shankye
0
110
Member Avatar for SurveyTool

I'm making a survey tool. Each respondent will be asked to answer questions on (for example) cakes. The number and types of cake will be different for each respondent. The format of the survey will be saved in a file called [I]survey.xml[/I]. So the survey may be like the following: …

Member Avatar for SurveyTool
0
153
Member Avatar for sToXiC

Hello all. I have a string, e.g. "Testing" and I try to convert it to byte but I get a NumberFormatException. I tried with (byte), Byte.Parsebyte. Any help? thanks

Member Avatar for sToXiC
0
162
Member Avatar for Oregand

Hi guys, This week Ive been given a problem to: Take a set list of English phrases and convert them to a set list of pirate phrases. i.e. Hello would be entered by the user and Ahoy would be printed etc. My idea is to create two arrays, One will …

Member Avatar for Oregand
0
140
Member Avatar for CanofCornInfini

Hello, I'm new to C and I'm not sure what is wrong with my code here. After I execute, I get this: Debug assertion failed! [program address] File: fgets.c Line: 60 Expression: str != NULL It's a really simple program. I'm trying to assign family data from the in file …

Member Avatar for Shankye
0
541
Member Avatar for Gaiety

below is the code for traversing a binary tree without using recursion but the problem with the code is we require array of pointers to store all the nodes address. in below program the parameter nodes in the function push is an array of pointers to store all the node …

Member Avatar for jl.lakhnai
0
179
Member Avatar for novice20

[B]hi all, can anyone tell me how to open a folder on a remote machine connected on same LAN. I need to open a folder in the form "\\remote_machine\folder1\folder2\folder3"[/B]

Member Avatar for novice20
0
3K
Member Avatar for adams161

hi, I have the line of code: [code=vb.net] xlWorkBook = xlApp.Workbooks.Open("c:\mydocs\full_info.xlsm") [/code] my problem is i want to load the file without a full path, "full_info.xlsm", but i can't seem to find the right place to put it. i have the program name directory which contains folder 'bin' 'myproject' 'obj' …

Member Avatar for kvprajapati
0
125
Member Avatar for xuexue

hello guys, i had a problem with the automatic email sending using php.. the error states: [CODE] Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\edith\email\index.php on line 36 [/CODE] *******index.php *******this is my code [CODE] $to = "juan@yahoo.com"; $subject = "Email testing"; $message …

0
89
Member Avatar for skorm909

I'm coding a game right now and everything works great that i want to have working right now, but there's a minor bug that i know of. this is that when the player enters their name, and the name has spaces, the code just closes. here's the part of code: …

Member Avatar for skorm909
0
207
Member Avatar for jrp370

ok so i really dont understand this whole recursive stuff and i need some help on a simple program. the problem is to write and test a recursive function max to find the largest number in a list. here is a non recursive function that ive made, [code] def Max(li): …

Member Avatar for Gribouillis
0
2K
Member Avatar for nickles

Hi, I'm getting the error Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in C:\wamp\www\******\include\Database.php on line 294 when I try to run this [CODE]function calcNumActiveUsers() { $query = "SELECT * FROM ".TBL_ACTIVE_USERS; $result = $this->query($query); //just uses mysql_query var_dump($result); $this->num_active_users = mysql_numrows($result); }[/CODE] As far as I …

Member Avatar for nickles
0
107
Member Avatar for optikali

Hello all! I am starting to write a little roulette game and while trying to print out my arrays to make sure they contain the correct values the compiler keeps screaming this at me: "non-static method .... cannot be referenced from a static context" Any pointers would be greatly appreciated! …

Member Avatar for optikali
0
90
Member Avatar for xuexue

could you give me a very simple example of autocomplete in php? this should have a connection to the database.. having the keydown() function and highlights the letters which are similar to the one being typed. best regards and thanks in advance..^^

Member Avatar for xuexue
0
143
Member Avatar for balrogf

i'm almost done with my video poker game. i need help finding the if the winning hand is a straight(a straight is five continous cards e.g. 3,4,5,6,7, ive made J,Q,K,A 11-14) HERE'S A CODE SNIPPET: [code] int[] arraydeck = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", …

Member Avatar for balrogf
0
159
Member Avatar for Kirielson

Here's my problem, I am getting a bad access on a shared memory line on my producer/consumer program: [CODE]Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xffffffff 0x00001db0 in main () at Project3.c:120 120 memset(buf, 0, BUFFER_SIZE); [/CODE] [CODE] int BUFFER_SIZE = 200; int *buf; [I]Some …

Member Avatar for Kirielson
0
161
Member Avatar for FreddieBambino

Hi. I was wondering, is there any way for php to automatically check if links are valid. For example, lets say I have 10 links and I want a cronjob to check if they are valid or not, and if they are invalid I would throw a query statement to …

Member Avatar for FreddieBambino
0
155
Member Avatar for vbprogrammer1

Hi, Can anyone tell me how to remove spaces in a line which contains more spaces in vb.net. Eg 12 25.53 35 It should be read as 12 25.53 35 Thanks VRP

Member Avatar for vbprogrammer1
0
139

The End.