199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for come_again

Hello everyone. I feel quite silly posting this as I know my way around C++ decently and am writing an application in VB however I am getting quite frustrated with this problem. [CODE] Dim FileNo As Integer FileNo = FreeFile() Dim FILE_NAME As String = "C:\test.txt" FileOpen(FileNo, FILE_NAME, OpenMode.Input) FileClose(FileNo) …

Member Avatar for Pgmer
0
177
Member Avatar for dboltz03

Hi all, Recently I've run into a problem where a string I am reading from a file is being read in with a nonprinting character appended to the end. The character being appended is U+0020. I'm just unsure how to get rid of this. I know that I could just …

Member Avatar for vijayan121
0
2K
Member Avatar for Xaelian

I'm making a PHP script for controlling my mssql databases. But I ran into a couple of problems. The first problem is that I want to make a combobox out of all the databases in my microsoft SQL server. The following SQL syntax gives the results that I'm looking for, …

Member Avatar for Xaelian
0
89
Member Avatar for liphoso

Hw do i reverse the mod function. That is: 6 mod 2 is 0. Nw hvn my result 0, dnt knw wat 2 is cald in dis case bt i got it as wel. Hw do i get bak to 6. 6%2 = 0. Hw do i reverse dat. I …

Member Avatar for masijade
0
3K
Member Avatar for raghujosh

I am doing a preg_replace on a string and the replacement contains a count variable that needs to be placed inbetween the pattern. But I am having difficulty doing that as the count is taken as a pattern and not as a count variable. Here is my code. $count = …

Member Avatar for vibhaJ
0
123
Member Avatar for dineshsurve

<?php require_once('config.php'); $ID=$_SESSION['ID']; $UserID=$_SESSION['UserID']; $tbl_name = "tbl_users"; //To check Data Insersion $Curr_Password=$_POST['currentpassword']; //echo $Curr_Password; $new_Password=$_POST['npassword']; $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); mysql_select_db(DB_DATABASE, $link) or die( "Unable to select database"); $query="UPDATE $tbl_name SET Password = '".$new_Password."' WHERE Password='".$Curr_Password."' and id=$ID and Status=1"; echo $query; $result=mysql_query($query,$link); if(mysql_num_rows($result) ==1) //line no 38. { echo …

Member Avatar for vibhaJ
0
269
Member Avatar for vidit_X

I wrote a program which finds the next palindrome. First, it takes an input specifying the number of test cases. The code runs fine in Visual C++, but am not able to run it in GCC. I have never used GCC before so unaware with its functioning. But am expecting …

Member Avatar for pseudorandom21
0
242
Member Avatar for raghujosh

How can we establish an or condition in a regex pattern. I would like to match the following in a string ">" OR "/>". How can I do that using regex?

Member Avatar for vibhaJ
0
82
Member Avatar for thekashyap

Hi, I have a problem where I need to generate hash for ~10e9 (1 bio) keys. I tried creating a hash of my own but after all the research I realized that I can as well (or even should) use one of existing functions. I narrowed down on SHA-1, which …

Member Avatar for thekashyap
0
386
Member Avatar for [V]

I wrote this python script (part of a bigger program) to launch a php script and wait for the output. The PHP script takes almost 15 minutes to run, as it is spawning several perl & C programs of its own. When I launch the php script by itself, it …

Member Avatar for TrustyTony
0
199
Member Avatar for divin757

i was sure this should be easy but here i am. i have a text file with information of the tones required to play the mario theme. i was needing to read line by line and break out the numbers and put them in a array. the problem is i …

Member Avatar for Xcelled194
0
129
Member Avatar for elvis1

Guys any clue what heuristics are and what they could be used for in web parsing ( data mining). Appreciate

Member Avatar for abelLazm
0
126
Member Avatar for M1n1m@l1$t

I am really new to c++ just started today. This is my first real program (however useless it is) and i am stuck with one error. I am writing my code on code::blocks using mingGW on windows XP. My error is as following-invalid converion from 'const char*'to 'char'. my code …

Member Avatar for M1n1m@l1$t
0
3K
Member Avatar for idk

I am trying to run the following simple program which uses multithreading using pthreads. I compile it like: gcc -lpthread programName.c and it compiles fine. However, when I run it gives errors which I have pasted at the bottom of program. [code]#include<pthread.h> #include<stdio.h> void *thread_routine(void* arg) { printf("Inside newly created …

Member Avatar for idk
0
257
Member Avatar for khsheehan

So I always seem to encounter this error. I usually find some odd hackish fix for it but this time I'm having too much trouble. I'm basically trying to make a program which corrects words the user types in (similar to that of any modern phone). The function I'm posting …

Member Avatar for arkoenig
0
157
Member Avatar for whocares21

Hello I want to implement a pr. queue with structs. My struct is: [CODE] struct Call { int CallNum; long CallTime; int CallLength; };[/CODE] This is a call center simulation application (of course if i can). According to algorithm, the agents should choose the call whose CallLength is shorter. I …

