64,152 Solved Topics
Remove Filter ![]() | |
Hi Everyone :cool: What is the best way to represent, modify, and perform calculations with hexadecimal values (for instance, byte addresses) in Python? It seems every time I play with hex numbers, I'm always getting the result as a string or regular int type. case in point: Let's say I … | |
Hi all I'm new to PostgreSql i'm trying to write a simple function [code] CREATE OR REPLACE FUNCTION insert_tmp_pswd2 (int4, varchar) RETURNS int4 AS ' DECLARE tmp VARCHAR; BEGIN insert into "ExAfrica".test2 values($1, $2,now());select 1; END; ' LANGUAGE 'sql'; [/code] i really dont know why he doesnt want to declare … | |
Hey everyone, I am writing a Java program and I want to present the user with a settings window when they run a function in the main GUI so they can set the parameters which are used in the function. Ideally what I would like to do in the main … | |
Hello, I am trying to build a gui with two textfields, a textarea, and a few buttons. The two textfields are for the user to enter in random numbers (one number in each textfield). I then want the person to be able to hit a button that will then take … | |
The if statment I am using in my main program is not working, it should return the else value, but is returning the information in the if part of the statment and then it causes a run time error. I am not sure what is going wrong. [CODE] que1.add("Fish"); que1.add("Whale"); … | |
I need some help. I want this program to ask the user how many grades they would like to enter. Than when the user inputs it should ask for the prompt enter your grades as many times as the user wanted. Than assign each letter to the number of grades. … | |
Hello friends, I have a stupid problem, I can't find example or tutorial "How to embed mpp in HTML", so... Can anyone give me an example or code for this ? Thanks. | |
Hey Guys i seem to be having an issue with the follwoing code when i complie in VC++ 2010. It compiles fine in both minGW and VC++ 2008. The code is as follows... The Program accepts three inputs whereby it outputs them in alphabetical order, very simple. [CODE]#include <iostream> #include … | |
hello i have a problem...i want to insert a pic to my c program. is it possible to import a pic in c? if it is, how can we do it? | |
OK my programming/accountant friends, this is very long but I need your help again with an ad-hoc report! I am having a hard time getting my brain around solving this part of an application I am programming and was hoping to get your point of view. Maybe I'm going about … | |
I have a csv file with 4 columns that I want to use to create menus. For example, the second column has values such as "TEST", "QA", "PROD" and a couple of others. I want to take all the values from the second column, weed out the duplicates, then create … | |
Hey, I was trying to use the code from: [url]http://www.java2s.com/Tutorial/CSharp/0520__Windows/GetcurrentActiveWindow.htm[/url] to get the topmost window handle; however, I need to click a notify icon, which will bring up a form. I tried to use [CODE] private void notifyIcon1_MouseMove(object sender, MouseEventArgs e) { if (this.Visible == false && e.Button == System.Windows.Forms.MouseButtons.None) … | |
![]() | Hello :) Suppose I input an int value with Scanner sc = new Scanner(System.in)... and I want to count how many divisors that value has, how would I proceed in "recognizing" a divisor? if ((input/2)%10 == 0)? I'd prefer doing this recursively somehow. Can someone help? :) Best Wishes! ![]() |
i got an assigment, for tomorow, i have a text file, and i need to convert it to binary file. text file for example: 2 - how many products ipod 1000 2 - product name, price stock playStation 23 9 i need to preper this binary file: first the size, … | |
Hi guys, a not so complex question: [CODE] form xml.etree.ElementTree import * >>> tostring("<home><room>bedroom</room></home>") '<home><room>bedroom</room></home>' [/CODE] I would like to have the indentation in for the string. Something like: <home> [INDENT]<room>bedroom</room> [/INDENT] </home> Of course my document is a little complex. Is it possible to have it in an automatic … | |
I am tring to remove three string from a que using nodes. When I try to remove the third one it does so, but then I get a debugging error. I think the problem is that I am not deleting the last node but I cannot figure out what I … | |
I'm pulling my hair out trying to find a checkbox check-all toggle script that will pass an array of selected to my server side PHP script. I really want a master checkbox that serves as a select-all/deselect-all control. I've looked at countless examples online, and the closest I can find … | |
i have been asked to make phone book console application in java using collections/data structure i have done some of it. i am having problem that i have to store firstname,lastname,cellnumber,emailaddress etc in such a way into collection so that if some one wants to search phone number from phonebook … | |
Hi Everyone, i have a query regarding checkboxes. i have got a 'check all' checkbox on my form but what i need is to uncheck all if the check all is not checked This is the check all script [CODE]function checkAll(field) { for (i = 0; i < field.length; i++) … | |
[CODE]# -*- coding: utf-8 -*- p = [1, 2, 0, -1, 3, 4, 5] smaller = 0 bigger = 0 i = 0 while i < len(p): if p[i] >= p: bigger += 1 print bigger i += 1[/CODE] #bigger than -1 is (1, 2, 0, 3, 4, 5) #bigger … | |
Is it possible to write a class and hava a another class add that to a panel? | |
Hi, I have tested this and get no errors. However when i am updating a mortgage record for a client it changes the client id?? So if i am updating a mortgage for clientid = 1 Test Case and Mortgage ID = 1 once i click update in my php … | |
hi, in the below code i have made a variable $htmll, in my php file.In dat var i have stored the html code,in dat html code im writing some php code which in unable to execute....Kindly help me out to resolve it. Thanx.... [code=php] <?php $htmll=' <table align="centre" border="1" cellpadding="0" … ![]() | |
So when I plan to set up a register form on my site I need to know how to automatically assign an ID to the user once they press the 'Register' button. I guess I would be using this type of table setup; Table name: Users ID int 11 Email … | |
I create my code on my own machine and tested it on my own machine and everything worked perfectly fine but as soon as I uploaded it to my server it seems to have stopped working. None of the code has been changed except for the database user, pass and … | |
Hi, I have page that allows the user to search using a "date range" AND "location". I'm able to do this individually. Its like, if the user searches using the date range (from begin date to end date) the results show. Then if the user searches using a specific location … | |
when i do a stderr redirect to stdout, does the shell open the stdout file? if so is there any way i can capture the opening of this file? basically what i want to do is at the firstinstance of an error i want my perl script to die and … | |
G'day, I've got a table [CODE]CREATE TABLE IF NOT EXISTS `attractions` ( `attID` int(11) NOT NULL AUTO_INCREMENT, `attName` varchar(255) NOT NULL, `adultPrice` double NOT NULL, `childPrice` double NOT NULL, `referenceID` varchar(255), PRIMARY KEY (`attID`), KEY (`attName`) ) ENGINE=InnoDB;[/CODE] Now my initial set up was that [B]referenceID[/B] was linked to [B]attID[/B] … | |
Hello. I'm wondering if anyone has knowledge or a code that will refresh a script without a full page load. Just a widget/box on a site. What I have is a script which displays random posts in wordpress. Just calls 5 posts from the database with a simple random call. … ![]() | |
Hi guys! I want the user to enter the day, month and year in a dd/mm/yyyy format. But what i've written doesn't seem to work. Code: [CODE]char d[2]; char m[2]; char y[4]; cout << "Day:"; gets(d); cout << "Month:"; gets(m); cout << "Year:"; gets(y); [/CODE] In the output, it doesn't … | |
Hi all, I'm working on a project in Java that involves developing a GUI that can, among other things, receive user input from the keyboard, receive and store handwritten input (characters/words) done with a mouse, and display png images. Eventually the program will be used on a linux environment, but … | |
My file structure is Project data sort main.cpp code as follows [CODE]#include <cstdlib> #include <iostream> #include <fstream> #include <string> #include "genlist.cpp" #include "genstring.cpp" using namespace std; int main(int argc, char *argv[]) { ifstream in; ofstream out; int unique=0; GenList<string> gList; gList.checkFileOpen(in,out); gList.populateNUnique(in); gList.sort(1); gList.output(); in.close(); system("PAUSE"); return EXIT_SUCCESS; } [/CODE] … | |
Alright, so everything works, except there are a couple minor bugs. Also, is there a more efficient way in doing my listen method? Thanks. Bugs: -First client does not recv the information it sent, until the 2nd client connects. (the server sends it back) -Everyother click recv's everything twice. Server.cpp … | |
/* In this program i am trying to Read these info from a text file called unsorted saved in D These info are A201456 23.15 B209356 6.58 C201232 7.5 D201172 1.2 E201653 3.68 1)i want to sort them in ascending order of the real number example (23.15 ). 2)I want … | |
Hi all, When I click on the add button I get "exception class EdatabaseError with message 'DBedit2: Field 'RoomNumber' not found I am trying to get the max roomnumber to insert a new room max(roomnumber)+1 Its a fundamental hole in my knowledge here, on how to get a result from … | |
Hey, I'm pretty new to this language, so please excuse me for not using the correct terms. I have a function that goes like this: private void function() { SaveFileDialog x = new SaveFileDialog; ... } Now, should I dispose of it at the end, or will it do it … | |
Hey, Building a hotel booking system as a college project, And as I do not want to go through the building a calendar that shows dates that are already booked, aww can be bothered. ok the max number of days of stay allowed are 7, now I have thought of … | |
Hi, can anyone tell me how to compare to keys of a hashtable.I have a situation where my hashtable have same keys.I know it cant be the same but i am inserting a hashtable of dictionary which do have same keys.Thanks | |
what is this "Werid charaters" its screwing my downloads... but echo seems to be find can any one know the solution pls!!! THis is what i did.. .only 1st seq goes fine... something goes stupidly wrong with this stuff.... [CODE] rhohit@64box:~/383 Anxious Friends$ for i in $(seq -w 1 18 … | |
I have code that opens a URL, whose page looks like this... "A",31.49,"5/26/2010","4:00pm",+0.25,31.51,32.25,31.37,3811721 The code parses this web page and writes it to a CSV file. Here is a snipet of the code, [CODE] def __req(stat): url = ... % (stat) return urllib.urlopen(url).read().strip().strip('"') #Manipulate data from web and write to … | |
Hello, i have to create a program for- If the age is less than 18-You are still a kid 18-30 adult 30-60 middle age greater than 60-senior citizen else for any other impossible age (-ve or 0 age) ' wow ' Here is my attempt, [CODE]#include <stdio.h> #include <conio.h> void … | |
Hi guys, I've compiled the code given below which allows the user to enter the address of a text file and then view it(the whole thing). But, as soon as input is taken, "openfile.exe has encountered a problem and needs to close. Send Error Report." When I Press Debug something … | |
I am trying to get the IP address of my router and so i have found this code and it works perfectly on my pc. When i run it on my laptop however it outputs two addresses. One is the correct one and the other is just 0.0.0.0 I only … | |
hi guys, i have a main form and what i want to do is to display the informations on another form (in listview) which has the input values on the main form. when i create a second form i cant access any of the controls on the main form. How … | |
Hi Guys, I am trying to insert hashtable in databse but one of the key in hashtable is null.Can anyone help me write an exception for this.Or if i can just move to the next key . Thanks a lot [code] private void btnUrdu_Click(object sender, EventArgs e) { SqlConnection cn … | |
Hello all, I am new to C# and thought I would post here based upon a posting I saw here yesterday indicating it is a good forum for beginners. Have been posting on CP, but I think I am just annoying them there......:icon_sad: Anyway, I have been struggling with a … | |
Hi, i am having a problem with a form where a user can enter there birthday when they register. In the database it does not show up, it only shows the default value 0000-00-00. I am using month, date and year in the form and i am wondering is there … | |
Hello, I learn tuples and I came acros the folloving explanation which I don't understand practicly because the scipt is not complet..., I think tha they want to show the direction but for me would be better complet example... so it's from document: Think Python (version 1.1.19) and text is … | |
hi guys! i need ur help because im noob at web programming.well.. i would like to insert formatted text (html) in the mysql database and retrive it to a page. do i have to save text with all tags? what is the best way to do that? example: i hav … | |
Hi, Yesterday I downloadet and installed wamp, it worked quite fine most of it. I could put it on Offline and online mode if I wanted to, but when I tested my php page on the localhost by typing [url]http://localhost/index.php[/url] in the adress bar it would get directed to wamp's … ![]() |
The End.