132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for nsutton

How can I randomly pick a string element out of a list or array? I'm making a typing aid and I have a method that contains lists of noun/adjectives and verbs. I need it to pick one thing out of each list and turn it into a sentence.

Software Development
Member Avatar for nsutton
0
744
Member Avatar for daviddoria

I'm having a bit of trouble with dynamic_casting. I need to determine at runtime the type of an object. Here is a demo: [code] #include <iostream> #include <string> class PersonClass { public: std::string Name; virtual void test(){}; //it is annoying that this has to be here... }; class LawyerClass : …

Software Development c++ legal
Member Avatar for daviddoria
0
71
Member Avatar for bbman

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 …

Software Development
Member Avatar for apegram
0
104
Member Avatar for kedarm

Hi! I'm trying to use the opencv bindings of Python. I tried the following code: [CODE]from opencv.highgui import * from opencv.cv import * cam = 'cam' cvNamedWindow(cam) cap = cvCreateCameraCapture(0) while cvWaitKey(1) != 27: img=cvQueryFrame(cap) cvShowImage(cam,img)[/CODE] Although the window seems to open fine, I cannot see any image. I just …

Software Development python
Member Avatar for Ratzian
0
319
Member Avatar for sdhawan

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

Software Development
Member Avatar for sdhawan
0
118
Member Avatar for socal

