diff --git "a/daniweb_com/daniweb_com_samples.json" "b/daniweb_com/daniweb_com_samples.json" new file mode 100644--- /dev/null +++ "b/daniweb_com/daniweb_com_samples.json" @@ -0,0 +1,602 @@ +[ + { + "url": "https://www.daniweb.com/programming/software-development/threads/111562/to-parse-through-the-file-and-print-output-using-awk-or-sed-script", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " shell-scripting - To parse through the file and print output ... | DaniWeb

To parse through the file and print output using awk or sed script

cdfd1982 0 Newbie Poster

A file is

ELLPSYSTATL
ELLSUYSTLTL
* * * : . * * * :* *
HHULJKLOPOA
HPULJKLPOOA
* . * * * * * : : * *
and it is a long file .....

so output shud be
where there is : and . counting start from E and end upto A.

P4S
S5U
A9L
H13P
O19P
P20O

  • 3 Contributors
  • 5 Replies
  • 139 Views
  • 1 Week Discussion Span
  • Latest Post Latest Post by rikxik
eggi 92 Posting Whiz

Hey There,

Not sure what you're looking for based on the output and then the results.

Are these colons and dots in the text? And, the case of P4S, what context are you using to count from E to A?

If you could clarify, that would be great. I'm not really sure what you're trying to accomplish.

Thanks,

Mike

cdfd1982 0 Newbie Poster

Thanx ...
See this simple file
ABCDEFG
ABCEEFH
* * * : * * * .
so it have three rows . Those first two rows say
A and A match then it will be * (asterisk) in the third row.
and those D and E not match there will be colon (: ) or
G and H not match .(fullstop) in the third row

Our question is
In third row where there is colon (: ) and .(fullstop)
tell the number and wht is that name at that number
therefore output will be
D4E because colon is at 4 number
G7H because fullstop is at 7 number

And it will be a long file where there is colon and full stop
just tell the number and name ...

One more question is
In some other files colon or fullstop may be at 4th row or 5th row
can u script this one also separately

eggi 92 Posting Whiz

Hey There,

Are there always only 2 mismatched letters in each pair of rows? Just wondering if you do multiple colons before full stop and how you handle that.

Also, can you post what you have so far? Just curious as to where you're having the issue.

Thanks :)

, Mike

cdfd1982 0 Newbie Poster

Hey There,

Are there always only 2 mismatched letters in each pair of rows? Just wondering if you do multiple colons before full stop and how you handle that.

Also, can you post what you have so far? Just curious as to where you're having the issue.

Thanks :)

, Mike

Thanks for looking into the question
Actually u can say this is a part of sequence alignment ( biology) where amino acids of one sequence aligns with amino acids of another sequence Say between human and chimpanzee
so those amino aicid match thatwill give asterisk
otherwise colon or fullstop ( this is by software program which can produce that)
.

can u produce a script if u look into the question previously posted if possible.

Thanks

rikxik 0 Newbie Poster

Sorry, I know awk/sed was requested, but a python solution was so easy, couldn't help to post it:

#!python\n\n(a, b) = ([], [])\n(i,j)=(1,1)\ndiffchar=['.',':']\n\nfor line in open(\"sq.txt\"):\n        line=line.strip()\n        if i == 1:\n                a = list(line)\n        elif i == 2:\n                b = list(line)\n        elif i == 3:\n                for (x,k) in enumerate(list(line.replace(' ',''))):\n                        if (k in diffchar):\n                                print a[x]+str(j)+b[x]\n                        j+=1\n\n                i=0\n        i+=1

Discard if you can't have Python. This may give you some idea about the awk code though (feel too lazy to translate in awk:)

HTH

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/threads/225949/hp-presario-2100-power-turns-off", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " troubleshoot-hardware - HP Presario 2100 Power Turns Off | DaniWeb

HP Presario 2100 Power Turns Off

gmstechhelp 0 Newbie Poster

1. OS-Windows XP Home
2. Slowed, froze, blue screened.
3. Select startup, F8. Nothing worked.
4. Formatted hard drive with wipe (format disk).
5. Tried to install XP Pro.
6. Power shut off at end of loading startup files.
7. Retried several times. Finally, loaded XP Pro.
8. While loading Office, froze, blue-screened.
9. Started over, but this time with original XP Home.
10. Power continues to shut off after loading \"checking system and loading startup files\".
11. No battery inserted.
12. Direct power.
13. When power goes off, unplug power supply, plug back in to be able to start again.
14. Is something in the startup files triggering the power shut off?
15. Is this a software or hardware problem, or both?

  • 2 Contributors
  • 6 Replies
  • 248 Views
  • 5 Days Discussion Span
  • Latest Post Latest Post by gmstechhelp
Xlphos 16 Veteran Poster

Did the computer turn off whilst installing XP?
Perhaps there is a problem with the hard drive. Did you reinstall XP because of being unable to boot up?
Can you tell us what the BSOD error is?

There's no need to number each line.

gmstechhelp 0 Newbie Poster

Please refer to info above with the numbers. There was no error shown. The power shut off while trying to load XP Pro and Home. Thanks if you can help!

Xlphos 16 Veteran Poster

their is a difference between loading and installing. What I am asking is does the PC turn off whilst you are installing from CD Or after the installation begins from the hard drive?

Try a linux live CD to see if there is something wrong with your HDD or if it is something else. If you can boot from the CD then it could be something else other than the hard drive. If the CD works and the PC doesn't shut off it could be a fault with the hard drive.

gmstechhelp 0 Newbie Poster

What is a linux live CD? It actually cuts off from the CD. The HD is formatted.

Xlphos 16 Veteran Poster

If it cuts out whilst using the CD then It probably is not just the HDD.

Is this a laptop or desktop?

Number 13. in you original post, Does it refuse to start if you don't unplug it first?

gmstechhelp 0 Newbie Poster

Is there anyone out there who actually has worked on an HP Compaq Presario 2100 with similar problems? I really need to discuss this with them.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/27581/memory-issue", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - Memory Issue | DaniWeb
ep2002 36 Posting Pro in Training

Hi everyone,

I've been having problems with my machine for a while now even though we upgraded about 4-6 months ago.

OE keeps causing the machine to go nutso & most of the time I can get it under control & then it will do it again several hours later until I have to reboot.

It's so bad now, that I have to reboot once every 2 days instead of the once every week I had to reboot b4.

I'm on Win. 2000 Proffesional & I'm now using 1.0.4 of FF which has a lot of bugs I've noticed :(

I use OE only b/c TB sucks as an e-mail program.

I find it happens mostly when I have a lot of e-mail windows open, but it was never this bad b4.

Oh & I now have 1 GB memory & that's still not helping.

Oops, almost forgot. I scan regularly with Anti Spyware & Anti Virus & update too, so that's not the issue.

Please help :(

Thanks


Michelle

  • 4 Contributors
  • 15 Replies
  • 550 Views
  • 3 Weeks Discussion Span
  • Latest Post Latest Post by DMR
DMR 152 Wombat At Large Team Colleague

Open the Event Viewer utility in your Administrative Tools control panel and see if there are any helpful error/warning messages in your System and Application logs.

djrivera1 0 Junior Poster

Depends if you are use ECC OR NON ECC RAM. Some motherboard do not use ECC RAM which is why you might work for hours then force to restart or get the blue screen of death. Replaced ram with non ECC RAM or different band and see what happen. if this doesn't work supect video card.

ep2002 36 Posting Pro in Training

My RAM is neither of those. Isn't that outdated RAM?

I have DDR RAM

Thanks


Michelle

djrivera1 0 Junior Poster

Ecc And Non Ecc Is Not A Type Of Ram!
(ecc Means Error Correction Control.)
Some Motherboards Can't Use This Type Of Ram, And Yes They Are Ddr Rams. You Can Tell What Type Of Ddr Ram Because It Usally Stated On The Packaging Of The Ram It Usally In Small Print If It Ecc Or Registered Ram Because All Ram Is One Or The Other They Both Will Fit In The Slot, And Work But Will Cause System To Shut Down Or Blue Screen Of Death Or Restart Programs Don't Work Right. Changed Ram First And See What Happen After All You Can Always Bring The Ram Back If It Doesn't Work. Then Next I Would Look At The Video Card Going Bad.

JoetjeF 5 Junior Poster in Training

Please give the information DMR asked for in his post and any other error message you see. It's otherwise very difficult to diagnose the problem.

ep2002 36 Posting Pro in Training

Ok, we checked & this is what we have...

DDR 400 non ECC & my MB is supposed to take DDR 266, so is this going to be an issue?

They want like $200 for a 1GB stick :(

The problems I have are w/ OE. If I search & find too many different e-mails, it starts to crash & I have to close down ALL the OE windows including search boxes & then restart OE.

It's very annoying & time consuming, especially when I have to search thru local folders which has to search over 12,000 e-mails.

Thanks


Michelle

ep2002 36 Posting Pro in Training

Hi there,

Thanks for that.

I'll pass this along to my partner, but remember I'm in Canada, not the US & he told me that one company wouldn't even ship to Canada which is nuts IMO.

Have a great day :)


Michelle

DMR 152 Wombat At Large Team Colleague

Outlook express will crash because it a java based program that rely on the ram working correctly.

No offence meant here, but all programs use RAM and rely on the physical memory working correctly. This has nothing to do with Java in particular, and additionally, since ep2002 has indicated that the problem is only with OE, that would not point to a problem with RAM in general.


This might shed some light on the real root of the problem though:

The problems I have are w/ OE. If I search & find too many different e-mails, it starts to crash...

If your problems really are only with OE, and you're also asking OE to deal with a very large number of messages, the cause is almost certainly not due to bad or mismatched RAM, but rather the fact that Outlook Express has known limitations in terms of the maximum size of its folders (Inbox, etc.). Iif you have allowed a huge number of emails to pile up in your different OE folders, the program will crash because you've exceeded (or are approaching exceeding) the size limit of those folders. The size limit on OE's files/folders was 2Gig last I checked, and I don't think that has changed recently.

djrivera1 0 Junior Poster

No offence meant here, but all programs use RAM and rely on the physical memory working correctly. This has nothing to do with Java in particular, and additionally, since ep2002 has indicated that the problem is only with OE, that would not point to a problem with RAM in general.


This might shed some light on the real root of the problem though:
If your problems really are only with OE, and you're also asking OE to deal with a very large number of messages, the cause is almost certainly not due to bad or mismatched RAM, but rather the fact that Outlook Express has known limitations in terms of the maximum size of its folders (Inbox, etc.). Iif you have allowed a huge number of emails to pile up in your different OE folders, the program will crash because you've exceeded (or are approaching exceeding) the size limit of those folders. The size limit on OE's files/folders was 2Gig last I checked, and I don't think that has changed recently.

Outlook express rely on ram more charging amost all the bank on the ram itseft which is way it will crash the system with this program more. (True all program rely on ram to work, but some program, java based programs rely on ram more using most of the banks) More likely it the Latency timing, and the motherboard proably only can accepted 512mb on each slot 1gb on a slot on these older motherboards can cause problem like programs cause blue screen and so forth. ( even thought board accepted only 512 dimms poeple put 1gb in it and the board read the full 1gb and loaded windows but will crash more offen) and she using ddr 3200 when the motherboard only can use 2100 non ecc.

[/QUOTE=ep2002]Ok, we checked & this is what we have...

DDR 400 non ECC & my MB is supposed to take DDR 266, so is this going to be an issue?

[/QUOTE=djrivera1]Yes if you reach limitations or are closed to it will crash the program but not the system and then it work ok for a fews minute and crash again. ram is more likely a mismatch causing problems.

djrivera1 0 Junior Poster

It proably cheaper to replaced the motherboard then the ram, look at the price for some of the stores in canada and ram is to high price and then you have a 1GB stick laying around, buy a new motherboard you can find one that can use your stick of ram and processor you be good to go. If you what links to where or what kind of motherboard you will need, need to know name and model of pc or processor type.

ep2002 36 Posting Pro in Training

Yes I had a feeling OE was the real problem, but if the memory is a problem, that needs to be resolved too.

Question... Since OE is too jr. a program for me, any suggestions on which e-mail program to switch to that has all the features OE has & more?

I have been looking for a while, but nothing seems to be there.

Is Outlook better, or is it just OE with a few extra features I don't really need like the reminder etc.?

TB won't work b/c it's still too buggy & when I went to import all my e-mails, it wouldn't import the \"sent\" folder which is crucial for me.

Thanks :)


Michelle

No offence meant here, but all programs use RAM and rely on the physical memory working correctly. This has nothing to do with Java in particular, and additionally, since ep2002 has indicated that the problem is only with OE, that would not point to a problem with RAM in general.


This might shed some light on the real root of the problem though:
If your problems really are only with OE, and you're also asking OE to deal with a very large number of messages, the cause is almost certainly not due to bad or mismatched RAM, but rather the fact that Outlook Express has known limitations in terms of the maximum size of its folders (Inbox, etc.). Iif you have allowed a huge number of emails to pile up in your different OE folders, the program will crash because you've exceeded (or are approaching exceeding) the size limit of those folders. The size limit on OE's files/folders was 2Gig last I checked, and I don't think that has changed recently.

djrivera1 0 Junior Poster

Even though there are limits to OE, system suren't crash, I would say OE was a problem if it crash every time you try loading it or try to get in your inbox, but every few min's or somtime hours indicated a ram problem. (But just incase it is a outlook problem or you exceed the 2gb limit try recovering you mail with this program. http://www.oemailrecovery.com/recovering-email.html
this will also help you get lost emails backand import them.
Hope this help

ep2002 36 Posting Pro in Training

Hi there,

I wish I would have had that link ages ago & yes, I have had problems with what you mentioned.

There are times that when it gets bogged down, that if I X out of it, but don't close down all the other e-mails that have windows open or I have \"find\" windows open & then I reload OE, it doesn't show me all the e-mails.

It will pick a day & give me only up to that day which could be 1-2 days earlier or even a year earlier.

Then I have to close down all the windows & then restart it to get ALL the e-mails.

It's very very frustrating & I can't believe no one has created an e-mail program that works well with an office.

I'm not a large corporation by any means, but with all the stuff I subscribe to & running a biz, I'm well over 11,000 e-mails in my inbox & that's not including all the e-mail in all the folders I have under \"Local Folders\".

Thanks


Michelle

DMR 152 Wombat At Large Team Colleague

1) A pretty definitive way to figure out if RAM in general is the root of the problem is to download and run the (free) memtest86 RAM-testing utility.

More info on from an earlier post of mine on the subject:

Download and run the free memtest86 RAM-testing utility. It runs from a bootable CD or floppy, and it will do a pretty thorough battery \"stress tests\" of your RAM and give you the results of any errors it finds. Let the test cycle run for a few hours or more for the best results.

Also- If you've got more than one RAM module installed, run the computer with only one of the modules installed at a time. If you find that the system only crashes when one particular RAM module is being used, replace that module.

2) Unfortunately, Outlook suffers from the same message/folder size limitations that Outlook Express does IIRC; if your problems lie in that area, a move to Outlook won't help. You said:

I'm well over 11,000 e-mails in my inbox & that's not including all the e-mail in all the folders I have under \"Local Folders\".

That could very well be what's doing you in; you need to be dilligent about deleting old/unwanted messages, or do periodic backups to some other location to get those old emails out of your \"active\" folders. I've had a few of my \"real life\" clients let the contents of their Outlook/OE folders grow too large, and the recovery processes were not fun.


3) In terms of Thunderbird: while it definitely does not have all of the \"bells and whistles\" of the full version of Outlook, the latest version of TB at least has a 4G mailbox limit, which is twice that of Outlook/OE. I've sucessfully used TB as one component of the recovery process in cases where my clients have \"blown up\" their Outlook mailboxes by exceeding the size limitations of those programs.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/145137/how-to-append-ms-word-in-a-vb-net-project", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " how to append MS word in a vb.net project [SOLVED] | DaniWeb

how to append MS word in a vb.net project

asmit1987 0 Newbie Poster

hello ppl,
i have a doubt how do i append MSWord in my proj. if i have a form on which i make a button now on clicking that button MSWORD should open. If i use system.diagnostic.process.start() and the whole path of MSWORD in the bracket it will work but what if i want to make it run on some other machine what should be done in that case please help me with a code as soon as possible.
One more thing how do i make a simple combo box uneditable at run time.
please help me as soon as possible by providing codes for both my questons...
thank you.

  • 4 Contributors
  • 12 Replies
  • 200 Views
  • 3 Days Discussion Span
  • Latest Post Latest Post by asmit1987
Jx_Man 987 Nearly a Senior Poster Featured Poster

1. Just add your msword file on your setup project.
then you can modified path of msword file :

