1,443 Posted Topics

Member Avatar for ziggystarman

If you brute-force convert the bytes to a BYTE[], what happens? [CODE] // ByteArrayTest.cpp : main project file. #include "stdafx.h" #include <afx.h> using namespace System; array<Byte>^ GetBytes(String^ str) { array<Byte>^ arr = gcnew array<Byte>(str->Length); for(int i=0; i< arr->Length; i++) { arr[i] = str[i]; } return arr; } void ProcessBytes(BYTE* byt, …

Member Avatar for ziggystarman
0
2K
Member Avatar for Alviery

1) Create a setPosition method that has a parameter of an Employee object and parameters of the new values.

Member Avatar for thines01
0
100
Member Avatar for lxXTaCoXxl

Are you attempting to sign some code? Are you attempting to use a signed assembly that you have not trusted?

Member Avatar for thines01
0
47
Member Avatar for vincezed

What are you going to do with it when you convert it? Are you just trying to add it to a panel or something?

Member Avatar for skatamatic
0
132
Member Avatar for james6754

[QUOTE=james6754;1698358]silly thing...does anyone else have this problem?[/QUOTE] In older versions I found that I needed to leave a blank line underneath the last closing brace or it would not compile. So, is it fixed? Do I need to make some sample code? :)

Member Avatar for mikrosfoititis
0
234
Member Avatar for terence193

When do you put a value in x? ...and is x supposed to be an array of three integers?

Member Avatar for terence193
0
228
Member Avatar for danielagaba
Member Avatar for PapaGeek
Member Avatar for lo0lo0999

1) Make a backup copy of your program. 2) Change the word "struct" to the word "class" 3) Attempt to compile. Once the errors are fixed, you will understand.

Member Avatar for thines01
0
99
Member Avatar for hemj

You never set a value for the "temps" that is in main() before it is passed to DisplayTotals()

Member Avatar for mikrosfoititis
0
129
Member Avatar for jineesh

Are the parameters for your connection string correct? Are you using a SqlConnectionStringBuilder?

Member Avatar for Fruit Alchemist
0
118
Member Avatar for besjana
Member Avatar for XF15-Loader

If the arrays are the same size and sorted the same way, you can just associate them by their position 0-51 or 1-52. If they are always to be "together", you might as well create a class that contains the value and the image.

Member Avatar for XF15-Loader
0
109
Member Avatar for deva89
Member Avatar for gahhon

[url]http://www.java2s.com/Code/JavaAPI/javax.swing/JButtonaddActionListenerActionListeneract.htm[/url] You should put the button listener in a new module (maybe called ButtonListener) that will hold and respond to your actions: [CODE] import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class ButtonListener implements ActionListener { ButtonListener() { } public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("Login")) { System.out.println("User Clicked Login"); } if (e.getActionCommand().equals("Register")) …

Member Avatar for thines01
0
276
Member Avatar for ninjatalon

Well, you can encrypt the transactions with something like PGP. PGP has an API you can purchase. [url]http://www.symantec.com/business/netshare[/url] You can also use digital certificates on your server and require a certificate from your clients Here is an article on PKI [url]http://www.itechtalk.com/thread1656.html[/url]

Member Avatar for thines01
0
110
Member Avatar for PapaGeek

Start with something like this: [CODE] // DW_396087.h #pragma once using namespace System; namespace DW_396087 { public ref class WebSite { public: WebSite(void); WebSite(String^ domainName, String^ localPath); bool operator < (WebSite); String^ name; String^ path; }; } [/CODE] //...and the body... [CODE] #include "stdafx.h" #include "DW_396087.h" using namespace System; namespace …

Member Avatar for thines01
0
328
Member Avatar for noobprogrammerr

