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

SEARCH KEYWORD -- Header



  File upload in PHP

File is a special kind of form data, when being uploaded to the server through HTTP POST request, PHP will create a $_FILES global array, the relevant file information will be stored in this global array. We will illustrate file upload with some code snippets using PHP and look into the internal work mechanism. Lastly will talk about file upload security. File upload In order for users to upload files in client side, we have to provide a form on the user interface. Since the uploaded file is a s...

   File upload,PHP     2012-11-30 22:01:28

  Should All Web Traffic Be Encrypted?

The prevalence of free, open WiFi has made it rather easy for a WiFi eavesdropper to steal your identity cookie for the websites you visit while you're connected to that WiFi access point. This is something I talked about in Breaking the Web's Cookie Jar. It's difficult to fix without making major changes to the web's infrastructure. In the year since I wrote that, a number of major websites have "solved" the WiFi eavesdropping problem by either making encrypted HTTPS web traffic an accou...

   Web traffic,Security,HTTPS.Encryption,Wifi     2012-02-24 05:02:58

  HTML5 and Accessibility

Accessibility for people with disabilities is a legal responsibility in many countries. It's also the right thing to do, and one of the characteristics distinguishing professional developers from the WWWs: WYSIWYG-wielding wannabes. But for many, accessibility has been a somewhat black art, requiring adding extra stuff to your code like alt text, table summaries, ARIA information that can be difficult to test by developers who are not assistive technology users themselves.The arrival of HTML5 ha...

   HTML5,Accessibility,Video,Music,Canvas     2011-08-19 08:13:44

  Optimization Tricks used by the Lockless Memory Allocator

With the releasing of the Lockless Memory Allocator under the GPL version 3.0 license, we can now discuss more of the optimization tricks used inside it. Many of these are things you wouldn't want to use in normal code. However, when speed is the ultimate goal, sometimes we need to break a few rules and use code that is a little sneaky.The SlabA slab is a well-known technique for allocating fixed size objects. For a given object size, a chunk of memory is divided up into smaller regions of that ...

   Optimization,Memory allocation     2011-11-16 08:02:16

  Code coverage rate

When doing unit testing, the code coverage rate is often used as the criteria for measuring testing performance, even in some cases code coverage may be used to consider whether the testing task is completed or not. So testers need to spend much time on designing test cases which can cover as many codes as possible. There are advantages and disadvantages about using code coverage rate. First let's check what is code coverage rate: code coverage rate= the degree of code coverage in testing. There...

   Unit testing,Code coverage     2013-04-16 12:50:57

  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

  Python object creation sequence

[The Python version described in this article is 3.x] This article aims to explore the process of creating new objects in Python. As I explained in a previous article, object creation is just a special case of calling a callable. Consider this Python code: class Joe: pass j = Joe() What happens when j = Joe() is executed? Python sees it as a call to the callable Joe, and routes it to the internal function PyObject_Call, with Joe passed as the first argument. PyObject_Call looks at the ty...

   Python,Object creation     2012-04-16 15:03:55

  Cache them if you can

“The fastest HTTP request is the one not made.” I always smile when I hear a web performance speaker say this. I forget who said it first, but I’ve heard it numerous times at conferences and meetups over the past few years. It’s true! Caching is critical for making web pages faster. I’ve written extensively about caching: Call to improve browser caching(lack of) Caching for iPhone Home Screen AppsRedirect caching deep diveMobile cache file sizesImproving app ...

   Cache,HTTP request,Websiite     2012-03-27 12:54:02

  SkipList in Go

Algorithmic thinking is the must-have in the coding world, so I have been keeping the routine of algorithm practice every week, consolidating my knowledge of data structures on one hand, and improving my coding skills as well. A difficult one happened to be stuck in my mind- Implement SkipList with Go, which took me quite a weekend. Below is the front-line report of how I finally got the hang of it. First, from its concept. Wiki has explained it well. a skip list is a probab...

   GOLANG,SKIPLIST     2022-04-05 02:21:59

  C++11 multithreading tutorial

The code for this tutorial is on GitHub: https://github.com/sol-prog/threads. In my previous tutorials I’ve presented some of the newest C++11 additions to the language: regular expressions, raw strings and lambdas. Perhaps one of the biggest change to the language is the addition of multithreading support. Before C++11, it was possible to target multicore computers using OS facilities (pthreads on Unix like systems) or libraries like OpenMP and MPI. This tutorial is meant to get you st...

   C++,Multithreading,Standard 11,Demo     2011-12-18 00:50:35