132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for rahul.ch

public class Thread8 implements Runnable { Demo d; public static void main(String r[]) { new Thread8().disp(); } void disp() { d = new Demo(); new Thread(new Thread8()).start(); new Thread(new Thread8()).start(); } public void run() { d.fun(Thread.currentThread().getId()); } } class Demo { static long f=0; synchronized void fun(long id) { for(int …

Software Development java
Member Avatar for JamesCherrill
0
232
Member Avatar for HTMLperson5

Ok, I'm confused, what is the difference between print "stuff" and print("stuff") They both have the same output!

Software Development python
Member Avatar for Gribouillis
0
215
Member Avatar for superjj

hoi I would like to learn how to work with databases. does anyone know a good tutorials or sites? because at this moment I know nothing about it. thanks in advance

Software Development sql
Member Avatar for superjj
0
334
Member Avatar for Doogledude123

when trying to output the string of a variable to a text file, the string try's to run and therefore pops up like this, %localDrive% 2>>fileCompare.log 'C:' is not recognized as an internal or external command, operable program or batch file. Any ideas?

Software Development shell-scripting
Member Avatar for HTMLperson5
0
259
Member Avatar for Macilath

Howdy, I'm trying to write a program that will copy files from one destination to another. After some reasearch it was suggested that I use SHFileOperation, and SHFILEOPSTRUCT. I'm trying to set the struct members accordance with [MSDN](http://msdn.microsoft.com/en-us/library/bb759795%28v=vs.85%29.aspx), however, I run into a problem with pTo and pFrom. The error …

Software Development api c++ microsoft
Member Avatar for nullptr
0
1K
Member Avatar for macca84

Hi, im trying to query an oracle db set up of table is all done and filling it is fine but when i try to send a query to the db using a resultset to store the outcome im getting the error "cannot convert int to ResultSet" ive looked at …

Software Development java oracle
Member Avatar for lain00
0
758
Member Avatar for txikiting

Hi everybody, I'm trying to make a program to get the file creation or access or modification date, but the program always is returning me this date "Thu Jan 1 01:00:00 1970". I tried lots of codes and heelps from the forum, of posts from other users, but the result …

Software Development c++ file-system
Member Avatar for txikiting
0
224
Member Avatar for anuran

can someone help me to begin with face expression detection in c++,i want to detect basic facial expression via camera in realtime.like this http://www.youtube.com/watch?v=n8wJ8tjmnmU

Software Development c++
Member Avatar for rubberman
0
502
Member Avatar for zaphoenix

Hi, I am trying to write a code that will calculate easter date within a year range.The problem i have is that no matter what date i put either within or outside the range i get the same output.Here is the code #A programme to calculate date of easter def …

Software Development python
Member Avatar for ZZucker
0
189
Member Avatar for eskavvas

Hey broskis! I've only taken one class in introductory programming and my internship wants me to organize some excel data (it's in txt now). We never went over files in my c programming class so I'm struggling with this code a bit. For practicing purposes my text looks like this. …

Software Development c file-system
Member Avatar for eskavvas
0
182
Member Avatar for itgrowsind

I am trying to set up a a program that gets four numbers from the user, also a random generator to get four numbers compare if any were the same and print out how many numbers were matching this is what I have so far... using System; class Program { …

Software Development c c# c++
Member Avatar for hericles
0
158
Member Avatar for bunnyboy

How can I cast a base class to a derived on at runtime. What I am trying to do is the following: I need a system which will hold the subscriptions, where a certain type of message, has an assigned Subscriber. When a message is received, it will bi forwarded …

Software Development
Member Avatar for bunnyboy
0
238
Member Avatar for Brickmack

I'm trying to write a program that needs to detect key presses, which I've already done using this code I found online: TERMIOS = termios def getkey(): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new[3] = new[3] & ~TERMIOS.ICANON & ~TERMIOS.ECHO new[6][TERMIOS.VMIN] = 1 new[6][TERMIOS.VTIME] = 0 termios.tcsetattr(fd, …

Software Development python ubuntu
Member Avatar for Brickmack
0
333
Member Avatar for skiabox

I have some files, consisting of end of day stock data in the following format : Filename: NYSE_20120116.txt <ticker>,<date>,<open>,<high>,<low>,<close>,<vol> A,20120116,36.15,36.36,35.59,36.19,3327400 AA,20120116,10.73,10.78,10.53,10.64,20457600 How can I create files for every symbol? For example for the company A Filename : A.txt <ticker>,<date>,<open>,<high>,<low>,<close>,<vol> A,20120116,36.15,36.36,35.59,36.19,3327400 A,20120117,39.76,40.39,39.7,39.99,4157900 (I don't want A.txt to contain the first line …

Software Development python
Member Avatar for skiabox
0
197
Member Avatar for thiemebr

Hi, I have 2 ddl, ddlCountry and ddlState, on selecting ddlCountry, the ddlState IS updated based on the chosen country BUT... when I select ddlState, the selected item in ddlState is not being masked as selected, thus I can't get the selected value. Here is the code: <asp:DropDownList ID="ddlReceiverCountry" runat="server" …

Software Development c c# c++
Member Avatar for thiemebr
0
1K
Member Avatar for werydude

Hello. I am a python noob asking a probably obvious question. I am making sort of a question game, although its still in the debugging stage. The problem is below. (Way below) #A simple game of common knowledge. #Dependecies import time start = "" lv1 = False lv2 = False …

Software Development python
Member Avatar for werydude
0
256
Member Avatar for richasr1

Im having a bit of trouble converting the delphi code below into c++, i'm sure I need to use a Switch statement but I seem to be getting it wrong. Basically, I have 6 panels mounted on a larger Panel, each caption will contain a random number. A button then …

Software Development c++ delphi
Member Avatar for IvanC
0
560
Member Avatar for dinhpham1991

Write a program that reads a set of measurements from a file called sensorDataRaw.txt. There are two columns of data in the file; the first is time in minutes and the second is height in feet. The program should read all of the data into two arrays, and then sort …

Software Development c++
Member Avatar for sfuo
0
197
Member Avatar for triumphost

I'm having a huge problem trying to learn how to export classes from a DLL. I can do some functions just fine but the classes are mangled :S I've tried from .def file, I've used extern "C" but when I did, it threw errors and won't export the class at …

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

This is my code: //VariableArguments3.java public class VariableArguments3 { static void test(String s,int ...v) { System.out.println("length:"+v.length+" String:" +s); for(int x:v) System.out.println("x="+x); } static void test(String s,double ...d) { System.out.println("length:"+d.length+" String:" +s); for(double x:d) System.out.println("x="+x); } } and //VariableArguments3.java public class VariableArguments3Test { public static void main(String args[]) { VariableArguments3.test("harshal",33,43,34,23,24); VariableArguments3.test("hosha",43,442); …

Software Development java
Member Avatar for hszforu
0
167
Member Avatar for grh1107

I'm Creating a class that I want to call a recursive function within it. However, the complier says i cant declare a function within a method, I was wondering how I could Recursively call that function, in the method, or how to recursively call that method, with out declaring the …

Software Development c++ pascal
Member Avatar for mike_2000_17
0
3K
Member Avatar for poloblue

Good Afternoon, How would you solve a question that states: assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the pseudocode to find the record with a specific studentID if every single student ID from 101 …

Software Development c++
Member Avatar for NathanOliver
0
280
Member Avatar for aasi007onfire

in our college we have a repeated C aptitude question... which goes like this.... [code] int i=5 printf("%d %d %d", i--,i,i++) [/code] and the answer given to us was 5,6,5.... when asked it was said that the compiler evaluates printf from right to left...... can somebody throw some light on …

Software Development c
Member Avatar for deceptikon
0
278
Member Avatar for hszforu

This is my code: //VariableArguments1.java public class VariableArguments1 { static void test(int ...v) { System.out.println("length:"+v.length); for(int x:v) { System.out.println("x="+x); } } } and //VariableArguments1Test.java public class VariableArguments1Test { public static void main(String args[]) { test(33,43,34,23,24); test(43,442); test(); } } Following are the errors i am getting: VariableArguments1Test.java:5: cannot find symbol …

Software Development java
Member Avatar for hszforu
0
133
Member Avatar for libathos

Hi,I'm writing a Java/Android application which consumes web services(these web services are written in .Net) from a certain URL.My problem is that some web services return to my application objects which are defined in .NET.Is there anyway my application can manipulate those objects?

Software Development android java
0
93
Member Avatar for massivefermion

I've read that C# compiler's name is csc.exe I have MonoDevelop3 And can't find a file with that name. Also can find nothing which looks like a compiler in MonoDevelop's directories. The documentations didn't help too. Could you help? Thanks

Software Development c c# c++
Member Avatar for massivefermion
0
153
Member Avatar for on93

what is local variable ???? what is it function for ???

Software Development c
Member Avatar for L7Sqr
0
150
Member Avatar for thiemebr

Anyone has any idea why this error is happening? The weird thing is that this page works in one server but not in another. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about …

Software Development file-stream vb.net visual-basic
Member Avatar for thiemebr
0
496
Member Avatar for gemini88

class Program { static int localVariable = 0; static int PropertyOne { get { return localVariable; } } static void set_PropertyOne(int newValue) { localVariable = newValue; } static void Main(string[] args) { } } **Error: already defines a member called 'set_PropertyOne' with the same parameter type** please give me reason …

Software Development
Member Avatar for gemini88
0
204
Member Avatar for mydreamgirl

I installed Apache Tomcat 7.0.28 in my JBuilder6. I use JDK 1.6.0_32 (jre6). I can get http://localhost:8080/ page. However, when I tried to run my JSP file, I encountered following error: org.apache.catalina.startup.Bootstrap start -config "C:\Documents and Settings\user\jbproject\whoznextdoor\conf\server8080.xml" -nonaming Jun 23, 2012 8:22:47 AM org.apache.catalina.startup.Bootstrap main WARNING: Bootstrap: command "-nonaming" does …

Software Development apache java
Member Avatar for mydreamgirl
0
368
Member Avatar for dwinn

Hi Everyone, I am programming an ordering site in VB.Net and ASP.Net. I start with the main ordering form and the idea is that the user will select a subject from the drop down list and then click a button to retrieve all modules associated with that subject in a …

Software Development vb.net
Member Avatar for dwinn
0
2K
Member Avatar for king03

hi guys I tried to generate random numbers in a console app but my code doesn't work. Anyone who can help me fix my code? Here's mine: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication { class Program { static void Main(string[] args) { private int RandomNumber(int min, …

Software Development c#
Member Avatar for ChrisHunter
0
269
Member Avatar for alaa sam

hey everyone Well currently I'm on a very long holiday and I'm trying not to waste my time doing nothing . So can any one tell me where I can get some tasks or anything to tell me what to implement ?? so that I can learn new things in …

Software Development c
Member Avatar for madelinekim
0
326
Member Avatar for newbie1234

How to implement sizeof api. Means sizeof is already there but i do not want to use that. Major question is .... If i want to use size of int. than i can get by pointer but do not know in the case of array of int. I think that …

Software Development api c
Member Avatar for sepp2k
0
129
Member Avatar for pritaeas

The `ReplaceStrings` function replaces all strings in `APatterns` found in `ASubject` with the value in `AReplacement`. As an example, I added the `RemoveStrings` function which replaces everthing with an empty string, thus deleting all strings found. Usage examples are in the XMLDoc comments. A good test will be to rewrite …

Software Development delphi pascal
Member Avatar for pritaeas
0
283
Member Avatar for lucasalf11

Hey guys, I want that when I press the F2 button on the textbox, a new form shows up. I have KeyPreview setted to true, and I am using a KeyDown event, here is the code: private void txtnumero_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.F2) { fmrplantnum sfpn …

Software Development
Member Avatar for lolafuertes
0
156
Member Avatar for nquadr

# What's wrong with this code? # Hi I have defined wb1 as a Workbook. I am trying to run this code `wb1.ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Select` It is supposed to select the last row in a cell, however it gives me an error Run-time error '1004' Application-defined or object-defined error. I am …

Software Development visual-basic
Member Avatar for samsylvestertty
0
106
Member Avatar for king03

hi guys just wanted to ask what's the purpose of a this.GetType() in c#. I saw it in our professor's example. Also what's the purpose of that little maroon circle on the left part of my screenshot and why is every code beside it highlighted in maroon as well? Please …

Software Development c#
Member Avatar for ChrisHunter
0
297
Member Avatar for skiabox

I have two panels. One with the price (OHLC) and a moving average, and one with the volume. I want to create a middle panel with to oscillators that oscillate around zero. Each oscillator is the difference of two moving averages of the chart above it. Is it possible? Thank …

Software Development java
Member Avatar for skiabox
0
198
Member Avatar for SoftEngGroupE

I need to load a BMP into C++ and code a program to convert it into a JPEG. I have very little programming experience and am wondering what libraries should be used to efficiently convert an image in this way. Is there a library that will convert the BMP straight …

Software Development c++
Member Avatar for palanethra.ag
0
653
Member Avatar for kerek2

Hi, I'm already using ORacle 11G . The problem is when i'm using System.Data.Oracleclient to pull blob into picturebox it's ok, but when i'm using OracleDataaccess.Client / Types.....there no image appear n comeout error " Parameter is not valid" in this coding :- > Quoted Text Here Dim bmp As …

Software Development oracle vb.net
Member Avatar for kerek2
0
563
Member Avatar for libathos

I want to consume a WCF service with DataContracts from my Android app, and I'm using Eclipse as my IDE. In .NET when I add a service reference I automatically get metadata and automatically-generated code for calling that service. Is there a way to do so in Java/Android/Eclipse? I wouldn't …

Software Development android ide java
Member Avatar for libathos
0
126
Member Avatar for triumphost

I have: 39H4-GTT7-LGLN And I'm trying to find every possible combination of sets. Basically each section is scrambled within itself. So there's only 16 combinations for each section. Example the first section I wrote it out as: 39H4 394H 349H 34H9 49H3 4H93 493H 4H39 9H34 934H 943H 9H43 H493 …

Software Development c++
Member Avatar for Lucaci Andrew
0
107
Member Avatar for alex130

I'm trying to compile the following program (file named test.cpp): #include "stdafx.h" int main(int argc, char* argv[]){ INPUT *buffer = new INPUT[1]; //allocate a buffer buffer->type = INPUT_MOUSE; buffer->mi.dx = 100; buffer->mi.dy = 100; buffer->mi.mouseData = XBUTTON1; buffer->mi.dwFlags = MOUSEEVENTF_LEFTDOWN; buffer->mi.time = 0; buffer->mi.dwExtraInfo = 0; SendInput(1,buffer,sizeof(INPUT)); delete (buffer); //clean …

Software Development asp c++ microsoft microsoft-windows
Member Avatar for JananiSekar
0
589
Member Avatar for lucasalf11

Hi guys I'm new here and willing to help in the future. Right now I'm developing a program, and I need to store the data selected in a combobox in a global variable, and use it in another form. Basically I have a combobox where you select a company, these …

Software Development
Member Avatar for hericles
0
143
Member Avatar for rahul.ch

Here when I execute the program, the output I'm getting on all the tries is 342 (naturally first 34 prints together then 2 seconds later 2 prints). My doubts is that is the order of start() [x.start() followed by y.start()] important in order of execution? Shouldn't the output be 234? …

Software Development java
Member Avatar for rahul.ch
0
267
Member Avatar for srinivas88

Hi, i'm using the following cmd to remove all lib files ending with .a find . -name "*.a" -exec rm -rf {} \; I have a file which i dont want to delete , say test.a, I just want to know how to make rm not delete test.a, but delete …

Software Development shell-scripting
Member Avatar for ramaakella
0
238
Member Avatar for shibu2all

void quick_sort (int *a, int n) { if (n < 2) return; int p = a[n / 2]; int *l = a; int *r = a + n - 1; while (l <= r) { while (*l < p) l++; while (*r > p) r--; if (l <= r) { …

Software Development c programming-construct
Member Avatar for sethlahaul
0
188
Member Avatar for sparsh610

hey starting data structers through pointers , i don't know how to reverse a singly linklist? pls help

Software Development c
Member Avatar for sethlahaul
0
172
Member Avatar for lastbencher

I made the following functions for deleting a node of a singly linked list. 1. Can these functions be improved furthur? 2. Is it necessary to free the memory of the node that is deleted? nodep deleteByValue(nodep p, int value) { nodep temp = p; if(temp->data == value) return temp->next; …

Software Development c linked-list
Member Avatar for sethlahaul
0
215

The End.