System.Diagnostics.Process.Start(Application.StartupPath & \"\\MsWordFileName.doc\")

2. On combox properties, set DropDownStyle = DropDownList

asmit1987 0 Newbie Poster

I meant to say that i want to open a MSWORD not any wordfile plz help me with that

asmit1987 0 Newbie Poster

i want to open MSWORD in my project and not any wordfile plz look for it

Pgmer 50 Master Poster Featured Poster

You have to add com object reference in your appliction
i.e microsoft word 9.0 object library and in namspace
iimports the word so that you can use the ms word object in ur code as you like
just try it out.

asmit1987 0 Newbie Poster

i understood it but can u tell me that after adding com reference what code do i have to write

Pgmer 50 Master Poster Featured Poster

Exactly what u want to do? do u want to automate msowrd?

Prabakar 77 Posting Whiz

do you mean... System.Diagnostics.Process.Start( \"winword\" ) ?

Pgmer 50 Master Poster Featured Poster

if u just want to open MS Word u can use
system.diagnostic.process.start(\"winword\") no need to give path..
if u want to run in other machine also it works only thing is that machine must have msword installed.

asmit1987 0 Newbie Poster

You have to add com object reference in your appliction
i.e microsoft word 9.0 object library and in namspace
iimports the word so that you can use the ms word object in ur code as you like
just try it out.

i din't get u completely as in can u explain me by send me the code...

asmit1987 0 Newbie Poster

Exactly what u want to do? do u want to automate msowrd?

i want to run my application on multiple computers so i want write a code that is common to all also is there any other step except system.diagnostic.process.start(\"winword\") to open MSWORD through my application..... will this be a perfect code to write what is mentioned above to use in my application suggest me with the best code for it.

Prabakar 77 Posting Whiz

If you want to run MSWORD in multiple computers from a single computer then all you have to do is to send a UDP broadcast message to the clients, and the clients will just run the MSWord with the System.diagnotic.start(\"winword\") You can also use Shell command but you'll have to give absolute address. So, I would prefer the first method. Its simple and it works:)

asmit1987 0 Newbie Poster

Thank you very much for yur response and solving my query

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/121263/edit-printed-line", + "domain": "daniweb.com", + "file_source": "part-00231-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " python - Edit printed line [SOLVED] | DaniWeb

Edit printed line

tb808kid 0 Newbie Poster

This problem has been driving me crazy, I just can't seem to find anything in the Python docs.

I've been working on a script, It connects to a remote server and downloads multiple RAR files as a \"job\", it then extracts them to the correct place.
It works, but I get this for each file:

Getting http://(url removed).com
(big delay here)
Got http://(url removed).com

You can see the problem with that, it doesn't give you an idea of how much work it's done.
I've been trying to implement a status bar, I can get the percentage by downloading the files in chunks. But I don't know how to write this to part of the screen in the way that wget would ( I would get annoyed if it kept taking new lines everytime the percentage changed).

edit: I should also add that I can't use any advanced graphics or anything, it gets ran on a linux server via ssh.

Thanks.

  • 3 Contributors
  • 6 Replies
  • 127 Views
  • 5 Months Discussion Span
  • Latest Post Latest Post by tb808kid
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague

I think you need to give us just a little bit more information about your code. Mindreading is not everyone's talent.

tb808kid 0 Newbie Poster

Ok, I thought it was pretty clear, I think the problem is too much information.

Cut down explanation:
How do I make python output status info the way wget does?

This is way wget outputs information:
http://users.ugent.be/~bpuype/wget/wget-screen.png

Notice how the speed and pecentage done change without a new line, thats what I'd like to do in python.

ZZucker 342 Practically a Master Poster

BTW, updating the display screen continuously will be the slowest part of your program.

tb808kid 0 Newbie Poster

Ah, I did happen to discover the ncurses library, I've used it with c++ and agree with you on the performance issues (can really see it if you have to work on a busy thin client network). I've been trying to figure out how wget works by looking at the source, I *think* it uses ncurses. I'll try ncurses and see how much it taxes the script. Thanks ZZucker.

tb808kid 0 Newbie Poster

In case anyone discovers this, the solution is to the use '\\r', to will move the cursor the start of the line.

where [] is the cursor.

print \"asdasd\\r\" //will give [a]sdasd

now the cursor is at the start, you car \"overwrite\" the line.

Just thought I'd update this for anyone else who hits this page, its really frustrating to spend hours googlng things and hitting dead ends.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/428664/python-and-mpi4py-question", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Python and Mpi4py question | DaniWeb

Python and Mpi4py question

fatalaccidents 0 Newbie Poster

Hey guys,

I'm new to parallel programming, so I was wondering if anyone could help me parallelize a bit of code. It is a code that goes into large h5 files (using h5py) and grabs some data out. After that the data has to be reformatted and printed into another file. I was wanting to parallelize the for loop part of going over the data over several processors. These are very large files so it would help as far as memory and speed goes. Again, I'm very new at this, so if anyone has any ideas to go a completely different direction I'm all ears. Here is the code as it stands serially:

import h5py\nimport glob\nimport sys\nimport os\nimport numpy\n\n### This takes the simulation name as the first argument and the day to extract as the second\n### All h5 files must be in the same folder, with no other h5 files (including surface)\n\nsim_name = sys.argv[1]\nday_to_extract = sys.argv[2]\ntotal_nodes = int(sys.argv[3])\ntotal_elements = sys.argv[4]\n\nfiles = glob.glob(\"*.h5\")\n\na = numpy.empty(total_nodes)\nb = numpy.empty(total_nodes)\n\nhot_list = numpy.column_stack((a,b))\n\nfor file in files:\n    # Get all of the data from h5 file\n    f1 = h5py.File(file, 'r')\n    data = f1['Data']\n    temp = data['Temperature']\n    # Getting temperature data for the day needed\n    temp_day = temp[day_to_extract]\n    press_head = data['Pressure_Head']\n    # Getting pressure head data for the day needed\n    press_day = press_head[day_to_extract]\n    geo = f1['Geometry']\n    # Obtaining the original node numbers \n    # This keeps temp and press_head indexed correctly\n    nodes = geo['orig_node_number']\n    orig_nodes = nodes['0']\n\n    # Put data into list\n    for i in range(len(orig_nodes)):\n        orig_node_number = int(orig_nodes[i])\n        hot_list[orig_node_number] = [press_day[i], temp_day[i]]\n    sim_name, piece = file.split('p')\n    part, ext = piece.split('.')\n    print \"h5 file number \" + part + \" read\"\n    f1.close()\n

The last part where it is putting the data into the list is the part that is RAM and CPU intensive. I was hoping to break up the large temperature, pressure head, and original node numbers into smaller chunks and add them to to the hot_list array simultaneously. I'm just not sure how to best go about this. I figure it would be using scatter, but I can't figure out how to make it scatter the file into even lists or numpy arrays around the processors and then gather them back. I know this is asking a lot, but if anyone could at least point me in the right direction I would be happy to do the heavy lifting. Thanks for your time!

  • 1 Contributor
  • 0 Replies
  • 88 Views
Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/databases/threads/479976/access-denied-when-trying-to-connect-to-mysql-with-correct-password", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " microsoft-access - Access Denied when trying to connect to ... [SOLVED] | DaniWeb

Access Denied when trying to connect to MySQL with correct password

mattskills 0 Newbie Poster

Hi,

i'm having some trouble with my MySQL server where i can't log in or connect to it from the terminal , phpmyadmin or my server control panel. the password is correct , i have reset it a number of times but still get the same message:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)

does anybody know what might cause this (please don't say the password is wrong)

Thanks,
Matt

  • 2 Contributors
  • 1 Reply
  • 267 Views
  • 1 Hour Discussion Span
  • Latest Post Latest Post by maba001
maba001 -1 Junior Poster in Training

Depending on the platform \"localhost\" might connect via a Unix domain socket. If this is the case, then it might be that there is a mismatch between where the socket is really located in the filesystem (as specified in my.ini) and where the MySQL client (whatever you are using as a client) expects it.

To test that, I would try the connection using the mysql command line client and use the identical my.ini file.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/439117/xml-read-write", + "domain": "daniweb.com", + "file_source": "part-00231-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - XML Read/Write? [SOLVED] | DaniWeb

XML Read/Write?

LucianAdamson 0 Light Poster

Hello all! Hopefully there is someone out there who can help me with what I need to achieve.

Goal: Loop through XML file, reading node by node searching for a node with a specific attribute with a specific value, then write to another attribute of said node found.

I feel that isn't as clear as it could be, so hopefully further reading will clarify.

The XML FILE:

<root>\n    <level id=\"1\">\n        <prop n=\"LookVertSpeed_Pad\" v=\"120.0\"/>\n        <prop n=\"LookHorzSpeed_Pad\" v=\"260.0\"/>\n        <prop n=\"LookVertAcc_Pad\" v=\"2500.0\"/>\n        <prop n=\"LookHorzAcc_Pad\" v=\"2500.0\"/>\n        <prop n=\"LookVertDec_Pad\" v=\"50000.0\"/>\n        <prop n=\"LookHorzDec_Pad\" v=\"50000.0\"/>\n    </level>\n</root>\n

Basically I need to load the file that contains a more elaborte yet consistant group of nodes identical to the XML code above and loop through looking for, lets say for example sake, LookVertAcc_Pad in attribute 'n' and update its 'v' attribute to 3000.0. Specifying any <level> node isn't necessary, needed, or warranted. All attributes that I will need to modify will be in this format. I am completely new to reading/writing XML and would highly appreciate any help.

  • 2 Contributors
  • 2 Replies
  • 355 Views
  • 23 Hours Discussion Span
  • Latest Post Latest Post by LucianAdamson
rafael.g.suarez.7 0 Newbie Poster

HI, I have to use a simple code to read & write xml file like initial parameters, maybe this code can help you:

Imports System.Linq
Imports System.Xml

Sub DataXml_Create(ByVal sFile As String)

Dim xDoc As New XmlDocument\nTry\n  'Create structur XML\n   Dim xRoot As XmlElement = xDoc.CreateElement(\"ControlPanel\")\n   xDoc.AppendChild(xRoot)\n\n   '------------------------------------------------------------------\n   Dim CnnControl As XmlNode = xDoc.CreateElement(\"Control\")\n   xRoot.AppendChild(Control)\n\n   Dim sSrvP As XmlNode = xDoc.CreateElement(\"SrvP\")\n   Control.AppendChild(sSrvP)\n   Dim sSrvT As XmlNode = xDoc.CreateElement(\"SrvT\")\n   Control.AppendChild(sSrvT)\n\n   '------------------------------------------------------------------\n   System.IO.File.Create(sFile).Close()\n   If My.Computer.FileSystem.FileExists(sFile) Then xDoc.Save(sFile)\n\n Catch Ex As Exception\n\n   Dim strMsg As String = \"Error creating XML file\"\n   MsgBox(strMsg, MsgBoxStyle.OkOnly, \"DatosXml_Crear\")\n\n End Try\n

End Sub

Sub DataXML_Upload(byval strXmlFile As String)

Try\n\n  If Not My.Computer.FileSystem.FileExists(strXmlFile) Then DataXml_Create(strXmlFile)\n\n  If My.Computer.FileSystem.FileExists(strXmlFile) Then\n     Dim xmlDoc As XDocument = XDocument.Load(strXmlFile)\n\n     For Each sControl In xmlDoc.Descendants(\"Control\")\n       If sControl.HasElements Then\n         txtConnSrvP.Text = sControl.Element(\"SrvP\").Value\n         txtConnSrvT.Text = sControl.Element(\"SrvT\").Value\n       End If\n     Next\n\n  Catch Ex As Exception\n\n    MsgBox(Ex.Message)\n\n  End Try\n

End Sub

Sub DataXML_Save(BYVal strXmlFile As String)

Try\n   If My.Computer.FileSystem.FileExists(strXmlFile) Then\n     Dim xmlDoc As XDocument = XDocument.Load(strXmlFile)\n\n     For Each sControl In xmlDoc.Descendants(\"Control\")\n        If sControl.HasElements Then\n          sControl.Element(\"SrvP\").Value = txtSrvP.Text\n          sControl.Element(\"SrvT\").Value = txtSrvT.Text\n        End If\n     Next\n\n     xmlDoc.Save(strXmlFile)\n\n   End If\n\nCatch ex As Exception\n   MsgBox(ex.Message)\nEnd Try\n

End Sub

Regards

LucianAdamson 0 Light Poster

Think I have it figured out now I just need to optimize the code. Thank you all for the assistance you have provided!

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/124061/chinese-strings-in-python", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Chinese Strings in Python | DaniWeb

Chinese Strings in Python

alasseon 0 Newbie Poster

Hello, All:

My first post... I've looked high and low for the ability to write a Chinese language text string in a program.

For example:

myString = \"你好\"

So that if you say:

print myString

on the console you will see:

你好


But I have yet to be successful. First off, can Python do this, and second, what is the *easiest* way to make it happen? I'm certain I'm not the only one who would like to use Unicode in their source programs, or be able to process Unicode strings, but every article I've seen does it differently. Is there another language that will do this easily?

Surely, this is not difficult, is it?

  • 1 Contributor
  • 1 Reply
  • 109 Views
  • 6 Hours Discussion Span
  • Latest Post Latest Post by alasseon
alasseon 0 Newbie Poster

Hello, All:

My first post... I've looked high and low for the ability to write a Chinese language text string in a program.

For example:

myString = \"你好\"

So that if you say:

print myString

on the console you will see:

你好


But I have yet to be successful. First off, can Python do this, and second, what is the *easiest* way to make it happen? I'm certain I'm not the only one who would like to use Unicode in their source programs, or be able to process Unicode strings, but every article I've seen does it differently. Is there another language that will do this easily?

Surely, this is not difficult, is it?

Addendum:

While this was very difficult in Python 2.5, it is trivial in Python 3.0. :)
Using the print() function in Python 3.0 seems to print any combination of Chinese text that I throw at it.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/183436/code-compiling-but-wrong-output", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - Code compiling but wrong output [SOLVED] | DaniWeb

Code compiling but wrong output

TriniBabe 0 Newbie Poster

please help i think d error is in inputtin d values into d linked list! D files are attached

c++
  • 3 Contributors
  • 4 Replies
  • 73 Views
  • 7 Hours Discussion Span
  • Latest Post Latest Post by Nick Evan
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster

This is no way to ask a question. What the hell are we supposed to do with \"i think d error is in inputtin d values into d linked list\" ?
Post your code using code tags (don't just upload some files) and then tell us
1. what the code is supposed to do (input/ouput)
2. What the code is actually doing
3. (optional) tell us where you think the problem is.

Here's a sort of 'forum-manual', you might benefit from reading it.

vmanes 1,165 Posting Virtuoso

Also, writing in something approaching proper English is appreciated. Text- or leet-speak is generally not appreciated.

TriniBabe 0 Newbie Poster

ok!

the code reads i in data about each flight(given on a seperate line 4 each flight) so i hav 2 build a graph 2 find shortest distance!

so i create a vertex that stores a given startin pt and a linked list that stores all its possible end pts along with cost,time to get from start vertex 2 en vertex!

but i dont no wat i did wrong?????

int buildGraph(FILE * in1,Graph G,int n)\n{\n\n  EdgePtr addInPlace(EdgePtr,char[], double, double, char[]);  \n\n\n  int i;   \n  char temp[MaxWordSize + 1];   \n  char ePort[MaxWordSize + 1], dPort[MaxWordSize + 1]; \n  double d,c;  \n\n  EdgePtr top = NULL;\n\n  fscanf(in1,\"%s\",&temp);\n\n  while(strcmp(\"END\",temp)!=0)\n  {\n\n    fscanf(in1, \"%s\",&ePort);\n    fscanf(in1, \"%s\",&dPort);\n    fscanf(in1, \"%lf\",&d);\n    fscanf(in1, \"%lf\",&c);\n\n\n    for(i=0; i <= n; i++)\n    {\n\n    if(strcmp(G->vertices[i].embarkmentPort,ePort)!=0)\n      {\n        n++;\n\n       G->vertices[n] = newVertex (\"\");\n\n       strcpy(G->vertices[n].embarkmentPort,ePort);\n\n       top = addInPlace(G->vertices[n].Destinations,temp, d, c, dPort);\n\n\n       }//end if\n\n    else\n     {\n\n      top = addInPlace(G->vertices[i].Destinations,temp, d, c, dPort);\n\n      }//end else\n\n    }//end for\n\n  fscanf(in1,\"%s\",&temp);\n\n}//end while                  \n return n;   \n}//end buildGraph  \n
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster

If your to lazy to click the link(s) I gave you, then I'm to lazy to try and help.
Use. Code. Tags.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/community-center/threads/261908/what-s-your-favorite-computer-game/4", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " What's your favorite computer game? Page 4 | DaniWeb

What's your favorite computer game? - Page 4

SgtMe 46 Veteran Poster Featured Poster

Mass Effect (First One)

mrnmarius -2 Newbie Poster

my fav is world of warcraft, but i play with pleasure age of empires, nfs , cod, moh, and the list can continue:D

Anderson24 0 Newbie Poster

My favorite is warcraft.

cwekeybb2351 0 Newbie Poster

here the most popular computer game is CS many peopleo like this because it is so exciting you can be a police or a terrorist

peter_budo commented: Spammer +0
\"Member
R3ap3R

Half-Life 2 - Hands Down.

lorenzoromar -2 Newbie Poster

i like prince of Persia and the Italian job

happygeek commented: And SPAM THE GAME no doubt you SPAMMER +0
The Mad Hatter -3 Junior Poster in Training

Reach For The Stars V3.0 - the best 4X game ever made. Of course I have to run it in DOSBOX now. There's been nothing like it.

Second place for me is Trade Wars 2002, the best online game ever (the telnet version).

frogboy77 73 Posting Pro in Training

Chuckie Egg, without doubt.

Sudo Bash 0 Light Poster

Although I have no love for the OS my favorite games are DOS freeware and shareware games especially Dune 2, Bio Menace, Xargon, Tryplane Turmoil, Flashback, PoP 4D, Sky roads and ... OK, I'll stop. :) Try them with DosBox if you find the time.

For modern platforms I love Ascii Sector. It is the best Ascii game I have ever seen. You very quickly overlook the lack of fancy graphics because of how polished the game is.

For completely non-retro games I like the 3-D Star Wraith Games.

...

I could go on but, I'll stop. :)

liquidroof 0 Newbie Poster Banned

Well i like to play \"Dave\"and \"Bomber Man\" these two computer games are my favorite.

jember 14 Light Poster

Starcraft 2
Assassin's Creed 2
Fall Out 3

:)

Jeremy Noye 0 Newbie Poster

I may have missed it, but nobody mentioned Deus Ex? I lost a girlfriend over that game...
I'm glad to see lots of folks saying Daiblo II. When LOD came out, that game became my favourite for a solid year and a half. Honorable mentions for me include: Commander Keen, Test Drive 2 (1990ish), and Zork (1980ish).

jember commented: Diablo II rocks! :) +0
malcolm1105 0 Newbie Poster

no never mind pong all the way

dcdruck 11 Light Poster

I'm partial to the Left 4 Dead games... they never get old!

jember commented: i totally agree with you! :) +0
joshevans 0 Newbie Poster

I like Strategy games and Racing games:

favorites are:
Starcraf2
warcraft 3
NFS most wanted.

printing.host 0 Light Poster

my favorite pc games are GTA 4 , Left 4 dead and prototype and prototype is my all time favorite pc game.

magicianM 0 Newbie Poster

most of the game i played was best...=)
the if wan a ranking list for wats the game i played from the most like and less like...
the 1st one would be the NFS series..=)
2nd goes to COD..=)
and go on..xD

davidlouis88 0 Newbie Poster Banned

My favorite game is PES 2011 and Fifa 2011. They are very cool. I can play them day by day, month by month and I never feel boring. Each year EA Sport and Konami give us 1 new version, that's great !

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/linux-and-unix/threads/212989/mail-server", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " apache - mail server | DaniWeb
johny321 0 Light Poster

What is the requirements of mail server

  • 3 Contributors
  • 2 Replies
  • 111 Views
  • 1 Month Discussion Span
  • Latest Post Latest Post by ramprasad.77@re
Rik_ 111 Nearly a Posting Maven

You need to remove that link from your sig.

Keep It Spam-Free
Do not spam, advertise, plug your website, or engage in any other type of self promotion. To encourage open, unbiased (incentive-free) discussion, it is prohibited to refer to sites you own or are affiliated with outside of the Business Exchange category. Additionally, keeping discussions anonymous encourages more open conversation, because members are not afraid of revealing their strategies to their competition.

All forums contained within the Business Exchange category are sorted based on thread start time and cannot be bumped. To ensure these sections remain non-spammy, please try to limit yourself to one new thread per month within each of these forums.

Only the direct sale of unique (ie one-of-a-kind) items or services is permitted within the aforementioned forums. Only items within the seller's immediate possession may be sold or traded. Please do not link to off-site eCommerce sites or auctions. No affiliate links are permitted anywhere within DaniWeb (except within forum signatures). Self-promotion links are permitted within forum signatures provided they do not contradict with any other sitewide rules, such as inappropriate language or content.

What will happen: The offending unsolicited post will be deleted (or plugged URLs snipped).
First offense - plug: Member will be warned via user infraction system. Warning will be documented.
Second offense - plug: 5 point infraction will remain on user's record for 3 months.
First offense - solicitation: 5 point infraction will remain on user's record for 3 months.

ramprasad.77@re 0 Newbie Poster

first yum install sendmail*
then chkconfig sendmail on
then service sendmail restart
then go to the file called vim /etc/mail/sendmail.mc type dnl in 116 line and uncommand #
then m4 /et/cmail/sendmail.mc > /etc/mail/sendmail.cf just convert to machine language.
then give vim /etc/mail/local-host-names
here give stationx.example.com
example.com
mail.example.com wq ie., save&exit
give chkconfig sendmail on
and service sendmail restart
after this givve command or go to the file vim /etc/mail/access
here give for example (192.168.0.0 RELAY) wq ie., save&exit
and type chkconfig sendmail on and service sendmail restart
at last type vim /etc/aliases here just type for example john: john,jane
wq ie., save&exit and mail to john
and type newaliases before chkconfig sendmail on and service sendmail restart.
This is the things u want in sendmail services.

Regards,
mahesh.R

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "http://www.daniweb.com/software-development/csharp/threads/450975/how-to-find-if-the-user-has-logged-in-for-the-first-time-c", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " asp.net - How to find if the user has logged in for ... | DaniWeb

How to find if the user has logged in for the first time - C#

hookedtocsharp -2 Newbie Poster

The scenario is, If the user has logged in for the first using his one time password it should get redirected to ResetPassword.aspx

If the user is not new, then should get redirected to Main.aspx page.

Should I use IsPostBack or Membership.ValidateUser?

How do we usually code in c# to check if its a new user (using first time login)

I am a newbie to programming not getting enough info on net. Please help

  • 3 Contributors
  • 2 Replies
  • 222 Views
  • 1 Hour Discussion Span
  • Latest Post Latest Post by Ketsuekiame
RvSon -3 Newbie Poster

HI, You can use session.
or
You can add one more field in DB check to whether user is active user or not.

Ketsuekiame 860 Master Poster Featured Poster

Generally you would include a field in the DB containing the last log on date, if this value is null, then it's a first time log on.

If you want to do things like forced password reset; the simplest way is to include a bit column that just states \"ResetRequired\" or something and set that to 1 in order to force the change.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/156801/problem-in-connecting-to-the-database", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Problem in Connecting to the database | DaniWeb

Problem in Connecting to the database

Indianblues 0 Newbie Poster

Hi

I am very new to C#. Below is the program which i am trying.
{
string connstring = \"Data Source = .\\\\SQLEXPRESS;Initial Catalog = SAMP; Integrated Security = True\";

SqlConnection conn = new SqlConnection(connstring);
SqlCommand comm = new SqlCommand();
comm.Connection = conn;
SqlDataAdapter myadapter = new SqlDataAdapter(comm);
DataSet myset = new DataSet();
conn.Open();
comm.CommandText = \"Select * From EMP \";
comm.ExecuteScalar();
myadapter.Fill(myset, \"EMP\");
dataGridView1.DataSource = myset;
dataGridView1.DataMember = \"EMP\";
conn.Close();
}
But I am getting following error. I am using sql server 2005 express edition.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Pls anybody provide me some solution.

  • 5 Contributors
  • 4 Replies
  • 87 Views
  • 1 Year Discussion Span
  • Latest Post Latest Post by adchopra
LizR 171 Posting Virtuoso

try using (local) instead of . as your server name

Jugortha -1 Junior Poster

You can also connect to the database using the connection wizard

Data>Add new data source

zeroberto 0 Newbie Poster

First thing , you are Opening a Connection in a Wrong Place and you dont trap your Errors , Second thing your Connection String is incorect. You are Executing the Command object and at the same time you are using the adapter, why ?? . Your Code should look like this

string connstring = \"User id =sa;Password=hello;Database=SAMP; Server =MyServer\" \n\nSqlConnection conn = new SqlConnection(connstring);\n\nSqlCommand comm = new SqlCommand();\n\ncomm.CommandText = \"Select * From EMP \";\n\ncomm.Connection = conn;\n\nDataSet myset = new DataSet();\n\nSqlDataAdapter myadapter = new SqlDataAdapter();\n\nmyAdapter.SelectedCommand = comm;\n\ntry\n{\n\nconn.Open();\n\nmyadapter.Fill(myset, \"EMP\");\n}\ncatch(SQLException)\n}\nFinally\n{\nconn.Close();\n}

Your Code Is Screeming \"Hey put me inside a Function or in a Class\" lol , So try to put this code in a class or a Function and in your Form you can Bind your Gridview like this

dataGridView1.DataSource = myset;\ndataGridView1.DataMember = \"EMP\";

Hope this helps

adchopra 0 Newbie Poster

hey gys....can u help me out....its quite urgent..
actually i downloaded a project....it has datasource written as \"local\"..
now when i run it says..login failed for (my pc name)...
what shud i do....? plz help me

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/489015/how-to-find-zero-used-in-given-number", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c - How to find zero used in given number? | DaniWeb

How to find zero used in given number?

Weejin 0 Newbie Poster

Sample output:
Please enter a number(Less than 8 digits):
1203021
how can I sure only 8 digits key in and how to count the zero inside the given number. Please teach me final is coming :(

c
  • 3 Contributors
  • 2 Replies
  • 80 Views
  • 10 Hours Discussion Span
  • Latest Post Latest Post by Maritimo
Slavi 94 Master Poster Featured Poster

use a for loop,to loop through the individual numbers and make a count variable which increases each time you hit a 0

Maritimo 15 Junior Poster in Training

The same question had been asked on C++ forum.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/databases/threads/392340/adding-time-data-to-mysql", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " php - Adding Time data to MySQL | DaniWeb

Adding Time data to MySQL

super9876 0 Newbie Poster

Hi. I'd like to add time (and no date, and not a timestamp) data to a field in MySQL through a PHP form. I've been having problems, as the date is also included. But I only want the time (I want to be able to sort the data by the time, and I think it was adding today's date along with the time, so if I enter the data on 5 different days, it won't sort correctly).

PHP Insert Code:
.strtotime($event_start_date).

MySQL field:
Type: INT
Length/Values: 10
Default: None
Collation:
Attributes: Unsigned
Everything else empty

Can anyone help with:
1) what should the php insert code be
2) what the field type, attributes, length/values, etc should be

Thanks!

  • 2 Contributors
  • 2 Replies
  • 166 Views
  • 12 Hours Discussion Span
  • Latest Post Latest Post by super9876
super9876 0 Newbie Poster

Thanks Catherine. I'll play around with that and see if it works for me.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/284417/how-to-catch-f5-key", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - How to catch f5 key?? [SOLVED] | DaniWeb

How to catch f5 key??

anuragcoder -6 Junior Poster in Training

As the title suggests
Any help for keypress action folks??
Do we have a keypress func in c++.
I'm runnin Win Xp Dev c++

c++
  • 4 Contributors
  • 4 Replies
  • 113 Views
  • 6 Hours Discussion Span
  • Latest Post Latest Post by daviddoria
Ketsuekiame 860 Master Poster Featured Poster

What have you tried so far?

This Website should tell you all you need to know.

Narue 5,707 Bad Cop Team Colleague

Sorry anuragcoder, I'm going to ignore you now. Hopefully you'll realize that flooding the forum with bad questions is counterproductive and start concentrating on quality rather than quantity.

In the meantime, here's some light reading for you.

anuragcoder -6 Junior Poster in Training

Don't do that ... I'll stop posting such bad questions
Forgive Me ^ infinite

Anurag

daviddoria 334 Posting Virtuoso Featured Poster

This may be partially my fault - I told him to start this thread because the discussion in a previous thread now had nothing to do with the title.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/494883/is-their-a-way-to-use-the-developer-command-prompt-without-visual-studio", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-studio - Is their a way to use the Developer command ... | DaniWeb

Is their a way to use the Developer command prompt without Visual studio.

Ananthoju 0 Newbie Poster

Actually i need to use the Developer command prompt for my project. Iam doing project in java. Without entire visual studio shall i use only dumpbin.exe file to execute commands.

  • 2 Contributors
  • 1 Reply
  • 246 Views
  • 2 Weeks Discussion Span
  • Latest Post Latest Post by DistantGalaxy
DistantGalaxy 15 Newbie Poster

As far as I'm aware the developer console merely sets up some environment variables. To discover what those variables you'll need the full edition of Visual Studio installed, or ask someone who has. Open up a developer console and type the 'set' command without any paramaters. You may need to change some paths to reflect the configuration of you own machine but once you have this information you can probably create you own dev console without needing to install the full version.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/186813/compiling-c", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Compiling C++ [SOLVED] | DaniWeb

Compiling C++

jomacho 0 Newbie Poster

Hi, this is my first post here. The fact is i'm not a programmer and i need help. I have a software that i need to solve a vehicle routing problem for my thesis. But i only got the source code for it, one header file and 6 cpp files. I have tried compiling this with no success, the error messages mean nothing to me, maybe i'm missing something, files to compile on win32, i don't know. If any of you guys are willing to help, i would be gladly apreciated (should be no problem for a programmer).
Need this for win32 console.

http://rapidshare.com/files/221788134/sdvrp.zip

Regards,

Jorge

c++
  • 3 Contributors
  • 13 Replies
  • 125 Views
  • 6 Days Discussion Span
  • Latest Post Latest Post by tux4life
Clockowl 56 Posting Whiz

It doesn't compile in MinGW's GCC. Looks like MSVC code?

I'm getting these errors:

=|\nsdvrp.h|18|warning: ignoring #pragma warning |\nsdvrp.h|222|warning: no newline at end of file|\ngenius.cpp||In function `double genius(route*&, Nb&)':|\ngenius.cpp|732|warning: comparison between signed and unsigned integer expressions|\ngenius.cpp|733|warning: comparison between signed and unsigned integer expressions|\ngenius.cpp|736|error: no matching function for call to `std::vector<node*, std::allocator<node*> >::erase(node**)'|\nvector.tcc|108|note: candidates are: typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >) [with _Tp = node*, _Alloc = std::allocator<node*>]|\nvector.tcc|120|note:                 typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, __gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >) [with _Tp = node*, _Alloc = std::allocator<node*>]|\n||=== Build finished: 1 errors, 4 warnings ===|

Maybe someone else can compile it tho.

jomacho 0 Newbie Poster

Thank you for trying clockowl. Is there anything wrong with the code, or needs to be compiled with another software? Please help. I really need this.

Clockowl 56 Posting Whiz

Erm. I guess it can be compile in MSVC++. You can try to install MSVC++ Express and grab the platform SDK. Google is your friend. Can anybody else compile this code?

tux4life 2,072 Postaholic

It's just compiling fine with me (it gives a lot of warnings), I'm using the Borland Compiler ...

Edit:: Using the Microsoft C++ compiler (from Visual C++ 2008 Express Edition) I'm also getting this error ...

tux4life 2,072 Postaholic

You can get the Borland Compiler for free from here ...

I compiled it by running the following command inside the directory of the source files: bcc32 -etabu_sdvrp *.cpp

tux4life 2,072 Postaholic

I tested this program and can confirm it works, but try running it with the wrong number of arguments (1 instead of 2) directly causes the program to crash, it's very 'crash-sensitive' ...

The program is also using 'old C++' code, for example old file handling using the FILE-pointer, etc. ...

So let's say: This program can be improved :)

tux4life 2,072 Postaholic

I've attached the compiled file to this post ...
Enjoy it :P !!

tux4life

jomacho 0 Newbie Poster

Thanks a lot tux4life. You're a life savior. It's normal the code not being optimized, this is only used for operational research, mainly for mathematicians, not programmers. Once again, thanks buddy.

jomacho 0 Newbie Poster

Sorry to bother again, but how can i see the list of available arguments? I don't understand the meaning of the seed of random numbers. How do i use it?
tabu_sdvrp.exe input.cri (random number)?
It crashes this way.

Clockowl 56 Posting Whiz

Yes, that should be it. remember to use spaces tho. And put the input file in the same directory as tabu_sdvrp.exe of course.

tux4life 2,072 Postaholic

Actually it should work, I tested it with the 'p01.cri' file which was in the fileset and it was working ...

Syntax: tabu_sdvrp [I]filename[/I].cri [I]random_number[/I]

jomacho 0 Newbie Poster

LOL, i haven't seen that p01.cri had changed. That's why it kept crashing. On the info it says that creates a file named result_filename.cri, that's not true, using these commands, it gives the result on the input file.
Thanks again guys.

tux4life 2,072 Postaholic

LOL, i haven't seen that p01.cri had changed. That's why it kept crashing. On the info it says that creates a file named result_filename.cri, that's not true, using these commands, it gives the result on the input file.
Thanks again guys.

OK, I've changed the code and it should work now :) ...

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/90807/upgrading-to-xp-pro", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - upgrading to xp pro | DaniWeb

upgrading to xp pro

applefat 0 Newbie Poster

Hi!

I have a dell ispiron 1300 laptop, with Win XP & SP2. Thanks to my college, I also have access to the MSDNAA software site, so I decided to download XP Pro (with service pack 2) for my laptop (free through the program, after all).

So after doing the advisor program thing, which tells me there should be no hardware conflicts, the file downloads as an iso, and I burn it to a disc and run the installer.

It gets to the point where it's copying a bunch of installation files to the C drive, and then tells me, in essence, just before completion \"cannot copy axjf317s.sys to <C drive pathname>, as it is missing\". I try to skip and reboot, but the installation will not continue when it sees that file is missing.

And I download it a second time, and this time it's missing ahodpamy.sys and again cannot properly boot into the installation. What the heck? :icon_eek:

Also none of these files return results on google, that do I do? :icon_eek:

  • 2 Contributors
  • 1 Reply
  • 90 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by seanmsiegel
seanmsiegel 0 Newbie Poster

This is typically 1 of 4 things.. Badly Written CD, Dirty CD-Rom drive, Bad hard drive, or bad memory(ram).

1. Try loweing the speed in which you burn the iso to disc. Nero and most other utilities have an option to change burn speed.

2. Blow compressed air or blow into the drive yourself to try and clean out dust. Or get a Drive cleaning kit for about $20 from walmart.

3. Test your computers memory with this diagnostic utility:
http://memtest86.com/

4. Test your hard drive with a diagnostic utility from the manufacturer of the drive.
For seagate or maxtor use:
http://www.seagate.com/www/en-us/support/downloads/seatools

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/347085/compiling-open-source-projects", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " microsoft - Compiling open source projects [SOLVED] | DaniWeb

Compiling open source projects

iammirko 0 Light Poster

Hi,

I have been trying to compile open source projects since past few months with no success. I just don't know how to go about the entire thing. Readings over the internet have not helped much.

Some come with ./Configure and a Makefile while others with only a Makefile. How to use them to generate executables (or they have some other purpose :?:).

My machine currently has:

  • Windows XP
  • Mingw Compiler for C/C++
  • Cygwin

Do I need any other software?

Thanks!

  • 3 Contributors
  • 5 Replies
  • 215 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by iammirko
iammirko 0 Light Poster

This time I am trying to compile the nullHttpd project. The project comes with around 9 source files and a Makefile. The contents read as follows:

# Makefile for Null httpd\nCC      = gcc\nCFLAGS  = -Wall -O2 -s -I./include\nLDFLAGS = -lpthread\nOBJECTS = cgi.o config.o files.o format.o http.o main.o server.o\n\nall:\n\trm -f *.o\n\tmake httpd\n\nhttpd: $(OBJECTS)\n\t$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o ../httpd/bin/httpd\n\t@echo Make httpd is complete.\n\nclean:\n\trm -f ../httpd/bin/httpd *.o *~
iammirko 0 Light Poster

Hi! Any responses?

Sky Diploma 571 Practically a Posting Shark

Makefiles are ways to effectively reduce the user burden by just executing one script which will perform the compilation for you.

In order to run a makefile you will need to do the following

1) Make Sure that your MinGw compiler directory is in the windows global Environment variables.

If that is done.

you could just use the Command prompt (START>RUN>CMD) and go to the directory where the codes are present and type

'make' to execute it

rajeevpareek 0 Newbie Poster

Before anything I would suggest you to move to Linux for development work.

iammirko 0 Light Poster

Thanks. I guess migrating to Linux makes sense.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/information-security/threads/145925/really-bad-virus-please-help", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-virus - Really bad virus Please HELP! | DaniWeb

Really bad virus Please HELP!

isabelle13 0 Newbie Poster

Hi everyone. I'm new here, a friend of mine suggested that i come here and tell you all about my problem so that you can try to help me. Thanks in advance, and here goes:

Laptop:

I think i have a spyware type virus on my laptop. I don't know how i got it as i didnt download anything but i did open a torrent file. It has caused a lot of problems for me, including:
...not allowing me to access my email account. I can sign in normal but when my page comes up, the font is twice the size it should be and my inbox isnt clickable. I had to have a friend use a different email address and verify it for me in order to join up here as i just cant use mine.
...i can't use google. when i try to click on one of the google links, it opens a new tab and takes me to an irrelevent page. sometimes from there it even shuts down my laptop.
...it has seemed to block any site that might help me, including anti virus sites, and McAfee live chat. I tried to get avast (friend recommended) but it blocked it. I managed to get a free trial of AVG, but now the virus seems to have gotten into that and is disrupting all my virus scans. When i first used it, it told me i had 2 trogan horses and 4 Adware something or other. But now, i the scan barely last 5 seconds before its stops and an error report pops up.
...it frequently shuts down my laptop
...am i gonna have to wipe the whole thing and start again??

PC:

I have an even worse virus on my PC. I don't know what happened and i didnt get the chance to do a virus scan because now only the background comes up when i switch it on. I don't even have a start bar anymore.... It isnt allowing me to do anything!
...I fear that your going to tell me something about using safe mode and command prompt and i'm gonna be so clueless....

EDIT: If necessary, how/how long would it take to copy my hard drive to an external hard drive with only using command prompt in safe mode?

PLEASE HELP!!!! :'( :S :confused:

  • 2 Contributors
  • 7 Replies
  • 169 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by jholland1964
jholland1964 650 Posting Expert Team Colleague Featured Poster

Hi Isabelle, welcome to daniweb. Let's begin with that laptop first ok, see if we can get it cleaned up and THEN go onto the desktop. It would be too confusing for both of us to try to work on both at the same time. First of all, you have answered one of your own questions;

I don't know how i got it as i didnt download anything but i did open a torrent file.

That is more than likely how you got it.
What operating system do you have on the laptop? XP....Vista?
I would like you to try to do this ;

Please download Malwarebytes' Anti-Malware (MBA-M) to your Desktop.

* DoubleClick mbam-setup.exe and follow the prompts to install MBA-M.
* Be sure a checkmark is placed next to Update Malwarebytes' Anti-Malware and Launch Malwarebytes' Anti-Malware, then click Finish.
* If an update is found, it will download and install the latest version.
* Once the program has loaded, select Perform full scan, then click Scan.
* When the scan is complete, click OK, then Show Results to view the results.
* Be sure that everything is checked, and click Remove Selected.
* When MBA-M finishes, Notepad will open with the log. Please save it where you can find it easily. The log can also be opened by going to Start > All Programs > Malwarebytes' Anti-Malware > Logs > log-date.txt.

...I fear that your going to tell me something about using safe mode and.... i'm gonna be so clueless....

Just take a breath, be calm. Very easy to do, really. Here are instructions for both XP and Vista since I don't know your operating system.

Windows XP

Using the F8 Method

1. Restart your computer.
2. When the machine first starts again it will generally list some equipment that is installed in your machine, amount of memory, hard drives installed etc. At this point you should gently tap the F8 key repeatedly until you are presented with a Windows XP Advanced Options menu.
3. Select the option for Safe Mode with Networking using the arrow keys.
4. Then press enter on your keyboard to boot into Safe Mode with Networking.

Windows Vista

Using the F8 Method

1.Restart your computer.
2.When the computer starts you will see your computer's hardware being listed. When you see this information start to gently tap the F8 key repeatedly until you are presented with the Windows Vista Advanced Boot Options.
3. Select the Safe Mode with Networking option using the arrow keys.
4.Then press the enter key on your keyboard to boot into Vista Safe Mode with Networking.
5. When Windows starts you will be at a typical logon screen. Logon to your computer and Vista will enter Safe mode.

Now I ask for Safe Mode with networking because this way, when in just Safe Mode this loads the computer with the barest essentials necessary to run and without the modem files. Safe Mode with Networking will also allow the modem files to start too and therefore you should be able to also get online and download the necessary programs. Let me know if this is possible for you. If you can do this then download Malwarebytes' and install, update and then run the scan and let it fix whatever it finds while it is STILL in safe mode.
It may say something will be deleted on reboot. If so just shut down and reboot the computer as you normally do...this time it will boot into normal mode and remove the bad files while it boots up.
Post back here with the log.
Judy

P.S. also while in Safe Mode with Networking download HiJackThis Just save it to the desktop or My Documents. Don't run it yet.
Once you have done the Malwarebytes' and rebooted to normal mode then run a full system scan with HiJackThis and save the log and post it back here with the Malwarebytes' log.

isabelle13 0 Newbie Poster

hi. firstly, thankyou for taking the time to try to help me. its appreciated.

Ok, i tried to download the ani malware you recommended but i couldnt even get onto the site. Its blocked. I am in safe mode right now and i just tried it again, but even in safe mode, the site is still blocked. what should i do? Is there any way around it? Can i still download it if it is uploaded somewhere other than the official site?

:S

jholland1964 650 Posting Expert Team Colleague Featured Poster

Not sure what is going on here, this is not actually a website but the actual executable file. What happens when you double click on that in my post, does it actually say the website is blocked?
In Internet Explorer go to Tools, Internet Options, Security. Click on Trusted Sites and put in there
http://www.besttechie.net/tools/
and click OK.
Also make sure your security settings are not too high. Move that glider over for now to Medium-Low and also click on Custom Level and scroll down and put \"dots\" in the following;
Automatic Prompting for File Downloads Enable and in File Downloads Enable
Click Ok and close that out.
Now first try to click on my link for the Malwarebytes' program and see if you still get a blocked message. What you SHOULD get is a prompt about downloading the program and where do you want it saved, desktop is what you should say. If that doesn't happen then go directly to the website above and the very last item on the list is mba-m. click that.
Judy

isabelle13 0 Newbie Poster

Just tried all that. Security settings were already lowered, tried it with both Internet exploer and Firefox. This is what i get:

\"Unable to connect

Firefox can't establish a connection to the server at www.besttechie.net.


* The site could be temporarily unavailable or too busy. Try again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.\"

This comes up for pretty much all sites that might help me, anti virus sites, McAfee live chat etc. Do you think its the virus interferring? This only happens for pages i try to load that are connected with helping me get rid of the virus.

what you said i should get is what i usually do get but since i have had this virus i havent been able to access anything that would help get rid of it!

It did let me dowload a trial version of AVG, which said it got rid of it, but actually didnt. Plus i already had McAfee but that doesn't even pick up the virus. Any ideas?

jholland1964 650 Posting Expert Team Colleague Featured Poster

Can I ask what was the exact name of the virus? Did you ever have an antivirus program on the computer or only install one after the fact? Do you have a firewall? Is it enabled? How are you connected to the internet?

isabelle13 0 Newbie Poster

Sure, i'll do my best. Virus name: A virus scan i did said i had Trogan horses and Adware, plus there is other stuff but i dont know it. I think part of the virus is go.google.

I had McAfee on the laptop before i had the virus, and that doesnt pick up on it. I downloaded the trial of AVG after i had the virus as it as the only thing it would let me download. That did one successful virus scan but didnt get rid of it all properly, and now all the scans i try cut out 5 seconds in.

Firewall: Yes we do, and yes it is enabled, but its not locked down. (<I dont know what that means but was told to tell you that)

Internet Connestion: Wireless.

Hope that helps as this thing is driving me crazy!

jholland1964 650 Posting Expert Team Colleague Featured Poster

Number one, if you all ready had McAfee on the system you never should have added AVG.
The rule is only ONE antivirus program installed on the computer.
Now you said

A virus scan i did said i had Trogan horses and Adware,

I need to know the name of the virus scan...where did you get it and why? Especially if you all ready had McAfee. If it was an online scanner that is different but if it is another program you downloaded then this is and has compounded your problem. What happened to the McAfee program, where is it? Why did you run another scan if you all ready had that one?
Your firewall \"could\" be blocking the downloading of these programs, though if you couldn't do it in Safe Mode with Networking I don't know. There firewall shouldn't have come on in safe mode I wouldn't think.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/395455/path-to-pdf-file", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - path to pdf file | DaniWeb

path to pdf file

LondonJava 0 Newbie Poster

I want to attach User Instructions to a Java application, and allow the user to open it from the help menuitem.

I'm not very familiar with classpath variables. If I use an absolute path name everything is fine, such as

File pdfFile = new File(\"C:/Program Files/MyProgram/UserGuide.pdf\");

But I want to package the UserGuide in the jar file (to avoid issues openning it on a Mac or Linux machine, and prevent the user from deleting it etc.).

So I want to access it using

File pdfFile = new File(\"files/UserGuide.pdf\");

where files is a directory in the package where the main method's class is located. But I get an error
java.io.FileNotFoundException: files\\UserGuide.pdf (The system cannot find the path specified)

In Eclipse how do I achieve this?

  • 3 Contributors
  • 4 Replies
  • 505 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by hfx642
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

I haven't tried this (although I have used a similar approach to opening an InputStream to a file in a jar many times). But maybe its worth a try?

File f = new File((getClass().getResource(\"files/UserGuide.pdf\").toURI()));

You'll probably have to catch a URISyntaxException, although there should never be one

LondonJava 0 Newbie Poster

Yes I tried that, and it worked when I run the application from within Eclipse. But when I export to a Runnable Jar File and run the jar file it does not work.

Perhaps I am not exporting to a Runnable jar file correctly?

The way you mention is similar to the way I handle images, which works fine. I use

java.net.URL imgURL = MyClass.class.getResource(\"images/myImage.png\");\n        if (imgURL != null) {\n            return new ImageIcon(imgURL);\n        } else {\n            System.err.println(\"Couldn't find file: \" + path);\n            return null;\n        }

But for some reason this works for images in the /images/ folder but not for the pdf file in the /files/ folder?

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

I don't know, sorry. Maybe its a limitation in whatever code you are passing that File to?

\"Member
hfx642

Observation...
I think your Your \"/\"s should be \"\\\"s.
And, you should probably double them. (ie. \"files\\\\UserGuide.pdf\")
This SHOULD get you a little further.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/160624/need-help-urgently", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - Need Help Urgently! | DaniWeb

Need Help Urgently!

-Observer- 0 Newbie Poster

Hi,

I'm new to Java and I need help with the following if someone can help me:

Write a program named Personnel that maintains salary information for the employees of a company. The program should display a text based menu, giving the user a choice of selecting a command.

The commands that the program should support are: n (create new employee by pressing the n button), l (list all employees), p (compute all paychecks), r (raise wages), and q (exit the
menu).

The n command creates a new employee and prompts the user for the name of the employee, and whether the employee is an hourly paid, or has an annual salary. If the user selects to create
an hourly paid employee, he/should be prompted for the hourly rate, otherwise he/should be prompted for the annual salary of the employee.

The p command calculates and displays on the screen the amount that it should be paid to each individual employee who already exists in the system. Assuming that hourly paid employees have been created, the p command should ask the user for the number of hours that each individual hourly paid employee has worked for.

The r command should prompt the user for a percentage rate. All salaries (annual and hourly) should be increased by this rate.

Additionally, the user should be able to display all the employees with an annual salary in ascending order, according to their salaries. I.e. the employee with the smallest salary should
be displayed first, the employee with the second smallest salary should be displayed next, etc
.
The program should implement the classes Employee (abstract class), HourlyEmployee, SalariedEmployee with appropriate methods.

Implement a test class which creates instances of all the implemented classes and tests their functionality.
---------------------

I've done a text based menu displaying the above options, but what do I put in the switch case for the menu for the different cases?

case 'N' : ???????

  • 4 Contributors
  • 4 Replies
  • 105 Views
  • 18 Hours Discussion Span
  • Latest Post Latest Post by verruckt24
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Seems to me you would put the code to carry out the operations you've been instructed to perform for each of those menu options.

Perhaps if you can post some code and ask more specific questions, someone here can help you out. They won't write it for you though.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You will create separate classes for your employees and they will have the attributes that are described in your assignment (name, hourly paid, ... ). Then the user eneters 'N' you will read the input specified, create a new object 'employee' and add to a list of employees (Use the java.util.Vector or the java.util.ArrayList class)

You will have methods that take as an argument the above Vector with employees and calculate what it is asked.

verruckt24 438 Posting Shark

hmm... sounds like an assignment to me, show us some code which asserts us about the work done by you and as mentioned above ask specific questions where you might get stuck up, then we may be able to assist you further.

verruckt24 438 Posting Shark

Also to get you started on it...when working with a OO langauge always break down the problem domain into classes and methods.
You have most of it done since you have been given classes too. Now you can identify the individual methods that should be put into each class and write your code.

jasimp commented: Very helpful +9
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/46437/basic-of-vb-net", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Basic of VB.net | DaniWeb

Basic of VB.net

nnchoudary 0 Newbie Poster

Hi all:

Is there any one who can help me out coping up with VB.net basics??
i am a fresh stater of VB.net if some one there to help their efforts are appreciated.

Thank you
NN

  • 4 Contributors
  • 3 Replies
  • 174 Views
  • 1 Week Discussion Span
  • Latest Post Latest Post by Bharati Krishna
zmind 0 Newbie Poster

hi NN

VB.Net is not difficult to learn though. If you have learned or programmed VB before (VB6), you should have the foundation already. The major different of VB6 and VB.Net is VB.Net now is part of a larger system named. Visual Studio 2005. Previously VB is an individual applicatin development tool but if has been integrated into Visual Studio 2005. VB.Net is a object oriented programming language. Unlike the previous version, you may struggle a little initially when you pick up vb.net as you need to understand namespaces, objects, classes, overloading, etc. I hope this will not scare you off. As long as you have learned VB before, you should not worry. The base structure of the language such as iteration, decision making syntax ,etc remains the same.

I would suggest you to pick up the following books to kick start your learning process

1. Visual Basic for Dummies (Wiley Publishing)
2. Visual Basic 2005 Step by Step (Microsoft Press)
3. Visual Basic 2005 JumpStart (O'Reilly)

Once you have mastered some basic skills from these books, you may wish to take a look at the WROX series book from Wiley Publishing. These books are OK but not for beginners. You may sometime 'lost' somewhere if you try to use WROX series book to teach you the basic of VB.Net.

Hope this will help. If need some help during the course of learning VB.Net, do drop me an email or message. I will try to help if possible.

cheers

zmind

Bharati Krishna 0 Newbie Poster

Hi,

Start with good tutorials or with good books. Try this title:\"Database programming using vb.net and sql server\", by VK publishers. This books will give you the complete application development in vb.net.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/code/216590/processing-two-lists-python", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Processing two Lists (Python) | DaniWeb

Processing two Lists (Python)

vegaseat 2 Tallied Votes 224 Views Share

The Python list container can be used for many practical things. In this somewhat light-hearted introspection of modern day politics we are looking at two lists and attempt to clear out elements that shouldn't be in both lists. No offense to anyone is intended, the outcome with the sets was a surprise to me.

# the government inner circle keeps two lists of countries\r\n# one is the yeList of countries that pretty well go along with any adventure \r\n# and the other list is the noList of countries that are not always with us\r\n# let's assume these lists have gotten longer and some countries now appear in both lists\r\n# you have to find which ones have dared to say no and remove them from the yeList\r\n# tested with Python24          vegaseat         04jul2005\r\n\r\nyeList = ['England','Italy','Portugal','Spain','Israel','Poland','Morocco','Japan','Danmark']\r\nnoList = ['China','Canada','Brazil','Germany','Iran','Spain','France','Russia','Turkey']\r\n\r\nprint "yeList =", yeList\r\nprint "noList  =", noList\r\n\r\nprint\r\n\r\n# since the original yeList would change, we are making a copy to use\r\n# (note, an alias like yesList = yeList has the identical address and would change too)\r\nyesList = yeList[:]\r\n\r\n# using try and except ...\r\nfor country in yesList:\r\n    try:\r\n        # if found in noList remove from yesList\r\n        pos = noList.index(country)\r\n        print pos, country  # test\r\n        yesList.remove(country)\r\n    except ValueError:\r\n        pass\r\n\r\nprint '-'*70\r\nprint "washed yesList =", yesList\r\n\r\nprint\r\n\r\n# another way to do this, using filter() ...\r\nyesList = yeList[:]\r\nyesList = filter(lambda s: s not in noList, yesList)\r\nprint '-'*70\r\nprint "laundered yesList =", yesList\r\n\r\nprint\r\n\r\n# yet another way to do it, using list comprehension ...\r\nyesList = yeList[:]\r\nyesList = [country for country in yesList if country not in noList]\r\nprint '-'*70\r\nprint "sanitary yesList =", yesList\r\n\r\nprint\r\n\r\n# should one of the lists be very long, then it is efficient to convert it to a set ...\r\nyesList = yeList[:]\r\nnoSet = set(noList)\r\nyesList = [country for country in yesList if country not in noSet]\r\nprint '-'*70\r\nprint "immaculate yesList =", yesList\r\n\r\nprint\r\n\r\n# fast algorithm, easy to comprehend, but changes the order ...\r\nyeSet = set(yeList)\r\nnoSet = set(noList)\r\nnewyesSet = yeSet - noSet\r\nprint "the newyesSet =", newyesSet
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague

Python v.2.4 has sets built-in. With earlier version you have to import sets.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/379527/re-use-mysql-result-set-in-perl", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Re use Mysql result set in Perl | DaniWeb

Re use Mysql result set in Perl

vaibhav1983 1 Junior Poster

Hi ALL,

I am writing a script to retreive entries from a DB. And then I loop through all the entries.

Once I am done looping through all the result sets, I have to re-loop over them again.

This is done in an infinite loop (Please don't ask why to do it infinitely :P).

The script is as follows.

$sth = $dbh->prepare($sql);
$sth->execute;
while()
{
while(@row = $sth->fetchrow_array())
{
//Working on the row returned.
}
}

The code has a wrapped infinite loop around it. So you can see the code as well, how I want it to work.

$sql is the sql query I am firing.

In PHP we have a function mysql_data_seek to resuse the result set.

Do we have something similar in Perl?
I am using DBI to make connection with MySql Database.

I will appreciate any help!

Regards
Vaibhav

  • 2 Contributors
  • 2 Replies
  • 246 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by d5e5
d5e5 109 Master Poster

I don't think you can re-use a result set with DBI base on this quote from this tutorial:

Cursors are used for sequential fetching operations: records are fetched in the order in which they are stored within the result set. Currently, records cannot be skipped over or randomly accessed. Furthermore, once a row addressed by a cursor has been fetched, it is ``forgotten'' by the cursor. That is, cursors cannot step backwards through a result set.

I think you could do what you want by moving the $sth->execute; into the start of your outer loop. Really you would be re-querying the database each time you iterate through that loop.

An alternative would be to copy each array into an array of arrays and iterate through that. Make sure you copy and save each array the array reference points to, instead of copying the same array ref multiple times, or you will end up with only the last row's data saved.

d5e5 109 Master Poster

I haven't tried this, but have a look at selectall_arrayref
Looks like @result = @{ $dbh->selectall_arrayref($sql, { Slice => {} }) }; puts all the rows of the result set into an array which you can then loop through as many times as you want.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/77470/little-help-with-gcc-gdb", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - Little help with gcc & gdb | DaniWeb

Little help with gcc & gdb

anw -2 Newbie Poster

I have a daemon I'm working on that seems to bomb out in the middle of strcmp, WAY down in the bowels of the ODBC library. It would run for hours, then just mysteriously quit (well, as mysteriously as a SIGSEGV can be)- classic memory corruption symptom. So, I built it with Electric Fence (which, at least superficially, seems a pretty nifty product). When I start it with gdb, this is what I get, pretty much immediately, as the program is initializing:

Note the shared libraries
#0 0xa7996270 in strcmp () from /lib/tls/libc.so.6
#1 0xa794a0d9 in setlocale () from /lib/tls/libc.so.6
#2 0xa60c43fa in my_SQLExtendedFetch () from /usr/lib/odbc/libmyodbc.so
#3 0xa60c45b6 in SQLFetch () from /usr/lib/odbc/libmyodbc.so
#4 0xa7a7d798 in SQLFetch () from /usr/lib/libodbc.so.1
#5 0x0805604b in t_dbBuffer<topic>::GetNext (this=0xa6a8cfd8,
data=@0xafe3e468)
at /home/anw/SoftwareProducts/Headers/dbTempDef.h:195
#6 0x08050844 in rssd::InitRSS (this=0xa6d4cf1c) at rssd.cpp:808
#7 0x08050997 in rssd::AppInit (this=0xa6d4cf1c) at rssd.cpp:667
#8 0x0805c9b6 in main (argc=1, argv=0xafe3e6a4) at App.cpp:47

I've got at least two questions here: I wrote my own quick and dirty strcmp to at least try and find out what the comparison strings were, but, although all the code I wrote picks up my strcmp, this part of the code doesn't.

Why would it use two different copies of strcmp?
How do I force it to use my version?

Here's the compile line, with all make substitutions done:

gcc rssd.cpp topic.o user.o subscription.o smsClt.o -o rssd -g -D_LINUX -I ~anw/Software/Headers -I /usr/include/nptl -L /usr/lib/debug -L~anw/Software/Libraries -L /usr/lib/nptl -D _LINUX -DNETDATASVC_EXPORTS -lApp -lLog -lxml -lxerces-c -lstdc++ -lpthread -lSimpleNet -lSerPort -lodbc -lDBUtils -lefence
rm topic.o subscription.o user.o smsClt.o

My strcmp is in the library ~anw/Software/Libraries/libDBUtils.a.

Note, also, that I have the debug versions of the standard libraries installed (the -L /usr/lib/debug switch), and, evidently, it's not picking up those either.

TIA,
anw

c++
  • 3 Contributors
  • 5 Replies
  • 109 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by Salem
Narue 5,707 Bad Cop Team Colleague

>Why would it use two different copies of strcmp?
Presumably the two copies are the standard strcmp and your own strcmp with the same name. Overriding a standard function with a custom function of the same name is tricky business.

>How do I force it to use my version?
Give your version a unique name and make sure that the unique name is used instead of strcmp.

Salem 5,199 Posting Sage

> Here's the compile line, with all make substitutions done:
Is that what doing \"gcc -v\" told you?

I'm at least a little suspicious about whether ~ expansions work or not in this context.

Also, why are you using gcc to compile C++?
The usual method would be to use g++, then you get all the correct libraries and startup code executed.

anw -2 Newbie Poster

The whole point is to replace the standard strcmp with my own; I want setlocale, in particular to use it because that is where the problem is. I don't want just my code to use it.

Why is it picking up the libc version instead of mine? And, if it wants to get the system version, why won't it take the debug version in the directory specified with the -L /usr/lib/debug switch, since that is first on the library line?

TIA
anw

anw -2 Newbie Poster

No, that's not what gcc -v told me, it's what make echo'd back. Will that not be the same?

Good point about ~expansions. I'll try that.

Also good point about gcc vs. g++. Don't know what the differences are; I've compiled a lot of C++ code with gcc, but I think now is a good time to start using the right tool for the job. Could be there is some weird interaction between all these strange new libraries I'm using and not using g++. xerces is specifically a C++ package, and odbc is specifically a C package. I'll make that particular change right now.

Thanks.

iamthwee commented: You compile c++ with gcc, you are joking aren't you? -2
Salem 5,199 Posting Sage

Saying g++ means that all the correct options get passed to the linker (not just -lstdc++, lot of other goodies as well no doubt).

One important thing may be arranging for global constructors and destructors to be called.

> strcmp()
Look up the --wrap linker command line switch, which allows you to replace one function with another.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/293238/refresh-a-form", + "domain": "daniweb.com", + "file_source": "part-00231-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-basic - Refresh a form [SOLVED] | DaniWeb

Refresh a form

shena 0 Junior Poster in Training

Hi all,

How to create refresh Button in the form? I have combo box with the
data linked to Access database. I create another form for data input for
those that appear on the combo box. When I close the input form, I
realise that the data is not yet appear on the combo box. I have to
close the first form, then open again. Then the data had included on the
combo box. Instead of doing this thing, I believe refresh button will
help a lot.

Any help please.

Thanks/shena

  • 2 Contributors
  • 3 Replies
  • 267 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by AndreRet
AndreRet 526 Senior Poster

The best way in getting the data loaded to your combo box is to write a function and then call it every time you need to re-load the data \"refresh data\".

You will use something like -

Private Function LoadMyData()\n\nSet rsLoadMyData = New ADODB.Recordset\n\nrsLoadMyData.Open \"SELECT MyChosenFieldToLoad FROM MyDataTable\", conn, ....\n\nCombo1.Clear\n\nDo while rsLoadMyData.EOF = False\n   combo1.AddItem rsLoadMyData!MyChosenFieldToLoad\n   rsLoadMyData.MoveNext\nLoop\n\nEnd Sub

Under say a command button click event, you will have the following -

Call LoadMyData\n\nfrmInputData.Show\n\nUnload Me

I hope this is what you were looking for.

shena 0 Junior Poster in Training

Hey friend,

Yes, this is what i was looking for. The function works better. Thank you so much for your kind help.

Thanks/shena

AndreRet 526 Senior Poster

Only a pleasure Shena

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/108802/crystal-report-question", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-basic - Crystal Report Question | DaniWeb

Crystal Report Question

werks 0 Junior Poster in Training

Hi guyz, i have a question about crystal report . How to connect the Crystal Report in MS Access (w/ a password security).. Cause i can't seem to connect it with a password database..tnx in advance

  • 3 Contributors
  • 6 Replies
  • 93 Views
  • 7 Months Discussion Span
  • Latest Post Latest Post by sganandhsg
choudhuryshouvi 33 Posting Pro

you can connect the crystal report to both of your access table or any query that you created for the purpose. but it is better that you use an query in your report. the steps are :-

1. first create the table and then create an query
2. in the crystal report ide select new->as a blank report(from the gallary wizard)
3. from the data explorer window expand the database files folder and double click find database file
4. then locate ur access db and open it
5. if the database is passwd protected then mention it
6. after this all of ur tables and all associated queries will be displayed
7. then the option will be on ur hand whether you need to use an table or query to build the report. just double click to add it to the field explorer.

now if you need to access the database from ur application by cracking the password u can try this code :-

dim db as database,rs as recordset

Set db = OpenDatabase(\"<your database file path>\", False, False, \";pwd=<your database password>\")
Set rs = db.OpenRecordset(\"<your table name\", dbOpenTable)


hope this is enough for your purpose
let me know if this works out for you.

regards
Shouvik

werks 0 Junior Poster in Training

tnx choudhuryshouvi

choudhuryshouvi 33 Posting Pro

you are welcome
try it and give me ur feedback

werks 0 Junior Poster in Training

I'll try it tomorrow..

choudhuryshouvi 33 Posting Pro

when will u try it completely depends upto you and it really doesn't any matter.

just give me your feedback
that's all what i need from you.

ok
bye

sganandhsg 0 Light Poster

how to set application path to crystal report using VB6.0 and Ms access

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/479379/three-partitions-can-t-install-format", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-vista-7-8 - Three partitions, can't install/format [SOLVED] | DaniWeb

Three partitions, can't install/format

blackmiau 0 Junior Poster

I have a hard drive that is meant to have Win7 installed. It cancels the installation by itself, right at the beginning, error code 0x80070017.

This drive has partitions c: d: and x:

I tried formatting x: from cmd and it says it's write protected. Tried with d: and I'm not allowed.

I'm not very at ease with cmd... so, what am I doing wrong?

  • 6 Contributors
  • 15 Replies
  • 235 Views
  • 3 Months Discussion Span
  • Latest Post Latest Post by jp_keyboard
JorgeM 958 Problem Solver Team Colleague Featured Poster

Several sources on various sites have reported similar issues. The most common answer that many have agreed to have solved this problem is that the media that you are using to install Windows needs to be re-burned at a slower burning speed.

Is this is genuine Windows DVD? If you have the ISO and burned your own media, either burn it a slower speed, or use a USB device to install from.

blackmiau 0 Junior Poster

It's a copy of the original, which is official and paid for, and safely kept in the City Hall's vault for some reason... It's also the one we're using for the Library's computers with no failed installations so far. I think it might be the dvd drive that stops responding at some point.

JorgeM 958 Problem Solver Team Colleague Featured Poster

Ok so if you have already tested this media on other computers and you havent encountered an issue, I would agree that this media is likely to be good. OR, the DVD player in that particular computer isnt able to read that media burned at that speed, OR as you suggest.. there could be a problem with the DVD drive itself.

its fairly easy and quick to swap out the DVD drive and test again.

khakilang -3 Posting Pro in Training

You can try to install with the original window 7 DVD to see whether the DVD drive is working before proceed to changing the DVD drive.

blackmiau 0 Junior Poster

kept in the City Hall's vault for some reason

That means I can't absolutely, under no circumstance, get my hands on it...

Anyway, I switched disks. This one has the same three partitions mentioned on the original post which is a pain.

Same error with the cd.

Time to gut the machine.

blackmiau 0 Junior Poster

Apparently the problem solved itself overnight...?

I switched on the pc today without doing anything to it, and it is now ready to be returned with a fresh copy of Win7. And it's working fine, too...

JorgeM 958 Problem Solver Team Colleague Featured Poster

Its probably the DVD drive going bad. I wouldnt worry about it, but make a note in case the user reports a similar problem in the future.

blackmiau 0 Junior Poster

I'm just happy because this computer was in really bad shape and I managed to salvage it from the bin :)

gerbil 216 Industrious Poster

\"safely kept in the City Hall's vault for some reason\"
Gosh. Just... gosh. Microsoft has an official download site for the W7 installer flavours. Free....

blackmiau commented: tell it to my manager... +2
blackmiau 0 Junior Poster

We have strict orders to only use what they give us. Being an unpaid internship, I do as they tell me, otherwise my grade can go down on accounts of \"not doing what was told\". So, I couldn't care less really...

gerbil 216 Industrious Poster

\"Being an unpaid internship, I do as they tell me, otherwise my grade can go down\"
Oh dear, would that mean that then you pay them? Just what ladder rung are you on? Ah... you're holding it...
No need to answer... :) We all start somewhere.

blackmiau 0 Junior Poster

It's part of my course. Instead of making a huge final project, I'm having this internship with a written report at the end.

-shrugs-

gerbil 216 Industrious Poster

Right. I have never resolved whether the stress of being assessed on points-heavy projects or major examinations was a valid test of work-readiness. Your real-world performance assessment is rather like the internship doctors must go through. Good luck with it.

blackmiau commented: thank you :) +0
goldeagle2005 33 Finkus Stinkalotus Team Colleague

Looking at the partitions on the 2nd screen cap, I seriously doubt that this was a DVD/DVD drive issue. This looks more like something to do with the partitions going awry. The \"System Reserved\" and \"Boot\" paritions are created by the OS when installed and are usually hidden and should not be visible. I would instead try to clean the entire hard drive using the diskpart command. Heaven knows I've resolved a number of such issues using diskpart. If anyone wants to know the exact commands, let me know and I'd be happy to elaborate :)

jp_keyboard 0 Newbie Poster

Hello!
Well, this question has already been solved, but I would like to have the exact diskpart commands Mr Goldeagle2005. Thanks!

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/digital-media/ui-ux-design/threads/63154/dunno-how-to-make-a-good-site", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " web-design - Dunno how to make a good Site?? | DaniWeb

Dunno how to make a good Site??

The Dude 944 Nearly a Senior Poster
  • 3 Contributors
  • 4 Replies
  • 143 Views
  • 1 Month Discussion Span
  • Latest Post Latest Post by roryt
roryt 150 Nearly a Posting Virtuoso

This Post Should Be Deleted It Is Nothing But spam

\"Member
GreenDay2001

This Post Should Be Deleted It Is Nothing But spam

I agree with this.

The Dude commented: Â -2
The Dude 944 Nearly a Senior Poster

I dont consider it spam!!!!!

Its a site offering free templates whats wrong with that??

GreenDay2001 commented: Believe it or not, its a spam spam spam!!! Hell yeah, did you forget to give -ve rep 2 years back. -1
roryt 150 Nearly a Posting Virtuoso

The fact that you are giving the information to people who may not want it makes it spam. It is also giving free advertisement to someone

The Dude commented: Â -2
iamthwee commented: Ignore it mate. +18
John A commented: For being emotional about your reputation. -4
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/35840/java-to-c", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Java to C?? | DaniWeb

Java to C??

nabil1983 0 Junior Poster in Training

Does anyone know wether i can convert a Java written program to C?

Thank You

  • 2 Contributors
  • 2 Replies
  • 115 Views
  • 10 Hours Discussion Span
  • Latest Post Latest Post by hollystyles
hollystyles 113 Veteran Poster

There is some sotware called Toba here:

http://www.thefreecountry.com/compilers/java.shtml

But I guess there wasn't much call for it, as it isn't supported and only works for Java 1.1.

If you are looking to compile Java to native code you can do that directly without the C step. Which also can be found via the above link or just Google a bit.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/415581/windows-8-c-cx-help-needed-stringstream-equivalent", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Windows 8 C++CX help needed (stringstream ... [SOLVED] | DaniWeb

Windows 8 C++CX help needed (stringstream equivalent)

BCBTP 0 Light Poster

Hello, people on daniweb.
I was programming in C++CX for a metro application I am making, and needed to do a little string manipulation.

Does anyone know if there is a way to individually edit members of String^, like an array, or if there is some equivalent to stringstream on C++CX? Just wondering, as the documentation isn't as complete as some as it is in beta.
Thanks, ahead!

c++
  • 2 Contributors
  • 7 Replies
  • 285 Views
  • 11 Hours Discussion Span
  • Latest Post Latest Post by thines01
thines01 401 Postaholic Team Colleague Featured Poster

Is there no StringBuilder?

BCBTP 0 Light Poster

Never mind I found a solution. You just make a wstring and set it to String^'s Data. To set it back you make the String^ equal the wstring.c_str().

BCBTP 0 Light Poster

What is StringBuilder?

thines01 401 Postaholic Team Colleague Featured Poster

...a mutable string of characters that is used to build a string.

BCBTP 0 Light Poster

Yeah honestly I don't know because I don't use them. Looks like CLI stuff if you ask me which kind of looks like CX but honestly I Don't know. I would check but I an responding from my phone.

BCBTP 0 Light Poster

Yeah, that is definitely CLI stuff, with .NET so it is completely unrelated to what I am talking about... It is probably in C# or something, but I don't like .NET languages. C++CX is C++ with Component Extensions, so it is easier to make metro applications.

thines01 401 Postaholic Team Colleague Featured Poster

When I saw String^, I immediately thought CLI.
Even java has the concept of the StringBuilder, so I thought you might find an equivalent.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/7437/ie-stops-working-after-10-minutes", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " web-browser - IE Stops Working After 10 Minutes | DaniWeb

IE Stops Working After 10 Minutes

steelman 0 Newbie Poster

I'm having some IE problems. I can only view web pages on IE for 10 minutes when my computer first boots up, after that, I cannot display any pages. I have Internet connectivity, I can ping sites and use instant messenger, however no web pages will load. Any thoughts???

  • 23 Contributors
  • 32 Replies
  • 434 Views
  • 7 Years Discussion Span
  • Latest Post Latest Post by caperjack
Dani 4,402 The Queen of DaniWeb Administrator Featured Poster Premium Member

I am behind a switch and a cable modem, and sometimes this happens to me, too. I actually have to go into my Linksys switch control panel, and renew my cable modem's IP address, and suddenly it all works again. No idea why - I'm sure it's because I probably have something misconfigured. Are you on dial-up? DSL? Cable?

steelman 0 Newbie Poster

Thanks for the tip, but I tried what you said and the problem remains. Thanks anyways.

saliva 0 Newbie Poster

not quite sure if this will help but you might want to disable 3rd-party toolbars (e.g. Google or Yahoo toolbar) if you have any by going to Tools>InternetOptions>Advanced and uncheck \"Enable third party browser extensions\"

steelman 0 Newbie Poster

i do have a google toolbar so i tried disabling it, uninstalling it, and unchecking the browser extensions box, unfortuanately i still can't view pages. however, i did notice that i can still view secured pages that use ssl, i don't know why this is, but they are the only sites i can view after 10 minutes. thanks for the help though!

techahbeng 0 Newbie Poster

The latest variants of viruses cause this problem on several of my client's site. If you telnet into the router, you will see tonnes of outgoing connections to random Ip addresses.

Thus if one machine on the network is infected, it is enough to slow down the Internet connection to 0. Because the virus is trying to push 100MB of outgoing traffic through your 512k/1MB cable or broadband connection.

Spywares are also another culprit but to a lesser extend.

steelman 0 Newbie Poster

thanks for the tip, i'll try looking into that.

smilinjack 0 Newbie Poster

I'm having some IE problems. I can only view web pages on IE for 10 minutes when my computer first boots up, after that, I cannot display any pages. I have Internet connectivity, I can ping sites and use instant messenger, however no web pages will load. Any thoughts???

Been having the exact same problems since last wednesday...have any success yet?
over and out

VIP0R 0 Newbie Poster

Ive also got this problem, it start at least a week ago, and I first noticed strange things that was going on with MSN Messenger, when I clicked Email, IE opens up, then it says done (in the bottom left) almost straight away and is Blank

If I restart Computer it works fine for a while, and also if I use Firefox after it wouldnt work in IE, it worked fine

but now Firefox also stops workin, but I can still connect to Steam and play on the servers, I can also talk on MsN

So im thinking it must be a new Virus or something, but all the scanners cant find anything

So any help would be nice

Thanks for your time! ;)

smilinjack 0 Newbie Poster

Had the same problem exactly....................just fixed it abt 45 minutes ago by down loading ZONE ALARM Security Suite....it still working ok....

from: smilinjack 7/29/04.

smilinjack 0 Newbie Poster

I am behind a switch and a cable modem, and sometimes this happens to me, too. I actually have to go into my Linksys switch control panel, and renew my cable modem's IP address, and suddenly it all works again. No idea why - I'm sure it's because I probably have something misconfigured. Are you on dial-up? DSL? Cable?

Just fixed mine by loading ZONE ALARM SECURITY Suit.......it's working great.

MrXCLNC 0 Newbie Poster

For the people who fixed it by downloading Zone Alarm, do you actually know what was wrong? I started noticing this problem after doing one of the latest Windows Update for a security hole in Internet Explorer. It does not happen on my PC running Windows 2000. But both of the XP machines are effected after about 15 minutes.

techahbeng 0 Newbie Poster

For the people who fixed it by downloading Zone Alarm, do you actually know what was wrong?

There are infected machines on the Internet that will attempt to compromise your system via the various exploit on Microsoft OSs, namely Windows 2000 and XP.

The code of the worm were badly written, thus causing reboots on Windows XP but not Windows 2000 machines. That doesn't mean that the 2000 machines are not infected but rather the worm runs properly on it.

By installing Zone Alarm, common ports that these worms attack (port 445) are closed thus you do not get the rebooting.

You should still patch your system thorough through Windows Update.

steelman 0 Newbie Poster

i finally gave up and reformatted my hard drive, and of course the problem went away.

saliva 0 Newbie Poster

people, exactly which virus are you referring to??? and if so, which exploit? perhaps if you know these info, there just might be a patch as well, no? it seems that speculation wouldn't solve the problem. As for ZoneAlarm, why don't you share the log file...and the HijackThis log as well

DMR 152 Wombat At Large Team Colleague

...and the HijackThis log as well

Please do not advise people to post HJT logs or other virus/spyware/security- related info in this forum. All posts/questions of that sort need to be posted in our Security forum.

Thanks.

theWolf 0 Newbie Poster

I'm having some IE problems. I can only view web pages on IE for 10 minutes when my computer first boots up, after that, I cannot display any pages. I have Internet connectivity, I can ping sites and use instant messenger, however no web pages will load. Any thoughts???

I was having the exact same problem, and found a solution. My solution worked on a machine running Windows XP Pro, SP2.

The culprit was a malware trojan which had installed itself as winlogon32.exe in the \\system32 directory. I became suspicious when I saw the program asking ZoneAlarm for server rights, in the middle of my internet browsing session.

The solution is to prevent the program from starting up with windows. If you are infected, this program will be called from the registry to start with windows. I disabled it by using a free startup manager called CodeStuff Starter and unchecking all references to the program (in my case, it was being called 3 times!). Then reboot, and you should be good to go.

I have read that particular trojan can also go by several other names, so in your case it might not be winlogon32.exe. Oh, by the way, running AdAware and Spybot did not find this trojan, so until they update it, you've got to make the repair manually as I described.

Hope this works for you, I know it is a frustrating problem.

-theWolf

algue 0 Newbie Poster

Now I'm having the same problem, too.
I'm going to try to follow your instructions, Wolf

ma_noj 0 Newbie Poster

all these are caused by algs.exe not \"alg.exe\" which is a program which stops your internet
after working for 5 min & starts sending some sync requests to un known IP.

if you see this


Download Hiren'sBootCD9.1 from the internet make a CD from the downloded image

(http://blog.360.yahoo.com/blog-cDFWKscyc6MYbBtOJtLtLVeaVQ--?cq=1&tag=hiren'sbootcd9.0inclkeyboardpatch)
or find on the Google you can get this URL.

run the CD on the effected PC select the \"CCleaner\" from the auto run
this will open a program window

or download CCleaner & EzPCFix from the net if it is available seperately on the internet

select CCleaner & Click \"Run Cleaner\" click \"yes\" next it displays the list of things
with the select option & every thing unwanted will be erased.

next select the \"Issues\" from the \"CCleaner\" window click on \"Scan for Issues\"
by default all the list of things displayed below will be selected then click on
\"Fix selected issues... then in the pop up window click \"No\"then in the next window
click the button with Fix All Selected Issues this will clear most of the issues.

next select the \"Tools\" from the \"CCleaner\" window check if you have any un wanted program
which is not displayed in the add remove prograns you can remove them from here.

then close this CCleaner

Click on the EzPCFix from the auto run Program window

Click the \"Load Hives\" from the Ez-Pc-Fix window once loded.

do not select users on the left side select the Registry Keys and
double click this and you will find the \"algs.exe\" select this and click on Remove items.
then close the Registry Key window.

select and double click the \"Service\" select and remove any unwanted programs.

Thats it now you can connect to the internet without any problem or limits

regards

manoj

The Dude 944 Nearly a Senior Poster

Welcome to Daniweb!

I have always wondered what this \"ALG.EXE\" is (Sounds like spyware)

So what happens if you \"End task\" on it?? (No network?)

nemesis2k8 0 Newbie Poster

I had the same problem but I found out what caused it really! ....
......................................................................
I found that the problem was zonealarm if you have installed zonealarm recently and uninstalled it recently and this started to happen first check if you have fully uninstalled zonealarm second go to c:/window/system32/(the zone alarm folder delete and I think the net should start working again hope it helps :)
....................................................................

Steve H 0 Newbie Poster

I have the same problem, and have tried everything mentioned (except Zone Alarm), but no luck. Any other ideas?

The Dude 944 Nearly a Senior Poster

Welcome to Daniweb both of you!!

Marton 0 Newbie Poster

Just had the same issue this afternoon while fixing a customer's PC, and worked for 4 hours on it: removed everything suspect from startup and services with HiJackThis, checked hidden processes with SmitFraudFix, rolled back the PC with System Restore a few times, used WinSockXPFix and LSPFix... I tried everything I saw on forums etc. The PC was CLEAN. It had eTrust PC Security (or something like that) which I uninstalled. Later I found that it has a bundled Zone Alarm, so started digging on manual uninstall of ZoneAlarm. Supposedly there should be a ZoneAlarm folder on System32 but there wasn't, so I manually looked for ZoneAlarm files on System32 and found vsdatant.sys, tried to delete and file was in use. I then booted to Safe Mode, deleted the file and voilà! Worked like a charm! I hope someone finds this information useful. Now a question: does somebody know a way to find the \"running\" .sys drivers on a PC? If such tool exists, it could have saved me a lot of time while searching for the problem. Take care!

Friend489 0 Newbie Poster

what is \"hijack this\" ?

xxcarlyxx 0 Newbie Poster

This happened to me before. After about an hour or so my internet would just stop working. Msn would still work though. I had Internet Explorer and Safari. I got rid of safari the other day and got Opera instead. Everything is fine now :) .. well I hope so!

Peter Yag 0 Newbie Poster

Here's I fixed my http connection dying after 10 minutes. Strangely was able to access https and ping websites.

Ran spybot, adware, regmechanic, hijackthis, anti-virus, malwarebytes to no avail!

The problem was Zone Alarm or some spyware acting as Zonealarm

Go to Start > Programs > ZoneLabs and click Uninstall, or uninstall ZA using Control Panel > Software > Add/Remove Programs.

If a security check appears, click Yes and continue the uninstall procedure.

* REBOOT

* Make sure hidden files and folders are shown. To do so open Windows Explorer. Depending on your OS click Tools or View and then Folder Options > View.

Choose Show hidden files and folders, uncheck Hide protected operating system files (Windows 2000/XP/2003 only) and click OK.

* Next go to Start > Search > Files and Folders. Make sure the location box is set to search your Local Hard Drive (usually C:\\ ) or All Local Drives. Also make

sure the Advanced Search Options are set to search subfolders and hidden files. Now copy the entire line below, paste it into the search box and click Search Now.


Zonelabs; \"zone labs\"; \"Internet logs\"; vsconfig.xml; vsdata.dll; vsdata95.vxd; vsdatant.sys; vsmon.*; vsmonapi.dll; vsnetutils.dll;vspubapi.dll; zaplus.*; zapro.*; zllictbl.dat; zlparser.dll; zonealarm.exe; zoneband.dll; vsutil.dll; zlclient.*

A list of files and folders belonging to ZoneAlarm will appear in the Search Results pane.

Note: if you’re using McAfee software be sure to check the vsutil.dll if found: right click the file and choose Properties. Verify it belongs to ZoneLabs.

If it does not do not remove it. Now proceed by deleting all ZoneLabs files and folders that were found.

* Empty the Recycle Bin.

* Now remove all ZoneLabs keys that may be left in the Windows registry. To do this copy the lines below and paste them into Notepad.

Save the file as zabegone.reg, double click it and allow for the registry changes to be made.


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


REGEDIT4

[-HKEY_CLASSES_ROOT\\ZAMailSafe]

[-HKEY_CURRENT_USER\\Software\\Zone Labs]

[-HKEY_LOCAL_MACHINE\\Software\\Zone Labs]

[-HKEY_USERS\\.DEFAULT\\Software\\Zone Labs]


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


* REBOOT

ZoneAlarm will now be completely removed from your computer. If you wish to install a new copy of ZA, be sure to do so under an administrator account

with full rights and permissions.

That's all!

sg9 0 Newbie Poster

SOLVED
This file might be your problem

vsdatant.sys

to correct the situation set the value to 3. Here is how

click start

go to run

type: regedit

HKEY_LOCAL_MACHINE
SYSTEM
Currentcontrolset
Services
vsdatant
change the parameter in ''Start'' to 3.

This will surely solve your problem. The current value is probably 2, it needs to be 3

Your problem was as follow:
HTTP sites are blocked after 10 minutes while the HTTPS and FTP sites are still active. You needed to reboot in order to gain access once again the HTTP web sites but only for 10 minutes.

I hope this solves your problem

uabookie 0 Newbie Poster

sg9...thanks so much. I had tried so many other potential solutions and yours worked. I am very grateful to have my laptop back so I can use it for the 11th minute and beyond.

The Dude 944 Nearly a Senior Poster

Welcome :)

Im glad you found an answer so quickly!!

Please feel free to stick around :)

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/274517/c-chat-application-push-technology", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " C# Chat Application Push technology | DaniWeb

C# Chat Application Push technology

TotoTitus 6 Junior Poster in Training

Hello everyone,
I need some advice.

I have been given an assignment to construct some kind of chat application which uses push technology (In C#, so i have socket objects and all that)
Reading on the internet, i came to know that push technology means in essence, that not the client makes requests, but the server updates content when 'it thinks it's appropriate' (mostly on a time-based schedule, or as soon as new data arrives).
Now i need a few ideas an hints, from you guys who are more knowledgeable in this domain.
My main questions arise here:
If a client logs in, and starts chatting with another one, a regular messenger client would open a connection to the other client, essentially making it a Peer2Peer mini-application, with no server interference. The only actual role of the server would be to update the list of contacts as they 'log in' and 'log out'.
Is this particular implementation good? How do other messenger-chat-apps work? Shouldn't the information pass through the server? If the server's only role is to announce who is 'logged in' and 'logged off', then why bother implementing push technology? (I've been given the assignment, with the words 'push technology' stressed out).
Also some advice regarding socket implementation / problems encountered is appreciated.

Looking forward to hearing your answers.
Thank you.

c#
  • 4 Contributors
  • 12 Replies
  • 932 Views
  • 1 Month Discussion Span
  • Latest Post Latest Post by Diamonddrake
kvprajapati 1,826 Posting Genius Team Colleague

Have a look at this blog.

TotoTitus 6 Junior Poster in Training

Good article, but i still need more info about push technology (which is not so-easily-available on Google...well anyway it's better receiving a straight answer on a forum)

Diamonddrake 397 Master Poster

I have never heard the term \"Push Tech\" but To my knowledge most chat applications go through the server for everything. But there is a possible peer to peer relationship that can be established.

Normally. The client messengers contact the server. the server has a thread pool of sockets blocking waiting to accept new client connections. Then once the handshake is made, the socket with the client connection is passed to a thread pool for redirecting messages. And the client's login name is added to a list. Then when a client sends a message to another client. It actualy is sending the message to the server like\"attention:client name: message\" the server then write that message to the socket for that intended client. The client has a thread constantly blocking on a socket read waiting for new mesagges. once it gets one it shows it to the user and goes back to blocking on a socket read. and the gui thread is always open to write outgoing messages or update the display.

now in a server logged peer2peer situation, Clients connect to a server just to tell the server where they are, who they are, and what they can do, and get a list of that information about other logged in clients. So then each client has the information it needs to make a direct connection to other clients. But this requires ports to be opened and other hassles. But it keeps the load off the server, so a small server can provide for many clients.

There are TONS of examples online of how to make chat applications. It doesn't really take 20 minutes to write a real world usable chat server and client in .net.

Have fun with it. I know I did.

kvprajapati commented: Indeed. +9
TotoTitus 6 Junior Poster in Training

Thank you. Will post here if within the process i encounter some special problems.

TotoTitus 6 Junior Poster in Training

I've just come over another thing: My application should handle ~10.000 connections at the same time, and i've read that TcpListener / TcpClient, while providing a higher level of abstraction, are 'slower' than the simple base Socket class. Is this true? Should i use a Tcplistener for the server, and socket objects for clients ?

Diamonddrake 397 Master Poster

The wrapper classes are technically slower than the base socket class. But if you need the functionality of them you will end up building your own wrapper for the base socket class that will likely have its own performance drawbacks.

So its not exactly a simple question. Best I can advise it to research other programmers results and see what combination of techniques best serves your purpose.

TotoTitus 6 Junior Poster in Training

I've done some few hours of work, i came up with this...but for some reason it ain't working...
I've made two separate projects for the client and server: They should be able to communicate with each other, but they aren't.

Diamonddrake 397 Master Poster

Well for starters you are using 2 separate stream objects, and using them quite oddly.

you should just be using 1 NetworkStream object instead of your stream reader and writer objects. NetworkStream clientstream = client.GetStream() This will allow you to read and write to the network with one object and its also important that you always write Bytes to the stream. you can't just write text to the stream you need to convert the text to a byte array in a buffer and send it in chunks. small strings it doesn't matter much. But if it were an entire paragraph you aren't going to get 1 to 1 writes and reads.

But none of that really matters. It doesn't work because your two application use DIFFERENT PORTS! your client is trying to connect to port 1000 while your server is listening on port 4296. Change the port in the connect method of the client app to match the listener on the server and you should be good to go. assuming that you have your ports forwarded on your network, unless of course you use local host.

Also your threading is kinda sketchy, but it should work. that application.doevents() appears to be used in an odd fashion. See what you can do with the information i have given you. If you can't get it working right I will go back and edit the projects and re-post them. I would have already done that. But you are doing a great job and its so much more empowering to figure it out yourself with a little nudge. That and I'm kinda busy at the moment. i just wanted to stop by and participate in the world as I do from time to time.

TotoTitus 6 Junior Poster in Training

Alright, i've made the client-server thing work, i mean they can communicate.
But i've been thinking how to make stuff work on a larger scale, and i've come with this idea:
Every client employs one UDP socket and one TCP socket. The TCP socket is used to communicate with the server(stable connection) and the UDP socket is used to communicate with everyone else. The server would handle only logon/logoff messages transmitted between the clients, and everything else would be handled by the UDP sockets.
I've made this small application (in the final stage, the IP list would be supplied by the server, for now you have to add the IP's yourself). Some sort of communication is going on, but when i try to communicate with myself (127.0.0.1) the whole thing freezes ( a form is created form each private chat ) .
I need some guidelines on this one, especially on threading issues.
Thanks !

sknake 1,622 Senior Poster Featured Poster

Out of curiosity have you read the WCF/WPF Chatter codeproject article?
http://www.codeproject.com/KB/WCF/WCFWPFChat.aspx

You could use WCF to generate proxy clients that will handle threading for you by applying attributes on the contract implementation. There is also a \"workaround\" for using shared assemblies (instead of proxies) and having .NET handle the threading for you:
http://ayende.com/Blog/archive/2008/03/29/WCF-Async-without-proxies.aspx

I have also read over this thread and i'm not seeing a compelling reason for deciding on p2p, nor why you would use UDP over TCP. Usually UDP is used for RTP (real time protocols) such as video streaming or voice streaming. UDP does not ensure data delivery so if packets are lost -- then transmissions are lost, meaning a crackle in the phone or missed updates on your video player. With TCP they would \"catch up\" and replay the missed media (undesired). With text-based chat I believe you want to ensure the message was transmitted properly. You also run in to numerous issues with firewalls etc etc when using a p2p approach. Take a look at the IRC protocol.

kvprajapati commented: Good point. +9
TotoTitus 6 Junior Poster in Training

Alright, i'll try to go on. But the reason i tried going UDP is that i read somewhere on codeproject that TCP generates a lot of overhead, and that connectionless transmitting of data is very efficient.
Erm...as a response to you first link....i'll try to study it (i already looked at it) but hey, it's huge !. Maybe it sounds stupid, but can't i make a working-with-minimum features app with only ~300-500 lines of code? (not that i wouldn't write more, but i want to know exactly what i'm plunging into). thnks.

Diamonddrake 397 Master Poster

interesting article sknake, but titus i can agree that its a LOT of code. I wouldn't worry about the overhead of a TCP socket, Each user isn't going to have 120 open convertsations. As sknake pointed out, UDP is best used for live streams like audio. If you were to add a skype feature to your chat app. you would certainly want that p2p UDP connection. But just for text. TCP is best.

Using the P2P system you are pointing out would put significantly less stress on the server. But the question here is, are you planning to have 20,000 users? If not, having the server handle everything would be fine, assuming you created a nice thread pool that would cycle through pending messages and deploy them.

Its always nice to have your tools handle the trouble spots for you. like apps that generate objects based on xml schemas and tools that create asynchronous methods from a class or even compiled code. But it doesn't hurt when in a learning environment to try and do it by hand, just so you really know what's going on, how it works, and why it there.

Regardless, no matter how neat it is to make a chat application, unless you really feel like you can compete with Yahoo, Aim, MSNMessenger, Trillian, and Pidgin. Then its just a learning experience anyways. In which case, dive in and make mistakes that you learn from.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/threads/48052/problems-adding-video-card-slot-questions", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " motherboards-cpu-ram - Problems adding video card; slot questions | DaniWeb

Problems adding video card; slot questions

johnphoto 0 Newbie Poster

I have a P4 2ghz box running XP h ed; the mobo is made by Elite Group (ECS); BIOS build from mid-2002. Box assembler Wintergreen via Tigerdirect. mobo video is Radeon 7000 with VGA connector.

I need to run a 4-year-old Apple LCD monitor with DVI connector. I bought a Radeon 700 PCI DVI card, but while the PCI screen lights up, it only showed up as extended desktop at 640x480 (whether a DVI or VGA monitor was connected to PCI); primary screen was mobo VGA even if no monitor was connected to mobo. In Properties, make PCI primary monitor option grayed out; other options like changing resolution available, but didn't 'take' when OK or Apply was clicked. Card maker (Powercolor) said I have a conflict, talk to Wintergreen; they said that mobo MIGHT be able to automatically detect add-on card if it is AGP, probably not PCI, and couldn't help. Also that there might be jumpers on mobo, but I couldn't find any.

So I bought a AGP card (Geforce3 Ti 200), but XP hangs during startup with the card installed; and the drivers won't install if the card is not present. The card's fan doesn't spin. I tried booting with a Linux CD (that I use for Tivo tools) with just the AGP monitor connected, but no signs of life. (CD boots into Linux OK with mobo video).

The slot is 'universal', ie no notches. Any suggestions on what might be happening and what to try next?

Would a male VGA (card side) to female DVI adapter connected mobo be likely to work?

Ram question...mobo has two PC133 slots, and two empty slots of same length right next to them. After getting two more PC133 modules, I realized that the empty slots are keyed differently (one notch key) and a different color (red). Any clues as to what these might be?

I'm very familiar with upgrading/troubleshooting Mac, and computer-savvy enogh to use my Win box to upgrade Tivo for example, but a relative beginner to messing with Windows, eg just learning what BIOS are.

Thanks for any help--John Wilton

  • 2 Contributors
  • 1 Reply
  • 162 Views
  • 4 Days Discussion Span
  • Latest Post Latest Post by ATS
ATS 0 Light Poster

As of the two different RAM slots, I have seen some motherboards be able to take DDR or SDRAM. Be carefull, you can only run DDR OR SDRAM not both at the same time. Now for the video card issue. My tip would be to make sure that the onboard video was disable through the device manager. If your onbaord video is not disable it could be thinking you are wanting to run dual monitors. So by disabling your onboard you are making the computer use the video card. Hope this helps

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/297735/finding-unmapped-network-share-capacity-in-c", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " microsoft - Finding Unmapped Network Share Capacity ... [SOLVED] | DaniWeb

Finding Unmapped Network Share Capacity in C#

vivri 0 Newbie Poster

Hi,

I've looked all over the web for several days and seem to find no answer to this issue. I would appreciate any leads. Thanks in advance for your time!

I need to find the underlying disk capacity (total size) of an unmapped network share in windows (Win7, XP, Server 2008), given a UNC path (e.g. given something like \"\\\\share_1\\subdir\").

I would have given up by now, if it weren't for the ability to find the underlying _free space_ of unmapped network shares, using the \"GetDiskFreeSpaceEx()\" Win32 function. I imagine that disk capacity is stored in a similar fashion to free space, hence retrieving it would be very similar (hence I'm somewhat infuriated with MS for not making the functionality obvious, or myself for not being able to find it thus far!)

Again, I would appreciate any knowledge you have to share on this point!

Regards,

vivri

  • 1 Contributor
  • 1 Reply
  • 216 Views
  • 7 Hours Discussion Span
  • Latest Post Latest Post by vivri
vivri 0 Newbie Poster

The solution was to look into the other arguments of GetFreeDiskSpaceEx()...

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/threads/197707/can-t-access-owner-folders-documents-but-other-folders-in-master-hd", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " storage - Can't access owner folders/documents but ... | DaniWeb

Can't access owner folders/documents but other folders in master HD!

tomcruise3230 0 Light Poster

I have a Seagate Internal HD where i have \"windows xp\" installed that isn't working properly due to shock however i can still turn it on but it only shows up a blank black screen and doesn't go no where. So i had to put it in an external enclosure with my other \"windows xp\" PC . Doing that I can access folders like \"programs\" and \"windows\" and \"guest documents\" however what i cannot do is try to go inside the owner/admistrator folder because i get the message \"access denied- this folder is unaccessible\". When i go to \"properities\" it says it has 0 bytes however when i click on the \"hard drive icon\" itself it says it does have almost all the 120 GB I have saved on the administrators account. I already tried running it on safe mode but it just restarts over and over and doesn't go through.

So please tell me how can I possibly recover files (only want to recover few very important documents only) where windows is installed and I am not getting premission to check the \"owner/adminstrators\" folder and documents.

  • 2 Contributors
  • 3 Replies
  • 98 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by gurukid22
gurukid22 0 Junior Poster Banned

You need to take ownership of the file first.

To do this you must be logged into the machine you are using as the administartor.

Then right click the folder and select properties > security > advanced.

Select the OWNER tab click edit select administrators check the check box to replace owner on all subfolder then click apply ok and ok;

If this works you may need to replicate these setting to all sub folder so you dont have to repeat this task on each folder.

tomcruise3230 0 Light Poster

You need to take ownership of the file first.

To do this you must be logged into the machine you are using as the administartor.

Then right click the folder and select properties > security > advanced.

Select the OWNER tab click edit select administrators check the check box to replace owner on all subfolder then click apply ok and ok;

If this works you may need to replicate these setting to all sub folder so you dont have to repeat this task on each folder.

I have tried this but still get the message \"\"access denied- owner folder is unaccessible\". So it must be something else. I believe because of shock the owner folder documents are unaccessible but the others folder can get still into.

Please suggest me on what other method I should try?

gurukid22 0 Junior Poster Banned

If that's the case im not sure what this could be or what to do. You check that the folder is not encrypted and that you are logged in as the administrator and the real administrator not the visit admin attribute.

im not sure if this will help but good luck.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/452534/detect-gender-male-female-from-first-name", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " python - Detect Gender(male/female) from First Name | DaniWeb

Detect Gender(male/female) from First Name

jhon1987 0 Newbie Poster

Hi,

Actually I am developing an application in python in which I want a feature by which the application can detect whether any name is male or female name. I did Google search on this, but could not find any algorithm/code by which I can do it. So finally I found a website which is doing the same thing pretty good.

http://www.i-gender.com/

So I was thinking to use their API in my application.

But before that just wanted to how they are detecting the gender from name?? Is it really possible to do it algorithmically??If yes please suggest some docs/links.

Here what I am trying to using http://www.i-gender.com/ API.

>>> import urllib2\n>>> import json\n>>> req = urllib2.Request(\"http://www.i-gender.com/ai\", \"name=jhony\")\n>>> resp = urllib2.urlopen(req).read()\n>>> decoder = json.JSONDecoder()\n>>> result = decoder.decode(resp)\n>>> print result['gender']\nmale\n>>> print result['confidence']\n100\n>>> \n

Thanks in Advance,

  • 3 Contributors
  • 4 Replies
  • 1K Views
  • 2 Hours Discussion Span
  • Latest Post Latest Post by David1123
deceptikon 1,790 Code Sniper Team Colleague Featured Poster

I did Google search on this, but could not find any algorithm/code by which I can do it.

I imagine the best approach would be a lookup from a database of names and gender probability. At its simplest the gender neutral names would be 50% confident and the strongly gendered names 100%. It could be improved by including birth year along with probabilities based on that name's popularity for certain genders in that year. Another approach would be to collect the name and gender of as many people as possible in census collections and base your probability off of the difference between the two counts for a name. So if you have 100,000 Jamie(M) and 76,000 Jamie(F), then the confidence of Jamie being male is about 57%.

Ultimately it's quite difficult, if not impossible, to heuristically guess gender with any confidence based on a name without a great deal of empirical data behind the selection.

David1123 0 Newbie Poster

This is an interesting question.

Think about male/female names. I might be wrong, but more female names end in a vowel (not always). Male names sometimes end in a consonant moreso than vowels. Think Alex (male)/Alexandra (female); Cassandra, Krista, Alicia, Alissa, etc. all female. Of course there are hundreds of female names that end in consonants, but it seems the exception rather than the rule.

You could incoroporate such an algorithm to increase the confidence level.

deceptikon 1,790 Code Sniper Team Colleague Featured Poster

I might be wrong, but more female names end in a vowel (not always). Male names sometimes end in a consonant moreso than vowels.

Not to such a statistically significant extent that using it as a heuristic would do more than muddy the waters. You also need to take frequency into account. If a very common male name ends in a vowel, it greatly skews the results: Joe, George, Mike, Luke, Charlie, Danny, Kyle, Dale, Lee, Lawrence, Joshua, Jamie, Dane, Shane, Blake, Leo, Jay...hmm. ;)

Think Alex (male)/Alexandra (female)

Yet Alex is a shortening of both Alexander and Alexandra. Males and females go by Alex, so you're not much better off unless they give you the full name. And it gets worse. Alex can be a full name in and of itself for both genders.

David1123 0 Newbie Poster

Ahhh very true. Perhaps we can exclude e's, y's and o's......

I guess there's no way to code something like this. I suppose the way we humans know names are how we've heard them in the past, hence a database w/ frequencies is the only way to go.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/65507/hi-everyone", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - hi everyone.. | DaniWeb

hi everyone..

mytime19 0 Junior Poster in Training

i need computer graphics programs written in c..
thanks a lot..:sad:

c++
  • 7 Contributors
  • 10 Replies
  • 143 Views
  • 21 Hours Discussion Span
  • Latest Post Latest Post by John A
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

OK

#include <stdio.h>\nint main()\n{\n    puts(\"computer graphics programs\");\n    return 0;\n}
happygeek 2,411 Most Valuable Poster Team Colleague Featured Poster

Arf! :)

jwenting 1,905 duckman Team Colleague

we're not here to do peoples' homework for them Walt, as you should know ;)

mytime19 0 Junior Poster in Training

so no help available:(

mytime19 0 Junior Poster in Training

Arf! :)

can't you help me out.. i mean in antivirus programming direction.. i want you to give me direction to start. i know c++ and assembly which is used for it.:sad:

\"Member
iamthwee

Do you really know about c/c++ and assembly as well as you say you do. I somehow doubt it.

Try learning something easier to begin with. :)

jwenting 1,905 duckman Team Colleague

in another thread he declared to be a poor programmer who knows a little bit of C++, Java, PHP, VB, and a score of other buzzwords.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

i need computer graphics programs written in c..
thanks a lot..:sad:

You can get started by using API's like DirectX or OpenGL.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

we're not here to do peoples' homework for them Walt, as you should know ;)

Sorry :sad:

can't you help me out.. i mean in antivirus programming direction.. i want you to give me direction to start. i know c++ and assembly which is used for it.:sad:

Yes we can. So is it graphics? Or is it anit-virus?

Your anit-virus is in another thread.

As for graphics, ask a question we can answer. Post the code you're having trouble with. And if you are expecting us to teach you from ground up it's gonna take a looooong time -- best to check out some tutorials or better yet a book or class.

Have you read the forum the Rules?

John A 1,896 Vampirical Lurker Team Colleague

Questions specific to the game development should be posted in the Game Development forum, and if you want to know more about developing games, you should definitely check out the Game Development sticky written of course by Mr ~s.o.s~.

Hope this helps

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/398966/regular-expression", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " php - regular expression | DaniWeb

regular expression

polinolin 0 Newbie Poster

hi mate. i have problem about REGEX
this is my simple code

<?php\n$teks=\"hi whats up? how are you?\";\n$replace=preg_replace(\"/(you)/i\",'<span style=\"background:yellow;\">\\1</span>',$teks);\necho \"$replace\";\n?>

what the mean \\1 ? its not give effect for my text..
if i change the value to \\2, the text has change..

thanks mate!

php
  • 4 Contributors
  • 3 Replies
  • 84 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by diafol
qazplm114477 14 Junior Poster

\\1 or $1 is the first pattern that gets match ex

$pattern = \"~(\\<a)(.*)(/a\\>)~i\";\n\n//$1 will equal <a \n//$2 = everything after <a and before /a> etc...

a good way to know what values gets passed to $n is to do a preg_match($pattern, $str, $match) and do a print_r($match); which should output an array of what get's match.

samueal 0 Junior Poster

If your question is not solved,then Use this!!

$replace=preg_replace('/(you)/i', '<span style=\"background:yellow;\">\\\\1</span>',$teks);
\"Member
diafol
<?php\n\n$teks=\"hi whats up? how are you?\";\n$replace=preg_replace(\"/(you)/i\",'<span style=\"background:yellow;\">\\1</span>',$teks);\necho $replace;\n\n?>

works for me

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/software-development/vbnet/threads/445051/mysql-on-remote-server", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - MySQL on Remote Server [SOLVED] | DaniWeb

MySQL on Remote Server

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

\"Untitled40\" I'm trying to figure out how to add a new connection to MySQL running on a different computer on my network. When I click Project --> New Data Source a list of drivers appears, but none of them are MySQL (see thumbnail) which I have previously installed. I'm using 64-bit Windows 7. The MySQL database is on a computer running 64-bit Windows 8.

I found a tutorial that works (see code below) with a console program, but I want to use Dataset

Imports System.Data\nImports MySql.Data.MySqlClient\n\nModule Module1\n    Private con As New MySqlConnection\n    Private cmd As New MySqlCommand\n    Private reader As MySqlDataReader\n\n    Private _host As String = \"<ip address here>\" ' Connect to localhost database\n    Private _user As String = \"<user name here>\" 'Enter your username, default is root\n    Private _pass As String = \"<password here>\" 'Enter your password\n\n    Sub Main()\n        Dim oConn As String\n        oConn = \"Server=\"\"\" + _host + \"\"\";User Id=\"\"\" + _user + \"\"\";Password=\"\"\" + _pass + \"\"\";\"\n        con = New MySqlConnection(oConn)\n        Try\n            con.Open()\n            'Check if the connection is open\n            If con.State = ConnectionState.Open Then\n                con.ChangeDatabase(\"dvd_collection\") 'Use the MYSQL database for this example\n                Console.WriteLine(\"Connection Open\")\n                Dim Sql As String = \"SELECT title,date_format(release_date,\"\"%Y-%m-%d\"\") as Date FROM movies\"\n                cmd = New MySqlCommand(Sql, con)\n                reader = cmd.ExecuteReader()\n\n\n                'Loop through all the users\n                While reader.Read()\n                    Console.WriteLine(\"Title: \" & reader.GetString(0)) 'Get the host\n                    Console.WriteLine(\"Release Date: \" & reader.GetString(1)) 'Get the username\n                End While\n\n            End If\n        Catch ex As Exception\n            Console.WriteLine(ex.Message) ' Display any errors.\n        End Try\n\n\n        Console.ReadKey()\n    End Sub\n\nEnd Module\n
  • 3 Contributors
  • 5 Replies
  • 276 Views
  • 16 Hours Discussion Span
  • Latest Post Latest Post by Ancient Dragon
Reverend Jim 5,053 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What happens if you supply the IP address as part of the server name? For example, on my regular computer my SQL Server instance is

JIM-PC\\SQLEXPRESS\n

But I imagine (I can't verify this because my computer is in the shop) I could also use

\\\\192.168.1.104\\SQLEXPRESS\n
TnTinMN 418 Practically a Master Poster

Are you using VS2012 Express, if so you may be out of luck.

Click Here

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

No, I'm using VS2012 Pro

TnTinMN 418 Practically a Master Poster

I don't use either VS2012 or MySql, but based on their support forum, it looks like a lot of people have had issues with this configuration. Do you have the the latest vesion of Connector/Net installed? Based on this: Click Here, the newer releases should offer full VS2012 support.

As a possible workaround, have you tried connecting through ODBC instead?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Problem reesolved, I had to download a new driver.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/483754/dirname-and-build-properties", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - dirname and build.properties [SOLVED] | DaniWeb

dirname and build.properties

Steve_19 0 Newbie Poster

I was studing the ant task dirname. I am in over my head understanding this animal. It suggests to me that I could use build.properties and or build.xml properties . The same possibility arises in java code and I benefited greatly by loading xml properties. In the ant enviornment is it possible to use xml?

  • 2 Contributors
  • 5 Replies
  • 168 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by Steve_19
Steve_19 0 Newbie Poster

Clearly This question is a little to in depth. Building and cleaning my app in the eclipse ide was fairly easy and my question on properties will become obvious once I begin learning how to write java. Classes to use the command line and init ant tasks.

Steve_19 0 Newbie Poster

Are there resourses available on using java to use the command line and init ant tasks and targets?

llaspina 19 Light Poster Team Colleague

I'm not sure what you are looking for with ANT and the command line. What is your goal? What are you trying to accomplish?

I use ANT for a few minor things, like uploading files via FTP, signing jar files, and copying some files from the build directory to another place for deployment. I put these tasks together with ANT so that afer building my application, I can quickly sign my application and then upload it to the site my customers run it from using JNLP. I never bothered editing build.xml; that's why I use an IDE. So netbeans uses ANT to handle the build process and I use netbeans so I can focus on writing my program. If you want to play with ANT, the Apache reference might be a good place to start.

You can run a java program from the command line with the commmand java [program name] followed by any parameters you want to pass to the main method. Your IDE (Eclipse for you, Netbeans for me) runs this command for you and you can configure any command line parameters in the run properties. Are you trying to create a command line (console application) of some kind?

Steve_19 0 Newbie Poster

I will have to leave this thread open for a minute. If you dont mind. I to have used netbeans for years. I have had no luck creating the exec jar with dependencies.(store ex). I wanted to learn how to have more control over the next app. At the moment I have no defined pseudo plan because I am a little overwhelmed. I am finishing up the build.xml and I am new to eclipse and learning the web app. I can not think it throgh right now but the mentioned skills I mentioned my also allow me to write button actions to the processes you mentioned. Like a little 4 button IDE and possible editor to maintain my developed conventions in future apps. Not sure yet. Its just another neat tool. Thanks for your time.

Steve_19 0 Newbie Poster

You are right. Dirname , properties and xml are interesting to play with but java and utility classes out weigh dirname the build.xml does every thing we need.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/41101/homework-filling-array-from-text-file", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - Homework: filling array from text file | DaniWeb

Homework: filling array from text file

harrypsk 0 Newbie Poster

Yes, this is homework, I'm not asking for a cut/past answer, just a pointer. I think I've developed brain lock form staring at this issue for too long. I'm using VB.Net 2003.

I've created half the assignment, using a form to add records to a text file. The second half is to read from that text file. You do so by selecting the id number from a combo box which then displays the remainder of the information for the record. I'm stuck on how to create an array, filled with values from the text file. Not sure how to proceed with reading only the id number for the combo, and then reading the remainder once the combo is used. Yes, a database would be easier, but this assignment requires the use of a text file. I understand the use of StreamReader, I guess I'm stuck on the loop function to read data into an array, and then displaying the items from the array.

The data in the text file looks like this:

Record ID 1
Data 1
Data 1
Data 1
Record ID 2
Data 2
Data 2
Data2

Thanks to anyone who takes a stab at giving me a few pointers.

  • 2 Contributors
  • 2 Replies
  • 111 Views
  • 7 Hours Discussion Span
  • Latest Post Latest Post by harrypsk
UberAAZ 0 Junior Poster in Training

Here's a little tip that should be enough to get you going (but not enough to do it for you ;))

dim data(999) as string 'initialise the array\nopen \"filename\" for input as 1 'open the file\nfor d% = 0 to 999 'start the loop\nif eof(1) = false then line input #1, data(d%) 'if the file hasn't ended read in the line\nnext d% 'end the loop\nclose 1 'close the file, it's messy to have it open

That's reading stuff into an array. To display it, perhaps you could use the ItemIndex (or whatever it's called) property and read data from the array like data(list.ItemIndex)?

Hope that makes sense,

harrypsk 0 Newbie Poster

That was one point I wasn't sure about, now to handle an unknown length for the array. It's variable as there will be no telling how many lines and records will be in the text file. You used 999 to initialize, but the loop checks for end of file, so the array begins at 999 elements, but could actuall only have 20 if that's all the text file contains, correct?

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/174616/resources-folder", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - resources folder [SOLVED] | DaniWeb

resources folder

Trekker182 0 Junior Poster in Training

Hello everyone!

I had a quick question on how to use pictures in a VB program. What I'm trying to do is when someone selects an item in a listbox, to show the corresponding jpg file. I selected the relevant jpgs from the desktop, copied them to the clipboard and then pasted them into the resources folder by right clicking on resoruces in the solution explorer and selecting paste and now they are listed under resources.

However, when I goto run the program and select one of the listbox items, I get a FileNotFoundException. The names of the files that I use in the code match those of the jpeg files that I want to use in resources. I don't understand what I'm doing wrong.

Thanks.

Here's a copy of the relevant code....

If lstCarpets.SelectedIndex = 0 Then\n            picCarpet.Image = Image.FromFile(\"modern_geometric.jpg\")\n        ElseIf lstCarpets.SelectedIndex = 1 Then\n            picCarpet.Image = Image.FromFile(\"tufenkian.jpg\")\n        ElseIf lstCarpets.SelectedIndex = 2 Then\n            picCarpet.Image = Image.FromFile(\"MosqueDomee.jpg\")
  • 2 Contributors
  • 4 Replies
  • 117 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by Trekker182
waynespangler 63 Posting Pro in Training

You still have to tell it where the file is. It it something I have always had trouble with because your program is run in bin subdirectory and either debug subdirectory or release subdirectory and your folder isn't there it is two folders back.
What I do is copy the files into the resources and use them from there. Then you can use:
picCarpet.Image = My.Resources.modern_geometric.jpg

Trekker182 0 Junior Poster in Training

You still have to tell it where the file is. It it something I have always had trouble with because your program is run in bin subdirectory and either debug subdirectory or release subdirectory and your folder isn't there it is two folders back.
What I do is copy the files into the resources and use them from there. Then you can use:
picCarpet.Image = My.Resources.modern_geometric.jpg

Where is the best place to put that? When I put it just after each if elseif statement, I get a message that the picture is not a member of resources.

Thanks.

waynespangler 63 Posting Pro in Training

You have to copy the images into the resources. Copy your images to the clipboard. Double click on the MyProjects in the Solution Explorer. Click on the resources tab. Now right click on the background and select paste. Now all your images are resources. Now you can use your code.

Trekker182 0 Junior Poster in Training

I tried that and it still didn't work.

I ended up having to copy the jpg files into both the bin/debug/resources folder as well as resources...now when I click on a list item, BAM...the related pic shows up!

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/1456/can-t-get-cpu-to-do-100-load-in-xp", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - can't get CPU to do 100% load in XP | DaniWeb

can't get CPU to do 100% load in XP

vassili_zaitsev 0 Newbie Poster

abit ic7 (bios ver. 16)

pentium 4C 2.4 @ 2.8 (HT enabled)

2x 512 ocz ddr400 cas2 (2-3-3-6)

radeon 9700np 333/315

windows xp sp1

hi guys, this has been bothering me forever. my cpu scores in 3dmarks '03/aquamark 3 are all on par with the norm. they are 650/9463 respectively. real world gaming performance verify this. however, when i'm executing non-gaming apps in XP, my CPU rarely operates above 90% one thing that stands out the most is video rendering/encoding. (although i don't know the cpu usage during gameplay, performance is on par with published benchmarks, so i assume it's operating at maximum)

right now, i'm encoding video through Virtual Dub. when i look under cpu usage, it's only operating at 50%. isn't there something wrong? why is it not utilizing 100% of my cpu when encoding video? the following picture might better explain things. at the time of screenshot one processor is maxed out and the other sitting pretty at 0% (one logical cpu, XP sees 2 due to hyperthreading). just a few minutes prior both were operating at 50%...but the total usage still reamined 50%. i've even tried to set it's priority to realtime/high in the processes tab but it does nothing. and processor affinity shows both cpus under use by Vdub.

http://home.cogeco.ca/~konig/usage.JPG

the only times i see >85% cpu usage is when multiple applications are working away. is this the nature of HT? does it only allow one application thread a certain amount of cycles? i get simialar results when rendering video with premiere 6. i dunno, something must be wrong. my old 2.4b @ 2.8 (non HT) was always 99-100% loaded when rendering video.

(i can't recall video redering performance/speed of the 2.4b @ 2.8. so i can't really compare redering times between the \"b\" and \"c\" versions to find out if the \"c\" is infact faster at 50% load than the \"b\" at 100% load...although synthetic gaming benchmarks ala 3dmarks show higher scores for the C at same speeds)


I've installed the neccessary intel chipset stuff from the install cd that came with the mobo. i have the latest (well, almost latest) bios rev. is there something i might be missing in a bios setting? please help me before i waste mad monies calling intel support long distance. thanks guys.

  • 4 Contributors
  • 3 Replies
  • 138 Views
  • 20 Hours Discussion Span
  • Latest Post Latest Post by feigned
camelNotation 1 Posting Whiz in Training

Vassili Zaitsev is a name of a Latvian/Lithuanian G.M.

)BIG"B"Affleck 15 Master Poster Banned

Look at other similar threads called 100% I know there is 1 thats in the most popular thread at daniweb.com
Yue IS and yuero ine to tyue of rusiian of shorld the tyuose shyuo of knosh of notes.One of to tyue greatest snipers shyuo of ever to lived.Yue of yueld of doshn of staligrad of yuimself.

feigned 57 Posting Whiz

is this the nature of HT? does it only allow one application thread a certain amount of cycles?

Yes, that's the nature of HT. You get a \"second\" processor for \"free,\" though it's logical and not physical which you all ready understand quite clearly.

The reason why you see 50% usage with vdub is that vdub isn't multi-threaded, therefore it only uses one of the \"two\" available processors.

It's not hurting performance either way. You just have a \"second\" processor to handle the other tasks while vdub is hammering away at your Divx encodes. :)

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/240408/is-c-and-wpf-a-good-choice", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " asp.net - Is C# and WPF a good choice? [SOLVED] | DaniWeb

Is C# and WPF a good choice?

mr.white 0 Newbie Poster

Dear forum members,

I'm working on an accounting software, which I was planing to do using C#. Now that I see there is WPF that I can use instead of WinForms, I would like to ask you a couple of questions.

  1. For an account software, which I would like to have it looking good, with dynamic graphs and \"easy on eyes\" with light animations (like apps on iphone, transitions etc), is C# .NET WPF a good choice? What would be your recommendations?
  2. And how can I skin the window completely? Like, iTunes working on a Windows machine. The window and the title bar is custom, but buttons for quitting the application or minimizing it still the Windows one. How can I do this with VS and C# with WPF?
  3. Once the project is complete, can I deploy it to work on a web browser? Is it possible? Because I read some stuff like this.
  4. what is it that I can do with C# and WPF that can't be done with Silverlight?

Also, dear members, do you have any favorite resource which teaches animation and design side of WPF?

Thank you very much.

  • 2 Contributors
  • 1 Reply
  • 218 Views
  • 8 Hours Discussion Span
  • Latest Post Latest Post by DdoubleD
claudesang commented: sorry - clicked here instinctively - no harm intended. +0
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/74620/how-do-i-use-a-command-button-to-open-a-exe-file-created-in-vb", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-basic - How do I use a command button to open a ... [SOLVED] | DaniWeb

How do I use a command button to open a exe file created in VB?

john99 0 Newbie Poster

Hi everyone

I am relearning to use VB after taking classes almost 10 years ago. I am stumped on remebering how to open a file using a command button.

I have created some forms using VB that I want to activate from a main menu. I have made them .exe files and just want to navigate from one to another.

Thanks - John

  • 3 Contributors
  • 2 Replies
  • 304 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by bitbucket
scudzilla 32 Junior Poster

Does this help?

Dim TaskID As Long\n    TaskID = Shell(pathname\\filename.exe, vbNormalFocus)
bitbucket 0 Newbie Poster

Hi everyone

I am relearning to use VB after taking classes almost 10 years ago. I am stumped on remebering how to open a file using a command button.

I have created some forms using VB that I want to activate from a main menu. I have made them .exe files and just want to navigate from one to another.

Thanks - John

Assume you are using VB 6 ... use the online help or MSDN and look up SHELL command ... but why did you make the forms into separate exe files? Using your main menu form you could code:

IF someoption is selected then
LOAD frm_name
frm_name.SHOW
Endif
the above will bring the form up and it will have the focus... now for some finesse in the new form's LOAD subroutine

main_menu_form.HIDE

in the new forms Query_Unload sub

main_menu.shw

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/81933/serial-communication-with-higher-speed", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-basic - Serial communication with higher speed | DaniWeb

Serial communication with higher speed

kshrini 0 Light Poster

Is it possible to communicate with higher than 256000 bps in visual basic 6?

  • 2 Contributors
  • 4 Replies
  • 65 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by kshrini
DenisOxon 12 Posting Whiz

I don't think you can go beyond 128000 which is down to hardware limitations.

Why do you want to go faster ?

kshrini 0 Light Poster

Thanks for reply. But MSComm controls can go upto 256000bps. I want, if possible more than this b'cos the data I'm downloading from instrument is huge.

DenisOxon 12 Posting Whiz

Hi Kshrini,

I have done a quick check and most cards go to 115000bps, but there are some high speed cards available from a supplier I use that are claimed to go faster., and which you may care to look at. (Try looking for a cable company in Slough.)

kshrini 0 Light Poster

Hi DenisOxon,

Our R&D develops the systems, in which we require higher speed for communication. So sending data from H/W at higher speed is not constraint but receiving through serial port of PC is using VB6 is constraint. Please check if you can get some information on this. Thanks for reply.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/139458/echo-problem", + "domain": "daniweb.com", + "file_source": "part-00231-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Echo >> problem | DaniWeb

Echo >> problem

besktrap 0 Junior Poster in Training

Sorry about the second thread, I forgot to include this on my first one.
Anyways, is it possible for someone to use the \"echo %text here% >> %location of file here%\" command to save some text to a file in a different folder? I did it, but got a message saying \"access denied\". I say someone do it with this code:

echo %finalmsg% >> \\\\BAS-307-15\\mikchat\\public.txt

But when I do it, for example:

echo %text% >> C:\\Documents and Settings\\Owner\\Desktop\\log.txt

It doesn't work! Anyone know whats going on?

  • 2 Contributors
  • 1 Reply
  • 124 Views
  • 3 Weeks Discussion Span
  • Latest Post Latest Post by mittelgeek
mittelgeek 0 Light Poster

Well the problem with using echo %text% >> [i]C:\\Documents and Settings\\Owner\\Desktop\\log.txt[/i] is that the C:\\Documents and Settings\\Owner\\Desktop\\log.txt needs to be in quotes.

I would recommend that you use variables because you can define them at the top of the your code and change their value all throughout the code by simply changing them in one place, e.g.,:

set TEXT=\"Some Text\"\nset MYLOG=\"C:\\Documents and Settings\\%USERNAME%\\Desktop\\log.txt\"\n\n:: Or your can use this method as well\n::\n:: set MYLOG=\"%USERPROFILE%\\Desktop\\log.txt\"\n::\n:: That is the way that I setup a poorman's alias/macro\n:: list for my CMD Sessions. That way each user on the\n:: computer will have their own set of aliases/macros.\n\necho \"%text%\" >> \"%mylog%\"\n\ntype \"%mylog%\"

Using that method, all you have to do is make the change in the variable at the top and it is modified all throughout the program.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/413010/bind-combobox-to-value-in-textbox", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - bind combobox to value in textbox | DaniWeb

bind combobox to value in textbox

DNHK 0 Newbie Poster

Hi I need some help over here... how do i change the display member of a ComboBox after i have entered a code in a textbox that it represent the combobox value??

example

Code: 02-001 Combobox: Provider X

if i change the code the provider combobox must change and if i change the provider combobox the code should change!.. i haven't found any help.. heres little code I remember

if e.keychar = chr(13) Then\n         combobox.valuemember = textbox.text\n         combobox.displaymember = me.stockdataset.selectprovider(@textbox.text)\n      end if

this code change the combo box display member but if I change the comobox by clicking it the code on the textbox doesnt change, to its corresponding code...?? please help

....the combo box is bound to the provider tables....

  • 3 Contributors
  • 2 Replies
  • 313 Views
  • 23 Hours Discussion Span
  • Latest Post Latest Post by M.Waqas Aslam
kingsonprisonic 42 Posting Whiz in Training
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged\n        Me.TextBox.Text = ComboBox1.SelectedValue\n    End Sub
M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello !
i think you want to show the related records of given code in textbox in combo and then if you change the value of combo then want to show the related code in textbox, am i right ?

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/community-center/daniweb-community-feedback/threads/405404/problem-with-newbie-posters", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Problem with newbie posters [SOLVED] | DaniWeb

Problem with newbie posters

Reverend Jim 5,070 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I've noticed an appalling number of first time posters who post threads with titles like \"Help! Urgent!!!!\". The posts can be almost as useless as \"I'm trying to program something and I'm getting an error. What am I doing wrong?\". It would seem that few people are reading and following the posting guidelines. Even simple guidelines like

  • Make a meaningful title
  • Give sufficient information so the question makes sense
  • Supply all relevant information so the problem can be solved

My suggestion is to implement a system in which new posters (perhaps for the first 2-3 new threads) woul be shown the guidelines for a set time (15-20 seconds perhaps) before the editing fields are displayed or edited. I am not a web programmer so I do not know what is easy to implement.

I realize that anyone contributing to a thread gets credited when the thread is marked as solved and I feel like a cheat when I post \"show us what you have done\" or \"can you please clarify the question\", then not contribute further when I realize the question is not in an area where I feel I can contribute.

  • 8 Contributors
  • 11 Replies
  • 240 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by diafol
Dani 4,445 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hold your suggestions for just a bit longer :)

I'm currently working on recoding all of DaniWeb from scratch, and there's a complete freeze on the existing system right now.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I'm currently working on recoding all of DaniWeb from scratch

Editing for high rep users? ;) Just kidding, I know when to quit.

zeroliken 79 Nearly a Posting Virtuoso

Hold your suggestions for just a bit longer :)

I'm currently working on recoding all of DaniWeb from scratch, and there's a complete freeze on the existing system right now.

Good luck on that then

mikulucky 25 Junior Poster in Training

From scratch? You must be familiar with this then.

That's great :D

Dcurvez 0 Junior Poster in Training

wonder if there is a way to just not allow certain words in the subject line? (help, urgent, ect..) im also not versed on websites (barely understanding vb) but, just an idea is all (and not really sure if its a good one LOL)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

wonder if there is a way to just not allow certain words in the subject line? (help, urgent, ect..) im also not versed on websites (barely understanding vb) but, just an idea is all (and not really sure if its a good one LOL)

What part of

Hold your suggestions for just a bit longer :)

did you not understand? :icon_rolleyes:

Dcurvez 0 Junior Poster in Training

was just thinking out loud..sorrrrrrrrry!

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

sorrrrrrrrry!

It's my bad, I was a poor role model when I was trying to be a smartazz.

Don't worry about WaltP, as long as you don't walk on his lawn he won't press charges.

mitrmkar commented: Mmm, are you sure about WaltP?? +0
Dcurvez 0 Junior Poster in Training

*treads softly* ;)

\"Member
diafol

You reckon WaltP's real name is Oscar and that he lives in a bin? :)

I realize that anyone contributing to a thread gets credited when the thread is marked as solved and I feel like a cheat when I post \"show us what you have done\" or \"can you please clarify the question\", then not contribute further when I realize the question is not in an area where I feel I can contribute.

Don't complain man! About three quarters of my solved threads are for that. The fact that you asked them to share their code meant that somebody else was able to help them further. You played your part. :)

Anyway Walt, are we still banned from posting or is the big freeze off now?

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/445718/how-to-validate-if-the-text-box-value-is-year-or-not", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - How to validate if the text box value is ... | DaniWeb

How to validate if the text box value is Year or not?

tashiDuks 0 Light Poster

Hi Everyone,

I have one text box named txtYear.text and this text box will accept only Year Value i.e. 2011, 2012 and so on. Now i want to put a validation on the text box like, if user enters the value like 1,03,54 in text box then the system should show an error message to user saying that, the value is not year or something. The text box should accept only if the user enters valid year value like 2010, 1907 and so on.

I am working on VB.NET 2010 and the language is VB.

I have seek the help from google but failed to get the proper solution. CAN ANYONE HELP ME?

  • 4 Contributors
  • 3 Replies
  • 2K Views
  • 2 Hours Discussion Span
  • Latest Post Latest Post by azareth
Begginnerdev 256 Junior Poster

Try a function like this:

Private Function CheckIfYear(byval sYear As String) As Boolean\n    Try\n        Dim dt As New DateTime(Cint(sYear),1,1,1,1,1)\n        Return True\n    Catch ex As Exception\n        Return False\n    End Try\nEnd Function\n

Then use it in the TextBox's Leave event:

Private Sub TextBox_Leave(sender As System.Object, e As System.EventArgs) Handles TextBox1.Leave\n    If TextBox1.Text.Length = 4 Then\n        If CheckIfYear(TextBox1.Text) = False Then\n           MsgBox(\"You have entered an incorrect year\")\n           TextBox1.Focus()\n        End If\n    Else\n        MsgBox(\"Please enter a four digit date.\")\n        TextBox1.Focus()\n    End If\nEnd Sub\n
nmaillet 97 Posting Whiz in Training

Might I recommond a read-through of: User Input Validation in Windows Forms. Also, Google \"winforms validation\"; you'll find some decent tutorials.

There are a few issues I have with Begginnerdev's suggestion:

  1. Not focusing on the textbox, bypasses the validation (eg. click an OK button before clicking the textbox). There are work-arounds, but aren't very scaleable.
  2. The user gets trapped until they enter a valid value. This is mostly personal preference, and not always a big issue.
  3. Message boxes for every invalid value can be a pain to the user. Again, personal preference, but a consideration.

I could go on, and have been in a few debates over this, but I want to point out that it isn't necessarily bad design. It comes down to personal preference in some sense, but I prefer other solutions that are more scalable and I think the user will be happier with.

Begginnerdev commented: True, but this was only for proof of concept. = ) +7
azareth 5 Posting Whiz in Training

you can use masked textbox, there you can customized the user input, then set MaxLength to '4' in the properties window. and if you need to limit the years you can use
If year < 2000 And year > 2050 then ... something like that

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/digital-media/ui-ux-design/threads/70969/flash-anomaly-cannot-run-new-image-with-working-flash", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " web-design - Flash Anomaly? Cannot run new image with ... | DaniWeb

Flash Anomaly? Cannot run new image with working flash:

mattyd 89 Posting Maven Featured Poster

I am rather new to Flash and I am having what I consider to be a strange result which I do not know how to address.

I am building an HTML site using CSS. Last week I embedded a SWF which scrolls a simple movie over the banner\\ header. This worked and works fine except for this; Today, I attempted to switch the banner image (JPEG) with another-- same file format (JPEG), same dimensions as the original header image. I edited the CSS to reflect the new header image name. I saved the CSS and switched to my index.html file to view the change and what I see is the previous header image still present with the Flash running over it. Wrong image. :sad: I tried a few things such as moving the old header image out of the image folder so it could not be accessed-- the old, moved image was still there on the HTML index preview :eek:. How could this possibly be?

Weird. It seems as if the Flash was somehow grabbing and holding the first image and always running this old image. As far as I can tell, it is not directly referenced in the embed code at all.

When I remove the entire Flash embed code the new header appears-- great:), but I want the Flash with it. :confused:

I closed the HTML editor and re-opened the index.html file (thinking it could be a memory error on my machine or something, not the code). This did nothing. The old banner\\ header STILL.

I've run out of things to try.

Any help would be greatly appreciated.

Regards,
MattyD.

  • 3 Contributors
  • 2 Replies
  • 115 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by MidiMagic
\"Member
iamthwee

do you have some code to look at?

MidiMagic 579 Nearly a Senior Poster

I can think of only a few causes for this:

1. Your old banner was somehow incorporated into the flash image (maybe during image editing).

2. There is a place you missed in your code where the old image is still referenced.

3. Your browser is not refreshing.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/88978/reading-from-a-file", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - Reading from a file | DaniWeb

Reading from a file

KimJack -2 Junior Poster

Hello All,

I am trying to figure the best route to take for this problem. I am trying to read from a text file. The text file is setup at follows:

John 90 98 9009
Smith 90 87 87987
Eric 76 66 23443...

I am trying the figure how to read only the names from the files. I cannot use String tokenizer or split().

I have tried everything that I can think of. Right now I can read the entire line.

No code please, only suggestions and comments.

Thank you,

  • 2 Contributors
  • 3 Replies
  • 104 Views
  • 9 Hours Discussion Span
  • Latest Post Latest Post by peter_budo
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Once you read the line, look for position of empty space in your string from beginning and then substring it. String method charAt(num) and substring(int beginIndex, int endIndex) will help you.
Second option is to use Serialization because you know how the text is formated (meaning text followed by number separated by one empty space)

KimJack -2 Junior Poster

Thanks.

I am wondering if it is possible to read the first column of the text file into an array or arraylist?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, if you use second approach and simply ignore numerical content after empty character

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/357771/tlistbox-and-sorting", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " pascal - TListBox and sorting [SOLVED] | DaniWeb

TListBox and sorting

Morten Brendefu 28 Light Poster

I did an experiment regarding sorting of 256.000 random \"names\" using TListBox component.
A friend of mine say that TListBox is faster than my code at sorting, so I wanted to test this out of curiosity.

Method of testing.
When I have created 256 thousand random textstrings, each 6 characters, I add these into a listbox that is invisible, hence no updating whilst adding.
Then I Press a button in order to do only one thing:
TListBox.Sorted:=TRUE
It takes about 5 seconds, and the control is returned to my form.
Does this mean that 256000 purely random strings have been sorted in that time?
My friend claim so.

Now for the big thing.
If it is sorted, why when I press another button in order to view the TListBox does this operation halt the computer for almost 3 minutes before the component shows the data?
I would think that this is because it is actually sorting the data now.

My routines that is a derivate of a binary approach is not by far fast, but it does the job of hiding the TListBox, copying the unsorted data from a TListBox into an Array, Then sorting this data through an index, deleting the data in the TListBox, adding all the data from my now sorted array, making TListBox visible, and all data can be viewed in the correct order instantly as the TListBox.visible:=TRUE.
The complete work takes almost one minute less than TListBox alone.

does anybody have any ideas as to why TListBox is so slow showing the data if it indeed has got the data sorted?

Best regards,
Morten Brendefur.

  • 4 Contributors
  • 6 Replies
  • 2K Views
  • 6 Days Discussion Span
  • Latest Post Latest Post by TrustyTony
pritaeas 2,194 ¯\\_(ツ)_/¯ Moderator Featured Poster

Am not sure what version of Delphi you have, and whether or not you have the source code. You could step through the TCustomListBox.SetSorted method, to see what actually happens. You may have to set some breakpoints, due to sending of messages.

For normal sorting speed-up on a visible listbox, you can set the Items.BeginUpdate, then Sort, then the Items.EndUpdate. Technically, it should not really differ from your visible technique in terms of speed. Can't say I've ever waited that long for a component to update it's contents.

Morten Brendefu 28 Light Poster

I thought I could show you all my code for parts of this :-)

