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
package com.sriniproj.callback; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
public class CallBack { | |
public static Object invoke(Object scope, String methodName, | |
Object... parameters) { | |
Object object = null; |
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
package com.srini.util; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.CopyOnWriteArrayList; | |
public class NullSimulator implements Runnable | |
{ | |
public static Map<String,List<String>> map=new HashMap<String, List<String>>(); |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<script language="javascript" type="text/javascript"> | |
<!-- | |
// Define two simple functions | |
var add_2 = function(x) { | |
return x + 2; | |
}; | |
var double = function(x) { |
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 org.apache.spark.storage.StorageLevel | |
import org.apache.spark.streaming.{ Seconds, StreamingContext } | |
import org.apache.spark.streaming.StreamingContext._ | |
import org.apache.spark.streaming.twitter._ | |
import org.sedis._ | |
import redis.clients.jedis._ | |
object TwitterWordCount { | |
def main(args: Array[String]) { |
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
:: Name: Startup.Cmd.cmd | |
:: Purpose: Initializes a Windows command prompt shell | |
:: Author: stevejansen_github@mac.com | |
:: Revision: April 2012 | |
@ECHO OFF | |
SETLOCAL ENABLEEXTENSIONS | |
:: self-install this script, but, don't force an overwrite if an auto run script is already configured | |
IF /I "%~1"=="/install" ( |
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
# Remove old data | |
curl -XDELETE "http://localhost:9200/testindex" | |
# Create index with mapping | |
curl -XPOST "http://localhost:9200/testindex/" -d ' | |
{ | |
"mappings" : { | |
"testtype" : { | |
"properties" : { | |
"available_for_client" : { |
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
################################################### | |
################################################### | |
# Crash course | |
################################################### | |
################################################### | |
En | |
################################################### | |
# Quickstart | |
################################################### |
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
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
sudo dpkg -i scala-2.11.4.deb | |
sudo apt-get update |
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
# stacktrace java as one message | |
multiline { | |
#type => "all" # no type means for all inputs | |
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)" | |
what => "previous" | |
} | |
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
# stacktrace java as one message | |
multiline { | |
#type => "all" # no type means for all inputs | |
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)" | |
what => "previous" | |
} | |
OlderNewer