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

SEARCH KEYWORD -- Copy



  Penrose Tiling in Obfuscated Python

Here’s a Python script which renders some Penrose tiling. Yes, this is valid Python code: _ =\ """if! 1:"e,V=100 0,(0j-1)**-.2; v,S=.5/ V.real, [(0,0,4 *e,4*e* V)];w=1 -v"def! E(T,A, B,C):P ,Q,R=B*w+ A*v,B*w+C ...

   Python,Disorder,Code,Writing,Style     2011-09-14 11:57:34

  10 Tips To Make Your C Program Effective

The beauty of any code lies not only in finding the solution to a given problem but is in its simplicity, effectiveness, compactness and efficiency( memory ). Designing the code is harder than actually implementing it. Hence every programmer should keep a couple of basic things in mind while programming in C. Here we introduce you to such 10 ways of standardizing your C code. 1. Avoid unwarranted function calls Consider the following two functions: view source print? 1 void str_print( c...

   C,Tips,Efficient,Speed increment,Recursi     2011-08-05 01:34:16

  Useful Bash Scripts

Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It's possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts. Use set -u ...

   Linux,Shell,Bash,Command,Robust     2012-01-15 10:28:00

  Writing robust shellling scripts

Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It's possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts. Use set -u ...

   Robust,Shell script,Set,Commands     2012-03-19 13:25:26

  How to improve website rank in search engine?

Want to let people know your website? Want to get much web traffic ? Then you need to make sure that people can find your website. Currently, many people are using search engine to find what they are interested in. So besides good content, you need to spend some time on getting your website shown at the first few pages of the search engine. Here are 10 suggestions to improve your website rank in search engine.1. Webpage response speedSimilar to human beings, search engine hates waiting. Webpage ...

   Website rank,Suggestions,SEO     2012-07-23 13:28:27

  Resolve git issue git@github.com: Permission denied (publickey)

Sometimes when clone a remote repository from github.com, you may see below error. D:\Project\Playground\GitBisect>git clone git@github.com:bradleyboy/bisectercise.git Cloning into 'bisectercise'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. The issue occurs when there is no key on your machine which is associated with your github account. To fix the issue, please ...

   GIT,GITHUB,PERMISSION DENIED,PUBLIC KEY     2019-07-12 10:10:49

  Shortcut keys in Sublime Text 3(Animated demo)

Sublime Text 3 is a light weight code editor which supports lots of languages. It has lots of shortcuts and plugins easing work of programmers. In this post, we will introduce some shortcuts supported in Sublime Text 3 and show how powerful they are. 1. Select sibling matching(equal) word (Ctrl + D) Put the cursor on one word, press Ctrl + D to select the word, then press Ctrl and following by pressing D, it will select next matching word. The number of Ds pressed will mean number of matching wo...

   TIPS,SHORTCUT KEY,SUBLIME TEXT     2016-04-28 02:41:28

  Use Java ThreadLocal with caution

According to Oracle documentation, ThreadLocal is a class provides thread-local variables. These variables differ from their normal counterparts in that each thread that accesses one (via its get or set method) has its own, independently initialized copy of the variable. ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread. In short, ThreadLocal variables are variables belong to a thread, not a class or an instance of a class. One common...

   JAVA,MEMORY LEAK, THREADLOCAL     2015-11-03 07:31:57

  How To Optimize Your Site With HTTP Caching

I’ve been on a web tweaking kick lately: how to speed up your javascript, gzip files with your server, and now how to set up caching. But the reason is simple: site performance is a feature. For web sites, speed may be feature #1. Users hate waiting, we get frustrated by buffering videos and pages that pop together as images slowly load. It’s a jarring (aka bad) user experience. Time invested in site optimization is well worth it, so let’s dive in. What is Caching? ...

   Website performance,Speed,HTTP Cache,Hash code     2011-12-10 06:11:33

  Source code for sharing webpage to facebook

Copy and paste the following code blocks into your site and replace '<url>' with the link you want to Share.Text link:<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" onclick="return fbs_click()" target="_blank...

   Source code,Facebook,Share,Webpage     2011-07-23 06:52:07