199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for tcl76

hi, i have a script that converts hex to bin and bin to hex back. however, when converting back to hex the leading 0s are truncated. how to maintain the leading 0s? i'm using Python 2.5 and Win XP. tq [CODE] import binascii import string def byte_to_binary(n): return ''.join(str((n & …

Member Avatar for TrustyTony
0
3K
Member Avatar for KazenoZ

Hello, I've been trying to deal with this problem for a while now, I'm currently working on a game engine I could use to help myself later on, the thing is made in .NET C++, and is similiar in design plan to RPG Maker, and GameMaker and the such in …

Member Avatar for vdeych
0
177
Member Avatar for Phil++

Hey, Does anyone know what a plain text substitution might be? For example, If I had to find the plain text substitution of "Hello World" would I count the characters? I'm really confused, anyone have any ideas? Thanks :)

Member Avatar for Adak
0
179
Member Avatar for wewehalim

Hi, i have this datagridview containing column: {product, price, quantity, Total price}, and a 'calculate' button. I need to enter the quantity column and when I press 'calculate' button, it will calculate total price by price*quantity what i am struggling now is how to grab the 'text' in "quantity" column, …

Member Avatar for hansys
0
265
Member Avatar for pearll

I have a combo box "verb" that displays a field of database .. when the user selects "other" from the drop down ...a div named "choicetext" appears and user enters his choice of verb .... The below code is of the action page ..in which i want to insert the …

Member Avatar for Shanti C
0
81
Member Avatar for Arjun_Sarankulu

I have develop an utility for my company in which there is two file format If i browse file which is eg->ACE.T004 It gives following error [B]Error:Index and Length must refer to the location within the string Parameter name : Length[/B] Following is my code [code] using System; using System.Collections.Generic; …

Member Avatar for Momerath
0
106
Member Avatar for AnooooPower
Member Avatar for devinodaniel

I'm trying to get my page to redirect back to another page after the form has been submitted to its self via $_SERVER[PHP_SELF] . I've tried using the header(Location) script but to no avail. Anyone know of an easy way to do this? Right now.. when my page is submitted …

Member Avatar for devinodaniel
0
1K
Member Avatar for drumboy354

Hello, I'm not new to C++ but I usually program in Linux. I'm currently programming in Microsoft Visual Studio 2010. I just installed the Magick++ x64 binary library. I've read the "detailed" installation instructions on what to do next but honestly I am completely lost. In the .pdf it says: …

Member Avatar for tamoghnaroy
0
146
Member Avatar for reemhatim

I'm writing a program that inputs the amount of money and outputs it preceded by dollar sign and divided by commas into groups of three digits I'll enter the money as string and call function called mstold()and returns an equivalent number as long double so my problem is how can …

Member Avatar for Ancient Dragon
0
389
Member Avatar for FTProtocol

Hey, im just wondering how to say the source of a webpage that is in your WebBrowser Control. I've tried loads of methods but i am failing horribly (google isnt my friend today). Just wondering if someone could share some insight :).

Member Avatar for saad749
0
567
Member Avatar for Whilliam

Hello. Im very new to assembly. Like, 2 weeks new. Im an IT student and I want to practice assembly in my very own laptop. I want to download assembly resources but Im not sure what. I know this exists in the assembly resources thread but Im really clueless. It …

Member Avatar for Goalatio
0
272
Member Avatar for debasishgang7

hey all, i'm trying to get all content of a webpage using python and trying to put them all into a file. Here is my code: [CODE]import urllib data = urllib.urlopen('http://www.site.net/index.html').read() #print data //if i ignore the rest part of this code the code is just working awesome...its printing the …

Member Avatar for richieking
0
141
Member Avatar for MrCapuchino

Hello, this is an odd problem, I have a method that goes through a list (in a foreach cycle) and writes every string found in the list to a text file, each string in a new line (then a blank line) then the next string. The list contains 106 strings, …

Member Avatar for MrCapuchino
0
1K
Member Avatar for Clandestinexxx

