Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

701.

Solve : Replacing Algorithms?

Answer»

hi,

I WANT help ABT the replacing algos..specially round ROBIN technique...it is used while the processor has to copy blocks of memory in the Cache..I have to implement this technique in C++...so plzz guide me

thankxx

702.

Solve : How to run Java Program??

Answer»

It is using the MS-DOS Prompt, am i right?
ok so i written some program and i couldn't run it. Maybe i have type the wrong things so hope that someone can solve this problem.

My Java program is saved in C: ----> Java(a folder that i have created) ---> my .java files is saved in here.

so when i run the MS-Dos Prompt, it goes like this:

C:\> ( i typed "cd java")

C:\Java> (then i typed "javac Multiple.java")

C:\Java>javac Multiple.java
Bad command or file name

so i wonder what is wrong or is it i have typed the wrong WAY. hope someone can shed some light. Thanks
The ERROR message refers to the fact that javac cannot be found. EITHER it doesn't exist in your directory c:\Java or anywhere along your path.

Either include the path to the javac program or to your multiple.java program.

My guess is to change directory to where javac lives, and run it as javac c:\java\multiple.java

Hope this helps.

Should be interesting to see where multiple.class ends up. i thought javac is built-in automatically? if that is not so, where can i download this program or others?(i'm running window 98 SE)
i saved it as "Multiple.java" under "all files" not "text documents". i TRIED changing it to D: drive. it is still the same.

i did a seach on Multiple.class and there were no result.It's doubtful that Microsoft would bundle Java which is PUBLISHED by Sun Microsystems. You can download Java from:

http://java.sun.com/j2se/index.jsp

Hope this helps. thanks alot. i am installing now. not sure if i installed the wrong one. because i found one which is 33+Mb annd another 300+Kb... kinda weird.. but i chose the second one ... 307kb..

703.

Solve : W98Eject?

Answer»

I'm not sure if i'm in the right area but here goes. I just found this w98eject in my startup and not sure what it is or how it got there. My question is what is it and do I need it? I really am a dummy when it comes to most things concerning COMPUTERS. Ant help would be appreciated, Thank YOUI could only find out that it's RELATED to USB support for Sigmatel MP3 audio decoder.

Run your antivirus and see if it picks it up. Also check msconfig and unclick if it starts on boot. The FILE is probably in c:\windows\system. You could always rename it and see if that causes any problems.

Hope this helps.

Note: This probably should have been posted in the virus or windows BOARD. thank you for your help and am sorry I posted on the wrong board. Was not sure where to post something like that

704.

Solve : task manager help?

Answer»

i have 67 processes runnig on my TASK manager
is their ANYTHING that can tell me which one i should disable. plz helpStart at the second last one & work your way up, try to identify each one & decide if you really need it.
Then try to stop it from starting from within the program that relates to the entry.
They will be mostly things you have added yourself.
A bare computer would run about 10 things, MINE runs 24 but 14 of them have been put in by me.you can usually do a google search on the filename and found out what the PROCESS belongs to.
http://www.liutilities.com/products/wintaskspro/processlibrary/ was the first I found.Old post but since it's been revived, get Autoruns from http://www.sysinternals.com and run it.
Under options, select 'hide signed microsoft entries' then hit the refresh button.
This program is a keeper, procexp from the same site is good too.

705.

Solve : Basic Visual Basic 6.0 Help?

Answer»

Hi to you all Computer Expert
I need help in building a simple buy and sell game, what i am stuck on is to difficult but i know some of the guys in here are good at programming. So here it is:


1. I want to get the user to type something in a textbox which will be save as Integer and i want to use the variable for later calculation
What i did is this::

:exclamation
Module:
Public nUnit as String ' nUnit need to be integer'

Private Sub Form1_activate()
nUnit = Textbox.Text
End Sub

but it only work as string only.

2. As all of the buy and sell games must have money, I am stuck on a problem with calculation so here it is:
I have an option button which i want it to be click and calculated with user input numbers and display the result.

Operation must goes like this:
The user click on an option button and the user type in the number in a text box.
Now the user must click a button to process the calculation. This what i do but is wrong:

Module:
Public money as Single
Public nUnit as interger

Private Sub Form1_activate()
money = 200
End Sub


Private Sub Buy_Click()
If Option1.Value = True Then
money = money - (caliorg * nUnit)
backpack.Caption = caliorg & " " & nUnit & "Unit" #Note~ that caliorg is save Integer#
End If
End Sub
:exclamation
This did not work but can you tell me who to fix it please.

3.Why this type of function can only work ones:

Module:
Public days as Integer

Private Sub Form1_Activate()
days = 0
End Sub

Private Sub Sleep_Click()
days = days + 1
label.Caption = "Day " & days #Note~ this button only work once why :question
End Sub
I want it every time i clicked them it will update it every time so the number of days goes up by one.

4.How do i refresh every thing in a FORM ?
5.How do i creat a random number in VB

I hope this will be a easy answer for you Expert
Thank You


I guess no one here is an expert in programmingwish i could help but im no good with basicIt seem that every body can post some easy question but instead of answering some other question and helping people and this is no expert advice at all. I respec Flame GX1_Man Robpeomeroy Dl65 Sidewinder Fed because they actually no something but every one els is nothing but helpless sometime and all they do is add up there post cont WFT.
My question above I really need this to be answer because you cant fine it anywhere on the web
One question member, do you know anybody that is actually good at programming?
1. Replace the textbox with a Masked Edit Control (Project==>Components==>Microsoft Masked Edit Control). You'll be able to force the user to enter numerics into the control; also set it's length. Not sure why you're using the Activate event to get input. Usually you define a button control and use the _click event. Be sure to change nUnit to an integer.

2. By putting money= 200 in a subroutine you're creating a scope problem; code it inline in the module. caliorg is UNDEFINED...you may not have posted enough code.

3. I can't make out from your code what you're trying to do but I THINK days only has scope within the subroutine and reverts back to zero after the subroutine ends. Try making days a global field.

4. Not sure on this; you can always use the unload method on the form followed by the load method. Why WOULD you need to do this? FORMS are updated as the underlying data changes.

5. Use the rand() function.

Good luck. 8-)


Thanks You alot
I have a go at it i reply if i cant do somethingQuote

2. By putting money= 200 in a subroutine you're creating a scope problem; code it inline in the module. caliorg is undefined...you may not have posted enough code.
i already have my money save as single money = 200 and i want to do a further calculation with it.

Module:
Public money as Single
Public nUnit as interger

Private Sub Form1_activate()
money = 200
caliorg = 25.50
and nUnit is a number the user specify
End Sub


Private Sub Buy_Click()
If Option1.Value = True Then
money = money - (caliorg * nUnit)
backpack.Caption = caliorg & " " & nUnit & "Unit"
End If
End Sub

This it what i want to do but it doesnot work

Quote
3. I can't make out from your code what you're trying to do but I think days only has scope within the subroutine and reverts back to zero after the subroutine ends. Try making days a global field.
I want to click on a button that will change its number by 1 every time i click on it. So what i mean is that every time i click the button it will add up the number of 1 everytime.

Quote
4. Not sure on this; you can always use the unload method on the form followed by the load method. Why would you need to do this? Forms are updated as the underlying data changes.
True i dont really need this

Quote
5. Use the rand() function.
How can i limit the number.
Let say i want the number to by random between 10 - 30 and it go to be single so sometime the number will be 15.67 or 20.64 ect.
2 & 3: It's time to start debugging your code. Best way is to set a well placed breakpoint, run the job interactively and as soon as you hit the breakpoint, step into the code and see how the program runs and what values the fields take on. There seems to be some doubt that the _Activate event ever runs. The VB package has a very full and rich help function which should answer most of your questions.

5:
Code: [Select]Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd) + Low
End Function

