132,726 Archived Topics
Remove Filter ![]() | |
![]() | i have this code: [ICODE]import webbrowser, random import os import os.path running = 1 DIR="C:/Documents and Settings/Owner/My Documents/georges poopy/main music/" music = filter(lambda x: x.lower().endswith("mp3"),os.listdir(DIR)) music = list(music) choice = int(raw_input("Press 1 to play a new song")) while running == 1: if choice == 1: song = random.choice(music) webbrowser.open(os.path.join(DIR,song)) choice … |
Hello friends,i want a know who to rename the start in windows through the Application developed by VB 6.0.If u know means pls help...... Software Development visual-basic | |
Hi Guys! I would like to create a shell script that checks how many files there are in a directory. If there are more than 20 then delete the ones that are older than 48 hours old. so I have portions for a script, but I can't seem to make … Software Development shell-scripting | |
Hi again people. I am stuck on this array that converts lower case letters to upper case letters. I need to find out how to make it not display strange characters after the letters are entered. I know it has something to do with the 'null' terminator, but I am … Software Development c++ | |
Hi, I'm in first year computer science and could use some help on a program where I have to calculate the standard deviation from data on a txt file. Using some online help I've gotten somewhere but to be honest don't really know what's going on myself. The program is … Software Development data-science python | |
Compared to javascript's power, i think xslt is so weak. i prefer parsing xml document to whatever html representation using javascript and i cant see any use of using xslt for that matter. What do you think? Software Development java javascript xml | |
Hello, I'm currently taking a programming class in college for my first time and I am having a hard time with my assignment for the week. I have to write a program that I create a class called Student. It will then have two members within the private sector called … Software Development c++ | |
Hi .. anyone can help me out to solve this problem... coding to read the file... 1. this coding is well working... can list down all the data in dataM.txt [CODE]ifstream OpenFile("D:\\dataM.txt"); int a; if(!OpenFile) { cout << "While opening a file an error is encountered" << endl; } else … | |
[ICODE]import java.util.Scanner; public class lab3 { public static void main(String[]args) { int floor; int rooms; int occupied; int totalRooms; int totalOccupied; int totalVacant; double occupancyRate; Scanner keyboard=new Scanner(System.in); System.out.println("Please enter the number of floors in the hotel: "); floor=keyboard.nextInt(); while(floor<1) { System.out.println("The number of floors cannot less than 1, please … Software Development java | |
Can any one please help me?? Using VB 6.0 and Access DB. [code] ssql2 = "INSERT INTO JanuaryDay (JanRm_id) SELECT rmd_id FROM RmIdIndex WHERE rm_id= " & CLng(txtrostermid.Text) rsName.Open ssql2, conName, adOpenDynamic, adLockOptimistic rsmnth.Open "select * from JanuaryDay", conName, adOpenDynamic, adLockOptimistic rsmnth.MoveFirst Do While Not rsmnth.EOF ‘here is the problem. … Software Development visual-basic | |
hi all, when i run this code (quick sort), i ll get ascending order as output... now i want descending order instead... anybody know how to altert this code..uhuhuh [CODE]void QuickSorting::sort(int a[], int lo, int up) { { int i, j, pivot; while ( up>lo ) { i = lo; … Software Development c++ | |
[CODE]int write() { system("cls"); char text[2000]; char thing[100]; cout << "which file would you like to write to?"; cin.getline (thing, 100); cout << "what would you like to write? (up to two thousand characters)"; cin.getline (text, 20000); ofstream file; file.open(thing); file<<text; file.close(); system("pause"); return haha(); }[/CODE] ok so I'm writing … Software Development c++ | |
Hey guys, I want to make a program copy output from a Command Prompt window, any idea how I can accomplish this? In my program I want to have a console type menu so the user can watch what is going on. Thanks PO Software Development java | |
[B]Hi all I have a simple problem in Drawing with GDI I made a button control and wote this code lines in its event handler[ICODE] Graphics d = Form1.ActiveForm.CreateGraphics(); if (openFileDialog1.ShowDialog() == DialogResult.OK) { try { d.DrawImage(Bitmap.FromFile(openFileDialog1.FileName), new Point(0, 0)); } catch { MessageBox.Show("Sorry there is an error"); } } … Software Development | |
We have a Visual Basic script that communicates with an application through com. We like to translate it to Python and use win32com.client instead. We have everything working, except for the use of "Nothing" in the VB script for a couple of its function calls. What is the replacement of … Software Development python visual-basic | |
Hi Guys, I am trying to get a program I made to auto-start on my computer, but I don't wanna use the "startup" folder. How do these other programs automatically start? I went to my "msconfig" and then to the startup tab and found references to "HKLM\SOFTWARE\Microsoft\Windows\CurrentVer..." and I looked … Software Development java microsoft-windows | |
Sir , plz tell me how to display current date in report viewer in vb.net Software Development vb.net | |
[CODE]#include <iostream> using namespace std; #include <iomanip> #include <cstdlib> enum RequestType { ZERO_BALANCE = 1 , CREDIT_BALANCE, DEBIT_BALANCE,END} int getRequest(); bool shouldDisplay ( int, double); void outputLine ( int, const char*const, double); int main () { ifstream inClientFile( "clients.txt", ios::in); if ( !inClientFile) { cerr << " File could not … | |
I am looking for a good example of the tarfile module, writing to and reading from an archive. Particularly the highly compressed filename.tar.bz2 format. Software Development python | |
hi all. in a recent project i created a linked list to store a students course data...such as course ID, year taken, semester taken, and final grade. This program worked without any problems. now, my next project is to create a stack to store the data, instead of a linked … Software Development c++ linked-list | |
[code] hello..i have OrderForms.cs..it has 2 datagridviews...when i click a product in orderDataGridView then click Add to Cart, it will display the product_id, description, quantity, unitprice, and total on the cartDataGridView..when i change the quantity, the total will change (quantity * unitprice).....then it should show the total bills on the … Software Development | |
is there a way to pass in numbers(int) like this? somename([0,0],[2,4],3); thanks for any help Software Development | |
hi can anybody please expalin me that can i access the array(arr) which is declared as a private member of the class(array) by using public function (display). The code is given here... [CODE=c++]#include<iostream.h> const int size= 8; class array { int arr[size]; int i; public: array(); void display(int arr[size]); }; … Software Development c++ | |
Hi Friend's.. M new to c#.net can anyone say How to Count number of liens and Characters in a Tiff image .... T ks in Adv... G.Sam... Software Development image | |
Hi, How to add image to Jwindow. Here is my code: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; import java.io.*; class Project4 extends JWindow { Container container; JTextField jt; JButton jb; public Project4(String st, final Image image) { container = getContentPane(); container.setLayout(new BorderLayout()); //JTextArea jtp = new JTextArea(st,10,10); //container.add(sp); … Software Development image java java-swing | |
Hi everyone, I have the following : [CODE=csharp]using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { double d = Convert.ToDouble("23.4"); } } }[/CODE] When I run this with Visual C# 2008 Express in the debugger I get the value 234 for d instead of the expected … Software Development | |
hi everyone, i just want to ask if it is possible for the SQL INSERT INTO to LOOP? for example, insert new records in TABLE ten times with the same values (colum1,column2,column3,etc..) is there an alternative way instead of typing (INSERT INTO.. 10x) statement repeatedly. thanks. Software Development sql visual-basic | |
[CODE]#include <iostream> using namespace std; #include <string> class Engine { int power; public: Engine() {power=0;}; Engine (int pIn) { power = pIn;}; void show (); float getPower () {return power;}; }; void Engine::show() { cout << " This is an engine have a power of " << power << " … Software Development c++ ![]() | |
Hello I want to write a program in c++ to convert certain rows which i can choose from a table in excel to .csv. Anyone done anything similar? I am not sure how to do this, still thinking, any suggestions. Software Development c++ | |
Hi, Could you tell me please how can I open a connection to an access database located on a shared folder? Thanks in advance, Software Development | |
// days in a given month.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char month,january,feburary,march,april,may,june,july,august,september,october,novemb er,december; cout<< "\nEnter january,feburary,march,april,may,june,july,august,september,october,november,dec ember : "; cin>>month; switch(month) { case january: cout<< "31\n"; break; case feburary: cout<< "28\n"; … Software Development c++ | |
![]() | hello. i have a problem running my very first applet (im just converting my previous application to applet). i tried to follow the instructions i found in the manuals, both the one given by my prof and the ones i found in the web, but unfortunately my program wont work. … Software Development gui java java-swing web-browser ![]() |
Hello, I need to write a program that holds a multiple product inventory. Using an array to store the items. The output should display the product info, one at a time. In addition, I have to include the Total Value of the entire inventory. My only problem is, the total … Software Development java | |
i have this program generating 3 numbers and i don't know how to take those 3 numbers (i.e. 777) and applying that to a switch/case like... [code=c++] switch(landing) { case 'a'://777 //calculation will go here break; case 'b'://666 //calculation will go here break; ///and so on and so on! } … Software Development c++ | |
Hi all, I would have a question. I know that I should (or must) respect the encapsulation rule (as one of the main three Java features) but what about if I have some "Data Structure"? I mean something like "struct" in C/C++. So if my class contains only data (not … Software Development data-structure java | |
Heya, I'm trying to slim down some code by using a for loop, but the only way I can do it is by building a variable string to put in the format bit. [CODE=C++]for (n=0; n<13; n++) { strTmp.Format("%ld", pFrame->m_pAppWnd->state.Variable); strBuf.Replace(saveloadtypes[n], strTmp); }[/CODE] pFrame->m_pAppWnd->state.Variable fetches strings from another .cpp file. … Software Development c++ | |
Hi, [B] I am trying to write a simple java application that detects motion. The application gets its images from a webcam with the address:[/B] [url]http://studiocam1.disp.duke.edu/jpg/image.jpg[/url] (you can watch the live video feed at: [url]http://studiocam1.disp.duke.edu/view/index.shtml[/url]) [B]My current plan is: (I have little experience, so it may be wrong)[/B] 1. I … | |
Hi I want to get data from Access instead of notepad. Here are the codes to get data from notepad by entering IC number (equivalent to ID number). The records are stored in 'Folder'. public void btnGo_Click_1(object sender, System.EventArgs e)// -->User can select the file by entering the IC Nunber … Software Development display | |
Hi! I made a visual c++ application. My problem is how do I run the program in the console. And the program should read the data from sample.txt file | |
Hi, I was hoping that someone could give me some direction with how to solve this probem. The only info in this problem is word has N digits[only digits] and each digit in the word is in increasing order example 1469 or 362 I have to verify if the number … Software Development c++ | |
I have tried getting my Perl 5.8.9 installation configured for Mysql. I have used cpan and PPM to get mysqlPP, DBD::mysql-simple modules. I am trying this on Windows XP with Mysql 5. Here is my latest error: C:\>perl c:\perl\test.pl DBD::mysql initialisation failed: Can't locate object method "driver" via package "DBD::mysql" … | |
I started a thread last week with a problem that i have since figure out. Now my problem is this. I need to take a file called "gettysburg.txt" and make it so each word is printed on its own line in a new text file called ex1out. When I run … Software Development perl | |
Hello, I have a question (might be pretty easy, but please help!!): on my application's main form I have two buttons: open that opens Form1 and another one that opens Form2. Now, from Form1 I need to open Form2, and from Form2 I need to open back Form1, and go … Software Development pascal | |
hello everone i'm new to c++ language Is This possible to make prg in cpp to overload () Opratore if yes, then can u pls give any logical flow for develope the prg i.e. which kind of opeartion can be performed through () opratore thanx in advance Software Development c++ | |
Dear Members I am having a problem in Java and I am pasting the code and the error message please tell me where is the problem and aslo tell me any directory that can guide me about frequent error messages and their solutions. here is the code. import javax.swing.*; import … Software Development java java-swing | |
Hey all, I have been tasked with figuring out a way to automate a form letter process that currently is done mostly by hand with a lot of copy/paste. We have letters that need to get sent out based on our internal system. Someone now looks up the items in … Software Development | |
So this should be a really easy one, but i've spent a few hours searching and can't find anything that explicitly states how to do this. All i want to do is see the column names for a particular table. I created the tables like: [CODE=python] con = sqlite3.connect( ":memory:" … Software Development python | |
I get the size of the integer array by using sizeof operator but the problem is: + Outside class: It outputs 3 (correct) + Inside class: It outputs 1 (incorrect) So how to fix it? Thanks [CODE]class A { public: A(const int a[]); }; A::A(const int a[]) { cout << … Software Development c++ | |
Python 2.6.1: How would I write a user input validation statement scores < 0 or scores > 100 print error message and ask for input again? Where would I place it, in the below code? [CODE] num_test = raw_input("How many test would you like to average? ") scores = [] … Software Development python | |
I am writing an implementation of a DES encryption with a 64 bit plaintext, taken from the pixel information in a BMP file. So I want to skip the header which is 54 bytes, but I am not sure how to do this. This will not be a dynamic project, … Software Development c++ encryption |
The End.