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
// a fibonacci numbers object using proxy. | |
var fib = Object.create( Proxy.create({ | |
getPropertyDescriptor: function( name){ | |
var index = ~~name; | |
if( index == name && index > 1){ | |
return { | |
get: function(){ | |
var val = this[ index-1] + this[ index-2]; | |
Object.defineProperty( this, index, { | |
value: val, |
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
// Simple function to add a menu option to the spreadsheet "Export", for saving a PDF of the spreadsheet directly to Google Drive. | |
// The exported file will be named: SheetName and saved in the same folder as the spreadsheet. | |
// To change the filename, just set pdfName inside generatePdf() to something else. | |
// Running this, sends the currently open sheet, as a PDF attachment | |
function onOpen() { | |
var submenu = [{name:"Save PDF", functionName:"generatePdf"}]; | |
SpreadsheetApp.getActiveSpreadsheet().addMenu('Export', submenu); | |
} |
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
/* Doubly Linked List implementation */ | |
#include<stdio.h> | |
#include<stdlib.h> | |
struct Node { | |
int data; | |
struct Node* next; | |
struct Node* prev; | |
}; |
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
MySQL管理之道:性能调优、高可用与监控 | |
跳转至: 导航、 搜索 | |
目录 | |
1 MySQL 5.5介绍 | |
2 半同步复制 | |
3 故障诊断 | |
4 同步复制报错故障处理 | |
5 性能调优 | |
6 备份与恢复 |
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
CFLAGS=-ggdb -Wall | |
all: quicksort.out | |
# $< the dependencies | |
# $@ the target | |
quicksort.out: quicksort.o | |
gcc -Wall -ggdb $< -o $@ | |
clean: |
NewerOlder