132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Y DIY

I have a question about fnmatch function. Can fnmatch take a list return from a function for the pattern? Consider the following code. [CODE] import os import sys import time import fnmatch import shutil from logalert import log def copyLiveToPrompt(): #This function will copy all of the appropriate Voice Prompt …

Software Development python
Member Avatar for Y DIY
0
71
Member Avatar for Alkis90

So my program task is to load a text file that contains for example: black | white And then i open one another text that contain a lot of words, and if for example it will find the word [B]black[/B], it will replace it with [B]white[/B]. This code below do …

Software Development
Member Avatar for Alkis90
0
261
Member Avatar for ath1019

can you pls give me a link to where i can download a free turbo c?

Software Development c
Member Avatar for Ancient Dragon
0
90
Member Avatar for vijaykavin10

In applet we are using init() method so inside of the init() method can we use the actionPerformed method or can't?.If we couldn't which place can be implements that action performend method. Also you just give me the syntax for creating the actionperformed method in applet.And that applet must have …

Software Development java
Member Avatar for mKorbel
0
149
Member Avatar for Nathan_11

I have this code that would randomize the number inputs but should not include 0 and 50 and above digits... how should i do it? Thanks [CODE]import java.util.*; public class RndomA { public static void main(String[]args){ int[]A=new int [10]; Scanner in=new Scanner(System.in); System.out.println("Numbers to be randomize:"); for(int a=0;a<A.length;a++){ Random r=new …

Software Development java
Member Avatar for stultuske
0
142
Member Avatar for Onlineshade

I wish to make a project on Messenger using Java. But is [B]Java Socket programming[/B] necessary for it?

Software Development java socket-programming
Member Avatar for stultuske
0
82
Member Avatar for solarmotion

I had encounter a problem in my task. How come the output always return false? [CODE] public class Entity { private String itemCode; private String title; private String description; private int language; private int time; private String productCompany; private int status; public Entity(){ itemCode="E250"; title="The Lookout"; description="by Scott Frank"; language=1; …

Software Development java
Member Avatar for solarmotion
0
116
Member Avatar for nuclear

Trying to do some basic "Game of life", but for some reason i'm getting some weird results, the code: [CODE]#include "stdafx.h" #include "stdlib.h" #include <iostream> using namespace std; #include "windows.h" const int V=30;//Vertical const int H=40;//Horizontal char A[V][H]; int ne=0; //Set all to dead void setDead() { for (int i=0;i<V;++i) …

Software Development c++ gaming
Member Avatar for nuclear
0
704
Member Avatar for niño_morata

code: Dim N As String N = InputBox(Combo1 & " search") adodc1.recordset.find Combo1.List(Combo1.ListIndex " ' = ' " & N & " ' ") if adodc1.Recordset.EOF then msgbox "No File Records" end if

Software Development vb.net
Member Avatar for jeffrey blanz
0
105
Member Avatar for KyleSmith10

I'm sorry as this coding language is not in C++, but it is very simlar to it. I basically trying to learn how it works if I have an example of this: [CODE]new NodeArray[] { {0,0,0,0}, {1,1,1,1}, {2,2,2,2}, {3,3,3,3} }[/CODE] I want an example of it working on how to …

Software Development algorithm c++
Member Avatar for KyleSmith10
0
249
Member Avatar for crazybeaner

I'm creating an odometer program. "The problem to solve is define a class Odometer that will be used to track fueland mileage for an automobile. The class should have member variables to track the miles driven and the fuel efficiency of the vehicle in miles per gallon. Include a mutator …

Software Development java
Member Avatar for javaAddict
0
397
Member Avatar for nssltd

Okay hi, Firstly i have a border less which i need as i have my own custom 'skin' which looks like this and is found here.[URL="http://i51.tinypic.com/2i77o94.png"]http://i51.tinypic.com/2i77o94.png[/URL] As you can see it has no drop shadow at all. What i want to achieve is for it to have a drop shadow …

Software Development c c# c++
Member Avatar for Mitja Bonca
0
5K
Member Avatar for guidely

Hi I dont know why when I run in xcode it give me exec bad access but when I run using terminal it work fine Here is mt code [CODE] // // main.c // Harbour Unload System // // Created by Guide on 15/10/11. // Copyright 2011 __MyCompanyName__. All rights …

Software Development c
Member Avatar for guidely
0
170
Member Avatar for moroccanplaya

does anyone know where to start on this i want to make a command line c program which hides messages in images and audio files is there any books i can read to get this started

Software Development audio c
Member Avatar for WaltP
0
117
Member Avatar for Bartim

Hi, I need to write a program (on emu8086), which would convert hexadecimal number into decimal number. I have to do it until tomorrow, but I don't know where to start. Please, someone, help me to write that program. :'(:

Software Development assembly
Member Avatar for NotNull
0
2K
Member Avatar for stillfly122

Hi guys. so i wanna code my own Simple Dos-like OS that boots to a prompt with the simple command of "Hello" which should load a message that says "Hello, World!". Would someone be generous enough to give me some source code that just boots and has the command "Hello". …

Software Development assembly operating-system
Member Avatar for NotNull
0
457
Member Avatar for chellemits

Hello! I would like to ask if you guys know how to convert 1 to 00001? For example, I have an item in my database with an ID of 00001. When I add another item again, it must increment already to 00002. But when I try adding one, the next …

Software Development vb.net
Member Avatar for Teme64
0
241
Member Avatar for sachintha81

Let me first describe my situation. I have a list of Hex values, which are called BaseID. They are chosen [B]such that logical OR between any number of them will give you a unique ID[/B] which is called FinalID. That is, my BaseID values are as follows. BaseID = { …

Software Development
Member Avatar for sachintha81
0
199
Member Avatar for newbie14

Dear All, I have a snippet of code as below. Here I build one db connection and is shared across. I can put the dbconn.commit in place and no problem. The problem when I put the dbconn.rollback I get this sort of error "commServer.java:1798: unreported exception java.sql.SQLException; must be caught …

Software Development java
Member Avatar for newbie14
0
249
Member Avatar for Acidburn

hey guys I'm trying to get hold of a StreamConnection [code] try { StreamConnection conn = ( StreamConnection ) Connector.open ( url ) ; } catch (Exception ex) { ex.printStackTrace(); } [/code] however when i do this i get the following error [quote] java.lang.ClassCastException [/quote] According to my know of …

Software Development java
Member Avatar for Bens
0
165
Member Avatar for QQnoobie

I am trying to write a function that will compute GPA. [CODE]#include "Student.h" #include "ClassInformation.h" Student* setupStudent(){ string f,l,idNo; double gPoint=0; Student *studPtr1; studPtr1 = new Student (); cout<<"Enter first name "; cin>>f; studPtr1->setfirstName(f); cout<<"Enter last name "; cin>>l; studPtr1->setlastName(l); cout<<"Enter A number"; cin>>idNo; studPtr1->setaNumber(idNo); cout<<endl; studPtr1->setGPA(gPoint); return studPtr1; } …

Software Development c++
Member Avatar for QQnoobie
0
271
Member Avatar for guidely

Hi, I get a output result: Segmentation fault: 11 when I tried to do quick sort a time in ship structure Here is my code [CODE] #include <stdio.h> struct harbour { int harbourId; int maxCap; int timeUpload; double amount; }; struct ship { int number; int shipId; int sMaxCap; int …

Software Development c data-structure
Member Avatar for guidely
0
4K
Member Avatar for Labdabeta

Is it possible to put a gap in a class definition? IE: [CODE]class a; class b { private: a test; public: a getA(){return test;} }; class a { private: int i; public: a(int i):i(i){} a operator+(int o)const{return a(i+o);} }; class b continued?//what? how? { void outputA(){cout<<a;} };[/CODE] This is just …

Software Development c++ oop
Member Avatar for Labdabeta
0
184
Member Avatar for Chuckleluck

I'm having trouble using the CreateFile() and WriteFile() functions. Here's the code I've written: [CODE]#include <windows.h> #include <iostream> using namespace std; int main() { char cData[6]; DWORD dwBytesWritten; cout << "Please enter a number: "; cin >> cData[1]; for(int i = 2; i < 5; i++) { cout << "\nPlease …

Software Development c++
Member Avatar for Chuckleluck
0
208
Member Avatar for soccermiles

I would like to embed the python interpreter, but not in the way most other people do. I don't need to multi-thread unless it's necessary to do as follows... What I need is control over when execution happens. More specifically, I would like to use a python script to call …

Software Development api c++ python
Member Avatar for soccermiles
0
270
Member Avatar for radiumc

Hello, I am very new to python. I have two files containing multiple lines of files name, and I need to filter out if file name present on file1 than remove it from file2 and save the file2 difference into a third file. i.e. file1: /users/ux454500/radpres.tar /paci/ucb/ux453039/source/amr.12.20.2002.tar~ /paci/ucb/ux453039/source/amr.1.25.2003.htar.idx /paci/ucb/ux453039/source/amr.1.18.2003.htar.idx file2: …

Software Development file-system python
Member Avatar for radiumc
0
146
Member Avatar for lbgladson

I have a program to add coins into a piggy bank and calculate the total but my program is not asking how many of each coin and will not give me the total. [code] import java.util.Scanner; public class PiggyBankTester { public static void main(String[] args) { int pennies; int nickels; …

Software Development java
Member Avatar for sirlink99
0
1K
Member Avatar for lbgladson

I have an assignment to gather information on students and their grades and then display the information using a for loop. I have the following code but it is not displaying the information correctly. Any help would be great. [code] public class Grader { String last; String assign; int score; …

Software Development display java
Member Avatar for Slimmy
0
155
Member Avatar for buba_kazouba

[CODE]package amena; import java.awt.Color; /** * FileSystemModel is a TreeTableModel representing a hierarchical file * system. Nodes in the FileSystemModel are FileNodes which, when they * are directory nodes, cache their children to avoid repeatedly querying * the real file system. */ public class FileSystemModel extends AbstractTreeTableModel implements TreeTableModel { …

Software Development caching java
Member Avatar for Slimmy
0
229
Member Avatar for lbgladson

I have an assignment an I have been looking at it for a while now but really have no idea what I should be doing. I have included the code I have written but is will only print out He and not the entire phrase. Write a program that reads …

Software Development java
Member Avatar for lbgladson
0
358
Member Avatar for mikecolistro

HI there! So ive been looking around on how to reset the function clock() and the examples ive found have not worked, basically in my code i have to loops, the first i want to run for 15 mins then the inner loop run for one, so i assigned a …

Software Development c++ queue
Member Avatar for nezachem
0
306
Member Avatar for kurohige

[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class controlBall extends JFrame { private JButton jbtRight = new JButton("Right"); private JButton jbtLeft = new JButton("Left"); private BallCanvas canvas = new BallCanvas(); public controlBall(){ JPanel panel = new JPanel();//use the panel to group buttons panel.add(jbtLeft); panel.add(jbtRight); this.add(canvas, BorderLayout.CENTER);//add canvas to the center …

Software Development java java-swing
Member Avatar for kurohige
0
2K
Member Avatar for techlawsam

So I have a placeholder question in the code that i am reviewing [CODE] { Console.Clear(); Console.WriteLine("{0,24}", "Calories Burned"); Console.WriteLine("\n{0,15}:{1,8:f1} hours", "Hours", hours); Console.WriteLine("{0,15}:{1,8:f1} minutes", "Minutes", minutes); Console.WriteLine("{0,6}:{1,8:f1} calories burned", "Calories Burned", CaloriesBurned); Console.ReadKey(); }[/CODE] I know the first half of the following code "{0,15}" , 0 is placeholder and …

Software Development
Member Avatar for Mitja Bonca
0
133
Member Avatar for nerden

Hi, I am building a VB.NET app which amond other things, deploys a scheduled task to run test.bat when A Windows Server 2008 Backup is cancled. I have the app all working which runs a command which, when works, will be the event creation command. I figured out how it …

Software Development asp.net vb.net visual-basic
0
172
Member Avatar for peste19

i am beginning to learn python so please be easy on me, i am trying to create a function that will accept user input and store it in a list, separating words and ignoring punctuation example: input = i.am/lost stores in list as "[i],[am][lost]" this is what i got so …

Software Development python
Member Avatar for TrustyTony
0
179
Member Avatar for niall.lennon2

[CODE]class Date { private int day, month, year; // the date Date(int d, int m, int y){ day = d; month = m; year = y; } Date(){ }; void get() { day = Console.readInt(); month = Console.readInt(); year = Console.readInt(); } void put(){ System.out.println(day + "/" + month + …

Software Development java
Member Avatar for Ezzaral
0
169
Member Avatar for pythondaniweb

Say I have a string of arbitrary letters and spaces. "fdgdfg asd fasdf asdf awpoemp poanew awe pon pqonw aknlkn ar glknlk and so on" is there any way to wrap this WITHOUT using the worp wrap feature so that there are only x characters in each line? "fdgdfg asd …

Software Development python
Member Avatar for woooee
0
115
Member Avatar for ckwolfe

I am trying to read in a command-line argument like: >a.out memtest -b 4 -s 1000 And the intended result is to store "4" in the variable represented by -b and store "1000" in the variable represented by -s. I have the following code: [CODE]int main (int argc, char **argv){ …

Software Development c
Member Avatar for ckwolfe
0
302
Member Avatar for loserspearl

I have two programs here I cannot seem to get any return value and I have no idea why, everything I'm doing is just like my book says and I cannot get it working. The parts commented out are the other ways I was trying to make this work, somethings …

Software Development c
Member Avatar for loserspearl
0
109
Member Avatar for jonjacob_33_0

Write and test a function to meet this specification: squareEach(nums) nums is a LIST of numbers. Modifies the list by squaring each entry. [CODE]def squareEach(nums): for number in nums: number = number ** 2 return number def main(): nums = [3,4] print(squareEach(nums)) main()[/CODE] The output in this case is 9... …

Software Development python
Member Avatar for TrustyTony
0
2K
Member Avatar for Mr. Magoolachub

Hi, beginner in vb here, I'm trying to write a game of blackjack in vb.net, and I'm currently trying to set up a subroutine that will check to see if a card matches another card already dealt, and if so deal a different card (to avoid dealing the same card …

Software Development vb.net visual-studio
Member Avatar for swatee.katiyar
0
554
Member Avatar for gyno

[CODE]public class Employee{ public String fNa; public String lNa; public String Title; public int ID; void doEmpThings() } public class Director extends Employee{ void doDrictorThings() } public class UseEmployee{ public static void main(String []args) {codes} } public class UseDir{ public static void main(String []args) {codes } } [/CODE] Now what …

Software Development java
Member Avatar for gyno
0
110
Member Avatar for Dmennite

Using: MS Access 2010 Visual Studio 2010 with Provider=Microsoft.ACE.OLEDB.12.0 Connection I have 2 forms: frmCustomers contains datagridview that launches frmEdit used to edit record. The issue I am having is my save button on frmEdit saves changes to the datagridview on frmCustomers but not to the database frmCustomers: [CODE]Public Class …

Software Development microsoft-access vb.net visual-studio
Member Avatar for Dmennite
0
140
Member Avatar for swissknife007

[CODE]#define max 50 struct code{int bits[max];int start;};typedef struct code code; struct node{int freq;int father;int isleft;};typedef struct node node; void insert(int,int); int del(int); main() { code cd,code1[max]; node node1[max*2-1]; int i,k,n,p,p1,p2,root,rootnodes; char symb,alph[max]; for(i=0;i<max;i++) alph[i]=' '; rootnodes=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s""%d",&symb,&node1[i].freq); insert(rootnodes,i); alph[i]=symb; } for(p=n;p<2*n-1;n++) { p1=del(rootnodes); p2=del(rootnodes); node1[p1].father=p; node1[p1].isleft=1; node1[p2].father=p; …

Software Development c linked-list queue
Member Avatar for vedro-compota
0
135
Member Avatar for nick100555

I have the following CashRegister class where i must implement 3 methods: -getSalesTotal total up sales for the day -getSalesCount total number of sales for the day - rest a reset method that returns all instance variables to 0 Here is my code any help on mistakes i may have …

Software Development java
Member Avatar for Syrne
0
331
Member Avatar for ashishtrivedi

A console application to multiply two matrix of float numbers and print result on console. Some memory checks are done as it is allocating memory dynamicaly. May give error and exit when short of memory.

Software Development c matrix-multiplication
Member Avatar for aravindanne
0
222
Member Avatar for stereomatching

compiler : visual c++ 2010 os : windows 7 64bits learning template and encounter some problem [code] template<typename T> void easyCopyImpl(T const &A, typename boost::enable_if_c< boost::is_array<T>::value>::type *temp = 0) { std::cout<<"this is array"<<std::endl; std::cout<<typeid(T).name()<<std::endl; std::copy(A, A + sizeof_array(A), typename std::ostream_iterator<T>(std::cout, "") ); } template<typename T> void easyCopyImpl(T const &A, typename …

Software Development c++
Member Avatar for mike_2000_17
0
169
Member Avatar for vijaykavin10

Can any one explain what is the usage of creating a contentpane in swing...

Software Development java java-swing
Member Avatar for mKorbel
0
132
Member Avatar for valestrom

Hey, I'm looking for an IDE with .NET capabilities, but not visual studio. As I need it to run off a flash drive. Any suggestions?

Software Development asp.net c++ ide
Member Avatar for pseudorandom21
0
169
Member Avatar for r4rozen

[CODE]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; namespace DiceSimulator { public partial class Form1 : Form { StandardDie die1, die2, die3, die4, die5; Random rand; public Form1() { InitializeComponent(); rand = new Random(); } /// <summary> /// This is the Event …

Software Development
Member Avatar for pseudorandom21
0
246

The End.