132,726 Archived Topics
Remove Filter ![]() | |
hi all do anyone understand hash function? how to use it in order i can count a digit number of size 10? then i separated it half half (into 5 digits each) :) Software Development c | |
Hi I am trying to return a boolean value into another method, but it's not working. [CODE] public static boolean ItemFound(boolean item, String desc1, String desc2, JTextArea txt){ if(item == true) txt.setText(desc1); if(item == false){ txt.setText(desc2); item = true; } return item; }[/CODE] and inside the other method I have … Software Development java java-swing | |
Hi everybody, I am kind of new to vb.net and have some problems with images. I need to show multiple images but the amount can be variable. So I know there is some kind of picturebox in vb.net to show an image. But how can I show multiple images without … Software Development vb.net | |
Is there a way to store multiple values to a key without using any extra modules? Here is the code I have so far: [icode] $key = $ref->{$uniqueKey}; my $systemKey = GetSystem($key); push @{$referenceTable{$key}}, $systemKey; my ($k, @v); # SET UP THE TABLE print "<table border='1'>"; print "<th>User</th><th>System</th>"; # EXECUTE … Software Development perl | |
Hello. Can someone explain what this InitialContext(): is looking for? [code] public JDBCSchoolofdbDAO() { try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup( ModelUtils.getResource("JavaCompEnv")); dataSource = (DataSource) envCtx.lookup( ModelUtils.getResource("DataSource")); } catch (NamingException x) { ModelUtils.log(x); throw new InternalError(x.getMessage()); } } [/code] [code] DAO=schoolAppModel.dao.JDBCSchoolofdbDAO #///////////////////////////////////////////////// # DAO=jsfdb.model.dao.JDBCSubscriberDAO #///////////////////////////////////////////////// … Software Development java | |
//*************************SERIOUS PROBLEM, NOT WORKING****************** [CODE]//DOUBLY LINKED LIST #include<stdio.h> #include<stdlib.h> struct dll { int info; struct dll *next; struct dll *prev; }; struct dll *head = NULL, *tail = NULL, *temp; void append(); void insafter(); void delete(); void display(); void main() { int choice; do { printf("Enter your choice:\n"); printf("1.Append Node\n2.Insert … Software Development c linked-list | |
My assignment is as follow: Create a class IntegerSet. The IntegerSet can hold integers in the range [1-100]. Define one or more instance variables to represent IntegerSet properties and store elements. Additionally, provide the following methods: a. One or more constructors. b. Method void add(int) inserts a new element to … Software Development java | |
Hi, I wonder if there is any syntax that can detect if any Browserwindow is open on the computer and then close this/these windows. I use Firefox and then would want to detect if any Firefox browserwindow is opened and then close them if any is open. Thank you! Software Development c++ | |
what AmI missing? I am simply trying to read in an array from a txt file and count the words. What am I doing wrong....here is the function[CODE]int countwords(ifstream& infile, int wordcount[MAX_WORDS]) { int count = 0; for( int i=0; i < MAX_WORDS && infile; i++) { infile>>wordcount[i]; count++; } … Software Development c++ | |
I optimized very carefully program I was producing by producing the main tight loop functions half a dozen times with various implementation styles. Also i considered amount of passing information in call hierarchy in parameters or letting functions to trust proper initialization of the global variables. I got few interesting … Software Development linked-list python | |
Hello Folks, I have developed a s/w on vb.net2008 and want to make a setup of it so that my client could easily install it in her system without having .net framework installed in it. If anybody could provide me a step by step method i would appreciate. Regards Indranil … Software Development vb.net | |
Hi, I got this piece of code from this forum and i was trying to modify it so that I can make it dynamic. I modified it a little bit to add multiple collapsible panels. But I need some help. 1. I need to add these panels dynamically. If I … Software Development java java-swing queue | |
I found a tutorial of how to link object files: I have 3 different files. [B]main.c[/B] [code=c] #include<stdio.h> #include"reciprocal.hpp" int main (int argc, char **argv) { int i; i = atoi (argv[1]); printf ("The reciprocal of %d is %g\n", i, reciprocal (i)); return 0; } [/code] [B]reciprocal.cpp[/B] [code] #include<cassert> #include"reciprocal.hpp" … | |
Good Afternoon, I am from brasil, and i am beginning to study programming, I bought the book "C++ How To Program", and i am now trying to make a small software with each class in its file, with prototypes and etc, here is a simple program that i made to … Software Development c++ file-system | |
Help please.. I need some help in C to open a file and search for a string. If the string is found then move one space and copy the next string to end-of-line back to buffer. I am creating a program using pthreads and need to search this file in … Software Development c | |
i want to write this program without lib and string files make changes in it and tell me the program thanks code is below[CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> struct Node; typedef struct Node * PtrToNode; struct Node { char element; PtrToNode Next; }; PtrToNode MakeEmpty(PtrToNode L) { L= new(Node); L->Next=NULL; return … Software Development c | |
Hi, I've had a bit of experience with perl and shell scripting. I've been reading the O'Reilly Python book and have been having a go at replicating some of our perl scripts in python (v3.1.2). I'm looking to put something together than will parse through large xml files and manipulate … Software Development perl python shell-scripting xml | |
Hey guys, I'm new here and my question is what to use (if it exists) and possibly how to simulate a "notebook" where instead of Tabs I would like to do it with buttons (wx.Button). Being more specific, what I would like to do is to make the same functionality … Software Development python | |
Hello all, I've developed an application for mobile devices that, upon being shut down, continues to show the loading animation for an infinite amount of time. However, I have noticed that once you click on something else, i.e. open another window or folder the animation disappears and does not reappear … Software Development microsoft-windows vb.net | |
[code=C++]#include (iostream.hpp) class Stocks { public: Stocks( int price); ~Stocks(); int get_price() const {return pps;} int set_price() const {pps;} int the_price_is (int pps); int pps; } int main() { Stocks AMX (35) cout << " Hello, please enter a symbol.\n"; if cin>> AMX; cin.ignore; cin.get; AMX.the_price_is cout<<" 35.\n"; return 0; … | |
Hi how to kill the[B] recv [/B]or [B]recvfrom [/B]in socket connection, then there is no data and the functions recv, recvfrom is in waiting mode.?for example: [CODE] sock=socket.socket(...) sock.bind((host,port)) while True: packet,address=socket.recvfrom() print packet [/CODE] if there is no data on socket it is waiting, so how to kill it … Software Development python | |
can someone help me ,i am trying to enumarate some registry keys,i doesnt get me any error,just the output is wrong: [CODE] void Registry::open_key(HKEY Key , char* subkey) { RegOpenKeyEx(Key , subkey , 0 , KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE , &hkey); } void Registry::querry_info_key() { RegQueryInfoKey(hkey , 0 , 0 , … Software Development c++ | |
Hey, im in need of a little help... im trying to have my .exe show an image with sdl, wait 2500 milliseconds, close the image and then return to the black console screen with my cout statments and whatnot appearing. But instead when i exit sdl, the whole program exits. … | |
i am new in c++ programming language,i do not understand very well imprementation of linked list,can u help me by providing me algorithme for it Software Development c++ linked-list | |
i want to make this game....and i need help....in the game computer should play as a second player....and it should also win....is that possible....and is it easy??? Software Development c++ | |
I have to utilize an array for a homework project. I want it to read a line from a file on my hard drive. However, the line starts with words and ends with numbers. I only need to utilize the numbers for a function that I want to pass a … Software Development c++ hard-drive | |
Dear Guys I want to start creating mobile based applications and i am newbie in this field , where should i start , how to create a simple application jar file which can run on mobile devices , for example a simple interface with buttons , sound handling , graphics … Software Development java web-design | |
Hello Most of my C++ is self taught so please excuse me In my code I am writing a large amount of data to file [CODE] for(int i=0; i<itr_atoms; i++) file_out << i+1 << " 1 " << atoms[i][0] + origin_x << " " << atoms[i][1] + origin_y << " … | |
Im trying to work out how to do a project called pig latin in vb.net 2003... so far I've gotten it to work for a single word. If there are spaces it still acts like there is only one word with the rules (ex: monkey stuff = onkey stuffmay) I … Software Development vb.net | |
(Payroll) Write a program that reads the following information and prints payroll statements in show message dialog box. These are the inputs: Employees Full Name (e.g. Mohammed Al Zakwani) Numbers of Hours worked in a week (e.g. 40 hours) Hourly Pay Rate (e.g. 6.75) Federal Tax withholding rate (e.g. 20%) … Software Development java | |
[code=syntax] import random def main(max): print "\tWelcome to 'Guess my number'!" print "\nI'm thinking of a number between 1 and 100." bestoutof = raw_input("Best out of : ") num = random.randrange(101) tries = bestoutof guess = "" while guess != num: guess = int(raw_input("Take a guess: ")) if guess > … Software Development python | |
A most basic TCT connection is established with the code below: [CODE]// Initialization IPEndPoint m_IpEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.71"), 5000); Socket m_Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); NetworkStream m_Stream = new NetworkStream(m_Socket); // Read/write operations m_Stream.Write(System.Text.Encoding.ASCII.GetBytes("Hello world!"), 0, 12); byte[] read_buffer = new byte[4096]; m_Stream.Read(read_buffer, 0, 4096); // Closing open resources … Software Development c# socket-programming tcp-udp | |
I need to create a shell script which will output certain lines in a file. For example ./line file1 6 11 will output lines 6 to 11 of the file. I am not good at shell script, I am a beginner. I have tried to write this script but just … Software Development shell-scripting | |
Hi, I need that my server will be in waiting mode while first packet arrived, when it happens it shoud start to receive packets until the socket.settimeout(1) function kill waiting. my code seems like that, and is working properly until settimeout() return : Traceback (most recent call last): File "C:\Documents … Software Development python | |
Hi folks, Just join this forum. I, a beginner on C++, have been googling around for tutorial to learn C++ in Linux platform. I found following tutorial; Teach Yourself C++ in 21 Days [url]http://newdata.box.sk/bx/c/[/url] I suppose it is for Windows. Can I use it on Linux? I'll use g++ as … Software Development c++ | |
I have an enum type, for example: [CODE]enum signum {negative = -1, positive = 1, zero = 0, inward = -1, outward = 1, indefinite = 2}; [/CODE] I want to use at least one of the following castings: [CODE]signum s = positive; double x,y; x = double(s); y = … Software Development c++ | |
Hi guys, I'm still learning java and to code in general. How would i take a word, open a web browser, and define the word in google ? Is that even possible ? Software Development java web-browser | |
Hello, everyone. I have a question to ask. According to The C++ Programming Language (3rd. Ed.) by Bjarne Stroustrup on page 405: "Members declared [COLOR="Red"][B]protected[/B][/COLOR]are far more open to abuse than members declared [COLOR="red"][B]private[/B][/COLOR] . In particular, declaring data members protected is usually a design error. Placing significant amounts of … Software Development abuse c++ data-structure microsoft-access | |
![]() | I've got this code that read in a text file into a string [code=c]private void Read(string path) { StreamReader sr = new StreamReader(path); data = sr.ReadToEnd(); data = data.ToUpper(); sr.Close(); }[/code] it works all right with a small text file, say 1kb. But when I tried to read a 350KB … Software Development file-system |
[code] using System; using System.Reflection; using System.Diagnostics; using System.IO; namespace VersionExe { class Program { public static void Main(string[] args) { int i; // Get the file version for the notepad. FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, "notepad.exe")); FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\notepad.exe"); // Print the file name and version number. Console.WriteLine("File: " + … | |
Hi Friends I have about 10 hour recorded sound and now i need when user click in one button from that sound minutes of 6:45 play and then after 5 second it stops how i can do it(not from at the beginnig i want it start from 6:45 reapet not … Software Development | |
| |
Hi everyone. We were given a homework to code a hash table. The objects and their members were given by our professor and we were only supposed to implement the functions (Add, Remove, Contains and Print), so I shouldn't change the objects. I should also do a copy constructor and … Software Development c++ | |
Hello I have write a simple code just to test about BeginInvoke and EndInvoke methods but i don't get anything. The form has 2 buttons and 2 labels .. if you press the button1 label1 gets increase and so on . here what i have do so far [CODE] Public … Software Development vb.net | |
Hi there, ive been comin here for about a month glancing at forum posts and the practice thread.. I have been self teaching myself C++ for a few months, and it was pretty challenging at first, my biggest problem is memorization.. so anyways... i was wondering if anyone could help … Software Development c++ | |
Hello I want to implement this function: boolean check(String str,String exp) that gets a string, and an expression and see if it mathches. But (!), according to a format by '*' (maybe similar to the SQL LIKE statement, but with * instead of %). Examples of tests of this function … Software Development java | |
Hello .. :) Im on ma way completing my C# project,, but i have a small issue .. let me tell you what it is /// since its complicated to send the whole image to a db i only the send the image name to the database ( table ) … | |
i want to convert string into byte....this can be done in vb.net..can somebody help me in doing this in vb6.0..here the simple code.. Private Sub Form_Load() Dim str1 As String Dim i As Byte i = CByte(Val(str1)) Text1.Text = i End Sub but this code still not able to convert … Software Development vb.net visual-basic |
The End.