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

 ALL


  Remove browse button from input type=file

In Web 2.0 era, many websites will ask the user to upload their avatar when creating their profile. In HTML, the input control we should use is input="file". This is a file control provided by the browser vendor and it should be ran in a sandbox for security consideration. Browsers don't provide ways to choose file from local and upload to the remote server without the input="file" control. There is one annoying part about the input="file", which is a default button named "Choose File" or "Browser" will always appear when this control is created. Sometimes, to keep consistent and provide ...

47,017 3       FILE HTML BROWSE REMOVE BROWSE BUTTON


  Do you have this kind of comments in your source code?

Writing runnable code is the essential skill of a programmer, writing understandable comment is also a skill a programmer should acquire. There is some famous saying that bad comment is worth than no comment. Usually your code will be maintained by other people, if you provide them some difficult to understand or misguided comments, this will be nightmare to them. While at some other time, programmers may put some funny comments in their codes which may make others laugh. Today we share some comments which are full of humor.1. Send some warning to maintainer// // Dear maintainer...

46,729 14       COMMENT HUMOR


  Multithreading interview questions in Java

Multithreading as a widespread programming and execution model allows multiple threads to exist within the context of a single process. These threads share the process' resources but are able to execute independently. The threaded programming model provides developers with a useful abstraction of concurrent execution. However, perhaps the most interesting application of the technology is when it is applied to a single process to enable parallel execution on a multiprocessor system.Many programmers don't know how to use multithreading correctly, and we often get some advice from people regardin...

46,492 3       JAVA INTERVIEW MULTITHREADING


  Australian software engineer got asked algorithm question when entering US

The whole world knows that security and background checks get tighten for people to enter US since Donald Trump took office. But have you ever heard about getting algorithm question asked during the immigration check interview while entering United States? Recently an Australian software engineer David Thornton had such an experience when he tried to enter US.(Image from kaytlentravels.wordpress.com)David is a software engineer from Sydney and he is a 24-year-old studied computer science and law at the University of New South Wales. In February, David just finished his study in ...

46,175 0       UNITED STATES NEWS DONALD TRUMP


  Server monitoring shell scripts

There are many open source server monitoring software such as cacti and nagios. Besides these, can we write our own shell scripts to monitor them? The shell scripts written by ourselves can fulfill our special requirements better and have a more detailed coverage.Below are some commonly used shell scripts used by Evangelist, an Oracle DBA. 1. Check network gateway traffic#!/bin/bash#network#Mike.Xuwhile : ; do time='date +%m"-"%d" "%k":"%M' day='date +%m"-"%d' rx_before='ifconfig eth0|sed -n "8"p|awk '{print $2}'|cut -c7-' tx_before='ifconfig eth0|sed -n "8"p|awk '{print $6...

46,113 2       MEMORY SHELL CPU SERVER MONITOR


  Never ever touch a programmer

This is a technical license plate block example. We don't know whether it is working or not, however, the idea is very good. When you drive through some of the junctions, the camera captures the license number and convert it into text with OCR, and then insert them into the database. Therefore, this license plate on the car becomes a SQL injection. This picture tells us -- never trust user input.Author : 陈皓 Source : http://coolshell.cn/articles/6639.html#more-6639...

45,897 0       SQL INJECTION PROGRAMMER


  The ugliest C feature:

<tgmath.h> is a header provided by the standard C library,introduced in C99 to allow easier porting of Fortran numerical software to C.Fortran, unlike C, provides “intrinsic functions”, which are a part of the language and behave more likeoperators. While ordinary (“external”) functions behave similarly to C functions with respect to types(the types of arguments and parameters must match and the restult type is fixed), intrinsic functions accept arguments of several types and their return type may depend on the type of their arguments.For example Fortran 77 provid...

45,775 0       C FORTRAN INTRINSIC FUNCTIONS C99 UGLY


  SSL in PHP for WAMP

Sometimes when we need to use email service provided by WAMP, we need to use some remote mail server such as Gmail. In Gmail, if we want to use the SMTP server to send email and want to use port 465, then the SSL connection should be setup. But by default in WAMP, the ssl is not usable. So to allow use SSL, what we should do is go to system tray and click PHP->PHP Extensions->php_openssl. Then now you can use Gmail to send email easily....

45,673 1       PHP EMAIL GMAIL SSL WAMP SMTP