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

SEARCH KEYWORD -- Link



  Understanding PHP's internal function definitions

Welcome to the second part of the “PHP’s Source Code For PHP Developers” series. In the previous part ircmaxell explained where you can find the PHP source code and how it is basically structured and also gave a small introduction to C (as that’s the language PHP is written in). If you missed that post, you probably should read it before starting with this one. What we’ll cover in this article is locating the definitions of internal functions in t...

   PHP,internal function,definition,rationale     2012-03-16 10:46:26

  The hidden risk of passing slice as function parameter

In Go's source code or other open source libraries, there are lots of cases where a slice pointer is passed to function instead of slice itself. This brings up a doubt why not passing slice directly as its internal is backed by an array pointer to point to underlying data? For example, in log package, the formatHeader function takes a parameter buf as type *[]byte instead of []byte. func (l *Logger) formatHeader(buf *[]byte, t time.Time, file string, line int) {} Let's understand the r...

   GOLANG,SLICE,SLICE POINTER     2020-12-13 06:11:14

  Create temp file in Bash using mktemp and trap

When working on Linux Bash, sometimes there is need to create temporary file. A common way of creating temp file on Linux is creating some file in /tmp directory. However there is security risk when creating temp file in /tmp directory. This post will show how to securely create temp file in Linux Bash. When creating file in /tmp directory, there are some security risks. This directory can be accessed by any user on the system, any user can write data into this directory as well. The files creat...

   LINUX,MKTEMP,TRAP,TEMP FILE     2019-12-30 23:28:23

  What do programmers really do?

Computers are useless. They can only give you answers. â€“ PicassoMany people (including my mother-in-law) think that computers are becoming so smart that programmers will be no longer needed in the near future. Other people think that programmers are geniuses who constantly solve sophisticated math puzzles in front of their monitors. Even many programmers don’t have clear idea what they do.In this post I want to provide some explanation to uninformed people what programmers rea...

   Programmer,Work,Computer     2011-05-20 11:49:32

  Processing Unicode Data in Python - A Primer to Understand Non-English Data Processing

Introduction: Currently we live in a world where people of diverse cultures/backgrounds use electronic devices to express their ideas, do their daily work that earns them their daily bread, and entertain themselves using content that is created using their own language and so on. Naturally, in order to make all these things happen, any computational instrument, be it a laptop or a desktop computer, or a smartphone, or something else, should be capable enough to serve all of these things in a man...

   PYTHON,UNICODE,UTF-8,NON-ENGLISH DATA,ASCII CODE     2019-04-10 00:55:19

  Handy PHP functions should be in your toolkit

When developing projects, there are always some common work should be accomplished, for example, encrption/decryption, get IP. As a PHP developer, you should have a list of the handy functions in your toolkit so that you can pick up in every project you work on. Here is a summary of some handy PHP functions. 1. PHP encryption/decryption Encryption/decryption can be used when storing user confidential information such as passwords. Below function uses base64 and MD5 to accomplish encryption/decry...

   PHP,function,real IP,SQL injection     2014-12-06 08:46:08

  Create cron job on CentOS

These two days, I am building a website and deploying it on a VPS server which uses CentOS 5. I don't have cPanel or Plesk for my account, so I need to install and configure everything myself including Apache, PHP, MySQL and FTP server, also today's topic cron job. Since my website has a ranking algorithm to calculate the rankings of each link and update the ranking on database and I need to calculate the rankings every 5 minutes, so I think to use cron jobs. Here are what I have done which may ...

   cron job,crontab,CentOS,linux,php,example     2012-06-11 09:23:45

  How to create offline HTML5 web apps in 5 easy steps

Among all cool new features introduced by HTML5, the possibility of caching web pages for offline use is definitely one of my favorites. Today, I’m glad to show you how you can create a page that will be available for offline browsing.Getting startedView DemoDownload files1 – Add HTML5 doctypeThe first thing to do is create a valid HTML5 document. The HTML5 doctype is easier to remember than ones used for xhtml:<!DOCTYPE html> <html> ... Create a file named index...

   Offline store,Steps,demo,Html5,Cache     2011-09-20 13:15:45

  Simple but Interesting Features of VS2010 and C# 4.0

IntroductionVS 2010 and C# 4.0 introduced so many new features. Here in this article, I try to cover some very simple, yet very useful features of both.1. Hiding the Selected Part of CodeMany a times, a situation arises when we want to hide a specified piece of code rather that hiding the entire region. This has become easier in VS 2010. Just select the part of the code that you want to hide and right click selectOutlining -> Hide Selection.Same way like a region code also gets collapsible an...

   VS2010,C#4.0,New feature,Walk through     2011-11-18 08:59:29

  Twitter OAuth the easy way – simple post to twitter script

After Twitter introduced mandatory authentication with OAuth, many of the current scripts for posting content to Twitter don’t work anymore. OAuth can be great for more advanced authentication, but for a simple post to twitter script, it seems like a little overkill. In this post you’ll learn how to create a simple script that uses a quick and dirty version of OAuth for posting new tweets to Twitter. How to create a simple script Simplified, Twitter OAuth involves sending both ap...

   Twitter,OAuth,PHP,Auto tweet     2012-02-25 12:51:07