- 选出列表中每个object的某一个属性 _.pluck([{a:1, b:11}, {a:2, b:22}], 'a') => [1, 2]
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
| #include <stdio.h> | |
| #include <string.h> | |
| // 定义 bool 类型 | |
| typedef int bool; | |
| #define false 0 | |
| #define true 1 | |
| /* 本例 |
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
| for (var i = 21; i <= 69; i ++) document.getElementById("ptifrmtgtframe").contentWindow.document.getElementById("TZ_SUB_ACT_DWK_TZ_SELECT1$" + i).click() |
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 logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
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
| $( "<style>body { display: block; }</style>" ).appendTo( "head" ); |
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
| td{mso-number-format:"\@";} |
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
| dbms_xmlgen.convert(xmlagg(xmlelement(E, name||',')).extract('//text()').getclobval(),1) |
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
| 'use strict'; | |
| // Add ECMA262-5 method binding if not supported natively | |
| // | |
| if (!('bind' in Function.prototype)) { | |
| Function.prototype.bind= function(owner) { | |
| var that= this; | |
| if (arguments.length<=1) { | |
| return function() { | |
| return that.apply(owner, arguments); |
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
| //This is an example of how to scrape the web using PhantomJS and jQuery: | |
| //source: http://snippets.aktagon.com/snippets/534-How-to-scrape-web-pages-with-PhantomJS-and-jQuery | |
| //http://phantomjs.org/ | |
| var page = new WebPage(), | |
| url = 'http://localhost/a-search-form', | |
| stepIndex = 0; | |
| /** | |
| * From PhantomJS documentation: |
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
| <html> | |
| <head> | |
| <script src="//cdn.bootcss.com/vue/1.0.11/vue.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="app"> | |
| <input v-model="newTodo" v-on:keyup.enter="addTodo"> | |
| <ul> | |
| <li v-for="todo in todos"> |
NewerOlder