This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rename file starting with a dash(-) | |
| If having problem renaming a file that starts with a dash: | |
| Since the file name begins with a '-' it looks like an option to the | |
| command. You need to force it to not look like an option. Put a ./ | |
| in the front of it. Or give it the full file name path. Or tell the | |
| command you are through with options by using the double dash to end | |
| all option processing. This is common to most traditional UNIX | |
| commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :set ff=unix<return> | |
| :x<return> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //just look at the fiddle | |
| //http://jsfiddle.net/yqtted/3Me8d/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Test{ | |
| private $name = "test"; | |
| private $name1 = "test1"; | |
| public function __get($name){ | |
| echo "__get() triggered! $$name: " . $name . "\n"; | |
| return $this->name; | |
| } | |
| public function __isset($tmp){ | |
| echo "__isset() triggered! $$tmp: " . $tmp . "\n";; | |
| $ret = isset($tmp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // jQuery plugin to prevent double submission of forms | |
| jQuery.fn.preventDoubleSubmission = function() { | |
| $(this).on('submit',function(e){ | |
| var $form = $(this); | |
| if ($form.data('submitted') === true) { | |
| // Previously submitted - don't submit again | |
| e.preventDefault(); | |
| } else { | |
| // Mark it so that the next submit can be ignored |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //live testing on http://jsfiddle.net/yqtted/9xKuR/ | |
| //shared tooltip version on http://jsfiddle.net/yqtted/WUMfB/ | |
| $(function () { | |
| $('#container').highcharts({ | |
| series: [{ | |
| name: "line1", | |
| composition: { | |
| "data1": [129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4] | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function is(type, obj) { | |
| var clas = Object.prototype.toString.call(obj).slice(8, -1); | |
| return obj !== undefined && obj !== null && clas === type; | |
| } | |
| is('String', 'test'); // true | |
| is('String', new String('test')); // true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*retrieved from http://bonsaiden.github.io/JavaScript-Garden/#function.arguments*/ | |
| function Foo() {} | |
| Foo.prototype.method = function(a, b, c) { | |
| console.log(this, a, b, c); | |
| }; | |
| // Create an unbound version of "method" | |
| // It takes the parameters: this, arg1, arg2...argN | |
| Foo.method = function() { |
NewerOlder