Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  The magic of go:linkname

When writing Go program, there is frequent need on using time.Sleep() function to pause the logic for some time. And if jumping to the definition of this function, can see below definition:// Sleep pauses the current goroutine for at least the duration d.// A negative or zero duration causes Sleep to return immediately.func Sleep(d Duration)I's strange that there is no function body defined here. What happened? The actual definition of the function body is residing at runtime/time.go indeed.// timeSleep puts the current goroutine to sleep for at least ns nanoseconds.//go:linkname tim...

11,332 0       TRICKS GOLANG GO:LINKNAME


  PHP to output string to client terminal

It is a common task to echo messages to the user using PHP. There are lots of ways where the message can be echoed to the client terminal(browser or console window) through PHP. These includes some well know debug methods like var_dump() and var_export() etc. In this post, we will show you some other methods shared by Laruence, one of the core members of PHP development team.1. echoFirst comes with the most common one : echo.$str = "Hello PHP\n";echo $str;2. printThen comes another common one : print.$str = "Hello PHP\n";print $str;3. php://outputAlso we can use file_put_contents() t...

39,786 0       PHP TRICKS DEBUG OUTPUT


  Tricks with Direct Memory Access in Java

Java was initially designed as a safe managed environment. Nevertheless, Java HotSpot VM contains a “backdoor” that provides a number of low-level operations to manipulate memory and threads directly. This backdoor – sun.misc.Unsafe â€“ is widely used by JDK itself in packages like java.nio or java.util.concurrent. It is hard to imagine a Java developer that uses this backdoor in any regular development because this API is extremely dangerous, not portable, and volatile. Nevertheless, Unsafe provides an easy way to look into HotSpot JV...

4,025 0       JAVA DIRECTLY MEMORY ACCESS TRICKS JVM


  Coding tricks of game developers

If you've got any real world programming experience then no doubt at some point you've had to resort to some quick and dirty fix to get a problem solved or a feature implemented while a deadline loomed large. Game developers often experience a horrific "crunch" (also known as a "death march"), which happens in the last few months of a project leading up to the game's release date. Failing to meet the deadline can often mean the project gets cancelled or even worse, you lose your job. So what sort of tricks do they use while they're under the pump, doing 12+ hour per day for weeks on end?Below ...

2,672 0       ADVICE TRICKS GAMEDESIGN PLAN


  The Problem With Client-Side Analytics

Client-side analytics is broken. The numbers produced by it are trivially spoofable by competitors and nefarious characters. Most websites use client-side analytics of one type or another and the only way to get numbers you can trust is to compare numbers from multiple providers and to take an average of the closest two.This post highlights the problem and proposes a partial solution that substantially mitigates the issues with minimal effort. Our proposed solution is simply to include a digital signature in each message sent to the analytics provider. Apart from the server-side generatio...

2,310 0       ASP.NET TRICKS ANALYSIS CLIENT SIDE PROBLEM SPOOF


  Tips, Tricks and Tools You Will Need to Start Using HTML5 Today

IntroductionHTML5 has been a really hot topic in web development. With the support of most modern browsers available (Safari, chrome, firefox, IE10 and mobile devices), even though the specification has not fully completed yet, but many people have already adopted it as the main technology for all the web development projects. Online giant websites such as Google, facebook, twitter and youtube, they are all built in HTML5!For me, the most exciting features of HTML5 are the canvas and the robust form capabilities. Canvas experiment can be seen all over the places (not IE, better with Chrome) bu...

2,607 0       HTML5 WEB DEVELOPMENT TOOLS TRICKS TIPS