43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for gerard4143

Hi, I have a simple question about the Linux Shebang '#!'. Well more of a clarification of how Linux handles #!. My understanding.... When the operating system 'Linux' encounters an executable file with the first characters #! it will extract the absolute path for the executable from this line..i.e. #! …

Software Development c operating-system
Member Avatar for gerard4143
0
330
Member Avatar for jakewebb

Hi I am attempting to write a playlist for my media player which is already built. I have found a way to build a playlist for it but it would be helpful if I could save the contents of TextBox1 to a text file without using the save as. I …

Software Development file-system vb.net
Member Avatar for jakewebb
0
1K
Member Avatar for Tiny_trixer

Hi everybody! I'm currently working on an assignment for school. I'm creating a linked list (a line at the liqure store to be exact) and I'm a little stuck. Part of the code: [CODE] public void ekspederKunde() { System.out.println("Velkommen til polet! Vennligst vis gyldig legitimasjon.\n"); if (fremst == null) { …

Software Development java linked-list
Member Avatar for Tiny_trixer
0
121
Member Avatar for danturn

Hey guys, I'm a bit stuck with this issue... I have a list of comma separated strings. some of them have a duplicate field in them. what I want at the end of this process is a List of strings (comma seperated again) with any of the duplicates being marked …

Software Development
Member Avatar for danturn
0
167
Member Avatar for ubi_ct83

Hi all, My problem is regarding to my last post about argument. that is solved but it create a new problem. The last data in debug_file is not written in output file. I think its because of looping in the argument.How to solve this? [code] int main(int argc, char* argv[]) …

Software Development c file-system operating-system
Member Avatar for ubi_ct83
0
117
Member Avatar for Dudani

The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, .... Formally, it can be expressed as: f ib0 = 0 f ib1 = 1 f ibn = f ibn−1 + f ibn−2 Write a C program using the fork() system call that that generates …

Software Development c
Member Avatar for Dudani
-1
7K
Member Avatar for may781

Hey:) I am creating a project in java,but have been sick for the passed 3 weeks, so I am a bit stuck on how some of the code should look,and where it should be the details are that I am required to develope an application that will allow the user …

Software Development java java-swing
Member Avatar for jwenting
0
108
Member Avatar for jmguerriero

I am trying to write some code to practice using methods. My goal is to get the user to input their weight. Then in the method I want to convert the earth weight to moon weight, which is earth weight / 6. I think I got it but I can …

Software Development java
Member Avatar for jmguerriero
0
424
Member Avatar for SoulMazer

Hi, so I'm in the process of writing a music player with a GUI. I would like to be able to print a statement after I am done playing a song. I originally through I could just get away with getting the song's length and time.sleep'ing for that long. Since …

Software Development gui python
Member Avatar for Stefano Mtangoo
0
113
Member Avatar for bustersox

I am having problems filling an array of objects with a txt file. It seems to me that it should work, but I get all 0's printed out. Please help! I cannot write the rest of my code until I figure this out. Also I get this error message: "Exception …

Software Development java
Member Avatar for bustersox
0
4K
Member Avatar for jeffery12109

hey I'm making my own adventure text game and I need help. [CODE]def getEnergyAndMana(magicExp, energyExp, maxYourMana, bonus, energyLevel, bonus1): magicLevel = 0 if magicExp >= 0: magicLevel = 0 maxYourMana = 50 + bonus if magicExp >= 550: magicLevel = 1 maxYourMana = 100 + bonus if magicMax >= 1150: …

Software Development python
Member Avatar for jeffery12109
0
97
Member Avatar for sjn21682

id been working on this for days now, maybe someone could help me figure this one, i have this items in listbox2, my database has a field for project, data directory, etc... if my first item in listbox2 equals to the field PROJECT in my database, i want to get …

Software Development dataset open-source
Member Avatar for sjn21682
0
377
Member Avatar for thebluestar

