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.

601.

Solve : JavaScript: Get info from other web pages?

Answer»

Quote

Can anyone register on Norek? You say Norek is a wholesaler but, as far as I can tell, anyone can register on their site. Could they then place an order?

If Norek is a wholesaler, I presume they cater primarily to online retailers, such as you. I would also think they have some INFORMATION on their site to assist clients in selling online. Is this not true?

It seems to me Norek should not even be shown on your site. You should have your own shopping CART, with product info you've setup. Norek is in the background. Your customers need not even know about Norek.

Apparently, you want to avoid that approach. You're trying to do this with as little effort as possible, right?
Yes, I'm trying to do this with as little effort as possible .

As for anyone signing up for Norek.....no. You must produce official documents proving you are a business.

In time I will CONSIDER setting up a shopping cart, there seems to be plenty of software out there to help me. However, at the moment I want to start small. If I was to start selling online and couldn't cope with the demand I'd ruin my reputation as a seller.talk to your web host and see what they offer software and script wise maybe they no of a script that you need.Quote
talk to your web host and see what they offer software and script wise maybe they no of a script that you need.
I'll try that if I don't have any luck with the forums.You cannot possibly hope to do this with javascript. And I think it's a much bigger job than you realise.

You would need a script on the server side, where the end user could not see what was going on, to grab the information from the wholesaler. Who knows - if you're really lucky, they may have an API you can use. Otherwise you're stuck with rather hard parsing problems. Javascript is not up to that job.

I always vote for PHP. It's not actually all that hard a move, if you're reasonably competent with javascript, and there are many amazing things you can do with PHP, including database access (which again might be something you'll be needing).

To put this all into context, my gut feeling is that you're looking at a couple of weeks of flat-out DEVELOPMENT for a job like this. I guess you'd be paying a professional anything up to $2,000 for the job. So you aren't going to get a complete solution, asking a few questions here I'm afraid. But we could give you some pointers.

Your FIRST pointer, if you really want to do this, is to learn PHP. There are a lot of PHP tutorials out there.

JMO.i dont know if this will work but maybe you can setup a shopping cart, so when someone orders something online and they finish putting their order information input the cart and press order that info will be sent to you and then you can order the items from your wholeseller and then add your extra price to the payment..(youll need to show the price with all of your stuff added in on your website before you do this) that way they dont know the what the wholesell price is only what your price is.


ie

the wholesell price is $10 but on your website it show $13 and when they add that to the price it goes into the shopping cart and then to your email and then you order it for them and shipp it to them..

just thought, dont know if that is even possible, but im just throwing ideas out there to try to help you
602.

Solve : need to re-structure tower to work again?

Answer»

my so called FRIEND took my tower apart and now i have
trouble getting it to turn on. even when it does i have no IDEA what IM doing.

can anyone help me please.parkplaytoy
Quote

my so called friend took my tower apart and now i have
trouble getting it to turn on. even when it does i have no idea what im doing.

perhaps you could provide a bit more INFO......
In one breath , you say it won't turn on ...and in the next , you say when it does.........

What was the problem that required the tower to be opened up ?

In the future try and post your querry in the correct place , I very much doubt the problem has anything to do with programming........it's more likely its .........EITHER hardware , software or spyware / viruses.

let us know

dl65
603.

Solve : crc32 in vb.net?

Answer»

Hello,

I would LIKE to KNOW how to calculate the crc32 for a FILE that was selected throught a opendialog. Then once I GET it dim it as a string.

Thanks


Al968

604.

Solve : VB6.0 to VB.net?

Answer»

Hello,

Me and my friend are working on a project with visual basic the only problem is that he has vb.60 and I have vb.net, I looked on google but I couldn't find any compiler and when I TREY to open it in my vb.net it says that I need MSINET.OCX 1.0.0 and that it wasn't FOUND. I reinstalled visual basic and looked manually in the CD but I did not find the file. Does anyone kow of a TOOL that does that ? Or should I download MSINET.OCX from somewhere ?

Thanks

Al968VB6 and VB.net are very different from each other (why do you think the new name?) and just look similar. For a start VB.net is based on the .net framework (suprise!) whereas VB6 is not. If it is a small or simple project, I would be tempted to just "CONVERT" it by hand. Copy and paste the code, CHANGING the appropriate parts to their VB.net counterpart.

605.

Solve : Analog to Digital?

Answer»

I have to write a program for a analog to digital converter and pwm, but I'm a BIT lost. I am also working with a pic16F690. I would appreciate any help.Do you have a manual for whichever library you're using? Are you effectively writing a driver for a specific device?What do you need exactly? not sure what you mean by "PWN". What language are you programming in? I can help you with BASIC but nothing else. Do you want an EXAMPLE or an idea what?

Are you programming a microcontroller? What is the "pic16F690" sounds like an IC. Sounds like Rob Pomeroy knows what you're TALKING about.

606.

Solve : winscript help?

Answer»

ok im trying to learn winscript its goin alright but i need some help with something

ok this batch code makes 100 COMMAND promts open is there a way to do this with a vbs

for /L %%v in (1,1,100) do start

thanks

another THING i cant find a good site to learn winscript on does anyone know where one is

thanks againWhy anyone would need to do this is beyond me. Try learning about the power and versatility of Windows Script before you attempt such childish games.

Windows Script Host

Code: [Select]
Set WshShell = CREATEOBJECT("WScript.Shell")
For i = 1 to 100
WshShell.Run "c:\windows\system32\Cmd.exe"
Next


Not withstanding all the "Dummy" books, script writing requires some logical thought. ok i need some help understanding this line im trying to put the file name now4.vbs in this but i dont know how to put it in the script looks like this

If InStr(objFile.FileName, "current") Then


where would i add the file name thanksLooking a one line of code is difficult at best and your question is very vague.

First you need to create a reference to the FileSystemObject.

Set fso = CreateObject("Scripting.FileSystemObject")

Next you need a reference to the file.

Set objFile = fso.GetFile("now4.vbs") ' You can put a path on the file name

Your IF statement is in error. There is no FileName property for the file object; use objFile.Name

Now it becomes problematic. If your are looking for the string current within the file label you're not going to find it (in this case) but if you're looking in the files contents you can either read the entire contents of the file with the ReadAll method or read the file line by line. The method for inserting a line in a sequential file is dependent on where the insertion point is... beginning of file, end of file or somewhere in the middle.

Good luck. yea i didnt post the rest of the script b/c i couldnt find it or havent wrote it so here it isopps forgot to add it
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colFileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='T:\Act'} Where " _
& "ResultClass = CIM_DataFile")

For Each objFile In colFileList
If InStr(objFile.FileName, "current") Then
objFile.Delete
End If
Next


[sigh]

Using WMI to delete a file is a BIT of overkill, but what the *censored*.

Code: [Select]
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colFileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='T:\Act'} Where " _
& "ResultClass = CIM_DataFile")

For Each objFile In colFileList
If InStr(objFile.FileName, "current") Then
objFile.Delete objFile.FileName & "." & objFile.Extension
End If
Next

It warms my heart to see someone taking advantage of the available Windows tools (especially since they are free!).

