132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for nitin1

#include main() { int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris"); } how many times sun will be printed and how many times solaris will be printed ? and reason also. i know the fundamentals of fork() but still not able to catch the o/p here. thanks.

Software Development c
Member Avatar for lalitha2294
0
279
Member Avatar for EXTRA_RICE

i have this new problem i hope that im not a spam here in this site.but i have to do this bcoz i have no where else to go.sorry for my english hope u understand me.in the picture that i uploaded i have textbox1 and textbox2 their value comes from …

Software Development mathematics visual-basic
Member Avatar for Klahr_R
0
1K
Member Avatar for james.lu.75491856

If there's a class called `foo` and you do `d = foo().someboundmethod`, will the instance of foo stil be there?

Software Development python
Member Avatar for ~s.o.s~
0
186
Member Avatar for SaRa Ahmad

'Text2.Text = "C:\MyPath\MyDocument.pdf" 'Shell "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" & " " & Text2.Text, vbNormalFocus this code correctly work for one user pc, but other users that use the system cant be open the file , how i can make the file published??

Software Development pdf visual-basic
Member Avatar for Klahr_R
0
183
Member Avatar for shenn.to

I'm having hard time looking for a solution. :( How can i add tabs without duplicating it on the tabpages. I'm using list view to add tabs to the tabcontrol. These are my codes: Public Class frmMain Private Sub treeviewMain_NodeMouseDoubleClick(sender As Object, e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles treeviewMain.NodeMouseDoubleClick Dim page As …

Software Development vb.net
Member Avatar for Reverend Jim
0
1K
Member Avatar for rmad17

<%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title>Hello World</title> </head> <body> Hello World, <s:property value="name"/> </body> </html> I tried this code from an online tutorial. However eclipse says 'Can not find the tag library descriptor for "/struts-tags"' in line 2. Do I need to set …

Software Development java
Member Avatar for rmad17
0
303
Member Avatar for jshlmnc

I am having trouble getting started with my program. I have writen the array but I am having trouble starting the if statemnent to fill the seats in the program. If they press 1 it needs to fill seats 1 through 5 if they press 2 it needs to fill …

Software Development java programming-construct
Member Avatar for JamesCherrill
0
315
Member Avatar for siu17

i need a code to enter data into a textbox and update an access database table which must be displayed in my listbox, please help i also want to know hoe to search data in the table

Software Development visual-basic
Member Avatar for Need u:
0
1K
Member Avatar for EXTRA_RICE

im doing a program in vb6.0 and im using datagrid as my table for database. i want to print selected rows in datagrid... the system im working on is inventory system printing the selected rows..help me thanxx..

Software Development vb.net visual-basic
Member Avatar for EXTRA_RICE
0
363
Member Avatar for EXTRA_RICE

i cant print selected rows in datagrid so now i have to export the selected rows in excel file so in that way i can print the selected rows..thanx

Software Development visual-basic
Member Avatar for EXTRA_RICE
0
520
Member Avatar for sireiz

I am new to programming and i am now free for 2 months after my exams, i want to learn some basic and very necessary classes or their functions or objects which are used for file folder handling. Kindly suggest some methods which i can learn.

Software Development c c# c++
Member Avatar for sireiz
0
266
Member Avatar for hueikar

I put this code at App.config for winform. <appSettings> <add key="DocumentVault" value= "\\10.100.100.10\C$\SomePath\SomeWhere\Else\"/> </appSettings> but why I still can't access the filepath?

Software Development vb.net
Member Avatar for ShahanDev
0
111
Member Avatar for Swapnil Palande

Hi all, Please help me solving following query: How to add global variable in C# window base application. This variable must be accessible to all forms. What I exactly want is: I have a variable "UserName" and "UserType". When user click "Submit" button on Login form, user name get stored …

Software Development c#
Member Avatar for Quezo
0
9K
Member Avatar for tanatos.daniel

I have the following code: #include <iostream> #include <conio.h> using namespace std; long filesize(FILE *stream); int main(void) { FILE *stream; char c; int i=0,n; long lSize; stream = fopen("tanc.TXT", "r"); fseek (stream , 0 , SEEK_END); lSize = ftell (stream); rewind (stream); cout<<"Dati numarul de caractere:"; cin>>n; while(!feof(stream) && i<lSize) …

Software Development c file-stream file-system
Member Avatar for Sokurenko
0
298
Member Avatar for tanatos.daniel

I have the following structure: CObject { protected: char *mName; public: CObject(char *n) { mName=strdup(n); } }; CVector:public CObject { char *mValues[50]; int mElements; public: CVector(char *n):CObject(n) {} }; CMatrix:public CObject { char *mValues[50][50]; int mLines; int mColumns; public: CMatrix(char *n):CObject(n) {} }; My main function: int main() { pV=new …

Software Development c++ oop
Member Avatar for deceptikon
0
418
Member Avatar for jacksmith655

Hi all, please i need help. i trying to write simple program in c# express 2010 in console application: i am trying to write program to put 5 numbers on array and the check if have 2 Consecutive numbers(2 and 3 or 8 and 9 etc...) if yes the program …

Software Development
Member Avatar for tinstaafl
0
237
Member Avatar for sireiz

I have to write a code in which i want to use 3 dimensional array but i am reaaly confused that how 2 dimen array is indexed. 2x2 array can easily be indexed 00 01 10 11. so how a 3 dimen one can be indexed?

Software Development c++
Member Avatar for Ancient Dragon
0
178
Member Avatar for heatherrgoodwyn

I am using vb.net ajax to load a crystal report located on the server - sometimes it works and other times the call to .export just hangs sql server and we have to restart the sql server. I can't find any discussions of this error anywhere and I'm sick of …

Software Development sql vb.net
Member Avatar for Begginnerdev
0
295
Member Avatar for lewashby

In the following program, why is the count function failing? I'M getting an error that it needs at leat one argument and that I have given it 0. I have here count(number), how is number no an argument? According to the documentation the start and end points are optional. I …

Software Development python
Member Avatar for lewashby
0
1K
Member Avatar for james.lu.75491856

Traceback (most recent call last): File "C:/Users/James/Desktop/Quikemail.py", line 54, in send s.sendmail(me, you, msg.as_string()) File "C:\python 25\lib\email\message.py", line 131, in as_string g.flatten(self, unixfrom=unixfrom) File "C:\python 25\lib\email\generator.py", line 84, in flatten self._write(msg) File "C:\python 25\lib\email\generator.py", line 116, in _write self._write_headers(msg) File "C:\python 25\lib\email\generator.py", line 162, in _write_headers header_name=h, continuation_ws='\t').encode() File "C:\python …

Software Development email python
Member Avatar for Gribouillis
0
3K
Member Avatar for nitin1

int ** foo(int row) { int *arr[100]; for(int i=0;i<10;i++) { arr[i]=malloc(sizeof(int)*10); } int **p=(int**)arr; return p; } what is the problem with this code snippet ? it is not a homework. it is my interview question.

Software Development c
Member Avatar for deceptikon
0
113
Member Avatar for Labdabeta

Hello, I have a chain of inherited classes like this: class A { protected: int a; public: int getA(){return a;} }; class B:public A { protected: int b; public: int getB(){return b;} }; Based on that you can see that the public can only read the values in those classes, …

Software Development c++ oop
Member Avatar for Labdabeta
0
257
Member Avatar for cool_zephyr

how can we get the list of all the classes that are currently loaded in the Java Virtual Machine(JVM)?? it'd be better without the use of any external libraries..thank you.

Software Development java
Member Avatar for rubberman
0
7K
Member Avatar for Minko

Hello, I am getting an error on this line: ReceivedData = NetStream.Read(CryptData, 0, Size) This is the information it gives me: A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.dll Additional information: Specified argument was out of the range of valid values. If you could help me understand why …

Software Development vb.net
Member Avatar for Minko
0
261
Member Avatar for dreking6

am a python beginner, receeently started learning about classesand i wrote this got this little code that keeps bringing this error . please i need someone here to help debug it: class employee(): ` empcount=0` def _init_(self,name,salary): self.name=name self.salary=salary employee.empcount=+1 def displaycount(self): print 'Total employee: %d' %employee.empcount def displayemployee(self): print …

Software Development oop python
Member Avatar for dreking6
0
6K
Member Avatar for ammukarthi

how to create xml file from a database table using vb.net I tried a code but it doesn't retrive values from the database table How to resolve this And my code is: <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" Debug="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> …

Software Development client-server ide sql vb.net xml
Member Avatar for ammukarthi
0
1K
Member Avatar for matt.harding.14203

For the below program: import java.util.*; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String leftOrRight; char hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); kbd.nextLine(); System.out.println("What side do you want the hypoteneuse …

Software Development java
Member Avatar for JamesCherrill
0
269
Member Avatar for Eruditio

I have a form containing a tab control, which itself contains five tab pages. These tab pages contain lists, textboxes, and other controls that I update when the user enters the relevant page. One of the tab pages contains a textbox which I fill with information from an external text …

Software Development vb.net
Member Avatar for Eruditio
0
671
Member Avatar for nel gomez

Good Day! I'm downloading files from ftp site using vb .net but unfortunately I encountered exception - "Access to the path 'C:\samplefolder' is denied." Don't know what exactly is the problem and as I searched the codes are good and running.. Please do help, I'll really appreciate it... Thanks and …

Software Development vb.net
Member Avatar for pritaeas
0
720
Member Avatar for dustin.hunt1

I'm currently builting a script for a church here in town to parse through the Bible and find select verses. I currently am using the KJV which is just in a single .txt file. Here is some sample from the text file: 1:1 In the beginning God created the heaven …

Software Development python
Member Avatar for slate
0
890
Member Avatar for matt.harding.14203

I'm having trouble with this: import java.util.Scanner; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); System.out.println("What side do you want the hypoteneuse on? (left/right)"); …

Software Development java
Member Avatar for cmps
0
2K
Member Avatar for Lp_baez

I was trying to array a string within a string. And I keep on receiving a compiler error. So I’m wondering if is even possible to string a string within a string? Because that’s the error I keep on getting. If not then what is another way to create a …

Software Development c c# c++
Member Avatar for Lp_baez
0
476
Member Avatar for vividiah

how to make a looping with a array? this is my program, it make a visual basic 6. this is program to input a many song to database, and the list song in a list box. if we selected one song in a list, otomatic specific song will appear in …

Software Development visual-basic
Member Avatar for vividiah
0
233
Member Avatar for CoilFyzx

Hello everyone. I have successfully added an image to my JPanel, but what I want to do is this: I want to be able to mark a section of the image as clickable. Then when the user clicks within that section, I run some action. So essential I want to …

Software Development gui html-css image java web-design
Member Avatar for sirlink99
0
228
Member Avatar for pars99

I have always had this question, but I couldn't quite find anything that answered it. I was hoping someone could shed some light on the question... Thank you in advance.

Software Development c++
Member Avatar for mike_2000_17
0
2K
Member Avatar for glut

Hi, I've already posted a thread about this on stackoverflow, but nobody has said anything useful, and it's been a day since it has been posted. I'm trying to scan for a memory address in a targeted process, but it goes really really slow. Either that, or there's something wrong …

Software Development motherboards-cpu-ram
Member Avatar for glut
0
457
Member Avatar for tanatos.daniel

I have an abstract class CArticle and two derived classes CBook and CMagazine. I also have a class CLibrary where i want to add articles. Its members are an int variable to count the articles and a double pointer of CArticle. I have the following main function: int main() { …

Software Development c++
Member Avatar for tanatos.daniel
0
449
Member Avatar for Mr Programmer

Hello, I had really less experience in VB. NET (creating small and basic applications, working with progressbars, buttons and other really easy and basic stuff). I know that C# is more powerful (but hard, too) than VB. NET. So, I am deciding to create programs at a more pro level. …

Software Development c c# c++
Member Avatar for <M/>
0
219
Member Avatar for Hamza_4

Hello everyone, I am new to programming and I was wondering if anyone could help me out. I have hundreds of CSV files in a folder that I need to edit and resave. Can anyone give me a bit of code to start me off properly?

Software Development python
Member Avatar for Hamza_4
0
384
Member Avatar for pauldespre

I want to write a script that logs an user into Facebook and initialize oauth dialog to get the access_token(*I don't want to log in into a website using facebook account!*). I don't want to use facebook-sdk,pyfb etc. This is what I've tried: import sys, urllib2,json,urlparse,webbrowser, os, cookielib, re class …

Software Development api python social-media
0
230
Member Avatar for CoilFyzx

Hello Good day. I have an interesting question as it relates to adding a background image to a JPanel (or whichever component is best for what I'm trying to achieve. Hopefully I'll get some help here.) I have a large picture that I want to use as a background image …

Software Development display gui html-css image java web-design
Member Avatar for CoilFyzx
0
419
Member Avatar for Labdabeta

Hello, I was just noticing that the 'const'ness of references often causes me to rewrite a large chunk of my code with pointers. For example if I have a class that needs access to a large amount of data from another class I would love to use a reference. However …

Software Development c++
Member Avatar for mike_2000_17
0
410
Member Avatar for olegb

HELP !! THis is driving me insane, I already spent 2 hours on this and can't seem to resolve it. Here is the problem: I have a backgroundimage for my listview in vb.net I programmatically (see below) add items to the list. All items have a white or other solid …

Software Development asp.net html-css listview vb.net
Member Avatar for olegb
0
660
Member Avatar for manalibhadula

Hi , I am new to hibernate and facing issues with composite key mapping.Please help,.While running class name Example,At line 36:- **List sites = session.createQuery("Select h from SiteStageDto h").list();** code is returning null pointer,the hql is returing right query but unable to fetch data to list. I am also posting …

Software Development java session
Member Avatar for manalibhadula
0
339
Member Avatar for nblackburn

I am string to convert a string to a constant as the `StringChangeEx` function takes the second argument as a const but i have it as a string and am unsure how to get this function working as i am new to pascal. The problem is in the BackupFile function …

Software Development pascal
Member Avatar for nblackburn
0
326
Member Avatar for ogrishmania

This is what I try to achieve: *serialize a class to a binary file *get a BindingList(of class) or List(of class) from the binary file *display the list in a DataGridView I get InvalidCastException when I try to get info from the file. My class: Imports System.ComponentModel Imports System.IO Imports …

Software Development encryption vb.net
Member Avatar for gusano79
0
177
Member Avatar for gsdguru

I have been looking at the code below and it is driving me nuts. Can anyone explain the error and resolution? When I compile to code below I receive the following compilation error: cannot find symbol symbol : class User location: class com.atlassian.jira.rpc.soap.beans.RemoteUser package com.atlassian.jira.rpc.soap.beans; import com.atlassian.jira.user.util.UserManager; import com.atlassian.jira.user.util.UserUtil; public …

Software Development java
Member Avatar for gusano79
0
396
Member Avatar for np complete

In our college we practice python on ssh. This command prints all the computers ( processes ) logged in. ps -A | grep bash I was wondering how to obtain my process ID for that session.

Software Development session shell-scripting
Member Avatar for L7Sqr
0
288
Member Avatar for EXTRA_RICE

i have 3 textbox text1 & text 2 for input & text3 for sum of text1 and text2.plss help me guysss

Software Development visual-basic
Member Avatar for rishif2
0
143
Member Avatar for G_Waddell

Hi All, I'm fairly new to using Linq but I thought I had a handle on it, apparently not though. I'm processing an XML file sent out as an error report by a third party. I have no control over this file and it has been developed to an industry …

Software Development asp.net vb.net xml
Member Avatar for G_Waddell
0
657

The End.