Comatose 290 Taboo Programmer Team Colleague

:) -r is recursive (folders too). The f however is to force the operation (don't ask questions)

Comatose 290 Taboo Programmer Team Colleague

I suggest SDL_Net.... I have had very good results with it, even though it does have a quirk or two. If you build a class (or a couple of them if you plan to thread) to encapsulate the networking code, you can make this part a breeze for sure. Be advised though, that you are talking about IP packets... which fall into a different layer of the OSI (which I assume is not what you really want, but TCP/UDP packets). SDL_Net will make it easy for you to send and receive data over a network.

Comatose 290 Taboo Programmer Team Colleague

Ok.... So instead of making a post that is going to get buried layers deep into the forum... how about you post it as a code snippet?

Comatose 290 Taboo Programmer Team Colleague

I'm going to assume we're talking about windows here, so my first suggestion would be to research how/where the registry gets updated when you put in the WEP password. They have software tools available that can alert you whenever a registry key has changed (or simply load up regedit, export the entire thing to a .reg file (before you put in the WEP password) then put in the WEP password, and export the registry again, then run a diff or compare on them). Once you know what changes are made in the registry, simply write code to add those settings to the registry on the new machines.
An alternative method, would be to figure out the dialogbox or software that windows uses to allow you to put in the WEP key, use an API like findwindow and findwindowex to get the child window handle of the textbox that accepts the WEP key, and use sendmessage to send the password key to the box.... then have the code use sendmessage to the "ok" button.

Comatose 290 Taboo Programmer Team Colleague

In Code.... All Things Are Possible.

Comatose 290 Taboo Programmer Team Colleague

Even though it's solved, another solution to this would have been to set the value of the textbox to 0 by default (such as in form load)

Comatose 290 Taboo Programmer Team Colleague

ok, can you attach your code for the list handling (instead of posting it as code, you can attach it to the post as a file in advanced mode)

Comatose 290 Taboo Programmer Team Colleague
for (i=0;i<=number;i++)
Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

So, what I gather is you have a problem.... the solution to the problem.... and you are posting here because you have temporarily gone insane?

Comatose 290 Taboo Programmer Team Colleague

I'm pretty sure you can give it a function pointer as a parameter....

Comatose 290 Taboo Programmer Team Colleague

One problem, is that you didn't create your own thread.... using someone else's thread to post your question is a sure way to get flamed and not get the answer you desire. It also helps to use code tags.... we see code, all ugly and without colors or indentation, and quite frankly, makes us not want to read it or help.

So, step one to solving your issue, start a new thread and use code tags.

StuXYZ commented: Many thx: I hate thread hijack +4
Comatose 290 Taboo Programmer Team Colleague

Call "c:\windows\system32\dfrg.msc" with shell or system processes or wsh.run or shellexecute.

Ramy Mahrous commented: That's the perfect answer! +6
Comatose 290 Taboo Programmer Team Colleague
replace (mystring.begin(), mystring.end(), " ", "");
cout << mystring.length() << endl;  // what?
Comatose 290 Taboo Programmer Team Colleague

It should send you to the ASP.NET forum page... which is where your question belongs.


EDIT: :p Talk about timing.

Comatose 290 Taboo Programmer Team Colleague

I'm not a big fan of just giving out code.... especially when I know it's for homework, but let me give you some detail.... once you do as KevinADC suggested, and get the DBI module installed, you need to have the SQL database setup. In this example, I connect to the mysql database called "tasks", with the username of "taskuser", and the password of "password":

use DBI;
$dbh = DBI->connect("DBI:mysql:tasks", "taskuser", "password");

The magic actually comes in the next few lines (ie, what you need), where we first prepare the sql connection, and then actually execute it. You need to know the name of the table, and need to have pretty intimate knowledge of the entities in your database. In the following, I'm returning all columns from the users table:

$query = $dbh->prepare("SELECT * FROM users");
$query->execute();

Now that we have executed the query, we should get some kind of response of records from the database right? No. We have to tell the DBI module to fetch the rows with fetchrow(). The fetchrow() method will return the data that we queried from the DB. I prefer to define a bunch of scalars that represent each column, but you could use an array.... it's uglier though, because then you have to keep track of which indice is linked to which column. This uses fetchrow() to retrieve a basic record from a users table... keep in mind, that this retrieves just one record, but you could very easily have many …

Comatose 290 Taboo Programmer Team Colleague

as root, you should be able to basically do something like:

chmod 722 /dev/null

would give the owner (root) full permission to do whatever with it, and let other programs write to it, but not modify the permissions. Then, though, you break other functional applications. Something is clearly wrong though, if some kind of program is randomly modifying permissions that you set....

Comatose 290 Taboo Programmer Team Colleague

I'll say it again......

you're in the VB 4/5/6 forum. System.Diagnostics.Process is for VB.NET, NOT VB 4/5/6. If you want answers about it, then ask there. Not Here.

Comatose 290 Taboo Programmer Team Colleague

If you would spend some time looking through the forum, you would have found your answer with relative ease.....
http://www.daniweb.com/forums/thread165458.html

Comatose 290 Taboo Programmer Team Colleague

That's a fun assignment. How much code have you done?

Comatose 290 Taboo Programmer Team Colleague

you could try to code it in another language so that it runs faster and uses less time?

Comatose 290 Taboo Programmer Team Colleague

How about starting a new thread, and not responding to one that is like, 3 years old?

Comatose 290 Taboo Programmer Team Colleague

...if you want to do it in vb check out System.Diagnostics.Process

Sure, If you are using .NET.... not gonna work in vb 4/5/6. I can get you the code to kill a process from within VB6, but figuring out how to know if it's the one you want to kill or not is a different story altogether. I suppose you could kill all copies of java, and then just open the one you want ?

Comatose 290 Taboo Programmer Team Colleague

*mumbles something about the SQL "LIKE" condition*

Comatose 290 Taboo Programmer Team Colleague

make sure the .dll's are registered in the registry (if required) and make sure VC is linking to them, in the linker.

Comatose 290 Taboo Programmer Team Colleague

can you put the code on the tab's mousedown event?

Comatose 290 Taboo Programmer Team Colleague

you declare your array as [6] (six elements) but you try to use 7 (0-6). Change your string days to 7

Comatose 290 Taboo Programmer Team Colleague

That was a fun assignment.

Comatose 290 Taboo Programmer Team Colleague

One final personal touch: I always use "\n" instead of endl . It makes more sence to me because \n is always a newline no matter what OS, or programming language.

endl isn't always newline? :icon_eek:

Comatose 290 Taboo Programmer Team Colleague

first, remove the ; after rotate--
second, you can't have an opening { without a closing } (for loop), so add a brace.
third, using rotate > value will for loop until rotate is no longer greater than value, but likely won't loop the final iteration. So if value is 0, then it would loop probably 4 3 2 1, not 4 3 2 1 0 (0 being the value of value). If that's what you want, cool. If not... replace the > with a !=

int value;
int rotate = 4;
for (value = 0; rotate>value; rotate--){
     cout<<"Now rotate value is:"<<rotate<<endl;
}
Comatose 290 Taboo Programmer Team Colleague
dim x as string
x = "white bread 0.67"
parts = split(x, " ")
xCost = parts(ubound(parts()))
' // ;-)
Comatose 290 Taboo Programmer Team Colleague

I don't think it can do that... but it shouldn't be overly difficult to download the sound bytes, and use a simple software, like virtualdub or audacity to slap that over a soothing background.... I wish there were some kind of simplier way :/

Comatose 290 Taboo Programmer Team Colleague

That's a list there. People will be able to post answers to that question for ages..... a couple common uses of Shell Scripts have been things such as log file rotations (programs can generate files that detail what it did, or what occured, called a log, they get too big, and a company wants them archived, so they build a shell script to automatically copy the log, (or group of logs) compress them, and back them up, then clear/remove the originals). There have been shell scripts to download youtube video's to your hard-drive... heck, a lot of startup scripts (startx... a big one) is a shell script. Shell scripts that monitor zombie processes...etc, etc. It's a big list.

Comatose 290 Taboo Programmer Team Colleague

When talking about "programming" people tend to think that all code is a "program", but this just isn't true. Languages like VB, and C/C++, require that you first take the code that you write, and convert it to machine code (compile). After that (often done in the same step) you then "link" your code together into a Program. Linking has to do with putting together required external code (libraries) that are required by your program. Anyway, getting off topic, "Programming" is compiled into machine code.

Scripting is a different animal. Scripting doesn't require (from a top level view, anyways) that the code you write be compiled. Now, obviously before any code can run on a system, it must first be converted, but the compilation and linking isn't done by the programmer in a script. You have a program (typically called an Interpreter) that runs the lines of the script, and essentially compiles them on the fly. So, as the script writer, all you have to do is make changes to your script, and run it. The only drawbacks to this, is that your code is always available for view by anyone (that's actually a plus if you ask me), and it's slower when running. Compiled programs are typically fast, and scripts are usually slow. I wouldn't write something like a video game (even if there are libraries for it) in a scripting language. I might do something not time critical in one though. That's the general difference between programming …

Comatose 290 Taboo Programmer Team Colleague

There has been chatter about how to use Legacy VB with PDA's, without much real promise. A couple hype products (Crossfire and what not), but actually finding a working VB app on a PDA has been ultimately elusive. My strongest suggestion, is to look into VB.NET, with the Compact .Net Framework, which will allow most modern windows based PDA's to run your app. There is a site that appears to hold some promise... but the language is entirely it's own beast (ie: it's not actual VB at all.) called NS Basic. The product impressed me, but was overall not free of charge, which I find to be a big deal (not that .NET is free of charge either, but you know what I mean).

The only other possibility that I can see as an option... and believe me, this is quite the far shot, would be to see if the PDA can run ActiveX controls. You would most likely need to run it through the Web Browser of the PDA. If, and this is a very big if.... if it can run ActiveX controls, then you could basically port you application into an ActiveX control (another type of project instead of standard EXE) and embed that into a web site (unless it will just run natively which I doubt). Let me know how it turns out.

Comatose 290 Taboo Programmer Team Colleague

Post the code that you have accomplished already, and show us where you are having trouble so that we can guide you.

Comatose 290 Taboo Programmer Team Colleague

How about we not post to threads that are like 3 years old?

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

Also, I never see you call any kind of function to convert the string to an int:

#include <iostream>
#include <sstream>

using namespace std;

int main(int argc, char **argv)
{
	stringstream ss;
	std::string x;
	int integer;

	x = "5";
	ss << x;
	ss >> integer;

	cout << integer << endl;

	return 0;
}

or you could do (though, it's not recommended for some reason):

#include <iostream>
#include <sstream>

using namespace std;

int main(int argc, char **argv)
{
	std::string x;
	int integer;

	x = "5";
	
	integer = atoi(x.c_str());

	cout << integer << endl;

	return 0;
}
Comatose 290 Taboo Programmer Team Colleague

*Quietly Mumbles Quotes From The Bible According To RMS*

Comatose 290 Taboo Programmer Team Colleague
Ramy Mahrous commented: Good reference +6
Jx_Man commented: Great :) +12
Comatose 290 Taboo Programmer Team Colleague

This line ab = RichTextBox1.Text doesn't actually write anything to the file. You might want to replace that line with something that accesses myStream.

Comatose 290 Taboo Programmer Team Colleague

No No, you asked if it was vista, and they posted code....what is that about?

Comatose 290 Taboo Programmer Team Colleague

Sometimes too, if you make an object, and don't you clean it up (*ehem*), the object will stay in memory, and windows will flip out about it. For example, if you open a new word object, and don't delete it:

dim oApp 
set oApp = createobject("Word.Application")
end

Run that code in a test project. Go check the task manager. Go. Do It. Word is still running in the process list isn't it? Bad News.

dim oApp 
set oApp = createobject("Word.Application")
oApp.Quit
set oApp = nothing
end

Now try that one..... (don't forget to kill the copy of word from the previous application). Now word is no longer running in the process list when we quit our VB app.

I'm not saying this is what is happening to you. I won't know until you post your code for us, but it's something to check and be aware of.

Comatose 290 Taboo Programmer Team Colleague

*Points to his previous post*

Ok, something to keep in mind, the password is ENCRYPTED, so even if I told you where to find it (/etc/passwd, /etc/shadow) it will do you no good unless you can figure out how to DECRYPT it... *nix is pretty secure... they don't just let you have your way with passwords.... hacker.

Comatose 290 Taboo Programmer Team Colleague
#!/bin/sh

echo ${USER}

Password is a whole different (uglier) beast.

Comatose 290 Taboo Programmer Team Colleague

Solved? How did you fix it?

Comatose 290 Taboo Programmer Team Colleague
./configure --prefix=/usr/local

;)

Comatose 290 Taboo Programmer Team Colleague

I'm pretty sure the only way is to refer to the object and assign it directly. That is, something along the lines of:

form2.txtBudget.text = form1.txtBudget.text
nor_d83 commented: Works very well.. +1
Comatose 290 Taboo Programmer Team Colleague

First, it's strongly frowned upon to post to threads that are more than three months old. Even if you have a question regarding an old thread, then you would start a new thread, and post a link to the old thread with your question. This will help to ensure that you get a warm and helpful welcome instead of the inevitable flaming that is sure to follow posting to old threads.