Good luck. ok where would i add the file name i want to delete in this like if i wanted to dlete now.vbs how would i put ti in i no im suppose to add it somewhere in here i no stupid question but i dont no

For Each objFile In colFileList
If InStr(objFile.FileName, "current") Then
objFile.Delete
ok where would i add the file name i want to delete in this like if i wanted to dlete now.vbs how would i put ti in i no im suppose to add it somewhere in here i no stupid question but i dont no

For Each objFile In colFileList
If InStr(objFile.FileName, "current") Then
objFile.Delete
ok i no this is a stupid question but i need help ok i dont know where to put in the file name of which i want it to dlete. i want to dlete now.vbs but i dont know where to add the name into the script i know it goes osmewhere in here but i dont know where

For Each objFile In colFileList
If InStr(objFile.FileName, "current") Then
objFile.DeleteYou don't need to specify a file name. The script as written is going out to the t:\act directory and creating a collection of all the file names.

The IF statement checks if the string "current" is present in the file name and deletes it using:

objFile.Delete objFile.FileName & "." & objFile.Extension

Be careful, the WMI service is both COMPLEX and powerful.



Note: Using the FileSystemObject would have been easier and more strightforward.

607.

Solve : auto reboot?

Answer»

Can someone give me the script to put in a batch FILE to REBOOT a Win2000 or Win 2000 server? Thanks.Add Shutdown -r -t 15 to your batch file. The t switch is a delay time in seconds allowing USERS to close programs. Change accordingly.

Hope this helps. When I type this in I get the following ERROR: 'Shutdown' is not a recognized internal or external command.

Shutdown does not appear to be a valid command in Win2000.Learn something everyday. Oh well. Try this link for a free utility. Hopefully it will run at the command line.

Shutdown

This script will shutdown a Win2000 computer:

Code: [Select]
strComputer = "."
Set objWMIService = GetObject_
("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & _
strComputer & "\root\cimv2")

Set colOperating Systems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Win32Shutdown(1)
Next


Excuse the late reply...just had a brainstorm

608.

Solve : Batch file help???

Answer»

Hi!

here is my problem:

I try to create a BATCH file to isolate each caracter from a variable.. (from the curent date)

Here is an exemple for windows 2000/XP:

@ECHO off
Set char0=%date:~0,1%
Set char1=%date:~1,1%
Set char2=%date:~2,1%
Set char3=%date:~3,1%
Set char4=%date:~4,1%
ETc..

This batch file work great in windows XP and 2000 but i wanna do the same THING for windows 98,

Does anybody know how to do that?No not really. I'm not sure that %date% is even valid in Win98.

You can isolate the mm, dd, yyyy easy enough but there are no delimiters between the individual characters of mm, dd, yyyy.

Code: [Select]
for /f "tokens=2-4 delims=^/ " %%i in ('date /t') do (
set mm=%%i
set dd=%%j
set yy=%%k
)


Not really what you want, but DOS batch is functionally limited. Thanks for your answer,

I have another question, can you do that for the "time" command too?

can i isolate the hours, minuts, seconds, from the current time?I have finally try your script on a win98 computer and its not working... (but it work under windows XP)

Windows CANT reconize the "/T" after the "date"

So, Windows 98 return "syntax error" when he execute the first line of your script.

Any other ideas?


Always have ideas. Whether the're any good is another story. I don't remember Win98 being so primitive.

Code: [Select]
@echo off
for /f "tokens=6-8 delims=^/ " %%a in ('echo. ^| date') do (
set mm=%%a
set dd=%%b
set yy=%%c
)
for /f "tokens=5-8 delims=:. " %%a in ('echo. ^| time') do (
set hh=%%a
set mn=%%b
set ss=%%c
set ms=%%d
)


Note the hh variable (hours) is MILITARY time and the ms variable is 1/100's of a minute. Plan accordingly.

Hope this helps.

609.

Solve : Forum Software - Programming??

Answer»

Hi there,

I'm wondering if forums (like this one) are an actual PROGRAM or a mix of HTML and something ELSE?

I would like one for my webpage. I have learnt html and am up to JavaScript.

Thanks
MichelleYou can see the codings for this page or any other displayed page by clicking View>Page Source (Firefox) or View>Source (I.E.)

610.

Solve : Problem in Java?

Answer»

Hi friend, how are you? I am at basic level in Java. Today, I have just started to LEARN Creating Windows.
I am using JCreater to create my Java Applications and it works very fine. I have JDK1.4.
Today I wrote the following simple program.

import javax.swing.*;
public class window
{
static JFrame AWINDOW=new JFrame("First Window");
public static void main(String args[])
{
int a=400;
int b=150;
aWindow.setBounds(50,100,a,b);
aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
aWindow.setVisible(true);

}

}

Now when I execute it, it display the window for just a moment and then MS DOS prompt comes with the text "Press any key to continue..." and that window disappears. What the prblem is?
I shall be very thankfull to you?
Okay take care of you and OTHERS and be happy.
Bye...
DeWWhat happens when you "press any key to continue..."?here try this...

Code: [SELECT]import javax.swing.*;

public class MyWindow {

static JFrame aWindow = new JFrame("First Window");

public static void main(String args[]) {
int a=400;
int b=150;
aWindow.setBounds(50,100,a,b);
aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
aWindow.setVisible(true);
}
}

you named your class window which is a keyword in java

611.

Solve : java.exe is generating errors?

Answer»

Hi,

When im installing java based softwares like websphere or rational rose ,during installation START up im getting a alert window with message " java.exe has generated errors and is getting closed down , run the program again " , after this my installation is getting stopped and im unable to install .....also i get message like " suitable JVM not found "......

Can anyone tell me why this is happening and how can i AVOID this to install softwares successfully

Thanks,
YasWhen [emailprotected] is executed, it performs the following actions:


Creates the following registry keys, which mark the computer as infected:

HKEY_LOCAL_MACHINE\Software\Microsoft\Daemon
HKEY_CURRENT_USER\Software\Microsoft\Daemon


Copies itself as %Windir%\java.exe.

Note: %Windir% is a variable. The worm locates the Windows installation folder (by DEFAULT, this is C:\Windows or C:\Winnt) and copies itself to that location.


Drops and executes %Windir%\services.exe, which is detected as Backdoor.Zincite.A. When executed, this file opens TCP port 1034 and listens for remote connections. The backdoor will also probe random IP addresses on port 1034 looking for other infected hosts.


Adds the values:

"Services" = "%Windir%\services.exe"
"JavaVM" = "%Windir%\java.exe"

to the registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

so that the worm and backdoor load when Windows starts.

............and on it goes...

Go here & do a quick couple of scans just to be sure.
Free online VIRUS scan
http://www.pandasoftware.com/products/activescan.htm
Free online spyware scan
http://www.pandasoftware.com/products/spyxposer/com/spyxposer_principal.htm

612.

Solve : Making a web page with notepad?

Answer»

Does anyone lnow how to APPLY a back ground picture, rather than a color, to a web page that i made with notepad?Yeah, add background="picturename.jpg" to your body TAG.

Alternatively, if you'd rather use CSS, add style="background-image: URL(picturename.jpg)" to your body tag. This method also works on other tags like p, h1, h2, div, etc...What is your isp provider?.......most have the tools to build a website.