I mistyped RND as RAND in my earlier post. Sorry for the confusion. It might also be wise to execute a RANDOMIZE instruction in the FORM_LOAD event to seed the random number generator.

8-)You are a great help thankyouQuote
2 & 3: It's time to start debugging your code. Best way is to set a well placed breakpoint, run the job interactively and as soon as you hit the breakpoint, step into the code and see how the program runs and what values the fields take on. There seems to be some doubt that the _Activate event ever runs. The VB package has a very full and rich help function which should answer most of your questions.

5:
Code: [Select]Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd) + Low
End Function

I mistyped RND as RAND in my earlier post. Sorry for the confusion. It might also be wise to execute a RANDOMIZE instruction in the FORM_LOAD event to seed the random number generator.

8-)

I don't understand why you need to use this function?If you don't mind to explain it to me.Thanks.

As I know in vb if you want to convert string to int you only to write this code. For example :

Dim total As Integer
total = CInt(txtTotal.text)

same if you want to convert label. caption.

Eg :
Dim total As Integer
total = CInt(lblTotal.Caption)

or if you want to convert it to Double just write:

Dim total as Double
total = CDbl(lbltotal.Caption)
Which function are you talking about? The rand function was used as a teaching aid to show the original poster how to create random numbers. A function was used since by definition a function returns a result.

If you're referring to the Int function, the integer portion of the result from the Rnd function is needed, so it was necessary to truncate the decimal portion. CInt would have rounded the result to the nearest even number. Fix could also have been used in this case. When dealing with VB functions, always read the fine print.

8-)

Note: using the .text and .caption properties in numeric conversions will crash and burn your program should they resolve to non-numeric strings.
706.

Solve : computer language settings?

Answer»

please i need a professionals help.i bought my computer in czech republic and was told that the system is in english.when i brought it home and set it up ,its all in the czech languge. :-?
i cant even save files ,i dont understand anything and i need my computer for work.
please help.is there some way of changing the computer system into english ?contact me at [emailprotected] asap. Very interesting problem.... If we tell you what to do, e.g. open Control Panel>Regional and Language Options>Advanced tab etc... how are you gonna be able to do that if you cannot understand whats shown on the monitor :-?

Do you know anyone local who can interpret for you :-?

There MAY be a workaround but if you cannot understand displayed messages etc... how you gonna work out what's going on :-?It could be easier just to do a clean INSTALL, did you GET a geniune xp disk with it?
Eiher way, you're going to need ONE sooner or later.Even if it's in a different langauges, the buttons should still me in the same place, right? Would you like one of us to guide you through which buttons to press?

Do the Czechs speak German?

707.

Solve : database design?

Answer»

I am new to prog. WORLD. I am working on database. I often listen the terminology Master table and transactions table in database.can any on tell me what is this? is there any good site on database designing.Search on 'database design' came up with 20,400,000 websites - here's just one

http://www.evolt.org/article/Beginning_Database_Design_Part_I/18/27137/

Have you decided which language you will use to create your db?Master Table is ur PRODUCTION TAble i.e table in ur production box while transaction table r the tables in which u perform the actions before LOADING the data in production.
Like if u RECEIVE ur flat FILES u directly dont insert into ur master table.first u insert the file in wrk table and then do data massaging on them after applying whatever action is reqd

708.

Solve : StrComp VB Fuction , Wont Work?

Answer»

Ok im trying to Learn how to Use ASP and VB Script
and ive been Trying to Compair 2 Strings, so im useing the VB StrComp Function

it is Suposed to return a 0 if the Strings are the Same, or a -1 if there not.... or a 1 if there not

i cant Get it to Return 0, so the If is Never True

Code: [Select]<%
UsrPass = "password"
DataBaseRecord = "password"
if(StrComp(UsrPass,DataBaseRecord) = 0) then
response.write "Password Correct" & "<Br>"
Else
response.write "Password Incorrect" & "<Br>"
End if
%>

Never mind , it was my own Stupidityi don't have a ASP TESTING environment with me, but i coded this and RUN it USING wscript/cscript
Code: [Select]Dim UsrPass
Dim DataBaseRecord
UsrPass = "password"
DataBaseRecord = "password"
if StrComp(UsrPass,DataBaseRecord) = 0 then
MsgBox("0")
Else
MsgBox("1")
End if

The output gives me "0". The difference is :

if(StrComp(UsrPass,DataBaseRecord) = 0)

becomes

if StrComp(UsrPass,DataBaseRecord) = 0

don't KNOW if it will solve your problem, but you could give it a tryFYI: there are four possible return CODES from strComp

string1 is less than string2 -1
string1 is equal to string2 0
string1 is greater than string2 1
string1 or string2 is Null Null

Just my 2¢

8-)

709.

Solve : Math operations in Bat files?

Answer»

Is there a way to do math operations, with variables, in bat filesYes, using the /a switch on the set statement. This is OS dependent.

Hope this helps. "Doing math in a batch file is a WASTE of time."

NOT my words - see here...http://www.ericphelps.com/batch/samples/addition.txtUnless you're WORKING on a project that requires you todo this in a batch file you may WANT to consider doing math operations in a PROGRAMMING language like C, PERL, etc.

710.

Solve : Hexidecimal?

Answer»

In my chess game, I'm trying to store a list of moves whereby one hexidecimal contains two coordinates. The board is SPLIT into squares, each square given an ID number. 0, 1, 2... 63.... I want the number to store the starting square and ending square like this.

0x1720 means a move from 17 (dec 23) to 20 (dec 32). Using 0x1720 & 0xFF00 I can get 0x1700 and 0x1720 & 0x00FF I can get 0x20. How can I get the 17 part from 0x1700?

What happens if the coordinates are below 10? Then I'd get say 0x32 (for 3 and 2) which obviously won't work with the above opperations. Would the best thing to do be to add 0x10 to each coordinate first, then subtract 0x10 at the end?

I don't have much experiance with hexidecimals. Any advice appreciated.
Use the bitwise operators of your favoured progamming language? i.e. shift the number however MANY bits to the right that you require. (If you can't work it out, use TRIAL and error. )What programming language are you using?
In C++ (or any other I imagine) you could make an array of values.

int CHESS_BOARD[8][8];
CHESS_BOARD[xvalue][yvalue]=whatever;
//<----[set up in a grid]

or

int PSUDO_BOARD[64];
PSUDO_BOARD[8*yvalue+xvalue]=whatever;
//<----[set up in a line]

these would be much easier to reference(even w/ hex).Thanks but the point was I wanted to be able to store a starting coordinate and an ending coordinate in a single variable. I gave up and now I simply use two variables for the TASK. I figured the amount of time I was spending getting it to work wasn't worth the time I'd save with that method It'd make more sense with an OO object... Feel free to explain what to do I figured out a way to EXTRACT 2 values from a single variable.(in case you're interested)

/*You need 3 values to encrypt your variable
1.) var 1 (VAR_1)
2.) var 2 (VAR_2)
3.) prime number (PRIME_NUMBER)*/
ENCRYPTED_VAR = PRIME_NUMBER*VAR_1+VAR_2;

/*You need 2 values to decrypt your variable
1.) prime number (PRIME_NUMBER)
2.) your encrypted variable (ENCRYPTED_VAR)*/
VAR_2 = ENCRYPTED_VAR%PRIME_NUMBER;
VAR_1 = (ENCRYPTED_VAR-VAR_2)/PRIME_NUMBER;

This works better if the Prime Number is larger than the variables.
Works sort of like "public key encryption".

711.

Solve : Hello here!?

Answer»

im confused my lil brain is scared and confused with all of the lans. what thedif.. :-? which do they do? :-? how can i chose which one i want to learn :-?

plz help...Before you pick a language, it is good to decide what you want to do with it.

Simple effects with web pages? Javascript.

Dynamic web pages? PHP or Perl.

Program-style web pages? Java.

