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.

651.

Solve : Please help me!!!?

Answer»

Hello, how are all of you?
I am learning JAVA language. I want to make VoIP application in Java. I know that we can make it in Java but I dont know how to make it. Can you please tell me any LINK which give me some help and guide me in the RIGHT direction or if you have any information then I will appretiate that info.
I shall be very thankfull to you....
Do take care of you and others and be happy.
Bye...
Dr WahabGoogling "VOIP in Java" PRODUCED 1,080,000 hits some of which are tutorials, and there are some specialised forums - may be some help to youFrom the sounds of the post, you are apparently a JAVA novice. I really don't THINK that VoIP is the first project you should tackle.

652.

Solve : Batch popup message?

Answer»

Is there anyway to popup a message with a batch script where the user has to click OK for the batch file to run?

I current have it so that it pops up a message and the user has to click OK and then ENTER in the command prompt but this is a problem because the command prompt gets hidden behind another active window. Any help is appreciated.

============================================================
msg %username% Click OK and then Enter to start backup.
pause
============================================================

Also, if you can tell me if the following script can be shortened or rewritten so it is closer to scripting standards, that woudl be great.

==========================================================
msg %username% Click OK and then Enter to start backing up your OUTLOOK Email

pause

if not exist "c:\Documents and Settings\%username%\My Documents\Outlook Backup\null" mkdir "c:\Documents and Settings\%

username%\My Documents\Outlook Backup"

if not exist "c:\Documents and Settings\%username%\My Documents\Outlook Backup\Archive\null" mkdir "c:\Documents and

Settings\%username%\My Documents\Outlook Backup\Archive"

xcopy "c:\Documents and Settings\%username%\My Documents\Outlook Backup\Current" "c:\Documents and Settings\%username%\My

Documents\Outlook Backup\Archive" /d/e/c/q/h/r/y

rmdir /S/Q "C:\Documents and Settings\%username%\My Documents\Outlook Backup\Current"

if not exist "c:\Documents and Settings\%username%\My Documents\Outlook Backup\Current\null" mkdir "c:\Documents and

Settings\%username%\My Documents\Outlook Backup\Current"

if "%TODAYDATE%"=="" set TODAYDATE=%date:~4,2%-%date:~7,2%-%date:~10,4%
if "%date:~2,1%"=="/" set TODAYDATE=%date:~0,2%-%date:~3,2%-%date:~6,4%

mkdir "c:\Documents and Settings\%username%\My Documents\Outlook Backup\Current\%todaydate%"

taskkill /IM outlook.exe

ping -n 60 127.0.0.1>nul

xcopy "c:\documents and settings\%username%\local settings\application data\microsoft\outlook" "c:\Documents and Settings\%

username%\My Documents\Outlook Backup\Current\%todaydate%" /d/e/c/q/h/r/y

for /f %%i in ('date /t') do (
if %%i==Fri if exist "c:\Documents and Settings\%username%\My Documents\Outlook Backup\Current\**-**-****" rmdir /S/Q

"C:\Documents and Settings\%username%\My Documents\Outlook Backup\Archive\"
)
msg %username% The backup has completed. Click OK to close.
============================================================You could try using the msg command with the /time:xx and the /W switches. Used correctly you can eliminate the pause with it's additional interrupt to the console.

Batch files? Standards? You're KIDDING, right? Writing batch language has been an exercise in spaghetti code since 1980. If your code WORKS, don't mess with it.

8-)Thanks for the help...the "msg /W" works great.

653.

Solve : System varibles?

Answer»
Hello
I WANT to WRITE a script for windows to edit the SYSTEM variables. Does anyone knowed how can I get to the Windows system variable??
Tnks

DavidThis might help. Note: MYVAR is just arbitrary name I made up.

Dim WshShell, WshEnv
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("SYSTEM")

To set the MYVAR variable use:

WshEnv("MYVAR") = "Any Value"

To remove the MYVAR variable use:

WshEnv.Remove "MYVAR"

If you use the SET command from the command line, you will get a list of all variables defined in the environment. If you need new ONES, just make one up and change MYVAR accordingly. Any changes/additions made, only last as long as the user session.


Hope this helps.
654.

Solve : Runtime Error 3011 in VB 6.0?

Answer»

Hi there,

I am stumped.

I am connecting to a database programatically using the data object on the form.

The Microsoft Jet database engine COULD not find the object . Make sure the object exists and that you spell its name and the path name correctly. (Error 3011)

I receive the above error witht the FOLLOWING syntax:

datAppeal.DatabaseName = App.Path & "\esltdb.mdb"
OpenDatabase App.Path & ("\esltdb.mdb")
datAppeal.RecordSource = "Select * from APPEAL where PERSNO like " & nPersno & ""

I open this form from my main form and only want to display data relevant to the id number from the main form.

Please tell me where am I GOING wrong.

Regards
ChristoI would think you need an object variable that represents the database object that you want to open.

Code: [Select]
Set database = workspace.OpenDatabase (dbname, options, read-only, CONNECT)


Also you might check what App.Path RESOLVES to. Personally I tend to use ADO, write the code inline, and use the MSHFlexGrid to display the data.

Hope this helps. Thanks it worked

655.

Solve : help required?

Answer»

I want to create a batch file or somethink similar which when run will ask for the computer name then open a file on that computer.

I have wrote the following which asks for you to input the computer name


@echo off
set /p dwd=Type the computer name:

I then want the result of what was TYPED to be put in the following. where the dwd number would be what they typed

\\Dwd1a595\C$\WINNT\Version.bmp

is this possibleI THINK this was already ANSWERED in the DOS section:

\\Dwd%dwd%\c$\WINNT\Version.bmp

Please don't duplicate your POSTS. It only creates confusion.

8-)

656.

Solve : Math.Sqrt() problem.?

Answer»

Im USING C++ Visual Studios 2005 express edition.
Im having a problem with this code:

float quad1(float a, float b, float c)

{

float d;

float e;

d=Math.SQRT(b*b-4*a*c);

e=(-b+d)/(2*a);

return e;

}


And here is the error:

c:\documents and settings\zach williamson\my documents\visual studio 2005\projects\workplace\workplace\workplace.cpp(42) : error C2065: 'Math' : undeclared identifier

c:\documents and settings\zach williamson\my documents\visual studio 2005\projects\workplace\workplace\workplace.cpp(42) : error C2228: left of '.Sqrt' must have class/struct/union

type is ''unknown-type''


Am I not including a library?I'm not a C++ programmer, but it doesn't appear you have a library reference. The following code will compile, whether it produces the right result is another matter.

Code: [SELECT][highlight]#include "math.h"[/highlight]

float quad1(float a, float b, float c)
{
float d;
float e;
[highlight]d=sqrt(b*b-4*a*c);[/highlight]
e=(-b+d)/(2*a);
return e;
}

I did find out that there is a difference between sqrt and Sqrt. I have no idea if this is significant to your program. 8-)Aha! So there is a math library. Thank you so much!

657.

Solve : programs to use for programming Java?

Answer» COULD someone PLEASE tell me some good PROGRAMS to use for programming in Java other than Ready to Program or Blue J?

Also, I'm trying to install Ready To Program and it ALWAYS stops at 27 percent when i run the setup and says "Extraction FAILURE: return from extract=-9". Can someone possibly tell me why this is happening? Thanks.Everything from editors to IDE:

http://www.freebyte.com/programming/#java

Hope this HELPS.
658.

Solve : Problem with bat2exe.com?

Answer»

hi,

i downloaded a utility from this SITE called "bat2exe.com" which converts .bat files to .com so that the source code is unreadable.

but there is a problem with the utility. it does not open any files.

i want it to open a .TXT file in the same FOLDER as the .com file but it just shows the message "bad COMMAND or file name"

please help me
Thanks.

this is what i had typed


@echo off
j:\readme.txt
@pause

(the j: is my HD DRIVE.)readme.txt is not an executable file. Try: edit j:\readme.txt

Bat2exe has many known problems. It does not handle IF statements very well and is totally clueless with FOR statements.

Hope this helps.

659.

Solve : simple Excel filter-function?

Answer»

I suppose this isnt really PROGRAMMING PUT it's the nearest topic.

I cant find out how to output data (e.g. BIRD) that is within several columns of one EXCEL datasheet into a new datasheet.

