Skip to content

Instantly share code, notes, and snippets.

@keke1123
keke1123 / ElasticsearchJavaExample
Last active Aug 29, 2015
Elasticsearch for Java API Simple Example
View ElasticsearchJavaExample
/**
* Elasticsearch Java API Example
*/
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse;
import org.elasticsearch.action.admin.indices.mapping.delete.DeleteMappingResponse;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse;
@keke1123
keke1123 / FormBinder.js
Created Nov 24, 2015
Simple jQuery data form binder script
View FormBinder.js
function print(msg) {
if (console.log) {
console.log(msg);
return;
}
alert(msg);
}
var FormBinder = function (id, submitFunction) {
if (!jQuery) {
print('jQuery not loaded');
You can’t perform that action at this time.