Wndows applications? One of MS's Visual languages, or DELPHI or something like that.

Generally efficient programs? C.

Generally efficient programs with OO? C++.

.NET programs? VB.NET, C#, etc.You forgot game programming:
Flash Action script
C & C++
Java
and more but these are the common language for game programming.

And robpomeroy i dont know every single computer language but i tend to have 80 O'Reilly Books (TCP-IP, Unix, Web, Perl, Java, ORACLE, XML, etc) I can give you those book if anybody wants it.

Anyway really i support xhtml, css, VB script, action script, Java script but i am not really good at those i say i am only an Expert at xhtml, css and everybody is
really want to learn to make programs and websites 8-)Then you would have to choose html and css for webdesign and c or c++ or VB for programk i have some javascript and html books coming from a library in a dif town.. what books do u guys recommend for c and c++?? :-?O'reilly Booksk thanks

712.

Solve : Java or HTML or Dos?

Answer»

Hello,
I need help to write a Java or HTML or Dos program (I don't know)
I have a folder "A" CONTAINING several files of which I don’t know neither the name nor quantity. I want to take each files to CHECK them with a programme and SEND the each result in a file in the folder”B”
I need a program which will read the names of the files in the folder “A”, which will send the name of 1st of these files in a line a dos COMMAND (it would have to be put has 2 PLACES: on the address of the folder “A” and on the address of a folder ”B”).
And then this program have to start again until all the files of the folder “A” are treated.
If you have ideas that could help me thanks to communicate them.
Elodi,

I posted a response in the DOS board. Please do not double post. Some of us are easily confused.

713.

Solve : C++ / Real Time User Input?

Answer»

I am creating a C++ console program using (Dev-C++ 4.9.9.2) on a WinXP.
The problem ARISES when I want to get user input.
For the sake of comparison say I MADE a Tetris game.
I mastered the part where I can detect if the arrow keys are pressed.
But what if the user doesn't press anything? I want my program to continue
running regardless of user input and not have to wait for input to move.


if(KEYS_PRESSED){//<----[if nothing is being pressed move on]
//<----[interpret those keystrokes and move accordingly (this part is fine)]
}


MOVE_PIECE();//<----[this will HAPPEN even if user gives no input]



Just trying to AVOID the "Press any key to continue" thing.





714.

Solve : Program wont work right.?

Answer»

Could you guys PLEASE check out this link: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=552053&SiteID=1

It has a question at that I cant get answered.I don't really do C, but this line:if ((INSERT == "leave") && (y=0))- you're USING the assignment operator ('=') rather than the equality operator ('==') --> y=0. Is that intentional?Yes it is international. I cant BELIEVE I didnt see that. Thank you very much.

715.

Solve : Freeze on bootup?

Answer» OK here is my problem. EVERY time I boot up or restart the computer it freezes even before the memory check. This has happened the entire time I have had the computer. I live with it because if you reset the BIOS defaults every time you start it then it will start. After that it runs PERFECTLY. No freezing or trouble though it is a little slow sometimes. I am thinking that it is my BIOS, I have a M7VIT Pro MOTHERBOARD and I believe the bios is Phoenix BIOS. If it is not the BIOS then What could it be? If it is the BIOS then what can I do about it? Any info will be appreciated.

Thank you.
Joe1. MAKE certain all hardware is properly seated
2. Reset your BIOS to the default SETTINGS and go over all the settings to see if there may be a problem caused by the default settings.

1. Are you certain it is freezing? Could it be that that your videocard is simply not properly seated or not giving image all of the time?

-- Check to see if the monitor cable is properly connected.

2. Does the computer continue to load (Make loading noises, blink HDD activity light, etcetera)

- This is not related to computer programming. You should be more heedful and post in the appropriate section next time.
716.

Solve : C++ text?

Answer»

I NEED help changing the color of a certain cout statement. Here is the small code:

[highlight]cout << "Input: "; [/highlight]

cin &GT;> insert;

cout << endl;




I need to change the text *input: * into a different collor.I hope you guys can help me out.
If you're OUTPUTTING this text to a terminal device/window, do you know if that device even supports colour? If it does then you need to OUTPUT the escape codes required to change the colour. Google for your terminal device + escape codes + color.

717.

Solve : C++ pause?

Answer»

OK, I'm trying to make the long jump from Visual Basic to C++. I'm reading a few online tutorials, and C++ isn't the monster I remember (if I can look at a C++ code block and say, "hey, that's just like JavaScript!", I MAY have it made). However, it's still a little confusing.

I'm starting with command-line based programs at the moment, just a few "hello world" variants. I want to pause the program so I can actually see what's going on. One person recommends including stdlib.h and using the line

Code: [Select]system("PAUSE");
But it won't pause. I've compiled it three times and ran it as many, no syntax errors, but it's just not stopping long enough to READ. What can I do to make it pause?

Using Dev C++ 4.9.9.2.I know next to nothing about C++, but Google and I are thisclose

Code: [Select] #include <stdio.h>

int main()
{
printf ("Press ENTER to continue.\n");
getchar ();
return 0;
}

OR

Code: [Select] #include <stdlib.h>

int main()
{
system ("pause");
return 0;
}

8-)Sometimes, simple print statements can also help you debug your program. Or you could try the C++ exception catching. http://cplus.about.com/od/beginnerctutorial/l/aa122202a.htmBut this program is far too simple to have such huge difficulties, you'd think.

dl65, I too used Google. I'm POSTING because it didn't work.

The full source code (nobody laugh, I'm on a tutorial):

Code: [Select]#include <iostream.h>
#include <stdlib.h>

int main()
{
int myNumber;
long myNumber2 = 5;
char myCharacter;
char mycharacter2 = 'c';
bool myBoolean;
bool myBoolean2 = true;


myNumber = 3678;
myCharacter = 'a';
myBoolean = false;

cout << "mynumber = " << myNumber << endl;
cout << "mynumber2 = " << myNumber2 << endl;

cout << "mycharacter = " << myCharacter << endl;
cout << "mycharacter2 = " << myCharacter2 << endl;
system("PAUSE");
return 0;
}

It isn't pausing...an alternative
http://cpp.codenewbie.com/articles/cpp/1437/systemPAUSE-Page_1.htmlThe solution is simple.

char temp; (or whatever) where you define your variables.

then at the end

cin >> temp;

The program will pause and wait for you to enter in some letters. Just press anything and hit enter to end the program.


Just so you know, cin is where the user enters in data. For example cin >> temp, I type in 'a', and temp now = 'a'Quote

an alternative
http://cpp.codenewbie.com/articles/cpp/1437/systemPAUSE-Page_1.html


Thank you. What? You are going to do THAT?

All you need to do is

char temp;
cin >> temp;

at the end of your program.

Simple!Oh, OK. I thought that... well... whatever. That WORKS just as well, if not better.

Like I said, sorry, this is really new to me. It's not easy LEARNING this stuff.

EDIT: ACK! IT'S THE P2K (Post 2K) VIRUS!!!

Seriously, look at it. It's calling me an expert, for some reason.
718.

Solve : Value of errorlevel of a batch file in java?

Answer»

How to GET the value of ERRORLEVEL from a batch into java class?

I am RUNNING a batch FILE from java using

Runtime.exec("run.bat");

Now how do i know if the EXECUTION of run.bat was successful or it failed? I thought i can use the value of ERRORLEVEL but I do not know how to get this value in java class.

Any help will be appreciated.

Thanks
JayIf your OS supports it and Java can access the environment variables, you can retrieve and expand the %errorlevel% VARIABLE. I have no idea how to write this however.

Just a thought.

719.

Solve : opening files with extensions .cpi , .sys and .com?

Answer»

hi,

i created a BOOT floopy from win xp and could successfully run it ALSO. i later copied the contents of the floopy to hard disk . i want to open files in the floopy with extensions .cpi , .sys and .com and also want to view their coding . can any one help me do that??
naresh
I'm not sure what you intend to find, but .sys, .com, and .cpi files are the result of runnning source code thru a processor program (ex. an Assembler). Try USING a Hex Editor

8-)Isn't a .sys file plain text? (If not, I'm sorry for the confusion; it's been years since I worked on a machine that had a config.sys in use and even then I wasn't interested in it. Can't THINK of any other .sys files off the bat...)There are exceptions (config.sys may be the only text file), but most .sys files are drivers ( ex. himem.sys and a truckload of others)