First I create 256000 random names with this procedure:

procedure TForm1.MakeMaxClick(Sender: TObject);\n  VAR\n    x :INTEGER;\n    y :BYTE;\n    z :CHAR;\n    sr:abc6;\nbegin\n  Randomize;\n  ListBox1.Visible:=FALSE;\n  ListBox1.Items.BeginUpdate;\n  FOR x:=1 TO Maxarray DO BEGIN\n    sr:='';\n    FOR y:=1 to 6 DO BEGIN\n      z:=CHAR(Random(26)+65);\n      sr:=sr+z;\n    END;\n    ListBox1.Items.Add(sr);\n  END;\n  ListBox1.Items.EndUpdate;\n  ListBox1.Visible:=TRUE;\nend;

The code need 14 seconds on my computer in order to finish generating all the random words.
It then instantly show ALL data and I can start scrolling down this unsorted list.

Next step is:

procedure TForm1.Button5Click(Sender: TObject);\nbegin\n  ListBox1.Visible := false;\n  ListBox1.Items.BeginUpdate;\n  ListBox1.Sorted :=True;\n  ListBox1.Items.EndUpdate;\n  ListBox1.Visible := True;\n  ShowMessage('Finished');\nend;

It displays the message \"Finished\" after approx 11 seconds but still the listbox is not visible.
After a total of 4 minutes(after clicking ok) the listbox is displayed.

