Posts

Showing posts from March, 2013

Service Fabric with Java on Windows -

is possible create sf using java on windows environment? happens cluster provisioned on azure? contain jvm? i've been trying create sf using eclipse in windows environment have vs 2015 , both sf sdks work. any suggestion? thanks sf windows environment doesnt support java based sateless/stateful , reliable actor services. supported in linux (ubuntu 16.0 lts) run guest executable on windows.

php - Woocommerce - Cart not updates either adding/deleting items -

when update cart adding 1 item cart, or try removing 1 element checkout ... happens: https://media.giphy.com/media/l0hlgc5w88oxkykzq/giphy.gif i update add cart button on item page, shows update number updates 1 less or same before where there files check errors? thanks

internet explorer - The value of input (text / hidden) empty in IE 11 (Edge), "back" or history.back () for second time -

"forward" or "back" navigation buttons on ie 11 (edge) of windows 7 or can move history history.forward (), history.back () in first history display, entered value restored, in second history display, value entered becomes empty. is problem of ie 11 (edge)? windows 10 (edge) browser same. values not empty ie 8 in compatibility mode, values after ie 9 empty. in firefox, chrome, safari, opera, value not empty. example operation. input form a. (1) enter value in <input type = "text" name = "a1" value = ""> text box. (2) send pressing <input type = "submit" name = "send" value = "send">, transition input form b occurs. input form b. (1) enter value in <input type = "text" name = "a1" value = ""> text box. (2) send pressing <input type = "submit" name = "send" value = "send">, transition input form c mad

javascript - No click event when rendering a js.erb partial -

what happens dom when re-render partial js.erb ? can no longer click events. based on this tutorial , have followed re-render js.erb partial works fine. when click "cat.name" button (on linked page), , on page button i'm listening click events not working. the run down: on index page, click event works. when make request from_category , no more click event. happen? html: <button id="test" value="ok">click</button> js: $( "#test" ).on("click", function(e) { console.log(e.target.value) }); you click events don't bind new dom elements should use event delegation bubble events newly created dom elements $('body').on('click input keypress','.the_dynamic_element',function(){ });

AngularJS / ui-router - Restoring pagination position on back? -

i have paginated search results page , want able go previous page, happens state reset , i'm on page 1. i store page in cookies/local storage, there better way? perhaps this ? might over-kill simple.

php - Redis error ERR wrong number of arguments for 'hmset' -

