132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for XodoX

How many lines will the following codes print out, and why? main() { fork(); printf ("Hello!\n") fork(); printf("Good Bye!\n"); } // main What's the fork() doing here? Does it change the number of lines that will be output? > > The purpose of fork() system call is to create a …

Software Development c++
Member Avatar for Lucaci Andrew
0
261
Member Avatar for Rouf mir

I want to know the use of command-ine arguments in a program.Also can anyone tell me ,if the command-line arguments can be invoked in windkows systems or only in the command-oriented systems?Please help........

Software Development
Member Avatar for Oxiegen
0
181
Member Avatar for nmaillet

I'm trying to create some custom styles/control templates for WPF. The only control that seems to be giving be any issues (so far) is the ScrollViewer: <Style x:Key="{x:Type ScrollViewer}" TargetType="ScrollViewer"> <Setter Property="OverridesDefaultStyle" Value="True"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ScrollViewer"> <Border Background="#404040"> <Border BorderBrush="#808080" BorderThickness="1" Margin="4"> <Grid > <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition Width="Auto"/> …

Software Development
0
156
Member Avatar for triumphost

Currently I'm reading Multi-String values from the registry. These strings are double null terminated and single null delimiters are between each one. So below I have the following where these are declared as so: std::string KeyToRead, Result; DWORD KeyType. Now I'm returning an std::string aka Result. So I iterated my …

Software Development c++
Member Avatar for triumphost
0
465
Member Avatar for schlulol

Hi, I've been working on a c++ game of connect 4. It uses a multidimensional array, and I have a function that is capable of checking if someone has won. However, ai is really bugging me. I've tried to do some research on this minimax thing, but I couldn't find …

Software Development c++
Member Avatar for m4ster_r0shi
0
316
Member Avatar for androtheos

I have a console application that I need to run a stored procedure in but I'm getting this error: a t S y s t e m . D a t a . S q l C l i e n t . S q l C o n n …

Software Development asp.net
Member Avatar for Momerath
0
294
Member Avatar for lanyusea