613.

Solve : Collecting Performace Counter using logman.exe?

Answer»

I want to get PERFORMANCE counters for the SELECTED process using logman.exe with a batch programYou can get some info at Logman and some more info by typing logman /? at a COMMAND prompt. Also this may be HELPFUL Log Parser

Hope this HELPS.

614.

Solve : Find string in Visual Baic?

Answer»

Hello,

I WOULD like to know if anybody could tell me how to look for the following string in all, and I mean all the files in my computer. All that in Visual Basic.net of course.

String = 1591019361894212833234215551807

Thank You

AlmnCycle through each file and folder, opening them as a TEXT file. Scan through them looking for that string.


Odd question...Any hints on the code ??
The thing is I saved a document in many many places with different name on my computer, also the size is different because I made revisions afterwards. However all the files cointain this string: 1591019361894212833234215551807

Thank You

Al968Can't Google desktop search do that for you?well the point is that I would like a Visual Basic application that does that.

Al968get a list on all of the files in your computer us vb and then oppen eachfile in vb and have it look and see if a line contains what you are looking forDo you want to find a file or do you want to make a Visual Basic program? DECIDE which one is more important.

You can just use the ordinary Windows search to find certain text within a file.well actualy MAYBE your right I just want to do the Program

Al968I am just learning VB programming, so this is actually beyond my scope, but, I asked my instructor and she posted the following reply. I hope this puts you in the right direction.

Imports System.IO
Imports System

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents lbl As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Private Sub
InitializeComponent()
Me.lbl = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Label1 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'lbl
'
Me.lbl.Location = New System.Drawing.Point(96, 48)
Me.lbl.Name = "lbl"
Me.lbl.TabIndex = 0
Me.lbl.Text = "Search Word"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(224, 48)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(176, 136)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 2
Me.Button1.Text = "Search"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(144, 88)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(144, 23)
Me.Label1.TabIndex = 3
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(416, 266)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.lbl)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim fileName As String = TextBox1.Text