ShoppingListItem.java [CODE=java] package problem2class; public class ShoppingListItem { private String name; private int numOfItems; private double price; public ShoppingListItem(String name, int quantity, double pricePerUnit) { this.name = name; numOfItems = quantity; price = pricePerUnit; } public String getName() { return name; } public void setName(String name) { this.name = name; …

Software Development java
Member Avatar for thebluestar
0
226
Member Avatar for xxxSuperTrooper

This is what i have for code this far, i need help trying to keep score here. Any help would be well appreciated thanks [CODE] int sum = 0, teamScore, numPoints, score1 = 0, score2 = 0; while (teamScore != -999) { cout << "Did team 1 or team 2 …

Software Development c++
Member Avatar for WaltP
0
1K
Member Avatar for jgehlot09

Hello I am new to python...I met with this simple problem [CODE] def search(path,filename,extension): name=' ' listdir=os.listdir(path) print listdir flname=filename+'.'+extension i=0 match='' while(i<len(listdir)): if(listdir[i]==flname): match='YES' print 'got the match' break i=i+1 if(match=='YES'): assign(filename) else: name = filename+'.'+extension print 'the filename is',name return name lets_text=search(path,filename,extension) print 'the name we gt is',lets_text …

Software Development python
Member Avatar for woooee
0
158
Member Avatar for pepsy11

Hey.. =) I am making a program and i need to use: [CODE=c#]using System.Data.ADO[/CODE] But it won't work? Anybody know what i can do?

Software Development
Member Avatar for pepsy11
0
89
Member Avatar for musikluver4

[code] //Date: 3/16/2010 import javax.swing.*; class PizzaChoice { public static void main(String[] args) throws Exception { char[] whatSize = { 'S', 'M', 'L', 'X'}; char size; double[] sizePrice = {6.99, 8.99, 12.50, 15.00}; int s; System.out.println("What size do you want?"); size = Character.toUpperCase((char)System.in.read()); for (s = 0; s < whatSize.length; …

Software Development java java-swing programming-construct
Member Avatar for musikluver4
0
959
Member Avatar for emilo35

Okay, so what I'm trying to do is to write a program that reads several TGA images and bunch them together into one bin-file for later use. I got this code from [URL="http://nehe.gamedev.net"]NeHe OpenGL[/URL], Tutorial 24, and it is what I use to load my images: [CODE=C++] bool loadTGA(char *path, …

Software Development c++ opengl
Member Avatar for emilo35
0
298
Member Avatar for mewa_ashika

Ok so i am going a whack a mole game. What method i did was that i used a picture box (I couldn’t use the button) to display a mole on the screen. So when the timer starts the picMole.visible= true and when clicked score is changed mole becomes invisible …

Software Development visual-basic
Member Avatar for mewa_ashika
0
1K
Member Avatar for elmbrook

I am unable to open a child form as a modal form. Here is my scenario I have a MainForm which is a toplevel form. Inside the MainForm I have a Toolbar Form which is a child. From the Toolbar Form I call another child form. From that child form …

Software Development
Member Avatar for elmbrook
0
2K
Member Avatar for hawkoftheeye

Hello. I have an issue with a game I am programming for my c++ project which I am hoping one of you kind souls can help me solve... I consider myself an intermediate beginner in c++. I am coding a space shoot-em-up in c++ with a proprietary graphics library provided …

Software Development c++
Member Avatar for hawkoftheeye
0
133
Member Avatar for bluem1

Team - Could someone please tell me I haven't lost my mind? I have done relationships in the past but now they don't seem to work. Have I gone dumb? Creating a winform, using VS2008, sqlexpress & vb.net. My dataset looks like this: -------------------------------------------- Table 1 - BranchInformation BranchID - …

Software Development sql vb.net visual-studio
Member Avatar for bluem1
0
165
Member Avatar for jlego

wondering if there is a way to shorten up this IF statement i have going on.. [code] If my.settings.id <> 1.001 or my.settings.id <> 2.001 or my.settings.id <> 3.001 then do it like this end if [/code] what im looking for is a shorter way, i have tried [code] if …

Software Development vb.net
Member Avatar for jlego
0
98
Member Avatar for qk00002

Where I can download VB6.0 english version? Need one now but couldn't find on the web. help~please~~~~

Software Development visual-basic
Member Avatar for WaltP
1
342
Member Avatar for rena0514

I get this when i click on the done button in my program: [CODE]Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at BillPanel.getTotalPrice(BillPanel.java:49) at BillPanel$ButtonListener.actionPerformed(BillPanel.java:62) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6038) at javax.swing.JComponent.processMouseEvent(JComponent.java:3265) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) …

Software Development java java-swing
Member Avatar for rena0514
0
194
Member Avatar for rgpii

Here is my current situation. I have a global array and it is originally declared as an int pointer. I malloc (100*sizeof(int)) to this pointer in the main method. I then use this array to store values and these values are assigned inside of two for loops. The problem is …

Software Development c
Member Avatar for WaltP
0
1K
Member Avatar for Sailor_Jerry

I have a dataGridView with 4 columns. 3 of the columns i want to use a combobox. In the datagridview properties from the design view i already set the columns to DataGridViewComboBoxColumns. how do i from the code set the columns values from a dataset? I can get the data …

Software Development dataset vb.net
Member Avatar for Sailor_Jerry
0
2K
Member Avatar for tipdeep

Hi, I need a C# code to retrieve the URL address from a web page like [URL="http://www.protect-url.com/?u=p0xjz178380czht6"]http://www.protect-url.com/?u=p0xjz178380czht6[/URL] It seems the link is here [URL="http://www.protect-url.com/go.php?l=p0xjz178380czht6"]http://www.protect-url.com/go.php?l=p0xjz178380czht6[/URL] and we need to call url.php Can you help me please?

Software Development
Member Avatar for tipdeep
0
119
Member Avatar for Kruptein

I have found a module pycrypto which has an AES encryption and decryption function, in commandline everything works fine both encryption and decryption, but if I want to implement it in my program, it fails =( [code=python]def aes(txt): global crypt message="".join(txt) #format the message which has to be encrypted/decrypted to …

Software Development encryption python
Member Avatar for jcao219
0
231
Member Avatar for top123

hi...i am worjig on project to display numbers entered by user..and display it in random order....i use devcpp.. and here is the code..it does compile but is not working properly..can anyone help me plz as quickly as possible..this is due within 4 days... [CODE]#include<iostream> using namespace std; int main(){ int …

Software Development c++
Member Avatar for top123
0
120
Member Avatar for Sunny89

Write a Java program that will generate random four letter words. The words must consist of only lower case letters. The program will prompt the user to enter the number of words to generate. The program should request that the user enter a number between 1 and 500 and ensure …

Software Development java
Member Avatar for peter_budo
0
814
Member Avatar for leppapuu

Hi! I have a program with two QSpinBoxes with integers in them. When user clicks one spinbox it should affect to the other one. And vice versa. I can't use valueChanged() signal because it causes an endless loop that won't stop until the maximum values of the boxes have been …

Software Development python
Member Avatar for leaffan
0
1K
Member Avatar for JohnnyT

Hi all, I'm just learning C# and completed a book exercise. They had a different answer and I'm not sure the difference between the two. The way I did a method was like this: [CODE]public int ShiftsLeft { return shiftsToWork - shiftsWorked; }[/CODE] However, when I looked at the book …

Software Development
Member Avatar for JohnnyT
0
132
Member Avatar for newbiecoder

I want my code to take two characters and print them, but this code only takes one character, prints it and terminates, can you please tell me what's wrong with it? Thank you. [code=syntax] #include <stdio.h> int main() { char a, b; scanf("%c", &a); scanf("%c", &b); printf("%c %c\n", a,b); return …

Software Development c
Member Avatar for newbiecoder
0
257
Member Avatar for bunnyboy

So today at school I was given a task to create an application to apply convolution over image. I decided to load convolution cores from xml file. But, as this was the first time me working with xml I have no knowledge how to effective parse it. So here is …

Software Development xml
Member Avatar for bunnyboy
1
105
Member Avatar for PierlucSS

Is it possible to somehow compare a value to a range of value without using for/foreach. [CODE]IEnumerable<XElement> results = xdoc.Descendants( "PAGE" ).Where( p => p.Attribute( "id" ).Value == RANGE_OF_ID).Select(result => result);[/CODE] Is there anyway of doing what I wrote below? RANGE_OF_ID could be a collection.

Software Development
Member Avatar for PierlucSS
1
142
Member Avatar for alvalany

hi friends, From many days I wanted to create some application in Windows. Now which IDE would be better (I am also a bit confused with the term IDE ) Turbo c or Borland C++ bulder or Visual c Whatz the difference between these things?? Please someone clear my confusion. …

Software Development c++ ide
Member Avatar for Ancient Dragon
0
971
Member Avatar for bornwith

I am trying to teach myself C#. I was working on an example when I came across something of interest (to me anyway), and none of my resource material explains why this happens. Can some one explain why this happens. The code below works as it should [CODE] //calc test …

Software Development
Member Avatar for apegram
0
127
Member Avatar for thebluestar

Account.java [CODE=java] package btclass; import java.util.Scanner; public class Account { private float amount;//actual amount private static float balance;//balance amout Scanner keyboard = new Scanner(System.in); public void deposit() { System.out.println("Enter the amount you want to deposit: "); float depos = keyboard.nextFloat(); if (depos < 0) { System.out.println("Amount you entered is < …

Software Development java
Member Avatar for javaAddict
0
158
Member Avatar for lagspike

I have a program which connects to a remote MySQL Server. When i try running the program on other PCs (ones with nothing more than the .NET Framework) I tried using ODBC, which would run the program, but not be able to connect to the database because of the lack …

Software Development mysql
Member Avatar for lagspike
0
222
Member Avatar for pythonNerd159

hey all. i need some help with my calculator and i was wondering if anyone knew how to make it so if you click on a button it would pop up the value of that button in the entry screen. [CODE]## -*- coding: utf-8 -*- ## SDD, Major Project, Extreme …

Software Development python tkinter
Member Avatar for Alq Veers
-1
292
Member Avatar for akssps011

The following code when compiled gives the error: "i[B]nvalid conversion from `void*' to `f*' "[/B] What is wrong with it ? [CODE] typedef struct a { int* value; struct a* p; int r; }f; f* m(int* value) { f* node = malloc(sizeof(f)); node->value = value; node->p = NULL; node->r = …

Software Development c
Member Avatar for akssps011
0
113
Member Avatar for sirko

Hi! Does anybody know how to write a Pascal app that would remove blank lines from a text file. function RemoveBlankLines(OldFile: string): string; var fi,fo: Text; s,NewFile: string; n: integer; begin result:=EmptyStr; if FileExists(OldFile) then begin //rename old file .bak, n:=Length(OldFile); while (n>1) and (OldFile[n]<>'.') do Dec(n); n:=Length(OldFile)-n; NewFile:=Copy(OldFile,1,Length(OldFile)-n)+'bak'; RenameFile(OldFile,NewFile); …

Software Development pascal
Member Avatar for FlamingClaw
0
266
Member Avatar for ubi_ct83

i have this code: [code] int main(int argc, char* argv[]) { remove(debug_file); count=0;//count d number of seeding for (int i = 1; i < argc; i++) { /* Check for a switch (leading "-") */ if (argv[i][0] == '-') { /* Use the next character to decide what to do. …

Software Development c
Member Avatar for ubi_ct83
0
121
Member Avatar for student02

Hi guys.. Im still working on my project, it is a payment and enrollment system. Ive been thinking what to do with the Student ID since it requires a format like xx-xxxx, its possible that ill make two fields right? i mean the first xx on xx-xxxx to make it …

Software Development visual-basic
Member Avatar for cid777
0
294
Member Avatar for dondajr

Hi guys o/ ! I'm trying to make a program that write in text file some datas. Then, i wrote a header that have all functions I need to write in this file. thas is my header: [CODE] #ifndef _SNAPSHOT_H #define _SNAPSHOT_H #define LAST_PRICE 0; #define BEST_ASK 1; #define BEST_BID …

Software Development bsd c open-source
Member Avatar for jephthah
0
152
Member Avatar for SoulMazer

Hi, so I've been programming with Python (2.x) for a while now, and I was wondering about what people thought of 3.x. From just a few quick searches, some people recommend that people get used to it quickly as it is the future, and others say to just stay with …

Software Development python
Member Avatar for SoulMazer
0
159
Member Avatar for smeghead007

My problem is that when i run the program i ask the user to select a month from a menu then input a year. I then calulate the first day and janaury for that year. Then i have to find the first day of the month the user selected but …

Software Development c++ ios
Member Avatar for smeghead007
0
142
Member Avatar for sjn21682

hi everyone, im having a hard time with my loop, what i want to do is to print f1, f2, f2,f2... till it finishes to read, then f1, f2, f2... , whats happening to my output is f1,f2, f2..., then f1, f1 till end, i want to ask, how will …

Software Development
Member Avatar for kvprajapati
0
212
Member Avatar for Encrypted

I'm trying to write a program for class and I can't get my fractional exponent to work. I've tried using 2/3 2.0/3.0 and I've tried entering 2/3 into a separate variable, but nothing seems to work. I don't get any errors while building 2/3 but the logic does not come …

Software Development c
Member Avatar for MosaicFuneral
0
392

The End.