CLICK ME
yes, even hidden code blocks!
print("hello world!")
#region Win32 GDI | |
private void btnTextDrawCenter_Click(object sender, RoutedEventArgs e) | |
{ | |
var doc = new PrintDocument() | |
{ | |
PrintController = new StandardPrintController(), | |
}; | |
doc.OriginAtMargins = false; | |
doc.PrinterSettings.PrinterName = CurrentPrinter; | |
doc.PrintPage += (s, args) => |
object TypeclasseDemo { | |
// The parts of the type class pattern are: | |
// | |
// 1. the "type class" itself -- a trait with a single type parameter; | |
// | |
// 2. type class "instances" for each type we care about, | |
// each marked with the `implicit` keyword; | |
// | |
// 3. an "interface" to the type class -- one or more methods |
https://www.youtube.com/watch?v=snGkSg-lfJw
https://wiki.php.net/phpng-int https://wiki.php.net/phpng-upgrading
http://nikic.github.io/2014/12/22/PHPs-new-hashtable-implementation.html http://nikic.github.io/2015/05/05/Internal-value-representation-in-PHP-7-part-1.html http://nikic.github.io/2015/06/19/Internal-value-representation-in-PHP-7-part-2.html
% rustc goodbye.rs && rustc -L . beatles.rs && ./beatles | |
goodbye.rs:10:25: 10:29 warning: unused import, #[warn(unused_imports)] on by default | |
goodbye.rs:10 use syntax::ext::base::{self, ExtCtxt, MacResult, DummyResult, MacEager}; | |
^~~~ | |
I don't know why you say goodbye, I say hello |
extern crate websocket; | |
//extern crate openssl; | |
use std::comm; | |
use std::thread::Thread; | |
use std::io::{Listener, Acceptor}; | |
use websocket::{WebSocketServer, WebSocketMessage}; | |
//use websocket::client::WebSocketClient; | |
use websocket::header::WebSocketProtocol; | |
//use openssl::ssl::{SslContext, SslMethod}; |
trait StarToStar<Input> { | |
type Output; | |
} | |
type Apply<Name, Elt> where Name: StarToStar<Elt> = Name::Output; | |
struct Vec_; | |
struct DList_; | |
impl<T> StarToStar<T> for Vec_ { | |
type Output = Vec<T>; |
BracketMatcherView = require '/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js' | |
atom.workspaceView.eachEditorView (editorView) => | |
if editorView.attached and editorView.getPane()? | |
new BracketMatcherView(editorView) |
Y组合子是Lambda演算的一部分,也是函数式编程的理论基础。 | |
它是一种方法/技巧,在没有赋值语句的前提下定义递归的匿名函数。 | |
即仅仅通过Lambda表达式这个最基本的“原子”实现循环/迭代。 | |
颇有道生一、一生二、二生三、三生万物的感觉。 | |
虽然Y组合子在理论上很优美,但在实际开发中并不会真的用到。 | |
想要了解Y组合子是什么,请参见维基百科:http://en.wikipedia.org/wiki/Fixed-point_combinator#Y_combinator | |
或者知乎上的回答:http://www.zhihu.com/question/20115649 |
macro_rules! query( | |
(from $v:ident in $c:ident $(where $mw:expr)* select $ms:expr) => | |
($c.filter_mapped(|&$v| if(true $(&& $mw)*) { Some($ms) } else { None })) | |
) | |
fn main() | |
{ | |
let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
let result1 = query!(from x in nums select x * 2); | |