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

SEARCH KEYWORD -- trim()



  trim() in JavaScript

In the past, JavaScript didn't define the trim() function for String object. This makes web programmers frustrated since they often need to implement this function themselves if they want to handle user inputs. The new version of ECMA-262 introduces the trim() function.15.5.4.20   String.prototype.trim ( )     The following steps are taken:     1.   Call CheckObjectCoercible passing the this value as its argument.   2.   Let S...

   JavaScript,trim(),implementation     2012-07-19 10:58:01

  Using Java keytool programmatically

Java provides a command line tool to access and operate different keystore which store keys and certificates. This tool is named keytool and is located at \bin.  On command line, you can issue below command to generate a keystore named mytest.jks which contains a private key and certificate chain. keytool -genkeypair -alias mykey -keyalg RSA -sigalg SHA256withRSA -dname CN=Java -storetype JKS -keypass password -keystore mytest.jks -storepass password Sometimes, in testing purpose, w...

   JAVA,KEYTOOL     2016-01-09 06:28:07

  A HTTPS client and HTTPS server demo in Java

In this post, I will create a HTTPS server and HTTPS client demo which can establish HTTPS communication between a server and a client using Java. This should be very useful when we want to test our understanding about SSL communication. We will use both a detailed SSL client and a simple HttpsURLConnection as the HTTPS client. Before creating the actual HTTPS server and HTTPS client, we first need to generate the keystore and truststore to be used by the server and client. To generate the keyst...

   SSL,HTTPS,JAVA,DEMO     2015-10-23 09:04:36

  8 powerful Chrome extensions

Chrome is a powerful browser, one reason why it's so powerful is that it has abundant extensions. There are various extensions in Chrome Web Store. They can meet all kinds of needs you have and they are very easy to install as well. Here we share with you 8 powerful extensions on Chrome. All of them can be downloaded from Chrome Web Store Holmes A bookmark search tool, if you have lots of bookmarks and you even don't know where they are. Hplmes can help you find them in real time by matching tit...

   Chrome,extension     2013-07-31 01:24:18

  10 super useful PHP snippets you probably haven’t seen

When working with PHP, it is very useful to have a “toolbox” of handy functions and code snippets that can save lots of time when needed. Today, I’m going to show you 10 super useful code snippets that you probably never heard of. Text messaging with PHP using the TextMagic API If for some reason, you need to send text messages to your clients cell phones, you should definitely have a look to TextMagic. They provide an easy API which allow you to send SMS to cell...

   PHP,Code,Snippet,Useful code segment     2012-01-19 11:07:16

  Create namespace in JavaScript

A namespace (sometimes also called a name scope) is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An identifier defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace. Languag...

   JavaScript,namespace,example     2012-05-10 04:57:17

  Building The Linux Kernel In 60 Seconds

In less than one minute, it's now possible to build the Linux kernel from source on a desktop. Besides finishing up the Phoronix Test Suite 3.6-Arendal release this weekend, on Saturday I began running some new Intel CPU benchmarks. In building the Linux 3.1 kernel for x86_64 in a default configuration (make defconfig), I've now managed to trim down the compile time to less than sixty seconds on a single-socket desktop system. Similar speeds can be achieved out of multi-socket servers and othe...

   Linux kernal,Build,Intel processor,sgort time     2011-12-12 07:45:32

  Impact of AI on UI/UX design

The growth of computerization and Artificial Intelligence implanted into our regular daily existences in the course of recent years is only productive, we're no longer talk about fantasy since machines are going on at this very moment. This quick advancement has propelled a radically new age of designers to search for client-focused arrangements through the extent of these innovations. Along these lines, we need to investigate what this implies for UX plan in 2018 and what standards we should gr...

   UI,AI,UX     2018-11-28 07:05:26

  40+ Techniques to enhance your php code

1. Do not use relative paths , instead define a ROOT path Its quite common to see such lines : 1require_once('../../lib/some_class.php'); This approach has many drawbacks : It first searches for directories specified in the include paths of php , then looks from the current directory. So many directories are checked. When a script is included by another script in a different directory , its base directory changes to that of the including script. Another issue , is that when a script is being ru...

   PHP,Quirk,Trick,Efficiency,Techniques     2012-04-10 13:06:55

  Cleansing data with Pig and storing JSON format to HBase with Pig UDF

Introduction This post will explain you the way to clean data and store JSON format to HBase. Hadoop architect experts also explain Apache Pig and its advantages in Hadoop in this post. Read more and find out how they do it. This post contains steps to do some basic clean the duplication data and convert the data to JSON format to store to HBase. Actually, we have some built-in lib to parse JSON in Pig but it is important to manipulate the JSON data in Java code before store to HBase. Apache Pig...

   JSON,HADOOP ARCHITECT,APACHE HBASE,PIG UDF     2016-06-10 01:13:41