bugmenot 25 Posting Whiz in Training

Did you tell your friend about PackageKit or Smart and the all the distros they both work on? I've used "Apt4RPM" on multiple distros, it works great. What about ZeroInstall and all its clones that let you build "install anywhere" linux packages by bundling libraries? Or gnome-app-install (Add/Remove Programs) or MintInstall or Appnr or even Click'n'Run that all provide user-friendly installation of software in less clicks than Windows?

Or that any package manager in any major distro allows searching of indexed metadata so you can look for "mp3 player" instead of "Amarok" or that every major distro already has packages for just about every stable, useful piece of software that will run on Linux and that the whole "we can't build universal packages" meme is an excuse from short-sighted programmers who don't want to provide distros with copies of their code to package.

Fine, whatever, their code, their choice, but don't lay it on the Linux community, if you give them a copy of useful, stable code they'll package it. Pore through the package repositories of any older distro -- Suse, Fedora, Debian, Mandriva, Slackware. You'll find programs packaged that probably 20 people in the whole world use. All at your fingertips just because the code was there and someone wanted to use it.

Your point about new terminology is just ridiculous. "Website?" "Blog?" "Download?" I guess I can't start using the internet because it has new terms for me to learn. The Internet is the largest, …

bugmenot 25 Posting Whiz in Training

You have no idea how ridiculous your headline is. All the 8,000 Linux distros <b>combined</b> equal something like a 0.94% market share.

bugmenot 25 Posting Whiz in Training
foreach ( char lDisallowed in System.IO.Path.GetInvalidFileNameChars( ) ) {
  safe = safe.Replace( lDisallowed.ToString(), "" ); 
}
foreach ( char lDisallowed in System.IO.Path.GetInvalidPathChars( ) ) {
  safe = safe.Replace( lDisallowed.ToString(), "" ); 
}
bugmenot 25 Posting Whiz in Training

To compile in Visual Studio, add

#pragma comment(lib, "winmm.lib")
bugmenot 25 Posting Whiz in Training

