This file contains 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
.vacA {display:table; height: 100%; width:100%; position: relative;} | |
.vacB {*position: absolute; top: 50%; display: table-cell; vertical-align: middle;} | |
.vacC {*position: relative; top: -50%;} |
This file contains 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
/* | |
* Download "UniversalDetector" from here: https://code.google.com/p/juniversalchardet/ | |
*/ | |
public class FindEncoding { | |
private FindEncoding(){} | |
public static String findEncoding(byte[] bytes) { | |
UniversalDetector detector = new UniversalDetector(null); | |
detector.handleData(bytes, 0, bytes.length); |
This file contains 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
style "gtkcompact" { | |
font_name="Sans 9" | |
GtkButton::default_border={0,0,0,0} | |
GtkButton::default_outside_border={0,0,0,0} | |
GtkButtonBox::child_min_width=0 | |
GtkButtonBox::child_min_heigth=0 | |
GtkButtonBox::child_internal_pad_x=0 | |
GtkButtonBox::child_internal_pad_y=0 | |
GtkMenu::vertical-padding=1 | |
GtkMenuBar::internal_padding=0 |
This file contains 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 java.math.BigInteger; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.BadPaddingException; | |
import javax.crypto.Cipher; | |
import javax.crypto.IllegalBlockSizeException; | |
import javax.crypto.NoSuchPaddingException; | |
import javax.crypto.spec.SecretKeySpec; |
This file contains 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
http://www.nsftools.com/stubby/ApacheAxisClientTips.htm |
This file contains 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
# Neo4j Documentation | |
# http://neo4j.com/docs/stable/preface.html | |
# start graph server | |
neo4j start | |
# import from `sql` file | |
# note: be sure that neo4j started | |
neo4j-shell -file <path-to-file> |
This file contains 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
# File path: | |
# /etc/apache2/httpd.conf # in mac: /private/etc/apache2/httpd.conf | |
... | |
# Enable `php` module | |
LoadModule php5_module libexec/apache2/libphp5.so | |
... | |
... | |
# Add or change ServerName |
This file contains 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
# Generate entities with specific namespace | |
php cli-config.php orm:convert-mapping --namespace='Entity\' --force --from-database annotation library/ | |
# ... and generate setter/getter methods | |
php cli-config.php orm:generate-entities library/ --generate-annotations=true | |
# Note!!! | |
# If you want to generate only one table add `filter` parameter! | |
php cli-config.php orm:convert-mapping --namespace='Entity\' --force --from-database annotation library/ --filter="<table-name>" | |
# Generate tables in DB via classes |
This file contains 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
// select db | |
use test; | |
// create a user with db role(s) (http://docs.mongodb.org/manual/reference/built-in-roles/) | |
db.createUser( { user: "test", pwd: "changeit", roles: [ { role: "dbOwner", db: "test" } ] } ); |
This file contains 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 com.hazelcast.client.HazelcastClient; | |
import com.hazelcast.client.config.ClientConfig; | |
import com.hazelcast.core.HazelcastInstance; | |
import com.hazelcast.spring.cache.HazelcastCacheManager; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.cache.CacheManager; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration |
OlderNewer