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.

1901.

Solve : Java Tutorial...?

Answer»

Hi, I have a exam in my PROGRAMMING class and I would like a JAVA TUTORIAL but I dont know which one because there is quite alot on Google. So if someone has a link to a very WELL organized Java Tutorial then please let me know

- Thanks in advance

1902.

Solve : VS2005 Form Issue?

Answer»

Does anyone know a way to run the WHOLE from as a Local Admin?

1.) I am making a app with a bunch of tool son it for checking the common issues we run into here at work. But we hate having to log out Users and log in as the local admin to check any of this CRAP. So I would like to make it so that when I launch the app i made, it uses the Local Admin or System account to do so resulting in us being able to see things RUNNING on a machine from an admin perspective with a Basic user logged in.

2.) How to make a duplicate of the event viewer on my form.

3.) how to make a Semi Duplicate of the Processor utilization from XPI'm fairly certain you can use a imports System.Diagnostics statement which will expose the GetProcesses and the GetEventLogs methods. Normally this a run from the local machine but you should be able to pass the machine name to the constructor for remote operation.

For running as a local admin, can you not use the runas command?

Good LUCK.

This could be scripted as a HTA using the Windows Management Interface or even as a POWERSHELL script. Sounds like an interesting project.

1903.

Solve : most recent java?

Answer»

Havent had to re-install the java standard development kit in a year or so. went to download, what I thought was the most recent version (5.0) only to discover all this j6u stuff all over sun's website. is this the NEWEST java developers release? CURRENTLY, the newest version is 6.0 Update 1. You'll want to upgrade to that and then remove any older VERSIONS.

1904.

Solve : Visual Studio 2005?

Answer»

I have a database (ms-access), i can delete, update all those things but i have implemented a login page that USERS must enter to access to specific rihgts. Oh its a windows application.

The user filed is users in the DB.

/*

// Db Connection
Try
OpenDB()
comm.Connection = conn
conn.Close()
Catch ee As Exception
MsgBox(ee.Message)
End Try

Public Class Login

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Surname As String
Dim Password As String

Surname = txtUsername.Text
Password = txtPassword.PasswordChar
lblError.Text = "Sorry Wrong password/username"
End Sub
End Class
*/

I'm not too good with VB/VS i only started with it this year Feb.I'm guessing that you used the Data Source Configuration Wizard for the database connection. The ALSO seems to be a missing SQL statement to execute against the database.

Try defining a new Dataset object, a OleDb.OleDbDataAdapter object, and a SQL SELECT string. Execute the SQL statement on the dataadapter and use the dataadapter's FILL method to POPULATE the dataset. By using the dataset tables rows.count method you can determine if you returned any records. If so, you have a hit and the username and password are correct, otherwise there is an error.

Code: [Select]Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String = "Select * From dbTablename where inUsername = dbUsername And inPswd = dbPswd"

da = New OleDb.OleDbDataAdapter(sql, dbConnect)
da.Fill(ds, "dbTablename")
If ds.Tables("dbTablename").Rows.Count = 1 Then
Else
lblError.Text = "Sorry Wrong password/username"
End If

You would have to fill in real world values for the names of dbTablename which is the table where the users/passwords are stored and dbConnect which is the data item that holds the connection string. You also NEED to fixup the SQL statement.

Good luck.
Thanks Man i think i'll get it right now i pn;y needed a push but will notify if it works or not..

Thanks god blessThe code helped a bit "in java its easy"..i have a Access DB with a table Users where a username and a password is stored. i want when i login with the deatails it should verify it with the one stored in the table and it match them, then direct me to Form1 page when it correct, if its wrong username or password the msg desplays or either msgbox and still at the loin page.

The connection i have defined my self.
here is the connection class (Module)

Module Connection
Public conn As New OleDb.OleDbConnection
Public comm As New OleDb.OleDbCommand
Public reader As OleDb.OleDbDataReader
Public str_conn As String

Public Sub OpenDB()
str_conn = "Provider=Microsoft.JET.OLEDB.4.0;Data Source=C:\Documents and Settings\fortunatom\My Documents\Visual Studio Projects\ConnectionTesting\AddressBook.mdb;"
If conn.State = ConnectionState.Closed Then
conn.ConnectionString = str_conn
conn.Open()
End If
End Sub
End Module

This is the delete class and the rest is working perfectly and this delete class is also working

Dim namee As String
Private Sub frmDelete_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OpenDB()
comm.Connection = conn
comm.CommandText = "select Name from address"
reader = comm.ExecuteReader

While reader.Read
cboDelete.Items.Add(reader(0))
End While
conn.Close()
End Sub

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
namee = cboDelete.Text
Try
OpenDB()
comm.Connection = conn
comm.CommandText = "delete from address where Name = '" & namee & "'"
comm.ExecuteNonQuery()
conn.Close()
MsgBox("details was Deleted!")
Catch ee As Exception
MsgBox(ee.Message)
End Try
Me.Close()
End Sub
End Class

Quote from: Sidewinder on June 25, 2007, 12:42:42 PM

I'm guessing that you used the Data Source Configuration Wizard for the database connection. The also seems to be a missing SQL statement to execute against the database.

Try defining a new Dataset object, a OleDb.OleDbDataAdapter object, and a SQL SELECT string. Execute the SQL statement on the dataadapter and use the dataadapter's fill method to populate the dataset. By using the dataset tables rows.count method you can determine if you returned any records. If so, you have a hit and the username and password are correct, otherwise there is an error.

Code: [Select]Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String = "Select * From dbTablename where inUsername = dbUsername And inPswd = dbPswd"

da = New OleDb.OleDbDataAdapter(sql, dbConnect)
da.Fill(ds, "dbTablename")
If ds.Tables("dbTablename").Rows.Count = 1 Then
Else
lblError.Text = "Sorry Wrong password/username"
End If

You would have to fill in real world values for the names of dbTablename which is the table where the users/passwords are stored and dbConnect which is the data item that holds the connection string. You also need to fixup the SQL statement.

Good luck.

1905.

Solve : help me with this!!!?

Answer»

I know a little bit of c and c++,I dont know advanced PROGRAMMING(i am not familiar with OOPS CONCEPT).i can only write code for small programs like palindrome,fibbonacci etc,i want to learn more advanced programming.I need u to SUGGEST how i can improve my programming skills..
Is programming for natural talents or can it be learnt by practise...
and Plz tell me what is a database and whats the use of it.Read books. You need ability, but you also need practice. Learning by asking on web forum not good method. Description of database is found in basic Information Technology textbook.
OK... Database:
Quote from: Google

• A database is a collection of information stored in a computer in a systematic way, such that a computer program can consult it to answer questions. The software used to manage and query a database is known as a database management system (DBMS). The properties of database systems are studied in information science.

• Data stored on computer files or on CD-ROM. A database may contain bibliographic, textual or numeric data. The data are usually STRUCTURED so that they may be searched in a number of ways. A variety of DATABASES is accessible via this website.

• A database is an organised collection of information records that can be accessed electronically. In the Library this includes indexing and abstracting databases, citation databases or databases of fulltext journal articles.
From Google Definitions


C++ TUTORIALS
C++ Language Tutorial
Online C++ Tutorial
Googled, look for yourself
1906.

Solve : php - execute external programs in the background?

Answer»

I would like to execute an external CONSOLE APPLICATION with parameters in the BACKGROUND in a php (i.e. the php will not wait for the completion of the PROGRAM and it will CONTINUE to run)
I am using Windows vista with apache 2 and php 4.4.7

i search on the net and can only find info about linux or without parameters..
is it possible for my situation?

1907.

Solve : need help in DOS program?

Answer»

I want to find the path of a file