8-)

720.

Solve : Error Loading & Invalid Schedule File?

Answer»

You in for a treat, I have two!

ERROR LOADING:
c:\Progra~1\wildta~1\apps\cda\cdaeng~1.dll

INVADLID SCHEDULE FILE:
c:\program files\ hewlett packard\aio\hp office jey 7100 series\fru\reminder.sch

Any help would be appreciated. These showed up after I DUMPED & reinstalled WINDOWS 98 on friday.You can get information on the first one (WildTangent) at:

http://www.pchell.com/support/wildtangent.shtml

I found out that the second one is some sort of HP Instant Delivery Scheduler (hey, I don't make this stuff up ). Check your startup folder or MSCONFIG for entries and decide if you want to DISABLE it.

Hope this helps. Awesome, that I will try! My night seems to be improving EVEN more now!There is no trace of the HP printer anything on my computer. There was nothing in MSconfig and SINCE nothing is on my computer the error "THE INSTALLER HAS DETECTED THAT YOU HAVE ALREADY COMPLETED THE INSTILATTION OF THIS SOFTWARE" pops up when I try to install the software. SO WHERE IS THE SOFTWARE!!!!!!!!!!!This error is still showing up and there is nothing that I have found that is helping to correct this does anyone have any suggestions? I would like to get this thing off my screen it is trulely getting anoying!1. Clean your registry by using a registry scanner
2. Search for HP installation files by simply using the Windows Search function and the keywords 'HP'.

-- Do not blindly remove all HP entries found, examine them first and then decide wheter they are related to the HP printer software or not.

Optional:

3. Contact HP technical support.

721.

Solve : Emailing using Scripts?

Answer» HEY all...

I'd like to know if its POSSIBLE to CREATE and SEND emails using SCRIPTS...

Thanks in advance... Johnny_Bravo,

I sent a PM with the information.Thanks man
722.

Solve : Batch files & the registy?

Answer»

Hello,

I am from the netherlands and I can't speak English very well, but I'll try.

Can I make changes in the registery (register in dutch) with a batch FILE under windows XP pro?

please ANSWERE in this forum or send me an email ([emailprotected])

THANX for helping

TimYou can use the reg command. type reg /? for more details. As always, when dealing with the registry, back it up or create a restore point. Making changes can PRODUCE unexpected results.

Hope this helps.

723.

Solve : Odd remainder for a subtraction?

Answer»

Hello, I'm on Visual Basic .NET 2003.

Before I had to format my PC a while back, I had this VB.NET program that was simple enough: Input a USD amount into a TEXT box, click the button, and watch it divide the total into $20's, $10's, etc. all the way down to the pennies. It was never all that accurate, so today I decided to re-do the program, and shoot for 100% accuracy.

It took me a grand total of an hour and a half to write code to error-check the input textbox, then Do Until loop the total until I had the figures listed. (Basically, the actual code to sort out dollar amounts was NOTHING but Do loops the whole way down. I can't remember how I did it before, but it wasn't this, nor did it have any accuracy as I said.)

After that, I wanted to extrapolate: What if someone didn't want, for example, $20 bills listed? So I wrote a not-so-elaborate method of allowing the user to choose each denomintion to Include it or Exclude it.

Of course, this meant that there might be a remainder, due to the small change being excluded, or if the user PUT in three decimal places. So, I put in a system to display this remainder. Easy, right? Yes.

BUT...

If the user inputs a number with three decimal places, and that last decimal happens to be a 1, I get kooky remainders.

Here is a thumbnail (click for larger version) of the program in progress with no remainders. Everything works properly. (The progress bar was for debugging purposes, to see just where in the program I'd have a crash. I left it in as a "feature", but it's really instantaneous unless I'm dealing with large figures.)



Here's the same program, run with a three-digit decimal which caused a remainder. Perfectly normal.



Next, a three-digit decimal with 1 as the third digit. The remainder should be 0.009, but...



Attached is a text file with the source code, sans the Form Generated code. I'm hoping it's obvious where the flaw is, but I can't find it. :-/I doubt that there's anything particularly wrong with your programming; just your approach. Remember that all numbers must be capable of representation in binary on a computer. It is very common to have these kinds of rounding problems due to the conversion between decimal fractions and binary "fractions". Does VB.NET have a specific precision arithmetic library/functions? You WOULD need to use those instead.

Alternatively, cast your intial input to a string, and extract everything after the second decimal place. E.g. input = 192.5678; remainder string = 0.00 concatenated to '78'.

Make sense?On the dollar side everything appears correct. The problem is that the program handles cents as a fractional value of dollars instead of integer values of a different unit.

Example $234.78:

You do you calculations for 234 with a loop using integer paper denominations (20, 10, 5, 1)

For the .78 consider that you have 78 (integer) cents (not a fractional PORTION of $1) and do the same loop with coin denominations (quarter=25, dime=10, nickel=5, penny=1)

Just another approach. 8-)

When did we start using thousandths for USD?

Quote

When did we start using thousandths for USD?
Ask any stockbroker. The program title is "ChangeMaker". If you find the odd .005 piece please mail in care of CH.

Sidewinder, your solution worked perfectly. Now, when the third decimal is a 1, I get the proper 0.001 remainer (my assumption that the result should be 0.009 was based on a lack of proper sleep; I came to CH in haste to correct this error in my thinking -- too late!).

I actually don't use more than two decimal points, and thanks to this advice I have an easy way to restrict it. Two textboxes, so I don't have to multiply the total by 100 to get an integer subtraction... I can limit that decimal box to two characters...

But I can still have remainders, if the end user chooses to, for example, exclude pennies with a total that would contain them. No big deal, though; I can still show it as normal.

Oh, and I don't think my software can actually make change as in create it, but I'll be happy to ship in that 0.00001 cent leftover.
724.

Solve : download errors, rerun administrator account?

Answer»

can anyone please HELP me, everytime I try and download anything i get an error message TELLING me"you do not have access to make the REQUIRED system configuration modifications. Please rerun this installation from an administrators account"
this is a personal computer and it's driving me nuts! I can't download anything any more! Please help!What version of Windows are you using?i am running windows me. it's ALWAYS had problems but never this bad POST in the Windows section. It will attract more attention to your post considering the fact that this is the programming section which is not frequently visited.thanks i'll do that

725.

Solve : Best compiler for java??

Answer»

Im taking the Java class for school. School is in 2 days, and they will probably ask me to use a specific compiler, but I want to GET ahead so Im not confused about anything while taking the class. What do you guys think is the best Java compiler?

Requirements (If at all possible)

Windows 2000.
Free - Or a good free version.

If there really isnt any good free Java compilers or free VERSIONS, what non-free compiler do you reccommend. Though I'm really looking for a free one.have you downloaded the Java SDK/JRE? it comes with the compiler , javac
you can use that.Im using Jcreator as its the compiler that I have to use in class. Anyway, Im so confused on why this wont work. Ive created a new project. Havn't created or added any classes yet. But when I try to compile or run it, this is what I get:

--------------------Configuration: Main - - --------------------
Error : Invalid path, \BIN\javac.exe -classpath "C:\Program Files\Xinox Software\JCreatorV3LE\MyProjects" -d C:\Program" Files\Xinox "Software\JCreatorV3LE\MyProjects @src_main.txt"

Process completed.



:-? Btw, Im downloading the SDK right now. Don't know if that will do anything.forget about Jcreator for a while. If you don't have Java installed , DOWNLOAD it from the Sun website and install it. After installing, launch a command prompt. Type in "java -version" . It will show which version of java you have on your machine.
Also to make sure you have the java executables ( java.exe, javac.exe etc) Path set , type "java" on command prompt. If there is no error, you are good with the installation.
ACtually the installtion will set everything nicely for you......

Create a simple java class using an editor...notepad, wordpad etc.. Save it as .java FILE, and use the javac to compile it. you can run your program using java command...

Look up the docs if you have questions...It sounds so simple without a compiler. Isnt that ironic. I need to download Javac, which I will do tomorrow. Im going to bed right now.Where can I get javac? Ive done my fair share of google searches. Ive downloaded several java things, even though I dont know what they do.on the command prompt, type : javac
if there is no error, it's already installed.
It comes with the Java package you downloaded from SUN
another way is to find out where the Java package is installed eg Check C:\ or C:\program files. Its usually in the bin directory.

726.

Solve : file encryption?

Answer»

:-/ I MUST STOP that. (So my parole officer KEEPS TELLING me.)

727.

Solve : Need help creating batch to add new users?

Answer»

I am trying to create a batch file that will make a new user in Windows 2000. Here are the requirements:

1. I must be prompted to SET the password
2. The user must be made a member of the local Admin group and removed from local user group
3. User cannot change password
4. Password never expires


Here is what I have so FAR:

NET USER MisysAdmin m!5y5XXX /ADD /FULLNAME:"Misys Admin Account" /COMMENT:"Misys Admin Account – DO NOT CHANGE" /PASSWORDCHG:YES /PASSWORDREQ:YESNot enough information. Where is the data coming from, hardcoded or an external source? Is this ACTIVE DIRECTORY?

Information on NET USER command:

http://support.microsoft.com/default.aspx?scid=kb;es-xl;251394&sd=tech

Use the set /p VAR="promptstring" command to prompt for the password.

Hope this helps.

728.

Solve : Excel Help with formula?

Answer»

Good Morning:

I am going crazy trying to determine what is wrong with my formula. It seems simple but for some reason I cannot get it to produce and display correctly. Here is the ISSUE:

I am trying two calculations based upon a range of numbers that are in a column (lets just say A2:A4). I want to compute the average and standard deviation using the AVERAGE function in Excel and the STDEV function in Excel. Here is where it gets a little tricky. If there are any "zero" values in the data I want the formula to ignore those values and still produce a result with the remaining relevant information. So lets say that the data in the column looks like this:

COLUMN
A
-----------------------
ROW(2) 10
-----------------------
ROW(3) 5
-----------------------
ROW(4) 0
-----------------------

I want my AVERAGE function to take determine that the only data it will use to take the average are in rows 2 and 3 since row 4 has a zero value. And the same with my STDEV function. Now I believe that I found the correct way to use the function with logical IF functions but I keep getting a #VALUE! result in the result cell. When I look in DETAIL I am getting the correct result but it shows up as #VALUE! in the cell. WHY!!!! My STDEV function looks like this:

=STDEV(IF(G2:G4<>0,G2:G4,"")) I see the formula result of 3.536 in the gray formula BOX which is correct but the cell still returns the #VALUE!. Please help.

I have the exact same problem with the AVERAGE function. The gray formula box displays the correct result but the cell displays the #VALUE!. This formula looks like:

=AVERAGE(IF(D2:D4<>0,D2:D4,""))

I think maybe I am just missing something very small but I cannot FIGURE out what. Please help.

Regards to anyone who can,
Tom

729.

Solve : A little basic help with randum numbers in VB .NET?

Answer»

Hi guys!

WELL, I'm designing a LITTLE lottery number generator that picks a -user-specified amount of random numbers- -between a specified minimum and maximum range-, and for a user-specified number of games. These VALUES are then forwarded to a listbox where each ROW is a seperate game (with the game's random numbers displayed). I'm attempting to use a multidimensional array for this, but I've been running into a little bit of problems

