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
var fieldName = "language"; | |
var en = "en"; | |
var zh = "zh" | |
var getFieldID = function(item, fieldName) { | |
var fieldID = Zotero.ItemFields.getID(fieldName); | |
var mappedFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(item.itemTypeID, fieldName); | |
return mappedFieldID ? mappedFieldID : fieldID | |
} |
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
From a13aeb2446091a9bbd769c164d16b13d7f139ab4 Mon Sep 17 00:00:00 2001 | |
From: Junlu Cheng <[email protected]> | |
Date: Wed, 5 Nov 2014 19:20:34 +0800 | |
Subject: [PATCH] Fixed warnings about [NSApp delegate]. | |
--- | |
SquirrelApplicationDelegate.m | 2 +- | |
SquirrelInputController.m | 28 ++++++++++++++-------------- | |
main.m | 8 ++++---- | |
3 files changed, 19 insertions(+), 19 deletions(-) |
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
// Credits | |
// http://hi.baidu.com/2hill/item/efa5c2f49b9601cd521c263d | |
var Default_isFT = 0 //默认是否繁体,0-简体,1-繁体 | |
var StranIt_Delay = 50 //翻译延时毫秒(设这个的目的是让网页先流畅的显现出来) | |
//-------代码开始,以下别改------- | |
//转换文本 | |
function StranText(txt,toFT,chgTxt) | |
{ |
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
void swap(int *a, int i, int j) | |
{ | |
int t = a[i]; | |
a[i] = a[j]; | |
a[j] = t; | |
} | |
void siftup(int* a, int n) | |
{ | |
for (int c = n; a[c/2] < a[c] && c/2 > 0; c /= 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<iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
Node(int data, Node *next) { |
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<iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
Node(int data, Node *next) { |
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<iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
Node(int data, Node *next) { |
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<iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
Node(int data, Node *next) { |
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<iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
Node(int data, Node *next) { |
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<iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
Node(int data, Node *next) { |
NewerOlder