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
beforeSubmit: function(data, target, options) | |
{ | |
if ($('#use_rtf_editor').attr('checked')) | |
{ | |
var editor_id=$("textarea[name='page_section[text]']",target).attr('id'); | |
var editor=tinyMCE.getInstanceById(editor_id); | |
// bookmark data item | |
page_section_data=null; | |
$.each(data, function(i, val) { | |
if (val['name']=="page_section[text]") |
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
public class PartA { | |
private static Student[] students = new Student[5]; | |
public static void main(String[] args) | |
{ | |
students[0] = new Student("Jack Smith",8001, 35 ,"M", new int[]{42,50,56,71,68,55}); | |
students[1] = new Student("Jim Lucas",8002,23,"M",new int[]{92,88,76,89,92}); | |
students[2] = new Student("Beck Barber",8003,38,"M",new int[]{55,45,37}); | |
students[3] = new Student("Ann Walker",8004,26,"F",new int[]{65,67,58,66,41,48}); | |
students[1] = new Student("Lucy Boxer",8005,31,"F",new int[]{85,95,93,30,80,89}); |
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
public class Student { | |
private String name; | |
private int number; | |
private int age; | |
private String gender; | |
private int[] grade; | |
public Student(String stuName,int stuNumber,int stuAge,String stuGender, int[] stuGrade){ | |
this.name = stuName; | |
this.number = stuNumber; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>dependent_control</title> | |
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> | |
</script> | |
<script type="text/javascript" charset="utf-8"> |
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
public static class StringUtil | |
{ | |
public static string NullDefault(this string value, string valueIfNull) | |
{ | |
if (string.IsNullOrEmpty(value)) | |
return valueIfNull; | |
else | |
return value; | |
} | |
public static bool IsNullOrDefault(this string value, string valueIfNull, bool ignoreCase) |
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
public static class FormatUtil | |
{ | |
public static CustomDateFormat CustomFormat(this DateTime dateTime) | |
{ | |
return new CustomDateFormat(dateTime); | |
} | |
} | |
public class CustomDateFormat | |
{ |
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
CountryList= | |
{ | |
:af=>{:code2=>'AF', :code3=>'AFG', :numeric=>4, :iso_3166_2=>'ISO 3166-2:AF', :names=>{:en=>'Afghanistan', :zh_cn=>'阿富汗',:zh_tw=>'阿富汗'}}, | |
:al=>{:code2=>'AL', :code3=>'ALB', :numeric=>8, :iso_3166_2=>'ISO 3166-2:AL', :names=>{:en=>'Albania', :zh_cn=>'阿尔巴尼亚',:zh_tw=>'阿爾巴尼亞'}}, | |
:dz=>{:code2=>'DZ', :code3=>'DZA', :numeric=>12, :iso_3166_2=>'ISO 3166-2:DZ', :names=>{:en=>'Algeria', :zh_cn=>'阿尔及利亚',:zh_tw=>'阿爾及利亞'}}, | |
:as=>{:code2=>'AS', :code3=>'ASM', :numeric=>16, :iso_3166_2=>'ISO 3166-2:AS', :names=>{:en=>'American Samoa', :zh_cn=>'美属萨摩亚',:zh_tw=>'美屬薩摩亞'}}, | |
:ad=>{:code2=>'AD', :code3=>'AND', :numeric=>20, :iso_3166_2=>'ISO 3166-2:AD', :names=>{:en=>'Andorra', :zh_cn=>'安道尔',:zh_tw=>'安道爾'}}, | |
:ao=>{:code2=>'AO', :code3=>'AGO', :numeric=>24, :iso_3166_2=>'ISO 3166-2:AO', :names=>{:en=>'Angola', :zh_cn=>'安哥拉',:zh_tw=>'安哥拉'}}, | |
:ai=>{:code2=>'AI', :code3=>'AIA', :numeric=>660, :iso_3166_2=>'ISO 3166-2:AI', :names=>{:en=>'Anguilla', :zh_cn=>'安圭拉',:zh_tw=>'英屬安圭拉'}}, | |
:aq=>{:code2=>'AQ', :code |
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
using System.Threading; | |
using System.Collections.Generic; | |
using System; | |
namespace AutoLoader.Loader | |
{ | |
public interface IAutoLoadUnit | |
{ | |
void Abort(); | |
int CurrentThreadNumber { get; } |
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
/* | |
Sample Code for Ankoder API called via .NET C# | |
Written by William Yeung @ Gearbox Software (http://www.gearboxsoft.com) | |
*/ | |
const string PrivateKey = "YOUR_ANKODER_KEY"; | |
var ascii = Encoding.ASCII; | |
var date = DateTime.Now.ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss") + " GMT"; | |
var action_url = "video.xml"; | |
string token=string.Format("-{0}-GET-/{1}-", date, action_url); |
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
def pdf_test | |
content="自從陳生有品味咖啡(不是老廉那一杯…) 大家開始對精品咖啡 (Speciality Coffee)產生興趣了。不過,相信大家都有試過買到一杯無 Crema,無 Body,難飲至極的Espresso (筆者當然沒有例外)。其實,有一些基本的觀察可以讓大家知道那一間 Espresso Bar 的水平可不可能做到好的 Espresso 咖啡。(注意,現在我們針對的是 Espresso(當然也包括 Espresso Base 的牛奶咖啡如Latte/Cuppucino),其他的咖啡 Serve 方法不一定可以用同樣的方法評估的)。 | |
一定要有一部磨式磨豆機 (Burr Grinder)。常見的有 Mazzer Mini/Super Jolly, Compak K series, 小一點的有 Rancilio Rocky。如果你見到刀式磨豆機 (Blade Grinder)你可以走了…. 刀式磨豆機磨不到粗幼一致的咖啡粉,又因為轉速太高會加熱咖啡使咖啡油揮發,所以並不是一個可用的選擇。 | |
Mazzer Super Jolly。大部份磨式磨豆機都有一個儲豆漏斗(Hopper),因為它們需要用豆的重量把豆推入平刀磨/圓錐刀磨內。 | |
刀式磨豆機(又被戲稱為砍豆機),用高速刀把豆砍散,不能控制磨豆的粗幼,又產生大量熱力,任何情況下都不應用來磨咖啡。 | |
現時大部份Espresso Bar 都會用手動量份器 (Manual Doser),不過有不少的咖啡店會先磨大量的咖啡。事實上咖啡豆被磨成粉之後30分鐘已經有相當大的分別,所以除非你見到那一間咖啡店其門如市,否則… 要不要光顧就自己衡量了…. | |
一個半滿的 Doser… |
OlderNewer