Posts

elasticsearch - Migrating to Aggregations from Date histogram facet builder with querystring -

i trying migrate aggregations date histogram facet builder going through following url. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-facets-migrating-to-aggs.html i able convert few queries aggregations , got proper results, throwing exception while converting following facet query aggregations query. facet : { "facets": { "lapp442.corp.com:timer_micro.99percentile": { "date_histogram": { "key_field": "@timestamp", "value_field": "timer_micro.99percentile", "interval": "30s" }, "facet_filter": { "query": { "filtered": { "query": { "query_string": { "query": "lapp442.corp.com" ...

javascript - Passed function has a variable not working -

i have below javascript getting error: uncaught typeerror: responsehandler not function var message = { initialmessagelist: function(profile_id) { $('.messages-list profile'+ profile_id).html = '<div class="message-loader profile"+ profile_id><i class="fa fa-spinner fa-spin"></i></div>'; message.fetchmessagelist(profile_id, message.initialmessagelisthandler('', profile_id)); } initialmessagelisthandler: function(data, profile_id) { $('.messages-list .message-loader profile'+ profile_id).remove(); $('.messages-list profile'+ profile_id).html(message.getmessagelisthtml(data)); message.bindmessagelist(); $('.open-message profile'+ profile_id).first().click(); }, fetchmessagelist: function(query, responsehandler) { $.ajax({ url: '/app/messages/fetch/...

How to show the long blob image from database in phpexcel? -

i have table store data of image in long blob type, how retrieve image show in phpexcel? sample of code: $order = "select * tblorder"; $tblorder = $conn->query($order); $row_order = $tblorder->fetch(pdo::fetch_assoc); $image =$row_order["image"]; $data = base64_encode($image); $objdrawing = new phpexcel_worksheet_memorydrawing(); $objdrawing->setname('image'); $objdrawing->setdescription('image'); $objdrawing->getindexedfilename($data); $objdrawing->setrenderingfunction(phpexcel_worksheet_memorydrawing::rendering_jpeg); $objdrawing->setmimetype(phpexcel_worksheet_memorydrawing::mimetype_default); $objdrawing->setcoordinates('a85'); $objdrawing->setworksheet($sheet->getactivesheet());

mongodb - Modify default value of field from mongo-engine django -

i have following models class xyz(document): done_project_categories = listfield(stringfield(), default=['all', 'residential', 'corporate', 'commercial']) i want change default value following , migrate onto mongodb class xyz(document): done_project_categories = listfield(stringfield(), default=['all', 'residential', 'corporate', 'commercial', 'cafes']) i not able migrate onto datebase , looking exact command migrate changes onto mongodb. i using mongo-engine interact database django.

javascript - How to add an empty data point to a linechart on Chart.js? -

i'm trying add empty data points throughout line chart using chart.js. have this: var data = { labels: [ "1","2","3","4","5","6","7","8","9","10" ], datasets: [ { label: "traffic", data: null,null,20,40,null,null,null,10,20,null } ] }; the problem linechart recognizes first 2 "nulls" being empty data points , doesn't display them. however, nulls come after, line (connecting previous , next valid datapoint) shown, makes seem if "null"-datapoints exist. there way not display null-values in linecharts? (similar canvas.js offer: http://canvasjs.com/docs/charts/basics-of-creating-html5-chart/empty-null-data-points-chart/ ) i read through chart.js documentation , stackoverflow not find answer. can me? ...

android - Is it possible to mediate Interstitial ads using AdMob? -

i have set admob mediation in android app, it's working fine, want admob mediate interstitial ads other providers. unable find or documentation on that, asking here. this code have banner mediation: mmsdk.initialize(this); millennialextras = new millennialadapterextras(); inmobiextras = new inmobiadapterextras(); mopubextras = new mopubextras(); flurryagent.init(this, "some id"); flurryextras = new flurryadapterextras(); madview = (adview) findviewbyid(r.id.adview); adrequest = new adrequest.builder() .addnetworkextras(millennialextras) .addnetworkextras(inmobiextras) .addnetworkextras(mopubextras) .build(); madview.loadad(adrequest); and ads start rolling. now interstitials, trying this: in oncreate have this: interstitialad = new interstitialad(mainactivity.this); interstitialad.setadunitid("some id"); adrequestinterstitial = new adrequest.builder(...

ios - Working with APNS in production apps -

using apns in small environments , low volume notifications not problem. the problem (for me @ least) how work apns limitations in large, high volume of notifications environment. apns has limitations (by design) make harder smooth work constant connecting , disconnecting apns might considered dos attack. leads me believe need batch-send notifications every few seconds , not have "real time" sending there no knowledge if notification has arrived or sent succesfully. when there error, returned, , when returned might not immediate. when notification causes error (for example due bad token) connection closed apns, , rest of notifications in batch won't sent destination, might still sent apns , lost forever (no feedback on success, there no knowledge happened them). how real-life production apps work apns work around mentioned problems? should save notifications send , each check if error returned? should put them in queue? should face fact there notifications...