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
2019/02/26 18:15:19 [TRACE] vertex 'root.alicloud_db_instance.default': evaluating | |
2019/02/26 18:15:19 [TRACE] [walkValidate] Entering eval tree: alicloud_db_instance.default | |
2019/02/26 18:15:19 [TRACE] root: eval: *terraform.EvalSequence | |
2019/02/26 18:15:19 [TRACE] root: eval: *terraform.EvalValidateResourceSelfRef | |
2019/02/26 18:15:19 [TRACE] root: eval: *terraform.EvalGetProvider | |
2019/02/26 18:15:19 [TRACE] root: eval: *terraform.EvalInterpolate | |
2019/02/26 18:15:19 [TRACE] root: eval: *terraform.EvalValidateResource | |
2019/02/26 18:15:19 [TRACE] [walkValidate] Exiting eval tree: alicloud_db_instance.default | |
2019/02/26 18:15:19 [TRACE] dag/walk: walking "provider.alicloud (close)" | |
2019/02/26 18:15:19 [TRACE] vertex 'root.provider.alicloud (close)': walking |
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
location ~ /api/v1/cards/(\w+)/(\w+) { | |
if ($request_method = OPTIONS ) { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; | |
add_header 'Access-Control-Allow-Headers' 'Cache-Control,Content-Type,If-Modified-Since'; | |
return 204; | |
} | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; | |
add_header 'Access-Control-Allow-Headers' 'Cache-Control,Content-Type,If-Modified-Since'; |
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
// TEST | |
lab.test('it returns 500 error on failure', function (done) { | |
scope = nock(nockUrl) | |
.get('/some/endpoint') | |
.reply(500); | |
request = { | |
method: 'GET', | |
url: '/some/endpoint |
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
angular.module('xyzApp', [ | |
'....' | |
'uiGmapgoogle-maps', | |
'ui.bootstrap', | |
'duScroll', | |
'base64', | |
'angularModalService', | |
'oc.lazyLoad' | |
]) | |
.config(['uiGmapGoogleMapApiProvider', function(uiGmapGoogleMapApiProvider) { |
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
cp /opt/index_data/data/solr/searchdp/conf/* /data/solr/searchdp/conf/ | |
cp /opt/index_data/data/solr/searchdp_tablet/conf/* /data/solr/searchdp_tablet/conf/ | |
cp /opt/index_data/data/solr/searchhtl/conf/* /data/solr/searchhtl/conf/ | |
cp /opt/index_data/data/solr/searchns/conf/* /data/solr/searchns/conf/ | |
cp /opt/index_data/data/solr/searchsmp/conf/* /data/solr/searchsmp/conf/ | |
cp /opt/index_data/data/solr/solr.xml /data/solr/solr.xml |
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
function getHalResource(req, path, callback) { | |
var headers = {}; | |
headers['Content-Type'] = 'application/hal+json'; | |
var options = { | |
method: 'GET', | |
headers: headers | |
} | |
requestResource(req, path, options, callback); |
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
.config(function ($httpProvider) { | |
var logsOutUserOn401 = ['$q', '$location', function ($q, $location) { | |
var success = function (response) { | |
return response; | |
}; | |
var error = function (response) { | |
if (response.status === 401) { | |
//redirect them back to login page | |
$location.path('/s/login'); |
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
NSDecimal newPoint[2]; | |
new_point = Pointer.new(NSDecimal.type, 2) | |
NSDecimalRound(&newPoint[0], &newPoint[0], 0, NSRoundPlain); | |
NSDecimalRound(new_point, new_point, 0, NSRoundPlain) | |
int x = [[NSDecimalNumber decimalNumberWithDecimal:newPoint[0]] intValue]; |
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
(main)> bag = NanoStore::Bag.bag | |
=> #<NanoStore::Bag:0x8c930b0> | |
(main)> NanoStore.shared_store.addObject(bag, error:nil) | |
=> true | |
(main)> bag.setName "cars" | |
=> #<NanoStore::Bag:0x8c930b0> | |
(main)> user = User.create(8, 'demo', 23, bag.name) | |
=> #<User:0x8c93800> | |
(main)> user.save | |
=> #<User:0x8c93800> |
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 OpenEndedRange | |
attr_reader :first, :last | |
def initialize(first, last, exists = {}) | |
exists = { first => true, last => true }.merge(exists) | |
@first, @last, @first_exists, @last_exists = first, last, exists[:first], exists[:last] | |
end | |
def first_exists? | |
@first_exists |
NewerOlder