199,114 Archived Topics
Remove Filter ![]() | |
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) … | |
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 … | |
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, … | |
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 … | |
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 = … | |
<?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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
Guys any clue what heuristics are and what they could be used for in web parsing ( data mining). Appreciate | |
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 … | |
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 … | |
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 … | |
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 … | |
Dear All, I have a dynamic select input. I am stuck on how to validate them? Any idea please? Thank you. | |
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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, | |
![]() | 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 … |
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! | |
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 = … | |
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 << … | |
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 … | |
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 … | |
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 … | |
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 … | |
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(); … | |
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 = … | |
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 … | |
What is the diffrence between Key and Superkey how can we understand ? help me please | |
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 … | |
[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 … | |
![]() | `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. ![]() |
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 … | |
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 … | |
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>'; … | |
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! | |
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) … | |
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, … | |
linked lists? I recently started learning about it and it is really confusing. What tutorial would you recommend? | |
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 … | |
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]. … | |
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? |
The End.