132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for mar1obaz

I need to create different strings inside a while loop, the problem is how to name them and not having them overwritten each time for ex: [CODE] while (i<10) { String x=scan.nextLine(); //here is the problem, x gets overwritten each time i++} [/CODE] Thank you in advance.

Software Development java
Member Avatar for mar1obaz
0
107
Member Avatar for Deepak20

package sha; import java.security.MessageDigest; /** * * @author deepak */ public class Sha { public static void main(String[] args) throws Exception{ MessageDigest sha = MessageDigest.getInstance("SHA-1"); byte [] i1 = args[0].getBytes("UTF8"); sha.update(i1); byte[] hash = sha.digest(); System.out.println ("Result: Success"); // Display plain text and digest System.out.println ("Original plain text was : …

Software Development java
Member Avatar for Deepak20
0
208
Member Avatar for Wattsits

so. i downloaded a dll of the net and im trying parse data through it. this bit of code i pretty much ported from VB so i expect a reason its not working for me is the syntax is incorrect. iv tried to make it as c# as i know …

Software Development
Member Avatar for Wattsits
0
122
Member Avatar for darkbreaker

I wrote a function in C that receives a pointer to a character array as argument and switch all accented letters with their corresponding character, the code is as follows: [CODE]void removeacc(char *texto){ char a[]="\x83\x84\x85\x86\xa0\xc6",A[]="\x8e\x8f\xb5\xb6\xb7\xc7"; char e[]="\x88\x89\x8a\x82",E[]="\x90\xd2\xd3\xd4"; char i[]="\x8b\x8c\x8d\xa1",I[]="\xd6\xd7\xd8\xde"; char o[]="\x93\x94\x95\xa2\xe4",O[]="\x99\xe0\xe2\xe3\xe5"; char u[]="\x81\x96\x97\xa3",U[]="\x9a\xe9\xea\xeb"; char n[]="\xa4",N[]="\xa5"; char c[]="\x87",C[]="\x80"; char y[]="\x98\xec",Y[]="\xed"; int …

Software Development c
Member Avatar for darkbreaker
0
138
Member Avatar for liveurlifeteddy

Hello everyone, i got a question, but cant figure it out here's the question: Declare a structure to hold the time. It should have 2 members: one for hours and one for minutes (each as integers). Declare another structure for date. It should have 3 members: one for day, one …

Software Development c++ data-structure
Member Avatar for liveurlifeteddy
0
112
Member Avatar for hiddepolen

Hi Daniweb! I couldnt find my problem anywhere else on this forum, so I decided to make my own thread... My problem: I'm trying to make a function to decide how many decimals a 'double' has. My code (slightly edited, here's the base of it): [CODE] // int m = …

Software Development c++
Member Avatar for MattyRobot
0
185
Member Avatar for ayesha91

HEllo this is reaaally urgent, the deadline is within less than an hour and thirty minute, and I lost hope that I can fix the problem myself. I know it has to do with pointers and allocating memory dynamically. The assignment was to use operator overloading to add two sets …

Software Development c++ motherboards-cpu-ram
Member Avatar for dwks
0
169
Member Avatar for natha_peepli

[CODE]mport java.net.*; import java.io.*; class Ur { public static void main(String[] arg) throws Exception { URL u = new URL("http://www.whitehouse.gov/"); InputStream ins = u.openStream(); InputStreamReader isr = new InputStreamReader(ins); BufferedReader whiteHouse = new BufferedReader(isr); System.out.println(whiteHouse.readLine()); } }[/CODE] It shows the error.. when i changed the site to [url]www.google[/url] .com \Program …

Software Development http-protocol java
Member Avatar for natha_peepli
0
176
Member Avatar for blacknred

Hi I just started with python, and trying to implement some system admin tasks and running into some rough. Basically I need to do some task on whichever share exists on their corresponding server. eg Server A has shares 1,2 and 3 Server B has share 1 and so on. …

Software Development python
Member Avatar for blacknred
0
90
Member Avatar for claudiordgz

Hi guys, I am trying to load a Haptik.hpp to control a Novint Falcon. I receive error C2144 syntax error and C4430 in the next line [CODE] //---FUNCTION // Desc: C-based entrypoint to retrieve IHaptikLibrary interfaces //-------------------------------------------------------------------------------------------------------------> extern "C" HAPTIK_DLL_IMPORT_EXPORT PVOID GetHaptikLibraryInterface(IN UINT32 interfaceId = HAPTIK_IHAPTIKLIBRARY); [/CODE] So I pasted …

Software Development c++
Member Avatar for Ancient Dragon
0
553
Member Avatar for Thropian

ok well I'm working on making a dungeon explorer and I can't get images to work...so far I have this[CODE] from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() canvas = Canvas(frame, width = 225, height = 225) canvas.pack() gif1 = PhotoImage(file = 'Fhall.gif') canvas.create_image(0, 0, …

Software Development python tkinter
Member Avatar for Thropian
0
145
Member Avatar for Oregand

Hi guys, This week Ive been wrecking my head trying to write a code to run the following program: This program must test the dice 50 times. Then the results will be recorded and summarised. For each number (1 to 6), the program will print the most times that number …

Software Development java
Member Avatar for kramerd
0
122
Member Avatar for SaaDwTk

I need an code to goes to this page: [url]http://admin:adminms@192.168.0.118[/url] Wait 3 seconds Goes to: [url]http://192.168.0.1/cgi-bin/dial?rc=@&A=H0&rd=status[/url] Wait 3 seconds Goes to: [url]http://192.168.0.1/cgi-bin/dial?rc=@&A=D0&rd=status&ZT=1290636163550[/url] And stop

Software Development vb.net
Member Avatar for SaaDwTk
0
111
Member Avatar for LianaN

Hello! I have the problem with my program visualization at different computers (but the same OS). Below you may see some code pieces related to creating the user interface. Everything is ok with this code at my computer. But I cannot understand why it produces different layouts at some other …

Software Development java user-interface
Member Avatar for LianaN
0
165
Member Avatar for muze

hello guys...im getting this error. Looked for this but could not find some solution [CODE] error C3861: "xxxxx" identifier not found [/CODE] How can I fix this error? thnx

Software Development c++
Member Avatar for jonsca
0
187
Member Avatar for VulcanDesign

Hello all =) I am working on a Visual Basics (6) project that requires a hidden command prompt window, to which I need to pass commands. I need to: [list=1] [*]Open a hidden command prompt [*]CD to a directory [*]pass a command including several file names [*]Exit the hidden window …

Software Development vb.net
Member Avatar for VulcanDesign
0
1K
Member Avatar for kezkez

Currently trying to understand why this intersection method doesn't work properly, I think the problem is the if statement line but not sure if the problem solely lies there. I've included the necessary files to make my question clearer. The setIntersection method is part of the ArraySet class. The main …

Software Development java
Member Avatar for kezkez
0
182
Member Avatar for Xufyan

i want to make a calculator in which a user allowed to input two numbers in text fieldand on pressing the particular operation button the operation performed.but how could i restrict user to input only numbers and no strings ?? [CODE] import java.awt.*; import java.awt.event.*; import java.applet.*; public class calsc …

Software Development java
Member Avatar for ajst
0
1K
Member Avatar for precila

The C++ I/O system supplies an interface to the programmer that is independent of the actual device being accessed. This interface is known as stream. The I/O system contains a hierarchy of the stream classes used to define various streams to deal with the console and disk files. These classes …

Software Development c++ file-stream ios
Member Avatar for precila
0
204
Member Avatar for danholding

hi guys n girls im making a list of the biggest files on my computer i have got most of the coding done but i have hit a brick wall with the sort function. i can sort the size or the file name but as they are both in the …

Software Development python
Member Avatar for VulcanDesign
0
529
Member Avatar for Violet_82

Hi there, if I call a double function like [CODE]double MyPrice( ) { return cost; }[/CODE] (value "cost" assumed to be set to 7.00 why this function returns 7 and not 7.00? thank you

Software Development c++
Member Avatar for Violet_82
0
185
Member Avatar for Xufyan

what does it mean , use printf in JNI from C ??? i searched alot and found this, [url]http://java.sun.com/docs/books/jni/html/start.html[/url] but didn't find the specific answer :( i need the answer by tomorrow !:( help!

Software Development java
Member Avatar for masijade
0
745
Member Avatar for getnit

Hi, I am trying to perform a few basic operations on MySql database through my delphi application. I am using MySql server 5.1 with Delphi 7 Here is what I have done( please correct me if I am wrong with the approach) - Created DataSource with MYSQL ODBC 5.1 driver …

Software Development delphi mysql pascal
Member Avatar for Simon180
0
142
Member Avatar for vbx_wx

Hello ,I want to implement a client server program,but I wish to use more OOP into the design(inheritance,virtual....),I only come up with this design and I nedd some pointers what can I do better,any sugestions will be welcome,Thanx [code] class TCPSocket { public: virtual void send(std::string buffer_m) throw(Error); virtual void …

Software Development c++ client-server oop
Member Avatar for vbx_wx
0
130
Member Avatar for knan

D is a list containing some words. D=[word1,word2,word3......] E is a list containing combinations of any two words in D ... E=[(word1,word2),(word7,word1)....] How can I implement the following in python: [CODE]A0[x]=1 for all x in D # This is actually Ai. when i=0, it becomes A0 B0[x]=1 for all x …

Software Development python
Member Avatar for Gribouillis
0
153
Member Avatar for plasticfood

[CODE]else if(choice == 3){ System.out.println("what is your name? "); String name = kb.nextLine(); boolean x = Member.checkMember(name); System.out.println(x); } [/CODE] when i run this, it prints "what is your name?" and instead of waiting for me type in something, it just skips that part and go ahead and prints x. …

Software Development java
Member Avatar for javaAddict
0
115
Member Avatar for neosonic

Hi All, I am using a msflexgrid to display my access database (not editing it in run time). But, I have one column which is a boolean. When I display it, that boolean column doesn't show as "True/ False" or "Yes/ No". It is shown as " -1 / 0 …

Software Development visual-basic
Member Avatar for AndreRet
0
100
Member Avatar for BasicGamer

Hello. I'm relatively new to Visual Basic 6, but I've been getting around pretty good. But there's one thing I need help with. You know how when your texting someone on your phone and you have to press the same button multiple times to get the letter(s) you want? Well …

Software Development visual-basic
Member Avatar for AndreRet
0
256
Member Avatar for jemz

hello can you help me please, how can i remove lots of spaces in a string for example: The space space space space quick space space space brown fox. the output should like this. Thequickbrownfox can you help on this...thank you in advance and I'm hoping for your positive response...

Software Development visual-basic
Member Avatar for AndreRet
0
130
Member Avatar for Swedenrock

Hi! Have some problems with my code again... I have a list "playerCardList" containing six elements where you pick out three of these. The three elements you pick should be removed from the bigger list "cardList" containing 81 elements. And after that three new elements from "cardList" would be put …

Software Development python
Member Avatar for VulcanDesign
0
145
Member Avatar for steve_Student

Hi I am creating an program for my degree, it’s a program that logs call times, days, gives total cost and discounts depending on days of the week, at the end of the program it out puts all results then give an option to start over again or exit. So …

Software Development c++ ios
Member Avatar for steve_Student
0
169
Member Avatar for sha11e

The error i get is: 'user:input' undeclared[first use this function] [CODE]#include <iostream> #include <cmath> using namespace std; int main() { // declaring variables \\ string user_input; // end of declaring variables \\ cout <<"Hello and welcome to Mr. Nightwish's lab of crazy!" <<endl <<endl <<"Please choose one of the following …

Software Development c c# c++
Member Avatar for mitrmkar
0
89
Member Avatar for 05026652

Hi guys, Basically Im working on a project using an ARM STM32 processor on a Keil eval board. Attached to it is a UC1601 GLCD screen. The problem that im having I want to be able to increase the size of the font, but im not sure how im to …

Software Development c
0
140
Member Avatar for fieryidris

i have been using the microsoft visual basic 2005 express edition beta which is my first attempt at doing anything with visual basic so it has been taking me a long time to learn myself how to do things - mainly by using google and also reading through all the …

Software Development asp google microsoft vb.net visual-basic
Member Avatar for Mariandi
0
1K
Member Avatar for shinsengumi

I created a C program that will make a connection to a website. I can compile it with no errors at all but when I run it, I still can't create a connection to my specified website. The errors that are shown in the terminal are: client: connect: Connection timed …

Software Development c socket-programming
Member Avatar for group256
0
175
Member Avatar for emilio

i am trying to draw a line between two points like this: [CODE=syntax]private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics MyGraphics = e.Graphics; Pen NewPen = new Pen(Color.Red,5); MyGraphics.DrawLine(NewPen,StartDraw,EndDraw); }[/CODE] it gives me an error: Object reference not set to an instance of an object. what have i done wrong …

Software Development
Member Avatar for mahmudh
0
274
Member Avatar for Abdel_eid

hey guys , i had a problem with classes and objects , i need to get the class name form a text file for example and open an object from that class , is that possible if so how can i do it . the object parameters i can send …

Software Development java
Member Avatar for JamesCherrill
0
129
Member Avatar for BladeCoder

i need some help see i have to write code for an array of 20 strings and i have to modify the binary search function im using to accomodate for strings instead of ints i know i still have to sort it so that binary search will work but my …

Software Development c++
Member Avatar for ritasea
0
1K
Member Avatar for Annettest

I am trying to compile a program using make on Mac OS X with gcc4.2. But I'm getting this error: fpu_control.h: No such file or directory I have never had a problem with an include file before and I'm rather confused! I have googled fpu_control.h, but I can't find anywhere …

Software Development c c# c++ os-x
Member Avatar for SgtMe
0
1K
Member Avatar for TheFrisco

(defun pCount (number) (let (ans 0) (do ((iterator 1 (+ iterator 2))) ((equal iterator number)) (if (equal (0) (rem iterator 3))) (+ ans iterator) (if (equal (0) (rem iterator 5))) (+ ans iterator) (+ ans 0)))) The object is to find the sum of all numbers divisible by 3 or …

Software Development
Member Avatar for jon.kiparsky
0
722
Member Avatar for TheDocterd

Could anyone please show me how to display data in a datagrid when I log in as a user into my application?? The after a successful login a form opens. That form displays data and then there's an option where the user can open a form called "Time Management". In …

Software Development
Member Avatar for TheDocterd
0
113
Member Avatar for TheDocterd

Hi All I have just one question.. I have an application, at the login screen I have a check box where the user can select if he/she is the default user on the computer he/she is using. What I would like to do is create a text file with the …

Software Development
Member Avatar for TheDocterd
0
88
Member Avatar for Xeros606

I know that it's possible to "force" a class to have a certain function through interfaces, but is there any way to "force" a class to have and assign certain variables? Also, is there way to "force" a class to assign inherited variables?

Software Development java
Member Avatar for apines
0
111
Member Avatar for JuanKawada

I've been driving myself crazy with something I originally thought would be incredibly simple. Here's a really simple example of what I'm trying to accomplish: I have a picture sized 800x530, all I need to do is center this picture in a new image that is 800x800 with a black …

Software Development image java
Member Avatar for JuanKawada
0
137
Member Avatar for eman 22

I know that multithreads in java allows me do multi tasks in the same time, but in the following code I'm not make a sense that the three threads done in the same time [CODE]public class myThreads { public static void main(String [] args) { System.out.println("Begin main Function"); mThread Thread_One …

Software Development java
Member Avatar for apines
0
161
Member Avatar for CharlieHolt

I am trying to save a form location to a database whenever the LocationChanged event is triggered on that form. [code] private void DisplayForm_LocationChanged(object sender, EventArgs e) { DSLocation = this.Location; ((Form1)this.MdiParent).NotifyChanges(this); // notify parent form that there are changes on this child } childForm.Location = StringToPoint((string)row["location"]); [/code] DSLocation is …

Software Development
Member Avatar for CharlieHolt
0
147
Member Avatar for blackxswil

I have 2 classes: 1. Student 2. Course Under the Student class I have the following: class Student { private: string StudentName; public: string name (); void changeName(string); void registerCourses(Course course); void displayCourses(Course course); }; The method "void registerCourses(Course course)" & "void displayCourses(Course course)" using the Course class. Under the …

Software Development c++
Member Avatar for geojia
0
183
Member Avatar for coastcode

I'm trying to create a tree with the following very small access database. I'm still getting a few errors, 'rdr' is a 'variable' but used like a 'method' and trying to get tree to actually populate.. If you find any other errors or recommendations, they're greatly appreciated. Thanks a lot. …

Software Development microsoft-access
Member Avatar for kvprajapati
0
326
Member Avatar for choover12

Hi, [CODE]string[] SplitEquationText = EquationBox.Text.Split('');[/CODE] in that line of code, it will not let me split nothing? am i allowed to split nothing? thank you.

Software Development
Member Avatar for kvprajapati
0
326
Member Avatar for Goddard
Member Avatar for Goddard
0
188

The End.