Install pandoc on Mac OS X 10.8
$ brew install haskell-platform| package com.jteso.hadoop.contrib.inputformat; | |
| import java.io.IOException; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.BytesWritable; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.mapreduce.InputSplit; | |
| import org.apache.hadoop.mapreduce.RecordReader; | |
| import org.apache.hadoop.mapreduce.TaskAttemptContext; |
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |
| //return an array of objects according to key, value, or key and value matching | |
| function getObjects(obj, key, val) { | |
| var objects = []; | |
| for (var i in obj) { | |
| if (!obj.hasOwnProperty(i)) continue; | |
| if (typeof obj[i] == 'object') { | |
| objects = objects.concat(getObjects(obj[i], key, val)); | |
| } else | |
| //if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
| if (i == key && obj[i] == val || i == key && val == '') { // |
| import java.io.IOException; | |
| import org.apache.http.HttpEntity; | |
| import org.apache.http.HttpHost; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.auth.AuthScope; | |
| import org.apache.http.auth.UsernamePasswordCredentials; | |
| import org.apache.http.client.AuthCache; | |
| import org.apache.http.client.ClientProtocolException; | |
| import org.apache.http.client.methods.HttpGet; |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.client.methods.HttpPost; | |
| import org.apache.http.entity.StringEntity; | |
| import org.apache.http.impl.client.DefaultHttpClient; | |
| public class TestLogin { |
| import java.util.List; | |
| import java.util.Map; | |
| import org.activiti.engine.HistoryService; | |
| import org.activiti.engine.ManagementService; | |
| import org.activiti.engine.RuntimeService; | |
| import org.activiti.engine.TaskService; | |
| import org.activiti.engine.history.HistoricVariableInstance; | |
| import org.activiti.engine.impl.persistence.entity.ExecutionEntity; |
| /** | |
| * 更改流程实例的流程定义ID | |
| * @param processInstanceId | |
| * @param processDefinitionId | |
| */ | |
| @Transactional | |
| public void changeProcessDefinitionId(String processInstanceId, String processDefinitionId) { | |
| long count = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).count(); | |
| if (count == 0) { | |
| throw new ServiceException("指定的流程定义不存在!"); |
$ brew install haskell-platform| ## Output pattern : date [thread] priority category - message | |
| log4j.rootLogger=${log4j.rootLogger} | |
| # | |
| ##Console | |
| log4j.appender.Console=org.apache.log4j.ConsoleAppender | |
| log4j.appender.Console.layout=org.apache.log4j.PatternLayout | |
| log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n | |
| # | |
| ##RollingFile | |
| log4j.appender.RollingFile.encoding=UTF-8 |
| angular.module('myApp', ['ngRoute']) | |
| .provider('Weather', function() { | |
| var apiKey = ""; | |
| this.getUrl = function(type, ext) { | |
| return "http://api.wunderground.com/api/" + | |
| this.apiKey + "/" + type + "/q/" + | |
| ext + '.json'; | |
| }; |