Member Avatar for rubberman
0
87
Member Avatar for newbie14

Dear All, I have a dynamic select input. I am stuck on how to validate them? Any idea please? Thank you.

Member Avatar for newbie14
0
86
Member Avatar for dante5458
Member Avatar for omar mazen
0
256
Member Avatar for BlackKite

Hi! I can't seem to figure out what I'm doing wrong with this no matter how many things I try. I've looked through Google for a related issue but found nothing specific. Hopefully someone can help me. The script runs through a external .js file calling a list of music …

Member Avatar for BlackKite
0
206
Member Avatar for lexusdominus

Ok so ive written a console program which is great, and now i want to create a thread that makes a window (winAPI) and can commuunicate with the console window. Well to describe it properly, i would like the window thread to send predetermined text (by clicking buttons) to the …

Member Avatar for octopusgrabbus
0
93
Member Avatar for chrisvj11

I am using Python and wxPython to attempt to make a 2d game. When w is pressed, the tiles (except the character) should move so it looks like you are moving. The problem is, when the key is pressed, nothing moves. I added a line of code(no longer there) to …

Member Avatar for chrisvj11
0
782
Member Avatar for jacksantho

Hi, I uploaded the excel and the data is successfully inserted to the database, by submitting the "submit button" using php script. There is an final stage for me to do is the validation of the excel before inserting the data to the database. I don't get any idea on …

Member Avatar for chrishea
0
1K
Member Avatar for IWDesigns

hi, im looking for a simple script that will let users draw basic images online. i just need something with a pencil/paintbrush and colours, does anyone know of anything in php or javascript that is available? or could anyone point me in the right direction so i could learn how …

Member Avatar for diafol
0
127
Member Avatar for Dannis86

I'm trying to learn to program with PHP, and i got XAMPP. I watched a tutorial on youtube. It should say, ''Please enter a username and a password''. But instead it just shows a blank page. My index= [ICODE]<html> <form action='login.php' method='post'> Username: <input type='text' name=úsername'><br> Password: <input type='password'name='password'><br> <input …

Member Avatar for Dannis86
0
2K
Member Avatar for hisan

Hello All, Ii want to know how can i check whether the response from the server is inJSON format or XML format . Please let me know how to do this,

Member Avatar for sneekula
0
350
Member Avatar for andylbh

For example I have 4 sets of Coordinates [CODE] (1,1) (1,3) (3,3) (3,1)[/CODE] It's the out line of a Square Shape Is there a way I can find the list of sets of Coordinates on it's parameter? The expected out put should be: [CODE] (1,2) (2,1) (2,3) (3,2)[/CODE] and is …

Member Avatar for StuXYZ
0
162
Member Avatar for realnsleo

Hi everyone! I am looking for a jquery plugin that moves a whole page horizontally, diagonally or vertically like the one here: bulamu.net any help is highly appreciated!

Member Avatar for TySkby
0
165
Member Avatar for WolfShield

I am going through the Tk/Tkinter tutorial and when I try to run the menubar program I get two windows instead of a menubar on one window. Here is the code: [CODE=Python] from tkinter import * from tkinter import ttk root = Tk() root.option_add('*tearOff', FALSE) win = Toplevel(root) menubar = …

Member Avatar for HiHe
0
183
Member Avatar for predator78

Need some help here it seems to compile fine but crashes at runtime. Am I missing something here? [CODE] #include <iostream> #include <string> using namespace std; // player class class Player{ int *position; public: Player(); Player(int); ~Player(); void print_pos(){ cout << "player 1 is in position: " << *position << …

Member Avatar for predator78
0
92
Member Avatar for makmuhefe

Hello, Im trying to write a program which is computing surface area of a 3D geometry by using Newell Methods. Geometry data should be reading from a text file. The lines which has 3 columns point out coordinates of geometry's vertices. The lines which has 2 columns point out connectivities …

Member Avatar for makmuhefe
0
240
Member Avatar for LanguidLegend

The following is an exercise for my class: [INDENT][COLOR="Green"]Redirect mouse device into a file. sudo cat /dev/input/mice > rawmouse.data Move the mouse a bit and then type CONTROL-C. Note that on some distro's you'll need to sudo to bypass device files' restricted permissions. Now, cat that file to the sound …

Member Avatar for LanguidLegend
0
239
Member Avatar for kmilof

hi! i want to make a program, that moves an object in vertical line 'till the program ends,but when it reaches the upper border, automatically appear in the lower border. i have this [CODE]from utalcanvas import * import time show() window_size(500,500) window_style( "Mi Ventana", "black") window_coordinates(0,0,1000,1000) circulo = create_filled_circle(500,20,50,"green") for …

Member Avatar for predator78
0
227
Member Avatar for Jsplinter

Is there a better way to access the base class operator overload? I'm using casting, and it works just fine, just wondering if there is a better way. Is this bad/ugly code? [CODE]class StrategyKey { public: StrategyKey(){} ~StrategyKey(){} StrategyKey(const char* strA): str_strategy(strA) {} friend bool operator< (const StrategyKey& stratKeyA, const …