i'm using yiisoft/yii2-redis yii2 component interact redis , it's working charm when comes retrieving data keep getting following error i'm trying use set commands! redis error: err wrong number of arguments 'hmset' command redis command was: hmset userapi:57d120d1d13f4a3e4d1e2217 ratelimit 10 allowance 9 allowance_updated_at 1478594580 redis error: err wrong number of arguments 'set' command redis command was: set x 10 my code simply: $redis = yii::$app->redis; $redis->hmset('userapi:57d120d1d13f4a3e4d1e2217 ratelimit 10 allowance 9 allowance_updated_at 1478594580'); $redis->set('x 10'); noting when copy of these commands , paste redis-cli works! is there clues i'm missing something?! in advance. oops! fault found redis command params should passed arguments command function follows: $redis->hmset('userapi:57d120d1d13f4a3e4d1e2217', 'ratelimit', '10', 'allowance', 

how to Use BMP image file for background of winform in c# -

Image
i have winform , use image.bmp background of form , when run happened : it working problem background of datagridview don't want see behind datagridview how can run form showing datagridview normally? you need use loop , change color of each cell. after set datasource. foreach (datagridviewrow row in yourdatagridview.rows) { row.defaultcellstyle.backcolor = color.white; }

server - How can we open a file present on remote machine from local machine using FileDialog in swt in java? -

i want access file of remote machine ip address 10.11.201.170 . want point filedialog in d: drive of pc . why , have written following code : filedialog dialog = new filedialog(shell, swt.open); dialog.setfilterpath("//10.11.201.170/d:"); dialog.setfilterextensions(new string[] { "*.docx" }); string filename = dialog.open(); but filedialog not point d: drive of 10.11.201.170 pc . how can open filedialog in d: drive of remote pc ? is remoted server valid network storage? have mapped d: drive client machine? if not can't access using file system api filedialog

How to get the image URL from html code using Java -

this question has answer here: which html parser best? [closed] 3 answers given sample html below. how can image link http://lis.deped.gov.ph/uis/assets/rev/2630813/images/deped-logo.gif ? in case image link starts in // like //uis/assets/rev/2630813/images/deped-logo.gif` have add string before it. how regex? not want use http library. <div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#deped-uis-nav-collapse"><span class="sr-only">toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><span class="navbar-brand"><img class="logo" src="http://lis.deped.

linux - Best IPC for Raspberry Pi, POSIX MQ vs, Message Broker protocoll -

i'm developing software raspian should decentralized. there should processes getting sensor data, process running motor controllers, process controlling environmental variables, webserver web gui, database process, login process , main process putting together. should possible start interactions via web gui, remote procedure calls. started posix message queues, i'm not sure if right thing me. read message brokers rabbit mq, mosquitto, zeromq , on. advantage of using 1 of these in comparison posix mq? better approach using 1 of these? posix have program message broker myself? there implementations posix mq broker? far planned have message queue run internally rather connect several devices.

python - cross_val_score fails with tensorflow(skflow) -

i using python 3.5 tensorflow 0.11 , sklearn 0.18. wrote simple example code calculate cross-validation score iris data using tensorflow. used skflow wrapper. import tensorflow.contrib.learn skflow sklearn import datasets sklearn import cross_validation iris=datasets.load_iris() feature_columns = skflow.infer_real_valued_columns_from_input(iris.data) classifier = skflow.dnnclassifier(hidden_units=[10, 10, 10], n_classes=3, feature_columns=feature_columns) print(cross_validation.cross_val_score(classifier, iris.data, iris.target, cv=2, scoring = 'accuracy')) but got error below. seems skflow not compatible cross_val_score of sklearn. typeerror: cannot clone object '' (type ): not seem scikit-learn estimator not implement 'get_params' methods. is there other way deal problem?

c# - What is the equivalent of Assembly.GetEntryAssembly() in .NET Core? -

in .net framework starting assembly using: assembly.getentryassembly(); but removed .net core. there no appdomain. how can access entry assembly in .net core , windows universal applications? (i need find of embedded resource keys) assembly.getentryassembly() available in .net standard 1.5 , not in versions 1.0 through 1.4. if developing .net core , universal windows applications, version 1.5 should sufficient needs. if remember correctly, appdomain destined appear in .net standard 2.0 . not available now.

kaa - Error running EventDemo on Raspberry Pi with C -

i'm trying run eventdemo in c language on raspberry pi, tried c++ , got similar errors. event demo started 2016/11/08 9:04:37 [fatal] [kaa_bootstrap_manager.c:403] (-3) - error: no bootstrap servers's been found. please regenerate sdk. 2016/11/08 9:04:37 [warning] [kaa_channel_manager.c:260] (-6) - not find access point bootstrap channel [0x98da155c] (protocol: id=0x56c8ff92, version=1) 2016/11/08 9:04:37 [warning] [posix_kaa_client.c:394] (-8) - failed initialize channel, type 0 i follow tutorial on how compile raspberry pi c/c++. i'm running kaa 0.9 on sandbox, tested 1 application in java on host machine , runs kaa without problems.

Encrypt in PHP and decrypt in Python or openssl command line -

a lot of data in database took on contains encrypted fields. method used encrypt data following php code: <?php $text = "test 1234\ntest 2345\ntest 3456\ntest 4567"; $key = "0123456789abcdefghijklmnopqrstuv"; $enc = openssl_encrypt($text, "aes-256-cbc", $key); echo "raw: " . $text . "\n"; echo "key: " . $key . "\n"; echo "key (hex) " . bin2hex($key) . "\n"; echo $enc; echo "\n"; ?> when run code following output including warning empty initialization vector (iv), have ignore because whole db data encrypted way (i know should not done way). warning: openssl_encrypt(): using empty initialization vector (iv) potentially insecure , not recommended in /tmp/cp3_encdec/enc2.php on line 5 raw: test 1234 test 2345 test 3456 test 4567 key: 0123456789abcdefghijklmnopqrstuv key (hex) 303132333435363738396162636465666768696a6b6c6d6e6f70717273747576 upnxdo2k0gvy/+mw0yfr7utfsrndap8yyadx

javascript - Bootstrap: Popover dismiss not working in iOS browser -

i have used bootstrap popover , added js code popover dismiss on tap in body. works on android not ios. $(document).ready(function () { $("body").tooltip({ selector: "[data-toggle='tooltip']", container: "body" }) .popover({ selector: "[data-toggle='popover']", container: "body", html: true }); }); $('body').on('click', function (e) { $('[data-toggle="popover"]').each(function () { if(!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) { $(this).popover('hide'); } }); }); <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> &

hover - Google charts: hovering offset -

Image
i'm using google charts line chart hovering behavior strange. consistently highlights points right of cursor (see screenshot). know cause this? the problem caused div used displaying chart having bootstrap col-class. moving new div solved it. before: <div class="row"> <div class="col-sm-12 m-t" id="chart_div">loading chart</div> </div> after: <div class="row"> <div class="col-sm-12 m-t-xs"> <div id="chart_div">loading chart</div> </div> </div>

How to export multiple selected worksheets to another workbook using VBA -

i have source excel file contains worksheets starting "typical" name. have code export "typical" worksheet excel file using getopenfile name. part of code, have rename source worksheet value contained in cell "e3" , current date. attached code works fine me, can not select multiple "typical" sheets , export. can 1 suggest way loop through selected work sheets? sub export() application.displayalerts = false application.screenupdating = false dim wb1 workbook dim wb2 workbook dim sht worksheet dim dt string dim mntg string set wb1 = activeworkbook set sht = selection.worksheet dim shtname string ' shtname = cstr(sht.name) dt = cstr(format(date, "ddmmyy")) if left(shtname, 7) = "typical" mntg = cstr(range("e2").value) sht.name = mntg & "_" & dt filetoopen = application.getopenfilename _ (title:="choose excel file insert selected typical file", _ filefilter:=&qu

android - How to add two tables in one RecyclerView with different colour values -

Image
want make above type of recyclerview (in case). in above sample pic, expenses show in red colours zebra lines , income shows in green colours. i've write code expense table values , shown in recyclerview. want show income income table , make view same sample pic. kindly help. recyclerview expense values: arraylistexpense = new arraylist<>(); adapterviewitems adapter = new adapterviewitems(mainactivity.this, arraylistexpense); recyclerview = (recyclerview) findviewbyid(r.id.view_item_recycle_view); recyclerview.layoutmanager mlayoutmanager = new linearlayoutmanager(getapplicationcontext()); recyclerview.setlayoutmanager(mlayoutmanager); recyclerview.setadapter(adapter); cursor cursor = db.selectexpense(); cursor.movetofirst(); if (cursor.getcount() == 0) { toast.maketext(this, "empty list", toast.length_short).show(); } else { (int = 0; < cursor.getcount(); i++) {

raspberry pi - Rasbberrypi - picamera not working -

i have installed picamera package , when try run following program, end error. code:import time import picamera picamera.picamera() camera: camera.start_preview() time.sleep(2) camera.stop_preview() error: attributeerror: 'module' object has no attribute 'picamera' please suggest on resolving above error. regards, richi in case, should update installation command sudo apt-get update sudo apt-get upgrade , enable camera port using sudo raspi-config

ios - Wrong swipe direction in navigation in Right to Left -

i disable views rotation (process when hebrew language selected , views change positions left right) when phone has righttoleft localization: if (system_version_greater_than_or_equal_to(@"9.0")){ if (righttoleft) { [[uiview appearance] setsemanticcontentattribute:uisemanticcontentattributeforcelefttoright]; [[uinavigationbar appearance] setsemanticcontentattribute:uisemanticcontentattributeforcelefttoright]; } } everything looks fine, need swipe right-to-left return in previous view controller. how can set left right swipe direction navigation between viewcontrollers?

Server status banner image -

i'm not sure called, if there program dose it, or not. have tried sorts of searches on google , can't seem figure out. coming here last resort. i have game server , want have custom banner display on site image , not bunch of code css make way. example gametracker does. gametracker banner gametracker banner http://cache.www.gametracker.com/server_info/216.52.148.11:4560/b_560_95_1.png so have setup , displaying way want updating every 60 seconds or so. how have automatically converted image every 10 minutes way gametracker does? thanks in advance.

database - Oracle 11g Broken Materliazed view: Stop refresh without dropping view or refreshing view? -

so i've got materalized view(i know...) : create materialized view vw_my_view_here refresh complete start sysdate next sysdate + 1/24 /*huge-ass select statement here*/ union /*huge-ass select statement here*/ union /*huge-ass select statement here*/ union /*huge-ass select statement here*/ this has been present in our system time without causing issues. 1 of these select queries broken (somehow - presumibly schema changes in underlying tables) , has taken running 24 hours straight , consuming of boxes resources. problem other things on box. i can't drop or modify view - it's undocumented (i know...) , need figure out consumes it, how it's populated, etc. first. i tried killing process that's handling query, seems query fired straight away afterwards. how can stop materialized view without 1) dropping view , (2) without refreshing view (because that's taking 24+ hours , of our box resources). i've tried running alter materialized view vie

