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

SEARCH KEYWORD -- optional



  Optional arguments in PHP function

In PHP, we can define our own functions which can accept optional number of arguments. In this kind of functions, the optional argument should be set with default value.Fox example, the next code example will illustrate this:<?php function func($name,$type=NULL) { echo "$name $type"; } func("Hello"); echo "<br />"; func("Hello","world"); echo "<br />";?>Here $type is an optional argument. It must be set with a default value either NULL or some other value. Quite simple....

   PHP,optional,arguments,user defined func     2011-03-28 12:35:20

  One good way to use optional parameter in function

In GoLang, it doesn't support method overloading like in Java, hence sometimes it would be a headache to create functions to construct new structs with different parameters.  Normally, we would construct the new function as below when want to let others create a new struct instance with explicit function call. type Queue struct { Name string } func NewQueue(name string) *Queue { return &Queue{name} } But with the scope and complexity of the struct increases, there might be more prope...

   OPTION PATTERN,VARIADIC FUNCTION,OPTIONAL PARAMETER     2020-09-18 21:45:29

  Understanding Twitter Bootstrap 3

On 27, July, Twitter Bootstrap 3 RC 1 was released, if there are no major bugs found in this release, then it will be the final released Twitter Bootstrap 3 with some minor changes. What changes does Bootstrap 3 have compared to Bootstrap 2? After checking the documents, we can find that there are mainly 3 changes. Embrace flat design In Bootstrap 3, it begins to embrace flat design. First from the official webpage of Bootstrap 3, we can find elements are flat designed. Also, all buttons have no...

   Bootstrap 3,Change,Bootstrap 2     2013-08-05 07:06:22

  The story behind Twitter Bootstrap

Bootstrap is a free front end framework used for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. It now becomes a very popular front end frameworks for web designers. This framework was developed by Mark Otto and Jacob Thornton at Twitter. Later this framework was open sourced and hosted on GitHub and it now becomes one of the most popular ...

   Open source,Bootstrap     2013-12-16 08:14:22

  Meet the new Gmail inbox

On 29 May, Google announced the new Gmail inbox. The biggest change is users can categorize their mails. Today the new Gmail inbox is finally available. Now we can put a lot of different types of email: messages from friends, social notifications, deals and offers, confirmations and receipts, and more into different categories. By default, Gmail provides three different tabs : Primary, Social and Promotions at the inbox page. You can know what to read and what are the priority mails as a glance....

   Gmail,New inbox     2013-07-17 20:06:10

  new() and make() in GoLang

GoLang is a modern, statically typed, compiled programming language designed for building scalable, concurrent, and efficient software. It provides various built-in functions and features that help developers write concise and efficient code. Among them are the new() and make() functions, which may appear similar at first glance but serve different purposes in GoLang and are crucial for memory allocation and data initialization. In this blog article, we will explore the differences between the n...

   NEW,MAKE,GOLANG     2023-11-18 13:43:25

  Beginners guide to Linux directory structure

Have you ever looked in your / directory, you’ll see a lot of directories. Here we are presenting beginners guide to linux directory structure explaining what they mean and what are the contents of these directories.Screenshot of contents of root directory: /This is called root partition. All files and directories start with root partition. Write privileges under this directory are avaible with root user only. Not to confuse it with root user’s home directory, know the ...

   Linux,File system structure,Beginner's guide     2012-04-20 12:19:32

  New HTTP status code: 451 Unavailable for Legal Reasons

On June 11th,2012, Google proposed a new HTTP status code to indicate webpage contents which are not conform to law. The new HTTP status code is 451 Unavailable for Legal Reasons. Google Android Developer Advocate Tim Bray submitted the draft for the new HTTP status code, it will be used on some webpages which can not be served because of legal reasons. Visitors will know that the page cannot be seen because of the government censorship.According to the draft, responses using this status code sh...

   HTTP status,451,Tim Bray     2012-06-12 09:07:44

  Today in history : Steve Wozniak invented Apple I in 1975

The original Apple Computer, also known retroactively as the Apple I, or Apple-1, is a personal computer invented by Steve Wozniak ion 29th June, 1975. Wozniak's friend Steve Jobs had the idea of selling the computer. Features:CPU : MCStek 6502CPU Speed : 1MHzBus Speed : 1MHzMemory : 8KbResolution : 60.05 Hz, 40*24 charactersPower : 58WPrice : $666.66The Apple I went on sale in July 1976 at a price of US$666.66, because Wozniak "liked repeating digits" and because they originally sold it to a lo...

   Apple I,History,Steve Wozniak     2012-06-29 06:00:08

  A mini guide to HTTP referer

In HTTP header, there is a field named Referer which is to provide the referrer of the current accessed page. In this post, we will introduce the usage of HTTP referer field. On the web, when a user visits a webpage, s/he must be from some place. This place is usually referred a s referer. This information is very important to some website operators and server owners as they want to know where they get the traffic from and this helps them provide better service for potential targeted users. In t...

   HTML,HTTP REFERER,REFERRERPOLICY     2019-06-29 02:23:25