Member Avatar for mrnutty
0
176
Member Avatar for buymypies

So the scenario is on my page I have a form along with a countdown timer. If the countdown timer reaches 0:00 I have a statement which activates and is supposed to submit the form as it stands. here is that statement: [CODE] if (Todays_Date >= Target_Date) { clearTimeout(timeoutID); $('#testForm').submit(); …

Member Avatar for TySkby
0
142
Member Avatar for virusisfound

I have table abc In taht I want to add colunm at run time. I have done some code but there is an error [CODE]SqlConnection cn = new SqlConnection() ; cn.ConnectionString = ""; cn.Open(); SqlCommand cmd = new SqlCommand("alter table abc add" + textBox1.Text.ToString() + "varchar(500)",cn); cmd.ExecuteNonQuery(); SqlCommand cm = …

Member Avatar for virusisfound
0
205
Member Avatar for llamaboy

Hi all, I have few php pages. One is a dynamic form, one is an file holding some arrays, one is a script that is the action for the form and the other two are to update the array. What I am trying to do is append an array using …

Member Avatar for llamaboy
0
196
Member Avatar for mertucci
Member Avatar for AnkitKumar

i want to call there A's class constructor using "super" keyword how it is possible help me plz.....[code]class A {} class B extends A {} class C extends B { i want to call here A's class constructor using "super" keyword how it is possible help me plz..... } class …

Member Avatar for stultuske
0
350
Member Avatar for Billy D

[CODE]string currentUser() { string user; ofstream outf("CurrentUser.dat", ios::trunc); system("whoami >> CurrentUser.dat"); outf.close(); ifstream inf("CurrentUser.dat"); inf >> user; return user; }[/CODE] This is a function that gets the name of the current active user. It creates a data file, with the contents being the username. The problem is, to create a …

Member Avatar for TrustyTony
0
184
Member Avatar for kubiak

`private static final Font FNT_GIVEN = new Font("SanSerif", Font.BOLD, 20);` I want to put the color for this font for example red, can someone help me??? I am working in awt.

Member Avatar for kubiak
0
95
Member Avatar for CrazyPixel

Hey guys, Here's my problem: I developed some code that converts binary to characters and characters to binary. At first all went well (by first I mean on the good ol' console), but when i tried implementing a GUI, some weird stuff came up. When I try converting characters (strings …

Member Avatar for NormR1
0
161
Member Avatar for Abelville

I need help with this program, I am new and i am loosing the battle. Write a program that contains a class that implements the days of the week. The program should be able to perform the following on an object of the class: 1. Set the day. 2. Print …

Member Avatar for enthuiastic
0
143
Member Avatar for runeveryday

Hi, I'm trying to use Zeroclipboard [url]http://code.google.com/p/zeroclipboard/[/url] to copy stuff to the clipboard and add a tooltip when the mouse hover on the flash. but it doesn't seem to be working. my html code: [CODE] <div id="code1'" class="cptext" rel="'.$url.'">copy text</div> <div id="cd1" class="test" style="display: none; border: 1px solid #ccc; padding: 8px;">testtest</div>'; …

Member Avatar for twiss
0
143
Member Avatar for ivan3510

Hi! I have a php code that reads xml file. In xml file I have the german letter ö (this xml file is saved as UTF). This is mistake. I don't get ö. I get some strange carachters (like ö). Can somebody help me? Thanks a lot!

Member Avatar for twiss
0
135
Member Avatar for ayoba01

i have problem about if else code in my program. i also have made many changing in this code but still i didn't get the result that i want. my program is about vending machine. here is the code: [CODE] Private Sub btnpepsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar for Mitja Bonca
0
137
Member Avatar for zack_falcon

I've written a sales and inventory program in C# that makes use of SQL Server, because I've heard it functions well over LAN connections (haven't tried it yet). I've... let's say... hardwired the my connection string into the program. I have a notepad connection.ini file that has the connection string, …

Member Avatar for Mitja Bonca
0
217
Member Avatar for NoUserNameHere

linked lists? I recently started learning about it and it is really confusing. What tutorial would you recommend?

Member Avatar for Narue
0
112
Member Avatar for methuselah90

hi everyone i am trying to get validate captcha on my form but i would like validation to take place on the form without a change of state. currently the page refreshes to display the error message and the page loses all form values and i can understand that this …

Member Avatar for twiss
0
276
Member Avatar for Krazykado

Hello, I am having a problem putting this Array's output in a single GUI window. When I receive the output it just shows the grades in individual GUI windows (IE Erik 98 [OK], Fred 76 [OK], etc). If I put the output outside the loop then it doesn't recognize grade[i]. …

Member Avatar for JamesCherrill
0
137
Member Avatar for OGxMusic

I need to make a project about the game of goose.. Can someone explain me how i get started, Dont know how i should move the goose in the game?

Member Avatar for OGxMusic
0
71

The End.