Can anyone tell me what they think the problem with my code is? The values that are passed to the listbox all seem to be zeroes.

Here is the problematic array:

Dim intMini As Integer
Dim intMaxi As Integer
Dim Number As Integer
Dim rand As New Random
Dim Rows As Integer
Dim Cols As Integer
Dim intPicks As Integer
Dim intGames As Integer

intMini = CInt(txtMinNumber.Text)
intMaxi = CInt(txtMaxNumber.Text)
intPicks = CInt(txtNumbersPerPick.Text)
intGames = CInt(txtNumberOfGames.Text)

Dim ArrNumbers(intPicks, intGames) As Integer
For Rows = 0 To intPicks
For Cols = 0 To intfGames
N = rand.Next(intMaxi + 1) - intMini
lstOutput.Items.Add(ArrNumbers(Rows, Cols).ToString())
Next Cols
Next Rows



Thank you! I'll be ETERNALLY grateful!OK, it's 100+ degrees in here and debugging isn't high on my "want-to-do" list. However, I can give you a helpful bit of info: The Random class.

OK, for an example, I'm going to write code to display 5 message boxes to show random numbers between 1 and 10:

Code: [Select]Dim variable As New Random
Dim i As Integer

For i = 1 To 5
MessageBox.Show(variable.Next(1, 10))
Next
This should show 5 boxes with random numbers between 1 and 10.

If any other method is suggested anywhere, and this code snippet works, just use the Random class. There used to be this really lengthy formula for calling a pseudo-random number, but this is so much simpler that it's the only real feasible solution.

For more info on the VB.NET Random class, read this article:

http://www.winnershtriangle.com/RandomNumbersInDotNet.aspNot sure how you posted your code (typed or cut & paste), but there is a mispelling. Surprised the IDE didn't flag this:

Code: [Select]Dim intMini As Integer
Dim intMaxi As Integer
Dim Number As Integer
Dim rand As New Random
Dim Rows As Integer
Dim Cols As Integer
Dim intPicks As Integer
Dim intGames As Integer

intMini = CInt(txtMinNumber.Text)
intMaxi = CInt(txtMaxNumber.Text)
intPicks = CInt(txtNumbersPerPick.Text)
intGames = CInt(txtNumberOfGames.Text)

Dim ArrNumbers(intPicks, intGames) As Integer
For Rows = 0 To intPicks
For Cols = 0 To [highlight]intfGames[/highlight]
N = rand.Next(intMaxi + 1) - intMini
lstOutput.Items.Add(ArrNumbers(Rows, Cols).ToString())
Next Cols
Next Rows

Would also suggest using masked text boxes to cut down on the conversions to integers.

8-)

730.

Solve : Bat File creation?

Answer»

Hi all,

I am new to this but would like to ask if anybody knows how to create a BAT file that when RAN it will change the attributes of the specific folder & all sub folders from READ to full control

Thanks in advance

Mark Don't know what OS you're using. Type attrib /? at the command prompt for all the gory details.

What do you mean by full control? The EXAMPLE below will remove the read-only attribute from all files and folders on the specific path.

attrib -r path\*.* /s /d

Change path as needed.

Hope this helps. Thanks Sidewinder,

I am using Windows XP OS, the application that I am developing requires the user to have full access to certain folders or it denies access to the application. What I wanted to do was create a BAT file that could be run if the user does not have full control to change the attributes rather than the user having to change the attributes manually, so basically the BAT file would remove the read only attribute & give full control to the RELEVANT folder and all sub folders.

I will try what you have sugguested.

Any other ideas would be gratefully recieved

Thanks

MarkATTRIB is actually the easiest way to go about this. Depending on what language you're using, you can also use the FileSystemObject and change attributes from WITHIN the application.

Good luck.

