Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
| curl -XDELETE localhost:9200/twitter | |
| curl -XPOST localhost:9200/twitter -d ' | |
| {"index": | |
| { "number_of_shards": 1, | |
| "analysis": { | |
| "filter": { | |
| "mynGram" : {"type": "nGram", "min_gram": 2, "max_gram": 10} | |
| }, | |
| "analyzer": { "a1" : { |
| curl -XDELETE localhost:9200/twitter | |
| curl -XPOST localhost:9200/twitter -d ' | |
| {"index": | |
| { "number_of_shards": 1, | |
| "analysis": { | |
| "filter": { | |
| "snowball": { | |
| "type" : "snowball", | |
| "language" : "English" |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.example.helloworld</groupId> | |
| <artifactId>hello-world</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <dependencies> | |
| <dependency> |
| Returning only the first N records in a SQL query differs quite a bit between database platforms. Here's some samples: | |
| Microsoft SQL Server | |
| SELECT TOP 10 column FROM table | |
| PostgreSQL and MySQL | |
| SELECT column FROM table | |
| LIMIT 10 | |
| Oracle |
| There are lots of ways to select a random record or row from a database table. Here are some example SQL statements that don't require additional application logic, but each database server requires different SQL syntax. | |
| Select a random row with MySQL: | |
| SELECT column FROM table | |
| ORDER BY RAND() | |
| LIMIT 1 | |
| Select a random row with PostgreSQL: | |
| SELECT column FROM table |
| echo "<133>Dec 3 16:00:00 host1 webapp1: learning something new" > /dev/udp/10.0.0.111/514 |
| export ip="127.0.0.1"; export COUNTER=0; while [ $COUNTER -lt 100 ]; do dt=`date "+%Y-%m-%dT%H:%M:%S"`"+10:00";echo "<165>1 $dt host1:Knock, Knock..." > /dev/udp/$ip/514; let COUNTER=COUNTER+1; done |