Skip to content

Instantly share code, notes, and snippets.

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
public static class FormatUtil
{
public static CustomDateFormat CustomFormat(this DateTime dateTime)
{
return new CustomDateFormat(dateTime);
}
}
public class CustomDateFormat
{
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)
<?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">
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;
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});
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]")