731.

Solve : Visual Basic or C#??

Answer»

Ive been learning about C++, but I would like to start with an easier language. Im going to be a freshmen this year, and Ill be in a java class, as its the only language tought in the school. But on top of that, in my spare time, I would like to learn either C# or Visual Basic. Based on what people have told me, they both are great languages to build applications and are good for beginner languages. Much more so than C++ anyway. So I would like to know which language is a more powerfull language. Also, even though I'm not very good with any language, I would like to have a career in PROGRAMMING in the future. Which brings me to one more question. Is C# or Visual Basic looked upon as being better when trying to get a job in the programming field? Thats the best way I could word that last question, but I hope you understand what I MEAN.

Might it be smart to go with C# anyway as it will make it much easier to transitition from C# to C++ being that their syntax is more similar, then Visual Basic and C++? And because Im already quit comfortable with the C++ syntax?

Thanks in advance.If you wish to use a simpler language, go for Visual Basic. If you wish to go for a more useful, "future-proof" language, C# is the best bet.

But once you have LEARNT a few mainstream programming languages, swapping between languages isn't so difficult.Thankyou. Im going to learn C#.Probably a good CHOICE. Probably should learn some PYTHON too in your free time. You won't regret it.

732.

Solve : Start a batch file through another program?

Answer»

i want to know if it is possible when i start a program in WINDOWS this automatically run a batch file i have made and saved in c:/

how can i do it?

For example: i want to start the Calculator of windows and i need the calculator automatically with no delay to open the batch file i have saved in the same directory with calculator.exe...

is it possible?LAUNCH the calculator with the start command. Don't use any switches and the batch file will continue running independent of the calculator.

Hope this helps. can u plz PUT the code here? If i have that paths: c:/calculator.exe and c:/mybatchfile.bat
what i must WRITE?Code: [Select]
@echo off
start c:\path\calc.exe
mybatchfile


You need to fill in the correct path for the calculator (note: if this is the Windows calc, the correct name of the executable is calc.exe)

You REALLY don't need a separate file for this, just put the start statement in mybatchfile

Hope this helps.

733.

Solve : GDI32.DLL print justification?

Answer»

I write software in VB3 and VB6. I have just bought a new NEC PC, with XPPro SP2. Microsoft will not support me direct, NEC don't "support" the Op system.
The file GDI32.DLL provides a CALL "SetTextAlign" which allows me to set printed text Right-justified, center-justified etc. - this has been available since clay tablets. In the new VERSION, all justification other than Left-justified has disappeared - there are no errors reported, it just doesn't!
The problem occurs with GDI32.DLL version 5.1.2600 build 2180 dated Aug 4 2004. Previous builds (eg 5.1.2600.1346) work ok on other PCs. I do not know how to beat XP's security to copy an older version of GDI32.DLL to resolve the issue on this PC. Can you advise (a) how to copy an older version of GDI32.DLL past XP's security?, and (b) how to resolve the non-justification issue where my software finds the problem elsewhere?
Many thanks for reading this far....!
Steve Dunne
[emailprotected]

Diagnose/troubleshooting:

Written a small test program demonstrating left- right- and center-justification on printed OUTPUT, and tried it on several PCs with VARIOUS versions of GDI32.DLL

Try this:

http://techrepublic.com.com/5100-6228_11-5421501.html

GDI32.DLL is a system file. Installing an older version is risky and done at your own risk.

734.

Solve : Publisher 2003?

Answer»

I am TRYING to make copies of business CARDS. Publisher will not ALLOW me to make a SHEET of 10 cards. What process do I GO through?

735.

Solve : ATAPI problems---!Help!?

Answer»

Hello everyone,
I am a novis. I got myself a NEW computer, i took out the dvd drive from the old and put into the new. New works FINE. my old won't boot up. it is saying ATAPI drives are incompatable. i have TRIED google no luck. I have tried turning the wires around, I have tried to reinstall win. now it won't even detect the hard drive. help me please. post or e-mail to the address below.
ital
[emailprotected]have u checked UR jumper SETTING?

736.

Solve : VB.NET ASP.nET and DAAB - textbox on webform?

Answer»

Hi

I am using ASP.net, VB.net and DAAB.
My application performs a query and then returns a result.
I have all access to the data encapsulted in a class. If the application needs to access the DB it has to do it through the class.

When a case number is selected from a datagrid, on a webform, the case number is sent to the class. Here the query is PERFORMED and the result is returned to the calling program. The calling program then TAKES result and uses it as a data source for a datagrid. The datagrid is then displayed.

But the customer isnt happy with the data grid and WANTS each field or column to be displayed in a separate TEXTBOX. So the result is still sent to the calling program but I dont know how to show each field in its textbox. Does it have to be binded to the textbox??
Please Help
Thanks
The FormView Control might be helpful. FormView is in the System.Web.UI.WebControls namespace.

Good luck. 8-)

737.

Solve : Word Macro .. help needed ..?

Answer»

Hello,

How can I include a table from a website (it is dynamic) in a Word doc using macro?

I use Visual Basic. I know that 'IncludePicture' can be used for dynamically getting pictures from websites, but this is a table and i'm lost ...

Usage: When the macro is run, a report will be created with the latest table.

Thankssomebody (in some other FORUM), suggested that I use Excel's
web query feature to extract the necessary tables.

(Data -> get EXTERNAL Data -> New Web Query)

It seemed like it might just work .. BUT! You need a username and password to enter the page.



How can I make this work?

I have SEEN examples somewhere when SOMEBODY inserted the password along with the web address .. How can this be done?


Also .. IF I do manage to extract the table to Excel, I would still need to transport the table to my Word Document .. I am quite new to macro CODING .. so ANY help would be appreciated ..


Thank you. (If you reply)

738.

Solve : need a clue?

Answer»

hi. first post. thanks for reading:
im trying to do some super simple scripting in winxp. total novice stuff. i think i have the basic idea of batch scripts under my belt and ive made two of them that ALTERNATELY turns on and off a setting in the registry (i exported the reg key and added a rundll32 command and it works). but i want to make a single shortcut that will toggle the setting on/off from one icon. whats the best way to do it? also, is there something i can add so that it runs invisibly (without opening a cmd shell window, as it does now)? apologies for the vague SUBJECT header but i dont really know... thanks!
There is no logic in a shortcut. Sounds like you're trying to move the logic of the batch file(s) to the shortcut.

Do you have a single batch file toggle on if off and toggle off if on? If so you're OK; create one shortcut for the single batch file.

Do you have one batch file to toggle on and another batch file to toggle off? If so you're SOL. One batch file can have many shortcuts, but shortcuts are limited to launching a single run unit.

If you have two files, TRY combining the logic into a single file and get user input at runtime to determine whether to toggle on or toggle off.

If you need additional help, please mention your OS. He is running XP.thanks for the quick reply- yes i have *two* .bat files. one turns the setting on and one turns it off. right now i have to run the one, then the other. but what i want is a single file to toggle the setting. yes i realize right now i cant make a shortcut.. thats why i want to make the single file.

and yes i am running xp pro sp2. i have no idea how to implement your suggestions..

also- is there a way to make a batch cmd run invisibly so the user doesnt see a cmd shell window?If you combine the two batch files together, you'd need either an external value to indicate which way to toggle the setting or an internal value generated by the batch file.

The external method would defeat the idea of one shortcut to run both situations.

One method useful for the internal method would be to check the setting value (on or off) and set a variable. The batch file could then check the variable and flip the setting accordingly.

The command shell cannot be eliminated entirely as you need an interpreter for the batch file, but it can be MINIMIZED and closed automatically.

Hope this gives you some ideas 8-)


739.

Solve : Excel program/formula help needed!?

Answer»

I really NEED help on my Excel PROJECT. I need a FORMULA I put in on Sheet 1 to roll over to the other sheets. How do I do that?This might help you out:

http://www.mvps.org/dmcritchie/excel/fillhand.htm

Hope this helps. What do you mean by roll over?

Do you wish to have a formula use the data from ONE sheet on another sheet?

740.

Solve : How do I delay the closing of a .BAT file??

Answer»

How do I delay the CLOSING of a .BAT FILE?
Can I MAKE it not auto-close?Pauseset it in pifset it in PIF? what is that?

741.

Solve : Mircosoft window programming??

Answer»

what programming lang. is the base of Mircosoft windows?From what I've read much of Windows is written in C and C++. Probably a bit of Assembler in there too.

Vista (aka Longhorn) was originally planned to be written in C# but since Microsoft wanted to finish it in our life times (the jury is STILL out on that), much of the C and C++ code was kept from previous releases.

8-)i never heard of vista when is it suppose to be out?GOOGLE, my friend:

http://www.microsoft.com/Windowsvista/

It is supposed to be out next year, but has had MANY release delays already and who knows when it will really happen. I will be sure to get a copy.....never!

Resuing code is a sure way to get more of the same. If you THOUGHT activation codes were bad with XP, wait till you see this. If you thought hardware requirements were high with XP wait till you see this. If you want to buy all of your applications again...well, you get the picture. i might have to speed the learn process up on learning linux then..

but back to coding what books do u recommend for me to read to learn c and c++?Of course know Visual Basic too




Visit
http://www.modernjaven.comSams Teach yourself C in 21 Days or C++

Very very informative tutorial book and EASY to read and understand. While C Unleashed.....OMG the things I need to be on to understand parts of that.

C is by far my favorite language. I really wish I knew assembler. That's where all of windows's flaws are. Assembly can get into anything.

I gave up after a while. Assembler is crazy. And too bad, x86 assembler might be (will be) obsolete in years when the x86 chipset STOPS being produced.whats assembler do?Google button, UW

http://www.google.com/search?hl=en&q=assembly+language


<--------------


You knew it was coming didn't you?Assembler in my view is basically the lowest language it gets....besides writing machine codes in HEX (or binary if you're crazy ). I am kinda reading up on it again. It really let's you understand what's going in the computer.Quote

Google button, UW

http://www.google.com/search?hl=en&q=assembly+language


<--------------


You knew it was coming didn't you?


yea i did but its my first reaction to a question " whats that do?"

lol

thanks for the link
742.

Solve : Executing a batch file?

Answer»

how do execute a batch file without a start COMMAND?

i TRIED

process = Runtime.getRuntime().exec("CMD start C:\\startup.bat");

it pop out a few windows to run the batch file.so is there any other ways to have only one window to run the file.Try this:

process = Runtime.getRuntime().exec("C:\startup.bat");

The OS will know what to do with a batch file. (LOAD the command processor and execute the batch file)

Hope this HELPS.

743.

Solve : VB : Data environment connection : database?

Answer»

I hav used DATA ENVIRONMENT to make a DATABASE connection.
database name&path = c:\contact.mdb
table name =customers fields= custId, custName, custAddress, TELEPHONE, Email

I would LIKE to search a record.
PleaSE help me with a full code i.e. all Declarations and syntax

please please

744.

Solve : a LANGUAGE TO LEARN?

Answer»

What other languages do you KNOW? PASCAL, Fortran, DELL, JAVA?BUMP


Because I LIKE it.

745.

Solve : Visual basic forms + website?

Answer»

I taught ma self VB via the internet. I learnt how to design the databases,tables and the insertions.But one of ma friend told me that i can connect these databases to the WEBSITE wic i designed some TIME back. But i dont knw the procedure and how i can do it. I used Dream weaver in designing the website but i have failed to connect the vb forms with ma website.
I need yo helpQuote

I need yo help
Okay:

http://dictionary.reference.com/
http://grammar.ccc.commnet.edu/grammar/



(I don't know much about VB, SORRY.)
746.

Solve : Programming Chess Game?

Answer»

Hi. I am making a chess game, in Blitz Basic but it's not the language I'm having difficulty with but the concepts. The basics are there and you can move pieces around. If anyone could help it'd be appreciated. I can send it to you if you like.

Check detection. The obvious method is to simply cycle through each cell and if it contains a piece, look at each cell to which it may capture and see if it contains a king, and do this for the whole board. However I am sure there must be a much better way of doing it. Another idea I had is to create two arrays the size of the board, one of white one for black, recording the number of pieces attacking each square. When moving a piece, each square to which the piece may capture has its value reduced by one, then in its new location each possible capturing square has its value INCREASED by one, to keep track of which squares are attacked. I imagine this could also be useful for the AI when deciding which squares are dangerous?

Castling. The only way I can think of is create two duplicate piece types, rook-uncastlable and rook-castlable, which are the same apart from only the castlable one may be castled. As soon as a rook-castlable is moved it is transformed into the uncastable type.

En-passent capturing. Similar possible solution. A pawn type for the normal one, and a seperate but otherwise identical type for those which have just moved forward two squares. Otherwise how can the difference be told between a pawn which has just moved 2 squares, or 1 square over two moves?

Checking for clear paths. When attempting to move a piece I have created a function into which one enters the starting x, y and finishing x, y. The function works out what kind of movement (horizontal, /-diagonal etc) from the coordinates entered. It then scans each square along that path to see if it is empty or contains a blocking piece. However I am having a bit of difficulty getting it to work properly all the time (only knights behave all the time - of course!!) What is the best way of doing it?

Thanks. After these have been sorted I shall try to add some AI. I've already experimented with minmax in a Reversi/Othello game which I can send you if you like, so I have some basic idea of how to implement it, but chess is far more complex. For a start there is more than one type of piece!


Well most of the concepts for a program are there. If you can program this, I believe you have the right ideas.

As far as efficiency...the chess programs today are Phenominal (Chess Master 10, Fritz) they calculate not just available squares, their AI is soooo advanced, can calculate combinations to attacks to gain material. They have databes of chess openings programmed (if this then this, rather than is this move safe). They can even adapt to the player and make moves BASED upon that.

I saw a game of X3D Fritz vs Gary Kasparov (best at that time) and Gary was losing, but pulled a draw out.

For the basics, you have it all down, I think, (I am ranked Class A in chess at the moment, very close to expert) from what I can see that's a good foundation.

P.S. Want to play? Thanks for your reply. I accept your challange to Chess! However I am still looking for some specific answers for the problems I posted. There must be a better way of doing check detection. For the AI I have read some things about USING a random hash table using XOR or something but I didn't quite understand it. I just need someone to clarify it a bit for me, and tell me in practical terms what I need to do. I don't want to create the next Deep Thought, just something that plays OK.First of all, for the pieces, they do not have to test the entire board, a check to see what moves are legally possible must be done first. There wouldn't be much of a point in checking if a pawn can move to the right 6 squares. So that limits the checking. I believe that is how AI does it, I am not sure there is another way.

Series of checking as follows..

All Possible moves for the piece->all possible squares that can be moved to without its own pieces in the way-> can a piece be taken/taken back with gaining material or having equal material after the trade.

As for XOR and other methods....not really sure. I only KNOW C pretty well, not a fan of blitz basic.

In C...or C++ actually since you can use OBJECTS....it is basically a bunch of checking with if statements for each peice.Thanks but do you have any help with the code?Sorry, I have no experience in blitz basic, and as for C I don't think it would be too fun or as easy to program all of it (or Assembler Yikes )It doesn't matter what language the principles are the same.Have you tried using gamemaker?

www.gamemaker.nl

Probably the highest level language i have seen.....function statements are replaced by icons, very easy to pickup.Quote

Probably the highest level language i have seen.....[highlight]function statements are replaced by icons[/highlight], very easy to pickup.


What? How is that a high level language?Yes I once used something similar to that called The Games Factory. GX1_Man, they are basically a bit like a "programming wizard". You have the "play" area where you drag and drop objects and things, you can set them to various modes such as wall, ladder, whatever. The actually programming part consists of various wizard like questions. For example, you'd create a new line about collision. You'd then select from a menu two object types you've created on the play area, then you'd add the actions you'd like, for example alien collides with player, playerlives = playerlives -1. Well that is how TGF worked, by a quick glance at the website that is how that works too. Although easy to use, their problem is that you can only really make what they are geared to make, that is arcadeish style games, and I don't think it would be suitable for creating a chess game, especially when it comes to AI. But thanks for the suggestion anyway, johnchain.No, I meant high level language as in not by complexity....you know....

Assembly being low level....
C being mid-level
Visual Basic being High Level

GML as stated on the website is like a combination of C++ and Visual Basic.http://en.wikipedia.org/wiki/High-level_programming_languageYes, yes, but does anyone have any actual HELP for my problems!?
747.

Solve : Chinese Language in Java?

Answer»

Hi everyone. I have JTextArea in my application. Now I just want to input Chinese characters directly from keyboard. I have set Chinese font and it can display chinese font if I copy and paste chinese text in it. The only thing left is that when I type something from keyboard, it displays english language. I know there is something related to keymaps. I realy appretiate if youplz give me Chinese keymap that I can directly use to input chinese. I am using JDK1.4 and I have windows Xp with chinese font installed.
I shall be very thankfull to you.
..::DWHow To INSTALL East ASIAN Language SUPPORT Under Windows XP

This may be what you NEED. 8-)