Exception thrown while running BIRT report using BIRT API -

unable open connection database connection profile. org.eclipse.datatools.connectivity.oda.odaexception ; java.lang.nullpointerexception @ org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.connection.open(connection.java:113) @ org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.connection.open(connection.java:57) @ org.eclipse.datatools.connectivity.oda.consumer.helper.odaconnection.open(odaconnection.java:250) @ org.eclipse.birt.data.engine.odaconsumer.connectionmanager.openconnection(connectionmanager.java:165) @ org.eclipse.birt.data.engine.executor.datasource.newconnection(datasource.java:224) @ org.eclipse.birt.data.engine.executor.datasource.open(datasource.java:212) @ org.eclipse.birt.data.engine.impl.datasourceruntime.openodidatasource(datasourceruntime.java:217) @ org.eclipse.birt.data.engine.impl.queryexecutor.opendatasource(queryexecutor.java:409) @ org.eclipse.birt.data.engine.impl.queryexecutor.prepareexecution(queryexecutor

amazon web services - S3/CloudFront, serve all files with header "Cache-Control: max-age=365000000, immutable" -

i have s3 bucket on top of there cloudfront cdn. this s3 bucket "immutable", means once upload file there, never delete or update it. safe clients cache files coming s3/cloudfront aggressively. currently, etags working great, , clients hit 304 responses of time. getting 304 response still involve roundtrip avoided more aggressive caching. so i'd behavior: cloudfront cdn cache should never invalidated, because s3 cache never changes. cloudfront not need ask again s3 file more once. think i've configured using cloudfront distribution settings. cloudfront should serve files header cache-control: max-age=365000000, immutable ( immutable new, partially supported value of 2016) i don't understand how can achieve desired result. should handle @ cloudfront or s3 level? i've read stuff configuring appropriate header each s3 file. isn't there global setting serve files custom http header use? should handle @ cloudfront or s3 level?

php - Using Laravel Goutte package for scrapping -

but have face problem scrapping targeted site shows me error "file_get_contents(): ssl operation failed code 1. openssl error messages: error:140770fc :ssl routines:ssl23_get_server_hello:unknown protocol" my code: <?php namespace app\http\controllers; use goutte\client; use symfony\component\domcrawler\crawler; use illuminate\http\request; use app\http\requests; use app\library\simple_html_dom; class webscrapercontroller extends controller { public function index() { // create new goutte client instance $client = new client(); // hackery allow https $guzzleclient = new \guzzlehttp\client([ 'timeout' => 60, 'verify' => false, ]); // create dom url or file $html = new \htmldom('https://www.example.com/'); foreach ($html->find('img') $element) { echo $element->src . '<br>'; }

Jenkins service stops immediately after started on Windows 7 -

please see this thread i have same issue in windows 7. don't have java.exe process running. observed every time start jenkins service following warning in windows event log: child process [300 - c:\program files (x86)\jenkins\jre\bin\java -xrs -xmx256m -dhudson.lifecycle=hudson.lifecycle.windowsservicelifecycle -jar "c:\program files (x86)\jenkins\jenkins.war" --httpport=8080] finished 0 no other process using 8080 port. this jenkins.out.log - running from: c:\program files (x86)\jenkins\jenkins.war webroot: envvars.masterenvvars.get("jenkins_home") jenkins home directory: c:\program files (x86)\jenkins found at: envvars.masterenvvars.get("jenkins_home") could please? thanks! update found in jenkins.err.log if of - picked _java_options: -djava.net.preferipv4stack=true nov 08, 2016 2:08:59 pm winstone.logger loginternal info: beginning extraction war file nov 08, 2016 2:08:59 pm org.eclipse.jetty.util.log.javau

javascript - .tz() in moment.js timezone does not convert time zones correctly -

Image
i having trouble when converting time zone time zone using moment.js. this code: convertselectedtimezonetoclients() { let timezoneinfo = { userstimezone: this.$rootscope.mtz.tz.guess(), utcoffset: this.formdata.timezone.offset, selecteddatetime: this.tojsonlocal(this.formdata.sessiondate) + " " + this.formdata.sessiontime }; let utctime = this.$rootscope.mtz.utc(timezoneinfo.selecteddatetime).utcoffset(timezoneinfo.utcoffset).format("yyyy-mm-dd hh:mm"); let con = this.$rootscope.mtz.tz(utctime, timezoneinfo.userstimezone).format(); return con; } the user picks date, time , time zone drop downs on client page. in timezoneinfo object storing userstimezone (i want able convert timezone user selected on page , convert local time zone). for example user picks: 11/08/2016 01:30 , utc+2 timezone , timezone utc+1, want show him in label: 11/08/2016 00:30 since utc+1 -1 hour comparing utc+2 timezone. i store offset

apache camel - Problems With Activiti OSGI and Blueprint -

i try use activiti in karaf osgi camel. i copied parts out of service mix configuration. <?xml version="1.0" encoding="utf-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:camel="http://camel.apache.org/schema/blueprint" xsi:schemalocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd" xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0" xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"> <ext:property-placeholder /> <!-- setting process engine configuration, using embedded h2 database our default aries transa

api - How to Identify the Error OR Reason for Empty Response Body from "Hubspot" to my own application -

i new using hubspot , trying use "hubspot integration" application. in hubspot application, used own url return response using webhooks. returns response "ok": sample url: http://requestb.in/1crqrit1 however, if put in application url, returns no response: empty string. my sample url : https://xxx/user_testinbound.cfm?dsname=xxx to response body used code: <cfparam name="dsname" default="xxx" /> <cfquery name="privlog" datasource="#dsname#"> insert tempmessage(message) values('hubspot inbound : #gethttprequestdata().content#' ) </cfquery> however, returns empty response. in message column shows hard coded value "hubspot inbound :". doesn't contain response body. message hubspot inbound : creationdate 2016-11-08 04:25:20.857 if use sample application "requestmaker" site post url, returns non empty response. ideas might issue?

Rancher: EC2 hosts not shown in Rancher UI -

i used docker-machine create rancher setup running on virtualbox. added 2 hosts, on virtualbox. now, i'm trying add ec2 host setup (this experiment rancher). i have seen this tutorial, wanted use docker-machine instead. to extend, have done following: mac-osx:~ wauterw$ docker-machine create -d amazonec2 --amazonec2-vpc-id vpc-84fd6de0 --amazonec2-region eu-west-1 --amazonec2-ami ami-c5f1beb6 --amazonec2-ssh-user rancher rancher-node-aws-01 running pre-create checks... creating machine... (rancher-node-aws-01) launching instance... waiting machine running, may take few minutes... detecting operating system of created instance... waiting ssh available... detecting provisioner... provisioning rancheros... copying certs local machine directory... copying certs remote machine... setting docker configuration on remote daemon... checking connection docker... docker , running! see how connect docker client docker engine running on virtual machine, run: docker-machine env ranch

javascript - If getValue equals this or that -

how getvalue of multiples? if equals or that? i've tried , doesn't act expect. range.getvalue() == "yes" || "no" || "repeat" basically want avoid this if (sheet.getname() == sheettowatch && range.getcolumn() == purchasedcolumn && range.getvalue() == "yes") { copyrow(); } else if (sheet.getname() == sheettowatch && range.getcolumn() == purchasedcolumn && range.getvalue() == "no") { copyrow(); } else if (sheet.getname() == sheettowatch && range.getcolumn() == purchasedcolumn && range.getvalue() == "repeat") { copyrow(); } function isin(x, a) { return a.indexof(x) > -1; } if (sheet.getname() == sheettowatch && range.getcolumn() == purchasedcolumn && isin(range.getvalue(), ["yes", "no", "repeat"])) { copyrow(); } isin takes value , array of possible values , checks if value in a

python - mysql use between values in a join statement -

i have following 2 tables dmu , ter >>> sqldf('select distinct begin, end dmu', globals()) begin end 0 56 65 >>> sqldf('select distinct begin, end ter', globals()) begin end 0 0 4 1 5 9 2 9 12 3 13 17 4 18 26 5 26 27 6 28 31 7 32 35 8 36 37 9 38 44 10 45 52 11 53 55 12 56 65 13 65 66 and want select rows ter.begin between dmu.begin - 15 , dmu.begin i.e. rows ter be: 10 45 52 11 53 55 12 56 65 13 65 66 so have tried: sqldf('select * dmu inner join ter on ter.begin between dmu.begin - 15 , dmu.begin', globals()) (i calling mysql python shouldn't matter). this returns empty table! why? can not use between statement in join statement? - 15 part throwing off somehow?

file - Return PDF to the Browser using Asp.net core -

i created wep api in asp.net core return pdf. here code: public httpresponsemessage get(int id) { var response = new httpresponsemessage(system.net.httpstatuscode.ok); var stream = new system.io.filestream(@"c:\users\shoba_eswar\documents\request.pdf", system.io.filemode.open); response.content = new streamcontent(stream); response.content.headers.contentdisposition = new system.net.http.headers.contentdispositionheadervalue("attachment"); response.content.headers.contentdisposition.filename = "newtab"; response.content.headers.contenttype = new system.net.http.headers.mediatypeheadervalue("application/pdf"); return response; } but returns json response: { "version":{ "major":1, "minor":1, "build":-1, "revision":-1, "majorrevision":-1, "minorrevision":-1 }, "content":{

asynchronous - TypeScript/Angular 2 - call a function after another completes -

i have 2 functions call, want call second 1 after first 1 completes. how go doing that? first function: getdirectorysubfolders(node: any) { console.log('home:getdirectorysubfolders() entered...'); this._sdiservice.getdirectoriesatpath("desktop") .subscribe(res => { this.nodechildren = res; }); } second function: getchildren(node: any) { console.log('home:getchildren entered..'); return new promise((resolve, reject) => { settimeout(() => resolve(this.nodechildren.map((c) => { return object.assign({}, c, {}); })), 1000); }); } there 2 simple ways call second function after first 1 finished - can under this.nodechildren = res; or use finish parameter () : getdirectorysubfolders(node: any) { console.log('home:getdirectorysubfolders() entered...'); this._sdiservice.getdirectoriesatpath("desktop") .subscribe(res =&

Create an excel file with a few styles using client side JavaScript (if possible using js-xlsx library) -

Image
i want create excel file(in .xlsx format) , make available download using client side javascript . able create sample file using js-xlsx library. not able apply styles it. @ least basic styles including background color header, bold font header , text wrapping cells required. js-xlsx library documentation says can give styles using cell object . i tried giving styles using cell object not reflecting in downloaded .xlsx file. tried reading .xlsx file , writing same file using xlsx.write() function. gives excel file no styles @ all. ideally expect downloaded file have same styles of uploaded file. no font color or background colors applied in recreated file. use excel 2013 testing downloaded files. please find below excel screenshots before , after uploading. original file downloaded file the code given below. <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> <script type="

node.js - Weird results from Blob Storage save action? -

Image
i using nodejs blob storage client store file in azure blob storage. return new rx.observable.create(function (observer) { _this.blobclient.createblockblobfromlocalfile("protofiles", path, e.file, function (error, result, response) { if (!error) { console.log("res: ", result); observer.next(result); } }); }); this returns results in following format: res: blobresult { container: 'protofiles', name: 'data/d812a55b-5631-4b40-81a9-e80151533112', lastmodified: 'tue, 08 nov 2016 12:14:29 gmt', etag: '"0x8d407d0ca7952d5"', requestid: 'ecfd5758-0001-0062-24b9-396984000000', contentsettings: { contentmd5: '846vto3orsab0whxpdpzvw==' } } which means results have first go through process of string manipulation before json can extracted out of this. doesn't feel normal , wondering if had experience sort of weirdly formed data. edit: tried pars

Make nginx treat another extension as mp4 -

i have converted animated gif animated.gif mp4 animated.mp4 .i rename animated.mp4 animated.gifv . how can tell nginx treat .gifv files mp4, here attempt far location ~* \.(mp4|gifv)$ { mp4; mp4_buffer_size 4m; mp4_max_buffer_size 10m; } you need set mime type: location ~* \.(mp4|gifv)$ { default_type video/mp4; mp4; mp4_buffer_size 4m; mp4_max_buffer_size 10m; } see this document more.

ruby - Understanding the tilde operator in Gemfile.lock -

i have dependency of following i18n (~> 0.6, >= 0.6.4) i've been having read through of ruby gems - declaring dependency guide and i've found out '~> 0.6' part means between 0.6 , 1.0 - correct me if that's wrong. but i'm still confused, mean second comma separated value? a colleague believes means >= 0.6.4, <= 0.7 but i'm not sure. short answer: pointed holger in comments, ~> 0.6, >= 0.6.4 means >= 0.6.4 , < 1.0 . the ~> operator called pessimistic operator (or twiddle-wakka), , objective guard gems potential bugs/failures in future releases. when you're building gem, must create special specification class , put in .gemspec file or in rakefile. class contains information gem, name, version, license , dependencies. and practice specify dependencies following pessimistic version constraint. therefore, notations ~> 0.6, >= 0.6.4 common. you can find more information here .

Android Bluetooth Ble Prevent Pair Request -

thanks check question. i used codes in android developer make ble connect: bluetoothdevice device = mbluetoothadapter.getremotedevice(address); if (device == null) { log.w(tag, "device not found. unable connect."); return false; } // want directly connect device, setting autoconnect // parameter false. if (mbluetoothgatt != null) { mbluetoothgatt.close(); mbluetoothgatt = null; } mbluetoothgatt = device.connectgatt(this, false, mgattcallback); but after codes worked, pair dialog show up, , don't need pair work, need connect client , send datas(the remote device need connect has been set "no need pair"), there way avoid pair call? thanks! the pairing dialog put if remote device sends "security request" packet, indicating pair. "no need pair" setting reason doesn't seem work correctly...

java - Why is this code block not running? -

i making diamond using ascii art. yes, know code beyond sloppy. anyways, last part not running inside of else block, leaving diamond not finished. full code: http://pastebin.com/14hnzade current output: http://pastebin.com/ytqkrrqe the loop: for(int = 1; i<=size; i++) { for(int j=1; j<=size; j++) { if(j<i) { system.out.print(" "); } else if(j==i || j>i) { system.out.print("*"); } else {//this block not executing, , not know why. for(int ki = 1; ki<=size; ki++) { // how fix it? for(int n = size; n>=1; n--) { if(j>=i) { system.out.print("*"); } else { system.out.print(" "); } } system.out.println(); } } } system.out.println(); } one of co

javascript - on text input focus explaining label appears -

basically need on text input focus explaining bar (what input does) needs appear (animation) text input bottom. have hard time figuring out, way in css or javascript, love hear guys explanations, ill upload mess code. seen solutions, form has lot of labels , lot of going on, super confusing, im pretty new @ also. here code: <div class="form-row"> <input type="text" name="firstname" id="nickas" class="input-text" placeholder="enter name:"> <label for="nickas">user name:</label> <label class="label-helper" for="nickas">this bar appears</label> </div> set additional class has opacity of 0 .label-helper , , toggle class using jquery 's focus , blur events: $('input').on('focus', function() { $(this).siblings('.label-helper').addclass('in'); }).on('blur', function() { $(

javascript - Gte and Lte in angularjs -

i using angularjs , getting data api, trying filter result problem lte working gte not working! $http.get($rootscope.baseurl + 'api/hotels/', { params: { page_size: $scope.page_size, page: $scope.page, goingto: goingto, ordering: $scope.sortby, price__lte: $scope.max_price_filter, price__gte: $scope.min_price_filter, star: $scope.filter.star, discount: 0 } if i'm correct there not params object request, , problem seems in backend not angularjs. angular docs hope helped.

c# - How to assign property values based on other property value of same object list -

my structure public struct lumcummulativedata { public byte[] lumid { get; set; } public float ledpwr { get; set; } public float batchargepwr { get; set; } public float batdischargepwr { get; set; } public float ledpwravg { get; set; } public float batchargepwravg { get; set; } public float batdischargepwravg { get; set; } public float ledpwrwh { get; set; } public float batchargewh { get; set; } public float batdischargewh { get; set; } public int count { get; set; } public string lumname { get; set; } } declaring list public static list<lumcummulativedata> cummulativedatalist = new list<lumcummulativedata>(); i assign value lumid cummulativedata.lumid = lumidbyte; (assigned id value) now want write condition such other property values of list object(same object) must assigned based on lumid matching lumid network packet. logic tried for(int i=0; i<cummulativedatalist.count(); i++) { b