i have to make a screen output final with variable which will set the height of atree.a the while loop has to be used.im kinda stuck to figuring this all out. the tree has to look like this * *** ***** ******* ********* *** so far all i have is …

Member Avatar for ztini
0
192
Member Avatar for rcossy1023

Ok So im trying to understand flags.... when i set $eax = 0x80000000 and set $ecx = 0x90000000 I want to compare and jump for flags so cmp EAX, ECX j(o,s,z,c) I do not understand how comparing these two numbers get a carry flag but not an overflow flag. I …

Member Avatar for -Powerslave-
0
180
Member Avatar for nats01282

i need a piece of code to break down the data brought in from the MYSQL database im creating a small forum type on my website but with my layout if the user writes 5 lines it shows it all on 1 line and shows the bottom scroll bar, i …

Member Avatar for nats01282
0
99
Member Avatar for mjavaid

I ran across this site while trying to Google search for help. I noticed this site showed up a lot of times and answered the questions I had, so I decided to join. I'm writing a program from class but I'm having some trouble. I would like to loop this …

Member Avatar for mjavaid
0
121
Member Avatar for sandersfm

// Does anydody can help me with this program and make it work. // this is the main //Now just need to write average functions. [CODE]#include<iostream> using namespace std; // function prototypes. void getScore(); void calcAvg(); void findLowest(); int main () { int Score; //ret is for return :) another …

Member Avatar for sandersfm
0
155
Member Avatar for dannii

I'm very new to Java 4 1/2 weeks into my intro to java, I have to write a program that asks user for an integer, the program will then add up all integers from 1 to N and display output message the sum of integers from 1 through (integer input …

Member Avatar for dannii
0
186
Member Avatar for jotae