The thing is that BIRD isnt always in one of the 9 columns, so I only want the rows pasted that actually have the word within the row's nine columns.

This is what I think it should be like (similar):
CODE: [Select]=IF('ALL CUSTOMERS'!J2:R1216>=BIRD;"BIRD FOUND";"")

This should mean that if in my Excel sheet "All customers" within the nine columns (J-R) the word BIRD is found, then the rows with BIRD FOUND should be pasted on my fresh sheet, otherwise blank.

660.

Solve : C++ Builder 6 - Send Mail?

Answer»

Hi,

is there a function to send a mail in C++ BUILDER?

Kind Regards,
RowinThis component (not sure if it's free) may be helpful:

Send Mail

There is also an C++ Builder action CALLED Tsendmail. Try GOOGLE for more details on that.

Good LUCK. 8-)

661.

Solve : Gateway logo?

Answer»

How do I get RID of the "Gateway" logo that appears as my computer boots? I would really like to PUT something eles there if I knew how. Suprisingly I found a lot of websites for CHANGING your logo.
Just search for "computer startup logo" in any search engine.

Beware: You have to change your SYSTEM BIOS code and then re-flash the BIOS. The slightest mistake will TURN your computer into an expensive paperweight.

Good luck.

662.

Solve : Visual Basic .NET?

Answer»

I've just finished mastering DOS commands and programming to the point where I make commands appear at will. Now, I want to further my education of programming with Visual Basic, to learn the ropes. HOWEVER, I STARTED with Visual Basic .NET 2003, and all the books I have assume I know Visual Basic 6.0! Where can I go to learn the basic fundamentals uf programming? (Currently, most of the book's code looks like gibberish.)I'm not sure that anybody masters the CMD processor commands, ESPECIALLY since it changes with every version of Windows. Be that as it may, VBScript might be good next step. Scripting offers objects, methods and properties but still maintains a text file environment run under an INTERPRETER as opposed to full scale compiling and linking.

You might want to CONSIDER rewriting your batch files as scripts. It's not as easy as it appears. A site that can help you with tools, examples and hints can be found at: Windows Script

Good luck. Hey, I know I'm no expert compared to you, but I have done everything my current version (5.1) gives me. I guess I got ahead of myself. I just mean I'm "good" at it. That IS a good idea, by the way. I'll do that.

663.

Solve : Back ground script really cool?

Answer»

Hello
am a JS programmer
i am strugelling in creating a SCRIPT that will make my website background same as the USER window background

is it possible by JS ?
can you please tell me how if possible in and PROGRAMMING language so that i will SET the background directly the the user PC as my site looks like DESKTOP look

664.

Solve : Batch File For Complex Date Calculations?

Answer»

Hi,
I need a bit of help with a complex batch file i am TRYING to create on Windows 2000 (and hopefully it will work on XP as well...but that's an ideal, not a requirement)

Basically i have a Jscript i want to convert to a batch file to calculate the date from the last defined day of the last 7 days. I will paste the Jscript info at the end of the post for you to get a better understanding of what i am trying to do.

For eg the script will: get date of last Monday (or other days), show in format DDMMYY or YYMMDD or even MMDDYYYY (must be able to be adapted for each situation) and then use that calculation as part of a command.

I am using wget (and other programs) to download files on a daily basis that have the date as part of their file name. So i need the date of the day i specfy to be included in that command. For eg: http://www.somesite.com/files/file290606.ext

However i may need to download files dated on Monday only made available later in the week. So for eg today might be 29/06/06 (or any date up to 7 days past the file date) but i need a file from Monday which might be 260606.
* Please note I cannot calculate from "X" days ago as the day i download the files will vary.

Here is the Jscript i have been using which should help you understand what i am talking about:


Quote

function getDateOfLastWeekday(weekday){
var date=new Date() // Get current date
var difference=0 // Set the difference between the date we want and today
if(date.getDay()<weekday){ // Has the desired weekday passed?
difference=7-(weekday-date.getDay()) // Yes, figure out how many days ago that that weekday occurred.
}
else{
difference=date.getDay()-weekday // No, figure out in how many days it will occur.
}
new_date=new Date(date.getTime()-difference*86400000) // Make a new date by removing 86400000 milliseconds for each day from today's date.
new_year=new_date.getYear().toString().substring() // Get the year, convert to string and remove first two numbers
new_month=new String((new_date.getMonth()+1)) // Get the month, convert to string
if(new_month.length==1){new_month="0"+new_month} // Prepend a 0 if neccessary
new_day=new_date.getDate().toString() // Get the day, convert to string
if(new_day.length==1){new_day="0"+new_day} // Prepend a 0 if neccessary
return new_year+new_month+new_day // Smack it all together in one big string and send it back to whoever asked!
}

var Shell = new ActiveXObject("WScript.Shell");
Shell.Run("http://www.somesite.com/files/file"+getDateOfLastWeekday(6)+".ext");




Thanks for you help. I know very basic batch commands but nothing of this level.

ExistanceOh yeah sorry this is the usage info on that Jscript i pasted the code for above in my first post:
Quote
// It takes an integer between 0 and 6 as an argument (above 6 is accepted but might give incorrect results).
// 0 is Sunday, 1 is Monday, ..., and 6 is Saturday.
// It returns the date of the previous weekday that matches the argument in the form of ddmmyy.

// So you could do:
// Shell.Run("mms://somewebsite/"+getDateOfLastWeekday(3)+".wmv");

Existanceyou can just run the javascript using cscript/wscript..no need to convert to batch...Thanks for your suggestion ghostdog74...i'm glad that someone replied.
I currently run the jscript by itself but i would much prefer to make into a standalone batch file.

The main reason is that jscript seems to run straight through its commands without waiting for any process or command to finish first, unlike a batch file where you can make it wait properly and then proceed or retry depending upon the outcome.

Does anyone know how to call the date in "any" of the ways i need to call it? Even a nudge in the right direction is better than nothing...

Thanks in advance,

ExistanceI don't even think that the ancient LANGUAGE of BATCH is designed to do domething that complex. I'm thinking of a few ideas, but it wouldn't be able to do cross-month calculations and there's no way it could know which month has 30, 31 days, etc.. It'd just be foolin around with the "ECHO %date%" command.

Wait just a minute... it might work...here's my line of thinking... maybe it CAN be done... I'm going to try an example that sets back a week from the current date...

This would require a lot of calculating, and knowledge of the number of days in a month; there's no algorithm in BATCH (*censored*, that's the second time I accidentally typed "BATVH"...) to do that. So... here I go on this...

The output of "ECHO %date%" sans the quote marks is similar to the following:

Wed 07/05/2006

Dredging up my DOS tutorial, you can take only part of that with the "~" command and save it as a variable. Remembering that the "W" is character 0 on the line, you could set x as the day with the following:

SET /A x=%date:~7,2%

That would start at character 7 and end 2 characters later. Then, x would be the number 05. Then, you could do this:

SET /A day=%x% - 7

NOTE: This only works on later operating systems. Test the /A switch by typing at a command prompt (minus the quotes): "SET /A x=7 - 2" and pressing [Enter]. If you get an error, my method won't work. If you see the number "2" then another prompt, it works and so will my method... I think.

to go back a week. This can cause negative numbers, but you can use that to your advantage. Use this to get the month:

IF %day% LEQ 0 SET /A month=%date:~4,2% - 1
IF %day% GEQ 1 SET /A month=%date:~4,2%

This says: "If the value of variable "day" is less than or equal to 0, set month as two numbers starting at the 4th character in the date minus 1. If this value is equal to or greater than 1, just take the two characters with no subtraction."

