Skip to content

Instantly share code, notes, and snippets.

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/animation.dart';
import 'package:gr_life/constants.dart';
class SplashPage extends StatefulWidget {
@override
SplashPageState createState() => new SplashPageState();
}
@strokine
strokine / Server.java
Created April 21, 2016 17:20
This code demonstrates the problem creating Geode Locator and Server in the same process
import com.gemstone.gemfire.distributed.LocatorLauncher;
import com.gemstone.gemfire.distributed.ServerLauncher;
public class Server {
public static void main(String[] args){
new LocatorLauncher.Builder()
.setBindAddress("localhost")
.setPort(7300)
.build()
@strokine
strokine / gist:7665fbaa53bff3b1dcbf
Created September 24, 2015 19:53
Search by "qq" term
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"hits": {
"total": 3,
@strokine
strokine / gist:4e3aca9980076016166f
Created September 24, 2015 19:50
Search by "ww" term
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"hits": {
"total": 3,
@strokine
strokine / Match All query
Created September 24, 2015 19:46
All documents
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"hits": {
"total": 3,
::: [es-01][QOEV_4pISlqESttN3X8urQ][localhost][inet[/10.132.244.105:9300]]
Hot threads at 2015-07-31T04:33:12.339Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:
75.1% (375.6ms out of 500ms) cpu usage by thread 'elasticsearch[es-01][search][T#3]'
5/10 snapshots sharing following 19 elements
org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:157)
org.apache.lucene.search.Weight.bulkScorer(Weight.java:131)
org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.bulkScorer(ConstantScoreQuery.java:141)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
@strokine
strokine / gist:dc209dacbebf958fd0be
Created July 10, 2015 06:52
/_nodes/hot_threads
::: [es-3][dLcodqFYSWmlzMhMWN9u3g][inet[/10.128.1.236:9300]]
76.8% (383.8ms out of 500ms) cpu usage by thread 'elasticsearch[es-3][cache][T#16]'
8/10 snapshots sharing following 13 elements
sun.nio.ch.NativeThread.current(Native Method)
sun.nio.ch.NativeThreadSet.add(NativeThreadSet.java:46)
sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:670)
org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:162)
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:270)
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:136)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007f252ec607d2, pid=2244, tid=139796788266752
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.31-b07 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libzip.so+0x117d2] newEntry+0x62
#
@strokine
strokine / EsId.java
Last active September 30, 2020 07:14
Utility to populate data from ElasticSearch results to POJO and from POJO to ElasticSearch Source for indexing
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface EsId {
}
Notifications [Java Application]
mycomp.command.Notifications at localhost:52658
Thread [Timer-0] (Running)
Daemon Thread [Poller SunPKCS11-Darwin] (Running)
Thread [DestroyJavaVM] (Running)
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java (Jun 13, 2012 1:40:47 AM)
------------------
Notifications [Java Application]
mycomp.command.Notifications at localhost:56610