I wrote two functions like that int absolute(int a) { return (a < 0) ? -a:a;} int absolute(int &a) { return (a = (a < 0) ? -a:a;} The two function have the same name and the same type, When I do like that: int main() { int a = …

Software Development c++
Member Avatar for PrimePackster
0
172
Member Avatar for Rouf mir

Please help me in the matter of invoking the command_line arguments and using them in the arguments in the main program.i have done it as follows...now i dont know how to pass arguments using c++ and how to access them in the main program.Please help as soon as possible #include<stdio.h> …

Software Development c
Member Avatar for WaltP
0
103
Member Avatar for Niner710

I am trying to use the mechanize module to automate a task on the web. I am able to get the first form to submit correctly. After I submit the first form I would like to take the data from the second website(or form) I am taken to(after I enter …

Software Development python web-browser
Member Avatar for Lucaci Andrew
0
677
Member Avatar for khuzdaar

I have studied functions, pointers, recursive(I suck at it though), file handling(slightly), loops and a bit of data structures. My final project of my semester is due very soon. I chose othello. Before I was able to succesfully make hangman. Now, this is my first time that I am trying …

Software Development c++ gaming
Member Avatar for faraz ahmad
0
1K
Member Avatar for Lomholdt

Hello. I recently finished my 1. semester in Computer Science, and got a good fundamental idea on programming in Python. Our exam assignment whas to create a game where we had to smash robots by clicking around with the mouse. The GUI was provided by our instructor. Now we newer …

Software Development gui python queue tkinter
Member Avatar for Lucaci Andrew
0
268
Member Avatar for GlenRogers

I need to search a Maps keys based on user input. So in a text field the user may type "M",then hit a button marked "search" this will bring up all keys that begin with M. Mike Molly Michael Michelle Marvin If they type "Mi" it will bring up Michael …

Software Development java
Member Avatar for JamesCherrill
0
112
Member Avatar for nquadr

# Excel VBA Lookup Help # Hi I am having trouble with my VBA Lookup function. I have created 2 workbooks which I have instantiated to wbOld and wbNew. I am taking a column from wbOld and comparing with a range in wbNew. I want it to return the second …

Software Development visual-basic
Member Avatar for nquadr
0
126
Member Avatar for SaaDwTk

Can someone help me to build a Function or Sub using HTTPRequest that makes a multipart post using that info? [CODE]-----------------------------23281168279961 Content-Disposition: form-data; name="ACAO" -----------------------------23281168279961 Content-Disposition: form-data; name="suppressValidation" true -----------------------------23281168279961 Content-Disposition: form-data; name="suppressErrors" true -----------------------------23281168279961 Content-Disposition: form-data; name="unidade" br.fumec.sinef.geral.bean.Unidade[codigounidade=1] -----------------------------23281168279961 Content-Disposition: form-data; name="curso" br.fumec.sinef.geral.bean.Curso[codigocurso=3106] -----------------------------23281168279961 Content-Disposition: form-data; name="epoca" br.fumec.sinef.geral.bean.Epoca[codigoepoca=2223] -----------------------------23281168279961-- …

Software Development first-post vb.net
Member Avatar for ARdeveloper
0
348
Member Avatar for sanju456

[COLOR=DarkSlateBlue]Hi all, Problem: Send mail is configured in my system and now i want to write a shell script using which i can send mail to my rediffmail account. Its little urgent & i will be very thankful if someone send me the code. regards, Sanjeev Kumar(sanju456@rediffmail.com)[/COLOR]

Software Development shell-scripting
Member Avatar for sftranna
0
2K
Member Avatar for softnewdevel1

i am trying to write a C program to do the following: i have a file which has x, y coordinates given as two columns. now the program has to take the first x,y pair i.e. from the first line and check a database of roughly 10,000 data files which …

Software Development c
Member Avatar for Sokurenko
0
122
Member Avatar for Mayank Mathur

what command to use if i want to use both "from:" & "To:" field in same e-mail in Linux mail() supports subject , not "from" Sendmail() supports "from", not "subject" regards Mayank

Software Development shell-scripting
Member Avatar for sftranna
0
625
Member Avatar for pandeysk_13

**hello all, i am creating a programme for my institute which helps in their administrative process. i am using visual studio(basic) 2010. which is connected with ms access database (abcdata.accdb) the database is having table called session with columns sessionID,sessioncode,sessionname. * sessionID data = 1,2,3,4 * sessioncode data = 13,14,15,16 …

Member Avatar for pandeysk_13
0
194
Member Avatar for hyung101

Can someone help me with a short program that calculates age, the user will input their birthday and the program displays the age..

Software Development java
Member Avatar for poojavb
0
3K
Member Avatar for sanket044

I have created one report in crystal report... i want to filter that report in vb6 with different conditions... i have created selection formula, like, str = "isnull({Prescriptions.RecDateR})" Report.RecordSelectionFormula = str but while running this it gives error that " SERVER HAS NOT YET BEEN OPNED"... if i remove the …

Software Development visual-basic
Member Avatar for sanket044
0
128
Member Avatar for Riteman

I just created 5 Rich text boxes in runtime through a subroutine as: Dim c As Control c = New RichTextBox() With c .Name = "VersesRTB" & VerseCount .Location = New Point(70, y) .Height = 100 .Width = 580 .Font = New Font("Microsoft Sans Serif", 12) End With It successfully …

Software Development vb.net
Member Avatar for Riteman
0
2K
Member Avatar for warzaru

Hello, after I have friendet my class to "<" operator it dosn't work after i use sort over an vector of class instances it does nothing: class + main : class RAngle{ public: int x,y,l; RAngle(){ } RAngle(int i,int j,int k){ x=i,y=j,l=k; } bool operator<(const RAngle& rhs)const { if(l < …

Software Development c++ ios
Member Avatar for Lucaci Andrew
0
327
Member Avatar for arunkumars

Hi, There has been a doubt on DataTable.Select method. I do not get an expected result when i query a datatable, if there is an 'AND' condition, i do not get a resultant data back into rows again. The code i have done is // clone to get the structure …

Software Development data-structure
Member Avatar for Mitja Bonca
0
1K
Member Avatar for Aviplo

Sorry if this is not the right place to post this but i really need help I'm trying to upload a file to a remote server by using vbscript below is a code : Dim fso, f, myFile Set fso = CreateObject("Scripting.FileSystemObject") myFile =$URL Set f = fso.GetFile (myFile) Dim …

Software Development client-server vb.net vbscript
Member Avatar for Aviplo
0
1K
Member Avatar for nav010

Anybody please help me to put delay in vb.net without freezing form

Software Development vb.net
Member Avatar for mad4x4
0
8K
Member Avatar for oscargrower11

Someone looking at my code today told me that I didn't need to delete a pointer I declared in one place because I didn't create it using the "new" operator and went on to say that you only have to delete them when you use the "new" operator to declare …

Software Development c++
Member Avatar for Lucaci Andrew
0
569
Member Avatar for poloblue

Good Afternoon, I'm having problems with the termination of C++ program that deals with else if statements within a while loop. Below is the code that I have so far. while (choice != 'y') { //get the choice cout<<"What is your choice? ('a' to 'd', or 'A' to 'D') =>"<<endl; …

Software Development c++
Member Avatar for Lucaci Andrew
0
121
Member Avatar for loserspearl

I'm making a math problem generator in visual c#, using a series of random number generators to create a unique math problem each time with some protocols implemented(later to use this for harder difficulties). There are different types of math to be used but right now I'm working on a …

Software Development assembly c c# c++ mathematics
Member Avatar for loserspearl
0
197
Member Avatar for triumphost

Why does the below crash? My pointer is still alive and is constructed in the main so it should not die until main returns :S I was using this with createthread a while back but my Mingw4.5 never supported it. I just upgraded to 4.7 but now this crashes and …

Software Development c++ ios
Member Avatar for triumphost
0
1K
Member Avatar for Dudearoo

I have a problem. im trying to have it(it being this program ive writen), to when i press it, for example w for a piece of code to be preformed. My code is as follows. int loopprocess = 0; int score = 0; int keycomand = getch(); while (loopprocess == …

Software Development c++
Member Avatar for Dudearoo
0
353
Member Avatar for da10x

Hi! I am trying to create an application in C# that will take a list of IPs from a text file and display whether or not a ping is returned from each IP. I was wondering if it was possible, with a loop or something similar, to create two labels …

Software Development c#
Member Avatar for da10x
0
172
Member Avatar for gowans07

Hi, i'm trying to get the following data from within the html tages <td class="colRight">CWCH60</td> where CWCH60 is the data which changes and needs to be extracted. I have tried the following Regex patterns [^td|<|>|/|class|\s|^="colRight"][A-Z|a-z|0-9]*[^</td>] [^<td][^\s][^class][^="colRight">][A-Z|a-z|0-9]*[^</td>] [^td\sclass=""colRight">][A-Z][a-z][0-9] all work fine in an online regex builder/tester but return WCH60 when executed. …

Software Development html-css regex vb.net
Member Avatar for gowans07
0
137
Member Avatar for mnewsome

Continuing with the Head First C# programming eBook. This is a windows form application. Followed the text: <i>__ Chapter 2 The IDE is great at writing visual code for you. But don’t take our word for it. Open up Visual Studio, create a new Windows Forms Application project, and see …

Software Development c# ide visual-studio
Member Avatar for Momerath
0
284
Member Avatar for ulasoc

i like to assign html codes to String variable Dim code As String code= " <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> " i think i am getting this error because of double Quotation marks "character constant must contain exactly one character." how can i assign it to a string?

Software Development vb.net
Member Avatar for ulasoc
0
206
Member Avatar for Haxifix

So, I wrote this snake game in C++ using SFML 2.0 RC and everything was working perfectly until I tried to implement frame independent movement. I understand how to do it, but I can't seem to make it work with my snake game. If the SCALE define is set to …

Software Development apple c++
Member Avatar for Haxifix
0
260
Member Avatar for triumphost

I have a header file that I include into my main.cpp file. I want to set some flags when this file is included. std::cout.flags(std::ios::boolalpha); I want to set that automatically how can I do this? I tried: #ifdef DEFINES_HPP_INCLUDED std::cout.flags(std::ios::boolalpha); #endif //Gives me the error: //error: 'cout' in namespace 'std' …

Software Development c++ ios
Member Avatar for mike_2000_17
0
131
Member Avatar for huynhminhsang

Write a LC-3 assembly language program to compute + - * / of complex numbers input form keyboard with the requirement below: number/ real parts / imaginary parts are signed integers give all prompts b4 inputting. outputting / 16 bits faceing to zero /mistakes. I can write a program to …

Software Development assembly
Member Avatar for TrustyTony
0
1K
Member Avatar for etsko

Hello, I have a problem with c++ windows form. I read a number of elements from first textbox and from second I have to read a height of these elements (i.e. n=5, heights = 150, 160, 170, 180, 190). I made it first in console app and works perfect, but …

Software Development c++
Member Avatar for Oxiegen
0
426
Member Avatar for Albino

struct pieces { string ap, bp, cp, dp, ep, fp, gp, hp, ip, jp, lr, rr, lk, rk, lb, rb, q, k; } b, w; Code 1>c:\users\will\documents\visual studio 2010\projects\chess\chess\pieces.h(3): error C2146: syntax error : missing ';' before identifier 'ap' 1>c:\users\will\documents\visual studio 2010\projects\chess\chess\pieces.h(3): error C4430: missing type specifier - int assumed. …

Software Development c++ visual-studio
Member Avatar for Albino
0
279
Member Avatar for heinlein_

I have a script where text is inserted into a scrolledText widget, using Pmw megawidgets. A tag is assigned to the text, and when you click on it, the text is hidden, that is, it changes color to the background color. To unhide it you click it again. What I …

Software Development python tkinter
Member Avatar for vegaseat
0
251
Member Avatar for triumphost

I'm trying to understand recursion and stack overflows. First, why does this not cause a stack overflow? Is it because the function returns every time and that the stack isn't populated upon each call? void Meh() { } int main() { while (true) Meh(); } Two, What is the difference …

Software Development c++
Member Avatar for mike_2000_17
0
108
Member Avatar for GlenRogers

Hey all I need a bit of help if someone can! im writing(trying to!) a small application for a friend who owns a computer repair shop. Its a 'booking in' application. Someone brings a computer/device in and whover is on the front desk takes some details. Name, Street, Town, Postcode …

Software Development java
Member Avatar for GlenRogers
0
339
Member Avatar for Mathspy

I wanna make some kind of funny application where I write in a textbox "Hay man" then press a button the text change to "man Hay" and so on even with increasing words on the textbox So I need to know how to: 1) make VB see that this is …

Software Development vb.net
Member Avatar for Mathspy
0
159
Member Avatar for xsltstarter

<xml> <head> <info> <content> <source attribute1="RSC1985s5c1" attribute2="6(17)"> data1 </source> <cite/> <case/> ( <target attribute1="LRC1985s5c1" attribute1="6(17)1"> 3e/191 </target> ) </content> <content> <source attribute1="RSC1985s5c1" attribute2="6(17)"> data2 </source> <cite/> <case/> ( <target attribute1="LRC1985s5c4" attribute2="6(17)1"> 4e/54 </target> ) </content> </info> </head> </xml> What i want is to merge the content of nodes in to …

Software Development xml
Member Avatar for Mike Askew
0
223
Member Avatar for Mikey12345

Hi I have a one form with code that has lots of subs and was wondering if i can shift some of these subs to a class or module to make the main form coding less clutered. Thanks

Software Development vb.net
Member Avatar for poojavb
0
231
Member Avatar for Sendy Hipo

erm i learn new thing, its a bad idea to use "using directive" inside a class declaration, because this can leads to ambiguous functions/statements inside the main program. using namespace std; the question is, is it okay to use "using declaration" inside a class declaration? such as : using std::cout; …

Software Development c++
Member Avatar for Sendy Hipo
0
454
Member Avatar for nuclear

I need to use forms, widgets etc. in my program which already takes care of creating a window and such. So the question is, would it be okay to use Windows lib to add the needed features, such as a form with a few widgets without any errors, memory leaks …

Software Development c++ microsoft
Member Avatar for Ancient Dragon
0
173
Member Avatar for lotusdream

Hi everyone,I'm tryind to do something about sound on linux.I basically record some sound and try to encyrpt it using algorithm.However,I encountered some sort of pointer problem.Both RSA algorithm and recording&listenin sound works properly. Here is my code: /* * rsa.c * * Created on: 24 May 2012 * Author: …

Software Development algorithm audio c
Member Avatar for Schol-R-LEA
0
392
Member Avatar for 4evrmrepylrning

Hi I am trying my hand at GUI using Python and Tkinter. I know there are probably better options out there but I only have access to Tkinter here at work. My question is this. I have written this: #!/usr/local/bin/python2.6 from Tkinter import * import os root = Tk() root.title("EIMA …

Software Development gui python tkinter
Member Avatar for 4evrmrepylrning
0
1K
Member Avatar for coroll

Hi ! I am writing simple email client that uses TCP/IP sockets to interact with an SMTP server to send email messages. this is my code import java.io.*; import java.net.*; import java.util.*; import java.text.*; public class TestSendMail { public static void main(String args[]) throws IOException { Socket socket; DataInputStream dataInput; …

Software Development client-server java
Member Avatar for NormR1
0
127

The End.