132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Remy the cook

I am new at coding. I wanted to read from a file(text) and then write it to another file many times so that the file I write to becomes as large as 20MB..I read Harry Potter book for that....the code works just fine for 1000 lines etc..the file is read …

Software Development c++ file-system visual-studio
Member Avatar for Remy the cook
0
180
Member Avatar for TrustyTony

I googled little around for correct way to not reinventing of the wheel for expression evaluation (even I had done some simple evaluation check for my [Tkinter calculator snippet](http://www.daniweb.com/software-development/python/code/282548/simple-calculator) earlier). After getting totally upset with [this example](http://www.bestcode.com/html/evaluate_math_expressions_pyth.html), I made this with some struggles with `__builtins__` globals parameter of eval. First …

Software Development python tkinter
0
642
Member Avatar for DavidB

I have recently gotten more involved in the logistics side of my employer’s activities and we use SAP for a large part of our CMS work (specifically, SAP by Design). We have hundreds of Sales Orders (SOs) in the system and they are spread out to 2016. I am now …

Software Development cms
0
100
Member Avatar for Monster99d

I have an error called Unexpected Token 'class', did you forget a ;? I have no clue what is going on. Maybe you guys can help me out. The codes name is Player.h. The error is on line 9. #ifndef PLAYER_H #define PLAYER_H #include "Weapon.h" #include "Armor.h" #include "Monster.h" #include …

Software Development c++
Member Avatar for Monster99d
0
4K
Member Avatar for enakta13

I have created the buttons for on-screen keyboard. The only thing I don't know is how to add the corresponding letter/character via actionListener to the jTextField. I know if it was not jTextField I could use "append".

Software Development java
Member Avatar for Krokcy
0
291
Member Avatar for leyla

Hi, I have been given the task of basically reading and writing to and from files. Below is the code from one sub: If btnSaveRecipe.Enabled = True Then FileName = "C:\Users\Leyla\Documents\Recipe Task\Recipe.txt" FileWriter = New IO.StreamWriter(FileName) For index = 0 To lstRecipe.Items.Count - 1 'For the number of ingredients in …

Software Development vb.net
Member Avatar for Branickiod
0
221
Member Avatar for TrustyTony

I am trying to write safyfied evaluator class, and get unexpected `__builtins__` added to dictionary after evaluation. Can somebody explain why/how it happens? import math def echo(n): print n return n def nothing(n): return n debug = nothing class MathParser(object): ''' Mathematical Expression Evaluator class. call evaluate() function that will …

Software Development os-x python
Member Avatar for HiHe
0
308
Member Avatar for deepthought

Hi ALL, I am completely new to python and when i was playing with a while loop in the Python SHELL the code works but when I then put it into a file and saved and then tried to run it I got the error "NameError: name 'b' is not …

Software Development python
Member Avatar for deepthought
0
8K
Member Avatar for speakon

Hello! I am very new to Java and programming theory and desperately trying to improve my knowledge. This is the first program I've made without help and really would appreciate some feedback. I know there must be 1,000,000 better ways to do what I did. Notes: - I want to …

Software Development java oop
Member Avatar for JamesCherrill
0
3K
Member Avatar for UFO Disko

Hello, I want to be a Microsoft Certified Professional Developer and after googling so much, I understood that in order to obtain that certificate, I have to pass 4 exams. * MCTS prerequisite: TS: Web Applications Development with Microsoft .NET Framework 4 (**Exam 70-515**) * MCTS prerequisite: TS: Windows Communication …

Software Development asp.net microsoft-access visual-studio
Member Avatar for Michael27
0
219
Member Avatar for anuj_sharma

Hi, I am trying to add content to an excel sheet using the below code. However, when I open the excel sheet, nothing is added. Please advice. public class StepNoToExcel { HSSFWorkbook wb = null; String fileName = "C:\\StepNoForEvidences.xls"; File file = null; StepNoToExcel() { file = new File(fileName); if(!file.exists()) …

Software Development java microsoft-office
Member Avatar for dougWill
0
284
Member Avatar for skran

Hello all! I would like your help please.. I have a datetimepicker and I want to use it for the time part only! So, I would like to disable its dropdown calendar.. Thank you in advance!

Software Development html-css vb.net
Member Avatar for poojavb
0
783
Member Avatar for 47pirates

I am trying to update database by editing cell values in jtable. my table looks like ![a](/attachments/large/2/a.JPG "a") When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this ! ![b1](/attachments/large/2/b1.JPG "b1") but if i …

Software Development java java-swing
Member Avatar for dougWill
0
3K
Member Avatar for grga4life

Hello everyone,I have little problem over here with my work. It gives null pointer about JTextArea in ActionListener. Could anyone help me,please? Thanks in advance Here's code: import java.awt.event.*; import java.io.*; import javax.swing.*; /** * @author Nikola * */ public class FileListener implements ActionListener { private JMenuItem exit; private JMenuItem …

Software Development apple java java-swing
Member Avatar for NormR1
0
173
Member Avatar for shibu2all

void insertion_sort(int *a, int n) { int for(i=1;i<n;i++) { value=a[i]; for(j=i;j>0 && value<a[j-1];j--) a[j]=a[j-1]; a[j]=value; } } can anyone pls explain me the flow of this code... i am having confusion in understanding the flow..

Software Development c
Member Avatar for TrustyTony
0
229
Member Avatar for Lucaci Andrew

Inspired by some C and C++ threads regarding finding a specific pattern in a file.

Software Development python
Member Avatar for TrustyTony
0
319
Member Avatar for shibu2all

void selection_sort (int *a, int n) { int i, j, m, t; for (i = 0; i < n; i++) { for (j = i, m = i; j < n; j++) { if (a[j] < a[m]) m = j; } t = a[i]; a[i] = a[m]; a[m] = t; …

Software Development c
Member Avatar for shibu2all
0
251
Member Avatar for iEpic

Im taking a java class right now but I am still a complete noob. I want to make a program where it searches a text file and will write the usernames it finds to a new text file. Usernames are always found like this in the file... <a href="/user/iEpic" the …

Software Development java
Member Avatar for JamesCherrill
0
98
Member Avatar for Cameronsmith63

Ok so here's the thing, I used to read in data from an excel file and bulk copy this data into a SQL table and everything worked fine. But now, my source file changed, so now i get data from a other excel file. Both file look exactly the same, …

Software Development gui
Member Avatar for Cameronsmith63
0
117
Member Avatar for silvercats

(1)Are DOS and Windows assembly different? (2)How many registers do both 32bit and a 64 bit processors have speparetl? what is the size of them? (3)To emulate a 16bit or 32bit program under a 64bit processor, does that processor have to physically support those old 16 and 32 bit versions? …

Software Development assembly
Member Avatar for brunoccs
0
195
Member Avatar for sparsh610

hello friends, i have read a question about pointers and seems totally new concept for me .. how would you find out if one of the pointers in a linked list is corrupted or not? pointer is corrupted ??,, don't understand :( pls help your friend : sparsh

Software Development c linked-list
Member Avatar for mike_2000_17
0
175
Member Avatar for Olifant

want to inset a field on vb form with texboxe besides it such that when i inset values a polygon is drawn. please help asap

Software Development vb.net
Member Avatar for lolafuertes
0
72
Member Avatar for landog

[code] #!/bin/bash if [ [ $a == $b + $c ] || [ $b == $a + $c ] || [ $c == $a + $b ] ]; then [/code] result: too many arguments What is the proper syntax? Thanks!

Software Development shell-scripting
Member Avatar for laksh.ss
0
168
Member Avatar for sparsh610

hello friends, i m doing programming in vc++. but while making a basic program of link list facing a problem. when i try to add aaloc.h file it turns into atlalloc.h. there is no file as alloc.h. #include <stdio.h> #include <atlalloc.h> struct node{ int data; struct node *link; }; void …

Software Development c
Member Avatar for Ancient Dragon
0
96
Member Avatar for ulrichrandom

how do i freeze a form? scenario: i'm working currently on a form (running program). i'll click a button which will direct me to another form. input info and then back to the previous form. So, how do i freeze the previous form without using unload, and the data in …

Software Development visual-basic
Member Avatar for jhai_salvador
0
164
Member Avatar for broskie

If you could help me out, thanks. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; // Adds all stuff for files namespace WindowsFormsApplication1 { public partial class Form1 : Form { static String fileloc; public Form1() { InitializeComponent(); ContextMenu editorMenu …

Software Development gui
Member Avatar for hericles
0
215
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* Hey you guys! ive got a problem with a 'test' program i have made for saveing strings. heres the code: #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> #include <fstream> using namespace std; int main() { ofstream myfile ("savefile.txt", …

Software Development c++ file-system ios
Member Avatar for Dudearoo
0
141
Member Avatar for lewashby

I'M working my way through a C++ book and now I'M doing a card deck program. Here's the line I'M having trouble with. r = card % 13; // r = random 0 to 12 card in this case is just a random int number from 0 to 51. 52 …

Software Development c++
Member Avatar for TrustyTony
0
175
Member Avatar for merse

I would like to use an unsigned integer type for indexing a vector, but I want to use the best and optimal on every platform. How to implemet?

Software Development c++
Member Avatar for L7Sqr
0
126
Member Avatar for Mikey12345

Hi Is there a way that i can a loop in my program Dim Total1,Total2,Total3,total4,Total5,Total6,Total7 ,Total8,Total9,Total10 as integer For I = 0 to 100 Total1= InterestRate(i, Listview1.Items(0).SubItems(1).text,Listview1.items(0).subitems(2)) Total2= InterestRate(i,Listview1.items(1).subitems(1).text,Listview1.items(1).subitems(2)) Dim Item1 as new ListviewItem(i) Item1.Subitems.add(FormatCurrency(Total1+Total2,2) ListView2.Items.addrange(new listviewitem() {Item1}) Next This works because i have know how many rows have data …

Software Development listview vb.net
Member Avatar for Mikey12345
0
140
Member Avatar for sebass123

Hey I am trying to find a way for the user(not the programmer) to determine how many decimal places a number will print out to. I have tried pointers, precision mods and even a sub program to bypass my lack of knowledge in this area. Any help would be greatly …

Software Development c c# c++
Member Avatar for dheaven
0
186
Member Avatar for mohsin1992

#include<stdio.h> #include<string.h> void recurse(char [],const char *); int main() { char *charset="abcdefghij"; recurse("",charset); } void recurse(char str[],const char *charset) { int len; len=strlen(str); strcat(str,charset[len+1]); if(len<strlen(charset)) recurse(str,charset); printf("%s",str); } Like the question says, what is wrong here? This is the logic of my program 1. Keep a string called charset which …

Software Development c
Member Avatar for Trentacle
0
2K
Member Avatar for XodoX

I think this has something to do with process scheduling. (1st process) Start 0// starts at 0ms Run 10 // runs for 10 ms Disk 0 // no idea what this does, but it takes 10 ms Run 30 // run 30 ms End // terminates (2nd process) Start 5 …

Software Development c++ linked-list queue
Member Avatar for asrockw7
0
194
Member Avatar for satti

Hello,, i want combo to search the whole word before space ..like for blue berries when i press B it should give the whole word blue only not berries but when i select again b the it should give me blue berries . senario.. i have 3 names in combo …

Software Development seo vb.net
Member Avatar for satti
0
137
Member Avatar for Commando123

Hey Guys i am doing a small project and i am using vb.net with MS access database. i am facing a Concurrency issue sometimes when i try to save data in the datagried view. i have added the datagried view by draging and drop the table from the data source. …

Software Development multithreading vb.net
Member Avatar for Commando123
0
129
Member Avatar for Maymac

Hello I am new to java and am having problem loading table numbers from mysql database to tablenumberJComboBox. I am using the load tablenumbers method. private void loadTableNumbers() { // read all table numbers from database try { // obtain all table numbers myResultSet = myStatement.executeQuery( "SELECT tableNumber FROM restaurantTables" …

Software Development java
Member Avatar for NormR1
0
169
Member Avatar for nikolaos

I want to write a version of the SAND GAME. I want to examine the color of every pixel in a Jframe window. I use something like this. Toolkit toolkit = Toolkit.getDefaultToolkit (); Dimension dim = toolkit.getScreenSize(); int height = dim.height; int width = dim.width; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice …

Software Development display image java
Member Avatar for nikolaos
0
247
Member Avatar for evandana

I need help getting the Apache POI set up correctly. I downloaded this file: [url]http://mirrors.devlib.org/apache/poi/release/bin/poi-bin-3.2-FINAL-20081019.tar.gz[/url] from poi.apache.org, and don't know what to do next? Where do I put this file? Are there other files I need to download? I hear talk of setting a "Classpath". What is this, and how …

Software Development apache java
Member Avatar for peter_budo
0
679
Member Avatar for RonKevin

Okay, its been a while since my last visit here..and yes I need your help with C++ Programming... My grades were fine so that's all thanks to you guys....so here's my next question.... What is wrong with my code? My exponent displays a wrong number... I used a for loop …

Software Development c++
Member Avatar for RonKevin
0
319
Member Avatar for lewashby

#include <Stdafx.h> #include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand( static_cast<unsigned int>(time(NULL))); // set seed for random numbers cout<< "Enter number of trials to run "; cout<< "and press ENTER: "; cin>> …

Software Development c++
Member Avatar for VernonDozier
0
169
Member Avatar for Appjacker

Working on a program that needs to open a file, read the contents which is a number, save the content as an integer in the program, edit the number by one and then save in the number in the file once more.

Software Development delphi pascal
Member Avatar for Appjacker
0
436
Member Avatar for teknogisk

hello bros i need help in dis i have textbox with text blahbla@lablablab blahblabla@alalalala blahbla@lablablab blahblabla@alalalala multi line and so on i would trim all text after the "@" to be blahbla blahblabla blahbla blahblabla thx in advance my bros :)

Software Development vb.net
Member Avatar for TnTinMN
0
106
Member Avatar for Krokcy

EDIT: Im an idiot. The hand-shake like mechanic i put in where the server waits for the client to respond was the reason it was so slow, removed it and it worked. I misunderstood/forgot how streams work.. Ok. So i just started learning how to use the network utility there …

Software Development client-server file-stream java
0
428
Member Avatar for laura90

I'm trying to write a simple linked list program. The header files are compiling successfully, but when I try to compile my driver program to test the program, I'm getting an error. Here's my driver program: #include <iostream> #include "Node.h" #include "List.h" using namespace std; template <typename T> void fill(List …

Software Development c++ linked-list ui-ux
Member Avatar for mike_2000_17
0
382
Member Avatar for Marco25Me

Hi for all and many thanks for attention, for now i'm studing the "inheritance" of a class. I have one class "Form1" and another class it have the inherit of the first "Form2:Form1" until this point all is ok, but i not need of all of Form1 members but only …

Software Development
Member Avatar for TrustyTony
0
95
Member Avatar for A0110

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton dblclkbtn = (LinkButton)e.Row.Cells[0].Controls[0]; string _jsdbl = ClientScript.GetPostBackClientHyperlink(dblclkbtn, ""); e.Row.Attributes["ondblclick"] += _jsdbl; // e.Row.Attributes.Add("ondblclick", "Javascript:__doPostBack('DoubleClick','" + e.Row.RowIndex + "');"); string jsCommand = string.Format("__doPostBack('{0}','Edit${1}')",GridView1.ID, e.Row.RowIndex, GridView1.EditIndex); foreach (TableCell c in e.Row.Cells) { if (c == e.Row.Cells[0]) { } else …

Software Development session
0
127
Member Avatar for pendo826

Hey i am making an application that stores employee's details and the output is different than what it should be i was expecting the output to be the toString() in the employee class can anyone see anythin wrong: //Imports: //******************************************************************** //Employee Class. public class Employee { //Variables. private String employeeName; …

Software Development java
Member Avatar for Krokcy
0
188
Member Avatar for trishtren

hey, Iv been working on an swf file generator following the specification, However i am currently struggling to have my binary output match the binary output of a swf file gengerated by flash CS3. The particular part i am struggling with is the file attributes tag, the specifications for the …

Software Development actionscript java
Member Avatar for trishtren
0
177
Member Avatar for M.Waqas Aslam

hello ! may God bless all of us , well i am working on a project in which i need to create a simple desktop viewer , a user can view the screen of any computer in LAN network , how can i do this , as this is very …

Software Development socket-programming vb.net
Member Avatar for Reverend Jim
0
270
Member Avatar for VasquezPL

I have a small problem, maybe you guys know how to avoid it. system.IO.StreamReader text = new System.IO.StreamReader(to the html path); while ((line = text.ReadLine()) != null) { newMail.HTMLBody += line } When I open html file directly from its folder where html file is,byclicking 2 times on it, All …

Software Development html-css
Member Avatar for VasquezPL
0
237

The End.