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

SEARCH KEYWORD -- Set



  Set PHP session timeout

There are many different discussions about PHP sessions. We may often face some weird issues while handling PHP sessions. Sometimes session is expired earlier than expected. Or sometimes the session is not expired. This introduces many confusions. Today we discuss how to set PHP session timeout correctly today. In php.ini, there are three key parameters which will affect the session timeout. session.gc_maxlifetime, session.gc_probability and session.gc_divisor. session.gc_maxlifetime defined the...

   PHP,session,timeout     2013-08-31 08:11:03

  Work with MySQL character set and collation

For non-English websites, they often have to deal with character set and collation if they want to store data to and read data from databases with other languages. Character set tells the database which kind of character encoding scheme to use to store or read data, collation can be simply understood as a subset of character set, it tells the database how to sort data. We talk about working with character set and collation of MySQL today.  In MySQL, if we want to store Chinese, Japanese or ...

   MySQL,character set,collation,Chinese,question mark     2012-06-17 07:07:28

  3 ways to remove duplicates in List

Frequently, we may have an ArrayList which stores many values, and we need to process the ArrayList and get what are the distinct values in the list, or we may want to count occurrence of each value in the ArrayList. We can remove the duplicates in a few ways. Here we propose 3 methods :     public static void main(String[] args){        //SuperClass sub=new SubClass();                String[...

   Java,List,Duplicate,Clear     2012-09-03 09:44:32

  mysql_fetch_array(),mysql_fetch_assoc() and mysql_fetch_row()

In PHP MySQL mannual. There are three functions which need to be clarified for some users who may get confused when choosing which one to use to get the result. mysql_fetch_array() : by seeting the different parameters, there are three ways to return the result set. MYSQL_ASSOC(Result set with field names as the associative indexs.It means you can use the field name as the index to get value of the specified cell). MYSQL_NUM(Result set with field names as the number indices). Or MYSQL_BOTH(...

   PHP,MySQL,resultset,comparison,mysql_fet     2011-08-05 04:53:09

  CSS DIV position analysis

When using CSS to set the position of DIV, we may often get confused with the 4 position properties : static, relative, absolute and fixed. If we don't understand them correctly, we may often get unexpected result. Here we make some analysis to them.The definitions of these 4 properties:static : The default position property. It has no position actually. The element will appear where it should be (top, bottom, left, right or z-index has no use here)relative : This one will position relati...

   CSS, DIV,position,relative,absolute     2013-01-29 03:23:57

  How ScrollerJS works

ScrollerJS is a light weight number scroller module to be embedded in web apps. It provides fancy number scrolling animations. ScrollerJS supports both CSS transition and DOM animation to handle the animation needed. If CSS transition is supported in a browser, CSS transition will be the preferred option for animation. If in old browsers where CSS transition is not supported. DOM animation will be chosen automatically. How does the number scrolling actually work? To transition a number from 0 to...

   ScrollerJS,JavaScript,CSS,GitHub     2015-06-11 06:54:44

  Linux Clock : CST,UTC and NTP setup

1. There is an option when you set up clock on installing Linux: system clock users UTC, so what does UTC mean? It's Universal Time Coordinated(UTC), there are two different times in GPS system: one is UTC , the other one is LT(Local Time). The difference between these two is just the timezone difference, UTC is the time in timezone 0. If the local time in Beijing is 8 o'clock in the morning, then UTC time is 0 o'clock, which is a 8 hour difference. 2. In Linux, when we use date to check the tim...

   Linux,Clock,UTC     2013-03-21 12:19:30

  Add page number anywhere in word document

Have you ever frustrated when you want to add page number in a Microsoft word document start from page 2 or later. The way to ease you is to add sections to the word document in which page you want to add page number. The procedures are (in Word 2007) :1. Goto Page Layout->Breaks->Section breaks.2. In Section Breaks zone, you can choose Next Page and some others way to set sections.3. Then when you want to add the page number into next section. Go to Insert->Page Number->Format ...

   Office 2007, Word, Page number, Section,     2011-04-08 04:00:53

  jQuery to check whether checkbox is checked

In Vanilla JavaScript, the correct way of checking whether a checkbox is checked is to get the property checked of the checkbox. Assuming there is an checkbox with id "checkbox1", below line will return true if the checkbox is checked while it will return false if the checkbox is unchecked: document.getElementById("checkbox1").checked In jQuery, there are a few ways to check this. The first one is to using the corresponding counterpart of the Vanilla JavaScript, it is to check the checked proper...

   jQuery,checked,checkbox,attr,prop     2015-07-25 08:49:54

  CSS Overflow Property Utilization

Sometimes when we do CSS on HTML elements. We may want to hide some text when the text in a specified box overflows. Usually, we can use a CSS property overflow:hidden to hide the text so that the format of the whole element will not be affected. But will it always work? I believe some of us may encounter problems when we want to hide some text in a table td cell with specified width. If we use td { overflow:hidden;}, it is supposed to hide the text if the text in a td cell overflows. But the fa...

   CSS,Overflow,TD,Cell,Hidden     2014-10-21 08:24:48