private void tbNuevo_Click(object sender, EventArgs e) { ... connections up in the Load.... botones("NUEVO"); limpiar(); txtNombre.Focus(); oCC = new OleDbCommandBuilder(dtc); DataSet dst= new DataSet(); dtc.Fill(dst, "contador"); iPosact = dst.Tables["contador"].Rows.Count - 1; DataRow dtr = new DataRow(); [B]dtr = dst.Rows.[iPosact]; //error in this line vUltimo = dtr["regnum"]; // error in this …

Member Avatar for Momerath
0
117
Member Avatar for lianpiau

I'm got write a simple calculation. which only use % and / .but when i key in different number. the result is different.Who can help me. [CODE]private void button1_Click(object sender, EventArgs e) { decimal x = txtPer.Value; decimal y = txtQty.Value; decimal j= y / x; decimal k = y …

Member Avatar for lianpiau
0
244
Member Avatar for insanely_sane

Here's an easy one for you experts :P What is casting and parsing? How exactly are they different? After explaining, could anyone possibly tell me how to cast/parse the various types from and to each other? (the types being: int, double, char and String) Also, in which situations would I …

Member Avatar for Mattox
0
252
Member Avatar for shawtyred74

I am not quite understanding how this how ereg and Preg_match thing works. I am trying to prevent users from creating a username that is less than 3 characters, with no capital letters, and no special characters and cannot be a reserved user id such as root, admin, and operator …

Member Avatar for shawtyred74
0
97
Member Avatar for cousinoer5

I thought this program was as good as done, turns out, it's more broken than I thought! Right now I'm in a panic, since it's due tomorrow, and I have a few big problems with it. Problem 1: I need to either open an existing file, or a new one …

Member Avatar for cousinoer5
0
218
Member Avatar for Fritz_Katz

I'd like to load an audio clip and play it multiple times in response to a button press events. Application is a piano simulator, with 88 sampled .wav files bundled in a resource. Using JMF, I can easily load the audio file and play it once, it doesn't play the …

Member Avatar for Fritz_Katz
0
2K
Member Avatar for louwee

[code]Option Explicit Dim connectionado As ADODB.Connection Dim recordsetado As ADODB.Recordset Dim num As Integer Private Sub cmdCanceL_Click() frmSTUDENT.Enabled = True frmSTUDENT.Show Unload Me End Sub Private Sub openDbaseConnection() connectionado.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\student\My Documents\dbStudentInfo.mdb;Persist Security Info=False" connectionado.Open recordsetado.ActiveConnection = connectionado recordsetado.CursorLocation = adUseClient recordsetado.CursorType = adOpenStatic recordsetado.LockType = adLockOptimistic …

Member Avatar for Jx_Man
0
146
Member Avatar for zerey02

.Is there any way that i can get texts from a php form to supply it on another php form. and place it on the title attribute of my <a> tag. for example: <a href="" title=" //this is where i want to place the retrieved texts from my other php …

Member Avatar for zerey02
0
152
Member Avatar for Si_Long

I'm a newbie to Java, so I'm sorry if this is a silly question. I'll post the code first, then explain my problem. [CODE]import java.util.Scanner; class CharacterOperations{ public void run(){ System.out.println("1. toUpper"); System.out.println("2. toLower"); System.out.println("3. Alphabet"); System.out.println("4. Quit"); int input; Scanner sc = new Scanner(System.in); input = sc.nextInt(); while (input …

Member Avatar for Mattox
0
165
Member Avatar for thecoolman5

hey, this code I wrote wont work. The 2nd and 3rd buttons wont show up in the program. [CODE] #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int WINAPI …

Member Avatar for thecoolman5
0
2K
Member Avatar for @Kui

Hi, I'v just started learning VB. i need help with a program that allows the user to enter a month and a number of years. (e.g March and 10 years) The program then displays all the months of the year from the entered month in a loop that runs as …

Member Avatar for codeorder
0
144
Member Avatar for Goalatio

I wrote an operating system in 16bit asm (NASM), and thought it was easy. Then I came up with the crazy idea that I could learn 32bit asm.. And quickly became disgusted. All of the 32bit tutorials out there TELL you to use C or a similar language; I want …

Member Avatar for Goalatio
0
129
Member Avatar for VasquezPL

I know how to replace part string... [code]if (linia->Contains("system_token")) {poprawka = linia->Replace( "system_token", systems );}[/code] but what should I do, If i need to replace ENTERs (linebreaks)... For example: User type in textbox [code] Hey, I am Michael [/code] The result (taken as variable) should be: [code]Hey,</br>I am</br>Michael[/code] Thx!

Member Avatar for VasquezPL
0
96
Member Avatar for rookanga

My assignment is to get the Get Monthly Income (Num1) Get Monthly Home Rent/Mortgage (Num2) Get Other Monthly Payments (alimony, child support, student loans) (Num3) Display Allowable Monthly Car Payment Display Maximum Car Value (interest rate based on credit) (answer) [CODE]Public Class Form1 Dim Num1 As Integer Dim Num2 As …

Member Avatar for codeorder
0
182
Member Avatar for Transcendent

I'm suppose to use Command-Line Arguments to take user input and than use an enhanced for loop to sum. [COLOR="Red"]This is the error: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Type mismatch: cannot convert from double to int[/COLOR] [CODE] public class EnhanceForLoop { public static void main(String[] args) { …

Member Avatar for Transcendent
0
815
Member Avatar for jrivera

I've looked at all of the lightboxes and I'm not sure if I'm not looking hard enough or if I'm looking in the wrong place. I'm looking for a plugin that I can use that will allow me to do the following. Have 1 row of images (about 5 images …

Member Avatar for jrivera
0
186
Member Avatar for gekkoswave

Hi I was looking help with a null pointer error I get everytime I use my newgame button or start the newgame method. What the game should do is guess 1-1000 then change the screen when the user's guess is too low , too high, and correct. Once the user …

Member Avatar for Mattox
0
147
Member Avatar for Bladtman242

I am following a series of programming challenges for beginners, this challenge requires interactive commandline input which is a pain in java. Therefore I've made a small class in another file to handle the user input. When I try to compile the main class ('external' class compiles without problems) I …

Member Avatar for Bladtman242
0
222
Member Avatar for ayarton

[CODE] Imports System.IO Public Class frmRODSelectPage Private Sub btnSelectImages_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectImages.Click '--------------DECLARE VARIABLES------------------------------------------------------------------------ Dim FileName As String Dim Export As String 'filename only Dim DidWork As Integer Dim InitialDirectory As String = "E:\Hasbro\CaptureImageFolder\" Dim HotFolder As String = "E:\Hasbro\CaptureHotFolder\" '--------------END VARIABLES----------------------------------------------------------------------------- '--------------EXCEPTION HANDLING------------------------------------------------------------------------ …

Member Avatar for codeorder
0
105
Member Avatar for CanadianGSX

I've looked around and from what I can tell, the code seems right. Basically crating a JS array and passing PHP values to it to use in an onChange to fill a text field. The dropdown gets populated fine but the text field does not autopopulate onChange. I'm not too …

Member Avatar for CanadianGSX
0
247
Member Avatar for aaronmk2

I want to read in multiple lines from a file, but I am only able to get my program to read the first line. The program prints out two other lines but the values are zero. [CODE] double cost[3]; int lowerRange[3]; int higherRange[3]; bool active[3]; ifstream inClientFile("ad.txt", ios::in); for (int …

Member Avatar for jonsca
0
157
Member Avatar for axn

How do I read and print just n(10) lines in a file and not whole file. [CODE]#include<stdio.h> #include<string.h> int main() { char line[50]; FILE *datafile; datafile = fopen("/data3", "r"); while(fgets(line,sizeof line,datafile)!=NULL) printf(" %s\n", line); fclose(datafile); return 0; }[/CODE]

Member Avatar for Narue
0
163
Member Avatar for AnooooPower

I have a groupbox with quite a few checkboxes. I want a specific textbox to have custom string per checkbox in the text box. Exemple chckBox1 chckBox2 chckBox3 chckBox4 chckBox5 chckBox6 I checked 1, 3 and 6 So my textbox will contain as text ckbox1, chkbox3, chkbox6 if i uncheck …

Member Avatar for codeorder
0
3K
Member Avatar for spoonlicker
Member Avatar for beejay321

[CODE]int userChoice(){ int choice; cin>> choice; while (choice!=1 && choice!=2){ cout<<"that is not a valid choice please choose again "; cin>>choice;} return choice; }[/CODE] the whole point of this is that if a user doesnt enter 1 or 2 then it tells them to enter 1 or 2 and wont …

Member Avatar for Crutoy
0
249
Member Avatar for kennyrgz

Hello DaniWeb, i`m a new member here, so greeting to you. As the topic title says i`m in bit of a problem, so a little help would be appreciated, I am as newbie as it get`s when talking about JAVA, so here it is. I`m trying to figuere out a …

Member Avatar for kennyrgz
0
120
Member Avatar for Alice1990

Hi, its an assignment i need to do. The while loop working on well when i input an integer but when a letter is being input, the while loop run for infinity. I had seen through the other thread but still cannot understand how to do. Please help... [CODE]while(choice!=1&&choice!=2&&choice!=3&&choice!=4) {cout<<"The …

Member Avatar for jonsca
0
318
Member Avatar for plang007

I can not seem to figure out how to drop the lowest score. When I run it it says the lowest score dropped was 0. How do I fix this? [CODE]#include<iostream> #include <string> #include <cmath> using namespace std ; string getName (); int averageScores( int); void printMessage (string, int); void …

Member Avatar for plang007
0
633
Member Avatar for smandape

Here is the XML code i am trying to work on... [CODE]<GBSeq_definition>RecName: Full=Solute carrier family 2, facilitated glucose transporter member 1; AltName: Full=Glucose transporter type 1, erythrocyte/brain; Short=GLUT-1; AltName: Full=HepG2 glucose transporter</GBSeq_definition>[/CODE] I want to extract the elements such that I get the output as [CODE]<aliases> Glucose transporter type 1, …

Member Avatar for smandape
0
338
Member Avatar for vssp

Hai Friends While running my application i got this error. How to solve thsi error. Plesae send me any idea. PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mixpublic_html/includes/common.php:244) in /home/mix/public_html/MiX/program/include/main.inc on line 673 Thanks Vssp

Member Avatar for pangeli
0
185

The End.