Then go through the process of doing this (I'm abbreviating the excruciating list):

IF "%month%"=="0" SET month=Dec
IF "%month%"=="01" SET month=Jan
IF "%month%"=="02" SET month=Feb
IF "%month%"=="03" SET month=Mar
IF "%month%"=="04" SET month=Apr

...

IF "%month%"=="12" SET month=Dec

Yeah, you get to do all 13. This sets up your month. But what about the negative day (if you have it)? Well, this is where I'm trying to work this out. It seems possible up to this point, but I'm getting odd errors from DOS testing this part of the code. I'll need to get back to you on this... unless you say "never mind".

This is so big, it may be my biggest challenge yet.

EDTED: I think I got it, but it will require a lot more work. Let me keep going on this, I'll keep you posted! Except that I need to run out to Wal-Mart in about half an hour, so you may need to wait for the rest of this.OK. Now you'll need to use precisely the code below. It will direct the batch file to go to the subroutine that corresponds with the month:

Code: [Select]GOTO %month%

:Jan
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:Feb
IF "%day%"=="0" set day=28
IF "%day%"=="-1" set day=27
IF "%day%"=="-2" set day=26
IF "%day%"=="-3" set day=25
IF "%day%"=="-4" set day=24
IF "%day%"=="-5" set day=23
IF "%day%"=="-6" set day=22
GOTO AfterDayChange

:Mar
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:Apr
IF "%day%"=="0" set day=30
IF "%day%"=="-1" set day=29
IF "%day%"=="-2" set day=28
IF "%day%"=="-3" set day=27
IF "%day%"=="-4" set day=26
IF "%day%"=="-5" set day=25
IF "%day%"=="-6" set day=24
GOTO AfterDayChange

:May
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:Jun
IF "%day%"=="0" set day=30
IF "%day%"=="-1" set day=29
IF "%day%"=="-2" set day=28
IF "%day%"=="-3" set day=27
IF "%day%"=="-4" set day=26
IF "%day%"=="-5" set day=25
IF "%day%"=="-6" set day=24
GOTO AfterDayChange

:Jul
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:Aug
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:Sep
IF "%day%"=="0" set day=30
IF "%day%"=="-1" set day=29
IF "%day%"=="-2" set day=28
IF "%day%"=="-3" set day=27
IF "%day%"=="-4" set day=26
IF "%day%"=="-5" set day=25
IF "%day%"=="-6" set day=24
GOTO AfterDayChange

:Oct
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:Nov
IF "%day%"=="0" set day=30
IF "%day%"=="-1" set day=29
IF "%day%"=="-2" set day=28
IF "%day%"=="-3" set day=27
IF "%day%"=="-4" set day=26
IF "%day%"=="-5" set day=25
IF "%day%"=="-6" set day=24
GOTO AfterDayChange

:Dec
IF "%day%"=="0" set day=31
IF "%day%"=="-1" set day=30
IF "%day%"=="-2" set day=29
IF "%day%"=="-3" set day=28
IF "%day%"=="-4" set day=27
IF "%day%"=="-5" set day=26
IF "%day%"=="-6" set day=25
GOTO AfterDayChange

:AfterDayChange
Two things should be noted: One. This doesn't account for the LEAP year. My response: Shut up. I really don't care at this point.

The other is that it was intentional that Jul and Aug have 31 days. This is a blinding flash of the obvious, but I've had people argue that that is impossible.

Now, we have the month and day of a week ago. The year is easily gotten:

SET year=%date:~10%

Finally, at the bottom, you can do this:

ECHO A week ago, it was day %day% of %month%, %year%.

One final note: I haven't figured out a way to make this work cross-years. Just don't run it between January 1 and January 7 and you'll be fine.

EDIT AGAIN: Hold on, I'm not getting a good month result. Let me debug this... ...got it. Piece of cake.Turns out, I made a human error: I forgot to fill in the other months! *smacks forehead*

Attached is a zipped version of the completed sample you just read. Extract to C:\, then go to the command prompt, type "cd \" bar the quotes, then type "one_week_ago" minus the quotes to see the results of my work. Open the batch file in Notepad to view the source.

It isn't exactly what you asked for, but it does show how it is possible (although hard) to do something like this. *pats self on back*

EDIT AGAIN: Hold it, another fatal error noticed. Give me a minute...

EDIT ONE LAST TIME: Fixed.Thanks for all the work you have done Dilbert. It's much appreciated.

I tested the script and it came back with :A week ago, it was day 31 of May, 2006."
I'm in Australia so the date today is Thursday 06/07/2006.

I think a little reworking of the batch file would FIX that though. But at least now i can see how it is done.

I wasn't aware it was so hard to get a batch file to do what i wanted. What is even harder is that i had hoped to display the date not in terms of from "X" days ago but from say the last "Tuesday" or "Monday" (or other days) from within the last week, displayed in the format DDMMYY (or others) and used within a command to get a file like: http://www/somesite.com/file"date_of_last_past_Monday".wmv etc.

I'm thinking i might have been a little unrealistic to expect to achieve this with just a batch file. The work that would be involved just to do that (including with leap years) is just unbelievable.

I would assume you would have to calculate the date say from 1-6 days ago individually, then associate that with the day name (like Monday, Tuesday etc) which fell on that date, then figure out a way to get the format i need (DDMMYY or MMDDYY or DDMMYYYY etc).....WOW. Erm....

What do you think? Am i expecting too much to be able to achieve all this from a humble little batch file?

ExistanceQuote
Thanks for all the work you have done Dilbert. It's much appreciated.

I tested the script and it came back with :A week ago, it was day 31 of May, 2006."
I'm in Australia so the date today is Thursday 06/07/2006.

Does May not have 31 days? Or is it different in Australia? I'm in the USA so I have no idea. But, in the USA, on the 7th of any day, going back 7 days would bring the day counter to "0", so it would roll back to the previous month, or June. June has 30 days, so a day value of "0" would be reset to the last June day possible, or "June 30".

By my calender, it is the 5th of July, and the result on my PC is the following:

Quote
A week ago, it was day 28 of Jun, 2006.

According to the standard USA calendar, this would be a correct answer and the file is functioning as intended.

Again, if our calenders are different (Like I said, it's 7/5/2006 here, though it'll be 7/6/2006 in 2 hours), that would explain it. IF they're not different, something went wrong somewhere between finishing debugging and the final upload. And not much happened between those two points in time.

BATCH is extremely limited; it's an antique method of "programming". If I knew how, I'd use scripts for everything instead of BATCH. But I'll need to learn the stuff, then I'll have to get Norton to accept my VBS files, etc... it's a project for later.

I'm not 100% sure I understand what you want. Just so I don't run off making a seemingly impossible batch file you don't need (that was 4 KB -- pretty large for a BATCH), Let me see if I get what you're saying:

1. User inputs a day of the week, such as "Tuesday".
2. Display all files in the current directory that were made this week, from that date to today.
3. Do something with these files.

If that's what you're looking for, the job will be considerably easier than you'd think. It would be a simple matter of a few commands interpereted the correct way, then a simple DIR based on those parameters will be simple enough to show it, then any commands after that are coder's discretion.


The reason that the batch file you just saw was so darn complicated is evidence that BATCH is very limited: DOS has no real way of sobtracting dates. It isn't intelligent in that way. It just remembers the date in that format, and refreshes it every 24 hours. The BATCH file I wrote isn't as complicated as those files can get; the main reason it's so large is because it needs to send an innocent number through the wringer, as my code interperets that number to get the month and day of 7 days ago -- no small feat in DOS.if your only concern is
Quote
"jscript seems to run straight through its commands without waiting for any process or command to finish first"
i am sure jscript has some timer functions to stop for a period of time before processing continues right? why not use that...?
665.

Solve : return value of select statement ASP.net?

Answer»

Hi

Is there a way to check the value of a statement that RETURNS a select query? Here is the one line of code that I am talking about:
Return "Select a.CASE_NO_ID , a.SURNM_X, b.APP_INDEX_ID, b.VRDCT_I From WORK_OBJ a, APLCN b where (a.CASE_NO_ID = b.CASE_NO_ID) and (a.CASE_NO_ID = '" & CaseNumber & "') and (a.CHNGE_DATE_TIME_D >= '" & StartDate & "' and a.CHNGE_DATE_TIME_D <= '" & EndDate & "') "

I PASS this value to another function which populates a datagrid.
I am using ASP.NEt and VB.net.
I need to see if the above value is empty or null. That is, if there are no ENTRIES in the DB that match the select statement criteria, and thus is null. Currently if its null the program breaks.

Not REALLY enough information to go on, but if you are using an OleDbDataAdapter and have defined a datatable as the source for the GRID, you can use the datatable properties rows.count to check if you returned any records.

Good luck. 8-)

666.

Solve : LPT addressing?

Answer»

i WANT to take logic signals from LPT any ONE can tell me how i can ADDRESSING LPT by visual basic 6.............