748.

Solve : making a ping script in win-xp?

Answer»

Hi all

I am using Windows xp OS and NEED help on a two simple issues. I'll really appreciate if you can help me.

Issue 1. I want to ping an IP address continuosly and log the ping results as text file. If it is possible, I want to execute both commands(ping and log) in the same line. What would be the correct command syntax? (I mean I need to execute both ping and log with one "ENTER")

PS: I have to see the ping reply packets on the screen while it is being logged at the same TIME.

Issue 2. I need to ping 20 IP addresses on 20 command line windows at the same time, log the ping results as well. In other words I need to do Issue one on 20 windows and 20 IP addresses. Could you help me how to create a script about do Issue 2 with one command?

command line window 1: pings and logs 172.17.48.2,
command line window 2: pings and logs 172.17.49.2,
...
...
command line window 10: pings and logs 172.17.48.66

Thank in advance for helping
You probably need to ask these questions in the DOS or Programming forums. But first, a caveat. Unless you are responsible for the target machine, you should think twice before running a continuous ping against it. Most site ADMINS would consider it a breach of netiquette. That said, I assume you want to do this to test whether one of your own systems is up, which is fine. Choose a reasonable delay between pings, to keep bandwidth use down.OK ROB THANKS, I ll PUT THIS IN PROGRAMS NOW

749.

Solve : programming lang?

Answer»

i dont know which lang to learn Java, Java 2, C, C++, C#

i want to make programs for like linux os"Java Java 2 C C++ C#". Is that one language? LOL Ever user commas?i barely swueezed through english.. but there different langs.For Linux, you should probably start with C. Once you've got C sussed, you'd find the other procedural-based languages fairly easy to pick up. C++ would be a bit more of a challenge - it is OO-based.Depends if you want to program for fun, or profession.

Blitz Basic is easier to learn and use than C, and Linux compatable.

http://www.blitzbasic.com/Products/_index_.phpQuote

C++ would be a bit more of a challenge - it is OO-based.

what do you mean 00-based?? :-?Object orrientated. Or whatever I can't spell.oh ok.. i think im going to do programming for a hobbyDo you have any programming experiance? And what is your PARTICULAR reason for wanting to program for Linux (is that your OS)?dont laugh but ive programmed in truebasic and thats pretty much it.. it is my os for my computer in my room and it will also be on my new macbook when i get it.. and couldnt i use c for in windows kinda?Any programming language is a good start. I say C for Linux because it is the major programming language used for developing the operating system. The great bulk of the kernel, drivers, libraries etc. are coded in C. Some stuff is in C++.

I find object-oriented programming languages less intuitive than procedural languages, but that is very much a matter of training and personal preference.Quote
I find object-oriented programming languages less intuitive than procedural languages, but that is very much a matter of training and personal preference.

Does that mean you like it more or less? whats the difference between the two?Quote
Does that mean you like it more or less?
Hah! I'm too old, or dense, or both, to get on with OO. Procedural languages harmonise better with the way I think - step by step, one thing at a time...

(No, I don't do parallelism and semaphores either...)im still confused on the difference between the two :-?Well procedural is mostly do this do that blah blah blah.

OO is all about objects. X does this, X does that, X relates to Y in this way, etc.oh kool thanksProcedural is easier to understand what's going on... OO is easier to make "windows" applications, meaning it has buttons and scroll bars and things. But it's rarely used for games.i love this forum.... i learn new stuff daily Why is procedural seen as easier. Object Orientated programs are basically designed for simplicity.

Create and object->make it do something.

I think it is SIMPLER in many cases. And I am not sure, but I think all OO languages are high level languages.

Learn C for linux and just in general. Good place to start and know how your computer works at the same time. They call it the "high low-level" language. Since it can touch parts of your hardware while being easy to read and understand.Quote
while being easy to read and understand.
Can you read and understand this? #include <stdio.h>

main(t,_,a)
char *a;
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
[emailprotected]'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
Compile and run if you're curious. You'll be surprised at the results.Rob if your going to post Code , at least try to format it into Brain Usable Segments.

I COULD Go trough that and tell you what it would do.... But its a Mess why would you write it like that?it's for the purpose of code obfuscation
http://en.wikipedia.org/wiki/Obfuscated_codei kinda thought so.

But why would one use Obfuscated Code to show SOMEONE how complicated it is?

it doesn't show it's Real Difficulty

thats kinda like posting the contents of a compiled EXE and saying this is what OO looks like

Code: [Select]MZ1 ! ! Ð ËË€üu8<w4.ƒ>} u
.€> tè& r
P.¡} ÄÄXƒÄÏ
Àu3Ûë <u3À»­­Ï.ÿ.y PSQRVWŒÈŽØŽÀ¾€ ¿Š »š Yº° ÄÄX r.£} .Æ _^ZY[Xà VCDEX.DLL VDDRegisterInit VDDDispatch ‡Û‡Û‡Û‡Û‡Ûÿÿÿÿ@È MSCDEX00 ¸3Í!€ûtëP?€ÿ2tëH?´°Í/?û­­uë9?&Ž, ´IÍ!´5°/Í!.‰y .Œ{ º ´%°/Í!ºÐ ±ÓêƒÂ´1° Í!¸ LÍ!@John Chain, try making a chess game in OO. It's hard enough in procedural

They are both designed for different needs.To be honest, I would have thought that a chess game would be the perfect candidate for OO code. The ELEMENTS of chess lend themselves readily to description as objects. I would make an exception to my preference for procedural coding.Quote
i kinda thought so.
But why would one use Obfuscated Code to show someone how complicated it is?

like the wiki says, it has its uses.
http://en.wikipedia.org/wiki/Obfuscated_code#Uses_for_obfuscation

How would OO be easier? What about the AI?class brain {

brain
{
iq = 100;
inebriation = 1;
confidence = 10;
}

drink
{
this.inebriation++;
this.iq -= 10;
this.confidence++;
}

think
{
if (this.inebriation > 3 || this.iq < 50)
{
result = rand(0, 2000000);
}

// etc...
}

}im so confused
750.

Solve : biginner?

Answer»

can someone pls send me some tutorial WEB SITES on introductory computer science.I found 4.4 MILLION possibilities. Happy READING

http://www.google.com/search?q=introductory+computer+science&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official