If you are planning to return the eventID and the eventDesc as an EventEntity, you will need to new them as an EventEntity. Something like (JUST GUESSING): [CODE] public List<EventEntity> GetDetails(string uid) { EventDBModelDataContext ct = new EventDBModelDataContext(); List<EventEntity> detail = ct.EventEntities.Where(d => d.eventID.Equals(uid)) .Select(d => new EventEntity(){ eventID=d.eventID, eventDesc=d.eventDesc …

Member Avatar for thines01
0
105
Member Avatar for DasJott
Member Avatar for thines01
0
96
Member Avatar for Daigan

Can you use the + operator? [CODE] public class StringThing { public static void main(String[] args) { String strOne = "hey"; String strTwo = "there"; String strThree = strOne + ", " + strTwo; System.out.println(strThree); } } [/CODE]

Member Avatar for NormR1
0
156
Member Avatar for Mona Ali

One way is to modify the constructor for Form2 to contain a string parameter, so when it is instantiated, it will receive the string. [CODE] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); Application.Run(new Form2(Form1.strTransfer)); // <<<--- } [/CODE]

Member Avatar for thines01
0
140
Member Avatar for nobert79

Without "fixing" any of the code, I modified it enough to compile. [CODE] /////////////////////////////////////////////////////////// import java.io.*; import java.util.*; public class Main { public static void main(String arg[]) { int n[] = new int [10]; String fileName = "RandomNumbers.txt"; PrintWriter outputStream = null; Scanner inputStream = null; try { outputStream = …

Member Avatar for thines01
0
151
Member Avatar for derpmufc

Can you just do all splits simultaneously when you ReadToEnd() ? [CODE] using System; using System.IO; namespace DW_396057 { class Program { static void Main(string[] args) { StreamReader fileIn = new StreamReader("c:/science/TomDigs.txt"); string[] arr_strData = fileIn.ReadToEnd().Split("\n\r,\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); fileIn.Close(); } } } [/CODE]

Member Avatar for Momerath
0
115
Member Avatar for TheSilentGiant

Starting with this: [url]http://docs.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html[/url] and a sample that looks like this: [CODE] import java.util.*; public class TestArrayList { public static void main(String[] args) { ArrayList<Integer> arr_int1 = new ArrayList<Integer>(); arr_int1.add(1); ArrayList<Integer> arr_int2 = new ArrayList<Integer>(); arr_int2.add(50); arr_int2.add(75); ArrayList<Integer> arr_int3 = new ArrayList<Integer>(); arr_int3.addAll(arr_int1); arr_int3.addAll(arr_int2); System.out.println(arr_int3.size() + "\n==="); for(int i=0; i …

Member Avatar for thines01
0
175
Member Avatar for jasp3r
Member Avatar for amgad habeeb

Maybe something like this. You'll probably have to fix the "press any key" thing. [CODE] #include "stdafx.h" #include<stdio.h> #include<conio.h> int main(void) { int DONE = 0; int grade = 0; //user input grade int n = 0; //loop controller int sum = 0; float average = 0.0; //calculated student average …

Member Avatar for thines01
0
174
Member Avatar for Jesi523
Member Avatar for dieucay555

That one was hard to see! [CODE] using System.Collections.Generic; using System.Collections.ObjectModel; namespace BookStore.Helper { public static class ExtensionMethods { public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> source) { ObservableCollection<T> target = new ObservableCollection<T>(); foreach (T item in source) target.Add(item); return target; } } } [/CODE]

Member Avatar for thines01
0
1K
Member Avatar for carlucho

I'm looking at line 81 with the uninitialized variable 'd' that is used in division. Is there something special about that?

Member Avatar for thines01
0
312
Member Avatar for skran

Of course, you can also read from tables and write to tables using SqlDataReader and SqlCommand without ever dealing with DataTables and DataSets.

Member Avatar for thines01
0
158
Member Avatar for rubenrav
Member Avatar for PapaGeek

using namespace System::Collections::Generic, you can use a List<String^>^ It has a Sort method built in.

Member Avatar for PapaGeek
0
192
Member Avatar for Ashenvale

Convert the user input to upper-case, then compare it to upper-case 'N'.

Member Avatar for thines01
0
206
Member Avatar for neo.mn

[If you have an option] I would not suggest converting this to Linq-to-SQL if you are new to Linq. If this is for class, I want to be in that class because it's cool!

Member Avatar for thines01
0
151
Member Avatar for VengefulToast

That really depends on if you want the hex value or a string representation: This one gets the text value that can be converted to a byte (if necessary); Pardon the weird labels. [CODE] ; Compiled with A86 (http://eji.com/a86/) ; This program shows how to get user input with echo. …

Member Avatar for VengefulToast
0
800
Member Avatar for Mojtabarahimi

[CODE] char seating[seating = new int(50)]; //should be char seating[] = new char[50]; [/CODE] You could really create a "level" class that has a particular number of seats and can be asked if it is full. You can then make the Ferry have a collection of Levels.

Member Avatar for NormR1
0
2K
Member Avatar for PapaGeek

If the old code has ANY C++ (or MFC in it) and if you don't need to change how the program works, just compile the old source code with the new compiler. Of course, you will need to change all .c file extensions to .cpp and make a few adjustments. …

Member Avatar for PapaGeek
0
218
Member Avatar for alaa sam

I ALSO learned it by just hacking (at first) and watching others code in videos on [URL="http://dnrtv.com/"]DNRTV[/URL]. I knew C++ and a little Java, so that really helped in understanding.

Member Avatar for alaa sam
0
123
Member Avatar for Limiter
Member Avatar for Limiter
0
207
Member Avatar for Dakot

I write and work on console apps EVERY day. I usually use C#, now, but 99% of server-side code is not graphical. Even if you are working on a GUI, you can still do it in C++. Even if you are working with web output, your modules can still be …

Member Avatar for Panathinaikos22
0
185
Member Avatar for niggz

Does it throw an exception on the FIRST loop? If you take out that <= and just make it <, does that solve the problem (as it would be looping 1 too many times)?

Member Avatar for niggz
0
289
Member Avatar for Asotop

Are you saying you want to have multiple CD objects? Use a list or an array (rather than a number) [CODE] List<CD> lstCD = new List<CD)(); ...then reference it with a ForEach or by its position. [/CODE] When you add a new CD, the count will auto increment.

Member Avatar for Asotop
0
338
Member Avatar for Dakot

Read the user input as a string. Convert the string to an integer Start your loop at the top number and "decrement" the loop.

Member Avatar for Dakot
0
84
Member Avatar for Vermouth

You can use printf() or cout with formatting to print a format like that. As a matter of fact, you can do it a multitude of ways, but I'd stick with printf or cout. You can choose use spaces or tabs for your layout depending on how much of the …

Member Avatar for WaltP
0
141
Member Avatar for Chuckleluck

A static library is the opposite of a DLL (dynamic link library). They mean you can add their library to your linker step. That way, it will resolve the main/WinMain problem that may have been created by the project type you used for your application. The static library will usually …

Member Avatar for thines01
0
2K
Member Avatar for fishsticks1907

You can fix your class so that you don't pass it back to itself to make transactions. Remove the class parameter of the deposit method and have the class modify its own balance directly.

Member Avatar for thines01
0
193
Member Avatar for Xcelled194

You can also try the WebClient DownloadFile() method. If you're going to use this functionality a lot, you could just compile it into a DLL and link it into your other projects when needed.

Member Avatar for L7Sqr
0
580
Member Avatar for crazymidget01

I would also test for the "*" on the next line and break out of the loop if found.

Member Avatar for thines01
0
138
Member Avatar for phorce

First don't make a string[]. Just use a string. OR compare it to words[0];

Member Avatar for thines01
0
80
Member Avatar for taloosheh

The End.