Jump to content
xisto Community

faulty.lee

Members
  • Content Count

    496
  • Joined

  • Last visited

Posts posted by faulty.lee


  1. Yes the heatsink was dusty and caused the 80 °C temperature. But, there's something still fishy about the 104 °C being reported when the new HDD was connected. Like I mentioned before, it didn't occur once I exchanged the IDE & Power cables. I still think that if I were to touch the cables again, the temperature would go beyond 100 °C.

    How long does it take the CPU temperature to reach 104°C? If it's immediate it could have been faulty reading. I'm seen similar cases when a wrongly configured temperature reading software could get wrong reading, and sometime even negative.
    Cases like this could have been cause by anything. Anyway, if it's 104°C inside, I bet you can feel the "warmth" nearby. Imagine standing near a pot of boiling water.

  2. Why not listen for Form.Move event, since you would only want to snap the form when it's moving right?

    Then in the event handler just compare Form.Bound against Screen.PrimaryScreen.Bounds. Do take into consideration of pc with multiple display.

    Btw, if you just need this feature for your own use, take a look at Pitaschio. It does what you're looking for to all windows and form, plus added some more great features, good for daily use.


  3. Putting this as the first line of your php file will fix the problem. Or you can configure your php.ini as per php's manual (see below)

    date_default_timezone_set('Asia/Kuala_Lumpur');

    You can set to your time zone.

    If you refer to php's manual http://my.php.net/date_default_timezone_set
    it says:

    Note: Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_STRICT message if using the system settings or the TZ environment variable.
    Instead of using this function to set the default timezone in your script, you can also use the INI setting date.timezone to set the default timezone.


    So by configuring your php.ini, you can also solve this problem.

  4. Sometimes in a table especially if i do alot of things in it i start seeing overhead then a size near it? what is overhead? and is it essential to optimize the table to fix it? I know its just a press of a button but i'd like to know what happens when i optimize a table.
    Also when you make a new table you can limit the size of VARCHAR to a number, that number would be the number characters allowed in that column per entry. I'd like to know how the limit works for texts, is it in KB? or number of characters? Cuz i made a messaging system. And i remember reading somewhere here that each text takes 65kb, thats too much for a simple message in a game. 500 MB is a lot of space, but that doesnt mean it has to be wasted =)

    If you set TEXT as your data type for that column, it allows you to store up to 65535 character, which is 64KBytes (1K = 1024), if everything is in ASCII. If you're storing unicode or UTFX(8,16,32), it could be more than that, up to 3 bytes per character. Where as VARCHAR allows a maximum of 255 characters, or less if you specified the limit. If you try to update or insert text longer that the limit you specified, then it will return an error.

    These are maximum length of text you can store, but it doesn't mean it will take up that much storage if you use only partially. As mentioned in MySQL's documentation, VARCHAR as an overhead of 1 byte, where as TEXT has 2 bytes. So if you store 10 ASCII character in TEXT, it will take up 12 bytes altogether, not 64KB.

  5. Like jjkeenan said, you can try VNC, i would suggest tightVNC, it's a variant of the original VNC, it's free and it support file transfer. You could also login from a browser like firefox or IE. http://www.tightvnc.com/download.html

    If you can afford to pay a bit more, try RemotelyAnyway http://www.remotelyanywhere.com/template.asp?page=wehp

    It gives you a lot more features which you might or might not needed. I use this for my computer when I go outstation. It also support only web interface, meaning you don't have to carry anything with you. Just a browser or any cyber cafe will do.


  6. Yes, you need to use session to save and use that variable across all your pages.

    Call this at the start of any page that you need access session variable

    session_start();

    Then, you can set the variable like this, in your checklogin.php, so that when you redirect to your login_success.php, you can retrieve the Username.
    $_SESSION['action']  = 'a';	$_SESSION['Username']  = $_POST['username'];
    Well, you can't actually get your username from $_POST, even if you can, it's not recommended. Try setting that with the result from your database. Normally I would just store UsernameID, because most of the other table I had are link to the User table via UsernameID. That way, I can access any table relating to that user by just referring to the ID. Better still if you store both, one for display and one for internal use.

    To retrieve the session variable, use it like any global variable
    $username = $_SESSION['Username'];	echo $_SESSION['Username'];

    One last thing, do the following when you "Logout" the user
    //Set $_SESSION to a new array(), overwriting the old one	$_SESSION = array();	//Make the cookie expired if the cookie is used when you create the session	if (isset($_COOKIE[session_name()])) {		//Set the time of the cookie to the past, so it will expired immediately. Can't remember why I use 42000, but It was recommended by a site		setcookie(session_name(), '', time()-42000, '/');	}	//Finally destry the who session information	session_destroy();
    These are done improve security of your site. Of cause you also need to touch up other section of your site in order to be fully secure.

  7. Hey guys,
    I'm just wondering if there's a CharAt function like there is in Java?

    I know in Java, you just do this:

    intArray[0][intCount] = strSIN.charAt(intCount) - '0';

    Thanks,
    xboxrulz
    I'm not sure what type did you declare strSIN as. As far as I know, there's no base string type available in C++ (well, I've not touch C++ for a few years now, maybe something new popup). String normally are represented as char[] or *char or CString. There are other representation, but are less popular. For char[] and *char, it should be easy as it's an array, "CharAt" would simply means char[at] (I forgotten how to do it with *char, but you can lookup in google).

    As for CString, you need to refer to your class reference, since it could be from ATL, MFC or other lib, they all have different implementation.

    EDIT: PS: I'm refering to windows here. If you're talking about linux, then CString might not applies

  8. Try running Windows XP 64-bit and/or Vista x64 to check if it's an out of memory issue or something related to that since as faulty.lee stated it could be because he's running 32-bit, thus not getting to use the whole 4GB. Also, remember the addressing issue gets worse especially when you have dedicated memory on your graphics card. For example if it has 1GB dedicated memory on your card, you have to further subtract 1GB from your 3.2 GB of addressable space. This is because your chipset might be 32-bit as well or the fact that you're running in 32-bit mode.

    The 32bit addressing issue wasn't as bad as your might have thought. Dedicated graphic card is not sharing it's memory with the system, so you can still get 3.2GB out of it. Unless if you're using built-in graphic card, which is not the case here. The 32Bit addressing issue only applies to ram, as the OS need to put program onto the memory, it need to access it from any location at any one time. Thus, with only 32Bit , it can only access within the boundary of 3.2GB. Anyway, that limitation only limits on the "accessibility" of the ram, not to cause a BSOD, unless the motherboard's chipset wasn't implemented properly.

  9. Actually it's not the driver issue. It's more of a physical contact issue that is causing the problem. A normal USB socket and plug has a lifespan of about 600 to 1000 mating cycle. After which, it's up to you luck whether it continue to work or not. USB sense it's device via the resistance that present at the end of the device. Different value will indicate different speed capability. So, when the contact is not well done, the resistance can't be sense properly, or it fall out of expected values, that when you get the "unknown device" popup.Since you're using a cable to extent your usb port from the back, which is a wise choice, as replacing an extension is easier and cheaper than replacing those on your motherboard, in which case you might have to change the whole thing. So, what you should do now is to try your devices on those different port at the back of your pc. See if the other 5 works. If it does, you need to change your extension cable. When you get a new one, try look for those with thicker wire, as it can carry more current, which will give you less headache.If all the other port behind is not working well also, then you might need to test your device on another machine. Since the same lifespan applies to the plug on your device as the socket on your motherboard. If it fail indefinitely, then it's time to change your mobile phone usb cable or your mp3 usb cable. As for your thumbdrive (usb key), you can try a trick, which I did to mine, by pressing the metal casing of the plug itself. Make sure you know what you're doing, and I won't be responsible for any damages that might happen to your thumbdrive. If possible, try to backup first. So, after pressing the metal casing, you should be getting a tighter fit when you plug in your thumbdrive. That should extend it's lifespan for another 100 mating maybe.This is one problem commonly people don't notice. With lifespan of 1000 mating cycle, if you plug and unplug your usb 5 times a day, could be more if you're a busy person and not working within a networked environment. That will leave you 200 days of usage. Working 5 days a week, so you can expect your thumbdrive to last about a year or so. By then, you could be tempted with buying a new one with bigger capacity and at the same price or even cheaper than the one you bought. The 5 years warranty will never be useful, unless you're the unlucky person to get one with defect that dies within a year. Worn out plug can't entitle you to warranty claim as it doesn't cover normal daily wear and tear.


  10. Hello,
    My friend has bought a new computer, a 32 bit quad core with ~4GB of RAM and a gForce 9600gt or maybe gs? But as I remember it's a GT and I think it has problems or maybe the drivers or something else, so thought to as Xisto community for some experience, tried searching the Internet, but got a bit tired..

    It's working great, as he does not like Vista, he has installed XP and drivers from CDs he got in the company he bought it and when he started to play new games after about ~10-30 minutes the screen flickers and some errors are outputted and you can see the BSOD (Blue Screen OF Death? Doom? as I know) and thats all so I suggested him to reinstall his drivers with the new ones from nVidia and asRock Internet websites, because the ones on the CD's could be outdated or buggy.. He did that, he even reinstalled XP, but with no luck, the problems still exists, through the nVidia panel he was turning off different options with the click box, like vertical sync and different stuff, he tried to do things in BIOS and other stuff he found on the net, but again with no luck..

    And when I thought, maybe it's because when you play a new game, the graphics card is over heating? I touched it and it was quite hot, about 56 Celsius, but because the computer has a guarantee, we couldn't open the desktop box, I started to think that the cooler isn't spinning or something, problems with the hardware and people who badly put the computer into that condition? So could it be because of the over heating? He downloaded some program which can show temperatures for different devices and after loading windows, when playing a game for 10-30 minutes he saw that the graphics card temperature is about 78 Celsius.. and I think it's really to much for a desktop, especially for a hot day, the question is does he need to call the guarantee that they could fix it or make the cooler spin faster or spin always? Any suggestions? anyone had these kind of problems? with new computers.. :?

    You need to figured out what causes the BSOD first. Did you get to see the message on the screen when BSOD? If not, you can goto
    Control Panel\System -> Advanced (tab) -> Startup and Recovery -> Setting -> uncheck "Automatically restart"

    That way when BSOD happen, it will stay put, then you get to see a message. Look for the text in the middle, something like "IRQL_NOT_EQUAL". That can help you narrow down your problem. BSOD can happen with anything, bad sector, driver, corrupted memory or bad memory module. At least narrow the problem, then you can carry out proper troubleshooting steps instead of trying blindly.

    As for the gpu temperature, 56C idle is normal for 8x00, i guess it should be the same with 9x00. 78C under load is rather high, but shouldn't have cause the BSOD as well, cause as far as I know, the thermal protection only kicks in at 90C. The limit is around 110C. Although I wouldn't like my gpu to go anywhere near 70C, but that's the compromise for getting cheaper hardware. If you can affort more expensive video card, then you can get those with bigger fan. Well, I guess it's not that possible in your case as the pc came as a unit.

    There's another possibility that you might want to look into. 4GB of ram, will only have 3.2GB available in XP, as that's the memory address space limit of XP (32bit).

    Unless you find out about the actual cause of problem, don't go back to the shop yet. 2 things might happen if you do, 1, they don't even bother, or they would tell you that the hardware is mend to run on vista only. 2, they will try to sell you upgrades, since you said that the temperature was high, and if it doesn't solve you problem, it's you to be blame, because you suspect it at first. If you really want to bring back to the shop, tell them your problem, which is BSOD, don't tell them what you suspect might be wrong. Well, unless you knew the shopkeeper well and they are honest people to start with.

  11. and i just bought some ram for it and it doesnt work...

    What give you an indication that the ram doesn't work?

    which Ram is the best fit for my motherboard??

    I don't think there actually any best fit per se.
    If you want to be really sure, and if you can bring alone your casing to the shop, bring it there to test the ram you're getting, then you can save some trouble. Don't forget that, if your pc can't boot at all, it could have been the cpu, motherboard or powersupply problem.

    PC hardware are so common nowadays that most things would fit nicely. There do exist some incompatibility issues, but if you stick with mainstream products, you should be quite safe. ASUS and Corsair is quite a safe combination. If there do exist hardware incompatibility, you can expect to find bios update or driver patches for it's fix.

    But in my personal opinion, VIA chipset is not a good choice. ASUS P5VDC-X is using VIA chipset. I used to support VIA when I can't afford for expensive Intel chipset based motherboard few years back. That's when nVidia is still new. Now you can get one decently priced motherboard with either Intel, nVidia or AMD chipset. I bet you can find other chipset based ASUS board around the same price as P5VDC-X. If price is the concern, then Gigabyte is the alternative, as it's been bought over by ASUS not long ago to target mid end market.

  12. My Graphics card is 8600 GT and it seems to have the S-Video socket. Is the S-Video cable provided along with the card, the same as the S-Video cable for PS2? The installation disc that came along with the card has an option for Tv Capture, although I never gave it a try because we have RF cables over here. Also, S-Video is supposed to be better than both RF and AV, right?

    I'm sorry about a mistake in my last reply. Guess I was a bit sleepy when I was replying that. Actually you need a VIVO (video in video out) card. The S-video socket on most card are for tv out. The S-Video cable that you have must be for connecting your pc to a tv. Sorry again about the mis-information.
    Well, you can try install/enable the tv capture, if it can start properly, then you're in good luck. Generally VIVO enabled graphics card comes with the connector block, much like a small box with short cable that connect to the S-Video like socket on your card. On the box itself, it has multiple input and output socket for different type of connector, including composite (RCA) and S-Video.

    Sorry again.

  13. A friend of mine is going to bring his PS2 at my place. The trouble is that I don't have a TV in my apartment. Is it possible to connect the PS2 output to the monitor via an nVidia Graphics card?

    See if you nVidia graphic card as a video capture input. Most newer model since 6x00 series has one. You'll need to have the s-video cable for the PS2. See if you can plug straight into the graphic card. S-Video's connector and socket should look like this(https://en.wikipedia.org/wiki/S-Video). Read the section about "7 pin mini-DIN" see if the socket at your graphic matches the description. Be gentle when you try to plug it in. Try not to force it. It would be easier if your graphic card also comes with the video input block which has composite, s-video on it. Those normally available on mid-end model and above with VIVO capability. I did the same before, connecting PS2 through video capture to play game on my computer, but image quality wasn't so good plus there's a slight delay. If you're going to play fast action game, you might have to rethink your strategy.

     

    If you'e looking forward to connect the PS2 directly to your monitor, then it's not possible, unless you have composite to vga converter. It's a expensive device to have.


  14. Is it possible that your web hosting provider is just so slow?
    Pinging your website shows Request Timed Out

    Pinging your name servers results Destination port unreachable and when it is working, the return time averages 1843ms.

    Your web hosting provider should give your money back... that's horrible. It took me near 1 minute just to open your site. It's ridiculous.

    Actually most (from my knowledge) china hosting are slow when access from outside of the country. But when access within, it's usually not a problem.

  15. As what Jeigh and Feelay had suggested. I would like to add that you can also have ajax on your main page that calls a php page on your server side as to update the "last active" time. This is in case you have an active page that display some stats which also use ajax to refresh it's content. That the user might not change page at all.I'm using this "last active" to control multiple-login as well. If the user does not log out manually, it has to wait for the timeout before he can login again on another pc. And I have a ajax script that logout the old page once it reaches timeout, for security reason.


  16. Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a1663202_user'@'localhost' (using password: YES) in /home/a1663202/public_html/mysql.php on line 2

    Access denied means your login or password is wrong. Check the database creation page for more information on this. Sometime, they also provide the connection string which you can refer to.

    Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/a1663202/public_html/mysql.php on line 3

    Since you can't connect to the server, you do not have a valid MySQL-Link resource that you can select your database with. You need to get pass line 2 before line 3 will execute properly.

  17. <?php $c = mysql_connect('localhost', 'root', 'p1kap1ka');
    mysql_select_db('lite2', $c);
    $mykey=256573440;
    ?>

    In this code where shall I post my database name (and my database name should it contain my hosting name so before it there should be a165_game For example? or should it just be game?) and where shall I put the user password?


    According to MySQL manual

    mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]] )

    So clearly "root" in your code is the username and "p1kap1ka" is your password.

    As for database name,

    mysql_select_db ( string database_name [, resource link_identifier] )

    So, it would be "lite2".

    When you create your database in cpanel, you should have the database name generated for you. The lasttime I did, it appended my username along with it like you suggested. Anyway, you should check the generated name in cpanel instead of mere guessing.

  18. You need to use ajax to get the job done. Most website nowadays incorporate some form of ajax using javascript. Look up on ajax or XMLHttpRequest in google. That should get you enough sample code to get started. To accomplish the end result, assuming you're using php, you need to send the already inputed username to a specific php page you've made via GET or POST method. GET is easier to do with ajax. In that php page, you just need to look up the username in your existing database and return a token to indicate if it's already existed. You can simply return a 1 or 0 using echo. You don't have to echo any html since you're will reading directly from your html's javascript. The lesser the data you pass around the better response you can get.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.