My own code for sorting:

PROCEDURE QrebuildIndex;\n  VAR\n    wTop,wMiddle,wBottom,wPosition : INTEGER;\n    bModifier    : BYTE;\n    bNeedSearches: ARRAY[1..24] OF INTEGER; // 16 comparisons will find any and all data no matter where in an index of 65536 items. Morten Brendefur 2011.\n\n  PROCEDURE BuildNeedSearches(antall:BYTE); // Builds index of numbers where we have to extend searches by one extra run.\n    VAR\n      x:BYTE;\n    BEGIN\n      FOR x:=1 TO antall DO BEGIN\n        bNeedSearches[x]:=1;\n        bNeedSearches[x]:=(bNeedSearches[x] SHL x);\n      END;\n      bModifier:=1;\n    END;\n\n  PROCEDURE FindPointOfInsert;\n    VAR                       \n      x:BYTE;\n\n    PROCEDURE Doublecheck; // Some values of top and bottom variables lead to a result that is misplaced by one in a few cases.\n      BEGIN\n        IF sAbc6[wIndex[wMiddle]] < sAbc6[wPosition] THEN INC(wMiddle); // By doublechecking we exterminate this cause of error.\n      END;\n\n    BEGIN\n      IF wBottom=bNeedSearches[bModifier] THEN INC(bModifier); // Denne fungerer bare dersom vi bygger hele indexen fra start.\n      FOR x:=1 TO bModifier DO BEGIN\n        wMiddle:=wTop+((wBottom-wTop) DIV 2);\n        IF sAbc6[wIndex[wMiddle]] > sAbc6[wPosition] // Working towards an index all the time.\n        THEN wBottom:=wMiddle\n        ELSE wTop   :=wMiddle;\n      END;\n        // With 17 comparisons we can find any place in an index of 65536 values.\n        // This compared with common sequential search of which may need up to 65536 comparisons in order to be 100% accurate.\n        // This was Ultrafast on the old Commodore 64. It is Unbeaten in speed. The implementation of use is 'simple'.\n        // This implementation of Binary Sorting Routine is Made by Morten Brendefur.\n        // The use of bModifier is my own implementation that increases speed slightly.\n      Doublecheck; // Results might be off by one. This fixes this issue.\n    END;\n\n  PROCEDURE InsertDataInIndex;\n    VAR\n      x,y : INTEGER;\n    BEGIN\n      IF wPosition>wMiddle THEN BEGIN\n        y:=wIndex[wPosition];\n        FOR x:=wPosition DOWNTO wMiddle+1 DO BEGIN\n          wIndex[x]:=wIndex[x-1];\n        END;\n        wIndex[wMiddle]:=y;\n      END;\n      INC(wPosition);\n    END;\n\n  BEGIN\n    BuildNeedSearches(16); // An implementation that might save some time on exhaustive searches.\n    wPosition:=2;\n    REPEAT\n//      wTop:=1;\n//      wBottom:=wPosition-1;\n      wtop:=0;\n      wBottom:=wPosition;\n      FindPointOfInsert; // It is possible to save some CPU cycles by putting the procedures code directly here\n      InsertDataInIndex; // I prefer to use procedures in a way to logically explain where and what is happening.\n    UNTIL wPosition>TotalNumberOfDataToBeSorted;\n  END;

