system.cpu.idle
: % Idle CPUsystem.cpu.system
: % System CPUsystem.cpu.user
: % User CPU
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
package testsupport; | |
import org.concordion.api.ResultSummary; | |
import org.concordion.internal.FixtureRunner; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.FrameworkMethod; | |
import org.junit.runners.model.InitializationError; | |
import org.junit.runners.model.Statement; | |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
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
InputStreamReader reader = new InputStreamReader(inputStream); | |
ByteArrayOutputStream outputStream = null; | |
try { | |
Document document = new Document(); | |
outputStream = new ByteArrayOutputStream(); | |
PdfWriter.getInstance(document, outputStream); | |
Map<String, String> pc2 = new HashMap<String, String>(); | |
pc2.put("line-height", "115%"); |
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
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>buildnumber-maven-plugin</artifactId> | |
<version>1.1</version> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<goals> | |
<goal>create</goal> | |
</goals> |
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
/* ImageCropper.java */ | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
public class ImageCropper { |
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
import static org.junit.Assert.*; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import org.junit.Test; | |
import org.junit.experimental.runners.Enclosed; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Parameterized; | |
import org.junit.runners.Parameterized.Parameters; |
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 ExampleController { | |
@RequestMapping(value = {"/blah", ""}) | |
public @ResponseBody Map<String, Object> blah(@Valid Blah blah, BindingResult errors, ModelMap model) { | |
if (errors.hasErrors()) { | |
return ModelUtils.mapBuilder().put("status", "errors").build(); | |
} | |
return ModelUtils.mapBuilder().put("status", blah.getFirst() + " " + blah.getLast()).build(); | |
} | |
public static class Blah { |
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
<#ftl strip_whitespace=true> | |
<#import "spring.ftl" as spring /> | |
<#-- This file contains form-related macros for use in the other Freemarker template files. | |
The generated HTML is intended for use with Twitter Bootstrap based forms. --> | |
<#-- | |
* radioButtons | |
* | |
* @param path the name of the field to bind to |
This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.
Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.
See a demo at http://stuff.dan.cx/js/filepicker/google/
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
import static groovy.json.JsonOutput.* | |
def config = ['test': 'lalala'] | |
println prettyPrint(toJson(config)) |
OlderNewer