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
*** Settings *** | |
Library Selenium2Library | |
*** Testcases *** | |
Open website without popup | |
Open Browser http://www.kuala-lumpur.ws chrome | |
Maximize Browser Window | |
Add Cookie cms_COUT_Domain B path=\/ domain=www.kuala-lumpur.ws | |
Execute Javascript jQuery(document).ready() |
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
def hamming(a, b): | |
return sum(x != y for x, y in map(None, a, b)) |
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
*** Settings *** | |
Library Selenium2Library | |
*** Variables *** | |
${GOOGLE URL} http://www.google.com | |
${KEYWORD INPUT} lst-ib | |
${SEARCH BUTTON} btnG | |
*** Testcases *** | |
ทดสอบค้นหา Google |
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
POST /myindex | |
{ | |
"settings": { | |
"number_of_shards": 2, | |
"data_path": "/tmp/myindex" | |
} | |
} |
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
$ ./configure --enable-gcov | |
$ make lcov |
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.example; | |
import android.test.ActivityInstrumentationTestCase2; | |
import android.test.suitebuilder.annotation.LargeTest; | |
import com.example.somkiat.calculate.MyActivity; | |
import com.example.somkiat.calculate.R; | |
import static android.support.test.espresso.Espresso.onView; | |
import static android.support.test.espresso.action.ViewActions.click; |
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
เท่าที่มา สิ่งที่บอกว่า Solr ทำได้คือ แบบนี้ | |
http://blog.jteam.nl/2009/10/20/result-grouping-field-collapsing-with-solr/ | |
ทำให้สามารถ distinct result กลับออกมาเพียง กลุ่มละ 1 ตัวได้ | |
ตัวอย่างข้อมูล 3 ข้อมูล | |
PUT ec/product/1 | |
{ | |
"name" : "ABC", |
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
PUT ec/product/1 | |
{ | |
"name" : "ABC", | |
"price" : 123, | |
"category" : ["1", "2"] | |
} | |
PUT ec/product/2 | |
{ |
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
value class Point { | |
int x; | |
int y; | |
Point(int x, int y) { this.x = x; this.y = y } | |
} |
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 ข้อมูลเข้า Elasticsearch | |
ใช้เครื่องมือตัวนี้ | |
https://github.com/taskrabbit/elasticsearch-dump | |
เมื่อติดตั้งเสร็จใช้คำสั่งดังนี้ | |
$elasticdump \ | |
--bulk=true \ | |
--input=homepro.json \ |