132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for thecoolman5

hi, I am making a calculator and i need a function that can detect a char in a string. In other words, i need it to detect a NON-number.[CODE]string n1 = "35+66/7"; int pos = -1; n1.find(char, pos+1); cout << char.n1_find << " was found at "<< pos << endl; …

Software Development c c# c++
Member Avatar for thecoolman5
0
634
Member Avatar for neti1987

I wrote a program which gets a number n ( > 0) and prints all the numbers with n digits. [CODE] def Q(n, index = 0, list = []): if (index == n): print list return startFrom = 0 if (index == 0 and n > 1): startFrom = 1 …

Software Development python
Member Avatar for woooee
0
4K
Member Avatar for mantapgan

Hi im trying to insert date to my .mdb database, but when i check it, the date turned into random numbers, like 3.2938482 here's my code [CODE] Dim constring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dbperpus.mdb" Dim query2 As String = "select * from fpinjam2" connect = New OleDbConnection(constring) connect.Open() cmd = …

Software Development open-source vb.net
Member Avatar for mantapgan
0
148
Member Avatar for siabenie

Hi all, Can anyone explain to me in details preferable with an example the different between i++ and i++ please. Here my example with what I understood: [CODE] for (int (0); i<10; i++) { cout << i++; cout << ++i; } [/CODE] What is the output? Is the working steps …

Software Development c++
Member Avatar for siabenie
0
171
Member Avatar for ayanbizz

I am trying to implement huffman coding scheme in java.But I am facing problems in building the huffman tree.How to proceed ?Is there any datastructure in java that will help me to do it?Please help!!

Software Development java
Member Avatar for Ezzaral
0
422
Member Avatar for Daigan

Here's the code: [CODE]class SingleBoard extends JPanel { public SingleBoard (ActionListener e) { setLayout (new GridLayout (3, 3)); for (int i = 0 ; i <= 8 ; i++) { buttons [i] = new JButton (); buttons [i].addActionListener (e); add (buttons [i]); } } } public void init () { …

Software Development java
Member Avatar for Daigan
0
143
Member Avatar for Carolin

i have below code , now i want to calculate the frequency of each letter which a function contain an array of alphabets use Pointer to a function principle i want to use pointer to find Frequency .... i have a little bit information about pointer but i don't know …

Software Development c++
Member Avatar for thines01
0
292
Member Avatar for Eragah

[B]In the Code below i have a program using multi dimensional arrays. I have a quick question on "How to" ad a checking system so my random class does not generate the same "type" of horse twice. For instance right now i have my program pick a random color with …

Software Development java
Member Avatar for stultuske
0
240
Member Avatar for riahc3

Hey Lets see if I can explain myself correctly...... I have 2 projects, one a program and another a library. First project is basically this, more or less (obviously it is more complicated) [code] //This is the main project //Inside com.stuct: //Global.java package com.stuct; public class Global { public static …

Software Development java
Member Avatar for riahc3
0
529
Member Avatar for Eragah

[B]For some reason whenever i print out the code below "System.out.println("Heat 1:"); never prints but rather somehow just leaves the terminal window. because when i use print instead of println it shows but not when i use println[/B] [CODE] System.out.println("Heat 1:"); System.out.println(heat1[0][0] +"\n"+ heat1[1][0] +"\n"+ heat1[2][0] +"\n"+ heat1[3][0] +"\n"+ heat1[4][0]+"\n"); …

Software Development java
Member Avatar for stultuske
0
193
Member Avatar for iamthesgt

In working on a logfile for an application, I needed to limit the size of the logfile to 1000 bytes. Since it is not possible to delete lines from a file in C++, I used the following steps: Rename the logfile to a temporary name. Read the temporary file. Write …

Software Development c++ ios ubuntu
Member Avatar for iamthesgt
0
230
Member Avatar for newbiecoder

Hello everyone, I'm coming up with a very primitive question: I need to take two numbers from console and process them. Since I'm getting input from console with Console.Readline(), how can I seperate those numbers from the string? Thanks in advance..

Software Development
Member Avatar for newbiecoder
0
141
Member Avatar for newbiecoder

Here is another simple question (I'm asking them because I couldn't find a way by myself): Suppose I have a string [CODE]x = "Daniweb"[/CODE] When I try to update an element like : [CODE]x[3] = k[/CODE] The Visual Studio says it is read only and gives error. How can I …

