43,549 Solved Topics
Remove Filter ![]() | |
<code=python> >>>f = file("sendBuffer.dat","rb") >>> f.read() '\x81x\x00>\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00A .\x00\x10aG\xce\x00 \x00\x00\x00\x00\x00\x00\x00\x01\xcd\xccL@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' >>> text = f.read() >>> print text </code> In the above code f.read() prints the data, but when i say print text or print length of text it returns NULL and zero respectively. Any Ideas? Software Development file-system python | |
Hi everyone! I am a junior database programmer. I need to know how can I save image in SQL SERVER 2000 by VB.NET? I made a table in SQL SERVER with two fields. One is Id[nvarchar] & another pic[nvarchar]. I got two forms there in VB.NET project. In the first … Software Development client-server image sql vb.net | |
Hi folks, I've been trying to solve this but I keep hitting a brick wall. Here's what I am trying to do: I'm reading a file with text in it, I am storing every letter of this file as an element of this array (this part is already done) and … Software Development c | |
Hello There is no error and no table. Could someone find the missing code needed to render the table? How do I Verify that outocommit is OFF? output: [code] in personalDataTable: Supports Scroll headers: ADMIN_UID headers: ADMIN_PASSWORD headers: ADMIN_LNAME headers: ADMIN_MNAME headers: ADMIN_FNAME headers: ADMIN_GENDER headers: ADMIN_AGE headers: ADMIN_START_DATE headers: … Software Development java | |
I've looked over the forums but I can't find anything to help me. I've tried out some of the code but I still end up with a blank image. What I'm trying to do is allow the user to draw an image in a JPanel and then I want to … | |
Hello I am using : [icode] conn = ddf.getConnection(); setConn(conn); ps = (PreparedStatement) conn.prepareStatement( ModelUtils.getXMLResource("selectAdmin"),ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ps.setString(1, thisUser); rs = ps.executeQuery(); [/icode] and [icode] public int getRowCount() { try { rs.last(); return rs.getRow(); } catch (SQLException ex) { Logger.getLogger(AdminPanel.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); return 0; } } [/icode] and it is … | |
Hi all, I'm very new to perl but I will try to explain where I am at the moment. I have a lot of information in a .csv file. The 2nd columb has different values relating to different things. For example "no" = nokia, "se" = sony ericsson, "ip" = … | |
Hi, I am total new in C. I have an array, then i loop it to get array elements. How can i add this array element into existing array? thank! [CODE] char arr[] = {1}; for (int i = 0; i < sizeof(arr)/sizeof(arr[0]); i++ ) { something happend here = … Software Development c | |
Hello All, i am after a little information on a query i have. I have three forms that are fairly similar in the process that they take, the only difference is an extra textbox and different SQL DB Updates. so what i plan to do is merge all three forms … Software Development | |
hi im trying to make a tic-tac-toe game in c++ im using a 2-d array of chars to tell if there is an x, 0, or null i wanted to make a procedure i can keep calling every time i need to display the grid however i keep getting this … Software Development c++ | |
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 … Software Development python | |
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"); … Software Development c++ | |
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. … Software Development c++ | |
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 … Software Development python | |
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) … Software Development | |
![]() | 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! Software Development java ![]() |
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, … Software Development c file-system | |
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 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 … Software Development data-structure java regex | |
[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 … Software Development python | |
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 … Software Development perl shell-scripting | |
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 … Software Development c++ | |
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] … Software Development c++ data-structure file-stream | |
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 … Software Development c c# c++ client-server | |
/* 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 … Software Development algorithm c user-interface | |
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 … Software Development dataset delphi open-source pascal | |
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 … Software Development shell-scripting | |
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 … Software Development python | |
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 … Software Development c | |
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 … Software Development vb.net | |
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 … Software Development dataset | |
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 … Software Development | |
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 … Software Development python | |
I wrote a program that takes in this kind of input: [CODE]Short, Sue, , 3.11 Cisneros, Juan, G, 3.67 Andrew, T, 5.67 Superlonglastnamethatdoesnotfit, Betty, Boop, 2 Black, Shirley, T, 4.00[/CODE] and my program outputs this: [CODE]Highest gpa: 4.00 Average gpa: 3.19 Lowest gpa: 2.00 Sue Short 3.11 Juan G. Cisneros … Software Development c | |
My vb 2008 app uses Excel, but only briefly. Can I avoid referencing the Interop library Microsoft.Office.Interop,Excel?? Is there another way to link to Excel? In terms of its dealings with Excel, my app does little more than open a workbook and shade some cells. Many thanks Software Development microsoft-office vb.net xml | |
hello folks , can you help me about list view i dont know whats the purpose of "selectedItem.text" in list view can you tell me what is the meaning of this code? thanks folks ,, god bless u:icon_smile::icon_smile: Software Development listview visual-basic | |
Hello!.. Its me again.. I Just want to know that, is it possible to Disable a user from copying a file from computer to another device like USB Drive? I want to Disable Copying of files by; Disabling CTRL+C, Removing Copy from Right Click or Move (when dragging the file … Software Development visual-basic |
The End.