In a total of 2 minutes and 11 seconds I am able to make an index of 256000 records, sort everything, and show my sorted data in one listbox and also show the index I created in another listbox.
.
.
Delphi 9
spend twice as long time in order to display the sorted data in only one listbox.
I left my comments in the source. They may make the code easier to understand.

I still wonder though. Is my sorting routine faster than ListBox or is there some other explanation for why the listbox is not visible for 4 minutes when I use the built in sort function/property.

If people are interrested in my routine of sorting, then please copy and experiment.
(I could add that I am working on another method in order to speed up my sorting by at least 180 times, still only using Delphi without inline assembler
I'll release that code here at a later stage when it has been fully tested.)

Best regards,
Morten Brendefur.

Wolfgan 17 Junior Poster

Try this. I have not tested the speed. Just as an option.

procedure TForm1.Button1Click(Sender: TObject);\nvar List: TStringList;\nbegin\n  List:=TStringList.Create;\n    try\n      List.Assign(ListBox1.Items);\n      List.CustomSort(TStringsSort);\n      ListBox1.Items.Assign(List);\n    finally\n      List.Free;\n    end;\nend;\nfunction TStringsSort(List: TStringList; Index1, Index2: Integer): Integer;\nbegin\n  Result:=-CompareStr(List[Index1],List[Index2]);\nend
TrustyTony 888 ex-Moderator Team Colleague Featured Poster

I proved the first pieces of code in Lazarus environment for comparison. I made the Buttons to show the finishing times after execution of the function finished.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/433194/vb-net-read-a-text-file-and-show-data-after-in-datagridview", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " VB.Net read a text file and show Data after ... | DaniWeb

VB.Net read a text file and show Data after (:) in datagridview

dr.10c41h05t 0 Newbie Poster

I have got a assignment. I have a folder which have some text file. In the text file there have some students info such as fathers name, mothers name, contact number etc. And every text file name is like 'AddressBook_038'. here 038 is the roll number. It is different for every students.
My assignment is there have a textfile and a browse button. There also have a datagrid view. Datagridview column is roll, fathers name, mothers name, contact number. I have to create such program that when I click browse button and select the folder the data automatically show in datagrid view. Such as in the roll column only show the roll. Program automatically read the text file name and input the data after (_) in the roll column. Then it read the info from the text file and show data after ( : ) in the others column.
I don't understand how I can do this? I do something which I give it bellow:

OpenFD.InitialDirectory = \"C:\\\"\n        OpenFD.Title = \"Open your Floder\"\n        Dim didwork As Integer = OpenFD.ShowDialog()\n
  • 2 Contributors
  • 1 Reply
  • 226 Views
  • 4 Hours Discussion Span
  • Latest Post Latest Post by lolafuertes
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/284278/paypal-to-pay-on-account", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " php - Paypal to pay on account? [SOLVED] | DaniWeb

Paypal to pay on account?

RichmondJim 0 Newbie Poster

I'd like to create a simple PHP form that will allow my website user to make a payment on their account with us using PayPal. I'd like them to enter their name, email address, account number, and the amount they'd like to pay. I would then like to pass this information to PayPal (possibly as a \"buy it now\" using the account number as the item number) and let PayPal handle all the PP account and/or credit card information. I would then check my PayPal business account daily for the payments I need to record in my accounting package.

I don't expect to get many payments this way, but want to offer the convenience to my clients.

Has anyone seen or posted a code snippet that would point me in the right direction? Anyone want to help with the coding?

Thanks!
Jim

php
  • 2 Contributors
  • 3 Replies
  • 152 Views
  • 13 Hours Discussion Span
  • Latest Post Latest Post by RichmondJim
cjay175 0 Light Poster

If you would want to use IPN you will need to set up a script that paypal will call once payment has been processed or failed. This is useful if you don't want to have to check everyday for the payment.

But for you application, if you don't need it to be automated a simple buy button could work.

Here is a pauy button with some inputs not hidden...

<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n\n    <label>First Name: </label><input type=\"text\" name=\"first_name\" value=\"\" /><br />\n    <label>Last Name: </label><input type=\"text\" name=\"last_name\" value=\"\" /><br />\n    <label>Email: </label><input type=\"text\" name=\"payer_email\" value=\"\" /><br />\n\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n<input type=\"hidden\" name=\"business\" value=\"email@youraddress.com\">\n<input type=\"hidden\" name=\"lc\" value=\"US\">\n<input type=\"hidden\" name=\"item_name\" value=\"youritemname\">\n<label>Account Number: </label><input type=\"text\" name=\"item_number\" value=\"\"><br />\n<label>Dollar Amount: </label>$<input type=\"text\" name=\"amount\" value=\"\"><br />\n<input type=\"hidden\" name=\"currency_code\" value=\"USD\">\n<input type=\"hidden\" name=\"button_subtype\" value=\"services\">\n<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF:btn_paynowCC_LG.gif:NonHostedGuest\">\n<input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">\n<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">\n</form>

Hopefully this is somewhat what you want.

RichmondJim commented: His answer solved the problem. +0
RichmondJim 0 Newbie Poster

CJay, now that I feel like a total ID-10-T, thanks! I never considered UNhiding the fields and using INPUT as you did in your example. I'm a PHP newbie and amazed at how powerful it can be.

I did notice that with this transaction type, users are required to have a PayPal account. Is there an option to permit them to enter credit card info without creating a PP account or is this just one of the restrictions of PayPal \"Standard\" (as opposed to \"Pro\")? (I apologize... this is a case of RTFM; I should download and read the PayPal manual, but you're obviously well versed in it.)

Thanks again,
Jim

RichmondJim 0 Newbie Poster

Never mind, CJay. I found the credit card answer wen I plugged in my REAL verified PP business account instead of test \"dummy\" info.

It works great. The hours I spent searching the web for an answer to be so quickly and accurately answered here with a post!

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/digital-media/ui-ux-design/threads/482098/css-source-file-name-not-showing-up-in-chrome-developer-tools", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " web-design - css source file name not showing up in chrome ... | DaniWeb

css source file name not showing up in chrome developer tools

VenusCrystal 0 Newbie Poster

Hi Everyone,

Some of the styles on my html page is coming only in chrome browser(not in firefox or IE) which I do no want. Using chrome browser developer tools when I tried to inspect them, I found a very strange thing, it is not showing the css source file name for the style.

Please find the developer tool pic below:

\"1c8b90f114e1dc08ebf65028ceb2a181\"

In the pic you can see that for class .app-background there is no source file showing up in developer tool.

Has anyone come across such situation? Any help or suggestions to remove these styles appreciated.

Thanks in advance!!

Regards,
VenusCrystal

  • 4 Contributors
  • 4 Replies
  • 315 Views
  • 4 Days Discussion Span
  • Latest Post Latest Post by VenusCrystal
rtrethewey 24 Junior Poster

At a guess, I'd bet that you accidentally used a class name that is also used by Developer Tools or some other add-on/plug-in.

Change the class name and I bet it fixes the problem.

VenusCrystal commented: Yes changing class name worked :) Thanks! But I was wondering if there is a list of class names used by Developer tools and firebug so that next time I avoid using them. +1
karand19 0 Newbie Poster

I had same problem and their was Blank Space between foldername.
Make sure should be no space in filenames and foldernames.

VenusCrystal 0 Newbie Poster