[CODE]import java.util.Scanner; public class bankAccount { //instance variables public String name; public int number; public double balance; public double deposit; //constructor public bankAccount(String name, int number, double balance, double deposit) { this.name = name; this.number = number; this.balance = balance; this.deposit = deposit; } public double getBalance() { return balance; …

Software Development java
Member Avatar for NP-complete
0
123
Member Avatar for drt_t1gg3r

I am in need of clarification. I am still a 'noob' when it comes too C++. I get a lot of the basic stuff except passing arguments. I understand that you can pass by reference and by pointer and by copy. but things start getting really confusing from that point …

Software Development c++
Member Avatar for drt_t1gg3r
0
186
Member Avatar for fable1380

I am new to VB coding so I'm trying some easy projects. I figured an alarm clock would be a good place to start. But I'm Having a hard time with the MP3 Part of it all. I want a pre-selected MP3 to start, when my timer2 is = to …

Software Development vb.net visual-basic
Member Avatar for huslayer
0
352
Member Avatar for rajsharma_85

How do I read data from a text file without using fscanf?

Software Development c
Member Avatar for Narue
0
206
Member Avatar for rhoit

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
Member Avatar for rhoit
0
128
Member Avatar for oaktrees

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
Member Avatar for oaktrees
0
86
Member Avatar for xaop

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
Member Avatar for abhimanipal
0
112
Member Avatar for jaysean

Hello forum, I am stuck with a field comparison problem for two files. In one file I have first names and other pet names. Now I am trying to get results where first names are within a 20 word range of pet names(+-20 for checking on each side of word …

Software Development file-system java
Member Avatar for jaysean
0
149
Member Avatar for noobuser

Hi, I want to solve a problem( to be honest its my homework ) given two string, the print the permutation in ordered form. Example: ‫‪Please enter the first string:> abc‬‬ ‫‪Please enter the second string:> mn‬‬ ‫‪Results will be: abcmn abmnc amnbc mnabc mabcn manbc mabnc ambnc ambcn abmcn‬‬ …

Software Development algorithm c
Member Avatar for abhimanipal
0
88
Member Avatar for tomikimi

please how can i generate serial numbers like a bank account number from a text box.pls i need ur help i use vb.net

Software Development vb.net
Member Avatar for dlplenin
0
115
Member Avatar for anuragcoder

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 …

Software Development assembly c++
Member Avatar for abhimanipal
0
198
Member Avatar for bryann

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
Member Avatar for MaxDes
0
1K
Member Avatar for hsncvs

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 …

Software Development listview vb.net
Member Avatar for hsncvs
0
97
Member Avatar for mayank.15

I had this basic question. Suppose I have a directory on my computer C:\Abc\New. Now I can access this directory using : File file = new File("C:\\Abc\\New"); Now I can open all the files inside this directory using : File[] files = file.listFiles(); And I can process the files individually …

Software Development java
Member Avatar for mayank.15
0
323
Member Avatar for sdhawan

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
Member Avatar for Ketsuekiame
0
133
Member Avatar for Phil2:3

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
Member Avatar for sknake
0
4K
Member Avatar for Osas106

Good day my every one outthere, first let me start by saying that i am a complete novice to c++ programming. i got myself into some trouble while debugging a win32 program in 2008 V.studio. i did post this thread some 24 hours ago but no good result so far. …

Member Avatar for Ketsuekiame
0
130
Member Avatar for apals

hi folks, i am using windows control library and plugged in a textbox,label,button and called it check_my_id althought the control gets placed on the form. i am not able to change the properties of label, button thanx in advance

Software Development
Member Avatar for apals
0
194
Member Avatar for sdhawan

hi my table looks something like this: id word definition 1 welcome some def1 2 welcome some def2 3 welcome some def3 4 5 6 7 and so on for rest of the table how can i write a query so that all the definitions for same word get inserted …

Software Development
Member Avatar for sdhawan
0
73
Member Avatar for vlady

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
Member Avatar for vlady
0
147
Member Avatar for supidProgrammer

Hi! I´m new in this Forum. My problem is: I have two functions for replacing characters in a string. One in C++ other in inline Assembly: Example: Source string "björk" to destination string "bjork" In C++: [CODE] void ReplaceChar(char* s, int len) { for (int i = 0; i < …

Software Development assembly c++
Member Avatar for supidProgrammer
0
199
Member Avatar for programing

Hi ,all I hope that everybody will be fine I have q; How do I write simple [very simple] code that receives letters with stack [push,pop,over flow,under flow] for example . output: Enter later: A B C D E EDCBA i writed code that receives number .. but i face …

Software Development c++
Member Avatar for NP-complete
0
150
Member Avatar for ghost_from_sa

hey guys, im having a slight issue with overwriting a certain record that is selected by a user Basically my application is meant to get user in puts and store them in a file which is refered to when updating, adding a new record, deleting, searching etc here is the …

Software Development app-store c++ ios
Member Avatar for nbaztec
0
207
Member Avatar for trpsjt2008

Hello I'm Can't Find Any way to download Text File From My Free Hosting Cuz i can download from Direct link Website Like Fileden But My free Hosting it Say [B]The remote server returned an error: (403) Forbidden.[/B] How Can I get download file From My Hosting i use [CODE]My.Computer.Network.DownloadFile …

Software Development vb.net
Member Avatar for trpsjt2008
0
111
Member Avatar for johndoe444

The following example is taken from GWT tutorial ([url]http://code.google.com/webtoolkit/doc/latest/tutorial/codeclient.html):[/url] [CODE]private void addStock() { final String symbol = newSymbolTextBox.getText().toUpperCase().trim(); newSymbolTextBox.setFocus(true); if (!symbol.matches("^[0-9A-Z\\.]{1,10}$")) { Window.alert("'" + symbol + "' is not a valid symbol."); newSymbolTextBox.selectAll(); return; } if (stocks.contains(symbol)) { newSymbolTextBox.selectAll(); return; } int row = stocksFlexTable.getRowCount(); stocks.add(symbol); stocksFlexTable.setText(row, 0, symbol); Button …

Software Development java ruby
Member Avatar for JamesCherrill
0
102
Member Avatar for speedy94519

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
Member Avatar for nbaztec
0
119
Member Avatar for shereefatef

I have a text file with 500000 records , each record contain student ID and another index number. i insert this recors with separate function ,and i want when the user enter the student id the program get the corsponding index number and put it in avariable and use it …

Software Development c
Member Avatar for nbaztec
0
274
Member Avatar for Caled

Hi, Im having a problem displaying text in JTextPane. I want to be able to append text (e.g. "Task 1 completed..") after a task is completed. But mine display the text once all the tasks are completed which is quite useless as user does not know what is going on. …

Software Development java
Member Avatar for Alex_
0
84
Member Avatar for JohnDove

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
Member Avatar for gever
0
197
Member Avatar for Barefootsanders

Hey everyone, I'm attempting to write a directory monitor in java but I'm stuck. I'm trying to find something in Java that is like FileSystemWatcher in .NET but I don't think java does. From what I read is that you have to continually poll the directory for changes. What I …

Software Development java
Member Avatar for bobby_newmark
0
120
Member Avatar for cabsjonel

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
Member Avatar for jhai_salvador
0
106
Member Avatar for judithSampathwa

hi there, i have a excel file which have purchase order information. the file contains of the information of the user and the the items that he ordered with the order item quantity and the price but there may be any amount of items in the excel sheet. the thing …

Software Development c# microsoft-office vb.net
Member Avatar for nick.crane
0
219
Member Avatar for jhai_salvador

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
Member Avatar for jhai_salvador
0
135
Member Avatar for SiahCheePing

I' ve my cookie to [CODE]Dim authCookie As New HttpCookie(FormsAuthentication.FormsCookieName)[/CODE] I've just started learning about cookies not long ago,can I retrieve the cookie that I've set by using the code below? [CODE] Dim authCookie As String = FormsAuthentication.FormsCookieName If Not Request.Cookies(authCookie) Is Nothing Then 'Display requested page Else Response.Redirect("Login.aspx?") End …

Software Development vb.net
Member Avatar for qinise4
0
125
Member Avatar for dbphydb

Hi, I have a code which uses HTMLParser to reach a webpage where an exe file is located. The code then downloads and installs the file on local machine. I need a solution for the below problem: HTMLParser reaches a webpage where there are links to clients_test2, clients_test5, clients_test8. Each …

Software Development python regex
Member Avatar for dbphydb
0
163
Member Avatar for sdhawan

Hi I am trying to use replace function in c# but it doesnt seems to work.Am i doing anything wrong.Thanks [code] private void btnSpanish_Click(object sender, EventArgs e) { SimpleSpanishDict.SimpleSpanishEnglishDictionary ins = new SimpleSpanishEnglishDictionary(); Hashtable aaa = ins.AllWords(); StringBuilder insertCommand = new StringBuilder(); IDictionaryEnumerator en = aaa.GetEnumerator(); if (aaa.Count > 0) …

Software Development c#
Member Avatar for jlenriquez
0
184
Member Avatar for Dr-Delta

Hi I using C# to VB.NET code converter which gave me this: [CODE] Public Class PostCalendar Inherits Calendar [B]Implements [U]ICallbackEventHandler[/U][/B] //--Class 'PostCalendar' must implement 'Function GetCallbackResult() As String' for interface 'System.Web.UI.ICallbackEventHandler'. ¿¿?? //----------------------------------------------- Shared Sub New() [B][U]Post.Saved += Post_Saved[/U][/B] End Sub //----------------------------------------------- Public Class RecentComments Inherits Control Shared Sub New() …

Software Development c# vb.net visual-studio
Member Avatar for Luc001
0
300
Member Avatar for nramya82

Hi all, I am very new to programming , I am trying to do task where I have to count the number of lines that are read until the total length of the lines is 1,000 characters and also it it doesn't count characters on any line that begins with …

Software Development python
Member Avatar for TrustyTony
0
113
Member Avatar for samarudge

Hey guys, I'm a bit of a Java noob but could someone please explain digital signatures to me. I have an application and I build it using the command [CODE=shell]javac -classpath %CP% TunerApplet.java jar cvf TunerApplet.jar *.class jarsigner -keystore Tuner -storepass authentic -keypass authentic TunerApplet.jar Tuner[/CODE] As a guess it …

Software Development java
Member Avatar for jwenting
0
119
Member Avatar for bharatvamsi

hi, i'm novice user in python and i want to capture data at a specific port using python script.Please suggest me the approach. Same data i'm able to write into a file using linux command: tethereal -i any "port 9060" -w sam.txt I want to accomplish the above task using …

Software Development python
Member Avatar for Azeriah
0
296
Member Avatar for anantk

I'm making a basic football (soccer) manager game as my school project. Most of the other stuff is sorted out, but the scheduler is not working... [B]Background:[/B] I'm simulating the English Premier League,which has 20 teams. Each team plays 38 matches (exactly one match per week over 38 weeks) in …

Software Development c++
Member Avatar for anantk
0
228
Member Avatar for xenanovich

hi, this is something i keep running into. for example, in the following example of strtok, i'm splitting a given string on a space(" ") delimiter: [code] #include<stdio.h> #include<string.h> int main() { char str[]="1234563 34 7898"; char delim[]=" "; char* result=NULL; char new[15][3]; int i=0; int j=0; bzero(new, sizeof new); …

Software Development c
Member Avatar for xenanovich
0
181
Member Avatar for aqidis

Hey everyone! I have a problem with my lab if anyone could help check my code that would be great. I'm supposed to write a program that asks a user for two strings and checks if the beginning of the second string appears anywhere in the first. It's also supposed …

Software Development c++
Member Avatar for griswolf
0
538
Member Avatar for didi00

Hi everyone! So my task is this: Make a program in C which runs three processes (A,B,C), which use a common memory (buffer). Process A generates 50 random numbers and writes then into the buffer. Process B writes down every even number into file F1. Process C writes down every …

Software Development c++
Member Avatar for didi00
0
356
Member Avatar for justme369

can anybody help me transcribe this into vb.net [code] public string WriteNReadBuffer(byte [] TelnetNegotiation, NetworkStream stream) { stream.Write(TelnetNegotiation, 0, TelnetNegotiation.Length); Byte[] data = new Byte[256]; Int32 bytes = stream.Read(data, 0, data.Length); string returnval; returnval = BitConverter.ToString(data, 0, bytes) + "\r\n"; //textBox2.AppendText(BitConverter.ToString(data, 0, bytes) + "\r\n"); return returnval; } public void …

Software Development c c# c++ client-server vb.net
Member Avatar for Teme64
0
291

The End.