667.

Solve : Can Not Copy?

Answer»

Started to LOAD WIIN me and after awhile got this can not copy message SV0325 or Su0325 Any IDEAS how to repair that problem.This article may HELP:

http://support.microsoft.com/kb/q270593/

Good luck.

668.

Solve : I need information about JAVA?

Answer»

Hello everyone and how are all of you?
Freinds actually I just STARTED learning JAVA language. I want to know that can we use Java for advanced network programing (also include hardware programing), virus programing, security programing, interactive programiing? I need this information becasue I am planing to take Java as professional language.
I shall be very thankfull to you.
Do take care of you and others and be happy.
Bye...
DrWahab
Well, yeah, I guess you could. The software on the tills I use at work are coded in Java, and are all linked to a big database in Hemel Hempstead; there's your network PROGRAMMING for starters.

If you are planning a career in this, you may be as well to learn a BIT of C as well - this is the language that Java (and most other programming languages, come to think about it) is based on. It should be pretty easy to pick up if you know your Java. You'll avoid C LIKE the plague generally, but for lower level tinkering or for speed-critical apps it's something pretty handy to know.yeah you could use java for programming.But c++ is better if u ask me.

669.

Solve : Select Row Problem with DataGrid. (C#)?

Answer»

Hi,

Ive created a datagrid completely programatically. however Im having trouble in CREATING a way fro the user to select a row when the page is viewed.

the datagrid itself diplays CONTACT information. the Database itself hold many fields for a particular contact. I only wish to display a couple of these, but then when the user selects a row they wil be displayed all the relavent contact info about that user.

Any Suggestions?

Ive included my code below



using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
getData("", "fullName");
}
public BoundColumn CreateBoundColumn(DataColumn c)
{
BoundColumn column = new BoundColumn();
column.DataField = c.ColumnName;
column.HeaderText = c.ColumnName.Replace("_", " ");
column.DataFormatString = setFormating(c);
return column;
}
private string setFormating(DataColumn bc)
{
string dataType = NULL;
switch (bc.DataType.ToString())
{
case "System.Int32": dataType = "{0:#,###}";
break;
case "System.Decimal": dataType = "{0:c}";
break;
case "System.DateTime": dataType = "{0:dd-mm-yyyy}";
break;
case "System.String": dataType = "";
break;
default: dataType = "";
break;
}
return dataType;
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{

}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
PlaceHolder.Controls.Clear();
getData(TextBox1.Text, DropDownList1.SelectedValue);
}
protected void getData(String search, String parameter)
{
DBConn myConn = new DBConn();
myConn.openConnection();

DataSet ds = new DataSet();
// Instantiate the data GRID control
System.Web.UI.WebControls.DataGrid DataGrid1 = new System.Web.UI.WebControls.DataGrid();

// the GetDataSet method executes the Stored procedure and populates a dataset ds Name, jobTitle as Job Title, id as ID
ds = myConn.ExecuteReturningDataset("SELECT fullName AS Name, jobTitle AS Job_Title, company AS Company, businessPhone AS Business_Phone, mobile AS Mobile, businessAddress AS Business_Address, email AS [E-mail], id FROM contactlist WHERE ("+parameter+" LIKE '%"+search+"%') ORDER BY fullName");

// the dataset is used as the data source for our newly created datatrid DataGrid1
DataGrid1.DataSource = ds;
DataGrid1.AutoGenerateColumns = false;
foreach (DataColumn c in ds.Tables[0].Columns)
{
DataGrid1.Columns.Add(CreateBoundColumn(c));
}
DataGrid1.DataBind();

// DataGrid1 is added to the PlaceHolder
PlaceHolder.Controls.Add(DataGrid1);
myConn.closeconnection();

DataGrid1.Width = 1000;
DataGrid1.GridLines = GridLines.Both;
DataGrid1.CellPadding = 1;
DataGrid1.ForeColor = System.Drawing.Color.Black;
DataGrid1.BackColor = System.Drawing.Color.Beige;
DataGrid1.AlternatingItemStyle.BackColo r = System.Drawing.Color.Gainsboro;
DataGrid1.HeaderStyle.BackColor = System.Drawing.Color.Brown;
}
}hi,

how exactly do you want the user to select the row? Meaning the user clicks on a row and then you go to a new page where the user can edit the row and perform some kind of a database update on the data?

asp.net 2.0 has a built-in control for this, or are you using asp.net 1.1?Use the "Property Builder" link under the datagrids properties.
Go to the "Columns" option. Uder "Text" enter 'Select'. Under "Command Name" enter 'Select'. Under "Button Type" select LinkButton. The select Column must be bound

You can select any row from the datagrid and it will be displayed as the highligted row in the grid.

The HIGHLIGHT row event is called SelectedIndexChanged event. The event is called when the select column is clicked. The select column can be added to the datagrid using the property builder explained above.

// This event is fired when the Select is clicked
private void Select_DataGrid(object sender, System.EventArgs e)
{
// prints the value of the first cell in the DataGrid
Label2.Text += myDataGrid.SelectedItem.Cells[0].Text;
}

670.

Solve : Swapable Drive?

Answer»

Got a laptop with swapable drive,I have to boot from a floopy untill it read put in disk or cdrom unit.The yhing is when i put cdrom unit in,it will sound like its working but noyhing happens,WHATS wrong?What OS and does the laptop have a hard drive?Will i got the puter to read the cd but now it say it has a 64K cluster setup partion.Scandisk does not work on disk with the cluster size. So how do i fix that?Im trying to install Win me it had XP im replacing it with what i have in all my puters.Will i got the puter to read the cd but now it say it has a 64K cluster setup partion.Scandisk does not work on disk with the cluster size.Any ideasI have a Dell 3200 Laptop I had win xp took it out to install win me. Will i got the puter to read the cd but now it say it has a 64K cluster setup partion.Scandisk does not work on disk with the cluster size. So how do i fix that?Any ideas.When it say do i wish to enable LARGE disk support y or n what should i say.Now here is the answer to your ?on how large the partion isPartion
C: 1
Status A
Type Pimary DOS
Mbytes3910
System Fat 16
Usage 100%

Down below tHAT IT READS
TOTAL DISK SPACE IS 3906 Mbytes (1Byte= 1048576 bytes

Hope that will help . this computer has nothing at all in right now.Just what i read to you.It has been CLEANED out and formatted now starting all over.Trying to load win me

671.

Solve : .bat file help needed?

Answer»

I work for a company where users do not read or indeed follow any instructions they are given.
So they don't know how to add printers which are easily available on the network, through the printer wizard or using start - run - \\servername\printershare
I now need to create a bat or exe file that we can put on their desktops, that enables them to INSTALL any printer the dummy WAY
basicly I need a bat or exe file that includes user input. All our printers are on one server , all they would need to do is to enter the printer number they WANT to print to,once they have managed to open the file on the desktop that is ) has anyone any idea how I would go about that?I'm guessing this would be a start:??
Code: [Select]@echo off
set /p pn=Type the printer number you WISH to print to:There should be someone able to finish that off for you!!! You would get more response if you posted this in the "MICROSOFT Dos" section!

672.

Solve : Batch command to refresh desktop?

Answer»

I have created a batch command that RUNS everytime a user signs up in a terminal server, it maps DRIVES and calls an HTML file. The problem I am having is that once the batch file ends, the icons on the desktop are not being refreshed, the user has to manually press F5. Is there a way to refresh the desktop with a command rather than having the user press F5?

Thanks,

JackieFirst, I would SUGGEST that you use scripts instead of batch files for this. Scripts are significantly more powerful than batch files, especially inside the Windows environment. In a SCRIPT you could send the F5 keystroke or actually call the refresh method.

673.

Solve : saving music?

Answer»

hi guys
is there a way to save your songs online so that you DONT lose them all when REFORMATING?More info subject:maybe required.....and thanks for posting!well here is a idea, Get yourself a Gmail account you get somthing like 2.5 gigs of inbox space.

then EMAIL then to your gmail.

I can send you a invite for it if you want!These are not answers to your query but do you have enough hard disk space to PARTITION your drive and move all your music files to a second partition - say partition D: - then you can format C: without OVERWRITING them? You could use Partition Magic or some other (maybe free) partitioning tool.

