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
.ui-autocomplete { | |
position: absolute; | |
top: 100%; | |
left: 0; | |
right: auto; | |
z-index: 1000; | |
display: none; | |
min-width: 160px; | |
_width: 160px; | |
padding: 8px 0px; |
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
[setattr(self, attr, opts.pop(attr)) for attr in ['refresh_token', 'expires_in', 'expires_at'] if opts.has_key(attr)] |
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
/** Class: Strophe.WebSocket | |
* XMPP Connection manager. | |
* | |
* Thie class is the main part of Strophe. It manages a BOSH connection | |
* to an XMPP server and dispatches events to the user callbacks as | |
* data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, and legacy | |
* authentication. | |
* | |
* After creating a Strophe.Connection object, the user will typically | |
* call connect() with a user supplied callback to handle connection level |
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
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
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 : statistics.erl | |
%%% Author : whoppix <[email protected]> | |
%%% Description : | |
%%% | |
%%% Created : 26 Jul 2009 by <[email protected]> | |
%%%------------------------------------------------------------------- | |
-module(statistics). | |
-export([start/0, start_link/0, init/0, loop/0]). | |
-compile([export_all]). |
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
bits(0, R)-> | |
R; | |
bits(N, R) -> | |
B = N band ((bnot N) + 1), | |
bits(N bxor B, lists:append(R, [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
def bits(n): | |
while n: | |
b = n & (~n+1) | |
yield b | |
n ^= b | |
>>> for b in bits(109): | |
print(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
byte_size(V). | |
599833 | |
binary:replace(V, <<0>>, <<>>, [global]). | |
binary:part(V,{10, 1000}). | |
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
curl -XDELETE http://localhost:9200/ac-test | |
curl -XPUT http://localhost:9200/ac-test | |
curl -XPUT http://localhost:9200/ac-test/people/1 -d ' | |
{ | |
"firstNames" : "James Earl", | |
"lastName" : "Jones", | |
"location" : "Hollywood, CA" | |
}' | |
curl -XPUT http://localhost:9200/ac-test/people/2 -d ' |
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
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example: | |
- Use create in the index API (assuming you can). | |
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval). | |
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap. | |
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000). | |
- Increase the memory allocated to elasticsearch node. By default its 1g. | |
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine. | |
- Increase the number of machines you have so |
OlderNewer