start new:
tmux
start new with session name:
tmux new -s myname
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.Matchers.allOf; | |
import static org.hamcrest.Matchers.any; | |
import static org.hamcrest.Matchers.anyOf; | |
import static org.hamcrest.Matchers.anything; | |
import static org.hamcrest.Matchers.describedAs; | |
import static org.hamcrest.Matchers.endsWith; | |
import static org.hamcrest.Matchers.equalTo; | |
import static org.hamcrest.Matchers.equalToIgnoringWhiteSpace; | |
import static org.hamcrest.Matchers.instanceOf; |
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
#!/bin/sh | |
echo 'deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free' > /etc/apt/sources.list.d/squeeze-backports.list | |
apt-get update | |
apt-get -t squeeze-backports install linux-base initramfs-tools linux-image-3.2.0-0.bpo.4-amd64 |
NSVisualEffectMaterial constants, and the undocumented materials they coorespond to in various modes: | |
+----------------------+-------+----------+------+---------+ | |
| MATERIAL # | LIGHT | LIGHT EM | DARK | DARK EM | | |
+----------------------+-------+----------+------+---------+ | |
| | | | | | | |
| 0 - Appearance Based | 3 | 3 | 5 | 5 | | |
| | | | | | | |
| 1 - Light | 3 | 3 | 3 | 3 | | |
| | | | | | | |
| 2 - Dark | 4 | 4 | 4 | 4 | |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
package com.company.project.controllers; | |
import com.company.project.model.api.ErrorJson; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.autoconfigure.web.ErrorAttributes; | |
import org.springframework.boot.autoconfigure.web.ErrorController; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.web.context.request.RequestAttributes; |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import javax.script.Invocable; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; |
If you use the findAll(Specification, Pageable) method, a count query is first executed and then the | |
data query is executed if the count returns a value greater than the offset. | |
For what I was doing I did not need pageable, but simply wanted to limit my results. This is easy | |
to do with static named queries and methodNameMagicGoodness queries, but from my research (googling | |
for a few hours) I couldn't find a way to do it with dynamic criteria queries using Specifications. | |
During my search I found two things that helped me to figure out how to just do it myself. | |
1.) A stackoverflow question. |