Dim RDir As New DirectoryInfo("C:\")


Dim dir As DirectoryInfo
Dim fi As FileInfo
''first we start with the subdirectories under the C drive
For Each dir In RDir.GetDirectories
''the () tell us its a multidimensional string
Dim strFile() As String = Directory.GetFiles("C:\" &
dir.Name)
'Now we search through all the files in that directory
For Each fileName In strFile

Label1.Text = System.IO.Path.GetFileName(fileName)

Next


Next


End Sub
End Class


Hope this helps,
Photowrench

Ok , I know how to look for for the string in the file but I don't know how to list all the files on my computer.

Any help appreciated

Al968At the simpliest you could just dump a list of file paths in a text file."At the simpliest you could just dump a list of file paths in a text file. "
Does that list everyfile in the computer ?
How do I do that ?

Thanks

Al968It's your program not mine! When you find a file that contains this string, the file path will presumably be contained within a variable. Just write this variable onto the end of a text document. I suggest you READ some tutorials on file management if you cannot do this.

615.

Solve : How to apply SQL??

Answer»

Hi all,
I am learning SQL and LOOK for an application area to APPLY my queries. I know they can be used in SQL Server or else but I nedd more SIMPLE and easy way to see what I have learned and do they work?
Something to create tables and then use queries.
Thanks.MS Access would seem a good choice for practicing with SQL. SQL Server uses T-SQL, and if that is what you are learning, it won't help alot. I am just beginning to learn T-SQL myself and the differences from SQL used in Access and VBA is significant.

BenThanks.
So you say I may find professional environment In access to practice SQL.
Is there a big difference Between Trans.SQL and SQL?
Because I know SQL serv 2000 a little and think to go further. May be it's better to go along with Tr-SQL?
If you already know T-SQL, using more standard SQL should be a breeze. I get confused with T- more because of all of the @ signs and varchar's ETC. More standard SQL such as you would use in Access (SELECT * FROM tblMain) seems alot cleaner to me.

If you have MS Access, you can use the standard Northwind database and build queries in the SQL view of the QBE using straight SQL. I can't think of a better way to practice. Also, it is just test data so you really can't mess anything up.

Good Luck!Thanks a lot.
I ll use MS Access

616.

Solve : VB6 - select item from grid?

Answer»

Hi

How do I select a single item from a grid using VB?
Currently the grid is populated from an Oracle DB and I am able to select an ENTIRE ROW. (but not just a single item)

THANKS in advance
D5

617.

Solve : Help with C/Unix programming?

Answer»

I need some help with a c program that I am writing to create my own unix SHELL (for a class assignment).

At one point in the program, I need to print out some process statistics, but only for the pid of my shell process. If I just use the system("ps -o pid,ppid,pcpu,pmem,etime,user,command"); command, I get the statistics for all processes. I've read every man page on ps that I can find. I know that -p and --pid are supposed to be flags that I can use to only print stats for that pid.

My PID variable is declared at the beginning of my main function as pid_t PID; And the line of code above my system() line is: PID = getpid(); In the system(), I have tried "ps -p PID", "ps --pid PID", I've tried with the variable name in quotes, with a $ in front, I've tried converting it to an integer first before the system() line, I've even tried changing the variable name from all lower case to all caps. I've tried everything I can think of, but no luck.

Does anyone know how do get the ps process to WORK with my PID variable? Any help would be very very very MUCH appreciated! This program is due Tuesday and I've been working on this particular problem for days. I'm ready to pull all my hair out!

Thank you very much.

Sarah
homework?
anyway, post your code if you need ppl here to help.
Well, the only code relevent to my particular question is as follows:

pid_t PID;
PID = getpid();
system("ps -o pid,ppid,pcpu,pmem,etime,user,command");

The 3rd line there prints out process statistics for all process running. I need it to only print for the process with id PID. So I need to find a way to use the ps command with the variable PID. I have tried -p and --pid with no luck, but I thought maybe there was some special syntax for it that I'm not familiar with.

The current output is:
PID PPID %CPU %MEM ELAPSED USER COMMAND
8431 8430 0.0 0.4 04:06 xx -csh
8479 8431 0.0 0.0 00:01 xx ./xxshell
8480 8479 0.0 0.1 00:00 xx ps -o pid,ppid,pcpu,pmem,etime,user,c

I need to only print the line with my shell's PID (in this case, 8479).

Thanks for the help!

SarahQuote

...
pid_t PID;
PID = getpid();
system("ps -o pid,ppid,pcpu,pmem,etime,user,command");
....
I need to only print the line with my shell's PID (in this case, 8479).
.....

any reasons why you need to do this in C? well. if you are really into C, i don't think
you need to do a system() .... there are functions in C , like getppid() , getpgrp() etc
(do a "man getpid" ).... sorry don't do Unix programming much, so no comments on how to get memory usage and such...
another way is to learn how they do it by looking at the ps source code.

If you don't mind doing in shell, the $$ variable SHOWS the process id of the current process

eg test script
Code: [Select]#!/bin/sh
while [ 1 = 1 ]
do
echo $$
sleep 10
ps ..... |grep $$ ###print the shell pid
done








Unfortunately, the assignment says we have to use C (or C++) to do this program. I tried using grep, but I didn't quite get the desired results.

system("ps -o pid,ppid,pcpu,pmem,etime,user,command | grep $$");

gives the output:

9657 9654 0.0 0.1 00:00 xx sh -c ps -o pid,ppid,pcpu,pmem,etime,user,command | grep $$
9658 9657 0.0 0.1 00:00 xx ps -o pid,ppid,pcpu,pmem,etime,user,command
9659 9657 0.0 0.1 00:00 xx grep 9657

So I've lost the little header colums and I'm still getting stuff I don't want to show (child processes that have my process as the ppid).

I'll be emailing the teacher tonight to see if he can (or is able to without giving away the answer) help me with this.

Thank you again for your help with this. It is much appreciated.

Sarah
618.

Solve : newest of newbies?

Answer»

I'm very new to the world of programming, about 48 HOURS new. I've decided I'm going to teach myself to program using JAVA...but i'm having trouble starting up...i've d/l java developers kit, and set my computer up to use the command prompt...but after that i'm stuck, command prompt keeps telling me that the files selected aren't executable files or batch files. I ran a test batch to see if it was correct and everything worked...so now what do i do. any info would help, also i can't seem to get class files to run either, i have the java VM so whats the problem?Quote

I'm very new to the world of programming, about 48 hours new. I've decided I'm going to teach myself to program using JAVA...but i'm having trouble starting up...i've d/l java developers kit, and set my computer up to use the command prompt...but after that i'm stuck, command prompt keeps telling me that the files selected aren't executable files or batch files. I ran a test batch to see if it was correct and everything worked...so now what do i do. any info would help, also i can't seem to get class files to run either, i have the java VM so whats the problem?
you started JAva without going through the manuals and beginner tutorials available on Sun's website??
You need to compile Class Files, before you can run them.

I suggest you down load an IDE , Like JCreator, or Eclipse

And then find a java Book , or tutorial Web site

Google Has Many useswell, i've got a COMPILER now, and i've read a few online tutorials...i think that should get me GOIN in the right direction...thanks a bunch.

i'll probably be posting some other minor TECHNICAL difficulties soon tho B)
619.

Solve : VBSCRIPT email - error 0x800ccc15?

Answer»

Seeking help...

I tried to send email with attachment using CDO component. Prevoiusly I encounter this error:-
The "SendUsing" configuration value is invalid

After add new few code, I had another error:-
c:\script\send_email02.vbs(61, 1) (null): The message could not be SENT to the SMTP server. The transport error code was 0x800ccc15. The server response was not available

I`m using WinXP SP2. This script was executed from command prompt. REALLY seek your help guys...
This is my code

'--------------------------------------------------------------
Dim fso, fsoFold, fsoFile

Set fso = CreateObject("Scripting.FileSystemObject")
Set fsoFold = fso.getfolder("C:\temp\")

For Each fsoFile In fsoFold.Files
sName = fsoFold + "\" & fsoFile.Name
Next


Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "TEST file"
objMessage.Sender = "[emailprotected]"
objMessage.To = "[emailprotected]"
objMessage.From = "[emailprotected]"
objMessage.TextBody = "Test file"
'objMessage.AddAttachment sName

'--------------------------------------------------------------------------------
'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "10.234.9.12"

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mys\ash030"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "test123"

'Server PORT (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==
'--------------------------------------------------------------------------------

objMessage.Send()

Set objMessage = Nothing

620.

Solve : whta is the Logic behind One click Installation??

Answer»

I have to work on the project in which I have to implement one click INSTALLATION.

I don’t have any idea about it.



If you have knowledge please guide me.

What is the technique behind it?
http://www.google.com/search?hl=en&q=one+click+installation

www.HomeworkHope.com

www.howstuffworks.comHello Genius,

Thank you for your quick reply. I did search on Google but it is giving the PRODUCTS which we can use for one click installation. I am looking for the programming part / logic to follow that technology in my project instead of using any product.

Please guide me..

Thanks.
"Genius"? Oops, I thought "Genius" is the nick name. GX1_Man, please don’t mind.It seems like your question is programming-related, post it in the programming section if you want to know more about logic and SCRIPTING..Allow me to move it....The idea of a one click installer is that the user will not have to give the installer any input, all you need do is start it and click next. ant the installer should know what it has to do.

Is there more to this than you wanting to understand the Concept?We have a product, to launch that we have to install 3-4 SOFTWARE manually. I am planning to implement a feature by which all these software should be install on one click.

How can it be programmed? Can you please guide me with book or documentation?

Frankly speaking I am a Java developer and I do not have any knowledge about the installer and this concept.

Thanks for your time.
MAYBE you could use a MSI installer. This does it instantly for you. You can download a software somewhere on Internet (like google type msi maker or something like this) and use it to configure your MSI. I did some but i formatted my computer, so... i can't give it to you sorry.http://www.microsoft.com/downloads/details.aspx?familyid=CEBBACD8-C094-4255-B702-DE3BB768148F&displaylang=en

621.

Solve : windows me dos-mode?

Answer»

how might i boot it in dos mode when it is not on the boot menu accesed by pressing the F8 keyWindows ME does not have a MS-DOS boot mode natively. THEREFORE, you can't do it.You could use a dos boot floppy.Or a COMMAND prompt if you don't NEED REAL DOS. BOOTDISK ARCHIVE DOSCOMMANDS Or upgrade to Windows 98SE

(Please don't TRY to tell me that ME was the upgrade - NOT!)

You have to use a bootdisk with ME. I had ME on this computer before installing XP.

622.

Solve : Measuring Degrees (Visual Basic)?

Answer»

I'm trying to find out how I can measure the angle, in degrees, of a line in VISUAL Basic 6.0. Im trying ot find out how to move an object in any direction BASED on the AMOUNT of degrees you specify. Just a personal project of mine and I don't want any help on that aspect, but I can't SEEM to find out how to measure the angle of a line. Anybody GOT any ideas

623.

Solve : Parser in C# using regex?

Answer»

I would LIKE to do a parser in c# that return the command ET the params in a string[]. The initial command comes from a TEXTBOX it goes like this :

You type something like this :
*****
Add(param1,param2)
*****
and it is supposed to return something like this :
*****
"Add","param1","param2"
*****
so i can use it after, but i have a

System.IndexOutOfRangeException

What's wrong with that code???

Code: [Select] private void Parse()
{
string[] Commande=ObtenirCode(this.Tb1.Lines[this.Tb1.Lines.Length-1]);
//Using string[] here to do the command "effect"
}
private string[] ObtenirCode(string LigneCode)
{
System.Text.RegularExpressions.Regex Parse=new Regex(@"^((?:[a-z0-9])*)\s*(?:\(|\s+)\s*((?:[a-z0-9])*)\s*(?:(?:,|\s+)\s*([a-z0-9]*)\s*)*\s*(?:\)|\);)?$",RegexOptions.IgnoreCase);
Match Line=Parse.Match(LigneCode);
if(!(Line.Groups.Count>255) && !(Line.Groups.Count<1))
{
byte Dmn=2;
if(Line.Groups.Count==3)
{
Dmn+=(byte)Line.Groups[3].Captures.Count;
}
string[] RESULTAT=new String[Dmn];
Resultat[0]=Line.Groups[1].ToString();
Resultat[1]=Line.Groups[2].ToString();
CaptureCollection CC=Line.Groups[3].Captures;
for(byte j=0;j<CC.Count;j++)
{
Resultat[j+2]=CC[j].ToString(); //It SAYS the mistake is around here//
}
return Resultat;
}
else
{
this.Tb1.Text="Error!, The number or parameters should be between 1 & 255.";
string[] Resultat={"Error","Error"};
return Resultat;
}
}

I know the mistake is probably a stupid thing, but i'm anewbie in c# and i wanna know what to do. Thank you.

624.

Solve : Decompressor?

Answer»

Hello,

I am looking for decompressors\decompilers for any EXE, so basicly just about any unpacker. I need a large variety because I have a lot of exe's whish I would like to decode.

Thanks

AlmnWhat sort of reverse engineering might you be up to ? ?

google had TONS of hits for decompilers...Really ??
I checked and it doesn't seems like any of them are command line.

"What sort of reverse engineering might you be up to ? ? "
I am just trying to see the code for programs I made my self so I don't think thats against any rules because I give myself full rights

AlmnQuote

I am just trying to see the code for programs I made my self
Did you lose the source code or something?yeah

Thats why I would need them.
Is there like a GENERIC decompressor that decompresses for files that were compressed using deferent compressors, kind of a bundle of COMPRESSOR( all-in-one)

Thanks

Almn
625.

Solve : COPY FILE TO F:?

Answer»

OK I am trying to make a BAT file to Simple Copy A FIle to a REMOVABLE SD Card (F:\)

I CANT get it to work can someone lend me a Hand?
Thanks, Intel
Post your .bat fileok here it is

Code: [Select]@ECHO OFF
PATH=C:\DOCUMENTS and Settings\Neo\Desktop\ToGo\
COPY C:\Documents and Settings\Neo\Desktop\ToGo\Hope I ge tthis.txt F:\Pictures\101HPODoes DOS even recognise your SD card?#1: lose the PATH statement; it's useless in this context
#2 Fed makes a good POINT; is your F: drive recognized?
#3 Use quotes around paths/files with embedded spaces..not all OSes are forgiving

Check the dos path as long file name may be not supported.

eg. \docum~1

626.

Solve : Images in Rar format?

Answer»

i've done this befor, running a winrar file through deamon tools as an IMAGE usualy works but i just downloaded a 3 gig compressed image, i decompressed it and within that i foud another zipped file that WONT decompres any further. "no archives found" but i know its there its 3.66 gig so i know its not empty, is there some way i crack it open and have a LOOK see inside?Does your question even remotely RELATES to programming? Don't think so. Learn to post in the PROPER section next time.

627.

Solve : [help]formula editing online?

Answer»

i am creating a website for our COMPULSORY statistics course,the website should provide FORMULA editing online.just like the following site:
http://www.physicsforums.com/showthread.php?t=132582

now i am considering using latex to reach the goal
my development condition is asp.net and the main web language is C#.

i have many books on asp.net and C#,but no books tell how to programme to provide the members of the forum the service of editing formulas online.
i have the main CGI source code, but don`t know how to embed it in the html pages.
it gets the LATEX instrctions from the clients and when a user opens a web page including such instrctions, it should replace the instructions with the corresponding formulas in the form of graphics (latex can do this,just like MathType) which is eventually returned to the client's.You might get a better response on a forum dedicated to programing, like

http://www.codeguru.com/forum

http://www.gamedev.net/community/forums
If you're thinking LaTeX (open source) then you should probably be thinking PHP (open source) rather than ASP (proprietary) - primarily because people within the open source community are more likely to have attempted something like this already. For a C# programmer, learning PHP would not pose a particular challenge.

I refer you to two useful pages: >this one&LT; and >this one< to get you started.Neil,thank you. i will have a try there if i have some other problems about this topic.i am always finding some forums where more professionals appear there and talk and discuss.Are these two forums you recommended that type??

Rob POMEROY,thanks so much!! your segguestion is so helpful.
you are right ,maybe i should think of PHP rather than asp.net and C#.but coz i know nothing about PHP , i have to spend much time picking up this language.but time is so limited ,so it seems impossible.
though that, i will have a try.
thank you,Rob.
Good luck. I rather suspect that once you've got to grips with PHP, you'll HATE using ASP.

628.

Solve : syntax error in php?

Answer»

Dear sirs,

I got this message while I was trying to insert a php script:

Parse error: syntax error, unexpected T_IF in /hsphere/local/home/clubscan/articaviaggi.com/processForm.php on line 8

The line 8 is (I think):

if ($COGNOME == "") { $errore .= "

  • Devi inserire il cognome
  • "; }

    and all the block is:

    $errore = ""
    if ($nome == "") { $errore .= "
  • Devi inserire il nome
  • "; }
    if ($cognome == "") { $errore .= "
  • Devi inserire il cognome
  • "; }
    if ($telfisso == "") { $errore .= "
  • Devi inserire il telefono fisso
  • "; }
    if ($email == "") { $errore .= "
  • Devi inserire l'indirizzo email
  • "; }

    //Se la VARIABILE errore NON è vuota (ovvero almeno uno dei campi obbligatori
    // è stato lasciato vuoto) visualizzo un messaggio di errore
    if $errore <> "" {
    //Creo una lista puntata CON class ERRORS dove con il css posso
    //dare un carattere rosso e la inserisco in una variabile
    $stampaErrori = '
      ';
      $stampaErrori .= $errore;
      $stampaErrori .= "
    ";

    (all the comments are in italian)
    Many thanks if you can help me to find the error.

    Regards

    Benedetto
    No problem. You have a semi colon missing. The line that says:

    $errore = ""

    should say:

    $errore = "";Hi Robpomeroy and thank you very much for your help!

    I did as you said but now i meet a new problem:

    Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /hsphere/local/home/clubscan/articaviaggi.com/processForm.php on line 16

    I am "new" in php programming and I hope you can help me aven now.

    This is the second part of the file, from line 8:

    $errore = "";
    if ($nome == "") { $errore .= "

  • Devi inserire il nome
  • "; }
    if ($cognome == "") { $errore .= "
  • Devi inserire il cognome
  • "; }
    if ($telfisso == "") { $errore .= "
  • Devi inserire il telefono fisso
  • "; }
    if ($email == "") { $errore .= "
  • Devi inserire l'indirizzo email
  • "; }


    //Se la variabile errore non è vuota (ovvero almeno uno dei campi obbligatori
    // è stato lasciato vuoto) visualizzo un messaggio di errore
    if $errore <> "" {
    //Creo una lista puntata con class errors dove con il css posso
    //dare un carattere rosso e la inserisco in una variabile
    $stampaErrori = '
      ';
      $stampaErrori .= $errore;
      $stampaErrori .= "
    ";

    //Stampo un riquadro con dentro la lista errori
    echo '';
    echo 'Attenzione!'
    echo $stampaErrori;
    echo '

    Torna indietro[/url]

    ';
    echo '

    ';
    } else {

    Best regards

    Benedetto
    You're welcome. Now; this line:

    if $errore <> "" {

    should read

    if ($errore <> "") {Now, it was so easy !
    Thanks a lot and have a nice day, Rob'
    Benedetto
    I only know because I've made the same errors myself many times.

    629.

    Solve : C-Langauage Experts?

    Answer»

    Hi Everybody . I am Dinesh Verma from india and Doing MCA from An INDIAN University.
    I am Launching new Topic which is based on Language -C, and I HOPE it is very helpfull to everyone. So SHARE everything abt this topic and HELP each other.
    I am Always With everyone.
    Thanks for READING this ....And Welcomes to u ALWAYS .

    630.

    Solve : C++ graphics?

    Answer»

    How do I DRAW a pixel on the SCREEN in C++ USING only basic commands, not pre-made GRAPHICS PACKAGES?What about "."?

    631.

    Solve : I need help with an EXCEL formula?

    Answer»

    Hey, I KNOW there is somebody out there who can help me with the solution to a problem I have with an Excel Spreadsheet. Dilemma: Columns C2:C46 through M2:M46 must SUBTRACT from Column B2:B46 and reflect the answer in Column N2:N46.

    This must be done row by row, as Column A is the name of each catagory, Coulmn B is budget amount. C-M are subtractions and N is totals.

    Please help me with the formula. I would greatly appreciate it. Thank you.Lisa ~ It would be EASIER to create a formula if the spread sheet were available, but here is a link to a web site that is a freebie. You can SUBSCRIBE and receive tons of information about more than Excel. GIVE it a try...
    The Office Letter Team [emailprotected]I was wondering if it would be possible to find out the formula to change a percent into a letter (E.G. A, B, C) ?Quote

    I was wondering if it would be possible to find out the formula to change a percent into a letter (E.G. A, B, C) ?



    e=mc2
    632.

    Solve : Installing a php file on the server?

    Answer»

    [size=14]Hi all,

    I am LOOKING for an instruction on how to install (or upload ) a php FILE onto my server.

    A certain tutorial told that:

    your host will need to have PHP on their server.

    Another tutorial told that:

    Often when setting up PHP scripts on web hosting ACCOUNTS you will see the requirement to set some files and directories to chmod 777.

    Now I am new to all this.

    Can you give a clear instruction (or, a link where I canfind this) ??

    Thx.

    [/size]Quote

    your host will need to have PHP on their server.
    This REFERS to the PHP script engine. You will not be able to install it on your host's server; they either provide it as a service or they don't. Ask 'em.
    Another tutorial told that:

    Quote
    Often when setting up PHP scripts on web hosting accounts you will see the requirement to set some files and directories to chmod 777.
    That is a Unix/Linux idea and relates to file permissions. 777 means that the owner of the file, the group owner, and everyone else, all have read, write and execute/change directory rights to the file or folder. There aren't many CASES where you'd need to set such permissions, and it leaves a fairly glaring security hole since if anyone can change a script, they can run any (dangerous) program on your server...

    Changing file/folder permissions is either done in your host's control panel, or through your FTP program, so it's impossible to give generic instructions.Thank You.
    633.

    Solve : Changing user access on ntfs folder?

    Answer» IM using vb6. i already have program creating multiple user including thier home folder
    the problem i have is when i CHECK the security of the SAID folder it is accessible to everyone. it should be the owner of the folder only. the same way when i create user manually. does ANYBODY have
    a script or code for this particular problem.. thanks and more power.
    634.

    Solve : Can I do this in a BAT file??

    Answer»

    I'm running windows 2003 Server (Enterprise)...I'm not a software guy...I'm more of a Hardware guy. Anyway, basically what I'm wanting to do is run a BAT (or something) to search my Event Viewer Logs for new content "within the last 7 days." I don't want to have to put a date in. When it finds the new content, I want to have the new content exported to a TXT file on a mapped network drive. When this is created, I'll be putting it in the TASK Scheduler to run on a scheduled basis.

    Any ideas??

    thanks,

    jI'm not a batch file guru I'm afraid, but I do KNOW that you'll find this tool very helpful: >Microsoft's Log Parser< and >The Unofficial Log Parser Support Site<.This seems like it cold be a very good tool! I'm trying to figure out the syntax though... below is basically one of the variations I've been trying, but it hasn't seemed to work yet.....can you take a look at it and tell me your thoughts?

    C:\Program Files\Log Parser 2.2>logparser "select* FROM System INTO c:\temp\test
    1.csv Where TimeGenerated >= TO_LOCALTIME ( SUB( SYSTEM_TIMESTAMP(), TIMESTAMP(
    '7', 'd' ) ) )The SQL statement needs to be in inverted commas "...". And that > before logparser, would NEED to be a \, of course. The time/date functions leave a little to be desired. Experimentation is necessary! Use the GUI output initially (see the examples in the online help), and tweak one thing at a time - that's my best advice.

    I currently use this tool to assist in an automated dump of the event logs of a fleet of servers into a MySQL database for further analysis (for a local ISP).

    635.

    Solve : VB Help Please?

    Answer»

    right peeps bit of a conundrum this one

    i am looking for some CODE that COULD tell me where a file has been opened from, ie if i have 2 drives, 1 LOCAL and 1 networked and a file that is stored on both and has the same name, i want to know which one was opened.

    must admitt if someone knows the code for this then we have unkown genius's in our mist

    happy huntingRight click a file and click properties. It shows you the date and time.do you know the VB code for this though and i don't think it tells you what location the file was opened from.....no worries i've found the answer, if anyone was interested you would use the following code

    Function MyFullName() As String
    MyFullName = ThisWorkbook.FullName
    MsgBox (MyFullName)
    End Function

    636.

    Solve : FRont Page 2000 hyperlinks?

    Answer»

    I am using front page 2000 and I am having problems with hyperlinks.

    I have a file called "PLAYER Index", it consists or the letters "A" - "Z"

    I also have 26 files Names "A-Players", "B-Players", "C-Players" etc.

    I want to establish a hyperlink in the player index to A-Players, B-Players and so on. I have been able to do this and when I check the links they work FINE, however after inserting the links I try to SAVE the file I get an error message that SAYS the file is read only and can not to saved.

    What can I do?

    Is there a way to change the read only file attribute to read/wright?

    I would appreciate any help I can get.

    Thank you

    Ed


    Ed..... So you have a page called .... Player Index that contains 26 names .
    I am assuming this page is PART of a website ....... ( or you want it to be )
    When you created the new page , what did you call it ? and what did you create it with ?

    dl65

    637.

    Solve : about adding elements for an array?

    Answer»

    Is it possible to add all the elements in a HashSet into an ARRAY? Below is a fragment of code I wrote. It tries to transfer all the elements from a HashSet to an array. But when I compile, an error PROMPTS up.

    "friends" is a HashSet containing some names and their ASSOCIATED contact details.

    "friend" is DEFINED as an object variable of Person type.

    My code is:

    Person[] contactArray = new Person[friends.size()];
    for(int index = 0; index < friends.size(); index++)
    {
    contactArray[index] = new Person(friend);
    }

    The problem is with the last statement. Besides adding an element by providing details directly, like this:
    contactArray[index] = new Person("John Smith", "0213333333");

    is it possible to add a large number of elements with a loop? Can anybody tell me that? THANKS a lot.

    638.

    Solve : Question regarding the title command?

    Answer»

    Can you do string concatenation with the NT command 'title'?

    I would like to concatenate the username (from %USERNAME%) with a title string.

    Thanks,

    SteveYup.

    title %username% Command Window

    Put in any leading or TRAILING spaces you may need.

    Hope this helps. *off topic
    How do you reformat your computer, thank you for helping.Hello Mikepan

    Please don't ask a question about a different subject on someone else's POST.

    Please post your question about formatting in the Windows forum if you intend formatting then re-installing a Windows OS.

    If you intend just re-installing a Dos OS then ask in the DOS forum.

    ALWAYS, but always, give some info about your pc EVEN if it's just to say what OS you are using.

    Many thanks & looking forward to being of some help to you.Sidewinder,

    Excellent help you provided. For those INTERESTED the following code works perfectly:

    @echo off
    cls
    set _friendlyName=%username:.= %
    set _titleString=6 MDG Logon Window -- Hello %_friendlyName%
    @title %_titleString%
    Oh, one point of explanation.

    cls
    set _friendlyName=%username:.= %

    :: The above code takes the dot out of the username
    :: Our logon name format is fn.ln
    :: The _friendlyName variable is a transform with
    :: the dot replaced by a space

    set _titleString=6 MDG Logon Window -- Hello %_friendlyName%
    @title %_titleString%

    Thnaks again for the help!

    639.

    Solve : Windows app development?

    Answer»

    Hi, I am a Mac PROGRAMMER trying to some Windows APPLICATIONS. But I am not sure where to start, where can I get the compiler and the runtime LIBRARY etc.and what are they CALLED in the Windows world? Do they have a all in one package similar to the Xcode in the Mac world? I write in C, C++, JAVA. I will appreciate if someone can help. Thanks in advance.

    MacPCYou cross-posted. Check your other post in the MS Windows section (although this is probably the better section for this discussion).

    640.

    Solve : Printer Command?

    Answer»

    I am using Epson dot matrix printer, after printing every time from a little program I wrote, i have to PRESS Load/Eject to adjust the paper BACK to its POSITION. I HEARD that there is a command which can help to instruct the printer to load back itself, can anyone kindly help me out? TKSYou NEED to send an escape sequence to the printer. Trolling around the internet, apparently 27,25,82 will work. Construct the string chr(27) & chr(25) & chr (82), then send the string to the printer.

    Happy Computing...

    641.

    Solve : Batch Script Help Part 2?

    Answer»

    How would I do this:

    If the current day is FRIDAY run this command:

    if exist C:\temp\current rmdir /S/Q c:\temp\archive

    I would like to ADD this to another batch file that runs everyday so that I dont have to schedule another task just for this.

    Thank YOUIT's difficult to say without knowing your OS. This may work on your machine:

    Code: [Select]for /f %%i in ('date /t') do (
    if %%i==Fri if exist c:\temp\current\nul rd /s /q c:\temp\archive
    )

    Good luck. 8-)

    642.

    Solve : Creating SQL functions with native languages?

    Answer»

    Hello
    How do I CREAT an SQL function (of any kind) with any native language? for example C or VB.
    I need to know for both SQL SERVER and ORACLE.
    THANKS
    DavidAre you saying you WANT to know how to write SQL? or how to pass the SQL?

    SQL Server and Oracle, use SOMEWHAT different SQL syntax. Oracle is more in line with the SQL Standard.

    I guess I haven't explained myself too well..
    I know SQL and I work both with SQL SERVER and ORACLE.
    What I want to know is:
    CREATE FUNCTION will create a function. I want to write a SQL function that includes any native language code to make a more sofisticated SQL functions).
    I'm sure that there is a way to do this but after SEARCHING some books and the net I have'nt found the answer.
    Thanks

    643.

    Solve : problem with redirect in php?

    Answer»

    Dear friends,

    I am TRYING to insert a redirect command in php but it doesn't function. I can see only an empty page.

    The line is:

    header( "Location: http://www.articaviaggi.com/thankyou.html" );

    the page .../thankyou.html exists and I have loaded it on my website as usual.

    Where is the error ?

    Many thanks

    BenedettoPlease post the entire script. Are there any lines above this one?Hi Rob,
    thanks a lot for your help. This is the script (remember that all the comments are in italian).

    $nome = trim($_REQUEST['nome']);
    $cognome = trim($_REQUEST['cognome']);
    $telfisso = trim($_REQUEST['telfisso']);
    $email = trim($_REQUEST['email']);

    $errore = "";
    if ($nome == "") { $errore .= "

  • Devi inserire il nome
  • "; }
    if ($cognome == "") { $errore .= "
  • Devi inserire il cognome
  • "; }
    if ($telfisso == "") { $errore .= "
  • Devi inserire il telefono fisso
  • "; }
    if ($email == "") { $errore .= "
  • Devi inserire l'indirizzo email
  • "; }


    //Se la variabile errore non è vuota (ovvero almeno uno dei CAMPI obbligatori
    // è stato lasciato vuoto) visualizzo un messaggio di errore
    if ($errore <> ""){
    //Creo una lista puntata con class errors dove con il css posso
    //dare un carattere rosso e la inserisco in una variabile
    $stampaErrori = '
      ';
      $stampaErrori .= $errore;
      $stampaErrori .= "
    ";

    //Stampo un riquadro con dentro la lista errori
    echo '';
    echo 'Attenzione!';
    echo $stampaErrori;
    echo '

    Torna indietro[/url]

    ';
    echo '

    ';
    } else {
    //Se invece non ci sono campi obbligatori vuoti

    //Creo il testo del messagigo che verrà inviato a noi
    $messaggio .="Richiesta di contatto
    ";
    $messaggio .= "Nome: ".$nome."
    ";
    $messaggio .= "Cognome: ".$cognome."
    ";
    $messaggio .= "Telefono Fisso: ".$telfisso."
    ";
    $messaggio .= "Indirizzo Email: ".$email."
    ";


    //controllo che i campi non obbligatori sono compilati, se si li aggiungo al messaggio

    if ($_REQUEST['indirizzo'] <> "") { $messaggio .= "Indirizzo: ".$_REQUEST['indirizzo']."
    "; }
    if ($_REQUEST['codpostale'] <> "") { $messaggio .= "Cod. Postale: ".$_REQUEST['codpostale']."
    "; }
    if ($_REQUEST['citta'] <> "") { $messaggio .= "Città: ".$_REQUEST['citta']."
    "; }
    if ($_REQUEST['cellulare'] <> "") { $messaggio .= "Cellulare: ".$_REQUEST['cellulare']."
    "; }
    if ($_REQUEST['pacchetti'] <> "") { $messaggio .= "Pacchetto: ".$_REQUEST['pacchetti']."
    "; }
    if ($_REQUEST['periodo'] <> "") { $messaggio .= "periodo: ".$_REQUEST['periodo']."
    "; }


    //if ($_REQUEST['indirizzo'] <> "") { $messaggio .= "Indirizzo: ".$_REQUEST['indirizzo']."
    "; }
    //if ($_REQUEST['indirizzo'] <> "") { $messaggio .= "Indirizzo: ".$_REQUEST['indirizzo']."
    "; }
    //if ($_REQUEST['indirizzo'] <> "") { $messaggio .= "Indirizzo: ".$_REQUEST['indirizzo']."
    "; }


    //invio la mail
    mail( "[emailprotected]", "Messaggio di richiesta Informazioni ", $messaggio, "From: $email" );

    //faccio un redirect ad una PAGINA di ringraziamento
    header( "Location: http://www.articaviaggi.com/thankyou.html" );


    }

    ?>

    Best regards

    Benedetto

    That script works for me, I'm afraid. Could you TRY putting some test echo "here"; COMMANDS into the script to find out how far it's actually getting? The most likely problem is at the mail command. Are you sure your server is set up correctly to handle mail?Yes, I will contact my server. it is the best way, I think.
    Thank you very much.

    Benedetto

    644.

    Solve : stuck in Names Sorting Problem in Java :(?

    Answer»

    I am composing a code which requires a list of NAMES sorted by the Last Names. The Last name should be in upper CASE and put in front of the first name. It looks like the example:

    Example LISTINGS:
    List of Names for all customers who have paid bills:
    ***************************************************************
    BROWEN Alen
    BROWN John
    GREEN Abbey
    SHAW Michelle
    SHOOK Michael
    WHITE Alice
    ***************************************************************

    However, my code doesn't work like this. Can ANYBODY tell me how I can make it work? Much appreciated. My code is as follow.
    "customers" has been defined as a HashSet collection.
    "Person" is a previously defined class, and all its methods used here have been defined.

    Code: [Select]public void listCustomersNames_Paid()
    {
    System.out.println("List of Names for all customers who have paid bills:");
    System.out.println("***************************************************************");
    for(Person oCustomer : customers){
    String[] nameArray = oCustomer.getName().split(" ");
    String str10 = nameArray[0];
    String str11 = nameArray[1].toUpperCase();

    Iterator<Person&GT; it = customers.iterator();
    while(it.hasNext()) {
    nameArray = oCustomer.getName().split(" ");
    String str20 = nameArray[0];
    String str21 = nameArray[1].toUpperCase();
    if(str11.compareTo(str21) > 0) {
    String tempstr1 = str11;
    str11 = str21;
    str21 = tempstr;

    String tempstr2 = str10;
    str10 = str20;
    str20 = tempstr2;
    }
    it.next();
    }
    System.out.println(str11 + " " + str10 + " of " + oCustomer.getAddress());
    }
    System.out.println("***************************************************************");
    }

    645.

    Solve : Need help learning JAVA, PLease!?

    Answer»

    I'm very New to JAVA. I'm taking an "Intro to computing class". ( I don't plan on being a programmer, it's to complete my degree and it is a "required class) I need help in completing an assignment. I have many books but, I don't understand the instructions, in the book (s) to even get started. I 'm supposed to do the "Hello World" program (yeah I know for those of you who are experienced it's simple). Here's my problem:
    It says to "Set the Path". I have no clear definition of what the "Path" is? My JDK was istalled on my C drive. To go on, the instructions say to: Type in: PATH c:\j2sdk1.4.2_07\bin; %PATH%. But if my JDK is already in C wouldn't I just type in the c:\ j2sdk(etc)? This class expects us to learn this in one week and write this stuff, I"m usually quite sharp, but I just don't get it. I think I have a mental block.
    I'm POSTING here because I also do not get any help from the class, I did try to get help from my school. I guess I'm just too stupid (They told me it was a stupid question) I'm very depressed over this, I've paid for the class and I don't want to have to drop it.
    Please help me, I'm desperate, I only have W eek and a half til I'm done.
    I am not gonna take any credit for this. I found it on the net. It seems simple enough, but being a VB programmer, it's all Greek to me.

    class HelloWorld
    {
    public static void main(String args[])
    {
    System.out.println("Hello World!");
    }
    }

    Good luck with your STUDIES. tigergirl.

    A path is a LIST of folders that the computer will search when looking for a file. When programs are installed on a computer sometimes they will add pointers to themselves in the path. (Sorta like walking down the yellow brick road, with a map).

    Now when you are being instructed to set the path, the JAVA program is wanting to add pointers to it's folder to the existing path. Hence, :\j2sdk1.4.2_07\bin; %PATH%.

    %PATH% is a shortcut to calling out the existing path. So in essence the JAVA program is adding itself to the existing path.

    An example, lets say the path on your computer is c:\somestuff;c:\somemorestuff. Typing the line above in the command prompt would give you a path of
    c:\j2sdk1.4.2_07\bin;c:\somestuff;c:\somemorestuff

    It ADDS the path to the JAVA app to the existing path on your computer.

    Clear as mud?? Thanks, I'll give it a try!please can anybody tells me more about the Java runtime environment, and what are the tools that enables us to work with JBuilder?
    since I am working with JBuilderX?
    plus I wana ask about how to convert from the .class files to make an executable file .exe?

    Houssam B.

    646.

    Solve : Looking for a JAVA class...?

    Answer»

    Hi, I am looking for a Java class that has the SUITABLE METHODS to DISPLAY large integers with separating commas(325,589 instead of 325589) and have a restricted number of DECIMAL places for decimal numbers(26.2 kilos instead of 26.233985305).

    Anyone can help me for that? Thanks in advance. This might work: java.text.NumberFormat

    For more info check out: Number Format

    Good luck. 8-)

    647.

    Solve : FORMs?

    Answer»

    I can put ONE FORM of the type shown below on a PAGE with no problems. But if I put more than one, then only one of them will work. Does anyone KNOW of a reason for this? Thanks in Advance. (The ERROR is page not found).




    648.

    Solve : Batch Script Help Needed?

    Answer»

    I need HELP with a batch script that will do the following:
    Check to SEE if any folders or files exist in C:\Temp and if it does DELETE all folder in C:\Archive. If no folders or files exist in C:\Temp leave C:\Archive alone.

    Thanks
    Without knowing your OS it's darn near impossible to say whether this will work, but hey, you never know till you try.

    Code: [Select]@echo off
    SET count=0
    for /F %%i in ('dir c:\temp') do (
    call set /a count=%count%+1
    )
    if %count% GTR 0 for /f %%i in ('dir /a:d /b c:\archive') do rd /q /s c:\archive\%%i

    Based on your specs, only folders are deleted from archive. 8-)

    649.

    Solve : corrupt folders they changed to files?

    Answer»

    have 9 folders on one of my drives they all change to a FILE now i cant open them. in dos they dont show up as a DIR just a file with no (EXT) they are all now 32,768kb now one of them had 15 Gbt in it. is there away to change them back to a folder and will they be back as before. ThanksIt sounds like a CHKDSK or SCANDISK found corrupted directory entries and converted them to files. I'd be reaching for the BACKUPS if it were me...

    650.

    Solve : Batch Scripting PLEASE HELP !!!?

    Answer»

    i would like to time / schedule the execution of this batch file..
    between the questioned marked SPACES for 60 seconds each before executing the NEXT command LINE
    please help.

    @echo off
    ??
    MKDIR new
    cd new

    xcopy e:\try *.*/e/a/k/q