<!DOCTYPEhtml><htmllang="en"><head><!-- Meta, title, CSS, favicons, etc. --><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="description"content=""><metaname="author"content=""><title>Bootstrap</title><!-- Bootstrap core CSS --><linkhref="./dist/css/bootstrap.css"rel="stylesheet"><!-- Documentation extras --><linkhref="./assets/css/docs.css"rel="stylesheet"><linkhref="./assets/css/pygments-manni.css"rel="stylesheet"><linkrel="shortcut icon"href="./assets/ico/favicon.png"></head><bodyclass="bs-docs-home"><!-- Docs master nav --><divclass="navbarnavbar-inversenavbar-fixed-topbs-docs-nav"><divclass="container"><ahref="./"class="navbar-brand">Bootstrap 3 RC1</a><buttonclass="navbar-toggle"type="button"data-toggle="collapse"data-target=".bs-navbar-collapse"><spanclass="icon-bar"></span><spanclass="icon-bar"></span><spanclass="icon-bar"></span></button><divclass="nav-collapsecollapsebs-navbar-collapse"><ulclass="navnavbar-nav"><li><ahref="./getting-started">Getting started</a></li><li><ahref="./css">CSS</a></li><li><ahref="./components">Components</a></li><li><ahref="./javascript">JavaScript</a></li><li><ahref="./customize">Customize</a></li></ul></div></div></div><!-- Page content of course! --><divclass="bs-masthead"><divclass="container"><h1>Bootstrap 3</h1><pclass="lead">Sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.</p><p><ahref="http://getbootstrap.com/bs-v3.0.0-rc1-dist.zip"class="btnbtn-bsbtn-large"onclick="_gaq.push(['_trackEvent','Jumbotron actions','Download','Download 3.0.0 RC1']);">Download Bootstrap</a></p></div></div><scriptsrc="./assets/js/jquery.js"></script><scriptsrc="./dist/js/bootstrap.js"></script><scriptsrc="./assets/js/holder.js"></script><scriptsrc="./assets/js/application.js"></script></body></html>
importjava.util.Scanner;publicclassLife{publicstaticvoidshow(boolean[][]grid){String s ="";for(boolean[] row : grid){for(boolean val : row)if(val) s +="*";else s +="."; s +="\n";}System.out.println(s);}publicstaticboolean[][]gen(){boolean[][] grid =newboolean[10][10];for(int r =0; r <10; r++)for(int c =0; c <10; c++)if(Math.random()>0.7) grid[r][c] =true;return grid;}publicstaticvoidmain(String[]args){boolean[][] world =gen();show(world);System.out.println(); world =nextGen(world);show(world);Scanner s =newScanner(System.in);while(s.nextLine().length()==0){System.out.println(); world =nextGen(world);show(world);}}publicstaticboolean[][]nextGen(boolean[][]world){boolean[][] newWorld
=newboolean[world.length][world[0].length];int num;for(int r =0; r < world.length; r++){for(int c =0; c < world[0].length; c++){ num =numNeighbors(world, r, c);if(occupiedNext(num, world[r][c])) newWorld[r][c] =true;}}return newWorld;}publicstaticbooleanoccupiedNext(intnumNeighbors,booleanoccupied){if( occupied &&(numNeighbors ==2|| numNeighbors ==3))returntrue;elseif(!occupied && numNeighbors ==3)returntrue;elsereturnfalse;}privatestaticintnumNeighbors(boolean[][]world,introw,intcol){int num = world[row][col] ?-1:0;for(int r = row -1; r <= row +1; r++)for(int c = col -1; c <= col +1; c++)if(inbounds(world, r, c)&& world[r][c] ) num++;return num;}privatestaticbooleaninbounds(boolean[][]world,intr,intc){return r >=0&& r < world.length && c >=0&& c < world[0].length;}}
// Cross-browser xml parsingvarparseXML=function(data){varxml,tmp;if(!data||typeofdata!=="string"){returnnull;}try{if(window.DOMParser){// Standardtmp=newDOMParser();xml=tmp.parseFromString(data,"text/xml");}else{// IExml=newActiveXObject("Microsoft.XMLDOM");xml.async=false;xml.loadXML(data);}}catch(e){xml=undefined;}if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);}returnxml;};// Bind a function to a context, optionally partially applying any arguments.varproxy=function(fn,context){vartmp,args,proxy;if(typeofcontext==="string"){tmp=fn[context];context=fn;fn=tmp;}// Quick check to determine if target is callable, in the spec// this throws a TypeError, but we will just return undefined.if(!jQuery.isFunction(fn)){returnundefined;}// Simulated bindargs=core_slice.call(arguments,2);proxy=function(){returnfn.apply(context||this,args.concat(core_slice.call(arguments)));};// Set the guid of unique handler to the same of original handler, so it can be removedproxy.guid=fn.guid=fn.guid||jQuery.guid++;returnproxy;};Sound.play=function(){}Sound.prototype={ something; }Sound.prototype.play=function(){}Sound.prototype.play=myfuncvarparser=document.createElement('a');parser.href="http://example.com:3000/pathname/?search=test#hash";parser.hostname;// => "example.com"
\documentclass[12pt]{article}% options include 12pt or 11pt or 10pt
% classes include article, report, book, letter, thesis
\title{This is the title}\author{Author One \\ Author Two}\date{29 February 2004}\usepackage{pstricks}\setlength{\textheight}{12.5cm}\setlength{\textwidth}{16.0cm}\newcommand{\cloud}[1]{\psset{unit=#1cm}\pspicture(2,4)
\psarc(2,0){1.25}{210}{35}\psarc(0,0){1.25}{105}{320}\psarc(0.2,.75){.75}{45}{145}\psarc(1.8,.5){1.15}{5}{150}%
\endpspicture}\setlength{\parindent}{0mm}\setlength{\parskip}{5mm}\begin{document}\maketitleThis is the content of this document.
This is the 2nd paragraph.
Here is an inline formula:
$V=\frac{4\pir^3}{3}$.
And appearing immediately below
is a displayed formula:
$$V=\frac{4\pir^3}{3}$$This is a cloud size 0.3: ~~~~~\cloud{0.3}This is a cloud size 0.9: ~~~~~\cloud{0.9}\end{document}
localIO=require"kong.tools.io"localutils=require"kong.tools.utils"localcache=require"kong.tools.database_cache"localstringy=require"stringy"localconstants=require"kong.constants"localresponses=require"kong.tools.responses"localtimestamp=require"kong.tools.timestamp"-- Define the plugins to load here, in the appropriate order
localplugins={}local_M={}localfunctionload_plugin_conf(api_id,consumer_id,plugin_name)localcache_key=cache.plugin_configuration_key(plugin_name,api_id,consumer_id)localplugin=cache.get_and_set(cache_key,function()localrows,err=dao.plugins_configurations:find_by_keys{api_id=api_id,consumer_id=consumer_id~=nilandconsumer_idorconstants.DATABASE_NULL_ID,name=plugin_name}iferrthenreturnresponses.send_HTTP_INTERNAL_SERVER_ERROR(err)endif#rows>0thenreturntable.remove(rows,1)elsereturn{null=true}endend)ifpluginandnotplugin.nullandplugin.enabledthenreturnpluginelsereturnnilendendlocalfunctioninit_plugins()configuration.plugins_available=configuration.plugins_availableandconfiguration.plugins_availableor{}print("Discovering used plugins. Please wait..")localdb_plugins,err=dao.plugins_configurations:find_distinct()iferrthenerror(err)end-- Checking that the plugins in the DB are also enabled
for_,vinipairs(db_plugins)doifnotutils.table_contains(configuration.plugins_available,v)thenerror("You are using a plugin that has not been enabled in the configuration: "..v)endendlocalunsorted_plugins={}-- It's a multivalue table: k1 = {v1, v2, v3}, k2 = {...}
for_,vinipairs(configuration.plugins_available)dolocalloaded,mod=utils.load_module_if_exists("kong.plugins."..v..".handler")ifnotloadedthenerror("The following plugin has been enabled in the configuration but is not installed on the system: "..v)elseprint("Loading plugin: "..v)localplugin_handler=mod()localpriority=plugin_handler.PRIORITYandplugin_handler.PRIORITYor0-- Add plugin to the right priority
locallist=unsorted_plugins[priority]ifnotlistthenlist={}end-- The list is required in case more plugins share the same priority level
table.insert(list,{name=v,handler=plugin_handler})unsorted_plugins[priority]=listendendlocalresult={}-- Now construct the final ordered plugin list
-- resolver is always the first plugin as it is the one retrieving any needed information
table.insert(result,{resolver=true,name="resolver",handler=require("kong.resolver.handler")()})-- Add the plugins in a sorted order
for_,vinutils.sort_table_iter(unsorted_plugins,utils.sort.descending)do-- In descending order
ifvthenfor_,pinipairs(v)dotable.insert(result,p)endendendreturnresultend
usestrict;## This script also prints the contents of all the listed files, but
# it first scans through the list to check that each file exists and
# is readable. It will stop if there are any errors.
#my$bad=0;foreachmy$fn(@ARGV){if(!-r$fn){# File cannot be read. See if it exists or not for a better
# error message.
if(-e$fn){printSTDERR"You do not have permission to read $fn.\n";}else{printSTDERR"File $fn does not exist.\n";}# One way or the other, it's bad.
$bad=1;}}# If there was a problem, bail out.
if($bad){exit2;}# Copy all the files.
while(my$fn=shift@ARGV){# Open the file.
if(!open(INFILE,$fn)){# We know the file is readable, but sometimes something else goes
# wrong. It's safer to check.
printSTDERR"Cannot open $fn: $!\n";next;}# Copy it.
while(my$l=<INFILE>){print$l;}closeINFILE;}
<?php// base class with member properties and methods
classVegetable{var$edible;var$color;functionVegetable($edible,$color="green"){$this->edible=$edible;$this->color=$color;}functionis_edible(){return$this->edible;}functionwhat_color(){return$this->color;}}// end of class Vegetable
// extends the base class
classSpinachextendsVegetable{var$cooked=false;functionSpinach(){$this->Vegetable(true,"green");}functioncook_it(){$this->cooked=true;}functionis_cooked(){return$this->cooked;}}// end of class Spinach
?>
geom_dotplot<-function(mapping=NULL,data=NULL,stat="bindot",position="identity",na.rm=FALSE,binwidth=NULL,binaxis="x",method="dotdensity",binpositions="bygroup",stackdir="up",stackratio=1,dotsize=1,stackgroups=FALSE,...){ GeomDotplot$new(mapping= mapping,data= data,stat= stat,position= position,na.rm= na.rm,binwidth= binwidth,binaxis= binaxis,method= method,binpositions= binpositions,stackdir= stackdir,stackratio= stackratio,dotsize= dotsize,stackgroups= stackgroups,...)}GeomDotplot <-proto(Geom,{ objname <-"dotplot"new<-function(.,mapping=NULL,data=NULL,stat=NULL,position=NULL,...){# This code is adapted from Layer$new. It's needed to pull out the stat_params
# and geom_params, then manually add binaxis to both sets of params. Otherwise
# Layer$new will give binaxis only to the geom.
stat <- Stat$find(stat)match.params<-function(possible,params){if("..."%in%names(possible)){ params
}else{ params[match(names(possible),names(params),nomatch=0)]}} params <-list(...)# American names must be changed here so that they'll go to geom_params;
# otherwise they'll end up in stat_params
params <-rename_aes(params) geom_params <-match.params(.$parameters(), params) stat_params <-match.params(stat$parameters(), params) stat_params <- stat_params[setdiff(names(stat_params),names(geom_params))]# Add back binaxis
stat_params <-c(stat_params,binaxis=params$binaxis)# If identical(position, "stack") or position is position_stack() (the test
# is kind of complex), tell them to use stackgroups=TRUE instead. Need to
# use identical() instead of ==, because == will fail if object is
# position_stack() or position_dodge()
if(!is.null(position)&&(identical(position,"stack")||(is.proto(position)&& position$objname =="stack")))message("position=\"stack\" doesn't work properly with geom_dotplot. Use stackgroups=TRUE instead.")if(params$stackgroups && params$method =="dotdensity"&& params$binpositions =="bygroup")message('geom_dotplot called with stackgroups=TRUE and method="dotdensity". You probably want to set binpositions="all"')do.call("layer",list(mapping= mapping,data= data,stat= stat,geom= .,position= position,geom_params= geom_params,stat_params= stat_params,...))}reparameterise<-function(.,df,params){ df$width <- df$width %||%
params$width %||% (resolution(df$x,FALSE)*0.9)# Set up the stacking function and range
if(is.null(params$stackdir)|| params$stackdir =="up"){stackdots<-function(a) a -.5 stackaxismin <-0 stackaxismax <-1}elseif(params$stackdir =="down"){stackdots<-function(a)-a +.5 stackaxismin <--1 stackaxismax <-0}elseif(params$stackdir =="center"){stackdots<-function(a) a -1-max(a -1)/2 stackaxismin <--.5 stackaxismax <-.5}elseif(params$stackdir =="centerwhole"){stackdots<-function(a) a -1-floor(max(a -1)/2) stackaxismin <--.5 stackaxismax <-.5}# Fill the bins: at a given x (or y), if count=3, make 3 entries at that x
df <- df[rep(1:nrow(df), df$count),]# Next part will set the position of each dot within each stack
# If stackgroups=TRUE, split only on x (or y) and panel; if not stacking, also split by group
plyvars <- params$binaxis %||% "x" plyvars <-c(plyvars,"PANEL")if(is.null(params$stackgroups)||!params$stackgroups) plyvars <-c(plyvars,"group")# Within each x, or x+group, set countidx=1,2,3, and set stackpos according to stack function
df <-ddply(df, plyvars,function(xx){ xx$countidx <-1:nrow(xx) xx$stackpos <-stackdots(xx$countidx) xx
})# Set the bounding boxes for the dots
if(is.null(params$binaxis)|| params$binaxis =="x"){# ymin, ymax, xmin, and xmax define the bounding rectangle for each stack
# Can't do bounding box per dot, because y position isn't real.
# After position code is rewritten, each dot should have its own bounding box.
df$xmin <- df$x - df$binwidth /2 df$xmax <- df$x + df$binwidth /2 df$ymin <- stackaxismin
df$ymax <- stackaxismax
df$y <-0}elseif(params$binaxis =="y"){# ymin, ymax, xmin, and xmax define the bounding rectangle for each stack
# Can't do bounding box per dot, because x position isn't real.
# xmin and xmax aren't really the x bounds, because of the odd way the grob
# works. They're just set to the standard x +- width/2 so that dot clusters
# can be dodged like other geoms.
# After position code is rewritten, each dot should have its own bounding box.
df <-ddply(df,.(group), transform,ymin=min(y)- binwidth[1]/2,ymax=max(y)+ binwidth[1]/2) df$xmin <- df$x + df$width * stackaxismin
df$xmax <- df$x + df$width * stackaxismax
# Unlike with y above, don't change x because it will cause problems with dodging
} df
}
classHTMLProcessor# called before parsing anything
defstart_parsing(scope_name)@line=""@offset=0@text=[]end# called after parsing everything
defend_parsing(scope_name)@text.each_with_index do|line,index|@text[index]="<span class='l l-#{index+1}#{scope_name.gsub('.','')}'>#{line}</span>"endputs@text.join("")end# called before processing a line
defnew_line(line_content)@offset=0@line= line_content.clone@text<<@lineenddefopen_tag(tag_name,position_in_current_line) tag ="<s class='#{tag_name.gsub(".","")}'>"@line.insert(position_in_current_line +@offset, tag)@offset+= tag.size
enddefclose_tag(tag_name,position_in_current_line) tag ="</s>"@line.insert(position_in_current_line +@offset, tag)@offset+= tag.size
endendsyntax =Textpow.syntax('ruby')# or 'source.ruby' or 'lib/textpow/syntax/source.ruby.syntax'
processor =HTMLProcessor.newsyntax.parse(text, processor)requireFile.expand_path('../boot',__FILE__)require'rails/all'ifdefined?(Bundler)# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets=>%w(development test)))# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
endrequire'rubygems'# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE']||=File.expand_path('../../Gemfile',__FILE__)require'bundler/setup'ifFile.exists?(ENV['BUNDLE_GEMFILE'])