199,114 Archived Topics
Remove Filter ![]() | |
When dealing with big numbers (over 100,000 digits). I find str(myint) too slow. The code below takes my machine 8 seconds. Doing a quick test in java takes 0.186 seconds [code=python] import time #**setup part** i = 0 myint = 1 while i < 100000: i = i + 1 … | |
Thanks in advance... My question is.. I have one text box there user types the date as follows (d-m-yy) 5-4-09 or 15-3-94 how can i convert them into exact (dd-mm-yyyy) 05-04-2009 or 15-03-1994 is there any 'javascript' code to convert the given date into my desired formt... please help me... | |
I recently got into Python and I'm having trouble finding a good IDE for it. I'm on Windows. IDLE works but I'd rather use a different editor with more features. I tried Wing IDE and I can't even find a Run command. Using the command line and typing in the … | |
I can only see about 4 lines of code...not the actual php coding. I can't make small changes to my own files. How can I view my code and why did they do it like that? Shouldn't you be able to view full coding in server files? :( Feeling helpless | |
[B]Hi all, I'm newB in C# and kind of lost now since couldn't find the right/suitable references. Please correct me if I'm wrong...[/B] My application will store values into database once user run it. In the Form Application, it runs well(no doubt). Now with the same approach, i want it … | |
How would I get an IP address? Not the local ip, but the one people would use to connect to say a TCP IP program? :P Thanks | |
I am writing a seprate driver class for my programme, but I need to know how to add two panels to the jframe. Any one help? | |
How would I be able to make my program a critical process? Thanks | |
i have to code a program that ask for the user to enter a positive integer and then I have to find if the value that was enter is divisible by 11 (with no remainder) and display "yes" if it is divisible and "no" if it is not. <<My program … | |
I want to convert string to integer. My string values are something like 0x000,0x0001 and etc(i.e. values are in hexadecimal format). if i used atoi() function then it will take only 0. but i want the entire string. e.g. string abc = "0x0000"; i want... int i = 0x0000; can … | |
[CODE=JAVA] String line = "Extracting from E:\\Junk\\morejunk\\file.txt"; System.out.println(line); //prints: Extracting from E:\Junk\morejunk\file.txt String[] splitPath = line.split("\\"); //exception thrown here String folder = splitPath[splitPath.length-2]; System.out.println(folder); [/CODE] [QUOTE]Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Unexpected internal error near index 1[/QUOTE] My objective is to always print the folder containing the file being extracted (morejunk … | |
![]() | Hiya, I've got a lickle program here which reads data about people into structures and then saves their surnames in a Binary Search Tree. There is more stuff to go to that program, that is why I need structures, but at the moment [B]I can not understand why it doesn't … |
I did some JSP development a few jobs ago (7 years ago) and remember having the toughest time with jsp debugging especially. I used JBuilder back then. I'm getting some jsp stuff going again in this job and was wondering if you could give me opinions on the best tools … | |
I have to hit <Enter> twice after inputting my dollar amount and store selection I think I am just missing something simple somewhere, but am going stupid looking for it. Went to the internet to try and find a good debugger, but have no idea how or where to even … | |
Hi all I am attaching a Text area to my gui program. For some reason, whenever i try to write/put a string that has a length greater than the width of the text area, It changes line automatically, (seems like it's not adding new line chracter to existing string, but … | |
HI all, I am currently expanding my knowledge by dipping into SDL, the only problem is that tiff.dll file is missing, use search of my computer, couldn't find it anywhere. Looked on Google, nothing simple just stupid adverts to download some registry fixer for free (we all know scans but … | |
Hi!!! I want to make a code for diving a number along with that i want that complete division steps should be shown in listbox.You can see the steps in image attached with my thread....... Can anyone tell me how can i dynamically generate such steps of division of any … | |
Hi, In the page I'm developing, I have a CheckBoxList which is populated based on what the user types in a TextBox (Similar to an AutoSuggest). The CheckBoxList is inside an UpdatePanel. When anything is typed, I'm settting the focus to the end of the word, otherwise the focus goes … | |
Hi, In the page I’m developing, I have two textboxes, and two CheckBoxLists. Each CheckBoxList is being populated according to what the user types in the respective TextBox. In the Page Load, I’m doing the following (VB.NET): [CODE]Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load FirstTextBox.Attributes.Add("onkeyup", … | |
Hi, I have written some code which when a mouse is clicked, a red circle is drawn at that position. The x,y coordinates are stored in an ArrayList. What I now want to do is enable the circles to be selected and then dragged. When the mouse is released the … | |
I have written a program which allows the user to click on the screen which draws a circle and when the user clicks on the circle again they can drag it around. My code allows the circle to be dragged it still displays the original cirlce and draws the path … | |
I'm currently writing a small game engine and I've downloaded the Irrlicht source code to take some tricks in the design but I have a question... why use some prefixes in the file names and what they stands for? example: CGUIEditBox.cpp CGUIFont.h CXMLWriter.h IDepthBuffer.h I also saw this practice in … | |
I am writing a code in c++ unix environment using gmp for impelementing quadratic sieve I have many global variables i.e the number to be factorised and some arrays, sievelength,factorbase siz etc. During the first part of the program, the program simply calculates the factor base implemented through a fucntion … | |
Hi can anyone tell me what's wrong with this? Thx in advance. [code=php]$meta_tags = '<meta name="keywords" content="' .$meta_keywords' . "> <meta name="description" content="' .$meta_keywords . '">';[/code] Its throwing the following error: PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING | |
I have created a custom drawn search bar for an app i am working on. see picture: [URL="http://www.diamonddrake.com/test/imgs/mySearch.JPG"]http://www.diamonddrake.com/test/imgs/mySearch.JPG[/URL] when the user clicks on the google icon to the left. a little borderless form opens with custom drawn buttons that have icons for other search engines, you get the drift. only … | |
I am very green at writing Java, I am trying to go through our chapter examples and putting in data for a mortgage calculator with a GUI. This code is far from finished but the example says "Now save and compile" and this is where I am getting the error … | |
ok so my code is as follows: [ICODE]read=open('mon_17.py','r') reader=read.readlines() a=[] for line in reader: reader1=[] for i, entry in enumerate(line.split()): if i in range(0,4)+[6]: reader1.append(int(entry)) else: reader1.append(float(entry)) #float the 2 purity values only at this point #reader1=map(float,line.split())#this was made everthing diff made all floats a.append(reader1) a.sort(lambda x,y:cmp(x,y)) read.close() match={} for … | |
So, I'm really frustrated with this problem. I desperately need some good explanation about this. Why does the calling function does not reflect the change done in the called function? despite the fact that I pass the variable via pointer. Any explanations please. Thanks in advance. [CODE]#include <iostream> using namespace … | |
Hi, I want to [B]check only one checkbox[/B] at a time using html. please help me out.... | |
I am writing an app where I will need to pop up a form to allow the user to enter data and then pass back at least a portion of that data (an ID perhaps) to the calling form. I have not completely decided how I am going to handle … | |
watchinthegame posted the following thread on Mar 14th, 2009 : MYSQL field is Datatype DECIMAL(9,2) When I update the table and set the field to 120.00 it gets populated as 1200.00 What am I doing wrong? Thanks Watchin -------------------------------------------------------------------------------------- It doesn't appear this was every resolved (at least not via … | |
Ok in my program i'm trying to prevent a user from adding too many objects. i have three arrays called subs airs and dests, the user shouldn't be able to have more than a total of 10 objects between them. in order to add an object to an array the … | |
Please can somebody help me to concatenate names in c. I try to enter names but anytime it will teat them as separate strings. this is what I tried to do : But i was getting segmentation faults, can you figure anyway out. | |
let say I got input.txt with following thing [QUOTE] Kelly // name of student 67 // Biology Score 89 // Chemistry score Michelle 75 45 John 78 90 [/QUOTE] and I use this fscanf command to scanf all the file until EOF: while ((fscanf (input, "%s %d %d", &studName, &bioScore, … | |
Hi guys, I'm working in C in PuttY server.I'm looking for a program that can display an interactive menu that interacts with the user and also display a clock in the top right corner of the screen. So I need a program that can draw a border using C, and … | |
[code] #include<stdio.h> #include<stdlib.h> #include<conio.h> struct node { int info; struct node* llink; struct node* rlink; }; typedef struct node* NODE; NODE insert(NODE root,int data) { NODE temp,cur,prev; temp=(NODE)malloc(sizeof(struct node)); if(temp==NULL) printf("\nOut of memory"); temp->info=data; temp->rlink=temp->llink=NULL; if(root == NULL) { printf("\n1st time\n"); root=temp; return root; } prev=NULL; cur=root; while(cur != NULL) … | |
I am trying to populate a label using a T-Sql query to a SQL Server table upon a click event. I have the click event and linking to the SQL Server table working just fine. The process (below) returns "System.Windows.Forms.BindingSource" rather than any value from the table. My code is … | |
Hi, I want to know, how I can load all text from some webpage in to my C# aplication RichTextBox? | |
Hi all, I am making a form in which i have many fields. Let me explain: In this form there are two radio button and one field for email text box and another field for name text box. Now i want that if i will select first radio button from … | |
i know some about vb.net programming and i'm interested in developing some software which is able to Get Data From Serial Port /parallel Port to my working form. can somebody advice me ,how to start such kind of developing and what should i refere (web sites /e books) for this … | |
Good morning, Can you guys please figure this out? I have to write a code that calculates de wage of employees on a self generated list. User is asked for : numberofEmployees, hoursworked, rateperhour. If the employee works 40 hrs: rate= rate * hrs between 40 and 50 rate is … | |
Hi I need some help with the following problem: This is the source code: [CODE]<html> <body> <?php //Retreiving mail messages from mail server $server = 'localhost'; $port = 110; $mail = imap_open("\{$server:$port/pop3}INBOX", 'admin', 'password'); ?> </body> </html>[/CODE] This is the error message (exception): Warning: imap_open() [function.imap-open]: Couldn't open stream \{localhost:110/pop3}INBOX … | |
Dear All Hi, I'm developing the MES program for our customer company. I completed the program except one. The user requests, the information have to pop-up if user modifed the data in the application. This application was composed by 2 spreads, 2 buttons and 2 combo boxes. If user modified … | |
Hello. I have a PreparedStatement/CallableStatement, a ResultSet and a Connection... Now after execution finishes, i want to release my resources. First I close my connection... I also want to release my ResultSet and my PS Will assigning null to my Connection object after closing the Connection object also assign null … | |
Fatal error: Call to undefined function mcrypt_module_open() Please help me to fix it. | |
Helo all, Can anyone help me .I want to put dilimiter in the substring of a whole string. Here is the string Amitav 12/3/2009,234,201,210,222 I want to put dilimiter in the left most substring like this Amitav,12/3/2009,234,201,210,222 ______________ How can i do that. Thanks | |
i had construct a maze which i could setup the n x n with user input successfully.The problem is i cannot correctly specify the visited area with 'R',which is a symbol of a robot. [CODE] #include <iostream> #include <conio.h> #include <iomanip> #include <vector> using namespace std; void movement(vector<vector<char> >,int,int); int … | |
Hello guys I have a problem with my code: I want to print an error message every time the user enters a number lower than -273.15 . My code runs well and does the desired mathematical operation. It even loops back to the input message, but I'm having huge headaches … | |
Dear all, I'm new in php MySQL and I'm wondering on how to maka users add many informations in one table, I'll explain. Now I have a table called users conataining: Username(primary key) - Name - Birthdate - Country and I want the user can add infos in a table … | |
Hi Experts, I am getting this error message, "Error connecting to mysql" whenever i am running the below scripts: [code=php]<?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'petstore'; mysql_select_db($dbname); ?>[/code] I've just set-up everything and … |
The End.