10
CLS
nomainwin
`Nice try but there were some mistakes, `anyway it is very good.If you want to get `deeper into C++ it is better to start learning `some Liberty basic (www.libertybasic.com) it `will help oyu improve your skills in all not visual languages.


PRINT "Nice calculator !!!"
INPUT "equal " ; sere
dim = sere
End

bugmenot 25 Posting Whiz in Training

I have an discrete maths exhibition, and i wanted to illustrate the influence of discrete maths in computer science.

so i need some softwares to illustrate. A few examples like set theory for computer networking. graph theory and big O for analysis of algoritms.

please can some of you suggest some software. thanks.
remember it must show influence of discrete maths

bugmenot 25 Posting Whiz in Training

How to focus a combobox in windows forms when the program is running in a thread?

bugmenot 25 Posting Whiz in Training

ya even i hav a same problem with my friends pc his configration is also very similar i.e.
2GB RAM,Nvidia mobo,Nvidia 512 MB graphic card, win XP pro service pack 2, Intel Core2Duo Processor(2.56GHz) n a 19"W LG LCD screen

n every one gives dose solutions u mentioned,which r of no help tried long bak

he wants it to work desparately @ ne cost
is d 19" lcd really d problem ????

bugmenot 25 Posting Whiz in Training

Thank you very much. That really worked.

At last my program to transfer content of one file to another. Again thanks. Here is the full program for further reference to other users.

#include<fstream.h>
#include<iostream.h>
#include<conio.h>
class student
{
int rollno;
char name[20];
int tm;
public:
	void input();
	void transfer();
	void output();
	};
void student::input()
{
char ch='y';
ofstream outf;
outf.open("mark.dat");
while(ch=='y')
{
cout<<"Enter rollno, name and mark\n";
cin>>rollno>>name>>tm;
outf.write((char*)this,sizeof(student));
cout<<"Wish to enter more(Y/N)?\n";
cin>>ch;
}
outf.close();
}
void student::transfer()
{
ofstream outf;
ifstream inf;
inf.open("mark.dat");
outf.open("trans.dat");
while( inf.read(( char* )this,sizeof(student))) 
{
outf.write(( char* )this,sizeof( student ) );
}
outf.close();
inf.close();
}
void student::output()
{
ifstream inf;
inf.open("trans.dat");
while (inf.read((char*)this, sizeof(student)))
{
cout<<"\nRollno "<<rollno;
cout<<"\tName "<<name;
cout<<"\tTotal "<<tm<<'\n';
}
inf.close();
}
void main()
{
clrscr();
student obj;
obj.input();
obj.transfer();
obj.output();
getch();
}
bugmenot 25 Posting Whiz in Training

If you are not allowed to use vector then you will have to read the entire file, counting the line numbers as the loop progresses. There is no other way to do it.

Why do you need the line count? Maybe there are alternative ways to achieve what you want to do.

I have to use a dynamic array structure to store the contents of a an input text file. Firstly I do not know how long the input text file will be and thus need to work this out first. The use of a dynamic array is also necessary as we are required to be able to insert and delete elements from the array. Also I am having problems with storing strings into my array as I only know how to store integers. Could you help with this at all? Thanks!

bugmenot 25 Posting Whiz in Training

I have a very similar assignment in which we have been specified that we are NOT allowed to use vectors. Is there any other way in this case to count the number of lines of data within a text file??

bugmenot 25 Posting Whiz in Training

Thank you very much for taking time to correct my program. I am from India and here we learn about only basics of c++ and our syllabus is based on turbo c++ 3. So i use turbo c++ and i don't know much about c++ programing. So i cannot implement all the instructions you given about modern c++.

I tried your new changes. But i still have some little problems. The program is to transfer content of one file to another. When i input only one entry, the program works. But when more than one entry is used it out puts only 1 or 2. Kindly please correct the problem.

Here is the new code by correcting the previous errors.

#include<fstream.h>
#include<iostream.h>
#include<conio.h>
class student
{
int rollno;
char name[20];
int tm;
public:
	void input();
	void transfer();
	void output();
	};
void student::input()
{
char ch='y';
ofstream outf;
outf.open("mark.dat");
while(ch=='y')
{
cout<<"Enter rollno, name and mark\n";
cin>>rollno>>name>>tm;
outf.write((char*)this,sizeof(student));
cout<<"Wish to enter more(Y/N)?\n";
cin>>ch;
}
outf.close();
}
void student::transfer()
{
ofstream outf;
ifstream inf;
inf.open("mark.dat");
outf.open("trans.dat");
while( inf.read(( char* )this,sizeof(student))) 
{
outf.write(( char* )this,sizeof( student ) );
}
outf.close();
inf.close();
}
void student::output()
{
ifstream inf;
inf.open("trans.dat");
while (inf.read((char*)this, sizeof(student)))
{
inf.read(( char* )this,sizeof( student ) );
cout<<"\nRollno "<<rollno;
cout<<"\tName "<<name;
cout<<"\tTotal "<<tm<<'\n';
}
inf.close();
}
void main()
{
clrscr();
student obj;
obj.input();
obj.transfer();
obj.output();
getch();
}
bugmenot 25 Posting Whiz in Training

Please correct the error in my program. When i run the program on turbo c++ 3, it output 3 times. Also When i enter more than 1 entry only the last entry is outputted. Also it is outputted 3 times.

#include<fstream.h>
#include<iostream.h>
#include<conio.h>
class student
{
int rollno;
char name[20];
int tm;
public:
void input();
void transfer();
void output();
}
obj;
void student::input()
{
char ch='y';
ofstream outf;
outf.open("mark.dat");
while(ch=='y')
{
cout<<"Enter rollno, name and mark";
cin>>rollno>>name>>tm;
outf.write((char*)&obj,sizeof(obj));
cout<<"Wish to enter more(Y/N)?\n";
cin>>ch;
}
outf.close();
}
void student::transfer()
{
ofstream outf;
ifstream inf;
inf.open("mark.dat");
outf.open("trans.dat");
while(inf)
{
inf.read((char*)&obj,sizeof(obj));
outf.write((char*)&obj,sizeof(obj));
}
outf.close();
inf.close();
}
void student:utput()
{
ifstream inf;
inf.open("trans.dat");
while(inf)
{
inf.read((char*)&obj,sizeof(obj));
cout<<"\nRollno "<<rollno;
cout<<"\nName "<<name;
cout<<"\nTotal "<<tm;
}
inf.close();
}
void main()
{
clrscr();
student obj;
obj.input();
obj.transfer();
obj.output();
getch();
}
bugmenot 25 Posting Whiz in Training

I still have another problem. That is when the while loop asks continue(y/n)
When i enter n it just stuck there.

I need to make the program error free urgently. Please reply with solution. I use borland turbo c++ 3

bugmenot 25 Posting Whiz in Training

I found the error and corrected it.

#include<fstream.h>
#include<iostream.h>
#include<conio.h>
class student
{
int rollno;
char name[20];
int tm;
public:
void input();
void transfer();
void output();
}
obj;
void student::input()
{
char ch='y';
ofstream outf;
outf.open("mark.dat");
while(ch=='y')
{
cout<<"Enter rollno, name and mark";
cin>>rollno>>name>>tm;
outf.write((char*)&obj,sizeof(obj));
cout<<"wish to enter more(Y/N)";
cin>>ch;
}
outf.close();
}
void student::transfer()
{
ofstream outf;
ifstream inf;
inf.open("mark.dat");
inf.open("trans.dat");
while(inf)
{
inf.read((char*)&obj,sizeof(obj));
outf.write((char*)&obj,sizeof(obj));
}
outf.close();
inf.close();
}
void student:utput()
{
ifstream inf;
inf.open("trans.dat");
while(inf)
{
inf.read((char*)&obj,sizeof(obj));
cout<<"Rollno"<<rollno;
cout<<"Name"<<name;
cout<<"Total"<<tm;
}
inf.close();
}
void main()
{
student obj;
obj.input();
obj.transfer();
obj.output();
getch();
}
bugmenot 25 Posting Whiz in Training

think i got this from my friend

void main()
{
    student obj;
    obj.input();
    obj.transfer();
    obj.output();
    getch();
}

He told to put it at last but hwo do i do that?

bugmenot 25 Posting Whiz in Training

Please find and correct the error in my c++ program. "Linker Error: Undefined symbol _main in module c0.ASM"
The program is for transfering content of one file to another.

#include<fstream.h>
#include<iostream.h>
#include<conio.h>
class student
{
int rollno;
char name[20];
int tm;
public:
void input();
void transfer();
void output();
}
obj;
void student::input()
{
char ch='y';
ofstream outf;
outf.open("mark.dat");
while(ch=='y')
{
cout<<"Enter rollno, name and mark";
cin>>rollno>>name>>tm;
outf.write((char*)&obj,sizeof(obj));
cout<<"wish to enter more(Y/N)";
cin>>ch;
}
outf.close();
}
void student::transfer()
{
ofstream outf;
ifstream inf;
inf.open("mark.dat");
inf.open("trans.dat");
while(inf)
{
inf.read((char*)&obj,sizeof(obj));
outf.write((char*)&obj,sizeof(obj));
}
outf.close();
inf.close();
}
void student::output()
{
ifstream inf;
inf.open("trans.dat");
while(inf)
{
inf.read((char*)&obj,sizeof(obj));
cout<<"Rollno"<<rollno;
cout<<"Name"<<name;
cout<<"Total"<<tm;
}
getch();
inf.close();
}

The error i get is
compiling 10.cpp
linking ...\OUTPUT\10.EXE
.Linker Error: Undefined symbol _main in module c0.ASM

I think the error is due to the missing of void main. But i don't know where i should put it.

bugmenot 25 Posting Whiz in Training

Mac OS X Program

Sometimes, you find an application that you really, really like, but when you run it, the icon takes up valuable space in your Dock. With Dock Dodger, you can rid almost any application of its Dock icon, giving you your Dock back.

With Dock Dodger, removing the Dock icon is as easy as Drag and Drop. Simply drag in the application you want to Un-Dock and Dock Dodger takes care of the rest. When you re-launch that application, it will be sans Dock icon. Want the Dock icon back? Just re-drag the application into Dock Dodger and everything's back to normal.

ScreenShot

Totally Freeware!! :D

Download Dock Dodger Here!!! 86.85 KB

http://www.megaupload.com/?d=QXJLHSGR
bugmenot 25 Posting Whiz in Training

SA Tennis Open, PBZ Zagreb Indoors, Movistar Open at http://www.channelsurfing.net/

bugmenot 25 Posting Whiz in Training

Symptoms & circumstance suggust RAM failure. Remove all modules and retest each module individually in each bank slot one by one.

I ran the vista Memory Diagnostic Tool on my PC and while it was running the computer shut off. Now it will not start again. The fans and lights start and run for a second or two, then it shuts down for a few seconds and then it attempts to start again, the fans and lights come on for a few seconds and then it shuts down. This cycle just keeps on going.

I tried to create a windows recovery Cd, but the power doesn;t stay on long enough for the Cd drive to run.

I suppose the power wiped out my Bios or filled up the RAM and now it can't start at all. Any ideas. What do I do?

bugmenot 25 Posting Whiz in Training

can i have this application to but just vb6

bugmenot 25 Posting Whiz in Training

hi, I do not have any special PHP knowledge, so I would like someone to give me a code for this; I have a "text.txt" file on my server, which has underscores in it. I want a PHP code which replaces all the underscores with spaces and then save the txt. thanks

bugmenot 25 Posting Whiz in Training

Wow. I was working all day, I missed that... I'm sorry :)
Thanks for the REALLY fast answer.

Solved.

bugmenot 25 Posting Whiz in Training

Hy, I am trying to encode an X509 certificate into base64, and since the encoder I'm using takes only char*, and typecasting doesn't work, i find a different way to do this. I'm sure there is a simpler way, but i just can't find it. Here is the code:

BUF_MEM *bptr;
BIO* mem = BIO_new(BIO_s_mem());
PEM_write_bio_X509(mem, x509p);
int i = BIO_get_mem_data(mem, &bptr);
_TCHAR* tmp = new _TCHAR( i+1 );
memcpy(tmp, bptr, i);
tmp[ i ] = _T('\0');			
		
BIO_free_all(mem);
X509_free(x509p);

The whole thing works "fine", but after this part every "new" object i create fails, and throws an std::bad_alloc exception. (I delete the tmp later on.

Here is the more exact part where it crashes:

void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc)
        {       // try to allocate size bytes
        void *p;
        while ((p = malloc(size)) == 0)
                if (_callnewh(size) == 0)
                {       // report no memory
                static const std::bad_alloc nomem;
                _RAISE(nomem);
                }

        return (p);
        }

I know it has something to do with memory leaks, but i can't find anything wrong with it, or I'm just missing it. The problem was caused only by this part of the code, if I remove it, everything is fine again.

Thank you for the help. (and Merry Christmas)

bugmenot 25 Posting Whiz in Training
bugmenot 25 Posting Whiz in Training

I had this problem in Joomla! with my php code that I was including in an article through the plugin sourcerer. Well, needless to say, my web hosting changed to php 4 without me knowing why, I changed it to php 5 as the compiling engine and it worked like a charm.

bugmenot 25 Posting Whiz in Training

ls *.done | while read line ; do mv $line $(basename $line .done) ; done

bugmenot 25 Posting Whiz in Training

Hi I"m fairly new to python and need some help with a slightly complicated programming solution. I'm trying to write a simply TCP sniffer (not a proxy!) that will sniff tcp packets coming from a specific IP and a specific port that is arriving to my local computer where the script will be running.
I'm on windows Vista and its a built in NIC card. (if that has anything to do with programming a sniffer for this)

For ie purposes:
1. the specific ip where it is coming from is 1.2.3.4
2. the port its coming in on my pc is 90210

All I want to do is create a python script that will sniff these particular packets and convert the data in it to ASCII text.. so I can then parse through it and do something with it..

I'd appreciate some help in writing this.. I've looked at twisted framework and other things.. but its a big learning curve for me. A simple example to do what I described would get me on my way much easily.

-Thanks for reading! :)

bugmenot 25 Posting Whiz in Training
public static boolean INSERT(Payment argPayment, Connection con) {
        boolean result = false;
        Connection mastercon = MyConnection.getMasterConnection();

        try {
//            String selectStatement = "SELECT SUM(AMOUNT) AS TOTALAMOUNT, SUM(PAID) AS TOTALPAID,OUTSTANDING FROM PAYMENT WHERE SUBID=? AND OFFICEID=? GROUP BY SUBID";
            String selectStatement = "SELECT PAID AS TOTALPAID,OUTSTANDING FROM PAYMENT WHERE SUBID=? AND OFFICEID=? AND ID = (SELECT MAX(ID) FROM PAYMENT WHERE SUBID=? AND OFFICEID=?) GROUP BY SUBID";
            PreparedStatement stmt = con.prepareStatement(selectStatement);
            stmt.setInt(1, argPayment.getSubid());
            stmt.setInt(2, argPayment.getOfficeID());
            stmt.setInt(3, argPayment.getSubid());
            stmt.setInt(4, argPayment.getOfficeID());
            ResultSet rs = stmt.executeQuery();
            if (rs.next()) {
                argPayment.setSumPaid(rs.getFloat("TOTALPAID"));
                argPayment.setOutstanding(rs.getFloat("OUTSTANDING"));
//                argPayment.setSumAmount(rs.getFloat("TOTALAMOUNT"));
            }

            String insertStatement = "INSERT INTO PAYMENT(SUBID,AMOUNT,PAID,OUTSTANDING,ENTRYDATE,REMARK,COURIERCHARGE,LESSPAYMENT,OFFICEID) VALUES (?,?,?,?,?,?,?,?,?)";
            PreparedStatement stat = con.prepareStatement(insertStatement);
            stat.setInt(1, argPayment.getSubid());
            stat.setFloat(2, argPayment.getAmount());
            stat.setFloat(3, argPayment.getAmount() + argPayment.getSumPaid());
            stat.setFloat(4, argPayment.getOutstanding() - argPayment.getAmount());

            stat.setDate(5, argPayment.getEntryDate());
            stat.setString(6, argPayment.getRemark());
            stat.setFloat(7, argPayment.getCourierCharge());
            stat.setFloat(8, argPayment.getLessPayment());
            stat.setInt(9, argPayment.getOfficeID());

            con.setAutoCommit(false);
            if (stat.executeUpdate() > 0) {
                int subid = argPayment.getSubid();
                Purchase purchase = DBPurchase.retrive(subid, argPayment.getOfficeID(), con);
                int partyid = purchase.getParty().getPartyID();
                Account partyAccount = DBAccount.retrieveAccountByIDandType(partyid, "PARTY", mastercon);
                Account officeAccount = DBAccount.retrieveAccountByIDandType(argPayment.getOfficeID(), "OFFICE", mastercon);
                AccountTrack partyAccountTrack = new AccountTrack();
                partyAccountTrack.setId(partyAccount.getId());
                partyAccountTrack.setCredit(true);
                partyAccountTrack.setDate(argPayment.getEntryDate());
                partyAccountTrack.setAmount(argPayment.getAmount());
                partyAccountTrack.setDescription("Payment for payment id-" + argPayment.getId());
                if (DBAccountTrack.insert(partyAccountTrack)) {
                    AccountTrack officeAccountTrack = new AccountTrack();
                    officeAccountTrack.setId(officeAccount.getId());
                    officeAccountTrack.setCredit(false);
                    officeAccountTrack.setDate(argPayment.getEntryDate());
                    officeAccountTrack.setAmount(argPayment.getAmount());
                    officeAccountTrack.setDescription("Payment for payment id-" + argPayment.getId());

                    if (DBAccountTrack.insert(officeAccountTrack)) {
                        AccountTrack pAccountTrack = new AccountTrack();
                        pAccountTrack.setId(partyAccount.getId());
                        pAccountTrack.setCredit(false);
                        pAccountTrack.setDate(argPayment.getEntryDate());
                        float amount = argPayment.getLessPayment() + argPayment.getCourierCharge();
                        pAccountTrack.setAmount(amount);
                        pAccountTrack.setDescription("Less Payment and Courier Charge-" + argPayment.getId());

                        if (DBAccountTrack.insert(pAccountTrack)) {
                            AccountTrack oAccountTrack = new AccountTrack();
                            oAccountTrack.setId(officeAccount.getId());
                            oAccountTrack.setCredit(true);
                            oAccountTrack.setDate(argPayment.getEntryDate());
                            float officeAmount = argPayment.getLessPayment() + argPayment.getCourierCharge();
                            oAccountTrack.setAmount(amount);
                            oAccountTrack.setDescription("Less Payment and Courier Charge-" + argPayment.getId());

                            result = DBAccountTrack.insert(oAccountTrack);
                            con.commit();                            
                        }

                    }
                }
            }

        } catch (Exception …
stephen84s commented: 194 Posts and still no code tags -1
Ezzaral commented: This code is absolutely useless as a response to the question. -3
bugmenot 25 Posting Whiz in Training

lol sorry just have seen very similar if not exactly the same problem before!! Look through this forum and you should find the answer somewhere.

(while read line; do if [ $(echo $line | wc -c) -eq 1 ] ; then echo; else echo -n $line,; fi ; done<address.txt ) |sort >address.csv

bugmenot 25 Posting Whiz in Training

I am using cin to input a single character from keyboard.The problem is that if 2 or more characters are entered then the rest of the characters are being considered as input for the further cin statements.Is there any way in which I can clear the inpu buffer memory after every cin statement so that rest of the characters are removed from the buffer.

Eg.

char ch;
cout<<"\nInput a character:";
cin>>ch;
cout<<"\nInput another character:";
cin>>ch;

In the above example if two characters are entered at the first instance then the second character is considered as the input for the second cin statement.
I have tried using flush(), eof() and ignore() to no effect.
How to avoid this?Any help is highly appreciated.

bugmenot 25 Posting Whiz in Training

If I initialize graphics in my program and then use cout the font appears bigger than normal and the cursor doesn't blink on the screen as it does when the graphics are not initialized.Is there any way I can use graphics as well as cout in my program?If yes how to do that.

bugmenot 25 Posting Whiz in Training

Gave Reps to you!!!

bugmenot 25 Posting Whiz in Training

Hey Thanks! That seems to have done the trick.
I appreciate that!
If anything else comes up, I'll report back. Not sure how that ever even got there, but it seems to be running.
Time to update all my software and such.

bugmenot 25 Posting Whiz in Training

Okay, this is what I got after deleting some garbage. :(
I'll reboot and see what happens.


Malwarebytes' Anti-Malware 1.29
Database version: 1290
Windows 5.1.2600 Service Pack 3

11/4/2008 8:11:38 PM
mbam-log-2008-11-04 (20-11-38).txt

Scan type: Full Scan (C:\|)
Objects scanned: 153010
Time elapsed: 1 hour(s), 10 minute(s), 3 second(s)

Memory Processes Infected: 0
Memory Modules Infected: 0
Registry Keys Infected: 2
Registry Values Infected: 0
Registry Data Items Infected: 0
Folders Infected: 0
Files Infected: 7

Memory Processes Infected:
(No malicious items detected)

Memory Modules Infected:
(No malicious items detected)

Registry Keys Infected:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\tdssdata (Trojan.Agent) -> Quarantined and deleted successfully.
HKEY_LOCAL_MACHINE\SOFTWARE\tdss (Trojan.Agent) -> Quarantined and deleted successfully.

Registry Values Infected:
(No malicious items detected)

Registry Data Items Infected:
(No malicious items detected)

Folders Infected:
(No malicious items detected)

Files Infected:
C:\WINDOWS\system32\TDSScfub.dll (Rootkit.Agent) -> Delete on reboot.
C:\WINDOWS\system32\TDSSfpmp.dll (Rootkit.Agent) -> Delete on reboot.
C:\WINDOWS\system32\TDSSnrsr.dll (Rootkit.Agent) -> Delete on reboot.
C:\WINDOWS\system32\TDSSofxh.dll (Rootkit.Agent) -> Delete on reboot.
C:\WINDOWS\system32\TDSSriqp.dll (Rootkit.Agent) -> Delete on reboot.
C:\WINDOWS\system32\TDSStkdv.log (Trojan.TDSS) -> Delete on reboot.
C:\WINDOWS\system32\drivers\TDSSmhxt.sys (Rootkit.Agent) -> Delete on reboot.

bugmenot 25 Posting Whiz in Training

I've tried Firefox with the exact same results.
I've tried that cleaner too.

The websites and can't seem to get to include...
windows update... in fact, anything with windows.
windows update won't work anymore.
I can't get to my virus update either.
Won't update many of my malware stuff anymore to think of it.
Won't go to any of the virus scanners online.
Can't get to dslreports or other sites, of course specifically ones that can give me help.

I can get to just about anything else. Oh, and a laptop that's in the house can visit all of these.

For awhile, I could breifly see a message at the bottom of my browser on the status bar, a message something like... c://(blah, blah)...dns (blah) xpsp3 (blah)

Thanks for any suggestions. Seems to be working otherwise, but surfing is a little slower.

bugmenot 25 Posting Whiz in Training

My IE7 won't load some pages. It was a very recent glitch. The only hallmark to this new problem was playing a game and exiting to a dll error.

Now when I go to some web pages, it says IE cannot display this page. I've done the scans that the "read me" page said. I'm new at this and am hoping to get some help.

It's sporadic. I can get to this page only through google cache. I can still maneuvre through all web pages on my handheld on my wireless, but would rather use my pc again.

Any help would be greatly appreciated.
Thanks!

Logfile of Trend Micro HijackThis v2.0.2
Scan saved at 8:21:42 PM, on 11/3/2008
Platform: Windows XP SP3 (WinNT 5.01.2600)
MSIE: Internet Explorer v7.00 (7.00.6000.16735)
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\svchost.exe
C:\WINDOWS\System32\svchost.exe
C:\WINDOWS\system32\ZoneLabs\vsmon.exe
C:\WINDOWS\system32\spoolsv.exe
C:\WINDOWS\Explorer.EXE
C:\WINDOWS\System32\spool\DRIVERS\W32X86\3\E_FATI9HA.EXE
C:\Program Files\Print Server\PTP\PSDiagnostic.exe
C:\Program Files\Creative\SBAudigy\Surround Mixer\CTSysVol.exe
C:\Program Files\Analog Devices\Core\smax4pnp.exe
C:\Program Files\Zone Labs\ZoneAlarm\zlclient.exe
C:\Program Files\Windows Live\Messenger\MsnMsgr.Exe
C:\PROGRA~1\ZONELA~1\ZONEAL~1\MAILFR~1\mantispm.exe
C:\PROGRAM FILES\A-SQUARED FREE\a2service.exe
C:\WINDOWS\system32\E_S00RP1.EXE
C:\Program Files\Common Files\LightScribe\LSSrvc.exe
C:\Program Files\NVIDIA Corporation\NetworkAccessManager\bin\nSvcLog.exe
C:\WINDOWS\system32\nvsvc32.exe
C:\WINDOWS\system32\PnkBstrA.exe
C:\WINDOWS\system32\svchost.exe
C:\Program Files\NVIDIA Corporation\NetworkAccessManager\bin\nSvcIp.exe
C:\WINDOWS\system32\wscntfy.exe
C:\Program Files\Windows Live\Messenger\usnsvc.exe
C:\WINDOWS\System32\svchost.exe
C:\Program Files\Internet Explorer\iexplore.exe
C:\Program Files\Internet Explorer\iexplore.exe
C:\Program Files\Trend Micro\HijackThis\HijackThis.exe

R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKCU\Software\Microsoft\Internet Explorer\Main,Start Page = http://www.yahoo.com/

bugmenot 25 Posting Whiz in Training

well, i tried almost ALL the methods i could find on any forum but nothing worked.
finally, i came across "Microsoft Autoplay Repair Wizard" which automatically changes registry settings, that gpedit stuff and whatever to make Autoplay work again.
so, if the Autoplay feature has suddenly stopped working for your cd/dvd drives, pen drives etc., look no further than this free tool. believe me, nothing worked but this tool.
so here are the download links:-

LINK 1 (requires microsoft genuine validation process)
LINK 2

:icon_cheesygrin:

bugmenot 25 Posting Whiz in Training

BUMP.

bugmenot 25 Posting Whiz in Training

No, this will apparantly not work. From what I see, the subprocess module lets you, say, send a ping command to Google.com via CMD.EXE. (I'm working with WIN32XP)

This is not what I intend to do. I intend to make an applet for the G15 keyboard. (Long story short: A backlit gaming keyboard with an built- in LCD- screen, used for displaying info from games, news and media players)

I want to make an applet wich you can configure for different programs, effectivly giving the LCD screen support for almost any game without a decent hack- protection, and loads of other programs.

The code I need is for scanning an user- defined program at a certain adress, (which can be obtained with CHEAT ENGINE, WWW.CHEATENGINE.ORG) returning the value of a defined variable within that specified program. The rest I can manage myself.

I would like to thank you for helping me this far, you're a good teacher.

bugmenot 25 Posting Whiz in Training

Example please? : /

From what I understood, subprocess and POpen only lets you send an argument to a program, wich you can't do with the project I'm attempting.

bugmenot 25 Posting Whiz in Training

By scanning a program, I mean that it should find a value stored at a certain adress in the RAM, if I've gotten this right. A common program that does this is the freeware "Cheat Engine" (http://www.cheatengine.org/)

This function can be used for many things; Debugging, Writing plugins, Logging etc.

I hope this made the problem more clear.

bugmenot 25 Posting Whiz in Training

I have tried several things, but I just can't get this to work. What I need is a snippet which scans a program for value X, and then simply assigns a varible within the python script to the X value. I'm new to Python, but not to programming. Please be patient with me. Thanks in advance!

bugmenot 25 Posting Whiz in Training

A few more things.

* In expression, the case where a single term matches will fail because, after failing to match a '+' or '-', the code just falls through to returning false. Similar thing with term just matching one perimeter.

bool expression()
{
    if ( term() )
    {
        if (c[place] == '+' || c[place] == '-')
        {
            place++;
            if ( expression() )
            {
                return true;
            }
            else
            {
                place--;
                return false;
            }
        }
        else // Added so a single term can match
        {
            return true;
        }
    }
    return false;
}

* You haven't quite translated the grammar into the correct function calls. In expression, you're matching two terms but it should be a term and another expression. Same with term. It should match a perimeter and another term.

* You don't need to check for a semi-colon at the end.

As you parse, you're advancing the 'place' variable so, when parsing finishes, it will be one greater than the index of the furthest accepted character. If all input has been accepted, that value will be the same as the length of the string because, the length starts counting at 1 while the index starts counting at 0.

Your input is being read as a 'string' object so, you can get its length by calling the 'length' method. int length = c.length(); * Only the first two strings of your test data are in the language your grammar describes. This isn't a problem, I'm just …

bugmenot 25 Posting Whiz in Training

I can point out a few things.

* You are relying on the default return values of your boolean functions being false. In the case of 'term', if the first 'perimeter' call returns false, you might still return a positive value. Same deal with 'expression'. If possible, configure your compiler to give you all the warnings it can.

* When a production fails with 'return false;', you need to make sure it rewinds any input it consumed. If an operator character is matched but, the right operand isn't, you'll need to restore 'place' to the value it had at the start of the function.

* After you've finished parsing, you need to check that all input has been consumed. Given that, you'll need to get the length of your input string so you can compare that with 'place'.

* 'perimeter' doesn't consume the parentheses when it sees them.

* I would recommend developing a layout style that uses more whitespace and is consistent with curly braces. For example,

bool term()
{
    if ( perimeter() )
    {
        if ( c[place] == '*' || c[place] == '/' )
        {
            place++;

            if ( perimeter() )
            {
                return true;
            }
            else
            {
                return false;
            }

            // NOTE: Because the code is spaced nicely, we see
            // that the following statement can never be reached.
            return true;
        }
    }
}

bool perimeter()
{
    if ( identifier() )
    {
        return true;
    }

    if ( c[place] == '(')
    {
        if ( …
bugmenot 25 Posting Whiz in Training

Hi everyone,

I'm trying to write a stored procedure select statement which is a little beyond my experience level.

I have a table in the DB called addresses which contains the following fields:

  • address, VARCHAR
  • count, INT
  • (a few more fields)

My stored procedure will take in a unique address in the following format:

  • ####.####.####.####, VARCHAR

What I need to do is compare the passed in value against the [addresses].[address] values and return the matching row. The problem is I also need to check for for increments on the final four characters of the passed in address, upto the [addresses].[count].

Here is an example, the address table contains:

  • address = 100.100.2225.100
  • count = 5
  • (a few more fields)

The stored procedure value passed in is 100.100.2225.103. In this case thie row should be returned as the passed in address 100.100.2225.103 <= 100.100.2225.(100+5)

I hope this makes sense to someone and is simple to do. This isn't for any specific project or work and is purely for my own personal geekery. My only other option is to do this in code.

Thanks in advance for any pointers, code, links or abuse.

bugmenot 25 Posting Whiz in Training

In c++ i want to know how to output the result on dos screen page wise,i.e. when i am displaying something if the page is filled then a prompt should come like "Press any key to continue.."
More precisely i want an equivalent of the '/p' command which is used in DOS.

bugmenot 25 Posting Whiz in Training

You are using a compiler with the world's best debugger. You don't need debug messages. Just compile your program for debug and use the debugger to set breakpoints, see the value of variables and program execution.

This isn’t entirely true. While the debugger is great for most apps, there are times when it is not feasible, if not outright impossible to use the debugger.

It’s called Heisenberg debugging, Heisenbugging, debugging Heisenbugs, etc. after the Heisenberg Uncertainty Principal. There are situations where the act of debugging itself affects the behavior being debugged. In those situations, the debugger (breakpoints) don’t work—neither does MessageBox usually—and so printing to the debug console (or other log) is necessary.

For example, multi-threaded apps often don’t lend themselves well to the debugger (which is going to be a problem since software dev is moving more and more towards multi-threading since the recent proliferation of multi-cores and multi-threads APIs). Also, debugging things like ShowWindow behavior would be a huge pain in the butt if not impossible with the debugger since every time the program breaks, the app gets WM_SHOWWINDOW messages to hide/show. Sometimes, debugging things like drivers or kernel mode functions are difficult with the debugger. Sometimes even when it’s possible to use the debugger, it’s just faster and easier to let the program run and then analyze the debug output, especially for big loops and such which would require setting conditions and such if using breakpoints.

bugmenot 25 Posting Whiz in Training

My suspicion is that, in the below code, the continue statements effectively do nothing and put my code right before the return false statements.

No. "continue" skips the remaining iteration of the loop (in this case, the for loop). So it goes directly to the "n++" step, and then starts the next iteration of the loop, testing the condition and executing the code. So it is not what you want (at least for the first big if block, "continue" would skip the second big if block entirely).

well...how ridiculously simple compared to my solution. Take a look at what I did.

bool Verify(int row, int column)
{
     bool statusR = true;
     bool statusC = true;
     for (int n=0; n <= 8; n++)
     {
          if  (Board [row][column] == Board [n][column])
          {
               statusR = false;
               if (n == row)
               {
                    statusR = true;
               }
          }
          if (Board [row][column] == Board [row][n]) 
          {
               statusC = false;
               if (n == column)
               {
                    statusC = true;
               }
          }
          if (statusR == false || statusC == false)
          {
          return false;
          }
     }
     return true;
}

Thank you so much for the help guys.

This code does not do the same thing as what you said you wanted to do. If statusC is false after the first big if block, it does not immediately return, and instead goes through the second big if block, which could potentially set it true.

bugmenot 25 Posting Whiz in Training

ahhh I see.

Now if I wanted to call pedal from cycle, but within bicycle, I think I can do it by just putting cycle::pedal(); in bicycle's member function pedal. Is there another way to do it? (I did this in a door class with a door open member function, but I'm told it can be done another way)

why not just call

pedal()

what is the difference?

if pedal is a virtual function in "cycle", then both will accomplish the same thing

but I think you can also use the this modifier to point to the base object--

this->pedal()

this is identical to just

pedal()