132,726 Archived Topics
Remove Filter ![]() | |
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++ | |
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 | |
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 | |
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++ | |
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++ | |
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 | |
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++ | |
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 | |
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 | |
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 … | |
![]() | 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 … |
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 | |
# 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 | |
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 | |
[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 | |
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 | |
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 | |
**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 … Software Development dataset session vb.net visual-basic visual-studio | |
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 | |
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 | |
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 | |
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 < … | |
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 | |
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 | |
Anybody please help me to put delay in vb.net without freezing form Software Development vb.net | |
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++ | |
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++ | |
![]() | 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 ![]() |
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 … | |
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++ | |
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# | |
![]() | 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. … ![]() |
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 | |
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 | |
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 … | |
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' … | |
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 | |
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++ | |
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 | |
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 … | |
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++ | |
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 | |
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 | |
<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 | |
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 | |
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++ | |
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 … | |
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: … | |
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 … | |
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 |
The End.