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

SEARCH KEYWORD -- checkbox



  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

  Finding selected checkbox items in a JSF dataTable

This is one of those problems that I couldn’t find a complete example for when I needed it, so hopefully this will save somebody else the extra time it took me to piece it together. We frequently need to have data tables in our UI, and allow the user to select a subset of those items for action. In JavaServer Faces, this means having a DataTable, each row having its own checkbox. But when the action is triggered, how to we find which items the user has selected. The first step is to ...

   JavaServer Faces,JSF,Datatable,Checkbox,Example     2012-01-03 03:02:46

  Why developers need a Mac

I am by no means an Apple fan. For one thing, I find Windows (and Linux) stable and fast, so you are not going to hear me argue that my computing life was transformed once I made that Switch (with a capital letter). Admittedly that is partly because I am familiar with how to fix and tune Windows and remove foistware, but it is not that hard. For another, I am not an admirer of Apple’s secretive approach, or the fact that most requests for comment from journalists are responded to wi...

   Apple,Mac,Development,iOS,Windows     2011-12-07 03:12:17

  Screen recording in Windows 10

Have you ever wondered how to take screen recording easily on Windows? Normally you would think to download some software online and install it on your machine such as Camtasia. However, many of them are either non-free or uneasy to use. Fortunately, there is a built-in tool provided in Windows 10 which can be used to take simple screen recording plus audio recording. The tool is called the Game Bar which is primarily intended for gamers to take screenshots of their plays and achievements. Don't...

   WINDOWS 10,GAME BAR,SCREEN RECORDING     2018-03-06 11:42:07

  $40 million per year to keep Wikipedia running

Wikipedia is an incredibly frugal and efficient nonprofit organization. It serves half a billion visits per month. But do you know how much it costs to keep this huge website running? According to 2012-13 Wikimedia Foundation Annual Plan, the expected spending is around $40 million. Some may argue that Wikipedia is just a site with "just text", why does it cost so much? Oliver Emberton shared his view. To keep Wikipedia running and serve 500 million visits per month. First, you're going to need ...

   Wikipedia,Spending,Cost     2013-09-24 23:05:10

  Tips and tricks about JavaScript from Google

JavaScript is now a very popular client side language. It's flexible, powerful but easy to make mistakes. So good programming style is better for you to write efficient and readable JavaScript codes. Here are some tips and tricks about JavaScript from Google. True and False Boolean Expressions The following are all false in boolean expressions: null undefined '' the empty string 0 the number But be careful, because these are all true: '0' the string [] the empty array {}&n...

   JavaScript, Google, Coding standard     2013-02-26 23:11:03

  Square bracket in checkbox name

0down votefavorite i have a form with checkboxes like this:    <input type=\"checkbox\" name=\"type[]\" value=\"1\" />Fast Food<br>    <input type=\"checkbox\" name=\"type[]\" value=\"2\" />Table Service<br>    <input type=\"checkbox\" name=\"type[]\" value=\"3\" />Cafeteria<br> when i use the brackets in the name (type[]), my php works:    $type=$_POST[\'type\'];    echo \"types are:\";for ( $counter...

   Square bracket,PHP,JavaScript,Array of n     2011-03-22 10:32:40

  Chrome extension to display desktop notification

Have you ever thought about writing extension for web browsers so that we can complete some tasks easily. Do you think writing extension for browsers is very difficult? You have no clue where to begin? On Chrome, this isn't any problem now as long as you know how to write HTML,CSS and JavaScript. We will show one example of Chrome extension today. The extension will display a desktop notification on your desktop. You need to create two files here, one is the notification.json which is the config...

   Chrome extension,Desktop notification,Example     2013-06-29 22:23:51

  Tips to improve JavaScript efficiency

Writing JavaScript code is tedious and error prone. You not only need to implement the necessary functions, but also need to ensure cross browser compatibility. This often causes the low efficiency of JavaScript developers. Here we recommend 12 tips you can benefit from. 1. Remove array element by index If we want to remove one element in an array, we can use splice. function removeByIndex(arr, index) { arr.splice(index, 1); } test = new Array(); test[0] = ’Apple’; test[1] = &rsq...

   JavaScript,Tips,Array     2013-07-27 20:50:40

  Seven Java projects that changed the world

O\'Reilly is celebrating the release of Java 7, and our inaugural OSCON Java conference: July 25-27 in Portland, Ore. Java\'s open source ecosystem is strong and healthy, one of the primary reasons for our creation of OSCON Java. Over the last decade, several projects have traveled beyond mere adoption and had effects dominating the Java world, into software development in general, and some even further into the daily lives of users. JUnit Ported to Java by Kent Beck and Erich Gamma from Be...

   Java,Projects,Prominent,Eclipse,Sue     2011-07-26 02:50:42