Other options include slaving a second hard drive and using that to store your precious tracks

As I said, not answers to your query but viable alternatives. If you find site which will freely store my files for a while please let me know.

Good luck

674.

Solve : Send email VIA a Vb Script?

Answer»

Does anyone know of a WAY to send a email with an Attachment to a Email account using VBScript and or batch file??

Code: [Select]
Dim objMail: Set objEmail = CreateObject("CDO.Message")
objEmail.From = "FromEmailAddr"
objEmail.To = "ToEmailAddr.com"
objEmail.Subject = "subject"
objEmail.Textbody = "Body"
objEmail.AddAttachment "FileToAttach"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "YourSMTPServerName"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send

set objEmail = Nothing
WScript.Quit


You fill in the from and to email addresses. Fill in the file name to attach and your SMTP server name (get from your ISP). Do not change sendusing or smtpserverport settings.

Hope this helps.

PS. There is a special place in *censored* for spammers. Quote

PS. There is a special place in *censored* for spammers.


lmao...I sure hope there is...

What USE would sending a batch file be for ANYTHING other than spamming?I use a script to backup a number of machines. I have each script send an email to my address with the job log attached. That way I can check all the machines without actually having to VISIT them.

tricky tricky tricky....

I am amazed...lolThanks sidewinder.

I am not using it to spam people what I want to is AUTOMATE a backup of my pc to my gmail account.
675.

Solve : Reading Hard Disk Info in VB?

Answer»

I want to read the drive specifications like make, model, etc. of the Hard Disk Drive using a Visual Basic program. PLEASE help.That seems like reinventing the wheel. What are you trying to accomplish?Quote

That seems like reinventing the wheel. What are you trying to accomplish?
I want to know the VB code to read the IDE header information from the hard disk drive. Which library to USE? What is the syntax of the call? What is return structure? If standard libraries do not support such a call, I want to know how to include an Assembler routine inside a VB program (I know the ASM code to read the IDE header, but I do not know how to add ASM code in VB).Try using the W32_DiskDrive WMI class. Check your COM objects, you may have to include a reference.

Quote
I know the ASM code to read the IDE header, but I do not know how to add ASM code in VB

Might be easier to assemble your ASM module and make the call from your VB program. The linker should make all this possible. It's easier to combine object modules than source modules.

8-)

Quote
Might be easier to assemble your ASM module and make the call from your VB program. The linker should make all this possible. It's easier to combine object modules than source modules.
I wish I understood what you just said... :-/I've tried getting HDD info (mainly free space) via. VB.

The techniques I found often produce unpredictable results (telling me I have less free space then I actually do!!!).

PS - I don't have a clue either.... ASM called via VB?hello!! even i want to obtain the hard disk serial number, controller REVISION number, hard disk model number, etc with the help of my program. i am writing the code in VC++. i USED the WMI classes in my code but they dont work for window9X. can u please send me a copy of the code which is in Assembly language. i will see if it can help me. my email id is [emailprotected] will u please mail me a copy of the assembly code? thank u..

Quote
Might be easier to assemble your ASM module and make the call from your VB program. The linker should make all this possible. It's easier to combine object modules than source modules.

Rob that ment

write a DLL in ASM , and then add said DLL to your VB Code and call it to get the answer.

I could also have meant Eat a Cheeze Sandwich, but i dont like Cheeze
676.

Solve : Number of transaction in Btrieve?

Answer»

Hi!

PLEASE HELP me how can i set maximun Number of transaction in Btrieve V 5.10 for single system.

i recived error #40.Apparently you change the value in the BSTART.NCF or NOVDB.INI file.

http://www.novell.com/documentation/nw42/index.html?btrv_enu/data/hwgg7zl0.htmlthank you

but i mean Btrieve for DOS users not novell netwear

# of transaction in Btrieve for DOS is limited to 12 file

but i use more than 12 files & i recived stat #40.
Well ACCORDING to my Google search

"You set the maximum number of different files that you can ACCESS during a
logical transaction when you configure the MicroKernel."

677.

Solve : whats the difference between Visual C++ and C++?

Answer»

whats the difference between Visual C++ and C++??


i was at barns and noble yesterday looking for a C++ book and there were two kinds one for visual C++ and the other for just C++... whats the difference between them??

i got a book called ABSOLUTE c++ by Walter Savitch Second edition.

it was $100 BUCKS but oh well as long as i learn im kool with paying that much


TIA

unlovedwarriorDon't forget you can get tutorials for free online

Visual C++ means you can use it to create WINDOWS based applications with scroll bars and BUTTONS and things whereas non-visual C++ (as far as I know) can only be used to make console/DOSish style programs. Visual C++ can do both. But the chances are you will first learn to program console applications, before advancing onto visual ones which require you to know the language well. Therefore either book will be helpful. In this day and age it's unlikey the C++ one doesn't cover the visual aspects, unless it is a very old book, and you need to learn how to make console applications before visual ones, learn to walk before you are wrong.

I'm sure someone will correct me if I'm wrong...but i can still make windows right with non visual?? like ERROR windows? and stuffHow am I supposed to know? You haven't told me what version of C++ you are using.the non visual for now..This is a console application of Chess I am making which has been made rather fuzy when converting to GIF, so you know what it LOOKS like. Unless your version of C++ is 20 years old it is 99% certain you are using Visual C++. When you start a new project you get a selection. Eg I chose to make a console application. Some of the other choices would have been for Visual applications, where you make programs that have buttons scroll bars text boxes and such. It depends which type of protect you want to make. If you're learning, chances are you will spend a lot of time making console applications so you can concentrate on learning the langauge without having to worry about the visual aspects of it yet.k i no the book is an 06..i also found a good tutorial on http://www.cplusplus.com

678.

Solve : Print from DOS using HP PCL?

Answer»

I want to RUN my Clipper programs on a stand alone PC using Win 2000 and be ABLE to print using HP PCL. The printer on this system is a HP 720c. My programs process OKAY but I can't get any output to the printer. The printer is the default printer and is CONNECTED via a parallel port.

I suceesfully run thiese programs under Win 98 and Win XP using a HP laserjet III printer and a HP 855Cse printer. I'm able to change fonts, control my spacing, etc with no problem on these printers and OS.

Any suggestions?Do you have your drivers updated?

[glb]Gizmo73[/glb]Hit the prnt screen button on the keyboard does it work!is the connection bad???

679.

Solve : Dark Basic?

Answer»

Just wondering cos, I have just started using it, and think it is a great program!!!Ive Played with it a bit, its Fun and Easy to use , but not very Power FullWhat programming language do you think is powerful and fun?(ish)??Never heard of it until you brought it up. Seems geared toward gaming apps.

Quote

What programming language do you think is powerful and fun?(ish)??

All the programming languages are fairly powerful, so I guess it depends on what your idea of fun is.

Quote
All the programming languages are fairly powerful
I was going to say, "What, even Logo?" but then I discovered that you can actually do more with it than draw houses...
www.blitzbasic.comMy idwea of fun would be a language that is easy to learn and uncomplicated!! And it has a large variety of different things you can do with it!www.blitzbasic.com !!Yes, but did you see this:

Important! MaxGUI is a plugin module for BlitzMax and as such you MUST own BlitzMax.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!You never Stated that you wanted one that was Free.

Any way, if you want to do ANT Real Programing Use C++, and if you need Graphics , Download The directX SDK , or The OpenGl SDK

Its nither Simple or Easy to Learn, But that is my Idea Of Fun The only thing I've ever written in DarkBasic was Reaction Timer For Windows (http://www.reaction-timer.co.nr/).

Not the best display of the power of DB, but it is a very easy to use language.

As for C++, I still haven't got round to giving it a bash.... Any good tutorials???http://www.cprogramming.com/tutorial.html

This SITES got a copule

But once you have the Basics , the rest is not to your own imagination, patients, and enduranceBlitz Basic is EASIER to learn than c++ and is designed to make 2d or 3d graphical games. It might not be as powerful as C++ but commercial games can - and have - been created in this language. If you're not into making games, you can still use it to make some basic "console" PROGRAMS to improve your general programming skills... depends what you want to do.

You can get the demo free for 30 days or 30 uses I can't remember. The demo didn't use to have a time limit (although you cannot compile into .exe files of course with the demo) which is the one I use never heard of it im learning c++
680.