for eg: if the file is aaa.txt
I can able to find the path as c:\test\aaa.txt
But the way I want is c:\test alone...
can anyone help me in this regardCode: [Select]@echo off
for /f %%I in ('dir "C:\aaa.txt" /s /b) do @echo %%~dpI
echo.
pauseUse the above code in a batch file.

I THINK that should work (BTW, this thread should probably be under Microsoft DOS, but...).

This batch returns the file path and drive letter only, and then pauses.


I know that it needs some work (i.e. to find the file without having to INPUT the name), but it'll get done soon.


EDIT: FIXED!thank u very much dude...

if suppose
iam having the filename in one variable like
set filename = aaa.txt and the path in one variable like
filepath = c:\test\aaa.txt

if it is in this scenario how should i get thatOh. I get you.

Code: [Select]@echo off
for %%I in (C:\test\aaa.txt) do (
set FPATH=%%~dpI
set FNAME=%%~nxI
goto echo
)

:echo
echo Filepath is %FPATH%
echo Filename is %FNAME%
echo.
echo.
pause
From that, you can use %FPATH% and %FNAME% wherever you want in your code.Thanks a lot dude....thank u very much No PROBLEM! Glad to see that your question is ANSWERED.

1908.

Solve : A function in "C"?

Answer»

I have a problem with writing a function in "C". I don't know how to do this - to make an array with some elements an empty array. I mean to clean the array so that it doesn't have any elements and then fill it again with other elements.do you know how to code a loop? A 'for' or 'while' loop would work nicely.
I am going to run a code example, but it is fairly simple, because it assumes that the array elements will only be integers. If you are filling the array with more complicated elements, like objects, Than you must know that the array type must match the type of every single element to be indexed in the array. having said that:


Let's pseudo-code it:

//declare array and size

array myarray[10]; <- this array has 10 elements.

//run for loop to index every element, and set its value to NULL
//NULL is the default "no value" indicator in C.

for( index=0;index<= number of elements in array; index++ )

myArray[index]= NULL;


Now remember this is pseudo-coded, so the syntax is not correct. I havent
written C in so long, im sure to lead you wrong if I try to use the language syntax. Hope that helps!

I tried this way but I think it doesn't work... I wonder, how do you know it is not working? Your reply sounds a LITTLE unsure. If it is throwing an exception, I would advise to be absolutely sure you index and count from zero, not 1, as it the start index for an array. let me know how you know it's not working for you
yanng1, there is no array variable-type. This would be what you're looking for:

int myArray[10];* I see, Dilbert. when i said type, I don't mean to say there is a type called array.
I wrote "Array myArray" b/c I am a java head.

Now, what I meant for our friend Rock, is that every array should have a single type. let it be function type, primitive data type (like int) or String... w/e.
that the array is most easily manipulated for future use if you can keep
it down to storing only one KIND of information.

int myArray[10] <--- for instance would be of the type "int", Rock.

True, but the OP may have misunderstood. It sounds like you are talking about a dynamic or variable-sized array. Please give more information about the exact nature of this array, and any code you have written. This will put a 0 in all elements of an array of length N.

for (int i = 0; i < N; i++) array = 0;Hi Bra
I c u had trouble with fuctions in C, i'm kind not too good but can help out.

int array[5], i=0;

for ( i=0;array<i;i++){
cin>>array;

This INSERT a specific value into an array at a specific POSITION..

1909.

Solve : VBA: Internet_Assistant password?

Answer»

I am running Excel 2003 on XP.

When I OPEN VBA WITHIN Excel, there is a "VBA Project" window on the left side of the screen. Within this window is "Internet_Assistant (HTML.XLA)".

No problem. But.... when I click on "Internet_Assistant" to open it, or when I try to view its properties, I am prompted to enter a password. Why?? This is true even if I open up a new, blank Excel WORKBOOK... I then go into VBA to use Internet_Assistant, and I always am prompted for a password. I have no IDEA why there is a password or what the actual password is!

1910.

Solve : my first language?

Answer»

i started off with C++ that was a bad idea... at LEAST i know it now tho.. and JAVA and VB are completely different, but it helped me with them too
c++ seemed impossible for the first 2 WEEKS though...

1911.

Solve : Use the registry in visual basic 3.0?

Answer»

How can i edit, view, and change values of the registry using vb 3.0. Do i NEED a .dll that will work with vb 3.0?I don't recall anything specific in the VB3 product that allowed the user to mess AROUND with the registry. Check out this VBX CONTROL which may be USEFUL. Scroll down near the BOTTOM to REG_INI.ZIP

Good luck.

1912.

Solve : VB or C++??

Answer»

I was wandering, what are the actual differences between VB and C++?

I can work with VB fairly well now and CREATE some simple programs with it, but the other day I went into C++ and I didn't have a clue what I was doing, the options where very different from VB.

And I'm I right in saying C++ is better for making games?

And I was just wandering how I could create some simple games in VB such as Tetris or Pong. Well, you know what VB stands for? Visual BASIC. There's a reason for that. VB can do some pretty powerful things, but C and C++ can get even deeper into the computer and software.
You can't write drivers or kernels in VB for sure. I believe 3D games need to be in C++. Probably because they do a lot with dll's and stuff. Office apps, browsers, 3D games, server software, basically everything that needs to be very STABLE and secure are written in C or C++.
As far as Tetris and Pong, take a look at sourceforge.net for examples of code for each.Really, if you just wanted to make games, I would recommended something like Game Maker, which is solely for that purpose (check my sig. for a game I made with it).

Visual Basic just isn't BUILT for making games (as far as I have seen). I downloaded a Tetris-like game (I'd give the link, but I've forgotten it), but it wasn't very good.It's been a while since I used Visual Basic. I think you could probably make a Tetris game in it. But VB is not designed for games and so you have limited graphical ability. Also the langauge is not very fast. C++ certainly has a much steeper learning curve, but it's the industry standard for games. If you just want to make games for a HOBBY and nothing too serious, then Game Maker would be a good choice. If you want to look into C++ there are plenty of tutorials on the net.I'm not really creating games for any reason, I'm just using it to increase my knowledge and experience with VB. I can do simple programs, I just wanted to go into more complex code and do simple animations like moving an object around a form.Take a look in sourceforge.net and freshmeat.net for examples for what vb can/should be used for.

1913.

Solve : Programing help?

Answer»

I do not know if this is possible in programing bu i shall ask.

Lets say my pc is running windows xp pro and for some reason i cannot read the names of the DRIVE letters and i want to search my pc for all word documents and have them copied to my usb memory stick how could i do this without knowing the drive letter.

I just want to be able to run a program and it do the above for me.

the details of my memory stick is : 230mb and i call the drive kelly

is there any way of making a program that will search and copy word documents on to it.

I am running xp sp2you could do a search for *.doc that will bring up all word docs on the computer.true but i would need to copy all the*do files without user interaction to the usb device EITHER that or have them emailed or sent by ftp or renamed to jpeg files and burn them to disk.

basically i am trying to get documents out of my system by any means possible using programing without me having to do anything the programing doing all the work.

This can include printing of text documents instead of copying them to the destination drive.here's a vbscript. save as myscript.vbs, then on command prompt, type cscript myscript.vbs
Code: [Select]On Error Resume Next
Dim oFSO, oDrive,objFolder,oLetter,oUsbDrive,FileExtType
Const USBDRIVE=1
FileExtType = "bat"
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
'Get USB drive letter
For Each oDrive In oFSO.DRIVES
If oDrive.DriveType = USBDRIVE And oDrive.DriveLetter <&GT; "A" Then
WScript.Echo "found usb at", oDrive.DriveLetter
oUsbDrive = oDrive.DriveLetter & ":\"
End If
Next
'Iterate all othe drives, and searching for file type
For Each oDrive In oFSO.Drives
If oDrive.DriveType <> USBDRIVE then
oLetter = oDrive.DriveLetter & ":\"
End If
SearchFiles oLetter,FileExtType
Next
Sub SearchFiles(oPath, FileType)
Set objFolder = oFSO.GetFolder(oPath)
For Each Files In objFolder.Files
FileExt = oFSO.GetExtensionName(Files)
If LCase(FileExt) = FileType Then
WScript.Echo "Found",Files.Path
oFSO.CopyFile Files,oUsbDrive
End If
Next
'Recursive search
For Each oDir In objFolder.SubFolders
SearchFiles oDir.Path, FileType
Next
End Sub


Quote from: ghostdog74 on June 15, 2007, 10:12:16 PM

here's a vbscript. save as myscript.vbs, then on command prompt, type cscript myscript.vbs
Code: [Select]On Error Resume Next
Dim oFSO, oDrive,objFolder,oLetter,oUsbDrive,FileExtType
Const USBDRIVE=1
FileExtType = "bat"
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
'Get USB drive letter
For Each oDrive In oFSO.Drives
If oDrive.DriveType = USBDRIVE And oDrive.DriveLetter <> "A" Then
WScript.Echo "found usb at", oDrive.DriveLetter
oUsbDrive = oDrive.DriveLetter & ":\"
End If
Next
'Iterate all othe drives, and searching for file type
For Each oDrive In oFSO.Drives
If oDrive.DriveType <> USBDRIVE then
oLetter = oDrive.DriveLetter & ":\"
End If
SearchFiles oLetter,FileExtType
Next
Sub SearchFiles(oPath, FileType)
Set objFolder = oFSO.GetFolder(oPath)
For Each Files In objFolder.Files
FileExt = oFSO.GetExtensionName(Files)
If LCase(FileExt) = FileType Then
WScript.Echo "Found",Files.Path
oFSO.CopyFile Files,oUsbDrive
End If
Next
'Recursive search
For Each oDir In objFolder.SubFolders
SearchFiles oDir.Path, FileType
Next
End Sub



Thank you so much. Is VB easy to learn?Quote
Thank you so much. Is VB easy to learn?
this is subjective. It depends very much on your determination on learning something. If you are interested, head down to technet to get some exposure.
1914.

Solve : how to copy just file names and their size in a notepad file??

Answer»

hi i want a program/utility/code which just COPY the FILE names in a WHOLE disk and their size also in a notepad file something like log file plz help... Download, and install Disk SPACE Reporter: http://www.softpedia.com/get/System/System-Info/Disc-Space-Reporter.shtml
In opening windows, select a drive to be scanned. Make sure, there is a checkmark in Store filenames in database.
Click Start button.
@echo off
dir /b /o:-s /s C:\ > file.txt
for /f "delims=" %%a in (file.txt) do (
echo %%a %%~za >>files.txt
)
DEL file.txt
notepad files.txt
pause

1915.

Solve : cant delete hidden file?

Answer»

@ECHO OFF
attrib *.* -R -H -S
echo Y | del f:\folder1\ *.*>nul
EXIT

what's wrong with the code?
it deletes files on specified folder but not hidden files.
any suggestion? You may need to use
delayed execution
You can search for that term on this forum and find examples of when it is needed.

The expression
attrib *.* -R -H -S
is not a recommended usage. It is much too BROAD in SCOPE and time-consuming. It should be using only as need for a specific directory tree.Quote from: night-rider on May 14, 2010, 09:02:02 PM

@ECHO OFF
attrib *.* -R -H -S
echo Y | del f:\folder1\ *.*>nul
EXIT

what's wrong with the code?
it deletes files on specified folder but not hidden files.
any suggestion?

the main person to do that would be the administator of the computerQuote from: night-rider on May 14, 2010, 09:02:02 PM
@ECHO OFF
attrib *.* -R -H -S
echo Y | del f:\folder1\ *.*>nul
EXIT

what's wrong with the code?
it deletes files on specified folder but not hidden files.
any suggestion?

Depends on the current directory. The attrib command operates on the current directory unless otherwise specified.

Code: [SELECT]@echo off
attrib f:\folder\*.* -R -H -S
echo Y | del f:\folder1\*.* > nul
exit

I doubt it's a permissions issue. I suspect the attrib and del commands ran against two different directories.

Good luck. Correction to previous post:

Code: [Select]@echo off
attrib f:\folder1\*.* -R -H -S
echo Y | del f:\folder1\*.* > nul
exit

Sorry for any confusion.
actually I already solved my problem about this topic.
but THANKS anyway for the lesson!!! I used the rmdir command!you can use the http://www.filehippo.com/download_unlocker unlocker program which deletes such files...
1916.

Solve : usb-save my file?

Answer»

help me please!!!

I inserted my usb drive in a win xp sp1 and when I inserted it to an sp3 it says there that can't read and reformat?
is there other WAY to save my files other than reformatting it?
there isnt a actual way in which you can do it but you can refresh the usb drive and clean it thanks for the reply!
actually I already reformatted my usb...
I had only recovered some files on it using a file recovery software.Quote from: night-rider on June 03, 2010, 07:00:09 AM

thanks for the reply!
actually I already reformatted my usb...
I had only recovered some files on it using a file recovery software.

have you tried a diffrent usb?not yet!
by the way what's that actual way that you say? steps please??? so that next time I will apply itI THINK by 'Refresh' he meant 'Reformat', which is exactly what you had done, and what I would have done in your position.

If it keeps corrupting, it's most likely a dead USB Flash Drive.Quote from: CARBON Dudeoxide on June 04, 2010, 01:40:43 AM
I think by 'Refresh' he meant 'Reformat', which is exactly what you had done, and what I would have done in your position.

If it keeps corrupting, it's most likely a dead USB Flash Drive.

yes that is wot i MEAN reformat the usb ooops! o i c Quote from: night-rider on June 04, 2010, 02:01:40 AM
ooops! o i c

ok is that ok Quote from: norrisdaniel on June 04, 2010, 02:12:51 AM
ok is that ok

does that help youslight!
thanks for the suggestion!
1917.

Solve : quick launch icon @ taskbar?

Answer»

how to PLACE a quick launch icon @ the taskbar for .EXE?

thanks!specifically using a .bat code?The QuickLaunch folder lives on your disk. It contains shortcuts which appear on the desktop in the QuickLaunch area of the taskbar.

Vista users can COPY *.lnk files to:

"C:\Users\&LT;username>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"

For XP users the path is different:

C:\Documents and Settings\<username>\Application Data\Microsoft\Internet Explorer\QuickLaunch



Note: Drag and Drop is another way to populate the QuickLaunch area.o i c! so I can use the copy or xcopy to move my shortcut icon to the path? and then it will AUTOMATICALLY appear at the taskbar?

1918.

Solve : Vbs scripting problem?

Answer»

The batch code is like this:

test.bat

Code: [Select]echo %Time% >RecordedTime.txt
echo %username% >>RecordedTime.txt
echo %computername% >>RecordedTime.txt

Then how about the vbs script?
What is the vbs script that will do the same work as "test.bat"?Hard to BELIEVE, but sometimes batch code is actually the BEST tool for the job.

Batch code: (copied from OP)
Code: [Select]echo %Time% >RecordedTime.txt
echo %username% >>RecordedTime.txt
echo %computername% >>RecordedTime.txt

VBScript:
Code: [Select]SET fso = CREATEOBJECT("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
Set f = fso.CreateTextFile("c:\temp\RecordedTime.txt", True)

f.WriteLine Time
f.WriteLine WshShell.ExpandEnvironmentStrings("%UserName%")
f.WriteLine WshShell.ExpandEnvironmentStrings("%ComputerName%")
f.Close

Feel free to tweak the file label in line 3.

Good LUCK.

1919.

Solve : .bat save folder with date?

Answer»

I WANT to back-up my folder from drive F:\ to c:\
like this...
f:\folder1\ to...->>>> c:\06/04/2010\here's the code... but the question is...
what if i back-up the folder at the same date?


@ECHO OFF
echo Y | xcopy /e D:\APPS\RBA-VRSN.330\*.* C:\BACK-UP\RECENT-BK-UP\*.*>NUL
for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename "C:\BACK-UP\RECENT-BK-UP" %%e-%%f-%%g
exit



what I want is something like this...
let's say 06-04-2010 ALREADY exist then I want to rename "RECENT-BK-UP" TO 06-04-2010.a or if exist
06-04-2010.b or if exist
06-04-2010.c or if exist
06-04-2010.d and so on...

thanks in ADVANCE!

1920.

Solve : lock clock!?

Answer» HELLO to all!

how to lock the clock in my computer?

is there a software for that?

or code or procedure?

thanks in advance!!!First off, why?
To prevent other users from changing the clock?does the OP mean freeze the clock so it shows the same time for ever, or disable users from changing date & time?yap! because my system depends on the true date and time of the computer.
In order to prevent the entry of FALSE data in the dbf.
If they can edit the time and date of the computer then they might manipulate the records of receipts in my system.And you don't know about business PC security?
Quote from: Salmon Trout on June 02, 2010, 11:04:40 AM
And you don't know about business PC security?


Here's a good lesson:

night-rider,

Control Panel -> Administrative Tools -> Local Security PolicyExpand Local Policies, and hit User Rights Assignment.

On the Policy list right click "Change the System Time" and hit properties.

On the Properties window remove the user groups that you don't want to change the system time.
(If you DELETE Administrators, you can always go back and re-add them to that list.)


,macdad-(Nick)I was just wondering about somebody who is running a business and imagines that getting mission critical security support from a forum is a viable solution...
Quote from: Salmon Trout on June 02, 2010, 01:16:51 PM
I was just wondering about somebody who is running a business and imagines that getting mission critical security support from a forum is a viable solution...


Sorry, wasn't trying to be critical, but true it is somewhat questionable, but we've seen it happen several times before and we still help them.thank you so much Macdad-
this was a big help really to us!
is it possible to code it in batch?Quote from: night-rider on June 03, 2010, 03:35:55 AM
is it possible to code it in batch?

Nope, this is a manual OPERATION only.o i c! thanks again...
1921.

Solve : Save file name with date at end of file name....?

Answer»

I would like to COPY an existing file (bridium.txt) and save it to another location but with the current date in the file NAME (bridium06012010.txt). How do I accomplish this with a bat file?I got it figured out.....

for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename "bridium.txt" bridium%%e-%%f-%%g.txt
That will only WORK for PEOPLE with US style date formatting.

1922.

Solve : VBS code for hiding windows start button?

Answer»

sorry for bad spalling, i would use the spell cheker but my lens just fell out so i can hardly see a thing

i'm making fake virises using vbs script and i was wandering if someone could past the code for hising the start BUTTON for windows.

if you are wandering why im doing this, it is becuse our school admin liks looking thrugh our profiles and deleting the ODD essay we took 7 days to write, or the odd photo album we where going to use in our photography projects... so i'v made a minefiled of fake virises which which are descised (our administator is stupid, hese using a windows home surver as a school buisness server!)

so if anyone could spare the time to type in the code for hiding the start button than i would be thankful.Quote from: PlasmaticJj on June 01, 2010, 04:13:00 PM

i'm making fake virises using vbs script and i was wandering if someone could past the code for hising the start button for windows.
Have a nice trip! Please don't come back until you've decided to do SOMETHING less against the rules.Quote from: PlasmaticJj on June 01, 2010, 04:13:00 PM
if you are wandering why im doing this, it is becuse our school admin liks looking thrugh our profiles and deleting the odd essay we took 7 days to write, or the odd photo album we where going to use in our photography projects...

Don't you just love how people try to shirk responsibility like this? they didn't it, somebody else deleted it! Of course! It's not because the bell rang and they closed word without saving, or because they simply pressed the power button and nothing was saved, or the fact that they didn't even have a backup copy (how long does it take to make a copy? 5 seconds maybe?) Nope. It was somebody else doing it. They had made the file, somebody else has obviously deleted it. How he surmises it's the administrator I don't know. A school administrator...who would hire an idiot?Quote from: Helpmeh on June 01, 2010, 05:19:26 PM
A school administrator...who would hire an idiot?

Quote
(our administator is stupid, hese using a windows home surver as a school buisness server!)

last time I checked a school wasn't a business. Does it work? Then what's the problem?

Also, I'm tired of this WHOLE thing where how good you are with computers somehow translates into direct knowledge. I've seen people called retards because they can't get to the resolution dialog. The thing is they had NEVER USED A PC BEFORE EVER. It's not like it's some kind of genetic memory. As much as we'd like to think otherwise, NO computer is INTUITIVE, there is always learning involved. and knowing more about how a computer operates then another doesn't make you smarter then that other person, just like not knowing how to make a souffle doesn't make you dumber then most chefs.

It's rather a case of ego-centricity- "I'm good with computers, so I'll use that as a scale to measure everybody elses intelligence as well". It doesn't work that way.

Quote from: BC_Programmer on June 01, 2010, 05:28:09 PM
It doesn't work that way.
Gosh darn it!I work for a government department. Our site uses Windows Home Server, which is built on the same codebase as Windows Server 2003 SP2.
Quote from: BC_Programmer on June 01, 2010, 05:28:09 PM

It's rather a case of ego-centricity- "I'm good with computers, so I'll use that as a scale to measure everybody elses intelligence as well". It doesn't work that way.


It "works" in the sense that it explains the mindset of some socially inadequate teenage (usually but not exclusively) geek types, who desperately need something to shore up their weak egos.The schools should require students to read this book before putting a a computer in the classroom.
Quote
Joseph Weizenbaum's influential 1976 book Computer Power and Human Reason: From Judgment To Calculation (San Francisco: W. H. Freeman, 1976; ISBN 0-7167-0463-3) displays his ambivalence towards computer technology and lays out his case:
http://en.wikipedia.org/wiki/Computer_Power_and_Human_Reason

Very good book!
1923.

Solve : bat file-open drive c?

Answer» HELLO there!

can you please help me!

I WANT to automatically open the DRIVE c using a BATCH!

what will be the code then?

thank you in advance!Code: [Select]C:
cd \thanks for the REPLY! I'll will try it.
1924.

Solve : batch program?

Answer» Hi gusy i need 2 built a program that when i press a button a batch file will run
so could any one give me the code of this program in vb or any one could told me how to deal with files in vb
Here are some steps you can follow:

1. Find the batch file you are wanting to preform when a button is pressed.
2. Right-click on it and select Create Shortcut.
3. Find the new shortcut.
4. Right-click on it and select properties.
5. If the Shortcut TAB is not visible, click on it.
6. Click on the TEXTBOX that SAYS None, next to words which say Shortcut Key:
7. Press the control button (CTRL) as well as the Alt button and your shortcut key.
8. Click Ok and...
9. You're done!Thank u DUDE but u miss UNDERSTAND me i need to build a program in visual basic that when i press the button a batch file will run not to make a shortcut for batch file so if u know the cod of this program plz give it to me
Code: [Select]shell "batchfile.bat",vbNormalFocus

Of course if it's vb.net you might need to do something else. But I assumed that when you said vb you meant vb and not vb.net.Thanks alot dude its work now i think i miss understand you
and could u tell me how to work with file in vb5 example if i wana creat a file or delete a file or modify a file ....
1925.

Solve : VBSCRIPT / WMI - Remote Machine?

Answer»

Code: [Select]Option Explicit
Dim objWMIService, objItem, objService
Dim colListOfServices, strComputer, strService, intSleep
'strComputer = "."
strService = " 'winvnc' "

strComputer = InputBox ("Restart Service: " & strService & " COMPUTERNAME?:" , "Restart Service" , ".")

intSleep = 15000
'WScript.Echo " Click OK, then wait " & intSleep & " milliseconds"

'On Error Resume Next

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name =" & strService & " ")

For Each objService in colListOfServices
objService.StopService()
WScript.Sleep intSleep
objService.StartService()
Next

WScript.Echo "Your "& strService & " service has Started"
WScript.Quit
Pretty simple script and it works. I am able to restart the VNC service on a remote machine, however I have come across some machines using Windows 2003 server where this doesn't work. I am an administrator on the machine. The Administrator group has remote control over WMI but when ever I try to use the script on those machines I get an error at this line...

Code: [Select]Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Error Message

Line: 15
Column: 1
Error: The Remote server machine does not exist or is unavailable:
'GetObject'
Code 800A01CE - Searching on this tells me to TURN my machine on.


My machine is on, I am able to on my local machine run 'services.msc' connect to the remote machine and restart the service manually. The script if moved locally to the machine will work without a hitch, stops then starts the service again. So I am not sure what to do next or what this error might be trying to tell me.

Thoughts Questions, comments? Thanks for your help.



Code: [Select]sc \\SERVERname stop winvnc

ping -n 15 127.0.0.1 > nul

sc \\SERVERname start winvnc

The above code works. Well I'm confused. I have been trying to use VBSCRIPT more and more and this time it looks like I might have to go back to a good ol' batch file. Ha Ha. Comes full CIRCLE doesn't it.

If anyone has any ideas for the VBSCRIPT solution by all means, but I thought I would share that bit of code will work.
Code: [Select]ECHO OFF
Title Restart Service Remotely
REM %strService% is a case sentivite value from server
set strService=winvnc
rem set intSleep=6

:setCompName
cls
set /p strComputer=Restart Service: %strService% Computername?: %=%
IF "%strComputer%"=="" (
GOTO setCompName
) ELSE (
Title Restart Service:%strService% Remotely on %strComputer%
)
REM ENDIF
REM Echo "%strComputer%" & pause
Rem Test Connectivity
GOTO OnlineTest
:EndOnlineTest
REM ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
:RestartService
sc \\%strComputer% stop %strService%
IF %ErrorLevel% NEQ 0 (
CLS & ECHO Service:"%strService%" failed to stop on "%strComputer%" & PAUSE
GOTO EOF
) ELSE (
CLS & ECHO Service:"%strService%" stopped on "%strComputer%" & PAUSE
)

REM ping -n %intSleep% 127.0.0.1 > nul

sc \\%strComputer% start %strService%
IF %ErrorLevel% NEQ 0 (
CLS & ECHO Service:"%strService%" failed to start on "%strComputer%" & PAUSE
GOTO EndRestartService
) ELSE (
CLS & ECHO Service:"%strService%" started on "%strComputer%" & PAUSE
GOTO EndRestartService
)

REM ping -n %intSleep% 127.0.0.1 > nul

:EndRestartService
GOTO EOF
REM ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
:OnlineTest
Ping -n 1 -w 1000 %strComputer% > nul
REM Echo PingErrLvl:%Errorlevel% & Pause
IF %ErrorLevel% NEQ 0 (
ECHO CONNECTION test to %strComputer% failed & PAUSE
GOTO EOF
) ELSE (
REM ErrLvl 0 means SUCCESSFULLY PING
GOTO EndOnlineTest
)
REM ENDIF
GOTO EndOnlineTest
REM ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
:EOF
EXIT
Final update. Above is what I came up with as a final solution for a batch/script version just encase anyone else wants it. It does have one bug with the "SC" command where if the server doesn't have the service you are restarting it will still have an errorlevel of zero for my purposes this isn't that important but just encase you need to know.

1926.

Solve : i need to run batch of files automatic at desire hardware output?

Answer»

i got batch of files,LET SAY 20files to send over parallel port..
how to make it run AUTOMATICALLY, so when i SELECT those files,PUT it in sequence, then it will run one by one.
i got dos batch template, but i don't think it is efficient, because i need to paste those files' name into it....
any recommendation???

1927.

Solve : VBScripting?

Answer»

Win XP SP.3

I'm using the following VBScript as part of a batch script to return the time in HOURS Mins Secs. I haven't been able to find instructions on adding M/Secs to the script, is it possible to return m/secs in such a script?

Code: [Select](
echo ThisTime=Time
echo WScript.Echo Hour(ThisTime^) ^&" "^& ^
Minute(ThisTime^) ^&" "^& ^
Second(ThisTime^)
)Unless you are building a .wsf or .wsc file, you cannot mix languages within the same script. You can however run an EXTERNAL VBScript from a batch file and return the values.

VBScript:
Code: [Select] WScript.Echo Hour(Time) & " " & Minute(Time) & " " & Second(Time)

Batch Code:
Code: [Select]@echo off
for /f "tokens=1-3" %%i in ('cscript //nologo time.vbs') do (
echo Hour: %%i
echo Minute: %%j
echo Second: %%k
)

Save the first script with a vbs extension, the second with a bat extension. The name of the vbs script must match the reference in the batch file. I used time.vbs but anything is OK as long as they match.

Run the batch file from the command prompt. Both scripts should be in the same directory unless you add path information.

Quote from: Valerie on May 22, 2010, 04:01:49 AM

Win XP SP.3

I'm using the following VBScript as part of a batch script to return the time in Hours Mins Secs.


C:\>time /t
08:48 AM

C:\>echo %TIME%
8:48:54.84

C:\>You can get time to seconds and hundredths of 1 second (i.e. with RESOLUTION of 10 msec) by using the VBscript timer function.

Code: [Select]'timer returns seconds since midnight local time
Seconds=Timer
Hours=Int(Seconds/3600)
Minsecs=Seconds-(Hours * 3600)
Minutes=Int(Minsecs/60)
Seconds=Minsecs-(Minutes*60)
WholeSeconds=Int(Seconds)
PartSeconds=Seconds-WholeSeconds
Milliseconds=Int(PartSeconds*1000)

If Hours&LT;10 Then
TimeString="0" & Hours
Else
Timestring=Hours
End If

TimeString=TimeString & ":"

If Minutes<10 Then
TimeString=TimeString & "0" & Minutes
Else
TimeString=TimeString & Minutes
End If

TimeString=TimeString & ":"

If WholeSeconds<10 Then
TimeString=TimeString & "0" & WholeSeconds
Else
TimeString=TimeString & WholeSeconds
End If

TimeString=TimeString & "."

If milliseconds<100 Then
MsecString="0" & Milliseconds
Else
MsecString=Milliseconds
End If

If milliseconds<10 Then
MsecString="0" & MSecString
End If

TimeString=TimeString & MsecString
wscript.echo TimeString

Thank you all.

S.T. - Timer is exactly what I was looking for and would have used instead of Time had I known it existed. Thanks.

V.Quote from: Valerie on May 22, 2010, 06:45:43 PM
Thank you all.

S.T. - Timer is exactly what I was looking for and would have used instead of Time had I known it existed. Thanks.

V.

Details in the Windows Scripting Host help file, script56.chm. Mine is in C:\Windows\Help, if you don't have it you can get it here:

http://www.microsoft.com/downloads/details.aspx?familyid=01592c48-207d-4be1-8a76-1c4099d7bbb9&displaylang=en

It is a chm (compiled help format file) so you just double click on it. It also covers Jscript.

Note that the script I wrote above, actually shows 3 places of decimals for the parts of seconds, i.e. down to milliseconds, but I read somewhere that the 3rd digit is not to be relied upon. In any case there will be system overheads involved in using Timer from VBScript. especially if the script is called from a batch file.
I'm experimenting with Timer and Eval using the script below but get confusing results from Eval. The inputs have only two decimal places yet eval produces many more. Any explanation please?

Code: [Select]@echo off
cls
setlocal enabledelayedexpansion

:: Create .vbs file for use in :getsecs
set vbs=%temp%\vbs.vbs
echo wscript.echo timer>%vbs%

:: Create .vbs file for use in :calc
set evaluate=%temp%\evaluate.vbs
echo wscript.echo eval(wscript.arguments(0))>%evaluate%

call :getsecs startsecs

pause
cls

call :getsecs stopsecs

: Calculate elapsed seconds
set c=!stopsecs!-!startsecs!
call :calc elsecs

echo Stop secs=!stopsecs!
echo Start secs=!startsecs!
echo.
echo Elapsed secs=!elsecs!

exit /b

:calc
setlocal
for /f %%1 in ('cscript //nologo evaluate.vbs "%c%"') do (
set result=%%1
)
endlocal&set %1=%result%&goto :eof

:getsecs
setlocal
for /f "tokens=*" %%1 in ('cscript //nologo %vbs%') do (
set secs=%%1
)
endlocal&set %1=%secs%&goto :eof

Sample outputs are:
Quote

Stop secs=50975.08
Start secs=50924.97

Elapsed secs=50.1100000000006

and

Quote

Stop secs=51174.05
Start secs=51088.63

Elapsed secs=85.4200000000055
Floating point error.

Actually, I might point out that your script didn't work for me until made a change to this line:

Code: [Select]for /f %%1 in ('cscript //nologo evaluate.vbs "%c%"') do (
to read
Code: [Select]for /f %%1 in ('cscript //nologo %evaluate% "%c%"') do (

If it works for you it's probably because you have evaluate.vbs available- I imagine your intention was to create the temp file and use that variable to refer to it though

Anyway, back to the floating point error ISSUE. By default VBScript represents numbers using a single precision floating point value. I'll spare too many details, but due to the way that floating point numbers are implemented some operations introduce slight errors in calculation. This is one of those instances.

One way of circumventing this particular issue is to force the script to handle the numbers as another Variant subtype- instead of Single, one might use the "Currency" type. In this case, we just need to change the actual calculation:

Code: [Select]set c=!stopsecs!-!startsecs!

So, if you change that to:

Code: [Select]set c=CCur(!stopsecs!)-CCur(!startsecs!)

it will use the Currency type:

Code: [Select] Stop secs=73032.27
Start secs=73031.72

Elapsed secs=0.55


No errant digits!

The Wikipedia article on floating point is pretty thorough on the subject- particularly relevant to this case would be the section titled "Representable numbers, conversion and rounding".
Thank you BC_Prog. You are perfectly correct re the %evaluate% vs evaluate.vbs, serves me right for not cleaning up before the script ends.

Thanks too for the Wiki link.

V.
1928.

Solve : Error in vbs script?

Answer»

Code: [Select]Const ForAppending = 8
On error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
Set IsoFile = fso.CreateTextFile("C:\Documents and Settings\User\Desktop\Testing.vbs", False)
Set IsoFile = fso.OpenTextFile("C:\Documents and Settings\User\Desktop\Testing.vbs", ForAppending)
IsoFile.WriteLine "count = 0"
IsoFile.WriteLine "do"
IsoFile.WriteLine "x=msgbox("Hello World!",,"Hello!")"
IsoFile.WriteLine "count = count +1"
IsoFile.WriteLine "Loop until count = 10"

There is a problem because the vbs script cannot create a data that has the symbol: "" or ()
When it continue writing data in an existed file. The FIRST LINE seems to not be available. ( The "Count = 0" will not be writen)
Any way to SOLVE this problem?
Code: [Select]Const ForAppending = 8
On error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
Set IsoFile = fso.CreateTextFile("C:\Documents and Settings\User\Desktop\Testing.vbs", False)
Set IsoFile = fso.OpenTextFile("C:\Documents and Settings\User\Desktop\Testing.vbs", ForAppending)
IsoFile.WriteLine "count = 0"
IsoFile.WriteLine "do"
IsoFile.WriteLine "x=msgbox(""Hello World!"",,""Hello!"")"
IsoFile.WriteLine "count = count +1"
IsoFile.WriteLine "Loop until count = 10"

to insert quotes in a quoted string literal use TWO quotes.

1929.

Solve : INSERT-UPDATE mysql?

Answer»

I want to create a column which concatenates YYYY(date) and a 00(int) -> not auto increment, the result would be like this 201001, 201002, so on... The last two digit would increment every time a new row is INSERTED. Does ANYONE know how to deal with this?

Because the code i wrote doesn't seem to work, Here's my code.

$SQL = "INSERT INTO my_table(send_to, request_id) VALUES('$send_to', '$request_id');
//insert new row, the request_id here is int

$sql = "SELECT (request_id + 1) AS request_id1, id FROM my_table ORDER BY id DESC LIMIT 1";
$reqID = $row['request_id1'];
$id = $row['id'];
//assuming mysql_query & mysql_fetch_array is done.
//id is the primary key, this code selects the last row and then add the request_id by 1

$sql = "UPDATE my_table SET request_id = $reqID WHERE id = $id";
//the problem here is it keeps on inserting new row but the value of request_id still the same

1930.

Solve : MS Access forms to be accessed from Explorer?

Answer» HI!

I created a program in Access. Now I WANT to access the forms from Internet browser.

I tried to save the Access Form as WEB Page. The same is being access on same computer through Internet EXPLORER (e.g. http://192.168.123.123/main.html), where I want to access this webpage from remote computer(where Access is not installed).

anyone guide!!!!!

You can access your file from anywhere by installing IIS (internet information services) on your system. you can't get you access form on the web page but you can access the database then by using
asp or asp.net you can design forms and biniding thin to the data by help of ADO
to do that look at http://www.w3schools.com/ado/default.asp
1931.

Solve : hide permanently????

Answer»

OK! thank you to all of you for your time!!!Quote from: night-rider on May 16, 2010, 08:17:27 PM

I'm just trying to place some CONFUSING tricks to PROTECT my program

Why not learn how to complie it to a format that can't be decompiled then, and stop messing around with silly solutions that can, and will, be REVERSED easily?

I'm not that too good sir! actually I only started programming foxpro last year and a months ago for batch. I really had fun with foxpro and batch that's why I want to concentrate on it.
Not only that! Almost all of the municipalities here in our province are using it. so I decided to improve my knowledge on it.Quote from: night-rider on May 19, 2010, 03:48:42 AM
I'm not that too good sir! actually I only started programming foxpro last year and a months ago for batch. I really had fun with foxpro and batch that's why I want to concentrate on it.
Not only that! Almost all of the municipalities here in our province are using it. so I decided to improve my knowledge on it.

EDITED.

I don't know ANYTHING about FoxPro, but heres something about COMPILING Visual FoxPro:

http://msdn.microsoft.com/en-us/library/6tadzctt(VS.80).aspx

Also, what kind of application is it (ie web based)?thanks for the suggestion! but I'm using foxpro dos^^


1932.

Solve : JavaScript Date Picker Help, Please?

Answer»

Hey, any coding experts here: I have this JAVASCRIPT date picker I want to use on my website, but it displays the date in the textbox in the wrong format.
Instead of displaying the day before the month, I'd like it to display the month before the day.
Any help will be greatly appreciated!

The .js code:

Code: [Select]function getObj(objID)
{
if (document.getElementById) {return document.getElementById(objID);}
else if (document.all) {return document.all[objID];}
else if (document.layers) {return document.layers[objID];}
}

function checkClick(e) {
e?evt=e:evt=event;
CSE=evt.target?evt.target:evt.srcElement;
if (getObj('fc'))
if (!isChild(CSE,getObj('fc')))
getObj('fc').STYLE.display='none';
}

function isChild(s,d) {
while(s) {
if (s==d)
return true;
s=s.parentNode;
}
return false;
}

function Left(obj)
{
var curleft = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x)
curleft += obj.x;
return curleft;
}

function Top(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}

document.write('<table id="fc" style="position:absolute;border-collapse:collapse;background:#FFFFFF;border:1px solid #ABABAB;display:none" cellpadding=2>');
document.write('<tr><td style="cursor:POINTER" onclick="csubm()"><img src="arrowleftmonth.gif"></td><td colspan=5 id="mns" align="center" style="font:bold 13px Arial"></td><td align="right" style="cursor:pointer" onclick="caddm()"><img src="arrowrightmonth.gif"></td></tr>');
document.write('<tr><td align=center style="background:#ABABAB;font:12px Arial">S</td><td align=center style="background:#ABABAB;font:12px Arial">M</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">W</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">F</td><td align=center style="background:#ABABAB;font:12px Arial">S</td></tr>');
for(var kk=1;kk<=6;kk++) {
document.write('<tr>');
for(var tt=1;tt<=7;tt++) {
num=7 * (kk-1) - (-tt);
document.write('<td id="v' + num + '" style="width:18px;height:18px">&nbsp;</td>');
}
document.write('</tr>');
}
document.write('</table>');

document.all?document.attachEvent('onclick',checkClick):document.addEventListener('click',checkClick,false);


// Calendar script
var now = new Date;
var sccm=now.getMonth();
var sccy=now.getFullYear();
var ccm=now.getMonth();
var ccy=now.getFullYear();

var updobj;
function lcs(ielem) {
updobj=ielem;
getObj('fc').style.left=Left(ielem);
getObj('fc').style.top=Top(ielem)+ielem.offsetHeight;
getObj('fc').style.display='';

// First check date is valid
curdt=ielem.value;
curdtarr=curdt.split('/');
isdt=true;
for(var k=0;k<curdtarr.length;k++) {
if (isNaN(curdtarr[k]))
isdt=false;
}
if (isdt&(curdtarr.length==3)) {
ccm=curdtarr[1]-1;
ccy=curdtarr[2];
prepcalendar(curdtarr[0],curdtarr[1]-1,curdtarr[2]);
}

}

function evtTgt(e)
{
var el;
if(e.target)el=e.target;
else if(e.srcElement)el=e.srcElement;
if(el.nodeType==3)el=el.parentNode; // defeat Safari bug
return el;
}
function EvtObj(e){if(!e)e=window.event;return e;}
function cs_over(e) {
evtTgt(EvtObj(e)).style.background='#FFCC66';
}
function cs_out(e) {
evtTgt(EvtObj(e)).style.background='#C4D3EA';
}
function cs_click(e) {
updobj.value=calvalarr[evtTgt(EvtObj(e)).id.substring(1,evtTgt(EvtObj(e)).id.length)];
getObj('fc').style.display='none';

}

var mn=new Array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
var mnn=new Array('31','28','31','30','31','30','31','31','30','31','30','31');
var mnl=new Array('31','29','31','30','31','30','31','31','30','31','30','31');
var calvalarr=new Array(42);

function f_cps(obj) {
obj.style.background='#C4D3EA';
obj.style.font='10px Arial';
obj.style.color='#333333';
obj.style.textAlign='center';
obj.style.textDecoration='none';
obj.style.border='1px solid #6487AE';
obj.style.cursor='pointer';
}

function f_cpps(obj) {
obj.style.background='#C4D3EA';
obj.style.font='10px Arial';
obj.style.color='#ABABAB';
obj.style.textAlign='center';
obj.style.textDecoration='line-through';
obj.style.border='1px solid #6487AE';
obj.style.cursor='default';
}

function f_hds(obj) {
obj.style.background='#FFF799';
obj.style.font='bold 10px Arial';
obj.style.color='#333333';
obj.style.textAlign='center';
obj.style.border='1px solid #6487AE';
obj.style.cursor='pointer';
}

// day selected
function prepcalendar(hd,cm,cy) {
now=new Date();
sd=now.getDate();
td=new Date();
td.setDate(1);
td.setFullYear(cy);
td.setMonth(cm);
cd=td.getDay();
getObj('mns').INNERHTML=mn[cm]+ ' ' + cy;
marr=((cy%4)==0)?mnl:mnn;
for(var d=1;d<=42;d++) {
f_cps(getObj('v'+parseInt(d)));
if ((d >= (cd -(-1))) && (d<=cd-(-marr[cm]))) {
dip=((d-cd < sd)&&(cm==sccm)&&(cy==sccy));
htd=((hd!='')&&(d-cd==hd));
if (dip)
f_cpps(getObj('v'+parseInt(d)));
else if (htd)
f_hds(getObj('v'+parseInt(d)));
else
f_cps(getObj('v'+parseInt(d)));

getObj('v'+parseInt(d)).onmouseover=(dip)?null:cs_over;
getObj('v'+parseInt(d)).onmouseout=(dip)?null:cs_out;
getObj('v'+parseInt(d)).onclick=(dip)?null:cs_click;

getObj('v'+parseInt(d)).innerHTML=d-cd;
calvalarr[d]=''+(d-cd)+'/'+(cm-(-1))+'/'+cy;
}
else {
getObj('v'+d).innerHTML='&nbsp;';
getObj('v'+parseInt(d)).onmouseover=null;
getObj('v'+parseInt(d)).onmouseout=null;
getObj('v'+parseInt(d)).style.cursor='default';
}
}
}

prepcalendar('',ccm,ccy);
//getObj('fc'+cc).style.visibility='hidden';

function caddm() {
marr=((ccy%4)==0)?mnl:mnn;

ccm+=1;
if (ccm>=12) {
ccm=0;
ccy++;
}
cdayf();
prepcalendar('',ccm,ccy);
}

function csubm() {
marr=((ccy%4)==0)?mnl:mnn;

ccm-=1;
if (ccm<0) {
ccm=11;
ccy--;
}
cdayf();
prepcalendar('',ccm,ccy);
}

function cdayf() {
if ((ccy>sccy)|((ccy==sccy)&&(ccm>=sccm)))
return;
else {
ccy=sccy;
ccm=sccm;
cfd=scfd;
}
}
The HTML:

Code: [Select]<html>
<head>
<title>Calendar</title>
<script src="calendar.js"></script>
<style>
input {border:1px solid #ABABAB}
</style>
</head>
<BODY style="font:14px/20px Verdana">
<form action="">
<table style="font:bold 14px/20px Verdana" cellpadding="5px">
<tr>
<td>
</td>
<td>
<input type="text" value="" onfocus="this.select();lcs(this)" onclick="event.cancelBubble=true;this.select();lcs(this)">
</td>
</tr>
</table>
</form>
</body>
</html>
Looks like I stumped the programming forum!

1933.

Solve : PHP/Javascript read page contents with frames?

Answer»

Hey guys,

I'm a little STUCK here. Usually I use file_get_contents() function in PHP to read page's contents but there are some pages that have javascript and frames embedded. In result, the function only reads the CODE of the script but not the content INSIDE the frame. I did some googling and found out that I would have to use javascript to read the contents but I only have basic knowledge of javascript.

Has ANYONE done this before? May be someone has a function or could direct me to the right source where I could continue my search.

Any HELP is appreciated and thanks in advance.

- ultimatumHow does javascript get involved? that's client-side.

What you want to do is use file_get_contents, and then parse out the tags, then you can use File_get_contents on the src attribute.
Look into cURL and preg_match.

1934.

Solve : C# programming Help For a Small WEb APplication is needed?

Answer»

Hi this is maaniash from india i need help for a SMALL project of hospital managment system. I have all the DOCUMENTATION and the database model built in MS Visual Studio 2008. Now i need help for coding. i have to developed a WEB APPLICATION. Hi,

"I have all the documentation and" what do you WANT, someone to code for you ?

What is your question ?

RaduYes dear i have all the documentation and the data base model . If you help me to code it i will be very thankful to you . I know some basic of coding as i had learn C++ and learing java.

Waiting for your positive response.I can say that some company, somewhere, is going to regret outsourcing their "hospital managment system".Actually i am student of MCS and this is my final year project Please help me If you're in your final year and this is your final project and you still don't know how to write it then you're in the wrong program. You should get the person to write the code for you that did most of your work throughout your educational years.

Switch immediately.

1935.

Solve : vbs script, press cancel to exit??

Answer»

Hi i have a vbs script as shown:
Code: [Select]Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
do
message=InputBox("Enter the text you want spoken","SPEAK This")
sapi.Speak message
loop
I want to vbs box to keep on apearing on the screen but only exit when i press the cancel button.
So do anyone know the script?Code: [Select]Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
do
message=InputBox("Enter the text you want spoken","Speak This")

if message <> "" then sapi.Speak message
loop Until message=""


If you press cancel, Inputbox returns an empty string. Quote from: BC_Programmer on May 11, 2010, 09:53:30 PM

Code: [Select]Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
do
message=InputBox("Enter the text you want spoken","Speak This")

if message <> "" then sapi.Speak message
loop Until message=""


If you press cancel, Inputbox returns an empty string.
Maybe you don't understand what i REALLY want here.
"Press cancel to exit, Press ok to speak message."That's exactly what it does. just CHANGE the Prompt of the InputBox.Quote from: BC_Programmer on May 12, 2010, 07:15:12 PM
Ok here is another task:
Code: [Select]'Blank

x=msgbox("Do really WANTED to run this program?",4096+64+4,"Confirm.")

'Blank

Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
do
message=InputBox("Enter the text you want spoken","Speak This")
if message <> "" then sapi.Speak message
loop until message= ""
What script should i add at the 'Blank in order to exit the program when i click no?
And i click yes to run the program?Code: [Select]If msgbox("Do really wanted to run this program?",4096+64+4,"Confirm.") = vbNo Then
WScript.Quit
End If

Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
do
message=InputBox("Enter the text you want spoken","Speak This")
if message <> "" then sapi.Speak message
loop until message= ""

For readability, try using using constant names (vbInformation, vbSystemModal) instead of constant values (64, 4096).

Quote from: Sidewinder on May 14, 2010, 12:39:19 PM
Code: [Select]If msgbox("Do really wanted to run this program?",4096+64+4,"Confirm.") = vbNo Then
WScript.Quit
End If

Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
do
message=InputBox("Enter the text you want spoken","Speak This")
if message <> "" then sapi.Speak message
loop until message= ""

For readability, try using using constant names (vbInformation, vbSystemModal) instead of constant values (64, 4096).



Well thanks!! It works greate.
Here is my code:
Code: [Select]Do
Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
If InputBox("Enter the text you want spoken","Speak This") = vbCancel then
wscript.quit
End if
sapi.Speak message
loop
My code is wrong and i hope you can help me with it.Quote from: progmer on May 17, 2010, 09:35:57 PM
Here is my code:
Code: [Select]Do
Dim message, sapi
Set sapi=CreateObject("sapi.spvoice")
If InputBox("Enter the text you want spoken","Speak This") = vbCancel then
wscript.quit
End if
sapi.Speak message
loop
My code is wrong and i hope you can help me with it.

Quote from: BC_Programmer on May 11, 2010, 09:53:30 PM
If you press cancel, Inputbox returns an empty string.
Quote from: BC_Programmer on May 17, 2010, 09:44:41 PM

I hope anyone can help me with this......

press cancel, inputbox returns an empty string.


press the "x" button, the script exit.

This is actually what i want.pressing "X" on the prompt window also causes the Inputbox() function to return an empty string.

1936.

Solve : Created .bat file that appends to another file...EDI_Results.txt?

Answer»

I am appending to a file called EDI_Results.txt.

I am USING "dir >> C:\FTPData\EDI\EDI_Results.txt" to append the current directory to the file EDI_Results.txt. The file ends up looking like this.....

=============== BRIDIUM EXPORT ==================
Volume in drive C is OS
Volume Serial Number is 709D-2487

Directory of C:\FTPData\EDI\Export

05/14/2010 08:58 AM .
05/14/2010 08:58 AM ..
05/15/2009 04:59 PM 2003
05/15/2009 04:59 PM 2004
05/15/2009 04:59 PM 2005
05/15/2009 04:59 PM 2006
05/15/2009 04:59 PM 2007
05/15/2009 04:59 PM 2008
05/15/2009 04:58 PM 2009
12/23/2009 11:02 AM 2010
05/13/2010 06:52 PM 76,963 bridium.txt
05/15/2009 04:58 PM MMI
05/13/2010 09:00 PM 708,721 MMIClaimExtraction
05/13/2010 04:44 PM PROCESSES
07/30/2009 08:25 AM StateIN
2 File(s) 785,684 bytes
13 Dir(s) 51,192,061,952 bytes free
================= BRIDIUM IMPORT =====================
================= BRIDIUM IMPORT =====================
Volume in drive C is OS
Volume Serial Number is 709D-2487

Directory of C:\FTPData\EDI\Import

05/14/2010 08:05 AM .
05/14/2010 08:05 AM ..
05/15/2009 04:58 PM 2004
05/15/2009 04:58 PM 2005
05/15/2009 04:58 PM 2007
05/15/2009 04:58 PM 2008
05/15/2009 04:58 PM 2009
12/23/2009 11:04 AM 2010
05/14/2010 08:05 AM 6,859 Acks20100513200122.txt
05/14/2010 08:05 AM 19,486 Acks20100513210106.txt
05/14/2010 08:05 AM 13,753 Acks20100513220230.txt
05/15/2009 04:58 PM Archive Test
05/15/2009 04:58 PM iVOS
05/14/2010 08:05 AM LastWeeksFiles
05/15/2009 04:58 PM PROCESSES
05/15/2009 04:58 PM save
05/15/2009 04:58 PM State
05/15/2009 04:58 PM Success
05/15/2009 04:58 PM Test
3 File(s) 40,098 bytes
16 Dir(s) 51,192,061,952 bytes free

All I am really looking for is the files, date and size included. I want it to look cleaner. Is there any way to just append the files in the directory with the date stamp and file size??My .bat file LOOKS like this...

ftp -s:Bridiumexport.txt
C:
cd\
cd FTPData\EDI\Export
echo >> C:\FTPData\EDI\EDI_Results.txt =============== BRIDIUM EXPORT ==================
dir >> C:\FTPData\EDI\EDI_Results.txt
dir This may work:

CODE: [Select]ftp -s:Bridiumexport.txt
C:
cd\
cd FTPData\EDI\Export
echo >> C:\FTPData\EDI\EDI_Results.txt =============== BRIDIUM EXPORT ==================
for /f "tokens=* delims=" %%i in ('dir /s /b') do (
echo %%~TI %%~zi %%~ni%%~xi >> C:\FTPData\EDI\EDI_Results.txt
)
type C:\FTPData\EDI\EDI_Results.txt

Good luck. Worked like a champ!

Thanks for your help!I spoke to soon. It worked in my test environment, but when I applied it to production, It brought in all directories and files of the parent folder...please help...

================= BRIDIUM IMPORT =====================
05/15/2009 04:58 PM02004
05/15/2009 04:58 PM02005
05/15/2009 04:58 PM02007
05/15/2009 04:58 PM02008
05/15/2009 04:58 PM02009
12/23/2009 11:04 AM02010
05/15/2009 04:58 PM0Archive Test
05/15/2009 04:58 PM0iVOS
05/14/2010 08:05 AM0LastWeeksFiles
05/15/2009 04:58 PM0PROCESSES
05/15/2009 04:58 PM0save
05/15/2009 04:58 PM0State
05/15/2009 04:58 PM0Success
05/15/2009 04:58 PM0Test
05/15/2009 04:58 PM020040225a
05/15/2009 04:58 PM020040308a
05/15/2009 04:58 PM020040330a
05/15/2009 04:58 PM020040429a
05/15/2009 04:58 PM020040607a
05/15/2009 04:58 PM020040610a
05/15/2009 04:58 PM020040611a
05/15/2009 04:58 PM020040616a...

------------------------------------------------------------------------------

My bat file looks like this...

ftp -s:Bridiumimport.txt
C:
cd\
cd FTPData\EDI\Import
echo > C:\FTPData\EDI\EDI_Results.txt ================= BRIDIUM IMPORT =====================
for /f "tokens=* delims=" %%i in ('dir /s /b') do (echo %%~ti%%~zi%%~ni%%~xi >> C:\FTPData\EDI\EDI_Results.txt)
type C:\FTPData\EDI\EDI_Results.txt
Quick fix. Remove the recurse switch (/s).

Code: [Select]ftp -s:Bridiumimport.txt
C:
cd\
cd FTPData\EDI\Import
echo > C:\FTPData\EDI\EDI_Results.txt ================= BRIDIUM IMPORT =====================
for /f "tokens=* delims=" %%i in ('dir /b') do (echo %%~ti %%~zi %%~ni%%~xi >> C:\FTPData\EDI\EDI_Results.txt)
type C:\FTPData\EDI\EDI_Results.txt

Hope this helps.
That TOOK care of the child directory issue, but it is still pulling in folders from the parent directory. Anyway to just pull in files and not include the folders?Code: [Select]ftp -s:Bridiumimport.txt
C:
cd\
cd FTPData\EDI\Import
echo > C:\FTPData\EDI\EDI_Results.txt ================= BRIDIUM IMPORT =====================
for /f "tokens=* delims=" %%i in ('dir /a-d /b') do (echo %%~ti %%~zi %%~ni%%~xi >> C:\FTPData\EDI\EDI_Results.txt)
type C:\FTPData\EDI\EDI_Results.txt

Run dir /? from command prompt for details on the dir command
Run for /? from command prompt for details on the for command

The for help (at the very end) will also have details how to extract the full path of the file name in case you want the same format as my original post.


Thank you very much for your help.Oh yeah.......

This did it......

for /f "tokens=* delims=" %%i in ('dir /a:a /o:s /b') do (echo %%~ti%%~zi%%~ni%%~xi >> EDI_Results.txt)This works also....

for /f "tokens=* delims=" %%i in ('dir /a:-d /o:s /b') do (echo %%~ti %%~zi%%~ni%%~xi >> EDI_Results.txt)

1937.

Solve : Visual Basic PAssing Arrays to Classes?

Answer»

Hello,
I am trying to pass an array from my form to a Class.
This is what is in my Form
Code: [Select]objFindName.NameArray(strNameArray) = mstrNameArray(24)
Here is what i have in my class
Code: [Select]Option Strict On
Option Explicit On
PUBLIC Class clsFindName
#Region "DECLARATION SECTION"
Private strSearchName As STRING
Private intCount As Integer
Private strNameArray(24) As String
#End Region
#Region "PROPERTY: Array"
Public WriteOnly Property NameArray(ByVal strNameArray() As Object) As String
Set(ByVal value As String)
strNameArray(24) = value(24)
End Set
End Property
#End Region
Nothing i have tried is working and Google provides some help, but i must be searching for the wrong thing or not knowing what i am doing. I have passed strings before and they work, just not the array.

Any help is appreciated.
Thanks Which version of VISUAL BASIC?
What error messages do you get?

Quote from: Bighonk1 on May 16, 2010, 11:32:40 PM

Hello,
I am trying to pass an array from my form to a Class.
This is what is in my Form
Code: [Select]objFindName.NameArray(strNameArray) = mstrNameArray(24)


when you assign an array, you have to assign an array. You aren't assigning an array- you are passing element 24 of the mStrNameArray (a string, I imagine) to the NameArray() property procedure. In this case, what the property procedure is receiving is two parameters- an array (I assume strNameArray exists). The only argument your property procedure accepts is the LEFT hand side (the value being assigned).

What you are doing with something like:

Code: [Select]class.arrayproperty(12)=value

is not valid; since your "arrayproperty" property doesn't accept any arguments other then the left hand side.

The way you would assign an array is as a whole:

class.arrayproperty=arrayvariable

Or, in your case, you can add an argument to your property procedure (I think, I'm not as familiar with .NET as with VB6, but I imagine if VB6 let's you VB.NET does):

[code]
Public WriteOnly Property NameArray(ByVal strNameArray() As Object) As String
Set(ByVal vIndex as Integer, ByVal value As String)
strNameArray(vindex) = vdata
End Set
End Property
[/code]
1938.

Solve : Jit debugging/ unhandled exception.?

Answer»

Hi Forum, If this is the wrong PLACE to ask this then apologies.
After failing to download a driver to my computer I acquired a dialog box when I turned my computer back on saying that several pathways could not be found and that an an UNHANDLED EXCEPTION had occurred.
The message indicates I need to invoke jit debugging but as a beginner and not a PROGRAMMER after four weeks I still can not find out how to enable jit debugger. I am on windows 7 using a compaq laptop.

Thanks.Have you tried system restore?Hi , Thanks for the reply. System restore is automatically initiated with the daily scan and returns with no action's to be preformed. However in the last week for an unknown reason the dialog box intimating the jit debugging NEEDED to be invoked vanished and all works as well as it ever did.

Thanks again.

1939.

Solve : Some Batch help?

Answer»

Ok I have some idea of batch files but I WOULD like to make it so if someone entered SOMETHING into a batch file, then it would display on a selected notepad document.
ex:
Code: [Select]:1
cls
@echo off
title Start
echo.
echo How are you?
echo Bad - Ok - Good
echo.
set 2=
set /p 2=
:2
cls
title %2%
@echo off
%2% <---- have this sent to some kind of word document and be saved.
pause
goto 1Quote from: LittleQuick on May 15, 2010, 10:00:45 AM

Here...just changed a bit to make it better

Code: [Select]@echo off
:1
cls
title Start
echo.
echo How are you?
echo Bad - Ok - Good
echo.
set 2=
set /p 2=
:2
cls
title %2%
echo %2% &GT;> "%userprofile%\Desktop\word_document.doc"
pause
goto 1If you WANT information about what the >> means, look here.
1940.

Solve : Multi-Line Input Box In QuickBASIC?

Answer»

I need a way to allow the user to MOVE up, down, left, and right in a text box. I am using QuickBASIC. The QuickBASIC program is an example. This isn't critical but would really be nice. Thanks You don't give very much detail. I am guessing that by "text box" you mean a console window, since you are running "QuickBASIC". Do you mean Microsoft QBASIC or the fuller QuickBASIC programming environment?

It sounds like you would be wanting to monitor the up down, left, right arrow keys in a loop, testing for the value of INKEY$ and using that to trigger appropriate actions such as increment/decrement row and column variables (checking for boundary values)

The arrow keys return 2 bytes. The first is zero, CHR$(0), and the second is ... (decimal values)


72 Up ASC("H")
80 Down ASC("P")
75 Left ASC("K")
77 Right ASC("M")


example showing how to get keypress data

Code: [SELECT]DO
kbd$ = INKEY$ 'Get Key
IF kbd$ &LT;> "" THEN
SELECT CASE kbd$ 'Select what button you hit
CASE CHR$(0) + "H"
REM *** Code to run if the user pressed UP ***
PRINT "Up"
CASE CHR$(0) + "P"
REM *** and so on ***
PRINT "Down"
CASE CHR$(0) + "K"
PRINT "Left"
CASE CHR$(0) + "M"
PRINT "Right"
CASE CHR$(13)
PRINT "You hit Enter"
CASE CHR$(27)
END
END SELECT
END IF
LOOP

I am running full QuickBASIC. (I can compile etc.) I want to let the user move the cursor all directions and type text.Quote from: Fleexy on May 15, 2010, 10:35:20 AM

I am running full QuickBASIC. (I can compile etc.) I want to let the user move the cursor all directions and type text.

Well, it should be obvious how to achieve this.
Quote from: Fleexy on May 15, 2010, 10:35:20 AM
I am running full QuickBASIC. (I can compile etc.) I want to let the user move the cursor all directions and type text.

Monitor keypresses in a loop, and if they are arrow keys, do those things that you need to do (update cursor position, check if you have reached the left, top, right, bottom edge, etc), and if they are not arrow keys, do whatever you need to do then (ALPHANUMERIC - print character at cursor position, update the text array where you might be storing input, move cursor position 1 to the right, check for reaching the edge) (esc or whatever - jump out of loop, save data, whatever)


Quote from: Salmon Trout on May 15, 2010, 01:37:24 PM
Monitor keypresses in a loop, and if they are arrow keys, do those things that you need to do (update cursor position, check if you have reached the left, top, right, bottom edge, etc), and if they are not arrow keys, do whatever you need to do then (alphanumeric - print character at cursor position, update the text array where you might be storing input, move cursor position 1 to the right, check for reaching the edge) (esc or whatever - jump out of loop, save data, whatever)

Thanks!
1941.

Solve : @echo off - '1 file(s) copied'?

Answer»

here I am again!!!

@echo off
copy f:\new\file.xls d:\old\file.xls
quit

is it possible not to display the '1 file(s) copied' after copying?


Quote from: night-rider on May 14, 2010, 08:33:33 PM

is it possible not to display the '1 file(s) copied' after copying?

To hide messages from copy, move del, etc, redirect the console output of the command to nul like this

copy f:\new\file.xls d:\old\file.xls>nul


o THANK you so much!!!

what if I want to copy faster more files? is there ANYTHING we can do to that?Get faster hard drives
Download Teracopy, which is free and has command LINE options
If you want to copy many files use wildcards
Study XCOPY


Quote from: Salmon Trout on May 15, 2010, 03:38:45 AM
Study XCOPY

And ROBOCOPY, I believe that is included in Vista and HIGHER.
1942.

Solve : bat file-x button?

Answer»

hello again!!!

is it possible to DISABLE the x-button at the upper-right of the screen in a batch file?

thanks!why?
i will use it in the system that I'm doing in foxpro-dos.

can you please help me sir.

because if somebody use the x-button to clos the system. errors OCCURED on the log-in modeQuote from: night-rider on May 13, 2010, 03:15:30 AM

hello again!!!

is it possible to disable the x-button at the upper-right of the screen in a batch file?

thanks!

Yes it's possible. Couldn't find anything in batch, or an object in VBScript that supported that property. FOUND VB code here and a download that works (tested it myself) here.

If you choose the download, read the text file on which parameter to use. The /1 switch seems to be the one you'll NEED.

You'll need to disable the x-button ahead of any code for your foxpro-dos logic. If you don't need the cmd window at all, it's possible to to eliminate it COMPLETELY by using a VBScript wrapper.

Good luck. i will try it. thank you!!!
1943.

Solve : Custom Cursor VB?

Answer»

i NEED to MAKE a PROGRAM which replaces the default windows CURSOR with a custom cursor i made(MY.Resources.Cursor1)

1944.

Solve : programming clarion, .exe trouble?

Answer»

Ill get to the point, How do I get a compiler to update an exe file.?
IVE TRIED getting rid of the old exe file, so it will create an entirely new one. It comes up with an error, "invalid or currupt dll". The only problem is that it doesnt specify what the dll is.
there has to be a way to fix it so that it will update the old one.
Any info will be helpful.

Thanks.I would SUSPECT the new exe file is never created due to the corrupt dll file. If you have the original disks, you could uninstall the product, then reinstall the software.

You MIGHT be able to contact them here.

Good LUCK.

1945.

Solve : Coordinates while drawing with OpenGL and GLUT?

Answer»

Hello everyone! Here I am again SCREAMING for some help!
I have a project in OpenGl (and GLUT), basically its an image editor. I have to have a pallet with 16 colors, a drawing area and some functions, like the Pixel Drawing (you click on the drawing area and it will draw a pixel which is the color of your choice)
There is also some other functions, but they don't really matter...
So, for me to know each area (the pallet area and the drawing area), I SAVED their coordinates in VARIABLES (as integers), and every time I click, I have a test to see if its on the drawing area or on the pallet (if its on the drawing area it will draw a pixel on the screen, if its on the pallet it will choose another color).
However, for some reason, my coordinates are completely out! The pixels are not drawn where I click, the color pallet is completely out and in a random spot, just as the drawing area.
I drew the graphic interface using the OpenGl vertex functions, and it came out just fine. I am sure I am testing with the right coordinates (I checked thousands of TIMES), and the mouse coordinates are also correct (I tested it by printing them on the screen)
Anyone know what this problem might be?
My boyfriend TOLD me that the GLUT coordinates are opposite to the OpenGL coordinates, but when I tried changing them, everything was still wrong.
I am thinking it has something to do with the GLUT coordinates, but I've tried everything, but so far nothing works! Does anyone know what it could be???
Thank you very much for any kind of help.

1946.

Solve : storing the array values into a database table?

Answer» HI, I’m trying to WRITE a program that stores the values in an array into a database table. The name of the database is Company.mdb and the table that I want to store values is called Employee.
Below is the procedure that is supposed to perform the task. The problem is it doesn’t store the array(strEmployeeRecord) values into the table. NOTHING happens. Can someone please help me with this problem? I’m using Visual Studio 2005. Thanks in advance.

Code: [Select]Private Sub StoreInTable()

Dim strSQL As String = "INSERT INTO Employee FROM ARRAY strEmployeeRecord "

'strPath PROVIDES the database type and path of the Route database
Dim strPath As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = D:\Company.mdb"

Dim odaRoute As New OleDb.OleDbDataAdapter(strSQL, strPath)
odaRoute.Dispose()
End Sub


I know working with VB.net AND Ms Access can be a *censored* hole, it makes me angry!!

1. I think you haven't got enough connection link...
2. You can't just stick an array into a database field like that you need to write some more code

If i think i know what you is trying to do then this might help:

Code: [Select]Try

Dim objRow As DataRow
Dim tableName As String = "highScore"
Dim objDataSet As New DataSet
dbConnection = New OleDb.OleDbConnection(ConnectionString)

dbAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM " & tableName & "", ConnectionString)
Dim NewCommand = New OleDb.OleDbCommandBuilder(dbAdapter)
dbAdapter.FillSchema(objDataSet, SchemaType.Source, tableName)
dbAdapter.Fill(objDataSet, tableName)
objRow = objDataSet.Tables(tableName).Rows.Add
Dim rowNum = objDataSet.Tables(tableName).Rows.Count
objRow = objDataSet.Tables(tableName).Rows.Find(rowNum)

''This is how you would write code that will store all data in array into each database row

For i = 0 to Array.Length - 1
objRow.Item(i) = Array(i)
Next

dbAdapter.Update(objDataSet, tableName)

Catch ex As Exception
MsgBox(ex.Message)
End TryThanx 4 the reply TChai I'd already given up on getting help on this post
Yes, it'z what i've been trying to do. I'll try your code out and see if it works...
1947.

Solve : encryption ...?

Answer» PL can sumone suggest me sum good BOOK to strt wid encryption ...y u wan book WEN so much on da WEB? http://www.google.co.nz/#hl=en&source=hp&q=data+encryption+&meta=&aq=f&aqi=g10&aql=&oq=&gs_rfai=&fp=81d982e0d4eb20cebut my prblm is i dnt hve net connection .... i really need a book ....Den u shd hve luk at dis: an dis:

wat buk u shud get depnds on ur levl of tech noledge.
1948.

Solve : bat file code??

Answer»

hi to everyone!!!

can you help me please...

what is the code in copying a single file where in it GOES like this->>>

I want to copy f:\scan.dbf to f:\scan.dll

is that possible? where in it will only copy 1 specific file and when it copied the file, the extension file will change into any TYPE?

thanks!

Wouldn't you SIMPLE use the dos copy command? As in:

copy f:\scan.dbf f:\scan.dll

What am I missing?Maybe he is asking if the COPY command does the tile type conversion.
He has a dbf type and it wants it MAKE it a dll type.

COPY does not really do that.

This video may help the OP understand this better.
http://www.kirix.com/aw/dbf/convert-dbf-files.html?gclid=CI3h_JeXvqECFQEEiQod-RPECQ
Nice introduction to working with data bases without programming.
thanks a lot ndurkes!!! you gave me an idea...

how about to delete a specific file? is that possible too?

I've done with deleting all the files in a folder but how about if a single file only to delete? any idea sir?Hm mm. I think in Vista you can do a search on the name of a specific file. Then if it finds that file, you just drag it to the recycle bin. copy file1.lol file1.ext
del file1.lol

Hmm?Quote from: Helpmeh on May 07, 2010, 07:16:27 AM

copy file1.lol file1.ext
del file1.lol

Hmm?

ren file1.lol file1.ext
1949.

Solve : i need compiler run help?

Answer»

hi i m akmal.i m interested in programming.i m beginner and i want to ask how can i run compiler.i failed to do that.thanksWe would like to know more about sure to experience and what your objective is. Do you wish to become a professional programmer? Or are you interested in some of their field where programming would be helpful to you?
At the present time systems level programming is done in some version of C or perhaps C++, and there are a number of good versions of these programs. They are written with a common text editor and then submitted to a compiler. If there are no errors but compiler will link the object code into a library and create an executable file.
However, perhaps your interest is not in systems level programming. The greatest need in programming at the present time is in applications that are custom made for a specific industry or business.
Some of these kind of applications can be written in a script language. A commonly used script language is called Python. This is easy to use and has the potential of being very harmful in specific applications.
If you write a very good program application in Python, it also can later become complied okay and has an efficiency that is near that of a system-level program.
Quote from: Geek-9pm on May 02, 2010, 10:09:43 PM

If you write a very good program application in Python, it also can later become complied okay and has an efficiency that is near that of a system-level program.

False. But compiled VS. interpreted is redundant anyway. a bubble sort in assembly will always be slower then a shell sort in any interpreted language. Besides, most Python interpreters implement Just-In-Time Compilation, like most javascript engines and the .NET CLR. .NET programs are compiled to IDL, which the CLR compiles to instructions specific to the machine being run on as you run it. a good number of script languages do this as well, but convert the actual script language in memory to machine-specific instructions. Still others use a sort of intermediate language that the execution engine can interpret and run faster then the pure script code.

You can convert a Python script/application to a actual executable but it is still dependent on a script interpreter- there is no python "compiler" that actually makes the program machine code. this is more an advantage then a disadvantage, since it encourages the creation of cross-platform applications.

Quote
The greatest need in programming at the present time is in applications that are custom made for a specific industry or business.
[Citation needed].So you make a broad sweeping statement and give no citations. Then you come back and want me to give a citation for something that is generally known to be true.
So I suppose then this means the rules you give out don't apply to yourself. Well, that's okay. Perhaps you're an absolute genius. In which case I could never convince you of anything anyway.
The real issue is not about which language you use. Python is a good learning language and it is actually used in real-world applications. I mean major real-world applications. Not writing a new video game, but coming up with a program that will help a business fix a real problem they have that needs a practical program that can be written in a short period of time and produce RELIABLE results. Speed of execution is not the issue. Speed of development and deployment and reliability are key issues.
Now as to citations, here is one from a reliable source, which I will not supply, since you know everything anyway.

Quote
Data shows that the combination of deep technical IT skills with PROJECT management or leadership experience, as well as looking at the intersection of IT and risk management for the business, are the areas in highest demand," says Jeff Schwartz, principal of human capital at Deloitte Consulting
what broad sweeping statement did I make?

Quote from: BC_Programmer on May 03, 2010, 07:12:39 PM
what broad sweeping statement did I make?
Quote
there is no python "compiler" that actually makes the program machine code.

They CALL it a compiler
http://docs.python.org/library/compiler.html

Pure machine code is possible, not very practical.
http://stackoverflow.com/questions/138521/is-it-feasible-to-compile-python-to-machine-code

The OP is having some trouble learning C and my intent to suggest to him to learn a language that is suitable for a beginner. Sometimes beginner's what to take on C because many claim it is the 'best' language.

Also, I wanted him to understand that more skills are needed that just to ability to code in a older language.

Quote
High-level languages need not be slower than low-level ones.
Quote from http://psyco.sourceforge.net/
Quote from: Geek-9pm on May 03, 2010, 09:02:01 PM
They call it a compiler
http://docs.python.org/library/compiler.html
Which compiles to "python bytecode"

Quote
Pure machine code is possible, not very practical.
Only, as discussed in the thread, by converting it to another language entirely.

Quote
The OP is having some trouble learning C and my intent to suggest to him to learn a language that is suitable for a beginner.
I didn't disagree with this.

Quote
Also, I wanted him to understand that more skills are needed that just to ability to code in a older language.
Quote
Quote
High-level languages need not be slower than low-level ones.
Quote from http://psyco.sourceforge.net/

Nor did I disagree with this- in fact, I argued the very same:

Quote
compiled vs. interpreted is redundant anyway. a bubble sort in assembly will always be slower then a shell sort in any interpreted language.
the higher level languages are interpreted perhaps not as their code form but maybe as bytecode (java, clr, python) - lower level ones are either assembled or compiled into machine code. Not necessarily a strict requirement, of course.

But as I said- it's more important what you implement in the language then the language choice itself- you could try to squeeze as much speed out of your assembly bubblesort routine, but it will still be many orders of magnitude slower then a quicksort or shellsort written in python, or another interpreted language.
I enjoyed your response. Hope the OP gets some value from all this.
Quote
But as I said- it's more important what you implement in the language then the language choice itself- you could try to squeeze as much speed out of your assembly bubblesort routine, but it will still be many orders of magnitude slower then a quicksort or shellsort written in python, or another interpreted language.
Right! Method is more important trivial gains in speed. Newer CPUs are now closer to RISC structure. The micro -code can be worked over and you can have a CPU that nearly does byte-code directly. But I am NOT aware of any major implementations of this. Not Yet.
(For more about JAVA RISC CPU.)
1950.

Solve : Java Help?

Answer»

I am getting the error
ImagePGM is the name of my class and CONSTRUCTOR. I just want to know what these errors mean in plain english.

Exception in thread "main" java.lang.NullPointerException
at java.io.File.(Unknown SOURCE)
at ImagePGM.(ImagePGM.java:29)
at ImagePGM.main(ImagePGM.java:197)

Thank youQuote

NullPointerException

You program did not start a valid pointer.
The pointer was empty. Quote from: Geek-9pm on May 02, 2010, 10:14:37 PM
You program did not start a valid pointer.
The pointer was empty.

A pointer was empty but it was never started.

the only "pointers" in java are the object reference pointers, which are object types. for example, you can declare a VARIABLE as a ArrayList but unless you set it to an instance of an ArrayList it is a null pointer, and any attempt to access the methods of the variable results in an NullPointerException.

of course since no actual code was provided it's impossible to determine the exact cause of the ISSUE. the only helpful information here is that it OCCURED in the main() routine.