I am finding this issue in many places in my app now :(

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/342964/php-getting-details-like-ip-address-and-time", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " lan-wan - PHP: Getting details like ip address and ... [SOLVED] | DaniWeb

PHP: Getting details like ip address and time

\"Member
kirtan_thakkar

I want to get details of user when he registers with my website for security reasons. I need ip and date and time I guess. Is there anything else I need to cache while registering? How to get ip,time and date? And time will be in which timezone? I want it in GMT +5:30 means asia - culcutta. Thanks in advance.

And i want to save user log in time. Any help about this will be thankful.

  • 4 Contributors
  • 6 Replies
  • 2K Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by kirtan_thakkar
Shanti C 106 Posting Virtuoso
$IP = $_SERVER['REMOTE_ADDR'];\n$date_time = date(\"l j F Y  g:ia\", time() - date(\"Z\")) ;\necho \"$date_time   IP: $IP\";
nonshatter 26 Posting Whiz

The $_SERVER superglobals provide a load of useful information.

$ip = $_SERVER['REMOTE_ADDR'];     // The IP address from which the user is viewing the current page.\n$time = $_SERVER['REQUEST_TIME'];  // The timestamp of the start of the request.     \n$port = $_SERVER['REMOTE_PORT'];   // The port being used on the user's machine to communicate with the web server.   \n$browser = $_SERVER['HTTP_USER_AGENT']; // Contents of the User-Agent (Web browser): header from the current request\n\n// etc...

See here

nuttyniall 0 Newbie Poster

Hi

Use this to see what information can be accessed and then decide what you want to use and access it like any other array

foreach ($_SERVER as $key => $item)\n {\n  echo \"<li><b>$key:</b> $item<br/></li>\";\n }

N

\"Member
kirtan_thakkar

Thank you all. It done my work. But I have a last question. What would be better format to store user's login time? Like 1296143233 or Thursday 27 January 2011 3:47pm? Thank you. And how to convert 1296143233 to Thursday 27 January 2011 3:47pm. I think first format will save the disk space. Please help.

nonshatter 26 Posting Whiz

I generally tend to use a Unix timestamp, but I'm not really sure what the 'best' format is. This link explains mysql date formats

You can convert a unix timestamp to a human-readable format using the date() function. You can format the date format to your liking:

$timestamp = 1296143233;\n$formattedtime = date(\"d/m/y\", $timestamp)

Or to turn a date back into a timestamp, use strtotime():

$date = \"01/01/1970\";\n$date2timestamp = strtotime($date);
\"Member
kirtan_thakkar

Hey thanks.... My work will get done by this.. Thank you so much to all of you who helped......

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/computer-science/threads/174453/simple-software-design-question", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Simple Software Design Question | DaniWeb

Simple Software Design Question

viperld 0 Newbie Poster

Hello. I've recently written a console program out of necessity (not related to this question) in C++ and am wondering exactly what software engineers use to create Windows applications(Windowed applications with dialog boxes and all that good stuff you pay money to use).

Please do respond as I've always been extremely interested in knowing how software engineers make the difference between console programs and applications. Any relevant links would be very appreciated. Thank you for your time.

  • 4 Contributors
  • 3 Replies
  • 102 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by ddanbe
Lord Soth 4 Posting Whiz in Training

Hi,

For Managed code use C# or Java Swing; for native code use Delphi or Visual C++

ddanbe 2,724 Professional Procrastinator Featured Poster

On the original Macintosh you did not even had the concept of a console. You did your event driven(see Salem above) programming in C or Pascal. You HAD to use windows, dialogs and buttons etc.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/community-center/say-hello/threads/390252/hello-daniweb", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Hello daniweb!!! | DaniWeb

Hello daniweb!!!

as3g 0 Newbie Poster

Sup people, AS3G here!

I'm an AS3 developer who's back in school for a comp sci degree, as other than my specialty, the rest of the IT realm is pretty much a mystery to me! More importantly, I wan make more money! (although flash devs make decent cash, don't want to seem greedy)

I'm sure yall will think about banning me as time goes....I can be a real pain in the ass, but alas, you wont cuz i can also be tonzofun. Hit me up if anybody needs flash/AS help,

Challa back!!!

AS3G

  • 3 Contributors
  • 4 Replies
  • 246 Views
  • 4 Days Discussion Span
  • Latest Post Latest Post by as3g
happygeek 2,411 Most Valuable Poster Team Colleague Featured Poster

Welcome. Abide by the rules of the community (you have read the rules, haven't you?) and we won't need to ban you will we :)

Onlineshade -6 Posting Whiz

Welcome to Daniweb.

as3g 0 Newbie Poster

Welcome. Abide by the rules of the community (you have read the rules, haven't you?) and we won't need to ban you will we :)

Rules / shmooles!!!! I kid, I kid. I love order, without conformity, we'd all be harpooning alleycats for diner tonight, and even worse, getting root canals without novicane, so I like being on the side of the civilized! Thanks happy Geek! BTW, I've never met a \"happy\" geek before, most refreshing!!!

as3g 0 Newbie Poster

your silence speaks volumes

volumes = eval(input( \"How many offenses will it take AS3g to get banned?\"))\n    As3g = \"Outta here\"\n    for silence in range (volumes):\n                banned = AS3g\n                                            \n     \n     print(\"Your\", banned)

again....I kid, I kid. Love the site...Come by Actionscript.org and say hi! I'm, what you'd call a real event handler! I go by RSAF, although since the semester started I've been MIA...

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/299160/how-to-select-length-of-string", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " php - how to select length of string? [SOLVED] | DaniWeb

how to select length of string?

1x4n 0 Newbie Poster

hi all i've been trying to find a php function for this but couldn't find any
hope anyone here can help

i want to show only a part of string
like SELECT LEFT (0,5)... in SQL
but i want to do it in php
ie:

$string = \"hello world\";\n\n$result = php_function($string, 0, 5);\necho $result; //hello

i've tried to replace the php_function with str_pad but it's not working
any idea for this problem?

php
  • 2 Contributors
  • 2 Replies
  • 91 Views
  • 7 Hours Discussion Span
  • Latest Post Latest Post by 1x4n
edwinhermann 57 Junior Poster
$result = substr($string,0,5);
1x4n 0 Newbie Poster

thanx edwin
while i was searching i'm trying to use str_split and it's working
but i think substr is faster :)

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/322193/great-open-source-projects-for-mac-os-x", + "domain": "daniweb.com", + "file_source": "part-00854-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " ide - Great Open Source Projects for Mac Os X | DaniWeb

Great Open Source Projects for Mac Os X

Agnusmaximus -3 Newbie Poster

Hi guys. I'm trying to find a good open source project written in C (any kind: email, browser, chat program, communications program, music player) to download for the Mac os X preferably for Xcode.

I would like to examine these open source programs' source and understand what they do (pick up a few programming tricks from them, learn a few things). Then maybe I can slowly learn to write bigger and bigger programs. That'd be cool

My Os is: Mac Os 10.6.4 Snow Leopard
Xcode: 3.2.1

  • 2 Contributors
  • 2 Replies
  • 216 Views
  • 22 Hours Discussion Span
  • Latest Post Latest Post by Agnusmaximus
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/databases/threads/404870/mysql-access-denied", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " file-system - mysql , access denied ! | DaniWeb

mysql , access denied !

joy39 0 Newbie Poster

i am using mysql for the first time and following an online tutorial.
i am using the command prompt to connect to the mysql server.

the problem is that , i want to create a new database named bookstore.
so, in the mysql> prompt i am writing

create database bookstore;

but, when i press enter it shows

access denied for user ''@'localhost' to database 'bookstore'

please help!

  • 2 Contributors
  • 2 Replies
  • 163 Views
  • 9 Hours Discussion Span
  • Latest Post Latest Post by joy39
pritaeas 2,194 ¯\\_(ツ)_/¯ Moderator Featured Poster

Did you specify the user when starting the command prompt ?

joy39 0 Newbie Poster

ok! got it ! as you said i didn't specify the user. thanks!

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/databases/threads/154082/insert-multiple-records-using-stored-procedure", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " mssql - Insert multiple records using stored procedure [SOLVED] | DaniWeb

Insert multiple records using stored procedure

phuynh77 0 Newbie Poster

Hi Everyone,
I would need your help. I have a project that I need to insert multiple records into my table. Here is more detail.
I design a purchase order table with 3 columns (a, b, c):
a: is primary key with identity (1,1) primary key
b: is defined integer (allow duplicate)
c: is varchar(5)

I want to have multiple records with same value of a.
For ex: when I create purchase order # 1. I have multiple records inside the PO# 1. Also with PO# 2, I have multiple records....also so on.

How can I write a stored procedure for this needed?

  • 2 Contributors
  • 19 Replies
  • 3K Views
  • 6 Days Discussion Span
  • Latest Post Latest Post by phuynh77
dickersonka 104 Veteran Poster

advice would be you don't want multiple records with the same value of a

for one your database is set to not allow it
for two, you need to uniquely identify this record

might want to rethink the schema

something with a purchaseorder
and purchaseorderdetails

purchaseorder
PURCHASE_ORDER_ID
PO_DATE
CLIENT_ID

purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT

this will allow you to have multiple records for a single purchase order

phuynh77 0 Newbie Poster

advice would be you don't want multiple records with the same value of a

for one your database is set to not allow it
for two, you need to uniquely identify this record

might want to rethink the schema

something with a purchaseorder
and purchaseorderdetails

purchaseorder
PURCHASE_ORDER_ID
PO_DATE
CLIENT_ID

purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT

this will allow you to have multiple records for a single purchase order

Hi There,
Thank you for your idea. I will update my purchaseorder table and add purchaseorderdetail table into my database. Could you please send me the stored procedure that allows how to have multiple records insert into. Thanks again.

dickersonka 104 Veteran Poster

you normally wouldn't pass arrays to the stored procedure

for each insert you should make the call to insert purchaseorderdetails, ie 5 items 5 insert calls

passing arrays to a stored procedure i wouldn't consider good practice, the workaround is normally to pass a comma delimited string, but once again i would recommend making the database calls to insert from code side and not rely on it from database side

phuynh77 0 Newbie Poster

you normally wouldn't pass arrays to the stored procedure

for each insert you should make the call to insert purchaseorderdetails, ie 5 items 5 insert calls

passing arrays to a stored procedure i wouldn't consider good practice, the workaround is normally to pass a comma delimited string, but once again i would recommend making the database calls to insert from code side and not rely on it from database side

===================
Hi dickersonka
I'd need your help again. Per your help, I create 2 tables (PurchaseOrder & PurchaseOrderDetails)
PO table: POID int Identity(1,1) primary key
POInputDate smalldatetime

POD table: PODID int identity(1,1) primary key,
PODID int foreign key,
ItemID int, ItemPrice money
I have coded sp_AddPurchaseOrder with multiple insert (ex: 3 times insert). Somecases, I want to insert only 1 or 2 records and ignore the third insert. But my web application send me a message that Can not insert the records. Could you please share your idea? Your help is appriciated.

Below is my stored procedure:

create proc sp_AddPurchaseOrder\n(\n@PurchaseOrderInputDate smalldatetime,\n\n@PurchaseOrderID_1 int,\n@PurchaseOrderItemID_1 int,\n@PurchaseOrderItemPrice_1 money,\n@PurchaseOrderQuantity_1 decimal(10,2),\n\n@PurchaseOrderID_2 int,\n@PurchaseOrderItemID_2 int,\n@PurchaseOrderItemPrice_2 money,\n@PurchaseOrderQuantity_2 decimal(10,2),\n\n@PurchaseOrderID_3 int,\n@PurchaseOrderItemID_3 int,\n@PurchaseOrderItemPrice_3 money,\n@PurchaseOrderQuantity_3 decimal(10,2)\n)\nas \ndeclare @ident int\ninsert into purchaseorder values (@PurchaseOrderInputDate)\n\nset @ident = @@IDENTITY\n\nInsert into PurchaseOrderDetails (PurchaseOrderID, PurchaseOrderItemID,\n\t\t\t\tPurchaseOrderItemPrice, PurchaseOrderQuantity) \nvalues (@ident, @PurchaseOrderItemID_1, @PurchaseOrderItemPrice_1, @PurchaseOrderQuantity_1)\n\nif @PurchaseOrderID_2 <> ' ' \nbegin\n\tif @PurchaseOrderItemID_2 <> ' '\n\tbegin\n\t\tif @PurchaseOrderItemPrice_2 <> ' ' \n\t\tbegin\n\t\tif @PurchaseOrderQuantity_2 <> ' '\n\t\t\tbegin\nInsert into PurchaseOrderDetails (PurchaseOrderID, PurchaseOrderItemID,\n\t\t\t\tPurchaseOrderItemPrice, PurchaseOrderQuantity) \nvalues (@ident, @PurchaseOrderItemID_2, @PurchaseOrderItemPrice_2, @PurchaseOrderQuantity_2)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\tend\n\nif @PurchaseOrderID_3 <> ' ' \nbegin\n\tif @PurchaseOrderItemID_3 <> ' '\n\tbegin\n\t\tif @PurchaseOrderItemPrice_3 <> ' ' \n\t\tbegin\n\t\tif @PurchaseOrderQuantity_3 <> ' '\n\t\t\tbegin\nInsert into PurchaseOrderDetails (PurchaseOrderID, PurchaseOrderItemID,\n\t\t\t\tPurchaseOrderItemPrice, PurchaseOrderQuantity) \nvalues (@ident, @PurchaseOrderItemID_3, @PurchaseOrderItemPrice_3, @PurchaseOrderQuantity_3)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\tend
dickersonka 104 Veteran Poster

Although you aren't passing arrays, you should return the id of the purchase order to your code.

Then call a stored procedure for sp_AddPurchaseOrderDetails for each item you have, 1 item 1 call, 3 items 3 calls

phuynh77 0 Newbie Poster

dickersonka,
I am new with SQL server 2005 and still new to stored procedure. Could you please help me with the sp coding?

dickersonka 104 Veteran Poster

sure, you had a good start on the first one
we'll do the purchaseorder

create procedure sp_AddPurchaseOrder\n(\n   @POInputDate smalldatetime,\n   @PurchaseOrderId int OUTPUT\n)\nas\n\ninsert into PurchaseOrder (PO_DATE) values (@POInputDate)\n\nselect @PurchaseOrderId = @@IDENTITY

then you will use the same concept for creating purchaseorderdetails, except you will pass in the purchaseorderid as a parameter

(btw i just used the date column, and not client_id like we talked about before)

phuynh77 0 Newbie Poster

sure, you had a good start on the first one
we'll do the purchaseorder

create procedure sp_AddPurchaseOrder\n(\n   @POInputDate smalldatetime,\n   @PurchaseOrderId int OUTPUT\n)\nas\n\ninsert into PurchaseOrder (PO_DATE) values (@POInputDate)\n\nselect @PurchaseOrderId = @@IDENTITY

then you will use the same concept for creating purchaseorderdetails, except you will pass in the purchaseorderid as a parameter

(btw i just used the date column, and not client_id like we talked about before)

==================
Hi dickersonka,
I am very sorry to bother you many. I can't figure how to code the second sp. Could you please point to me the \"purchaseorderdetails\" ? Thanks much

dickersonka 104 Veteran Poster

purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT

create procedure sp_AddPurchaseOrderDetails\n(\n   @PurchaseOrderId int,\n   @ItemId int,\n   @ItemAmount decimal(10,2),\n   @PurchaseOrderDetailsId int OUTPUT\n)\nas\n\ninsert into PurchaseOrderDetails (PURCHASE_ORDER_ID, ITEM_ID, ITEM_AMOUNT) values (@PurchaseOrderId, @ItemId, @ItemAmount)\n\nselect @PurchaseOrderDetailsId = @@IDENTITY
phuynh77 0 Newbie Poster

purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT

create procedure sp_AddPurchaseOrderDetails\n(\n   @PurchaseOrderId int,\n   @ItemId int,\n   @ItemAmount decimal(10,2),\n   @PurchaseOrderDetailsId int OUTPUT\n)\nas\n\ninsert into PurchaseOrderDetails (PURCHASE_ORDER_ID, ITEM_ID, ITEM_AMOUNT) values (@PurchaseOrderId, @ItemId, @ItemAmount)\n\nselect @PurchaseOrderDetailsId = @@IDENTITY

=============================
Hi There,
I am confused now. Please...please...please help me.
Below is the stored procedure that I have learned from you:

create proc sp_AddPurchaseOrder\n(\n@PurchaseOrderInputDate smalldatetime,\n@PurchaseOrderID int output\n)\nas\ninsert into purchaseorder (purchaseorderinputdate)\nvalues(@PurchaseOrderInputDate)\nselect @PurchaseOrderID = @@IDENTITY\n\nI executed this sp first... then execute the one below:\n\n\ncreate proc sp_AddPurchaseOrderDetails\n(\n@PurchaseOrderID int,\n@PurchaseOrderItemID int,\n@PurchaseOrderItemPrice money,\n@PurchaseOrderQuantity decimal(10,2),\n@PurchaseOrderDetailsID int output\n)\nas\ninsert into purchaseorderdetails (purchaseorderid, purchaseorderitemid, purchaseorderitemprice, purchaseorderquantity)\nvalues (@PurchaseOrderID, @PurchaseOrderItemID, @PurchaseOrderItemPrice, @PurchaseOrderQuantity)\n\nselect @PurchaseOrderDetailsID = @@IDENTITY

=====================

but I got the error message:
Msg 201, Level 16, State 4, Procedure sp_AddPurchaseOrderDetails, Line 0
Procedure or function 'sp_AddPurchaseOrderDetails' expects parameter '@PurchaseOrderID', which was not supplied.

Could you please help again? your help is much appreciated.

dickersonka 104 Veteran Poster

the problem is that when you execute the first query, it is returning your purchaseorderid, which links the purchaseorderdetails to it

you need to pass this in as a parameter from code side

phuynh77 0 Newbie Poster

the problem is that when you execute the first query, it is returning your purchaseorderid, which links the purchaseorderdetails to it

you need to pass this in as a parameter from code side

==================
Hi dickersonka
I am using C# to code the front application. Do you have any idea for passing the @IDENTITY or you know any link for these information. I'd need to learn about this.

phuynh77 0 Newbie Poster

Here's a link

http://blogs.msdn.com/vsdata/archive/2006/08/21/711310.aspx

you can change your stored procedure, by removing the \"OUT\" parameter, and instead of
select @PurchaseOrderId = @@IDENTITY

you just use return @@IDENTITY

=====

Do you have a link that has information for Web application using c# syntax? The link you have sent was for windows application.
Also, you mean that I don't need to state

select @PurchaseOrderID = @@IDENTITY
I can replace with
return @@IDENTITY

is that you mean?

dickersonka 104 Veteran Poster

sorry, this way does use the way we had first with
OUTPUT and select @PurchaseOrderID = @@IDENTITY

so change it back to that to follow that example, no more changes now :-)

phuynh77 0 Newbie Poster

sorry, this way does use the way we had first with
OUTPUT and select @PurchaseOrderID = @@IDENTITY

so change it back to that to follow that example, no more changes now :-)

=====
Hi ,
Per coding, I almost get it, accept this piece:

newId = (int)cmdl.Parameters[\"@NewUserId\"].Value;

based on my Visual studio 2005 (C#). It does not recognise
(int)cmdl.Parameters[\"@NewUserId\"].Value;

do you have any idea?

dickersonka 104 Veteran Poster

NewUserId will be PurchaseOrderId

make sure you have this in the stored procedure as well, like we said before

@PurchaseOrderId int OUTPUT

also make sure if you modified the code it is cmd not cmdl, unless you changed the name

phuynh77 0 Newbie Poster

Hi dickersonka,
Awesome for your help. I got it. Thank millions. You are the best.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/325745/need-help-to-write-simple-program-for-interest-rates", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - need help to write simple program for interest ... | DaniWeb

need help to write simple program for interest rates

deepfixa 0 Newbie Poster

Im new to programming and i cant seem to be able to figure this question out:

Write a c++ program that uses two functions, called simple_interest(float amount, int duration) and compound_interest(float amount, int duration), to compute interest on an investment. The program should take the name of client and initial investment of a the client and store them in two arrays, then asks user to enter the duration and interest rate.
The program then calls the appropriate function to compute either simple or compound interest. The program then adds the interest to the initial amount to obtain the current value of the investment.
The program then outputs the name, principle amount, duration, interest rate, interest and total amount for simple and compound interest options.

ive been working on this for two weeks, any help anyone?

c++
  • 2 Contributors
  • 1 Reply
  • 141 Views
  • 6 Hours Discussion Span
  • Latest Post Latest Post by SgtMe
SgtMe 46 Veteran Poster Featured Poster

Please post your code so that we can help you. What is the particular problem that you are having?

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/databases/threads/470124/sql-case-statement", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " mssql - SQL Case Statement | DaniWeb

SQL Case Statement

kahaj 0 Junior Poster

I only have experience using pretty basic Oracle. However, I'm now in need of a better understanding of SQL. I'm trying to write a query using CASE statements (as this seems to be the best approach), but am admittedly lost at the moment.

Here is what I have as a basis:

SELECT LEFT(ITEM_A, 4) AS \"PREFIX\",\n    SUBSTRING(RIGHT(ITEM_A, 12), 5, 2) AS \"SUFFIX\",\n    RIGHT(ITEM_A, 16) AS \"INGREDIENT\"\nFROM THE_TABLE \nWHERE ITEM_B = 'VAL1'\n    AND ITEM_C = 'VAL2' \nGROUP BY ITEM_A\nORDER BY PREFIX ASC, SUFFIX ASC\n

This is yielding a good result set for evaluation. Now, I need to determine which (if any) 'INGREDIENT' values are associated to multiple 'PREFIX' & 'SUFFIX' combos and what those combos are if present. I'm really hitting a brick wall here.

  • 5 Contributors
  • 4 Replies
  • 337 Views
  • 1 Week Discussion Span
  • Latest Post Latest Post by ugi.nagesh
dev90 10 Light Poster

And also post your table values.

rch1231 169 Posting Shark

Hello,

I happen to be a big fan of SQL's capability to do a auery within a query (somtimes called sub-queries). This give you the ability to generate a sub set of data and then query it, Kind of like generating a temp table but for small sets of data. I have spaced it out a bit so you can see your original query geneerating the data1 set of data and the pulling and ordering the data from there. I hope this helps with what you want to do. Try something like this for your query:

select data1.PREFIX, \ndata1.SUFFIX, \ndata1.INGREDIANT\nfrom \n(\nSELECT LEFT(ITEM_A, 4) AS \"PREFIX\",\nSUBSTRING(RIGHT(ITEM_A, 12), 5, 2) AS \"SUFFIX\",\nRIGHT(ITEM_A, 16) AS \"INGREDIENT\"\nFROM THE_TABLE\nWHERE ITEM_B = 'VAL1'\nAND ITEM_C = 'VAL2' \n) data1\nOrder by data1.PREFIX,\n data1.SUFFIX\n
ugi.nagesh 0 Newbie Poster

HI

Could you provide the table structure with data and output that you are expecting from the Query.

Thanks

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/496504/inheriting-data-from-multiple-classes", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " oop - Inheriting data from multiple classes? | DaniWeb

Inheriting data from multiple classes?

gangsta gama 0 Junior Poster in Training

Hey guys! I have a quick question that I think is a simple mess up. I am trying to make a console word game in c#, and I have different classes, and a main class that calls those classes. I first have the Player class, and the CreateCharacter class. My player class houses all of the variables that pertain to the player of the class (level, stats etc.), and my CreateCharacter class is what calls on the startup of the game, which asks the name, race, class they want the character to be. So far that is well and good, but when I call the classes I know no other way than to say: Player player = new Player(); and I believe that takes the data I got from CreateCharacter, and erases it. So my actual engine calls CreateCharacter, gets all the information, then when I call all of the variables in the engine, they come back erased. Any help is appreciated! Thanks!

oop
  • 3 Contributors
  • 5 Replies
  • 254 Views
  • 22 Hours Discussion Span
  • Latest Post Latest Post by JamesCherrill
ddanbe 2,724 Professional Procrastinator Featured Poster

Could you sendin some code or some drawing of your classes structure.
It would make it much clearer.
O, and inheriting from multiple classes is not possible in C#.

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

In terms of architecture, a common solution is to have a master Game class that holds references to all the instances of all the components that make up the current state of the game, eg a list of Players etc. The Game class instance is shared by passing it to every other class's constructors. Thus every class has a reference to the Game, and can call its methods to get whetever info they need, eg getPlayers(), getCurrentTurnPlayer() etc

gangsta gama 0 Junior Poster in Training

Could you sendin some code or some drawing of your classes structure. It would make it much clearer. O, and inheriting from multiple classes is not possible in C#.

I have put together a small sample that explains my problem and what I am trying to do.

In terms of architecture, a common solution is to have a master Game class that holds references to all the instances of all the components that make up the current state of the game, eg a list of Players etc. The Game class instance is shared by passing it to every other class's constructors. Thus every class has a reference to the Game, and can call its methods to get whetever info they need, eg getPlayers(), getCurrentTurnPlayer() etc

That makes sense, but when I call a new instance of my class in my engine, I do not know how to pass it on and have the other classes call the instance in the engine :(

I have been working on this on and off in c# console and c# windows application and this seems to be my only brick wall in actually learning more and creating things in this language.

Here is my sample problem, I have the main Engine, I have TestPlayer which holds the variables, then I have CreateCharacter. The Engine calls CreateCharacter, which gets all of the information from the user, then displays the info. Then it goes back to the main constructor of the engine, and it tries to display the info again, and it is blank.

Engine:

using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Test\n{\n    public class Engine\n    {\n        public static void Main(string[] args)\n        {\n            CreateCharacter cc = new CreateCharacter();\n            TestPlayer player = new TestPlayer();\n\n            cc.createCharacter();\n            Console.ReadKey();\n            Console.Clear();\n            Console.WriteLine(\"The player name is \" + player.name + \" and their gender is \" + player.gender);\n            Console.ReadKey();\n\n        }\n    }\n}\n

CreateCharacter:

using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Test\n{\n    public class CreateCharacter\n    {\n        public void createCharacter()\n        {\n            TestPlayer player = new TestPlayer();\n\n            Console.WriteLine(\"What is your name?\");\n            player.name = Console.ReadLine();\n            Console.WriteLine(\"\\nWhat is your gender?\");\n            player.gender = Console.ReadLine();\n            Console.WriteLine(\"Hello \" + player.name + \" who is a \" + player.gender);\n        }\n    }\n\n\n}\n

TestPlayer:

using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Test\n{\n    public class TestPlayer\n    {\n        public string name { get; set; }\n        public string gender { get; set; }\n    }\n}\n

Thanks in advance guys!!

ddanbe 2,724 Professional Procrastinator Featured Poster

public void createCharacter() is just a method in your CreateCharacter class.
You create a player object in it you fill the fields with values and when createCharacter() ends, all this will return to oblivion.
In your engine, you create an empty player and after createCharacter() you try to show the players values, which are of course empty.

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

CreateCharacter is what we call a \"Factory\" - it makes TestPlayers.
Just constructing a CreateCharacter isn't enough - what it needs is a method that creates a TestPlayer and returns it, so the main Engine can save and share that TestPlayer.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/digital-media/digital-marketing/threads/38951/should-i-add-a-forum", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " social-media - Should I add a forum? | DaniWeb

Should I add a forum?

thewindmaster 0 Newbie Poster

I have an Extreme Sports website www.magxzine.com that has been up for a few months.

I have done almost no promotion on the site but I am begining to attract a few visitors ~150 uniques per day. Average pages are about 2.5 per visitor.

I am considering adding a forum to the site to keep visitors coming back on a regular basis but do not really have time to get involved heavily with posting and maintaing a forum.

Is this something I should persue now or should I wait for more traffic before attempting?

  • 3 Contributors
  • 2 Replies
  • 107 Views
  • 1 Week Discussion Span
  • Latest Post Latest Post by etechsupport
dojo 0 Junior Poster

but do not really have time to get involved heavily with posting and maintaing a forum.

This is the main problem: you need to spend a LOT of time in your forums in order to make them survive at first and then grow. If you have the time to do it, then it's a good idea, but otherwise you'd just prepare yourself for a bit fiasco. I know in all webmaster articles (even mine :D) you're told to create a community to have returning visitors. But you need to really know if you are willing to put all the time and work it needs ..

etechsupport 2 Posting Whiz in Training

I have checked your site, its look good, I hope you should add forum on it, start with good posts, let few people close to you to contribute to your forum.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/370534/interactive-input-in-pyplot", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " python - Interactive input in pyplot | DaniWeb

Interactive input in pyplot

hughesadam_87 54 Junior Poster

Hello all,

Following the guide on sourceforge, I've created several pyplot programs which have nice event handling. I'm able to press keys on my keyboard and the plots advance and change. The backend for this program is GTKagg. There are several instances where I can change parameters in the plot interactively. For example, if I press r, the data will begin at 0. I am able to successfully interact through the terminal; that is, I press a button and the terminal prompts me for a value before it begins running the next iteration of the code. What I can't find is if it's possible to add a small box on the pyplot figure itself which will allow me to easily put in these parameters, instead of going through the terminal.

For example, a box stays open and if I enter a number, it plots a new graph. This is easily done through the terminal, but I'm confused on how to incorporate the GUI right into the pyplot program. Is there support for this already?

  • 3 Contributors
  • 3 Replies
  • 115 Views
  • 5 Days Discussion Span
  • Latest Post Latest Post by hughesadam_87
TrustyTony 888 ex-Moderator Team Colleague Featured Poster

Here is snippet of vegaseat in his sticky thread, how to use matplotlib and tkinter, maybe you can apply the example.

hughesadam_87 54 Junior Poster

Thanks. Yeah, I saw this demo on the matplotlib archives. One thing I'm having trouble with is finding good documentation on these backends, like FigureCanvasTkAgg. Who actually releases these programs?

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/274383/jdom-from-scratch", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - JDOM from scratch | DaniWeb

JDOM from scratch

Odena 0 Newbie Poster

Im trying to run some codes i found of JDom for a home work (super hard to find good material) any way. I was trying to run it on NetBeans and I dont have the library \" org.jdom \"
Anyone, can please give me the right link to download this and tell me where to install it on my HD.
OR if possible, anyone have a really good JDom Tutorial to pass me ???
help!!! SOCORRO! AYUDA!

thanks for the time

  • 3 Contributors
  • 6 Replies
  • 104 Views
  • 21 Hours Discussion Span
  • Latest Post Latest Post by peter_budo
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ever heard of Google? Search result

Odena 0 Newbie Poster

Ever heard of Google? Search result

Ofcourse I have used google before i posted here, its mean that you are so ironic and cant even give an straight answer, the documentation in www.jdom.org/ is really vague, and most of the other post dont have nothing in specific.
And i guess you dont either for the answer.
But thanks, God Bless you

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The docs are not vague. Did you bother to read the FAQ?

Just download the jar files and add them to your Netbeans project. If you don't know how to do that, read the Netbeans help files.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ofcourse I have used google before i posted here, its mean that you are so ironic and cant even give an straight answer, the documentation in www.jdom.org/ is really vague, and most of the other post dont have nothing in specific.
And i guess you dont either for the answer.
But thanks, God Bless you

You ask general answer so do not expect answer in depth. Either way as Ezzaral already posted there is FAQ, plus if you bothered to click on any of the links in the documentation you would discover more in detail info and tutorials like this - Elliotte Rusty Harold's book Processing XML with Java (Addison-Wesley, 2002), Chapter 14: JDOM and Chapter 15: The JDOM Model which is some odd 70 pages of explanation and code example on usage of this library. Nevertheless I'm inclined to believe you have no clue how to add resources to netbeans so I will let you have look on one of my tutorials

Odena 0 Newbie Poster

In that you are right, Im not an expert in programing Java, actually Im a quite beginner, the java classes will start next week, which is really irrational from the teacher to have me do some applications with it before even teach it. Im sorry if Im not a PRO-programer or a geek. But I never thought asking for directions will get me to people that would treat me like if i was lazy.
If this is a site only for PRO people, it should say so, I wouldn't have bothered to sign in for help in first place
BUT THANK YOU FOR THE LINKS, im looking at them right now

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As I said before, you ask general question you get general direction...

PS: I would treat you as lazy in case if you copy and paste your school assignment and asked for code.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/250700/jar-to-exe", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - jar to exe.. | DaniWeb

jar to exe..

musthafa.aj 6 Posting Whiz

hello!

i want to convert my jar application into exe..

because i need seal all class files extracting from jar...

any freeware available for this..

i found something that are not free...

thank you!

  • 2 Contributors
  • 1 Reply
  • 269 Views
  • 6 Hours Discussion Span
  • Latest Post Latest Post by kvprajapati
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/222993/header-files", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - header files | DaniWeb

header files

ExMachina 0 Newbie Poster

Hello all,

So to start off I'm just starting to learn programming so please excuse a lot of my noob mistakes especially when trying to explain what is going on/wrong.

I've been trying to use a header file in an example program I'm trying to complete but the compiler doesn't recognize the file...in fact it says that no such file or directory exists. I'm using Visual C++ 2008 Express Edition if that makes a difference on how to set anything up.

So I was wondering if anyone could walk me through the process of setting up a header file. Or a link to the same effect so I know that I'm starting the process correctly. Thanks!

c++
  • 3 Contributors
  • 13 Replies
  • 169 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by Frederick2
Frederick2 189 Posting Whiz

Well, if you've created a new C++ project/solution, there should be a Solution Explorer visible somewhere on the screen. I believe there's a 'File View' which can be toggled. When that is selected you should see a Tree View Control that lists the various file types you can include in a project. Naturally, C++ projects need a *.cpp file. These will be listed under the 'Source' files node. Under the 'Header' files node are the header fies in your project if there are any. If there aren't then Right Clicking on that node will pop up a context menu where you can either navigate to where some *.h file exists that you want to include in your project, or give you the option of adding a new blank file into which you can type header file type info.

Is this making any sense? Have you gotten that far?

If you have something like this...

#include <iostream.h>
#include \"MyHeader.h\"

...and the compiler error says it can't find \"MyHeader.h\", then that means the compiler can't find \"MyHeader.h\". In other words, if its not in the directory its looking, you'll have to add a explicit path to the file, or put it in with the other source files for the project where the compiler wil find it.

Bezelis 2 Newbie Poster

Hi, ExMachina.

You have to write this:

#include<header_name.h>

(ANGLE BRACKET: This form instructs the preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable.)

or

#include\"header_name.h\"

(DOUBLE QUOTATION MARKS: This form instructs the preprocessor to search in the same directory of the source files.)

Keep in mind that in new C++ standard, the header files of the standard library haven't the .h extension. So, you have to write <iostream> instead of <iostream.h>.

---------------------------------------------------------------
In Visual C++ you have to create a project file to compile the sources (even if the source code consist of a single file).

ExMachina 0 Newbie Poster

Frederic2,

Thank you for the input thus far. In the explorer window I have the header file under the \"Headers\" node and the .cpp source code under the \"Source\" node and I have the code starting with

#include <iostream>
#include \"GradeBook.h\"

but when I try to build the solution it still comes up with fatal error C1083: Cannot open include file: 'GradeBook.h' : No such file or directory.

And after reading what you posted I moved the .h file into the same directory as the 'GradeBook' program but that didn't help.

Bezelis,

Also just wanted to thank you for your input as well, although I'm kinda lost with what you're talking about. Granted I haven't tried to compile anything from the command line yet....although I need to practice that at some point soon! I'm a little confused with what you said concerning the DOUBLE QUOTATION MARKS and about the standard library not having the .h extension and having to write <iostream> instead of <iostream.h>. If you could explain that a little more indepth I would appreciate it.

Frederick2 189 Posting Whiz

Have you successfully created and ran any project yet? Even a Hello, World! project?

ExMachina 0 Newbie Poster

Indeed I have. And when its just a .cpp project (minus all my syntax errors) they have all compiled and ran just like they were supposed to. but when I went to create the header file I went File-New-File... instead of File-New-Project (figuring that is how you create a header file).

Frederick2 189 Posting Whiz

Well, that's good! Then we know your setup is working.

Did you try specifying the exact path in the #include line, such as...

#include \"C:\\Documents and Settings\\VStudio\\MyRecalcitrantHeader.h\"

I mean, you shouldn't have to do that, but I'm just trying to figure out what's wrong, i.e., why it won't read a file you claim is there?

Bezelis 2 Newbie Poster

GradeBook... Is it \"C++ How to program (Deitel & Deitel)\", isn't it?

First of all, I'm sorry for my bad language (I'm not English).

I had understood you had some problem with the inclusion of an header file.

Visual Studio allow you to compile only the source code of a project, because in most cases the code is complex and it is subdivided into more files. The other compilers, such as Borland C++ and GCC, can immediately compile a single file. Then, in VC++ you have to click on \"File --> New --> Project --> Visual C++ --> General --> Empty Project\" and create a solution. After this, you have to click with the right button of the mouse in \"Source File --> Add\" to load the C++ files. And in \"Header File --> Add\" to load YOUR header files, NOT the STANDARD HEADER FILE (iostream, cstdlib, etc.).

However, in C++ there are some conventions to include an header file. The name of the header file between angle brackets < > tell to the compiler to search it in the standard directories, defined by the compiler itself (the standard header files, such as \"iostream\", are contained in one of this directories). The name of the header file contained in the double quotation marks \" \" tell to the compiler to search in the directories wherein there is the source code.

What are \"Standard Header Files\"? They are the header files of the Standard Library. The C++ Language doesn't define functions (i.e. math functions, i/o functions, etc.), so the ANSI (American National Standards Institute) and the ISO nominated programmers to write some common and useful functions for C++. These functions were included into the standard library. For example, \"iostream\" contains Input/Output functions. The Standard Library (derived from C language), is attached to compilers.

http://en.wikipedia.org/wiki/C_standard_library

In the old C++ revision, the name of standard header files had an extension .h. In the new revisions, this extension was removed. So, there are some compiler that accept only iostream.h and other (modern compiler) that accept only iostream.

Take a look at MSDN for compiler errors:
http://msdn.microsoft.com/en-us/library/et4zwx34%28VS.80%29.aspx

DdoubleD commented: excellent material on topic +2
ExMachina 0 Newbie Poster

Frederick2,

So when I copy and pasted the entire path ie. \"C:\\Documents and Settings...myHeaderFile.h\" the program compiled with ZERO problems!!! I am quite curious now because I didn't think that I had to put all of that in the #include \" *.h\". Any suggestions?

Bezelis,

Thank you for the in depth explanation!! That helped me understand a lot more of the logic of programming in C++ and yes you are right in that \"GradeBook\" is a Dietel project. Oh and thank you for the links!!! If you have any suggestions as to why I would have to indicate the entire path for my header file to work I would welcome the input (because right now i have to put #include \"C:\\Documents and Settings\\Visual Studio 2008\\Projects\\myHeaderFile.h\" for the program to compile.)

Frederick2 189 Posting Whiz

No, I don't know why you would have to do that, ExMachina. But it was a good idea wasn't it!

Any chance you installed Visual Studio under one log in and are developing under another? Possible rights problems? Just grasping at straws here!

If you copied that file from a CD is it marked as read only??? That ones bit me a few times. As the other knowlegeable fellow said, the development environment has several places it looks for things before crapping out with an error.

I actually just bought VC9 myself recently. All these modern compilers seem to be creating ever more complicated directory setups for a project's files, that's for sure. About my favorite is Dev-cpp. With that I can get a project up and running in about 30 seconds. I can't say that for any of the others, i.e., CodeBlocks, VC6, VC9, etc.

Bezelis 2 Newbie Poster

You're welcome! :)

Yes, you can enter the entire path of your header file, but you're not obligated to do that. If you put the header file and the source file in the same directory, you can enter only the name of the header file. Here an example (Please, follow my instructions).

1. Create a directory in the desktop, called \"Pythagoras\".

2. Open a text editor (NoteBook or other) and create two files into it, rispectively MySource.cpp and MyHeader.h. Remember to save the correct extension with the text editor (not TXT extension).

MyHeader.h

#include<cmath>\n\nfloat ExMachina(float x, float y);\n\nfloat ExMachina(float x, float y)\n{\n   float hyp = sqrt(x*x + y*y);\n   return hyp;\n}

In the previous code, we are defined the function ExMachina(). <cmath> containing the function sqrt(). ExMachina() take in input two arguments and solve the Pythagorean Theorem.

MySource.cpp

#include<cstdlib>\n#include<iostream>\n#include\"MyHeader.h\"\nusing namespace std;\n\nint main()\n{\n    float cath1, cath2;\n\tfloat hypotenuse;\n\n\tcout << \"Insert a number (cathetus 1): \";\n\tcin >> cath1;\n\tcout << \"Insert a number (cathetus 2): \";\n\tcin >> cath2;\n\n\thypotenuse = ExMachina(cath1, cath2);\n\n\tcout << endl << \"The hypotenuse is: \" << hypotenuse << endl << endl;\n\n\tsystem(\"pause\");\n\treturn 0;\n}

3. Open Visual C++ and click on \"File --> New --> Project --> General --> Empty Project\". Insert a project name and click OK.

4. Drag your file MySource.cpp in the \"Source Files\" (in VC++) and MyHeader.h in the \"Header Files\".

5. Click on the entry \"Build\".

Here, the project file: http://www.megaupload.com/?d=VVI0TN9W


Ciao,
Angelo

Bezelis 2 Newbie Poster

Another thing. People usually begins to learn computer science starting from an example program like this: Please, write a program to display the string \"hello world, ciao mondo, bonjour le monde\" and sum 5 + 3.

In my honest opinion, it is better to think about the problem to solve before attempting to transform it into a program. Here's how it should be the steps:

1. Problem (informal)
Example: I have to go from Rome to London

2. Problem (formal)
I write all the possible routes to go from Rome to London and I study them. (Graph Theory)

3. Algorithm (mathematics / physics)
I elaborate an algorithm (What is it the fastest route? Or, what is it the shortest route?)....

Curiosity (Dijkstra's Algorithm)

4. Program (computer languages)

People usually follows this steps in reverse.

ExMachina 0 Newbie Poster

Frederick2,

Yeah that was a good idea!!! And to answer your other questions I'm logged in under the same profile as I loaded the program and it isn't write protected (at least as far as I know...I will have to do some more digging just to be sure) but thank you for all your input!

Bezelis,

Seriously thank you for all the help...especially with your last post on how to approach writing a program. That's going to take some work to change the mindset but it will really help. Thanks! And as soon as I get the chance I will try that program and let you know how it turns out!!!

Frederick2 189 Posting Whiz

You know, sometimes, when things don't work for seemingly no reason at all, it pays to just start over, reboot, whatever. In your case ExMachina, have you considered just deleting the project (saving the source, of course) and starting over? There's almost certainly a bad reference involved somewhere that is messing things up - perhaps something you did in setting up the project. Before doing that perhaps you could try the less drastic solution of just highlighting the misbehaving include file in the solution explorer, and hitting the delete key. A popup will ask if you want to delete the file or simply remove it from the project. Just tell it to remove it. Then shut down VS and restart. Open up the project and re-include the file. Right click on the 'Headers' folder and select 'Add Existing Item', then try again. It might work.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/threads/71312/dell-inspiron-8200-dead", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " troubleshoot-hardware - Dell Inspiron 8200 dead | DaniWeb

Dell Inspiron 8200 dead

sciencemagic 0 Newbie Poster

My five year old Inspiron 8200 has finally died. For about a week it said it was running on batteries, even though it was plugged in. If you unplugged it, it would instantly shut down. Or if you took out the battery while it was plugged in, it would do the same. Now it does absolutely nothing when I push the power button. I've tried the usual fixes, taking out the battery, unplugging it for awhile, holding down the power button for a minute, etc.

Does this sound like a motherboard failure?

  • 2 Contributors
  • 3 Replies
  • 98 Views
  • 2 Days Discussion Span
  • Latest Post Latest Post by TheNNS
TheNNS 112 Nearly a Posting Virtuoso

yes, it could be that, but why in the heck did you freaking take out the battery while it was running? you DON\"T DO THAT!

if it was under warranty, i'd send it back. I would just get a new motherboard on ebay or something.

sciencemagic 0 Newbie Poster

yes, it could be that, but why in the heck did you freaking take out the battery while it was running? you DON\"T DO THAT!

if it was under warranty, i'd send it back. I would just get a new motherboard on ebay or something.

What's wrong with taking out the battery when the machine is on AC power? I've never seen a warning about that.

After five years the warranty is long since expired.

I managed to get the machine running again for a little while. The problem seems to be the circuit board that plugs into the top of the motherboard. It must have a crack in it or something. Do motherboards usually come with all the extra circuit boards attached? I've looked on eBay but can't tell from the descriptions.

TheNNS 112 Nearly a Posting Virtuoso

You'll have to ask, it really depends on the seller.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/20320/multi-boot-disc-question", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - Multi Boot disc question | DaniWeb

Multi Boot disc question

ArtChess 0 Junior Poster in Training

I have bee assigned the project to create a multi boot disc for our pc's at work. We currently use symantec ghost v7.5.

I am a tech that only know's what he is taught. And all i know is we are given a CD that boots up the PC's that has the necessary drivers for the given PC's. I have never had to create a 'MultiBoot' disc to ghost PC's.

However I just wanted to know, exactly.. what defines a 'MultiBoot' disc?

And also, if anyone can give some recomendation as to what other software that i could try that maybe better.

We here at work normally have a difficulty time ghosting PC's that use Xircomm Network PCMCIA cards. Any suggestions on that would be great also.

  • 4 Contributors
  • 7 Replies
  • 189 Views
  • 1 Week Discussion Span
  • Latest Post Latest Post by Acidburn
Thong_Ispector 2 Practically a Master Poster

There is a misuse of terms here.
Multiboot means multiple operating systems.

If you are ghosting you are doing a preinstall / reinstall

pcmcia ... I assume you are working on laptops...

You did not mention which OS you are running...

If this is XP it could be a problem...A real problem...

What make and model of laptop...

or do you have a variety of laptops...

What file system are they using or do they want?

I have had success ghosting XP from a Dell laptop to the same make and model Dell laptop...

I had good success with a generic ghost image of 98 , a copy of win98 folder from the cd, folders for any video drivers, modem drivers, sound cards etc... and getting very fast installs. I assume this would work with ME and 2000. But I personally never tried it...

It was also helpful to run a diagnostic after the ghost but prior to the driver installs to identify the actual hardware so I knew which drivers it was going to need. Everest is a good one... Free for home use fee for business use...

So give us a little more information and we will see what can be done to help get you going...


Oh, and the Xircom cards...
Pull them prior to the install... do install everything else,
Install the drivers for the Xircom then reinstall the Xircom Card and that problem should be gone..

ArtChess 0 Junior Poster in Training

sorry for the late reply. Yeah the PC's we need to ghost (make copy of NOT create Image for) vary. From IBM T23, T30, T41, T42, Dell 280, Dell 270 desktop, Dell Latitude Cpx's and Cpi's, IBM Netvista's.

In any event I will need to actually create a mutli-boot disc or CD that will have the Network Driver's for those PC's so the when I boot from the CD/disc i can ghost the machine. And this disc will be all in one for those such machine(s).

I am going through the steps in this site: http://www.nu2.nu/bootdisk/modboot/#makedisk

and it reads:: Format a bootable MS-Dos floppy diskette (version 6.x or higher required)
format a: /u /s

however I am doing this from windows XP, and when i try it it reads
invalid parameter - /s

what does the /s switch do and how can i get around this from XP pc.

alc6379 120 Cookie... That's it Team Colleague

The /s switch is unavailable in Windows XP. In DOS, it stood for \"system\", basically it added DOS bootfiles onto the disk, making it a bootable floppy.

If I recall correctly, I ran this bootdisc once. The trick to getting any setup like this going is to have each needed driver available, and then select the one you want to run at boot. Is there any chance of using a bootable CD, rather than a floppy?

My guess is that \"multiboot\" just means it's driver-compatible with several different systems.

ArtChess 0 Junior Poster in Training

well i know that i can create a bootable floppy in XP via right click and format putting a check mark on the create an MS Dos start up disk.

Thong_Ispector 2 Practically a Master Poster

I would like to se a directory listing of the existing single system disks that they give you now. It might be easier for us to fix the flat instead of reinventing the wheel.

So, you need to make a single - boot CD with drivers for multiple systems

Nero 6 and most CD burning software will let you create a bootable CD

You would then put all the network drivers on the one CD...

That site you refer to specifically says Windows 95 98, 98se and not me...
It does not mention XP at all...

So, you are trying to use a single cd to boot the network drivers and create a ghost BACKUP of you existing system.

You are NOT trying to Ghost a single XP image onto several machines..

An additional point to consider...
Are any of these computer running SATA drives or RAID configurations?
Dont forget the drivers for those...

You might take a look at ghost 4 linux...

It is a bootable cd with generic network drivers that will autodetect most network cards.

It might be just what you need..

It has worked on every machine I have needed...
However, if your server or archive is NTFS... Don't Do This...
It can read NTFS but I would avoid writing to NTFS with linux...

ArtChess 0 Junior Poster in Training

thanks Inspector..
Uhm,.. I have now just rec'd a CD that is a All In ONe CD, that is pretty much able to detect most network Card and then i am able to ghost PC's to a mapped drive. However in particular we Have a Dell 280. And all i want to do is burn/copy this CD and also add some *.inf files for the network card of the 280 using
roxio Easy CD & DVD Creator Home 6.0.0.171.

I am using a laptop with one CD drive. I insert the source CD and copy it and also add the *.inf file to the desired directory of that and attempt to burn it on a blank, CD.

however after disc caching for over an hour Roxio tells me I need 4 CD's?? and the file/image is way over 700MB it's like 2000MB??? the file i added is barely 200KB??

So to make the long story short, how do i copy/burn a bootable CD and at the same time add files to it.

I went to Roxio site and they are asking to call a toll free number and to have a CC ready b/c they will charge 35 bucks?? Nice support eh?!

Any help on this is greatly appreciated.

Acidburn 0 Posting Pro

perhaps check nero out, they do support for multi session cd's - however never created a multi session Boot CD .......

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/33206/sorting-a-list", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " python - Sorting a List [SOLVED] | DaniWeb

Sorting a List

bumsfeld 413 Nearly a Posting Virtuoso

What is the best way to sort a list of words with the case insensitive?

  • 2 Contributors
  • 2 Replies
  • 111 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by bumsfeld
mawe 6 Junior Poster

Hi!

Since Python 2.4 (I guess it's 2.4), sort has the option key:

>>> import string\n>>> l = [\"a\",\"B\",\"c\",\"D\"]\n>>> l.sort(key=string.lower)\n>>> l\n['a', 'B', 'c', 'D']

Here's a way for < 2.4:

>>> l.sort(lambda x, y: cmp(string.lower(x), string.lower(y)))

Regards, mawe

bumsfeld 413 Nearly a Posting Virtuoso

Mawe, I put your suggestions into program and they work well!

Thank you much.

Just started with Python so i am using 2.4

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/350049/new-programmer-needs-help-badly", + "domain": "daniweb.com", + "file_source": "part-00115-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - New programmer needs help badly. [SOLVED] | DaniWeb

New programmer needs help badly.

GamerDJX 0 Newbie Poster

OK so here's my problem. I am a really new programmer, and my instructor has been giving us assignments that most of us are not exactly ready for. We have this assignment, and I honestly have NO IDEA where to even begin. Bottom line, I need help. Here is the assignment:

Create a terminal based application that simulates a bank ATM. The application should :

Support authentication by the use of a fixed length numeric pin
Support numeric menu system
Support checking balances in checking and savings account
Support withdrawl from both check and savings account
Support deposit to only the checking account
Support transfer between checking and savings account
Code should be Object Oriented
Application should run forever until the user chooses to exit.

Pretty crazy to ask of a student who just got introduced to C++ a month ago amirite? Here is what I am asking: Give me some commented code to point me in the right direction. I assure you, I WILL NOT just copy your code and submit it. My teacher is apparently very adept at sniffing out copy cats. I truly truly truly want to learn this stuff. Please please please help me.

c++
  • 2 Contributors
  • 1 Reply
  • 162 Views
  • 6 Hours Discussion Span
  • Latest Post Latest Post by jonsca
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

amirite?

No, because you're not always going to have someone to take you through a project step by step before you have to do it. You likely have a textbook and certainly have the internet if you don't know how to do something.

No one is going to give you code without you showing some effort first. If it's object oriented, start by creating an Account class and I'm sure you can get a general skeleton going for your menu system in main.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/322045/why-does-adding-a-new-row-take-32-seconds", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " vb.net - Why does adding a new row take 32 seconds? | DaniWeb

Why does adding a new row take 32 seconds?

Ennerdale 0 Newbie Poster

I would be very grateful of any insight/resolution of the following issue I need to overcome.

Using VS/VB2008 Pro/SQLExpress - all running on XP, I am building a WinForm Application (a Quotation application for Landscape Designers).

48 Bound controls on my form work perfectly with DataSet and Tables when Updating any user changes to controls on the form to variables that determine price/cost of work being quoted for - providing the DataSet has already got values in it; Delete also works fine. However, although the \"AddNew\" (on form's BindingNavigator) works, it takes 30 - 35 seconds to add a new row. Table contains 10 rows and 45 columns. This is unacceptable and despite most of this afternoon reading forums, searches etc, I have failed to find a solution to an issue that I cannot believe appears to be so infrequent. Clearly, it is something I am doing or not doing.

I have searched via Google, crawled over MSDN pages, read/searched some of the standard textbooks on VB 2008 and looked (again) at Beth Massi's Data-related Forms over Data video series. I have re-checked the properties for the TableAdapter/Manager on my Form. I have used the wizards to create the necessary Select etc clauses. All runs as required except when user needs to add a new row (aka \"New Quotation\")

Thank you in anticipation for any help or directions to you can provide.

  • 2 Contributors
  • 1 Reply
  • 173 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by lolafuertes
lolafuertes 145 Master Poster

Is not ususal to have those large 'wait times' for insert.

Many things can happen.

I've got this problem on a machine that has a raid 5 disk failing and a bad sector in another disk of the raid5, so, when trying to write in the disk it took more than 45 minutes for an insert, and most of the times failed just with a time overflow message.

Another possible issue is that your machine is low in memory (using more memory than the phisical) and has heavy swapping to disk. In this case you should increase your (machine) memory.

I detected this kind of problems also in a multiuser or multithreading environment when a dead-lock happens.

I know that those comments are not a solution but I hope this helps.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/information-security/threads/187350/svchost-exe-100/3", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-virus - Svchost.exe 100% Page 3 [SOLVED] | DaniWeb
jholland1964 650 Posting Expert Team Colleague Featured Poster

You don't actually want to REMOVE them from the computer you want to stop them from running at Start up. To do this the easiest way is to use a Free program like CodeStuff Starter

Now when the program opens you will see three tabs:
Start ups, Processes (which is like Task Manager but gives more info), and Services.
Begin by clicking Start Ups
Take the check mark OUT of these:
AGRSMMSG
ATIModeChange
HP Software Update
HP Component Manager
ctfmon.exe

Next move to Services Tab:
Double click on each one of these. When it opens first Stop the service at the bottom of the box. Then go to Start Up Type and change Automatic to Manual. Do that with These:
Ati HotKey Poller.
InstallDriver Table Manager (IDriverT)
IviRegMgr - InterVideo
Close the program and reboot the computer.
The ones I haven't mentioned then leave alone. A couple have to do with your printer and for some reason if you get to fooling with printer files you end up having trouble with them.

You CAN also try this with those various LANDesk entries and see if the computer runs ok and goes online ok. If it does then leave them off. If it doesn't work ok then go back into CodeStuff and turn them back on at the next boot up and reboot.

jazzyjaj 0 Junior Poster

i do not have a printer so i think it will be safe to stop them aswell

jholland1964 650 Posting Expert Team Colleague Featured Poster

Don't do anything else. There is a possibility there may be a rootkit on there, pointed out to me by Crunchie. We are conferring on this as to which step you should take next. Just \"hold tight\" for a bit while we decide the best course of action here.
Judy

jholland1964 650 Posting Expert Team Colleague Featured Poster

Please do the following:
Please go to Jotti's or VirusTotal and have these files scanned. Post the results back here.

c:\\windows\\system32a2.sys
c:\\windows\\system32\\winsiscsi.sys
c:\\windows\\system32\\fdzld.sys
c:\\windows\\system32\\drivers\\winsiscsi.sys
c:\\windows\\system32\\drivers\\pcidump.sys
c:\\windows\\system32\\drivers\\npf.sys
c:\\windows\\system32\\drivers\\kjkiuiuo.sys
c:\\windows\\system32\\drivers\\DogKiller.sys
c:\\windows\\system32\\drivers\\winsawids.sys
c:\\windows\\system32\\drivers\\syskenuyt.sys
c:\\windows\\system32\\drivers\\jsphelp.sys
c:\\windows\\system32\\drivers\\EASYDOWNS.sys

Judy

jazzyjaj 0 Junior Poster

I havent done anything luckily and will back to you once done with the new tools

jazzyjaj 0 Junior Poster

sorry i couldnt find any of the files you mentioned to be uploaded on Jottis and virustotal

jholland1964 650 Posting Expert Team Colleague Featured Poster

How did you search? Did you do the search via the pages or look before you went to the pages?

jazzyjaj 0 Junior Poster

I searched through the site and also i am looking myself but to no avail.

jholland1964 650 Posting Expert Team Colleague Featured Poster

That's good. Give me a bit and I will get back with you.
Judy

jazzyjaj 0 Junior Poster

wait a minute.
I turned off hide protected system files and now i have found most of them but they are not files but folders which are empty

jazzyjaj 0 Junior Poster

I have only not found a2.sys

jholland1964 650 Posting Expert Team Colleague Featured Poster

Upload them anyway, even if they appear empty. Let us know what the scans find.

jazzyjaj 0 Junior Poster

but they are empty folders they cannot be uploaded.
i have found that system32a2.sys but its a folder again

jholland1964 650 Posting Expert Team Colleague Featured Poster

Ok let me do some checking. Did you try to upload them?

jazzyjaj 0 Junior Poster

yes but they are a folder so i cant get them because it opens up the folder and all of them are empty no files or folders in them

jholland1964 650 Posting Expert Team Colleague Featured Poster

Ok, just wanted to be sure. Delete those folders.

jazzyjaj 0 Junior Poster

i will do that.
can i do wht u told me in post #61

jholland1964 650 Posting Expert Team Colleague Featured Poster

Yes do that and then REBOOT and run a new HJT scan and post the log.

jazzyjaj 0 Junior Poster

You don't actually want to REMOVE them from the computer you want to stop them from running at Start up. To do this the easiest way is to use a Free program like CodeStuff Starter

Now when the program opens you will see three tabs:
Start ups, Processes (which is like Task Manager but gives more info), and Services.
Begin by clicking Start Ups
Take the check mark OUT of these:
AGRSMMSG
ATIModeChange
HP Software Update
HP Component Manager
ctfmon.exe

Next move to Services Tab:
Double click on each one of these. When it opens first Stop the service at the bottom of the box. Then go to Start Up Type and change Automatic to Manual. Do that with These:
Ati HotKey Poller.
InstallDriver Table Manager (IDriverT)
IviRegMgr - InterVideo
Close the program and reboot the computer.
The ones I haven't mentioned then leave alone. A couple have to do with your printer and for some reason if you get to fooling with printer files you end up having trouble with them.

You CAN also try this with those various LANDesk entries and see if the computer runs ok and goes online ok. If it does then leave them off. If it doesn't work ok then go back into CodeStuff and turn them back on at the next boot up and reboot.

I couldnt find ctfmon.exe the rest whatever u asked is done

jazzyjaj 0 Junior Poster

well here is the hjt log:

Logfile of Trend Micro HijackThis v2.0.2
Scan saved at 7:01:56 PM, on 4/29/2009
Platform: Windows XP SP2 (WinNT 5.01.2600)
MSIE: Internet Explorer v6.00 SP2 (6.00.2900.2180)
Boot mode: Normal

Running processes:
C:\\WINDOWS\\System32\\smss.exe
C:\\WINDOWS\\system32\\winlogon.exe
C:\\WINDOWS\\system32\\services.exe
C:\\WINDOWS\\system32\\lsass.exe
C:\\WINDOWS\\System32\\ibmpmsvc.exe
C:\\WINDOWS\\system32\\svchost.exe
C:\\WINDOWS\\System32\\svchost.exe
C:\\Program Files\\Common Files\\Symantec Shared\\ccSetMgr.exe
C:\\Program Files\\Common Files\\Symantec Shared\\ccEvtMgr.exe
C:\\Program Files\\Common Files\\Symantec Shared\\SPBBC\\SPBBCSvc.exe
C:\\WINDOWS\\system32\\spoolsv.exe
C:\\WINDOWS\\Explorer.EXE
C:\\Program Files\\LANDesk\\LDClient\\webportal\\sdclientmonitor.exe
C:\\Program Files\\Common Files\\Symantec Shared\\ccApp.exe
C:\\PROGRA~1\\SYMANT~1\\VPTray.exe
C:\\Program Files\\SUPERAntiSpyware\\SUPERAntiSpyware.exe
C:\\Program Files\\Bayer\\Compi\\compi.exe
C:\\Program Files\\Symantec AntiVirus\\DoScan.exe
C:\\Program Files\\LANDesk\\Shared Files\\residentagent.exe
C:\\Program Files\\Symantec AntiVirus\\DefWatch.exe
C:\\Program Files\\LANDesk\\LDClient\\LocalSch.EXE
C:\\WINDOWS\\system32\\CBA\\pds.exe
C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe
C:\\PROGRA~1\\LANDesk\\LDClient\\issuser.exe
C:\\Program Files\\LANDesk\\LDClient\\BBSConfig\\tools\\mandatoryactions.exe
C:\\Program Files\\Common Files\\Microsoft Shared\\VS7DEBUG\\MDM.EXE
C:\\PROGRA~1\\LANDesk\\LDClient\\collector.exe
C:\\Program Files\\Symantec AntiVirus\\Rtvscan.exe
C:\\PROGRA~1\\LANDesk\\LDClient\\rcgui.exe
C:\\PROGRA~1\\LANDesk\\LDClient\\LDInventoryProvider.exe
C:\\PROGRA~1\\LANDesk\\LDClient\\LDregwatch.exe
D:\\Software\\HiJackThis.exe
C:\\WINDOWS\\system32\\wuauclt.exe

R0 - HKCU\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = http://google.daemonsearch.com/intl/
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Page_URL = http://go.microsoft.com/fwlink/?LinkId=69157
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = about:blank
R1 - HKCU\\Software\\Microsoft\\Internet Connection Wizard,ShellNext = http://store.adobe.com/WebObjects/WEC?pageID=RegMp1&awe_301001&platformCode=WIN&version=5.0&nameCode=ACRO&languageCode=USENGLIS&systemCode=AOLN
O2 - BHO: AcroIEHlprObj Class - {06849E9F-C8D7-4D59-B87D-784B7D6BE0B3} - C:\\Program Files\\Adobe\\Acrobat 6.0\\Reader\\ActiveX\\AcroIEHelper.dll
O2 - BHO: SSVHelper Class - {761497BB-D6F0-462C-B6EB-D4DAF1D92D43} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O2 - BHO: FlashFXP Helper for Internet Explorer - {E5A1691B-D188-4419-AD02-90002030B8EE} - C:\\PROGRA~1\\FlashFXP\\IEFlash.dll
O4 - HKLM\\..\\Run: [SDClientMonitor] \"C:\\Program Files\\LANDesk\\LDClient\\webportal\\sdclientmonitor.exe\"
O4 - HKLM\\..\\Run: [ccApp] \"C:\\Program Files\\Common Files\\Symantec Shared\\ccApp.exe\"
O4 - HKLM\\..\\Run: [vptray] C:\\PROGRA~1\\SYMANT~1\\VPTray.exe
O4 - HKCU\\..\\Run: [SUPERAntiSpyware] C:\\Program Files\\SUPERAntiSpyware\\SUPERAntiSpyware.exe
O4 - Global Startup: PC Information.lnk = C:\\Program Files\\Bayer\\Compi\\compi.exe
O8 - Extra context menu item: E&xport to Microsoft Excel - res://C:\\PROGRA~1\\MICROS~2\\OFFICE11\\EXCEL.EXE/3000
O9 - Extra button: (no name) - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra 'Tools' menuitem: Sun Java Console - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra button: Research - {92780B25-18CC-41C8-B9BE-3C9C571A8263} - C:\\PROGRA~1\\MICROS~2\\OFFICE11\\REFIEBAR.DLL
O9 - Extra button: Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O9 - Extra 'Tools' menuitem: Windows Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O10 - Unknown file in Winsock LSP: c:\\windows\\system32\\nwprovau.dll
O17 - HKLM\\System\\CCS\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\Software\\..\\Telephony: DomainName = DE.BAYER.cnb
O17 - HKLM\\System\\CS1\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\System\\CS2\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O18 - Protocol: skype4com - {FFC8B962-9B40-4DFF-9458-1830C7DD7F5D} - C:\\PROGRA~1\\COMMON~1\\Skype\\SKYPE4~1.DLL
O20 - Winlogon Notify: !SASWinLogon - C:\\Program Files\\SUPERAntiSpyware\\SASWINLO.dll
O23 - Service: Ati HotKey Poller - Unknown owner - C:\\WINDOWS\\System32\\Ati2evxx.exe
O23 - Service: LANDesk(R) Management Agent (CBA8) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\Shared Files\\residentagent.exe
O23 - Service: Symantec Event Manager (ccEvtMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccEvtMgr.exe
O23 - Service: Symantec Settings Manager (ccSetMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccSetMgr.exe
O23 - Service: Symantec AntiVirus Definition Watcher (DefWatch) - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\DefWatch.exe
O23 - Service: IBM PM Service (IBMPMSVC) - Unknown owner - C:\\WINDOWS\\System32\\ibmpmsvc.exe
O23 - Service: InstallDriver Table Manager (IDriverT) - Macrovision Corporation - C:\\Program Files\\Common Files\\InstallShield\\Driver\\1050\\Intel 32\\IDriverT.exe
O23 - Service: Intel Local Scheduler Service - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\LocalSch.EXE
O23 - Service: Intel PDS - LANDesk Software Ltd. - C:\\WINDOWS\\system32\\CBA\\pds.exe
O23 - Service: LANDesk Targeted Multicast (Intel Targeted Multicast) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe
O23 - Service: LANDesk Remote Control Service (ISSUSER) - LANDesk Software, Ltd. - C:\\PROGRA~1\\LANDesk\\LDClient\\issuser.exe
O23 - Service: IviRegMgr - InterVideo - C:\\Program Files\\Common Files\\InterVideo\\RegMgr\\iviRegMgr.exe
O23 - Service: LiveUpdate - Symantec Corporation - C:\\PROGRA~1\\Symantec\\LIVEUP~1\\LUCOMS~1.EXE
O23 - Service: Pml Driver HPZ12 - HP - C:\\WINDOWS\\system32\\HPZipm12.exe
O23 - Service: SAVRoam (SavRoam) - symantec - C:\\Program Files\\Symantec AntiVirus\\SavRoam.exe
O23 - Service: Symantec SPBBCSvc (SPBBCSvc) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\SPBBC\\SPBBCSvc.exe
O23 - Service: Symantec AntiVirus - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\Rtvscan.exe

--
End of file - 6503 bytes

now i will try with the LANDesk software.
You havent told how to remove these DE.BAYER.cnb

jazzyjaj 0 Junior Poster

well net works ok but only time will tell.
here is hjtlog after disabling LANDESK:

D:\\Software\\HiJackThis.exe

R0 - HKCU\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = http://google.daemonsearch.com/intl/
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Page_URL = http://go.microsoft.com/fwlink/?LinkId=69157
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = about:blank
R1 - HKCU\\Software\\Microsoft\\Internet Connection Wizard,ShellNext = http://store.adobe.com/WebObjects/WEC?pageID=RegMp1&awe_301001&platformCode=WIN&version=5.0&nameCode=ACRO&languageCode=USENGLIS&systemCode=AOLN
O2 - BHO: AcroIEHlprObj Class - {06849E9F-C8D7-4D59-B87D-784B7D6BE0B3} - C:\\Program Files\\Adobe\\Acrobat 6.0\\Reader\\ActiveX\\AcroIEHelper.dll
O2 - BHO: SSVHelper Class - {761497BB-D6F0-462C-B6EB-D4DAF1D92D43} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O2 - BHO: FlashFXP Helper for Internet Explorer - {E5A1691B-D188-4419-AD02-90002030B8EE} - C:\\PROGRA~1\\FlashFXP\\IEFlash.dll
O4 - HKLM\\..\\Run: [ccApp] \"C:\\Program Files\\Common Files\\Symantec Shared\\ccApp.exe\"
O4 - HKLM\\..\\Run: [vptray] C:\\PROGRA~1\\SYMANT~1\\VPTray.exe
O4 - HKCU\\..\\Run: [SUPERAntiSpyware] C:\\Program Files\\SUPERAntiSpyware\\SUPERAntiSpyware.exe
O8 - Extra context menu item: E&xport to Microsoft Excel - res://C:\\PROGRA~1\\MICROS~2\\OFFICE11\\EXCEL.EXE/3000
O9 - Extra button: (no name) - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra 'Tools' menuitem: Sun Java Console - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra button: Research - {92780B25-18CC-41C8-B9BE-3C9C571A8263} - C:\\PROGRA~1\\MICROS~2\\OFFICE11\\REFIEBAR.DLL
O9 - Extra button: Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O9 - Extra 'Tools' menuitem: Windows Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O10 - Unknown file in Winsock LSP: c:\\windows\\system32\\nwprovau.dll
O17 - HKLM\\System\\CCS\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\Software\\..\\Telephony: DomainName = DE.BAYER.cnb
O17 - HKLM\\System\\CS1\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\System\\CS2\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O18 - Protocol: skype4com - {FFC8B962-9B40-4DFF-9458-1830C7DD7F5D} - C:\\PROGRA~1\\COMMON~1\\Skype\\SKYPE4~1.DLL
O20 - Winlogon Notify: !SASWinLogon - C:\\Program Files\\SUPERAntiSpyware\\SASWINLO.dll
O23 - Service: Ati HotKey Poller - Unknown owner - C:\\WINDOWS\\System32\\Ati2evxx.exe
O23 - Service: LANDesk(R) Management Agent (CBA8) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\Shared Files\\residentagent.exe
O23 - Service: Symantec Event Manager (ccEvtMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccEvtMgr.exe
O23 - Service: Symantec Settings Manager (ccSetMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccSetMgr.exe
O23 - Service: Symantec AntiVirus Definition Watcher (DefWatch) - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\DefWatch.exe
O23 - Service: IBM PM Service (IBMPMSVC) - Unknown owner - C:\\WINDOWS\\System32\\ibmpmsvc.exe
O23 - Service: InstallDriver Table Manager (IDriverT) - Macrovision Corporation - C:\\Program Files\\Common Files\\InstallShield\\Driver\\1050\\Intel 32\\IDriverT.exe
O23 - Service: Intel Local Scheduler Service - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\LocalSch.EXE
O23 - Service: Intel PDS - LANDesk Software Ltd. - C:\\WINDOWS\\system32\\CBA\\pds.exe
O23 - Service: LANDesk Targeted Multicast (Intel Targeted Multicast) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe
O23 - Service: LANDesk Remote Control Service (ISSUSER) - LANDesk Software, Ltd. - C:\\PROGRA~1\\LANDesk\\LDClient\\issuser.exe
O23 - Service: IviRegMgr - InterVideo - C:\\Program Files\\Common Files\\InterVideo\\RegMgr\\iviRegMgr.exe
O23 - Service: LiveUpdate - Symantec Corporation - C:\\PROGRA~1\\Symantec\\LIVEUP~1\\LUCOMS~1.EXE
O23 - Service: Pml Driver HPZ12 - HP - C:\\WINDOWS\\system32\\HPZipm12.exe
O23 - Service: SAVRoam (SavRoam) - symantec - C:\\Program Files\\Symantec AntiVirus\\SavRoam.exe
O23 - Service: Symantec SPBBCSvc (SPBBCSvc) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\SPBBC\\SPBBCSvc.exe
O23 - Service: Symantec AntiVirus - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\Rtvscan.exe

--
End of file - 5765 bytes

Now can i run SUPERANTISPYWARE after updating it.
Later i will also disable from starting when windows start because i have norton antivirus.
what do u recommend

jholland1964 650 Posting Expert Team Colleague Featured Poster

Your HJT log is incomplete. We need the FULL LOG. There still is one Landesk service enabled by the way.
Looks like This
Logfile of Trend Micro HijackThis v2.0.2
Scan saved at 8:33:45 PM, on 4/19/2009
Platform: Windows XP SP2 (WinNT 5.01.2600)
MSIE: Internet Explorer v6.00 SP2 (6.00.2900.2180)
Boot mode: Normal

Running processes:
and then all the items listed below the heading

jazzyjaj 0 Junior Poster

sry abt tht:

Logfile of Trend Micro HijackThis v2.0.2
Scan saved at 7:59:15 AM, on 4/30/2009
Platform: Windows XP SP2 (WinNT 5.01.2600)
MSIE: Internet Explorer v6.00 SP2 (6.00.2900.2180)
Boot mode: Normal

Running processes:
C:\\WINDOWS\\System32\\smss.exe
C:\\WINDOWS\\system32\\winlogon.exe
C:\\WINDOWS\\system32\\services.exe
C:\\WINDOWS\\system32\\lsass.exe
C:\\WINDOWS\\System32\\ibmpmsvc.exe
C:\\WINDOWS\\system32\\svchost.exe
C:\\WINDOWS\\System32\\svchost.exe
C:\\Program Files\\Common Files\\Symantec Shared\\ccSetMgr.exe
C:\\Program Files\\Common Files\\Symantec Shared\\ccEvtMgr.exe
C:\\Program Files\\Common Files\\Symantec Shared\\SPBBC\\SPBBCSvc.exe
C:\\WINDOWS\\system32\\spoolsv.exe
C:\\WINDOWS\\Explorer.EXE
C:\\Program Files\\Common Files\\Symantec Shared\\ccApp.exe
C:\\PROGRA~1\\SYMANT~1\\VPTray.exe
C:\\Program Files\\SUPERAntiSpyware\\SUPERAntiSpyware.exe
C:\\Program Files\\Symantec AntiVirus\\DefWatch.exe
C:\\WINDOWS\\system32\\CBA\\pds.exe
C:\\Program Files\\Common Files\\Microsoft Shared\\VS7DEBUG\\MDM.EXE
C:\\Program Files\\Symantec AntiVirus\\Rtvscan.exe
C:\\Program Files\\Mozilla Firefox\\firefox.exe
C:\\Program Files\\Windows Media Player\\wmplayer.exe
D:\\Software\\HiJackThis.exe

R0 - HKCU\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = http://google.daemonsearch.com/intl/
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Page_URL = http://go.microsoft.com/fwlink/?LinkId=69157
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = about:blank
R1 - HKCU\\Software\\Microsoft\\Internet Connection Wizard,ShellNext = http://store.adobe.com/WebObjects/WEC?pageID=RegMp1&awe_301001&platformCode=WIN&version=5.0&nameCode=ACRO&languageCode=USENGLIS&systemCode=AOLN
O2 - BHO: AcroIEHlprObj Class - {06849E9F-C8D7-4D59-B87D-784B7D6BE0B3} - C:\\Program Files\\Adobe\\Acrobat 6.0\\Reader\\ActiveX\\AcroIEHelper.dll
O2 - BHO: SSVHelper Class - {761497BB-D6F0-462C-B6EB-D4DAF1D92D43} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O2 - BHO: FlashFXP Helper for Internet Explorer - {E5A1691B-D188-4419-AD02-90002030B8EE} - C:\\PROGRA~1\\FlashFXP\\IEFlash.dll
O4 - HKLM\\..\\Run: [ccApp] \"C:\\Program Files\\Common Files\\Symantec Shared\\ccApp.exe\"
O4 - HKLM\\..\\Run: [vptray] C:\\PROGRA~1\\SYMANT~1\\VPTray.exe
O4 - HKCU\\..\\Run: [SUPERAntiSpyware] C:\\Program Files\\SUPERAntiSpyware\\SUPERAntiSpyware.exe
O8 - Extra context menu item: E&xport to Microsoft Excel - res://C:\\PROGRA~1\\MICROS~2\\OFFICE11\\EXCEL.EXE/3000
O9 - Extra button: (no name) - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra 'Tools' menuitem: Sun Java Console - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra button: Research - {92780B25-18CC-41C8-B9BE-3C9C571A8263} - C:\\PROGRA~1\\MICROS~2\\OFFICE11\\REFIEBAR.DLL
O9 - Extra button: Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O9 - Extra 'Tools' menuitem: Windows Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O10 - Unknown file in Winsock LSP: c:\\windows\\system32\\nwprovau.dll
O17 - HKLM\\System\\CCS\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\Software\\..\\Telephony: DomainName = DE.BAYER.cnb
O17 - HKLM\\System\\CS1\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\System\\CS2\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O18 - Protocol: skype4com - {FFC8B962-9B40-4DFF-9458-1830C7DD7F5D} - C:\\PROGRA~1\\COMMON~1\\Skype\\SKYPE4~1.DLL
O20 - Winlogon Notify: !SASWinLogon - C:\\Program Files\\SUPERAntiSpyware\\SASWINLO.dll
O23 - Service: Ati HotKey Poller - Unknown owner - C:\\WINDOWS\\System32\\Ati2evxx.exe
O23 - Service: LANDesk(R) Management Agent (CBA8) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\Shared Files\\residentagent.exe
O23 - Service: Symantec Event Manager (ccEvtMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccEvtMgr.exe
O23 - Service: Symantec Settings Manager (ccSetMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccSetMgr.exe
O23 - Service: Symantec AntiVirus Definition Watcher (DefWatch) - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\DefWatch.exe
O23 - Service: IBM PM Service (IBMPMSVC) - Unknown owner - C:\\WINDOWS\\System32\\ibmpmsvc.exe
O23 - Service: InstallDriver Table Manager (IDriverT) - Macrovision Corporation - C:\\Program Files\\Common Files\\InstallShield\\Driver\\1050\\Intel 32\\IDriverT.exe
O23 - Service: Intel Local Scheduler Service - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\LocalSch.EXE
O23 - Service: Intel PDS - LANDesk Software Ltd. - C:\\WINDOWS\\system32\\CBA\\pds.exe
O23 - Service: LANDesk Targeted Multicast (Intel Targeted Multicast) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe
O23 - Service: LANDesk Remote Control Service (ISSUSER) - LANDesk Software, Ltd. - C:\\PROGRA~1\\LANDesk\\LDClient\\issuser.exe
O23 - Service: IviRegMgr - InterVideo - C:\\Program Files\\Common Files\\InterVideo\\RegMgr\\iviRegMgr.exe
O23 - Service: LiveUpdate - Symantec Corporation - C:\\PROGRA~1\\Symantec\\LIVEUP~1\\LUCOMS~1.EXE
O23 - Service: Pml Driver HPZ12 - HP - C:\\WINDOWS\\system32\\HPZipm12.exe
O23 - Service: SAVRoam (SavRoam) - symantec - C:\\Program Files\\Symantec AntiVirus\\SavRoam.exe
O23 - Service: Symantec SPBBCSvc (SPBBCSvc) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\SPBBC\\SPBBCSvc.exe
O23 - Service: Symantec AntiVirus - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\Rtvscan.exe

--
End of file - 5782 bytes

jholland1964 650 Posting Expert Team Colleague Featured Poster

Is the computer running all right? I don't really know what to tell you about those DE.BAYER.cnb listings because I cannot find info on them

jazzyjaj 0 Junior Poster

yes its running fine.
but how do i remove DE.BAYER.cnb

jholland1964 650 Posting Expert Team Colleague Featured Poster

yes its running fine.
but how do i remove DE.BAYER.cnb

You have to be ABSOLUTELY certain this has nothing to do with your internet service.
After extensive searching what I have been able to find is that it possibly is an internet service. I don't know where you are located but this service \"seems\" to be based in Europe.
Before attempting to remove this I suggest you telephone your internet provider to be absolutely CERTAIN this doesn't have anything to do with your internet provider. Many times something like this will show on a log and the name isn't recognized, people will remove it and THEN have no service.
For a simple example, say your ISP is Jones.com but you see Smith.com listed in a log. But in checking with Jones.com you will find out they are owned by Smith.com so if you remove it then you would have no service. So call your provider tell them you see this Tcpip listing on the computer for DE.BAYER.cnb ask them if they feel it is safe to remove. Let me know what they say.

jazzyjaj 0 Junior Poster

i am certain BAYER belongs to germany while my isp is World call which is based in pakistan.
Bayer was the one used in my moms office

jholland1964 650 Posting Expert Team Colleague Featured Poster

IF you are ABSOLUTELY certain then run HJT again and put check marks in those O17 entries and click the Fix Checked button. Exit HJT.
REBOOT and run another HJT scan and hopefully post it back here...FULL Log remember.
Judy

jazzyjaj 0 Junior Poster

well i tried doing that but it came back after the restart:

C:\\WINDOWS\\system32\\userinit.exe
D:\\Software\\HiJackThis.exe

R0 - HKCU\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = http://google.daemonsearch.com/intl/
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Page_URL = http://go.microsoft.com/fwlink/?LinkId=69157
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKLM\\Software\\Microsoft\\Internet Explorer\\Main,Start Page = about:blank
R1 - HKCU\\Software\\Microsoft\\Internet Connection Wizard,ShellNext = http://store.adobe.com/WebObjects/WEC?pageID=RegMp1&awe_301001&platformCode=WIN&version=5.0&nameCode=ACRO&languageCode=USENGLIS&systemCode=AOLN
O2 - BHO: AcroIEHlprObj Class - {06849E9F-C8D7-4D59-B87D-784B7D6BE0B3} - C:\\Program Files\\Adobe\\Acrobat 6.0\\Reader\\ActiveX\\AcroIEHelper.dll
O2 - BHO: SSVHelper Class - {761497BB-D6F0-462C-B6EB-D4DAF1D92D43} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O2 - BHO: FlashFXP Helper for Internet Explorer - {E5A1691B-D188-4419-AD02-90002030B8EE} - C:\\PROGRA~1\\FlashFXP\\IEFlash.dll
O4 - HKLM\\..\\Run: [ccApp] \"C:\\Program Files\\Common Files\\Symantec Shared\\ccApp.exe\"
O4 - HKLM\\..\\Run: [vptray] C:\\PROGRA~1\\SYMANT~1\\VPTray.exe
O4 - HKCU\\..\\Run: [SUPERAntiSpyware] C:\\Program Files\\SUPERAntiSpyware\\SUPERAntiSpyware.exe
O8 - Extra context menu item: E&xport to Microsoft Excel - res://C:\\PROGRA~1\\MICROS~2\\OFFICE11\\EXCEL.EXE/3000
O9 - Extra button: (no name) - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra 'Tools' menuitem: Sun Java Console - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\\Program Files\\Java\\jre1.6.0_02\\bin\\ssv.dll
O9 - Extra button: Research - {92780B25-18CC-41C8-B9BE-3C9C571A8263} - C:\\PROGRA~1\\MICROS~2\\OFFICE11\\REFIEBAR.DLL
O9 - Extra button: Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O9 - Extra 'Tools' menuitem: Windows Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\\Program Files\\Messenger\\msmsgs.exe
O10 - Unknown file in Winsock LSP: c:\\windows\\system32\\nwprovau.dll
O17 - HKLM\\System\\CCS\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\Software\\..\\Telephony: DomainName = DE.BAYER.cnb
O17 - HKLM\\System\\CS1\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O17 - HKLM\\System\\CS2\\Services\\Tcpip\\Parameters: Domain = DE.BAYER.cnb
O18 - Protocol: skype4com - {FFC8B962-9B40-4DFF-9458-1830C7DD7F5D} - C:\\PROGRA~1\\COMMON~1\\Skype\\SKYPE4~1.DLL
O20 - Winlogon Notify: !SASWinLogon - C:\\Program Files\\SUPERAntiSpyware\\SASWINLO.dll
O23 - Service: Ati HotKey Poller - Unknown owner - C:\\WINDOWS\\System32\\Ati2evxx.exe
O23 - Service: LANDesk(R) Management Agent (CBA8) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\Shared Files\\residentagent.exe
O23 - Service: Symantec Event Manager (ccEvtMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccEvtMgr.exe
O23 - Service: Symantec Settings Manager (ccSetMgr) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\ccSetMgr.exe
O23 - Service: Symantec AntiVirus Definition Watcher (DefWatch) - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\DefWatch.exe
O23 - Service: IBM PM Service (IBMPMSVC) - Unknown owner - C:\\WINDOWS\\System32\\ibmpmsvc.exe
O23 - Service: InstallDriver Table Manager (IDriverT) - Macrovision Corporation - C:\\Program Files\\Common Files\\InstallShield\\Driver\\1050\\Intel 32\\IDriverT.exe
O23 - Service: Intel Local Scheduler Service - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\LocalSch.EXE
O23 - Service: Intel PDS - LANDesk Software Ltd. - C:\\WINDOWS\\system32\\CBA\\pds.exe
O23 - Service: LANDesk Targeted Multicast (Intel Targeted Multicast) - LANDesk Software, Ltd. - C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe
O23 - Service: LANDesk Remote Control Service (ISSUSER) - LANDesk Software, Ltd. - C:\\PROGRA~1\\LANDesk\\LDClient\\issuser.exe
O23 - Service: IviRegMgr - InterVideo - C:\\Program Files\\Common Files\\InterVideo\\RegMgr\\iviRegMgr.exe
O23 - Service: LiveUpdate - Symantec Corporation - C:\\PROGRA~1\\Symantec\\LIVEUP~1\\LUCOMS~1.EXE
O23 - Service: Pml Driver HPZ12 - HP - C:\\WINDOWS\\system32\\HPZipm12.exe
O23 - Service: SAVRoam (SavRoam) - symantec - C:\\Program Files\\Symantec AntiVirus\\SavRoam.exe
O23 - Service: Symantec SPBBCSvc (SPBBCSvc) - Symantec Corporation - C:\\Program Files\\Common Files\\Symantec Shared\\SPBBC\\SPBBCSvc.exe
O23 - Service: Symantec AntiVirus - Symantec Corporation - C:\\Program Files\\Symantec AntiVirus\\Rtvscan.exe

--
End of file - 5798 bytes

crunchie 990 Most Valuable Poster Team Colleague Featured Poster

You REALLY need to check your posts after posting. You have AGAIN left out part of your log.
Please try and make it easy for the ppl here who volunteer their time to help out ppl in need and ensure that your posts are as complete as possible.
I am certain that this thread could have been completed in half the time and a lot less than 9 pages if that had happened. :icon_rolleyes:

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/31561/long-login-times", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - Long login times | DaniWeb

Long login times

Justin01 1 Junior Poster in Training

I ran into a very peculiar, very frustrating problem, maybe one of you guys can figure this one out.

We're starting to dabble with wireless here in our office so the staff could easily gain access to the domain via their laptops. Our engineer, who is definitely not an IT guy, purchased a Linksys Wireless access point and plugged it into one of the ports on our 24 port switch. The thing works fine when I log into the domain on someones laptop under the Administrator account. The problem arises when attempting to login as a regular user. To put it simply, it takes absolutely forever.

Is this a profiles issue? Going through peoples profiles, I noticed there are some rather large ones on the network, some upwards of 200 meg.

When logging in normally on a segment thats hardwired the login time is a little slow, but nowhere near what it is when trying it over wireless. I also run into the same problem on a desktop with a wireless pci adapter installed on it.

Suggestions?

  • 2 Contributors
  • 2 Replies
  • 120 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by Justin01
antioed 53 Posting Whiz

You're probably right about the profiles. Turn off Roaming Profiles for users that don't require it and recreate or clear up profiles for those who do.

Justin01 1 Junior Poster in Training

Problem is, most users need roaming profiles enabled. I set up file redirection in an attempt to kill some of the login times but that has me a little confused in and of itself. With file redirection, you basically just point peoples My Documents folders to elsewhere on the server. You set this up as a group policy and Windows takes care of creating and moving peoples files and what not. So far since I enabled file redirection only a handful of users were, I don't know how to explain it, created under that new directory that file redirection points to. So I don't know if its a really long process for Windows to go through or what, but we'll see how it goes.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/295198/how-to-use-mutiple-module-in-vb", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-basic - How to use mutiple module in VB | DaniWeb

How to use mutiple module in VB

critalk 0 Newbie Poster

I'm newbie for using VB. I'm trying to develop code for calculate dimension of part.
The concepts are :
1. Get input from user via textbox(Form1)
2. Module 1 take value from Form1.textbox and keep for reference.
3. Module 2 use value from module 1 to calculate
4. Module 3 use value from module 2 to display via Form2,Form3,Form4 respectively.

I'm not sure this is the suitable program by using module method.
I have no idea to develop modular code refer this concept.
Anybody can give me a guidance.

Thanks in advance.

  • 2 Contributors
  • 1 Reply
  • 92 Views
  • 20 Hours Discussion Span
  • Latest Post Latest Post by vb5prgrmr
vb5prgrmr 143 Posting Virtuoso

What you are talking about is the creation and use of class modules or better yet, \"Objects\"... ie OOD... and while you could do these things with this design methodology, it is a bit of overkill... but with that said, I would also think that to learn this programming methodology, this simple project you are talking about would be a good starting point...

Friends Time (yahoo, google, ask, answers, bing) vb6 class module tutorial...


Good Luck

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/threads/267057/airport-extreme-connection", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " apple-hardware - airport extreme connection | DaniWeb

airport extreme connection

apcodonny 0 Newbie Poster

I have an airport extreme that I want to connect to my quest wirless router when i do connect the airport nothing happens i cannot get on the internet using the airport what am i doing wrong never had this problem when using verizon

  • 5 Contributors
  • 5 Replies
  • 113 Views
  • 2 Months Discussion Span
  • Latest Post Latest Post by adi101
Fazza 0 Light Poster

As far as I am aware all you need is a router that has DHCP (automatic IP addressing) and your Airport Extreme should pick up an IP address and then you Apple Mac should detect the Airport Extreme and let you connect to it and set it up.

I assume you have installed the latest Airport Extreme software?

thommy 0 Newbie Poster

Just like you, I also have this kind of experience, in which I got this hard to solve. But with the help of this thread, all of my worries were all gone because this gives me an idea on how to solve this.


Great thanks!

Fazza 0 Light Poster

Thommy, how have you got yours setup at the moment and what are you going to try to resolve your issue?

tje210 10 Junior Poster

gotta set up that quest router in bridging mode, or take it totally outta the loop if possible. as things stand, you have 2 routers hooked up in series in your house, which isn't a good idea.

if you need anthing else, just holler...

adi101 0 Newbie Poster

Here you have to write yourself something good as per topic where you are giving comments

and as per assignment ... at least 1 to 2 lines longer ... You must have to write your

assignment URL anywhere while posting your ad. It can be Assignment Main URL: or any

Assignment Inner Page... URL ( http://www.translation.pk/urdu-translation.html ):

Regards,
Adeel Malik-14152
http://www.translation.pk

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/29461/help-all-media-players-playing-crappy", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - HELP!! all media players playing crappy | DaniWeb

HELP!! all media players playing crappy

Preppy 0 Newbie Poster

I just reformatted my computer, and I have installed all of my games and stuff back on. I updated Windows Media Player and tried playing a video on it and it comes up looking grainy and WAY too bright. I figured it might be a codec so i went and tried to download some codecs, but that didn't work. I also tried a different media player (divx) that didn't work either. The picture still came up all wierd. And it's not just the video files i have either. I tried streaming a music video and that came up the same way. Everything is really really bright, and most colors don't show up as even the right color, and every single shade in the video is off. I also updated my video driver, so it's not that either. If anyone knows how to fix this please help!!

  • 3 Contributors
  • 2 Replies
  • 177 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by magusdf
MartyMcFly 9 Practically a Master Poster

Right Click your desktop, select settings, make sure you have 32bit color, then go advanced, on the trouble shoot tab, ensure that hardware acceleration is Full, on the monitor tab, make sure your refresh rate is ok, by starting of at 60Hz, then going up, until you hit the problem, (if 60Hz works fine).

Also, depending on you video card, make sure AntiAlaising is off, and vert sync is off. I always choose the midddle setting, which is application preference for most things.

May not help, but its an idea.

magusdf 0 Junior Poster in Training

quick question
do you have an nvidia graphics card?

there was an issue with the latest drivers that messed up the gamma setting for overlays

easy fix

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/66773/the-resurrection-of-dr-python", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " The Resurrection of Dr. Python [SOLVED] | DaniWeb

The Resurrection of Dr. Python

mattyd 89 Posting Maven Featured Poster

About one month ago or so my Dr. Python compiler (interpreter) died. I had closed Dr. Python to go and eat dinner then came back to re-open and continued where I had stopped and... nothing. This came at a terrible time as I was in the middle of some very important code testing. I tried everything I could think of but did not have time to fix it nor was I sure how to. I opened IDLE and plugged away. IDLE worked, yes, but what I can say about it save for that it's better than nothing I guess. :-|

Python Mod vegaseat encouraged me to fix Dr. Python-- make it work. I tried, but gave up as I could not get any response. I was confused as to these errors so I continued with IDLE.

Today though, I thought I would give it one more try; I downloaded the latest version from SourceForge, unzipped it, and tried to run it. How I got it to open and work all centered around how it opened and with what program-- I will spare the details, but I think it has something to do with some sort of file and\\or memory corruptions on my system. I opened it manually and it worked! I was so relieved. :cheesy:

The reason I am posting this is to encouarage other Python programmers to try Dr. Python if they have not yet. Dr. Python is:

  • efficient and stable
  • has a clean and simple (but not overly-simple) GUI

My production levels rise noticeably by using Dr. Python.

sharky_machine

  • 6 Contributors
  • 7 Replies
  • 191 Views
  • 5 Days Discussion Span
  • Latest Post Latest Post by Ene Uran
sneekula 969 Nearly a Posting Maven

I have used DrPython for a while now and really like it! Comes in Windows and Linux versions. It has clean displays and a minimum of quirks (does not like foreign characters). There are lots of configuration options. The results are displayed in an output window, and you can select and copy items from there. You can also install the code completion plugin from the internet from within the DrPython. The code completion option is great help for a beginner.

vegaseat 1,735 DaniWeb's Hypocrite Team Colleague

I have used HapDebugger, Boa, PyScripter, IDLE, SPE and PythonWin, but always come back to DrPython. DrPython is still an active project and just a very pleasant IDE to use. Very easy on the disk space.

I also use a more general editor/IDE called ConText. That one allows me to run C code and Python code in parallel.

Ene Uran 638 Posting Virtuoso

I have used SPE for quite a while. No, it's not the \"Society of Petroleum Engineers\", but \"Stani's Python Editor\". For some odd reason it has vanished on the net.

Now I am starting to use DrPython, that one seems to be still quite active and just released a new version. Also played with PyScripter, very promissing, but not quite there yet.

vegaseat 1,735 DaniWeb's Hypocrite Team Colleague

I have given the Python Programming Editor (PyED) another trial and find the latest version positively fantastic!

Also not strictly an IDE, this is a very nice editor (written in Python/wxPython) with great features (multiple windows, syntax highlighting, find/replace, line numbers, autocomplete, macros, fold/expand functions and classes, bookmarks, todo, Python Shell, run your code, hotkeys, spellcheck, fonts, color and much more). Simply extract the zip file into your Python folder. Execute the program by running 'pype.pyw'. You can run your code with 'Run current file' and it will display in a nice output window (similar to the IDLE shell)
(written for Windows, but also tested on Linux, latest version PyPE-2.8-src.zip 12/14/2006)
http://pype.sourceforge.net/index.shtml

jrcagle 77 Practically a Master Poster

I have a friend who's been encouraging use of Eclipse. Any experience with that out there?

Jeff

Matt Tacular 0 Unverified User

I didn't even know there were things other than IDLE. I guess I never thought about searching for one. I am now giving Dr. Python a try and like it so far.

Ene Uran 638 Posting Virtuoso

I have a friend who's been encouraging use of Eclipse. Any experience with that out there?

Jeff

I heard that Eclipse is a huge system originally written for Java in Java. It is supposed to be really sluggish.

I have thoroughly tested both DrPython and PyPE for my coding needs, and personally like DrPython better. DrPython has more colors and fonts, is more intuitive than PyPE, and has a much better code assistant.

However PyPE is nice too and has a number of extras like a spell checker, trigger, and macro recorder. One interesting thing is that you send selected code to the Python shell. You can also call a command shell. Both those shells have copy and paste. With large code, the folding class and function option is real nice. As far as I can see PyPE also handles unicode better.

Maybe the two of them could get together and make one super product!

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/threads/436220/laptop-camera", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " pc-peripheral - laptop camera | DaniWeb

laptop camera

archana.patil.1800 0 Newbie Poster

having laptop camera dell inspiron 1545 is not working..

  • 5 Contributors
  • 4 Replies
  • 100 Views
  • 2 Months Discussion Span
  • Latest Post Latest Post by webjack
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And you know this, how? Are you sure it is not a software problem?

Gé48 1 Newbie Poster

Is the right driver for it installed?

np complete 8 Newbie Poster

Any other specification of the problem ?

webjack 0 Newbie Poster

About my opinion you did not install the proper driver for the webcam of your dell laptop. Please install the proper and updated driver for the webcam of your laptop. if the problem is not fixed after the installation of the driver then there is a problem in web-cam. Then you need to go to authorized service centre for proper troubleshooting.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/12180/problem-with-svchost-exe", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " windows-nt-2000-xp - problem with svchost.exe | DaniWeb

problem with svchost.exe

mxpx963 0 Newbie Poster

recently when i check my task manager because my comp was running kinda laggin, it shows one of svchost.exe using lots of mem. the most i seen was around 150,000k. People told me that it might be a virus, i scanned with mcafee and housecall...nothing.

There are 5 svchost.exe running on my win-xp computer:

3 = system
1 = local service
1 = network service

the local service is the one that im having a problem with.
i would appreciate, if anyone can help me

  • 6 Contributors
  • 10 Replies
  • 243 Views
  • 1 Week Discussion Span
  • Latest Post Latest Post by eddie5659
caperjack 875 I hate 20 Questions Team Colleague

Hi,5 is how many I have also ,type tasklist /svc into start/ Run or a command prompt and it will show the name of each one, do a google search on the one using all the memory.the following link tells all .http://support.microsoft.com/?kbid=314056

mxpx963 0 Newbie Poster

Hi,5 is how many I have also ,type tasklist /svc into start/ Run or a command prompt and it will show the name of each one, do a google search on the one using all the memory.the following link tells all .http://support.microsoft.com/?kbid=314056

i tried typing \"Tasklist /SVC\" on the dos prompt
like
c:\\Documents and Settings\\Owner>Tasklist /Svc

and it says

'tasklist' is not recognized as an internal or external command, operable program or batch file.

am i entering it wrong or something :/ ?

Vester 0 Newbie Poster

These are my choices.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\\Documents and Settings\\vester>HELP
For more information on a specific command, type HELP command-name
ASSOC Displays or modifies file extension associations.
AT Schedules commands and programs to run on a computer.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
CACLS Displays or modifies access control lists (ACLs) of files.
CALL Calls one batch program from another.
CD Displays the name of or changes the current directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current directory.
CHKDSK Checks a disk and displays a status report.
CHKNTFS Displays or modifies the checking of disk at boot time.
CLS Clears the screen.
CMD Starts a new instance of the Windows command interpreter.
COLOR Sets the default console foreground and background colors.
COMP Compares the contents of two files or sets of files.
COMPACT Displays or alters the compression of files on NTFS partitions.
CONVERT Converts FAT volumes to NTFS. You cannot convert the
current drive.
COPY Copies one or more files to another location.
DATE Displays or sets the date.
DEL Deletes one or more files.
DIR Displays a list of files and subdirectories in a directory.
DISKCOMP Compares the contents of two floppy disks.
DISKCOPY Copies the contents of one floppy disk to another.
DOSKEY Edits command lines, recalls Windows commands, and creates macros.
ECHO Displays messages, or turns command echoing on or off.
ENDLOCAL Ends localization of environment changes in a batch file.
ERASE Deletes one or more files.
EXIT Quits the CMD.EXE program (command interpreter).
FC Compares two files or sets of files, and displays the differences
between them.
FIND Searches for a text string in a file or files.
FINDSTR Searches for strings in files.
FOR Runs a specified command for each file in a set of files.
FORMAT Formats a disk for use with Windows.
FTYPE Displays or modifies file types used in file extension associations.
GOTO Directs the Windows command interpreter to a labeled line in a
batch program.
GRAFTABL Enables Windows to display an extended character set in graphics
mode.
HELP Provides Help information for Windows commands.
IF Performs conditional processing in batch programs.
LABEL Creates, changes, or deletes the volume label of a disk.
MD Creates a directory.
MKDIR Creates a directory.
MODE Configures a system device.
MORE Displays output one screen at a time.
MOVE Moves one or more files from one directory to another directory.
PATH Displays or sets a search path for executable files.
PAUSE Suspends processing of a batch file and displays a message.
POPD Restores the previous value of the current directory saved by PUSHD.
PRINT Prints a text file.
PROMPT Changes the Windows command prompt.
PUSHD Saves the current directory then changes it.
RD Removes a directory.
RECOVER Recovers readable information from a bad or defective disk.
REM Records comments (remarks) in batch files or CONFIG.SYS.
REN Renames a file or files.
RENAME Renames a file or files.
REPLACE Replaces files.
RMDIR Removes a directory.
SET Displays, sets, or removes Windows environment variables.
SETLOCAL Begins localization of environment changes in a batch file.
SHIFT Shifts the position of replaceable parameters in batch files.
SORT Sorts input.
START Starts a separate window to run a specified program or command.
SUBST Associates a path with a drive letter.
TIME Displays or sets the system time.
TITLE Sets the window title for a CMD.EXE session.
TREE Graphically displays the directory structure of a drive or path.
TYPE Displays the contents of a text file.
VER Displays the Windows version.
VERIFY Tells Windows whether to verify that your files are written
correctly to a disk.
VOL Displays a disk volume label and serial number.
XCOPY Copies files and directory trees.

caperjack 875 I hate 20 Questions Team Colleague

i tried typing \"Tasklist /SVC\" on the dos prompt
like
c:\\Documents and Settings\\Owner>Tasklist /Svc

and it says

'tasklist' is not recognized as an internal or external command, operable program or batch file.

am i entering it wrong or something :/ ?

go to start/all programs /accessories /and command prompt.
Just type in .... Tasklist /svc ,note there is a space between tasklist and the / slash

antioed 53 Posting Whiz

Have you been keeping your computer up to date from Windows Update? Are you using a firewall? Are you using any file sharing software?

I highly recommend checking out a program like this one from Sysinternals called Process Explorer. The reason I recommend this is that the process that's chewing up your resources may actually handle numerous system calls from various applications so it could be hard to tell what the problem is from only looking at the generic process the system uses to perform tasks...a utility like the one above can show you more information about what svchost is trying to do that's chewing up all the resources. I wouldn't be suprised if you end up needing to stop by the Security forum to get some junk cleaned up. One easy thing to do is remove programs that you aren't using just in case some program that you don't need in the first place is causing the problem.

mxpx963 0 Newbie Poster

go to start/all programs /accessories /and command prompt.
Just type in .... Tasklist /svc ,note there is a space between tasklist and the / slash

i know theres a space in between tasklist and the slash

caperjack 875 I hate 20 Questions Team Colleague

i know theres a space in between tasklist and the slash

Thats good to here !:)

mxpx963 0 Newbie Poster

but it still doesnt work

abbasmj 0 Light Poster

I ran Stinger.exe downloaded from Mcafee's website. It found a few trojans. Then I downloaded and ran Adaware which got rid of quite a bit of spywares. After that the system has been fairly stable

eddie5659 1 Newbie Poster

Hiya

This is a good site to use, but when I've done it, its best to jot down what the settings were initially, in case you need to put them back.

Also, if you're not sure about some of them, do them over a period of time, and use all your normal programs each time, just to see if there is a problem

http://www.blackviper.com/WinXP/servicecfg.htm

Regards

eddie

dlh6213 commented: Good advice! -- dlh +1
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/community-center/daniweb-community-feedback/threads/505110/account-migration-doesn-t-work", + "domain": "daniweb.com", + "file_source": "part-00789-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Account migration doesn't work [SOLVED] | DaniWeb

Account migration doesn't work

Andrei_3 0 Newbie Poster

Hi.

Apparently I can't migrate my account. I went on to the Dazah website, but whenever I try to do a reset password with my old account e-mail it fails, saying the e-mail is not recognized, and whenever I try to create a new account with that e-mail, it says that something went wrong. What can I do to port my account?

Edit:
I finally got to reset the password, but this happened:
\"znxaPpq.png\"

  • 3 Contributors
  • 3 Replies
  • 465 Views
  • 21 Hours Discussion Span
  • Latest Post Latest Post by Lucaci Andrew
Lucaci Andrew 140 Za s|n

Apparently it is a stand-alone account, and I needed to log in via Dazah with the new resetted password to work.

Lucaci Andrew 140 Za s|n

Yeah, it is. I thought my generated account would merge with my old one, but apparently no, the old account will retain its own status as a new account, so, I just needed to log in via the old account with the reseted password. :-)

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/community-center/threads/61942/format-hard-drive", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " format hard drive | DaniWeb

format hard drive

law_gers907 0 Newbie Poster

Hi,
I have a dell pc on loan and want to format the hard drive before I give it back. I don't have any discs (being on loan and what not). Its running Windows XP. I've tried running a boot disk but it won't accept any comands.

Please help

  • 2 Contributors
  • 1 Reply
  • 82 Views
  • 7 Hours Discussion Span
  • Latest Post Latest Post by John A
John A 1,896 Vampirical Lurker Team Colleague

First of all, you'll need to create a boot floppy. Here's how you create one:

  1. Insert a floppy into the computer's floppy drive.
  2. Format the floppy disk by opening \"My Computer\" and right-clicking on the floppy disk image, and choosing \"Format\" from the contextual menu.
  3. In the settings section of the Format window, choose \"Create MS-DOS startup disk\".
  4. Click \"Start\".

Now that you've done that, you can boot off the floppy disk that you created. Make sure it's still in the drive, and reboot the computer.

Once you've booted with the floppy, you'll reach the command prompt. There is a Format command on the floppy, but I doubt that will work because usually, Windows XP uses the NTFS filesystem which Format doesn't support. To get around this, you'll need to use Fdisk to delete the partition:

  1. Enter FDISK and press return.
  2. In the Fdisk menu, choose \"Delete Non-DOS partition\". If there's more than 1 partition listed, choose the one that contains the C drive.
  3. Confirm your choice, and delete it.

There's probably no more partitions on your hard drive, which is hopefully what you want, as the DOS tools contained on the diskette can't recreate NTFS partitions, although the Windows XP installation disk is perfectly capabe of doing that.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/468455/using-switch", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - using switch | DaniWeb

using switch

jhan.rhey.5 0 Newbie Poster

/Design a program that supplies numbers (9000 only) and outputs their equivalent Roman numerals.
//the supply numbers and their equivalent Roman numerals are given below.

//Supply number equivalent Roman Numeral
//1 I
//5 V
//10 X
//50 L
//100 C
//500 D
//1000 M

Sample Output:
Enter integer (1-9000):1984
MCMLXXXIV
can anyone make a code for this problem.? using switch. i dont know where to start :(

c++
  • 6 Contributors
  • 8 Replies
  • 636 Views
  • 4 Days Discussion Span
  • Latest Post Latest Post by jhan.rhey.5_1
deceptikon 1,790 Code Sniper Team Colleague Featured Poster

can anyone make a code for this problem.?

Yes, yes we can. But we won't because that defeats the purpose of the exercise which is for you to learn how to do it. If you have problems with your code, feel free to ask, but don't ask someone to write all of the code for you.

jhan.rhey.5 0 Newbie Poster

well can u give tips on what formula should i use.?

deceptikon 1,790 Code Sniper Team Colleague Featured Poster

Loop through the value and find the largest possible numeral that will fit. Then print the numeral and decrement the value. For example:

while (value > 0) {\n    if (value >= 1000) {\n        // M\n    }\n    else if (value >= 500) {\n        // D\n    }\n    else if (value >= 100) {\n        // C\n    }\n    ...\n}\n

This approach isn't well suited to a switch statement as a switch is basically a table lookup with exact values and you really care about the range. But you can voodoo something workable with a little creativity. A start might be to extract your keys based on the value, then check them:

while (value > 0) {\n    const keys[] = {1000, 500, 100, 50, 10, 5, 1};\n    int i;\n\n    for (i = 0; i < sizeof keys / sizeof *keys; i++) {\n        if (value >= keys[i]) {\n            break;\n        }\n    }\n\n    switch (keys[i])\n    {\n        case 1000:\n            // M\n            break;\n        case 500:\n            // D\n            break;\n        case 100:\n            // C\n            break;\n        ...\n    }\n}\n
\"Member
Warrens80

For the love god give the man the code but also show him how to do it

deceptikon commented: Please go read our rules. He's shown no proof of effort yet. -3
richieking 44 Master Poster

No he will not. We help but not solve the problem. Ask your friend to provide what he has done so far.

jhan.rhey.5_1 0 Newbie Poster

i just started learning switch statement. and they gave me that problem. OMG :( what should i do? if anyone can give me their code on that prob, i will study it. ill try to make my code and post it here also:|

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Here is the 10 penny description.

A switch statement allows you to execute code based upon the value of an integer (or comparable - unsigned, long, etc is ok). Let's say that 0 == off, 1 == on, 2 == on+bright, and anything else is an error (or does nothing). Following me so far? Then look at this:

for (int setting = 0; i < 10; i++)\n{\n    switch (setting)\n    {\n        case 0: // Turn off light.\n            break;\n        case 1: // Turn on light.\n            break;\n        case 2: // Make light bright.\n            break;\n        default:\n            // Not a valid value.\n            break;\n    }\n    sleep(10);\n}\n

Assuming you had the extra code to control the lights, this would result in no light, 10 seconds later the light would turn on, and 10 seconds after that the light would be set to a bright setting. Anything else would not change the light setting (the default case). Also note the \"break;\" statements. Those keep your code from \"falling through\" to the next case, effectively breaking out of the switch block.

jhan.rhey.5_1 0 Newbie Poster
    this what i've done so far :) thanks for all your response.\n\n    #include <iostream>\n\n    using namespace std;\n\n    int main()\n    {\n        int number, M,C,X,I,Mr,Cr,Xr,Ir;\n        char YN=('y','Y');\n\n        cout << \"\\n\";\n\n        do {\n            cout << \"Enter Integer: \";\n            cin >> number;\n\n            M=number/1000;\n            Mr=number%1000;\n            C=Mr/100;\n            Cr=Mr%100;\n            X=Cr/10;\n            Xr=Cr%10;\n            I=Xr/1;\n            Ir=Xr%1;\n\n            cout << \"\\n\";\n\n            switch (M){\n                case 1:\n                    cout << \"M\";\n                break;\n                case 2:\n                    cout << \"MM\";\n                break;\n                case 3:\n                    cout << \"MMM\";\n                break;\n                case 4:\n                    cout << \"MMMM\";\n                break;\n                case 5:\n                    cout << \"MMMMM\";\n                break;\n                case 6:\n                    cout << \"MMMMMM\";\n                break;\n                case 7:\n                    cout << \"MMMMMMM\";\n                break;\n                case 8:\n                    cout << \"MMMMMMMM\";\n                break;\n                case 9:\n                    cout << \"MMMMMMMMM\";\n                break;\n                default:\n                cout << \"\";\n            }\n\n            switch (C){\n                    case 1:\n                        cout << \"C\";\n                    break;\n                    case 2:\n                        cout << \"CC\";\n                    break;\n                    case 3:\n                        cout << \"CCC\";\n                    break;\n                    case 4:\n                        cout << \"CD\";\n                    break;\n                    case 5:\n                        cout << \"D\";\n                    break;\n                    case 6:\n                        cout << \"DC\";\n                    break;\n                    case 7:\n                        cout << \"DCC\";\n                    break;\n                    case 8:\n                        cout << \"DCCC\";\n                    break;\n                    case 9:\n                        cout << \"CM\";\n                    break;\n                    default:\n                        cout << \"\";\n            }\n            switch (X){\n                case 1:\n                    cout << \"X\";\n                break;\n                case 2:\n                    cout << \"XX\";\n                break;\n                case 3:\n                    cout << \"XXX\";\n                break;\n                case 4:\n                    cout << \"XC\";\n                break;\n                case 5:\n                    cout << \"L\";\n                break;\n                case 6:\n                    cout << \"LX\";\n                break;\n                case 7:\n                    cout << \"LXX\";\n                break;\n                case 8:\n                    cout << \"LXXX\";\n                break;\n                case 9:\n                    cout << \"XC\";\n                break;\n                default:\n                    cout << \"\";\n            }\n            switch (I){\n                case 1:\n                    cout << \"I\\n\";\n                break;\n                case 2:\n                    cout << \"II\\n\";\n                break;\n                case 3:\n                    cout << \"III\\n\";\n                break;\n                case 4:\n                    cout << \"IV\\n\";\n                break;\n                case 5:\n                    cout << \"V\\n\";\n                break;\n                case 6:\n                    cout << \"VI\\n\";\n                break;\n                case 7:\n                    cout << \"VII\\n\";\n                break;\n                case 8:\n                    cout << \"VIII\\n\";\n                break;\n                case 9:\n                    cout << \"IX\\n\";\n                break;\n                default:\n                    cout << \"\\n\";\n            }\n\n            cout << \"\\n\";\n            cout << \"Try again? (Y/N) \";\n            cin >> YN;\n\n        } while (YN=='Y'||YN=='y');\n        return 0;\n    }\n
Nnejnej commented: thanks a lot. +0
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/425733/smart-pointers", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " c++ - Smart Pointers [SOLVED] | DaniWeb

Smart Pointers

triumphost 120 Posting Whiz

Yesterday I took a dive into smart pointers and wasn't sure when I should use them vs. Raw pointers. I found out they are quite useful but they do not work all the time for me.

Example of working:

char* Buffer = new char[1024];\nfread(buffer, 1, sizeof(buffer), infile);  //took out the while loop for this example.\ndelete[] Buffer; Buffer = nullptr;\n\n\n//Changed to:\nstd::unique_ptr Buffer(new char[1024]);\nfread(buffer.get(), 1, sizeof(buffer), infile);  //took out the while loop for this example.\n//I never have to do delete[] correct?\n

In the above, I had to use .get() to pass my pointer to fread and various other functions. My problem comes when I try to do:

//Raw ptr works well..\n\nchar* pFile;\nchar* pMemory = new char[SomeSize];\npFile = pMemory;\nmemcpy(pFile, Buffer, dwHeader);\n\npFile = (char*)((DWORD)pFile + jmpSize);\n\n\n//Smart ptr.. :S I'm confused..\n\nstd::shared_ptr<char[]> pMemory(new char[SomeSize]);\nstd::shared_ptr<char[]> pFile(pMemory);  //The same as pFile = pMemory? Also had to declared pFile after pMemory.\nmemcpy(pFile.get(), Buffer, dwHeader);\n\npFile.get() = (char*)((DWORD)pFile.get() + jmpSize);   //Errors :S\n

Questions:
How do I assign to my ptr? Is is supposed to be shared or unique? I know unique uses move semantics so only one can owner can have the raw ptr. So I used shared since that's what the equal sign does right?

Is there any moment in time where I should use a Smart pointer vs. a Raw pointer (Referring to a bitmap class where there is a member pointer to a struct that is deleted in the destructor).

c++
  • 2 Contributors
  • 1 Reply
  • 230 Views
  • 57 Minutes Discussion Span
  • Latest Post Latest Post by mike_2000_17
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster

Smart pointers are not meant to point to dynamic arrays, but to individual objects. Boost has a shared_array class to deal with arrays, but I wouldn't recommend it.

In your case, you should be allocating your dynamic arrays using an STL container, in particular, std::vector. As so:

std::vector<char> Buffer(1024);\nfread(&Buffer[0], 1, Buffer.size(), infile);\n// no need to delete anything, Buffer will go out-of-scope and clear the memory automatically.\n

As for the other example (with memcpy), you should learn to work with iterators and STL algorithms. Below is the code that is equivalent to yours:

std::vector<char> pMemory(SomeSize);\nstd::vector<char>::iterator pFile = pMemory.begin();\nstd::copy(pBuffer.begin(), pBuffer.begin() + dwHeader, pFile);\npFile += jmpSize;\n

Think of iterators like they were pointers (but not necessarily actual pointers).

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/457189/visual-basic-6-data-reports-related", + "domain": "daniweb.com", + "file_source": "part-00163-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " visual-basic - Visual Basic 6 Data Reports related | DaniWeb

Visual Basic 6 Data Reports related

The X-Man 0 Newbie Poster

Hey Everyone,

I'am Using vb6 data enviourment and Access 2010 to show an Invoice in a Data Report.

I Have many orders and many different items in orders. So I select an order from a MSHFlexgrid and will load the report. All The different items (in different orders) are stored in one table and I have created a code which works fine which will remove the items not in the order into an extra table and therefore before loading the report, the table will contain only the data of the wanted items. I have used Breakpointers and have seen that this works fine and that at the end of day the tables are in the correct wanted manner.

But then I do this without using Breakpointers, I don't know how or why always when I run and load the report an extra unwanted Item is displayed in the report. I have noticed that this item is always the final record of the Items Table. And when I load the last order, an item from the one before the last order appears in the report. I am really really confused as to why this happens..could someone help me out?

Also when I close the report and select a different order to be opened the previous data is still in the report and that gets shown..do i need to refresh or do something like that?.

Thanks in Advance,
The X-Man

  • 1 Contributor
  • 1 Reply
  • 318 Views
  • 21 Hours Discussion Span
  • Latest Post Latest Post by The X-Man
The X-Man 0 Newbie Poster

Please Kindly reply. :)

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/15786/phpnuke-categories", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " PHPNuke Categories | DaniWeb

PHPNuke Categories

indiefi33 0 Newbie Poster

When I attempt to add a new category, it says that the new category already exists, regardless of what I put in it. Is this a common problem that is easy to fix? I apologize if the question has been asked a million times, but it is very frustrating. Thanks!

php
  • 2 Contributors
  • 3 Replies
  • 130 Views
  • 7 Hours Discussion Span
  • Latest Post Latest Post by mikeSQL
mikeSQL 5 Junior Poster

MMMM, Add a new catigoriy where? You Admin Panel, the DAtabase itself, where?

indiefi33 0 Newbie Poster

I actually just found the answer (here it is in case anyone else has the problem and my not know).

Open admin/modules/stories.php and find:
Code:
$check = $db->sql_query(\"select catid from \".$prefix.\"_stories_cat where title='$title'\");
$catid = intval($catid);

change to:
Code:
$result = $db->sql_query(\"select catid from \".$prefix.\"_stories_cat where title='$title'\");
$catid = intval($catid);
$check = $db->sql_numrows($result);

also find:
Code:
$check = $db->sql_query(\"select catid from \".$prefix.\"_stories_cat where title='$title'\");

change to:
Code:
$result = $db->sql_query(\"select catid from \".$prefix.\"_stories_cat where title='$title'\");
$check = $db->sql_numrows($result);

mikeSQL 5 Junior Poster

Those are very good answers. You can also try upgrading your current versions of nuke. Alot of bugs are fixed such as that 1. But Im glad you found your answer because I dont have that problem with version 7.5 nor .6

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/180075/passing-variables-through-links", + "domain": "daniweb.com", + "file_source": "part-00659-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " php - Passing variables through links [SOLVED] | DaniWeb

Passing variables through links

OmniX 21 Practically a Master Poster

Yes everyone will point to using ahref<a href=\"index.php?variable=1>.
But im just wondering if I can do the same thing using headers header(\"Location: index.php?variable=1\").
Note: Yes I can also use sessions but wish to user headers.
Thanks, Regards X

php
  • 3 Contributors
  • 4 Replies
  • 106 Views
  • 17 Hours Discussion Span
  • Latest Post Latest Post by nav33n
nav33n 472 Purple hazed! Team Colleague Featured Poster

But im just wondering if I can do the same thing using headers header(\"Location: index.php?variable=1\")

Yes you can. Then you can acess the 'variable' in index.php just like how you do it using $_GET.

OmniX 21 Practically a Master Poster

Ok so just to confirm, how would I do the value:
header(\"Location: index.php? $VARIABLE = $VARIABLE\")
something like
header(\"Location: index.php?\" . $VARIABLE . \"=\" . $VARIABLE)
that will work according to the previous, forum? Thanks :)

nav33n 472 Purple hazed! Team Colleague Featured Poster
header(\"location: index.php?variable1=\".$variable1.\"&variable2=\".$variable2);

:)

OmniX commented: Thanks as always nav ;) +2
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/hardware-and-software/hardware/mobile-and-wearables/threads/505711/how-to-solve-who-has-which-device-problem", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " How to solve: who has which device problem? | DaniWeb

How to solve: who has which device problem?

nitin1 15 Master Poster

Hi everyone,

How are you? Starting some thread after long time :)

Actually, I have a group of 25 people. I have 20-25 mobile devices in my group. So, I have assigned 1-2 device on each person's name(as an owner). But, people in the group ask each other for the device for some help and promise to return it too. They may need specific device for some work which is a genuine thing. But, they forget to return it & person who gave has to ask on emails or each person where his/her device is.

Problem:
Asking on emails is very cumbersome. It is a like a spam everyday. people are asking where my XYZ device, if someone has please return etc.
Also, it delays the work which the person has to do using that device.
Also, it gives birth to a frusrattion too which is not good for a group.

What I want:
There should be some mechanism in which we have a list of all the devices & the curent person name with whom that device is right now.

possible solutions:

  • Have an excel sheet which the person who takes the device should update. No! People don't take that much pain.
  • Have an excel sheet & person who is giving the device should update. No! it will be too much work for him/her. Everyone is asking for some device & updating like this will be an overhead for the complete team.

As we all might have faced this type of issue in every group similar to this. What's ur take? What initiative can I take to solve this for the grouo & ease this thing? Technology can do anything today, isn't it? ;-)

Thanks in advance.

  • 2 Contributors
  • 1 Reply
  • 235 Views
  • 10 Hours Discussion Span
  • Latest Post Latest Post by Agilemind
Agilemind 0 Posting Whiz in Training

Can you set up user accounts on each device for each person in the group, then have the devices automatically update a spreadsheet with who was the last person to log in to the device?

Alternatively, have a central location for all devices, where they must be placed when not in use and then have the excel spread sheet always available at the same location so people have to sign-out each device when they remove it? - that way if they already have a device out it is convienent to return the device whenever they need a new device. Plus no body has to ask where the device is as they just look in the central location and if not there check the spreadsheet that is there to ID who should have it. Course there will have to be some kind of repercussion for not returning devices when they are done or trading directly with other group members.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/188313/extract-part-of-text-file-into-2-dimensional-string-array", + "domain": "daniweb.com", + "file_source": "part-00593-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - Extract part of text file into 2 dimensional ... | DaniWeb

Extract part of text file into 2 dimensional string array

aunahal2 0 Newbie Poster

Hi,
I have been spending several weeks figuring this out but couldn`t find way to it. Here is what I am planning to do, I have a text file with several data in it, and I have to extract part of the data into a 2 dimensional array.

Here is a sample of the text file where each line represent data in each row in text file:
A
B
C
D
A>3;C>2
D>5;B<3

I want to make a 2 dimensional string array and put it in this form
A B C D
>3 <3 >2 >5 <-- so this sample is a 2x4 array

Here is how I got it: First read through the first 4 row then put each of them in a column. Then read through other 2 row, check which character matches whichof the first 4 rows and put the comparison sign and number under it in the 2 dimensional array. So for example when I get to line\"A>3;B>2\" I check which column A is in and put >3 under it, when encounter a \";\" move to check next one on the line, so check which column C is in and put >2 under it in the new two dimensional array... and so on. I don`t know how to write a java code to extract like what I wanted.

What I have done so far is I was able to get each row into a 1 dimensional string array each from reading the textfile in,
so now I got a string array to have such content:
text[0]=A
text[1]=B
.
.
text[5]=C>5;D<3

But I want to turn those text[] string array into the 2 dimensional string array form that I want. How do I extract content of each string array? How should I start?

  • 2 Contributors
  • 1 Reply
  • 196 Views
  • 10 Hours Discussion Span
  • Latest Post Latest Post by VernonDozier
VernonDozier 2,218 Posting Expert Featured Poster

Hi,
I have been spending several weeks figuring this out but couldn`t find way to it. Here is what I am planning to do, I have a text file with several data in it, and I have to extract part of the data into a 2 dimensional array.

Here is a sample of the text file where each line represent data in each row in text file:
A
B
C
D
A>3;C>2
D>5;B<3

I want to make a 2 dimensional string array and put it in this form
A B C D
>3 <3 >2 >5 <-- so this sample is a 2x4 array

Here is how I got it: First read through the first 4 row then put each of them in a column. Then read through other 2 row, check which character matches whichof the first 4 rows and put the comparison sign and number under it in the 2 dimensional array. So for example when I get to line\"A>3;B>2\" I check which column A is in and put >3 under it, when encounter a \";\" move to check next one on the line, so check which column C is in and put >2 under it in the new two dimensional array... and so on. I don`t know how to write a java code to extract like what I wanted.

What I have done so far is I was able to get each row into a 1 dimensional string array each from reading the textfile in,
so now I got a string array to have such content:
text[0]=A
text[1]=B
.
.
text[5]=C>5;D<3

But I want to turn those text[] string array into the 2 dimensional string array form that I want. How do I extract content of each string array? How should I start?

First step: know exactly what assumptions you can make as far as the data file. I am assuming that the first part is a list of letters, one per line, then any line with anything else than a letter is part of the rest of the second part. Seems to me you can disregard any line WITHOUT a > or < sign, so read in a line at a time and if there is only a letter, toss it out. Once you get lines with < or >, you start keeping the data and parsing it. Your delimiter is a semicolon, so split the line into different segments delimited by a semicolon, and throw the semicolon out. String.split could be useful here. You now have strings like \"A>3\". You need to split that into \"A\" and \">3\". You can use String.split again to find the '>' or '<' and split the string again. Then store the \"A\" and \">3\" in your array.

In your example, you have a SINGLE dimension array called text. Have text be a 2-D array so that:

text[0][0] = \"A\";\ntext[0][1] = \">3\";
Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/164483/image-plotting-problem", + "domain": "daniweb.com", + "file_source": "part-00648-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Image Plotting Problem | DaniWeb

Image Plotting Problem

it2051229 -3 Junior Poster in Training

I'm having trouble on how am going to start this idea of mine. I have an image and I want to plot points on that image. My Idea is to get the X and Y coordinates of the mouse pointer and save it into a text file so that by the time I re-run the program again, the plotted points is still there. But it seems like this is not a good idea since everything will be messed up if I load the program to a computer with different screen size. I was thinking of placing an invisible grid, but looks like this will be tough to do.

  • 3 Contributors
  • 2 Replies
  • 92 Views
  • 1 Day Discussion Span
  • Latest Post Latest Post by iDeveloper
ddanbe 2,724 Professional Procrastinator Featured Poster

You could look at this snippet http://www.daniweb.com/code/snippet1020.html
It uses coordinate transformations, so you are independent of a screen.
You can have an invisible grid by adding a form with FormBorderStyle set to none and Opacity set to zero Be carefull you must provide another way to close this form than the usual closebox because there isn't one.

iDeveloper 21 Light Poster

Well, you could create a 2D array to resemble the grid. When someone clicks on the mouse, you could take the mouse pointer (relative to the window not the screen) and convert it to the position in your array. You could even create a nice little collection class to store the grid and then simply serialize it when you need to store the grid.

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/web-development/threads/313077/should-i-install-php-net-on-iis7-5", + "domain": "daniweb.com", + "file_source": "part-00815-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " Should I install PHP.net on IIS7.5? [SOLVED] | DaniWeb

Should I install PHP.net on IIS7.5?

mulevad 0 Newbie Poster

I have an IIS7.5 server installed on my laptop. I'm learning C#, XML, XSLT, .NET, Visual Studio 2005, 2008, 2010 and Microsoft Expression Web.

I am the webmaster on a simple PHP website that I inherited. I figure I ought to learn PHP, but figure I also need to install a PHP add-in to IIS on my laptop. (Someone else hosts the site I inherited for me.)

A basic search comes up with Microsoft Web Platform Installer which leads to a 3rd-party (according to Microsoft) PHP installation from PHP.NET.

Does anyone know if this is the way I should go?
Is this the correct PHP installation?
The install looks straight forward, but any suggestions would be appreciated.

(I hope to eventually get to apache, but will have to put that off, so please don't tell me to install apache - I figure that's probably a different thread!)

php
  • 3 Contributors
  • 5 Replies
  • 137 Views
  • 20 Hours Discussion Span
  • Latest Post Latest Post by mulevad
pritaeas 2,194 ¯\\_(ツ)_/¯ Moderator Featured Poster

Yes, the Web Platform Installer installs the correct version.

mulevad 0 Newbie Poster

Ok - I used Web Platform Installer 2.0 to install:
Visual Web Developer 2010 Express - cause I wondered about it
URL Rewrite 2.0 - cause it was added without my knowing it (maybe a pre-req)
PHP 5.214 - cause it's the bomb!

Thanks.

mulevad 0 Newbie Poster

Hey, there's a 5.3.3!
I also installed PHP Manager

teedoff 3 Posting Pro

When you install apache, you will have to change the port on either IIS or Apache. Both listen on port 80 I think, so that will cause a conflict. I change my Apache server to port 8080 so I could run IIS and Apache at the same time.

mulevad 0 Newbie Poster

@teedoff - I'm only using IIS on this laptop. I have another one with Ubuntu which I may install apache on, but I get what you mean about port conflicts should I decide to run apache and IIS on the same box. -thanks

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + }, + { + "url": "https://www.daniweb.com/programming/software-development/threads/228697/printing-a-variable-with-page-drawstring", + "domain": "daniweb.com", + "file_source": "part-00793-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000", + "content": " java - printing a variable with page.drawString [SOLVED] | DaniWeb

printing a variable with page.drawString

Superfat 0 Newbie Poster

Is there a way to tack a variable onto the end of a print.drawString so it would show up like
Text: <variable>
Or:

page.drawString (\"Text: \" object1, x, y);

Where object1 is the variable. I tried doing that, but i get an error \")\" Expected on that line, i suspect that it is because anything that is expected in that first slot is expected inside of quotes.

  • 3 Contributors
  • 2 Replies
  • 101 Views
  • 13 Hours Discussion Span
  • Latest Post Latest Post by tonyjaa
BestJewSinceJC 700 Posting Maven

Where object1 is the variable. I tried doing that, but i get an error \")\" Expected on that line, i suspect that it is because anything that is expected in that first slot is expected inside of quotes.

Incorrect. Anything in that first argument has to amount to a String, just like the javadoc says for the drawString method. So you could put \"I'm a String!\" + object.toString() in that slot if you wanted to. Or you could even put \"I'm a String!\" + object, I think.

tonyjaa 0 Newbie Poster

php in used to cms project?

Reply to this topic
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reply to this Topic

Share Post

Insert Code Block

" + } +] \ No newline at end of file