Solve : Lobotomized ROM?

Answer»

I TRIED to recover Windows 98 on an old Toshiba 7202 - the error message said corrupt or missing himem.sys and a couple other toshiba specific files. I bought a recovery disc on-line and followed the instruction --- "format /s c:\" . know it only loads DOS and nothing ELSE.
Dir c:\
command.com 93,000 ( thats all)
Dir d:\
file not found.
Could i have lobotomized the ROM? What can i try next?You've lobotomized your hdd by using Format which wipes everything from the hdd partition. You should have used the command SYS C: to just transfer the DOS without formatting. Then you have loaded the DOS which will have installed three (maybe 4) files one of which is Command.com. The OTHERS are hidden files ( Attrib +H). If you wish to view those files use Dir /AH (see the Dir command for other parameters).

If you really have a second partition D: you MIGHT be able to recover files from that but looking at your Dir result I doubt it exists.

Good lucklobotomized the ROM whats that MEAN??

681.

Solve : Batch job sends email if file contains data???

Answer»

The following BATCH FILE works (with the real email addresses). I need to have it instead of check if there is a file named open_dt_events.txt, check to see if there is data in the file...the file is always GENERATED, I only need to send the email when there is data in the file.
I was thinking of checking if filesize was greater than 0 or something like that but I've had no luck so far and I've WASTED a whole morning on this.
Any help would be appreciated by this novice...
Thanks...
---------------------------------
d:
cd \open_dt_events

REM **** ROTATE THE LOG ****
if EXIST d:\open_dt_events\open_dt_events.txt goto nextstep

:nextstep
cd \open_dt_events
blat d:\open_dt_events\open_dt_events.txt -to [emailprotected] -subject "Open

Downtime Events Exist in HospitalNet Database" -f [emailprotected]

REM **** CLEANUP ****
del d:\open_dt_events\open_dt_events.txt

:end
--------------------------------------This is OS dependent:

Code: [Select]
for /f %%a in ('dir /b d:\open_dt_events\open_dt_events.txt') do (if not %%~za==0 goto nextstep)


If this doesn't work on your machine, you will have to work from a dir listing.

Hope this helps.

682.

Solve : WMPLAYER?

Answer»

Is it possible to use MPLAYER inside a QBASIC application?
I tried with SHELL but it closes the application and retuns to WINDOW when opening WMPLAYER.I may be wrong but QBASIC is strictly DOS and WMP is Windows. There was (is?) a program CALLED DOSAMP that may be of some help.

A search on Google should GET you started.

Good luck.

683.

Solve : mIRC remote connection script?

Answer»

I'm trying to setup different mIRC remote connection sripts, so I can make one FILE for each network that connects to different channels.

I found some info on the net where I have it setup to:


on *:START: {
server irc.gamesurge.net -i nick nick1 [emailprotected] me -j #test1,#TEST2
}


That will connect me to the server and join the test channels, but that network I can also /msg nickserve and identify myself. The problem is, I don't know how to include that /msg into the remote script so I can be identified before joining a channel.

My next solution was to create another section that says:

on 1:connect:{
/msg nickserv identify me
/join #test1
/join #test2
}

but when I load 2 remote connections into 1 mIRC window, it will perform those joins in both networks...


Any Ideas on how to load multiple remote connection scripts to
1. /msg nickserve different passwords pending server you connect to
2. make it so those join commands will not join #test1 and #Test2 on both networks? (I WANT to join SPECIFIC channels based upon which network I connect to...)


thanks.This site may help:

http://dooyoo-uk.tripod.com/mirc/downloads/download.htm

Good luck. For those of you who may be interested in a solution I used...

http://trout.snt.utwente.nl/ubbthreads/showflat.php?Cat=0&Number=131641&page=0&vc=1&PHPSESSID=#Post131641For those of you who may be interested in a solution I used...

http://trout.snt.utwente.nl/ubbthreads/showflat.php?Cat=0&Number=131641&page=0&vc=1&PHPSESSID=#Post131641

684.

Solve : Access to the path containing 'hash.web' denied?

Answer»

HI

Here is the problem:ACCESS to the path containing 'hash.web' is getting denied. I get this when TRYING to run my Asp.net and C#.det application. The following is the solution to it. But I dont know how to implement the solution. I dont know where to find the exclusion catalog.

Solutions:
• Keep Indexing Service Manual or Stop It
• In Indexing Service Preferences, Make C:/Winnt/Microsoft.NET to be excluded or placed in the exclusion catalog so that Indexing Service will not access this location

Also are there any other solution suggestions??

PLESASE help

Thanks
Baffled D5

Hi

Problem solved. Just thought that i'd post the solution.

i GRANTED write PERMISSIONS to the asp worker account in this folder:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files
and now it works.

685.

Solve : where to do programs?

Answer»

i know java and im learning c++.but i dont know where to write the script so i could do programs.help me
thxI saw your post in the DOS forum, but since you bring up Java and C++, I'm gonna guess you have a windows machine.

With any language all you really need is an editor (notepad or wordpad will do, some language processors come with an IDE), write your program, save the file and then point the compiler or intepreter to your file.

Perhaps if you could be more specific as to what you need to accomplish, we could be more helpful.

Let us know. ok IVE writen a simple program in WORD pad.But when i open the file it shows me the code not the CREATED program.
What language were you writing it in?
What did you name the file?
Is it supposed to be compiled or INTERPRETED? C++ is compiled, Visual Basic is compiled, VB Script is interpreted.I was writting in c++.The file was named hello world.rtf.Why didnt it work?



Because it can't be named with the rtf extension (That is the extension for wordpad (Rich Text Format) and you must have a C++ compiler to compile it before you can see it run. It will then be an exe or dll etc. as you specify.

Where can I get a compiler?Here's one.........

http://www.cdw.com/shop/products/default.aspx?EDC=771501

Uh, if you don't have $417 to spare, try this. I mean, I use it..

http://www.borland.com/products/downloads/download_cbuilderx.html#

686.

Solve : Logo Programming?

Answer»

[size=48]LOGO PROGRAMMING!![/size]

