Recent Notes

Displaying notes 1 - 10
Created by Dr. Xi on April 16, 2014 16:26:36    Last update: April 16, 2014 16:26:36
Basically, you are requesting "Active" content via HTTP from a page served via HTTPS. And Firefox blocked it. What is "Active Content"? Examples are JavaScript, CSS, objects, xhr requests, iframes, and fonts. More info: Mixed Content Blocking Enabled in Firefox 23!
Created by Dr. Xi on April 16, 2014 16:15:27    Last update: April 16, 2014 16:15:27
Create a list, assign it to another variable. They both refer to the same object: >>> a = [ 1, 2, 3, 4 ] >>> b = a >>> a [1... List comprehension, assign value to a . Now a and b are different: >>> a = [ e for e in a if e > 2 ] >>> a [3, ... Splicing changes list in place, a and b refer to the same object after assignment: >>> a = b >>> a[:] = [ e for e in a if e > 2 ] ...
Created by Dr. Xi on April 16, 2014 15:40:09    Last update: April 16, 2014 15:40:09
The "with" statement makes it easy to open a file, use it then finally close it, without explicitly coding with a " try...finally " block. Example: >>> import yaml >>> with open("app.yaml") as f:... More info: Understanding Python's "with" statement
Created by voodoo on April 15, 2014 16:25:09    Last update: April 15, 2014 16:25:09
Example session for Lua string concatenation: > a = { 'a', 'b' } > for i, v in pairs(a) d...
Created by voodoo on April 15, 2014 16:20:36    Last update: April 15, 2014 16:20:36
For arrays with numerical indices: > a = { 'a', 'b' } > =#a 2 > =table.g... However, the # operator or table.getn does not count elements with string indices: > a['a'] = 1 > a['b'] = 2 > return #a ... Further, the pairs function does not list keys accessible made available via setmetatable : > setmetatable(a, {__index = function(table, k...
Created by Dr. Xi on April 15, 2014 12:03:45    Last update: April 15, 2014 12:03:45
To show the file type identified by vim for the file you are currently editing, type " :set filetype " in vim command. From vim Help, this is how vim identifies file type: Detail: The ":filetype on" command will load one o...
Created by Dr. Xi on April 15, 2014 11:32:50    Last update: April 15, 2014 11:32:50
You can set (shell) environment variables $VIM and $VIMRUNTIME and vim will honor them. But there are default values that vim takes if you don't set them. Here are some methods to find the default values. Enter :verson vim command. It displays all compilation flags used to compile vim, including "fall-back for $VIM". Enter :set runtimepath vim command (or shorthand :set rtp ) Run this command in shell: vim -e -T dumb --cmd 'exe "set t_cm=\<C-M>"|echo $...
Created by voodoo on April 11, 2014 14:12:29    Last update: April 11, 2014 14:12:29
There are three ways to list the network interfaces: $ ip link show $ netstat -i $ ifconfig -a
Created by James on April 03, 2014 21:27:08    Last update: April 03, 2014 21:27:08
This selector omits the first row of a table: $('#my-table tr:not(:first)')
Created by James on February 03, 2014 14:38:30    Last update: February 03, 2014 14:38:30
IE 10 no longer support conditional comments like: <!--[if IE 8]> <p>Welcome to Internet Explorer ... So other hacks are necessary when you want to target specific CSS to IE10 or IE11. The following hack was confirmed to work for IE10 & IE11: <style type="text/css"> label.ie { displa... Links: Moving IE specific CSS into @media blocks IE 10 Specific Styles
Previous  1 2 3 4 5 6 7 8 9 10 Next