entroducing.com
  • Home
  • Coding
  • Trading
  • Troubleshooting
    • Operating System
    • Networking
  • Reviews
  • Travel
  • Quick Snap
  • Thoughts
  • Side Hustle
  • Earn Passive Income/Referral
Website sponsored by LingeriesG
@2023 - All Right Reserved. Entroducing. Sponsored by mm3288
Operating System

Solve TF2 ping spikes or onboard sound related issues in Windows 7

by Ben August 7, 2010
written by Ben

omg, I had this ongoing “lag” issue in TF2 whereby my fps would drop dramatically in a fight in TF2 (team fortress 2) game.

Things get more frustrated when I recently upgrade my graphic card from the old 8600GT to the GTX260 and the lag problem does not go away!

Its only recently that I came across this thread in steam forum that suggest a fix to this problem.

if you have a similar setup like mine

  • Intel Core2Duo E6320
  • 4GB RAM
  • Windows 7 Home
  • GTX260
  • Onboard Realtek soundcard
  • MSI P65 Neo2 motherboard

and encounter the following symptoms…

  • lag or shutter after 2-3 seconds when you walk in a straight line in the game
  • framerate drop to 10+ in heavy fight
  • sound shutter in heavy fight
  • ping spikes randomly

for the following steam games…

  • Source Engine Games (Team Fortress 2 (TF2), Left 4 Dead, Counter Strike Source (CS:S, CSS))
  • Heroes of Newerth (HoN)
  • Call of Duty Series (CoD), possibly including Modern Warfare
  • Overlord Series (Overlord, Overlord: Raising Hell, Overlord 2)

perhaps you may want to try the following method and see if the problem would go away.

  1. Open regedit
  2. Go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile
  3. There will be an entry for network performance throttling, default value is 10; set it to FFFFFFFF hex (willl look like 0xFFFFFFFF to the right of the entry
  4. Reboot
August 7, 2010 0 comment
0 FacebookTwitterPinterestEmail
Operating System

Display last few lines for a file in linux shell

by Ben July 15, 2010
written by Ben

To display the default last 10 lines for a file…

tail error_log.txt

To display a specified no of lines for a file…

tail -15 error_log.txt
July 15, 2010 0 comment
0 FacebookTwitterPinterestEmail
Operating System

Premature end of script headers in perl script

by Ben July 3, 2010
written by Ben

‘Premature end of scrip headers’ error message refers to the script being stopped for whatever reason before it actually return any output to the browser.

The first time to check is to ensure the below codes are output first

print "Content-type: text/html\n\n";

And then to debug the error, simply add the below line(preferably after the above code).

use CGI::Carp qw(fatalsToBrowser);
July 3, 2010 0 comment
0 FacebookTwitterPinterestEmail
Quick Snap

Shanghai Expo 2010

by Ben May 18, 2010
written by Ben
May 18, 2010 0 comment
0 FacebookTwitterPinterestEmail
Quick Snap

roofs

by Ben March 7, 2010
written by Ben

March 7, 2010 0 comment
0 FacebookTwitterPinterestEmail
Codingjava

Create new log file with log4j FileAppender when using Quartz Scheduler

by Ben March 2, 2010
written by Ben

Recently came across a problem whereby the quartz scheduler could not recreate a new log4j FileAppender log when the job is call again.

Googled a bit and found out a couple of solutions such as using a custom log4j classes, which create a seperate thread when being called in quartz scheduler.

I find that it is too complex and had try several ways to recreate the log file inside Quartz.

And finally came up with this one line of code.

Before I begin, let’s take a look at my log4j config.
This log4j config will create a simple console system out logger and also a FileAppender logger.
For my case, I want to re-create a new log file whenever this job is run.

log4j.rootLogger=INFO, stdout
log4j.additivity.stdout=false
log4j.additivity.joblog=false
log4j.appender.ROOT.layout.ConversionPattern=[%d] %t %c %-5p - %m%n

#console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p - %m%n

#per job execution log
log4j.logger.com.yourcompany=INFO, joblog
log4j.appender.joblog=org.apache.log4j.FileAppender 
log4j.appender.joblog.layout=org.apache.log4j.PatternLayout
log4j.appender.joblog.File=../jobtemp.log
log4j.appender.joblog.Append=false
log4j.appender.joblog.layout.ConversionPattern=%d %p - %m%n

and here’s the schedule job

public class ScheduleJob implements StatefulJob {
	
	private static Logger logger = Logger.getLogger(ScheduleJob.class);

	public void startJob() throws SchedulerException{
		Scheduler scheduler =
			StdSchedulerFactory.getDefaultScheduler();
		scheduler.start();
	}
    
	public void execute(JobExecutionContext context) 
		throws JobExecutionException {
		
		//reset log4j config for FileAppender
		PropertyConfigurator.configure("../conf/log4j.properties");
		
		RunJobImmediately newJob  = new RunJobImmediately();
		newJob.performJob();
		
	}
	
	public static void main(String args[]){
    	try{
    		ScheduleJob scheduleJob = new ScheduleJob();
    		scheduleJob.startJob();
    		
		}catch(Exception e){
			logger.error(e);
		}    
	}
}

and finally the one line of code to recreate the log file.
Apparently, this line will somehow ‘reload’ the log4j  utitlies, which thus recreate the FileAppender logger to re-create the log file.

PropertyConfigurator.configure("../conf/log4j.properties");

Feel free to let me know if there is any performance issues or it is not working at your side.

March 2, 2010 0 comment
0 FacebookTwitterPinterestEmail
Quick Snap

crossing road

by Ben February 27, 2010
written by Ben

Taken @ phuket

February 27, 2010 0 comment
0 FacebookTwitterPinterestEmail
Operating System

Shutdown/restart windows in remote desktop

by Ben February 20, 2010
written by Ben

I noticed that some of the computer which I remote desktop to, could not be shutdown or restart. Instead of the normal shutdown or logoff, you will see a log off and disconnect button.

I googled out and the easiest way to restart/shutdown such computer via remote desktop is to bring out the user menu and shutdown/restart from there.

To do it, you simply press Ctrl + Alt + End key. Cheers.

February 20, 2010 0 comment
0 FacebookTwitterPinterestEmail
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10

Search

Categories

  • Coding
    • apache
    • cakephp
    • java
    • magento
    • php
    • SQL
    • symfony
    • wordpress
  • Hosting
  • Quick Snap
  • Reviews
  • Side Hustle
  • Thoughts
  • Trading
  • Travel
  • Troubleshooting
    • Networking
    • Operating System

Tags

3.28 angry bird jb angry birds activity park apache beijing cakephp cdata cruise crypto docker elasticsearch element mall fil ftx claim hacked hanshou how-to html data in xml java johor bahru jumper land linux mac magento magento2 malacca malaysia travel move-to-earn passive income php plugin Programming rides side hustle stepn stfil stfil.io struts SyntaxHighlighter theme travel VPS windows 7 wordpress xampp
  • Email

@2023 - All Right Reserved. Entroducing. Sponsored by mm3288