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

SEARCH KEYWORD -- Input validation



  Display GIF animation while submitting the web form

Internet appears everywhere in our life. Form as a data gathering component is the must have component in a web app. When the page is submitting data to the server, if it takes a relative long time for the backend server to process the data, then the client users will feel lost while waiting for this if he cannot get any indication about what's happening. They may even reclick the button which will cause the data resubmission. This affects the user experience and also the system performance and ...

   HTML,Spin,Submit,Form     2013-05-17 11:47:07

  Let browser prompt for storing password when doing AJAX login

In Web 2.0 era, more and more web applications are using AJAX to replace the traditional HTML form element to perform user login. This usually provides a better user experience than form submission. But it also brings a side effect to the end users. That is the browser will not prompt the user whether s/he wants to save the password so that s/he no needs to enter the username/password again when visiting the same site next time. Below is the code snippet which does the AJAX login.  <scri...

   AJAX,Browser,Login,Password     2015-06-04 10:02:46

  ASP.NET 4 Breaking Changes #1: requestValidationMode cause ValidateRequest=False to fail

The request validation feature in ASP.NET provides a certain level of default protection against cross-site scripting (XSS) attacks. In previous versions of ASP.NET, request validation was enabled by default. However, it applied only to ASP.NET pages (.aspx files and their class files) and only when those pages were executing.In ASP.NET 4, by default, request validation is enabled for all requests, because it is enabled before the BeginRequest phase of an HTTP request. As a result, request valid...

   ASP.NET,Html content,Error,ValidateRequest,requestValidationMode     2011-11-07 13:50:29

  Write high quality JavaScript and CSS with SublimeLinter

SublimeLinter is a plugin for one of the front end editor--Sublime Text, it is used to highlight those syntax not conforming to standard or wrong, it supports JavaScript,CSS,HTML,Java,PHP,Python,Ruby and some more.This article will introduce how to configure SublimeLinter in Windows to validate JavaScript and CSS codes. Preparation Install Sublime Text package control tool : http://wbond.net/sublime_packages/package_control Install SublimeLinter with Sublime Text package control tool :https://gi...

   SublimeLinter,Sublime Text,Validation     2013-06-14 23:24:51

  Solution to getKeyCode() returns 0 in Java

The getKeyChar method always returns a valid Unicode character or CHAR_UNDEFINED. Character input is reported by KEY_TYPED events: KEY_PRESSED and KEY_RELEASED events are not necessarily associated with character input. Therefore, the result of the getKeyChar method is guaranteed to be meaningful only for KEY_TYPED events.For key pressed and key released events, the getKeyCode method returns the event's keyCode. For key typed events, the getKeyCode method always returns VK_UNDEFINED....

   Java,KeyCode,0,KeyListener     2011-06-06 10:38:11

  Remote form submission

Remote form submission is way of submitting HTML forms from local to a particular remote server. This is used by many advertisers, spammers or even hackers to submit bad data to other websites in order to get what they want. They can write some automation scripts to help them do spamming. How can people do remote form submission and how to prevent this kind of attacks? Since a website can be accessed by almost every one, so one can save a local copy of a HTML form of a website through File->S...

   PHP,Security,Remote form submission     2013-07-14 01:04:49

  Learn Emacs: Keyboard Macros

An emacs keyboard macro is just a recording of user input into emacs, which means that most anything you can do in emacs can be recorded as a macro. Read that again. Pretty powerful.Here’s how it works. To start recording, typeC-x (and input the commands in your macro. Then typeC-x )to stop recording. Then typeC-x eto apply the macro once, orC-u 0 C-x eto apply the macro until the bell rings or end of buffer is reachedKeep in mind that you must not ring the bell when defining a keyboard m...

   Emac,Macro,Code,Example     2011-11-10 10:45:47

  Top 10 Best Free PHP Frameworks of 2015

Like it or not, PHP is still, the most celebrated as well as an influential platform which is widely admired for its brilliant HTML, database integration support, intuitive features, and simple in learning too. Using diverse PHP frameworks, developers can create robust, effective, well- defined and stable web application with an ease and therefore, saving towards development cost is possible.   In essence, these frameworks facilitate scalability and enduring maintenance by obeying developm...

   PHP FRAMWORKS,CAKEPHP,LARAVEL,CODEIGNITER,ZEND ,PHALCONPHP,YII ,FUELPHP,SYMFONY,PHPIXIE,SLIM     2015-10-02 04:56:03

  Greedy and Nongreedy Matching in a Regular Expression

By default, pattern matching is greedy, which means that the matcher returns the longest match possible. For example, applying the pattern A.*c to AbcAbcA matches AbcAbc rather than the shorter Abc. To do nongreedy matching, a question mark must be added to the quantifier. For example, the pattern A.*?c will find the shortest match possible. COPY // Greedy quantifiers String match = find("A.*c", "AbcAbc"); // AbcAbc match = find("A.+", "AbcAbc"); // AbcAbc // Nongreedy quantifier...

   Regular expression,Pattern match,Greedy,     2011-08-09 12:42:28

  php://input in PHP

When using xml-rpc, server side will get the data from client with php://input method instead of $_POST. Hence today we will discuss php://input. PHP official manual has below explanation to php://input: “php://input allows you to read raw POST data. It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives. php://input is not available with enctype=”multipart/form-data”. Here we und...

   php://input, IO, input     2013-02-25 20:43:00