199,114 Archived Topics
Remove Filter ![]() | |
OK, what's wrong with this? [CODE=C++] int main(int argc, char* argv[1]) { //declare argc and argv to check command-line arguments string arg = argv[1]; //convert char to string if (argc == 2) { //test if arg was entered if (arg == "test") { //test if arg is 'test' printf("you entered … | |
Can someone help with with a script to find broken links in the url column of a sql database and set it as broken in the status column? | |
![]() | Hey guys im having a bit of trouble with bubble sorting an array from a file... Basically what needs to be done is i need to read a text file into a struct array and then copy it into a new file after sorting it by a string field can … ![]() |
Hi folks , I have a created a listview its almost done, the only thing that is missing is search, can you teach me how search in listview god bless folks..... | |
Hi there everyone. I'm new to Python, and i'm programming a game application, using pyOpenGL. The thing is, the program crashes and exits when i push a key (but i don't want (at least for now) help for that), but i wish i could see the error that appears on … | |
Hi, I was wondering if someone could help me, i have nearly complete my site and need some help creating the queries to produce my commission and pipeline. my table structure is: [CODE]CREATE TABLE `pipeline_commission` ( `ProductID` varchar(75) NOT NULL, `Pip_CommID` int(11) NOT NULL auto_increment, `PipComm_UserID` int(11) default NULL, `clients_ClientID` … | |
[COLOR="Red"][I]Hey everyone, I've finally gotten my program to build with no errors or warnings and I can run it but it doesn't give all of the correct output. The Instructor provided my class with what the correct output should be and my program gets it partly right just not all … | |
This is my regex originally from VB. [code]using System.Text.RegularExpressions;[/code] [code] #region "Regex" public object preg_match(System.Object sRegex, System.Object sHaystack) { // Declare some varis MatchCollection Matches = default(MatchCollection); // My Regex to match some text. It is actually a whole <div> block. Regex TheRegex = new Regex("sRegex"); // Get the Source … | |
Hello there! I'm new programming in C++, have been learning it for 2-3 months. Now, this uni assignment is working properly, but I'd like to read your advice on how to improve it. All comments are appreciated. Thanks! [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; const int … | |
ok, so in Java you do "blahblah " + variable + " blahblah" which outputs into "blahblah 23 blahblah" but how do I do this in VB? I wanted to have a label with HPvariable + "/" + MAXHPvariable so it'll display 18/23 etc... | |
The question is simple: I have two scrolled text widgets (I'm using tkinter and python 3.x), and I want to synchronize them, that is I want both scrollbars to move at the same time when the user moves the mouse wheel. Both widgets are suppossed to contain the same text, … | |
Hi, I'm trying to do a hashing project using separate chaining. In order to do the separate chaining I believe I need to make a dynamic array of pointers to the linked lists. This is due to the fact the user can specify the hash table size at runtime. In … | |
Hello guyz !!! I came across this problem and I am still unable to come up with a good algorithm to solve this problem Problem : given, 1<=n<=1000000, and 1<=k<=9 , calculate the first and last k digits of n^n. for example if n=13 and k=4, then result : first … | |
[code] cout << "Introduceti numele: "; // 1 getline(cin, firstname); cin.ignore(); p.setNume(firstname); cout << "Introduceti adresa: "; //2 getline(cin, adr); cin.ignore(); p.setAdresa(adr); cout << "Introduceti CNP: "; //3 cin >> c_n_p; cin.ignore(); p.setCnp(c_n_p); cout << "Introduceti seria si numarul buletinului: "; //4 getline(cin, serie); cin.ignore(); p.setSerienr(serie); cout << "Introduceti valabilitatea … | |
Hi people, I'm trying to match strings from a pattern containing[B] wildcards[/B]. Basically I need to be able to go through a stack of strings, and see which of them matches my pattern. Fx [B]My*.txt[/B] will match only one of these. [U]MyFile.txt[/U] [I]MyFile.php[/I] I'm aiming to end up with a … | |
There is a banner ad at the top of the index page called banner1.jpg. I need help with creating a cycling banner ad using 3 banner ad images (bannerad1.jpg, bannerad2.jpg and bannerad3.jpg). I also need to add a link to bannerad2 that will take the user to [url]www.bigmtn.com[/url] and add … | |
I am attempting to design and implement a horse race game, but I keep getting lost in the while loops and if statement in the horse selection and wager prompt. Would someone please help me get passed this problem? Thanks. [CODE]print ("It's a beautiful day out here folks. A fine … | |
im trying to use c to interface with a zilog microcontroller. the problem is that i cant do much without the library <ez8.h>. ive been searching the web now for any links to download this particular library to no avail. does anyone know where i can get this library? thanks … | |
Hi How can I protect/lock a drive from deleting files and format it ? Is there a way to hook a drive? | |
Hi, I have a very simple question: first of all, my code: [CODE=python] import os def test(): x = "Linux" y = "Windows" if os.name == "posix": print(x) if os.name == "nt": print(y) else: print("there is a problem") [/CODE] Run that code on Linux (don't know about windows) and it'll … | |
Hi, I have a minor quesion today: can somebody tell me how to change basic style options for buttons using ttk. I'd like my buttons and entry fields to have rounded corners. I know this is possible but documentation on ttk (for python) seems to be inexistent on the Web. … | |
I have an mssql database that I need to migrate to mysql. For some reason though any queries to any columns of type datetime are returned in French in the following format: 7/avr/2004 14:00 This also includes all the text of an SQL dump which not surprisingly makes mysql unable … | |
![]() | Hi folks, just a quick form question. Whenever I have used forms in the past I have always sent the data to a seperate page to be analysed, with a 'Back' button (using history.go(-1)) to return to the form to correct any errors. When editing forms (populated from a database) … |
Hello, I am very much new to perl and to this forum also... pls help for this prob... I have 200 two colom data files like, xyz_channel_1.dat .....xyz_channel_200.dat. Coloms of each file is similer like below; First colom 'X' starts from 1 and ends at 200. and second colom 'Y' … | |
[code]package taskvip; import java.util.Random; public class Main { public static void main(String[] args) { int y =0; Random t =new Random (); fun1 e = new fun1(); for ( e.i = t.nextInt(50); e.i < 100; e.i++) { e.A[e.i]= e.k.nextInt(50); y=e.k.nextInt(); } for ( e.i = 0; e.i < 100; e.i++) … | |
I can't determine how to randomly list horses as they cross various parts of the track. Will someone please point me in the write direction? [CODE]if bet > 1: #starts the race, if bet when bet is placed print (""" Here come the horses now, folks. They're being loaded into … | |
Hi, I've tried searching around for other problems similar to mine, and I was unable to find any. I seem to not be able to "color" text in a TextCtrl widget on Windows, but I can on Linux. I have a little screenshot and some code to show this: [URL="http://i189.photobucket.com/albums/z266/Capn_Soul/WinLinuxDifference.jpg"]Screenshot[/URL] … | |
Hi, I'm trying to color some text with wxPython but I am having some trouble. I am using the SetStyle method of the TextCtrl widget. My problem is that the coloring works perfectly on Linux but does not under Windows. My script basically gives a vocabulary test, and if you … | |
[code = c] #include <stdio.h> #include <string.h> int main() { int n = 0x000000FF, i; char *p = (char *)&n; for(i = 0; i < sizeof(int); i++) printf ("value : %d\n", *(int *)(p + i)); return 0; } [/code] I'm expecting something like 255 0 0 0 OR 0 0 … | |
In the following program I have a few questions. [B]results.txt[/B] Johnny 8.65 Juan 9.12 Joseph 8.45 Stacey 7.81 Aideen 8.05 Zack 7.21 Aaron 8.31 [CODE]scores = {} result_f = open("results.txt") for line in result_f: (name, score) = line.split() scores[score] = name result_f.close() print("The toop scores were:") for each_score in sorted(scores.keys(), … | |
[CODE]line = "101;johnny 'wave-boy' Jones;USA;8.32;Fish;21" s = {} (s['id'], s['name'], s['country'], s['average'], s['board'], s['age']) = line.split(";") # above, why is "s" and the end of the key list surrounded by parenthesis? print("ID: " + s['id']) print("Name: " + s['name']) print("Country " + s['country']) print("Average " + s['average']) print("Board type: " … | |
I am currently working on a project that involves the use of data base sources, namely ODBC. The problem is I have designed a form using the Data Source Configuration Wizard that doesn't update. I've ensured that I have a primary key in my data and that the Copy to … | |
Hi, could someone please point me in the right direction for creating an AJAX page that displays "live" data from a mysql database ? I need the page to update its self every time data changes in a mysql table. Thanks, Mark H. | |
Following the thread title, I too am having trouble populating the listbox in my unit converter. I keep getting the error message "Conversion from string " " to type 'Integer' is not valid." when I input an accepted piece of code in VB for displaying the results in the listbox. … | |
I want to make a smarter child program. Smarter Child incase you don't know was an aim bot that was designed for kids. It was extremely abused but it had pretty good AI and comprehension of what your type. I don't really know how on this. I would probably be … | |
[CODE]#include <stdlib.h> #include<iostream> #include<conio.h> typedef struct kume1{ int data; struct kume1 *next; }; typedef kume1 *kume1ptr; void insert(kume1ptr *x,int a); void del(kume1ptr *x); int main(){ int t=1; kume1ptr first1=NULL; kume1ptr first2=NULL; int x; int i; for( i=10;i>=1;i--)//ikisi içinde 20 ÅŸer tane random sayı üretiyoruz { x=rand() % 100 + 1; … | |
in my code [B]Devide [/B]method is not working it gives an error "ExceptionHandling.Program.Devide(int, int)': not all code paths return a value" When i change public int Devide method in to void,the programe is workig , plz explain me what is the wrong with my code, im new to programming , … | |
[CODE]#include<stdio.h> main() { FILE *fp; fp=fopen(*PR1.c","r"); if(fp==NULL) { puts("cannot open"); exit() } }[/CODE] -------------- in this program why they are using *fp and pl reason full program.. and also how fp=fopen(*PR1.c","r"); works | |
I'm implementing my own hashtable class as practice, but I'm having trouble retrieving values from the table that were inserted from a file. When I do so from an array however, the program finds the values without a problem... I've tried modifying my hash function to adapt for any potential … | |
[CODE]struct piece { piece(){} piece(int spacs[][3]) { spaces = spacs; } int spaces[][3]; };[/CODE] /home/myname/Programming/C++/blokus1/game.hpp|11|error: incompatible types in assignment of ‘int (*)[3]’ to ‘int [0][3]' How can this be fixed? | |
Hi , I am developing a windows application in C#.I have a table with questions and answers. When my page loads all the questions in the table will get displayed as link labels,where these linklabels are created dynamically based on the number of questions in the table. I have a … | |
Hey All! I'm working on a project where there is a lot of data input from the user. There are numerous combo boxes to help minimise user input and prevent input errors. One of the combo boxes (ComboType) needs to be populated with all the records from the relevant database … | |
Hy! I have a project and hav to submit it at 13 june. Can somebody help me to add "Search Code" in this code. Its a student class a data abt student. If i want to search student data printed as Name: Father name: Id: and other data like this … | |
I need to be able to check one textbox and another one on keypress. If both textbox characters are over 4 characters then a button will become enabled. So far... I have.... [code] private void txtUser_KeyPress(object sender, KeyPressEventArgs e) { if (txtUser.Text.Length >= 4 && txtUser.Text.Length < 20) { btnLogin.Enabled … | |
Hello guys!i am kinda new to C# and i am just learning....the thing is..i want to make a little app.I made something like a login form with a username and password textbox.i need these textboxes to go into the acces database(which i succesfully added to the project and all it … | |
For my Programming class I have to write a program to get the Date and time from a Daytime protocol server. If you don't know, the format for the Daytime protocol is as follows: [code]JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) *[/code] YR being the last two digits of … | |
[code]import java.io.*; public class BaseTransform { private final BufferedReader buffer=new BufferedReader(new InputStreamReader(System.in)); public BaseTransform(){ try{ System.out.print("Enter any integer: "); int input=Integer.parseInt(this.getInput()); System.out.print("Enter a base[2...16]: "); int base=Integer.parseInt(this.getInput()); String answer=this.transform(input,base); if(answer!=null){ System.out.println(""+input+" at base "+base+" is "+answer+"."); }else{ System.out.println("Error!"); } }catch(Exception e){ e.printStackTrace(); } } public static void main(String args[]){ BaseTransform … | |
Hi, I wonder if anyone has tried to implement PHP with Javascript. I have the code here like this: if($name=='Mary') { echo "<script type=\"text/javascript\">window.alert(\"Hi, Your Name is " . $name . " \")</script>"; } For some reason, I don't get anything on the screen. Could I embed javascript in PHP … | |
Hi There, I currently have a PHP/MySQL query script which displays the top 50 MySQL rows in the table, however, it displays the top 50 of all time. I would love a way for it to display the top 50 rows in the last 7 days. The table looks a … | |
Dear all, As the title says: How can I get the most frequent string (that occurred the most) in an array of strings ? |
The End.