Software Development visual-studio
Member Avatar for newbiecoder
0
101
Member Avatar for magikman

Ok, so I have exhausted all possible options with this. I cannot figure out why this script fails to compile when trying to divide. The division on line 203 seems to break the whole script. The errors that are displayed are for lines that are 50 some lines below the …

Software Development perl session
Member Avatar for d5e5
0
476
Member Avatar for Chuckleluck

Hello, Here is my example code: [CODE]// Main.h #ifndef MAIN_H #define MAIN_H #include <iostream> using namespace std; #include <string.h> string HelloWorld = "Hello World!\n"; void HelloEarth(); #endif [/CODE] [CODE]// Main.cpp #include "Main.h" int main() { cout << HelloWorld; HelloEarth(); }[/CODE] [CODE]// Secondary.cpp #include "Main.h" void HelloEarth() { cout << HelloWorld; …

Software Development c++ ide
Member Avatar for gusano79
0
2K
Member Avatar for TrustyTony

Inspired by discussion in [url]http://www.daniweb.com/tutorials/tutorial238544.html[/url] (test cases are from there) I used my magic pattern matching function transformed from numbers and adding the parts length checking loop. I like my own solution better, I do not know about you.

Software Development email python
Member Avatar for TrustyTony
0
2K
Member Avatar for jt_4285

i am newbie to java.i am trying to run a program to show "static method" and "static variable ".my code is below.i am compling it on netbeans 7.01 and everytime i am getting the error.: "main method not found in class static_demo.Static_demo, please define the main method as: public static …

Software Development java java-netbeans
Member Avatar for stultuske
0
247
Member Avatar for applejax77

I am working on a nested control structure program that will, when user imputs any letter, whether it be upper or lower case will count the number of times the letter appears in the sentence entered by the user. In the code below when the user enters lower case letter …

Software Development java
Member Avatar for DavidKroukamp
0
148
Member Avatar for Labdabeta

