1,443 Posted Topics

Member Avatar for chintan_1671

Your best bet would be to create a test project with the same types of objects on both sides of the = sign. Fill the right side with values and watch it copy from right to left in the debugger. Also, when I converted an MFC project to MFC+CLI, I …

Member Avatar for thines01
0
217
Member Avatar for phoenix911

Do you need actual return values from the Java project? If not, I would just create a batch file that sets the directory and calls the java module, but spawn the batch file from C# using System.Diagnostics.Process.Start(...);

Member Avatar for phoenix911
0
76
Member Avatar for Arjun_Sarankulu

If getdate() is coming from the database, don't use a parameter with it; just hard-code it like what is in your example. You can use a parameter with everything else.

Member Avatar for Arjun_Sarankulu
0
155
Member Avatar for jerome2467

1) You can store the user data in a database and read it from each application. 2) You can use Sockets to send messages between the apps. 3) You can use WCF (and the like) to send messages between the apps.

Member Avatar for ddanbe
0
163
Member Avatar for fashxfreak

With a little help from Linq, you can reduce the number of lines of code. [CODE] using System; using System.Collections.Generic; using System.Linq; namespace DW_371861 { class Program { static void Main(string[] args) { Console.Write("\t\t\t** Developed by : GE **\n\n" + " Enter number here in range 0-50 : "); string …

Member Avatar for thines01
0
526
Member Avatar for dennysimon

If you're using the ADO classes, you'll never need anything like this. The only thing I've seen on MysqlDump is a reference to a command-line tool for backking up the database. [url]http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html[/url]

Member Avatar for thines01
0
57
Member Avatar for Acidburn

There is a problem when the items you're capturing are wrapped in something that can be caught by the Regular Expression. You might need to remove some unwanted elements before using a Regex. Are you reading this as one string or multiple? Does it really need to be a regular …

Member Avatar for thines01
0
148
Member Avatar for xanawa

Since no database type was specified, I'll make this generic. Assuming you have an ODBC data source and it is set up in your Odbc Administrator... [CODE] using System; using System.Data.Odbc; namespace Dani_368900 { class Program { static void Main(string[] args) { using (OdbcConnection conn = new OdbcConnection("DSN=...")) { conn.Open(); …

Member Avatar for de Source
0
126
Member Avatar for cppgangster

If you are using Visual C++, there are a lot of libraries available. Oracle is probably the most popular. If you're using Visual Studio, you would add a reference to System.Data.OracleClient. ...then (in your code) add [CODE] using namespace System::Data::OracleClient; [/CODE]

Member Avatar for cppgangster
0
122
Member Avatar for croker10

Even though the thread is old... [CODE] using System; using System.Linq; namespace Dani_312188 { class CDani_312188 { static void Main(string[] args) { string[] arr_strDays = {"Tuesday", "Thursday", "Saturday" }; DateTime? dt1 = null; int intRnd = (new Random(DateTime.Now.Second)).Next(); if (0.Equals(intRnd % 2)) dt1 = DateTime.Parse("18-June-2011"); bool blnIsMatch = ( null …

Member Avatar for thines01
0
246
Member Avatar for DoEds

Do you mean something like this?: [CODE] #include <stdio.h> #include <string.h> int main(int argc, char** argv) { char strData[128] = {'\0'}; int intMiddle = 0; do { puts("Please enter some data"); gets(strData); } while(NULL == strData[0]); intMiddle = (int)(strlen(strData)/2); printf("The middle is [%c]\n", strData[intMiddle]); } [/CODE]

Member Avatar for krutarth
0
3K
Member Avatar for Jreynolds3

I changed the name because ECHO is a dos command. [CODE] ; anEcho : Compiled with A86 (http://eji.com/a86/) ; This program shows how to get user input with echo. ; mov ah, 09h mov dx, askName; int 21h ; Ask for user name mov cx, 0ah mov si, userName ; …

Member Avatar for vhan
0
6K
Member Avatar for c00l

What kind of numbers? The easiest thing might be to convert the number to a string, then use interrupt 21H/9H to show it.

Member Avatar for gacha23
0
170
Member Avatar for prajaktaran

[url]http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executenonquery.aspx[/url]

Member Avatar for finito
-1
98
Member Avatar for Srcee
Member Avatar for Srcee
0
204
Member Avatar for Srcee

You can type in the code using DEBUG at the DOS command-line and step through each command and watch the registers. [CODE] C:\science>debug -a 1424:0100 mov ax, 1010 1424:0103 mov ah, 5 1424:0105 add al, 5 1424:0107 -r AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=1424 ES=1424 SS=1424 CS=1424 …

Member Avatar for Srcee
0
91
Member Avatar for k1robert

...if the lines are separated by CR/LF... You could do something like this: [CODE] /* * Open Database here */ StreamReader fileIn = new StreamReader(@"c:\science\Test.txt"); string strData = ""; List<string> lst_strRecords = new List<string>(33); while (!fileIn.EndOfStream) { strData = fileIn.ReadLine(); if (string.IsNullOrEmpty(strData)) { lst_strRecords.Add(""); continue; } if (strData.Contains((char)12)) { PutRecordsInDatabase(lst_strRecords, …

Member Avatar for thines01
0
195
Member Avatar for .11
Member Avatar for UNOWN

Use a WebClient OpenRead the webpage Look for the "<img" tag Download whatever is there. Hope for the best.

Member Avatar for UNOWN
0
2K
Member Avatar for Plato

If you have a fully formed URI, you will not need to call it via POST, you can use GET or just let it default. You can also use a WebClient to do what you're attempting. Here are two simple methods of calling to a "cgi" (for lack of a …

Member Avatar for Plato
0
137
Member Avatar for jonnyboy12

[QUOTE] gusano79> In this case, you'd see a matching pop eax later in the code.[/QUOTE] Yes, it all depends on where you find the POP. It could simply be a fake value for a parameter in a function call or it could send the program a different route depending on …

Member Avatar for theifyppl
0
125
Member Avatar for larvee

Any particular processor? Here's some fun code: [CODE] ; CHRGRP.ASM : Compiled with A86 (http://eji.com/a86/) ; Do not use the Ampersand (&) (special char to separate commands in DOS. ; ------------------------------------------------------------------------ ; This program will take bytes from the COMMAND-LINE & evaluate them for ; their TYPE (Numbers, Characters, Punctuation). …

Member Avatar for thines01
-1
3K
Member Avatar for sanam2010
Member Avatar for thines01
0
56
Member Avatar for sana zafar
Member Avatar for mrnutty
0
119
Member Avatar for krishnisilva

What type of database? Are you wanting to insert "fields" or just a file name and location? Do you want the data to be searchable when it's inserted?

Member Avatar for krishnisilva
0
91
Member Avatar for hqt
Member Avatar for bent_al3z4114

Can you write a program that just prints the words (strings) you have above? ...even with the __blanks__? That would be a good first step.

Member Avatar for Nick Evan
-4
106
Member Avatar for Cap'nKirk
Member Avatar for Cap'nKirk
0
117
Member Avatar for slicer

If the operand is a byte value, DIV divides the contents of AX by the contents of the operand, then stores the result in AL and the remainder in AH. If the operand is a WORD value, DIV divides the contents of DX:AX by the contents of the operand, then …

Member Avatar for slicer
0
12K
Member Avatar for Blax

I'm not real sure what this is SUPPOSED to do, but try this: [CODE] public class perfectnums { public static void main(String[] args) { int t = 2; int c = 0; for (int n=1; n < 5; n++ ) { t++; c = 2^(t-1)*(2^t-1); if (c > 0) { …

Member Avatar for Blax
0
166
Member Avatar for chandruswami

[code] static void Main(string[] args) { string strValue = "a, ,b,-,c,d, ,"; string[] arr_strData = strValue.Split(", -".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); Console.WriteLine(string.Join(",", arr_strData)); } [/code]

Member Avatar for thines01
0
185
Member Avatar for johndoe444

With an assert, you're testing for any condition you want to be "true": assert (1 < 2); // passes assert (1 != 2); //passes assert (1 > 2); // fails The asserts are used when you run the jvm with the -ea parameter. //enable assertions java -ea myCode any failed …

Member Avatar for johndoe444
0
198
Member Avatar for 825

Do you actually need the comma character also? If not, check this out: It is fixed to take only a single digit number. [CODE] ; CntDown mov SI, 005Dh ; location of command-line parameter mov cx, [SI] ; put value in CX cmp cl, 20h ; Is the value empty? …

Member Avatar for b1083
0
118
Member Avatar for Shotty

Start with this change: from [CODE]for(int k =0; k ==100; k++)[/CODE] to [CODE]for(int k =0; k < 100; k++)[/CODE]

Member Avatar for javaAddict
0
133
Member Avatar for kingsboro2008

I suggest you simply read the data in as a string and first split it by the semi-colon, then feed the rest of the line to a class that will parse it into member variables. If you can make your data consistent (either by fixed positions or fixed delimiters), it …

Member Avatar for kingsboro2008
0
97
Member Avatar for sidd.

You need a "while" loop. something like: [code] //Open file here while(!sr.EndOfStream) { string s = sr.ReadLine(); //... } /// close file here [/code]

Member Avatar for sanch01r
0
161
Member Avatar for yatman

Here is some C++ (CLI/.NET) code to convert those to In32 values: [CODE] // BinaryStringFile.cpp : main project file. #include "stdafx.h" using namespace System; using namespace System::Collections::Generic; using namespace System::IO; Int32 BinStringToInt32(String^ strBinary) { Int32 intRetVal = 0; Int32 intStart = 1; for(int intLoop=(strBinary->Length-1); intLoop >=0 ; intLoop--) { intRetVal …

Member Avatar for donaldw
0
384
Member Avatar for triplea_2005

Examine this: [CODE] import java.util.Scanner; import java.util.*; class States2 { public static void main(String [] args) { Scanner userInput = null; String strStateAbbrev = ""; String[] arr_strStatesAbbrev = {"AL", "FL", "GA", "NC", "SC"}; String[] arr_strStatesNames = {"Alabama", "Florida", "Georgia", "North Carolina", "South Carolina"}; Hashtable<String, String> map_s2sStates = new Hashtable<String, String>(); …

Member Avatar for thines01
0
102
Member Avatar for borland7

Begin by getting a book. Download an assembler (like A86). Start coding. [url]http://eji.com/a86/index.htm[/url]

Member Avatar for thines01
0
37
Member Avatar for Lukezzz

There are a couple of techniques I would use to get that token. The best is probably a regular expression (Technique2). The other does a brute-force Split() twice to get the token. [CODE] #include "stdafx.h" using namespace System; using namespace System::Collections::Generic; using namespace System::Text::RegularExpressions; String^ Technique1(String^ strRawData) { array<String^>^ arr_strData1 …

Member Avatar for thines01
0
122
Member Avatar for skrithikaa

There's really nothing special other than just outputting HTML syntax inside of a file named with an htm or html extension. [CODE] fileHtml = File.new("fred.html", "w+") fileHtml.puts "<HTML><BODY BGCOLOR='green'>" fileHtml.puts "<CENTER>this is neat</CENTER>" fileHtml.puts "</BODY></HTML>" fileHtml.close() [/CODE]

Member Avatar for skrithikaa
0
3K
Member Avatar for hapyharra

Here is something I snagged years ago: I believe it will compile as raw C : [url]http://www.cs.chalmers.se/Cs/Grundutb/Kurser/d3projekt/OldYears/1997-98/ProjektgruppernasWWW/7/Simulatordelar/hex2dec.cpp[/url] and the header file: [url]http://www.cs.chalmers.se/ComputingScience/Education/Courses/d3projekt/OldYears/1997-98/ProjektgruppernasWWW/7/Simulatordelar/hexdec.h[/url]

Member Avatar for gerard4143
0
163
Member Avatar for kjiu

Do you need to print it to a printer? What type of file and what operating system?

Member Avatar for kjiu
0
78
Member Avatar for _dragonwolf_

The array cards has chars in it You can't convert "JS" to a number. Maybe you need the OFFSET into the chars array. or Maybe you want to count if a particular card appears in the list in the hand exactly twice.

Member Avatar for thines01
0
139
Member Avatar for Fujy

What is your program supposed to do? It looks like: 1) you want to copy 100 unused characters into str to pnt 2) you want to wait for the user to type the word "echo", then you will print it 100 times. Is that right? If so, you will need …

Member Avatar for thines01
0
365
Member Avatar for fiaz ranjha

There is nothing wrong with your code. I added this to test it in the debugger: [code] int main(void) { auto Account act1; auto Account act2("fred", 2); auto Account act3(act2); // copies act2 /* ...if member variables are public, try this: printf("%d\n", act1.Amount); printf("%d\n", act2.Amount); printf("%d\n", act3.Amount); */ } [/code]

Member Avatar for thines01
0
91
Member Avatar for BeyondTheEye

[CODE] string dec2bin2(int intNum) { //2147483648 = INT_MAX string strRetVal = ""; int intTemp = intNum; for(unsigned long ulngLoop = ((unsigned long)1+INT_MAX); ulngLoop > 0; (ulngLoop/=2)) { if((unsigned)intTemp >= ulngLoop) { strRetVal += "1"; intTemp -= ulngLoop; } else { strRetVal += "0"; } } return strRetVal; } [/CODE]

Member Avatar for thines01
0
120
Member Avatar for mandangalo

Where is your "Main" ? I added a new code file (called it Main.cs) and included this: [code] namespace StarterFiles { class CStarterFiles { public static void Main(string[] args) { PeriodicTableUI ptui = new PeriodicTableUI(); ptui.RunProgram(); } } } [/code] The output did not crash because the constructor initializes the …

Member Avatar for ddanbe
0
222
Member Avatar for kernel>panic

Here is a .NET implementation of that: [CODE] // KillAFile.cpp : main project file. #include "stdafx.h" using namespace System; using namespace System::IO; int main(array<System::String ^> ^args) { String^ strUser = ""; // do { Console::WriteLine(L"Enter user ID"); } while("" == (strUser = Console::ReadLine())); File::Delete("C:\\Users\\"+ strUser + "\\Documents\\help"); return 0; } …

Member Avatar for thines01
0
122
Member Avatar for paruse

The absolute easiest way to test this is to write a small console app with those code elements in it and step through the execution and watch what happens to the variable. If you need a compiler: [url]http://www.microsoft.com/express[/url]

Member Avatar for thines01
0
208

The End.