Do you have to download some sort of compiler to COMPILE logo scripts??(I'm sure you do).
If so, could someone PLS provide a link to download it??Go to the external LINKS section of the &GT;Wikipedia<. Plenty of leads there.

687.

Solve : Binprn.32.dll will not register?

Answer»

Here is the situation I have a program for managing snooker hall lights for billing and accounting, it was running on win98 2nd edition, the COMPUTER crashed after many years. I managed to make an image of the hard drive, and retrieved the folder with the program in it, reinstalled win98 2nd edition, on another comp, and dropped the folder into C: Drive, I got the prog running, installing all the MISSING files/dll it required. The way the program works is when you flick on a table light on, the program starts billing that table, at the END of each shift you used to be able to PRINT all the table totals, this is were my problem is, I cant register binprn32.dll, in the error log it reports it can’t find this dll. I have tried registering it manually using “regsvr32” and with a dll register tool but it still failed, the program is doing everything else but printing, when you attempt to print the printer flashes, so I think the info is getting there.

Any help would be gratefully appreciated.Either you have to be in the directory where the DLL resides, or you can supply a path to the DLL on the command line when you register it..

Did you search for BINPRN32.DLL? Did you find it? It may not have made the migration on to the new machine.

the dll is in the system folder, i copied it over from the COPY i made of the original hard drive, i can find the path to the dll, but i get "failed to register"

ThanksYou can check out this site for any clues:

http://support.microsoft.com/kb/q249873/#XSLTH3128121123120121120120

One possibility is that the DLL is corrupt, but Microsoft can explain it better.

Good luck.

688.

Solve : Dir function in a bath file?!?

Answer»

Hi,

i need to unregister a lot of dlls that are inside a specific folder.
I know that regsvr32 can do this... but just one by one.
So i'm wondering if it is possible to create a batch file that can give me all the file NAMES so i can unregister with regsvr32.

Any ideia?!
Tkx to all help

This little snippet illustrates one way to do this. Fix up the file names as necessary.

Code: [Select]
dir /b path\*.DLL > dir.txt
for /f "delims= " %%a in (path\dir.txt) do (regsvr32 -U %%a)
del dir.txt


Hope this helps. Helped a lot Thank You!

Can you explain me what is that STUFF of "delims= "?
No problem. delims= is used to list the character delimiters of the incoming data. In this case a space. Generally it's used in conjunction with the tokens= parameter which allocates the number of variables available to the FOR.

Clear as mud, right?

For the Microsoft explanation, type for /? at any command prompt.By the way...

It's possible to run this batch file remotely?
I can ACCESS the file and run it on other machine... but i want to run on that particular machine accessing by other one.

Confused?

I live my life in state of confusion. Of course I'm confused

You will have to write a Windows Script using the Controller object.

http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_immo.mspx

Good luck.

689.

Solve : disabling "ACTIVE" for streaming video???.....?

Answer»

Hello....
I have a page that contains 2 little flash buttons and embedded on the page is a STREAMING MP4 video file. I disabled the ANNOYING 'click to ACTIVATE' with javascript for the flash.. but how do you disable it for the streaming video??? :-?
Its pretty annoying when VIEWED in IE.

Thanks.. any help is appreciated!!!

-AllisonAs I UNDERSTAND it, that feature is enabled by a recent WINDOWS security update, which you cannot use javascript to disable.

690.

Solve : SQL problems?

Answer»

ok, ive got My SQL SERVER 2005, ive installed it to my programs list

what i want to do is link the server to this MMORPG game im creating but when i try to import the database server it says server cannot be found

im trying to do it in front page

when i clicked on import, i went to options then clicked browse(or something similar) i went to 'New Network Place' and put the localion of the s=database server which for me WOULD be

http://My SQL Server 2005/logon

then it said connectig to server, then after a while it said server could not be found

anyone could give me some help i would appreciate it (if you can UNDERSTAND what im trying to say)

THANKSYOU're trying to use a web protocol to ACCESS MySQL. But it's not a web server; it's a database server. If you need a web interface, you'll first need a PHP-enabled web server (IIS is okay, if you have it, but I'd recommend Apache, which is free), then you could install phpMyAdmin. PHP is free and readily available.

691.

Solve : web result as input to C?

Answer»

Right now our thinking is to have a webpage for client to input data, and send the data back to the server, which is using linux.

The PROCESSING data part is writing in C and our NEXT step is to try to connect these two components.

But I am not sure how that could be DONE, any suggestions?

Thank you so much.The most OBVIOUS solution is to use a server-side web scripting language, such as PHP. Does this involve database interaction?

Learning PHP would be a cinch for anyone with a C background.

692.

Solve : adding a beep to a shell script?

Answer»

???I cant find text on creating a beep command.
Im tring to do a program for a class at school. it ask to add a beep to one of the processes but I dont know how to create a beepAlt+007 seems to be the answer. Go here http://www.jpsdomain.org/windows/winshell.html and scroll down to "Simple Utilities"

Good luck

thanks ill try that right now so i can download my programNot good, not good; that makes every KEY you hit beep,
I need it to only beep once when it's time for inputnow i need to know how to make it stop!Please post your scriptThe beep quit when I shut down. I uploaded my script without the beep, the second one on there works, the Ctel ^ G. just havent gotten far enough to know how to add Ctrl and Alt to scrips yet. But im stll learning. I did get credit for trying to find a working solution. Thanks for the help.What the instruction means is that at the point where you want a beep you hold down the ALT key then type 007 on the numeric pad to the right of your keyboard then release the Alt key. Before doing this you must hold down CTRL and hit the "p" key to indicate that the following CHARACTER is a "special", release the Ctrl key after typing p. This will put some sort of special character in your script depending on what OS you are using. I tried it in a straight .bat file created using Edit and it works in Win.98se and XP Home.

The sequence could be like this:

CLS
(hold down Ctrl and hit p then release Ctrl)
(hold down ALT and type 007 on the numeric pad then release Alt)
(a special character will be seen here)
DIR C:

On execution a beep will be produced and a directory listing will follow.

Hope this makes sense to you.This help me UNDERSTAND how to put a special key into a script. I am Taking UNIX/Linux networking this summer.

All last year we were in Windows 2000 sever, and in the fall I will be taking win xp 2003.

So any thing I learn will help me.

I started with dos v.1.22 back in the early eighties, everything was command line then so I am enjoying Linux.
Thanks again.

693.

Solve : i need a roulette script in PHP?

Answer»

i need ONE with the ODDS of winning.

anyone KNOW where to get one?Are you able to program in PHP yourself? If you make a start on the script, I can offer suggestions. Do you simply want a function that returns the number and the colour? Or one that handles lpacing bets, ETC?Quote

Are you able to program in PHP yourself? If you make a start on the script, I can offer suggestions. Do you simply want a function that returns the number and the colour? Or one that handles lpacing bets, etc?

one that returns the number and colour like

red 36 or black35
Okay, well that's a pretty straightforward script. Can you answer my first question?Quote
Okay, well that's a pretty straightforward script. Can you answer my first question?

a little bitTo be honest, this is such a simple problem that I'll just write the whole script. Here is a function, roulette() that will return an array(number, colour) that you can then use in your script. I include an example of the use of the function.

Code: [Select]<?php

functionroulette($twozeroes=false)
{
//NBTheparameter"twozeroes"isoptional.Itdefaultsto
//false,meaningweareusingasinglezero(European)
//roulettewheel.Callingthefunction,roulette();isthe
//sameascalling,roulette(false);.Foratwozerogame,
//CALL,roulette(true);

//ForPHPversionspriorto4.2.0,uncommentthenextline:
//mt_srand(crc32(microtime()));

$number=rand(($twozeroes?-1:0),36);
if($number>0)
{
$colour=(($number%2)==1?'red':'black');
}else{
$colour='green';
if($number==-1)
{
$number='00';
}
}
returnarray('number'=>$number,
'colour'=>$colour);
}//Endoffunctionroulette()


//Exampleofhowyoumightuseit:
$results=roulette();
?>
<p>
You spun the wheel, and here's what you get:
<font style='font-size: 25px; font-weight: bold; color:<?phpecho$results['colour'];?>;'>
<?phpecho$results['number'];?>
</font>
</p>
Any questions?

For the time being, you can see this script working, >here<. It will be replaced at some point with whatever other problem I'm working on at the time. Thanks mate
694.

Solve : restore settings?

Answer»

ok is there a way to make a program that will restore your internet settings back to default? like could you do it in C++ or vbscript or something??

TIA

unlovedwarriordon't know whether it will work, think you could do is to EXPORT the internet settings from the registry and then import back everytime you START the COMP (via batch ?) , or double click on the .reg file
I think the registry key for internet settings is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\
anyway, have to test it out first ..ok
thanks ill try that when i have time

695.

Solve : Errors That Make No Sense?

Answer»

Class.hpp:

Code: [SELECT]class Car
{
public:
Car(long);
~Car() {}
start_park();
DRIVE();
reverse();
private:
unsigned int mileMarker;
bool on_off;
}

Errors in Compile:

Code: [Select]"Class.hpp": E2176 Too many types in declaration at line 1
"Class.hpp": E2238 Multiple declaration for 'Car' at line 2
"Class.hpp": E2344 Earlier declaration of 'Car' at line 1
I KNOW zilch about C++ programming but I'll give this a try just for fun.

I think the Car(long) statement is in conflict with the class declaration.

Sorry I couldn't be more help. :-/

Well, that's a constructor, but I'll remove the long and try it.New errors:

Code: [Select]
bcc32 -D_DEBUG -g100 -j25 -Od -r- -k -y -v -vi- -TWC -c -IC:\CBuilderX\include -o"C:\Documents and Settings\Tom\cbproject\Car Simulator\windows\Debug_Build\Simulator.obj" Simulator.cpp
Borland C++ 5.6.4 for Win32 Copyright (c) 1993, 2002 Borland
Simulator.cpp:
"Functions.hpp": E2379 Statement missing ; in function Car::startPark() at line 14
"Functions.hpp": E2379 Statement missing ; in function Car::startPark() at line 19
"Functions.hpp": E2379 Statement missing ; in function Car::startPark() at line 20
"Functions.hpp": E2379 Statement missing ; in function Car::drive() at line 29
"Functions.hpp": E2379 Statement missing ; in function Car::drive() at line 30
"Functions.hpp": E2379 Statement missing ; in function Car::drive() at line 34
"Functions.hpp": E2379 Statement missing ; in function Car::drive() at line 36
"Functions.hpp": E2379 Statement missing ; in function Car::reverse() at line 44
"Functions.hpp": E2379 Statement missing ; in function Car::reverse() at line 45
"Functions.hpp": E2379 Statement missing ; in function Car::reverse() at line 49
"Functions.hpp": E2379 Statement missing ; in function Car::reverse() at line 51
"Functions.hpp": E2379 Statement missing ; in function Car::sim() at line 59
"Functions.hpp": E2379 Statement missing ; in function Car::sim() at line 60
"Functions.hpp": E2379 Statement missing ; in function Car::sim() at line 64
"Functions.hpp": W8070 Function should return a value in function Car::sim() at line 86
"Simulator.cpp": E2379 Statement missing ; in function main() at line 8
"Simulator.cpp": E2379 Statement missing ; in function main() at line 9
*** 16 errors in Compile ***
BCC32 exited with error code: 1
Build cancelled due to errors



Here's the whole program:

Code: [Select]




Class.hpp:




class Car
{
public:
Car(unsigned long);
~Car() {}
drive();
reverse();
sim();
startPark();
private:
unsigned int mileMarker;
bool on_off;
};




Functions.hpp:




#include <iostream>
#include <C:/Documents and Settings/Tom/cbproject/Car Simulator/Class.hpp>

Car::Car(unsigned long startingPoint)
{
mileMarker = startingPoint;
};

Car::startPark()
{
if (on_off)
{
on_off = 0;
std::cout "The car is now off.\n";
}
else
{
on_off = 1;
std::cout "VROOM!!! VROOM!!!" std::endl;
std::cout "The car is now on." std:endl;
}
return 0;
};

Car::drive()
{
unsigned int distance;

std::cout "How far will you drive?\t";
std::cin distance std::endl;

for (unsigned int counter = 0; counter < distance; counter++)
{
std::cout "Now passing mile marker " mileMarker++ "." std::endl;
}
std::cout "Now at mile marker " mileMarker "." std::endl;
return 0;
};

Car::reverse()
{
unsigned int distance;

std::cout "How far back will you go?\t";
std::cin distance std::endl;

for (unsigned int counter = 0; counter < distance; counter++)
{
std::cout "Now passing mile marker " milemarker-- "." std endl;
}
std::cout "Now at mile marker " mileMarker "." std::endl;
return 0;
};

Car::sim()
{
Car theCar(NULL);

std::cout "Start car? 0-Yes 1-No\t";
std::cin on_off std::endl;

theCar.startPark()

if (on_off)
{
short int whatToDo;

std::cout "What do you want to do?\n";
std::cout "0-Park 1-Drive 2-Reverse\n";
std::cin whatToDo std::endl;

switch (whatToDo)
{
case 0: theCar.startPark(on_off);
break;
case 1: theCar.drive();
break;
case 2: theCar.reverse();
break;
default: std::cout "Please choose one of the VALID choices...";
break;
}
break;
}
return 0;
};




Simulator.cpp:




#include <iostream>
#include <C:/Documents and Settings/Tom/cbproject/Car Simulator/Functions.hpp>

int main()
{
unsigned long startingMileMarker;

std::cout "What mile marker do you want to start at?\t" std::endl;
std::cin startingMileMarker std::endl;

Car theCar(startingMileMarker);

theCar.sim();
};








(P.S.) I know it's a bad programming PRACTICE to use directories with " " in them, but I'll be changing that soon. Anyways, that isn't causing my problem...Nevermind. I figured it out.

696.

Solve : Microsoft Access: Code for list boxes?

Answer»

I'm using a list BOX to open queries. It is working just fine but now I need to add reports. How do I adapt the following code to accommodate queries and reports? Thanks, in ADVANCE, for any help.

Dim DocName As String

DocName = Me!ReportsList.Column (0)
'Used to TELL which report it is.
QueryName = ReportsList.Column (2)
DoCmd.OpenQuery DocName

Exit Sub
End SubI take it the Me!ReportsList is the list box object?

and this list box has a row SOURCE of?

Are you planning on putting queries and reports in the same list box? If so you are going to have to know the object type and do an "if" or "case" statement based on the type.

DoCmd.OpenQuery DocName
or
DoCmd.OpenReport DocName

697.

Solve : auto start?

Answer»

how would i get a batch file to start when a user LOGS in??Try opening the startup folder (Start==>Startup) and create a shortcut to your batch file.

Keep in mind that batch files require the command processor to run and can create unanticipated problems during startup.

8-)like what??Hard to say. With no knowledge on your batch file, would not any problem would be unanticipated?

An real world example might be your batch file runs a report against a file on a network share before the share has been mapped.

Just make sure that the required resources for your batch file will be available during the startup.

8-)the batch file i WANT to autostart is a timed shutdown for the computer...Timed how?