How can I get the coordinates of the output of a truetype font. I need to write a function like so: [CODE]struct CartesianCoord{float x,float y}; CartesionCoord *printfont(const char *filename,char ch, int &len) { /*Read the font in filename.ttf and convert it to a set of vertices describing the resulting shape. …

Software Development c++ microsoft
Member Avatar for Labdabeta
0
255
Member Avatar for aishapot

How can I count the number of items in the listview. Example scenario. Today, I added students say, 20 students. and tomorrow I added another 15 students, i need to have a breakdown on how many students i have been adding per day. Please help me. Thank you guys!

Software Development listview vb.net visual-basic
Member Avatar for aishapot
0
337
Member Avatar for amture101

well I'm trying [CODE] String filename = "table.file"; JTable table = new JTable(elements, header); TableModel tm = table.getModel(); try { FileOutputStream fos = new FileOutputStream(filename); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(tm); oos.flush(); oos.close(); } catch (IOException e) { e.printStackTrace(); return; }[/CODE] but it only delete the old entry and write …

Software Development java
Member Avatar for DavidKroukamp
0
5K
Member Avatar for sidereal

Hey guys!!! I know these simulations are too much but.... still another one and I am havin some problems with that/// I have to create a file system simulation that has to understand these commands: cr a - create a new file named a, size ==0; rm a - remove …

Software Development file-system java linked-list
Member Avatar for MastAvalons
0
440
Member Avatar for gpta_varun

Hi Is there any way , memory leaks can be clogged in c/c++ ... Are there any good tutorials on how can we make our code Memory Leak free ??/ Best Regards -Varun

Software Development c++
Member Avatar for MastAvalons
0
206
Member Avatar for kashmir323

Is there a C++ command that restarts the application. The program I'm making is just a console application that acts like a calculator. But once you enter your number and press enter you have to close the console and re-open it to find another number. [CODE] int yes = ; …

Software Development c++
Member Avatar for WaltP
0
2K
Member Avatar for niggz

Hi again! I have a database and some tables filled with data. [code=c#] var club = Baza.Clubs; //Baza is dataset, and Clubs is table var schedule = Baza.Schedule; // same as above for (int i = 1; i <= 90; i++) { if(schedule[i].day == 2) // BOOM! Breaks at first …

Software Development dataset
Member Avatar for niggz
0
397
Member Avatar for tomprice0189

Hi all, So here is my situation: 2 classes 1st class is a windows form created in VS2008. It has a picture box on it which i want to update with images. 2nd class is a custom class called 'camera' which uses the AForge.Net framework to grab images from my …

Software Development image webcam
Member Avatar for SANJAY26
0
1K
Member Avatar for vyrte

hello i'm writing a program in c++ and i'm using linux. i use fork() in order to create a process and then i want to wait for the child process to finish so its something like that: [CODE]pid=fork(); if(pid<0) { cerr << "Failed to fork" << endl; exit(1); } if(pid==0){ …

Software Development c c# c++
Member Avatar for iamthesgt
0
448
Member Avatar for theCompiler

can someone please tell me how am i suppose to start my program ? i have 20 integers (1-20) the user will input what number should start and the count interval . its a bit confusing only 5 numbers should be left numbers who are already counted will not be …

Software Development c
Member Avatar for WaltP
0
133
Member Avatar for poolet

hello, My program works fine but I want every time that the user add a character int the calculation section the program will print an error message and will ask the user again... I have try a lot of different things but nothing helps me... for example static_cast() and other …

Software Development c c# c++
Member Avatar for WaltP
0
1K
Member Avatar for applejax77

Can someone please help me find what is wrong with my code below. The program is suppose to add all the input numbers except for the sentinel which is -1. What am i doing wrong? import java.util.*; public class InClassWork { static Scanner console = new Scanner(System.in); public static void …

Software Development java
Member Avatar for applejax77
0
163
Member Avatar for nijinjose123

Hi, I have a very basic knowledge in C/C++, I need help in converting HEX value to readable values. I hope some one would give me a clear answer and make it understandable also so that i could learn from it.. thanks

Software Development c++
Member Avatar for nijinjose123
0
181
Member Avatar for bubblesM

I have the following situation for multithreading in C++: Struct MyData { …. } //Class to create a thread specific data Class MiscData { public: CList<CPtrArray, MyData*> myDataList; HANDLE m_dbHanle; String m_SQLCmd; MiscData () { m_dbHandle = DatabaseConnect(connection parameters); } inline FillMyDataList(MyData* data) { myData* pData = allocate memory; pData …

Software Development c++ data-structure multithreading
Member Avatar for bubblesM
0
299
Member Avatar for s.w.a

hello every body, how are you all please i want some one to help me in my prgram this ,as i think, is the piece where the problem occur, the output is being to give only the last value i enter from the keboard where me need is to insert …

Software Development java
Member Avatar for NormR1
0
149
Member Avatar for jemz

Hi, I am new in this C# language i haven't tried yet writing program on C#,so in connection on this i want to learn how to use C#,but before i will start what editor should i use on this C#...please help me. I appreciate more help.Thank you in advance.

Software Development
Member Avatar for jemz
0
132
Member Avatar for zerofreak

Hello guys, I've newly joined this forum since I want to enhance my knowledge in Programming specially in Visual Basic. So for the important part, right now I'm planning on creating a word detector somehow and there are specific rules I was to set in the textbox in relation with …

Software Development vb.net visual-basic
Member Avatar for zerofreak
0
175
Member Avatar for ahp@aol.in

Hi folks, I've simple question regarding following code. [CODE] int main() { int i =5; printf("%d %d %d\n",i,i++,++i); // 7, 6, 7 return 0; } [/CODE] The answer is [B]7 6 7[/B]. I want to know how it is coming. Please help. Thanks, Amar

Software Development c
Member Avatar for jumbowat
0
805
Member Avatar for mrprassad

[CODE] swap (char *p, char *q) { printf ("%c\t%c\n", *p, *q); *p ^= *q ^= *p ^= *q; printf ("%c\t%c\n", *p, *q); } int main (int argc, char *argv[]) { if (argc < 2) { printf ("\nSyntax: ./a.out str\n\n"); exit (1); } char *p, *q, temp; p = q = …

Software Development c
Member Avatar for Narue
0
155
Member Avatar for wallet123

whats the error in here? everytime i run this program even though there are no red underlines and signs still, it say theres an error in here ... and how can i do the same program using if else statement? i have started doing if else but my program its …

Software Development java java-swing
Member Avatar for wallet123
0
189
Member Avatar for ajacintha

Hi, I am creating a tool where a user takes a screen shot of the users report and paste all in a word document. I am working on a tool which automates this, im my application the user click snapShot button on the screen where the snapshot is to taken, …

Software Development java
Member Avatar for NormR1
0
420
Member Avatar for srinidelite

#include<stdio.h> int main() { int i; typedef struct BookDB { int iPageNo[10]; char cBookName[10]; } b1[5],*b2; // *pvBookDB = &vBookDB; b2 = &b1; printf("Enter the pageno folloed by bookname for 5 books at at time"); for(i=0;i<=5;i++) { scanf("%d,%s",b2[i].iPageNo,b2[i].cBookName); } for(i=0;i<=5;i++) { printf("%d,%s",b2[i]->iPageNo,b2[i]->cBookName); } return 0; }

Software Development c
Member Avatar for jumbowat
0
140
Member Avatar for Mona Ali

hi all i have a problem that i don't know where to place the rowdatabound event and its not working in my code. i want to highlight that rows in grid whose price is greater than 50 but that's not working [CODE] [B]Default.aspx.cs[/B] using System; using System.Collections; using System.Configuration; using …

Software Development
Member Avatar for Mike Askew
0
1K
Member Avatar for ajacintha

I have create a JFrame for my Login Screen. I need my JFrame to be Non Draggable. I tried the setUndecorated method. It makes the Jframe Non-Draggable. But I am not able to view the border of the Jframe and also the minimise, close buttons. So what is the alternative …

Software Development java java-swing
Member Avatar for ajacintha
0
90
Member Avatar for prathapsv3

There are 3 columns(Count,Item,Price) in datagridview which is bound to a datasource. The count is 1 by default and it should increment by 1 when i click on a button,so the count would be 2 if i click button again. Any suggestions?

Software Development vb.net
Member Avatar for Pgmer
0
173
Member Avatar for adrain91

[CODE]import urllib.request import sys #'http://www.imdb.com/list/SuSZdwCyHzU/' def savePage(urll,filename): with urllib.request.urlopen(urll)as url: page=url.read() # print(page) sys.argv[0]=filename outfile=open(sys.argv[0],'w') for line in page: outfile.write(line) outfile.close() savePage('http://www.imdb.com/list/SuSZdwCyHzU/','outIMDB.txt')[/CODE] so here is my code .I try to write the original codes into the 'outIMDB.text' but somehow I got this bug: File "C:\Program Files (x86)\Wing IDE 101 4.0\src\debug\tserver\_sandbox.py", …

Software Development ide python
Member Avatar for richieking
0
438
Member Avatar for balldrix

now i am working on an exercise that asks to write this without recursion.... can anyone guide me to what i can do to make this work? i dont want anyone to do it for me but help would be appreciated. [CODE]/* #include <cmath> using namespace std; void getAllDivisors(int n); …

Software Development c++
Member Avatar for balldrix
0
204
Member Avatar for jbutardo

Hi, How can I create a dialogbox, I think that will allow user to open or to save as a textfile? Is it possible? If yes, how can it be made? Thanks

Software Development vb.net
Member Avatar for Pgmer
0
136
Member Avatar for caswimmer2011

Hey. I am trying to make a "virus" that will not let the user exit the program even with pressing Command+Q (oh, ya, I have an Apple). Here is what I have so far: if (keylistener.getKeyCode()==81){ System.out.println("Works"); } I have the println just to see if it works (which it …

Software Development apple java virus-malware
Member Avatar for peter_budo
0
145
Member Avatar for jbutardo

I have this error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near and I don't know how does this happen because whenever I check the SQL that I have made including the inserted …

Software Development mysql sql vb.net
Member Avatar for jbutardo
0
348
Member Avatar for gunzaddict29

I'm quite difficult to understand how could I control DataGridView in MS Visual Studio. I've read many articles in the internet but it seems that none of them could help me. Can somebody help me with this?.. Thanks Alot.

Software Development vb.net visual-studio
Member Avatar for gunzaddict29
0
126
Member Avatar for Galbatorix

hello guys, how do you write app.path in vb.net coz it works in vb6 but not in dotnet

Software Development vb.net
Member Avatar for Pgmer
0
82

The End.