Elapsed time from the startup? EX. Computer runs 7 hours then shuts down.

Scheduled time? ex. Computer shuts down at 6PM.

For the first one I would write a windows script as DATES and times are better handled with script than with batch code.

For the second one, I would use the task scheduler and simply schedule the shutdown.

8-)

windows script??

umm.. LET me turn to wise old king google 8-)

698.

Solve : Changing a file ext to work in program . . .?

Answer»

I PURCHASED a paint by number program and I need to add my own color palette. I created the color palette in a different program and now when I save the palette and change the file extension to the one the paint by number uses, I get the following message: "An attempt was made to access an unnamed file past its end." Can someone help me get this color palette into this program? PLEASE!!! What paint by number program and what program created the color palette? Try PUTTING your message into a search ENGINE. I got 129,000 possibilities with Google.

Can the paint program create it's own palette? In general, the file extension indicates the file format, but changing the extension does not change the physical format of the file. (ie: you cannot change a text file into a Word doc simply by changing the extension)

Good luck.

699.

Solve : computer boot up into system configuration only?

Answer»

I would like to know if somebody can HELP me with windows 98 pc that keep on BOOTING into system config.

shows 162 configuration error.

does not want to start in safe mode at all.
What can i do.

Thanks [emailprotected]It could be the CMOS battery needs replacing. It sounds like the system cannot retain the settings.

Hope this HELPS.
Quote

I would like to know if somebody can help me with windows 98 pc that keep on booting into system config.

shows 162 configuration error.

does not want to start in safe mode at all.
What can i do.

Thanks [emailprotected]

700.

Solve : Visual Basic beginner.?

Answer»

Win XP Home - VB 4.

Just STARTING to learn VB and have a problem with foreground color in a text box. When viewing the form the text is WHITE (the background color SETS ok) but regardless of which forecolor I select in Properties the color does not change. When the prog is Run the forecolor changes to something like a buff color. The color hex number in the forecolor selection box remains as it was set by me.

What am I doing wrong please :-?How many colors is windows set to display? Right click the desktop, then click the settings tab and check the values.

VB will attempt to do what is programmed. I suspect the problem is further up the food chain when it comes time to display the control.

Let us KNOW. 8-)

Thanks Sidewinder.

R.clicked desktop then clicked Properties>Settings. This shows the Screen Resolution and Color Quality but no number of colors. R.clicked the VB shortcut and set the prog to run in Win 98 compatibility mode with 256 colors without that making any difference.

Any other suggestions please :-?The 256 colors was going to be my next suggestion.

Is this the only control on the form with this problem? If so, try DELETING the control and recreating it; you may have inadvertantly clicked a property that contradicts a foreground color setting. (enabled for instance).

I'm pretty much out of ideas. Never seen this problem before and Google is fairly quiet on this subject.

Good luck. 8-)
Thanks again. I went right back to the beginning and 'rebuilt' the form and still have the same problem. I'm using the Sams Publishing 'Teach Yourself VB.4 in 21 Days', this is day 8 and I haven't got past Day 2 in the book [smiley=grin.gif] But then the book doesn't say which 21 days LOL

I'll Google for a specialised VB forum and post there.

Thanks again.

H..Problem caused by own stupidity. Believed was changing the TextBox but the Form Properties were in view.

Also the Properties instructions for the TextBox make no mention of making Enabled = True. They do mention making MultiLine=True but making this False changes nothing. Perhaps a bit of confusion there as well as here.

Thanks

H...