Posts

Showing posts from April, 2011

c# 4.0 - NancyFx: Set response timeout on specific route -

short description of problem: need set timeout on specific route within nancyfx. the long description: have route which, when called, loads large number of files (between 50 , 200), adds them zip-file stream (with compression), saves stream storage , returns location of file frontend. the problem app times out before files has been added zip. so, correct way set timeout on specific route in nancyfx? you don't. should not running long running processes in http request. should off load request , poll result or give user link when it's ready.

How to call OpenSSL SRP APIs from Android app? -

i trying implement srp protocol server , client app in android. checked openssl supports srp protocol how can access openssl apis android app? jni way access openssl c apis? there samples can refer how build openssl android , call openssl srp apis through jni. i trying implement srp protocol i srp, too. sure use thomas wu's specification, or version 6 of ietf's specification. openssl supports srp protocol how can access openssl apis android app? jni way access openssl c apis? yes. you might bouncy castle java implementation. are there samples can refer how build openssl android... see openssl , android on openssl wiki. android carries around copy of openssl, i'm not sure of includes srp. are there samples can refer ... call openssl srp apis through jni. not aware. closest find source code s_client , options -srpuser <user> , , data structures srp_arg_st , , functions ssl_srp_verify_param_cb , ssl_give_srp_client

dotnet httpclient - C# multipart data uploading problems - InvalidOperationException -

i have problem posting files using multipartformdatacontent. try use filestream adding file content multipartformdatacontent var multipartmetadata = new multipartformdatacontent(); var filestream1 = file.open("sample1.txt"); var filestream2 = file.open("sample2.txt"); multipartmetadata.add(new streamcontent(filestream1), filedata.name, filedata.filename); multipartmetadata.add(new streamcontent(filestream2), filedata.name, filedata.filename); var client = new httpclient(); await client.postasync(uri, multipartmetadata); invalidoperationexception thrown during execution code. exception message "cannot close stream until bytes written". there ideas how fix ?

Laravel IO Socket and redis over SSL https connection -

currently have io sockets laravel broadcasting redis working perfectly. until set ssl cert on domain. i have redis-server running on port 3001. then there socket.js set listen 3000. my js on page listen via io('//{{ $listen }}:3000'). any guidance great on how working on https. use 443 port? thanks. my socket.js var app = require('express')(); var http = require('http').server(app); var io = require('socket.io')(http); var redis = require('ioredis'); var redis = new redis(); redis.subscribe('notifications', function(err, count) { }); redis.on('message', function(channel, message) { console.log('message recieved: ' + message); message = json.parse(message); io.emit(channel + ':' + message.event, message.data); }); http.listen(3000, function(){ console.log('listening on port 3000'); }); first, setup serveroptions object: var serveroptions = { port: 3000, h

Combining args in C# -

i'm trying create command using game framework doesn't support use of quotes create arguments spaces. tried merge every separate argument after first make final string use can't figure out i'm doing wrong: case "add": client.sendtoclient(pluginutils.createnotification(client.objectid, 8453888, "logged console")); string fullargs = ""; (int = 1; == args.length; i++ ) { fullargs = fullargs + args[i]; } console.writeline("[anti-spam] " + fullargs + " added filter list"); break; to clarify i'm using array index 1 begin because 0 part of command, 1 , beyond combine string. i'm not getting errors , getting blank output, can please or suggest better way? appreciated :) guessing should be: for (int = 1; < args.length; i++ ) { fullargs = fullargs + args[i]; } if args.length > 1, never populate fullargs

Nginx + uwsgi + Django: Error in url rewriting -

i'm trying deploy django project on under sub path of institute website. let's server ip is: x1.x2.x3.x4 . , xyz.edu/tnp probably points x1.x2.x3.x4/portal/ . structure of django project this: . |-- project | |-- app1 | |-- app2 | |-- project_nginx.conf | |-- project_uwsgi.ini | |-- db.sqlite3 | |-- manage.py | |-- media | |-- readme.md | |-- static | `-- uwsgi_params |-- readme.md |-- requirements | |-- base.txt | |-- dev.txt | |-- prod.txt | `-- test.txt |-- requirements.txt |-- static_cdn | |-- admin | ..... and url scheme in project/urls.py looks this: url(r'^app1/', include('app1.urls')), url(r'^app2/', include('app2.urls')), url(r'^admin/', include(admin.site.urls)), on local server, following scheme working perfectly. * 127.0.0.1:8000/app1/ * 127.0.0.1:8000/app1/login/ * 127.0.0.1:8000/app1/homepage/ * 127.0.0.1:8000/app2/somepage * 127.0.0.1:8000/admin/ i want map urls

What does enclosing a class in angle brackets "<>" mean in TypeScript? -

i new typescript , loving lot, how easy oop in javascript. stuck on trying figure out semantics when comes using angle brackets. from docs, have seen several example interface counter { (start: number): string; interval: number; reset(): void; } function getcounter(): counter { let counter = <counter>function (start: number) { }; counter.interval = 123; counter.reset = function () { }; return counter; } and interface square extends shape, penstroke { sidelength: number; } let square = <square>{}; i having trouble understanding means or way think of/understand it. could please explain me? that's called type assertion or casting. these same: let square = <square>{}; let square = {} square; example: interface props { x: number; y: number; name: string; } let = {}; a.x = 3; // error: property 'x' not exist on type `{}` so can do: let = {} props; a.x = 3; or: let = <pro

listview - Error android.view.InflateException: in android log cat -

am populating values listview json response.for have created 1 arrayadapter upon run code throwing error shown below. 08-08 19:06:39.939 28394-28394/com.inspirenetz.app.inpartner e/androidruntime: fatal exception: main process: com.inspirenetz.app.inpartner, pid: 28394 android.view.inflateexception: binary xml file line #19: error inflating class <unknown> @ android.view.layoutinflater.createview(layoutinflater.java:620) @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:56) @ android.view.layoutinflater.oncreateview(layoutinflater.java:669) @ andro

php - Need a regex solution to scrap -

Image
i trying scrap stack overflow's php newest questions on basis of 45 questions per page.i using simple_html_dom parsing. done couldn't scrape values no of answers given question using 2 seperate div tags. below code link check , attaching screenshot link of executed code gives. include_once('simple_html_dom.php'); function httpget($url) { $ch = curl_init(); curl_setopt($ch,curlopt_url,$url); curl_setopt($ch,curlopt_returntransfer,true); $output=curl_exec($ch); curl_close($ch); return $output; } $count=45; $url ='http://stackoverflow.com/questions/tagged/php?page=1&sort=newest&pagesize='.$count; $parse = httpget($url); $html = str_get_html($parse); for($i=0;$i<=$count;$i++){ $qu=$html->find('a[class=question-hyperlink]', $i)->href; $que='https://stackoverflow.com'.$qu; $question=$html->find('a[class=question-hyperlink]', $i)->plaintext; $link='<a href="'

Docker 1.12 Port Fowarding Services Across Nodes -

so i've got plex server running on docker swarm!! if kill node magically it'll start plex somewhere else. great! comes fun part... with old-school containers port forward port 32400 on router server running plex , work find. plex can run in multiple different places need figure out how forward port static resource. use haproxy bind bridge interface , run on every node provide failover...but i'd see if there's easier way accomplish this. what's best way forward ports services in docker swarm? port forwarding built new swarm mode. there's section on load balancing in documentation: the swarm manager uses ingress load balancing expose services want make available externally swarm. swarm manager can automatically assign service publishedport or can configure publishedport service in 30000-32767 range. external components, such cloud load balancers, can access service on publishedport of node in cluster whether or not node runni

java ee - Are activation specs required for message-driven beans? -

i have non-jms mdb i'm installing websphere liberty server. package mdb.test; import javax.ejb.messagedriven; @messagedriven() public class themdb implements myownlistener { public themdb() {} @override public void onmyownmessage(myownmessage message) {} } without further configuration, server gives following message: [warning ] cntr4015w : message endpoint themdb message-driven bean cannot activated because mdb.test/themdb activation specification not available. message endpoint not receive messages until activation specification becomes available. do mdbs have have activation specification? i'd activated, without having add further configuration server. essentially server telling founds message endpoint there nothing delivering messages it. need add activation specification (either jms or jca) allow bean receive messages. information on defining jca activation specs: http://www.ibm.com/support/knowledgecenter/sseqtp_8.5.5/com.ibm.webs

c++ - Type based on template argument value -

i have template function this: enum class myenum { enum_1, enum_2, enum_3 }; template<myenum e, typename t> void func( int ) { std::vector<t> somedata = ......; t somevalue; switch( e ) { case enum_1: somevalue += func1( somedata ); break; case enum_2: somevalue += func2( somedata ); break; case enum_3: somevalue += func3( somedata ); break; } } the type t dependent on value of e . i'd write code like template<myenum e> void func( int ) { if( e = myenum:enum_1 ) t = char; else t = float; std::vector<t> somedata = ......; t somevalue; switch( e ) { case enum_1: somevalue += func1( somedata, ..... ); break; case enum_2: somevalue += func2( somedata, ..... ); break; case enum_3: somevalue += func3( somedata, ..... );

javascript - Bundle multiple files with gulp and browserify -

i have project structure that: src |html |javascript |file_one.js |file_two.js |styles dist gulpfile.js my question is: how can bundle files within "javascript" folder root "dist" folder renaming bundle files in following way? file_one.js ----> file_one.bundle.js file_two.js ----> file_two.bundle.js i'm doing following, can't put bundle files root "dist" folder, and, don't know if pretty way. gulp.task("bundler", function(){ var src_arr = ['src/javascript/file_one.js', 'src/javascript/file_two.js']; src_arr.foreach(function(file) { var bundle = browserify([file]).bundle(); bundle.pipe(source(file.substring(0,file.indexof('.')) + ".bundle.js")) .pipe(gulp.dest('dist/')); }); }); any appreciated. thanks i guess more long comment "answer"… various ways deal multiple browserify entry points covered in browserify - multipl

cordova - How to make a request to a server when the iOS 9 app is closed? -

good day. i've been reading lot problem , there many questions previous versions of ios. i'm wondering, ios 9, can somehow send data server (a request 20-30kbs of payload data) if app not opened (so wasn't started or force-quit)? or still no-go of ios 9.3? i can go without receiving response server (i'm desperate) we have been fighting similar requirements long time. decided not it. apple suggests quick state log of app can restore same state when open app again. best thing when app go background is, write on disk might useful when app loads again. we tried connecting server every time user takes app background, saw lot of app crash issues after adding code. coz, os force quits app if taking time goto background. we decided store whatever info on disk , send server next time app open.

php - laravel mongodb nested collection relationship -

i using laravel mongodb collection in have relationship issues here collection of user in user have multiple addresses , addresses save in collection , ids save in user collection { "_id":objectid("52ffc33cd85242f436000001"), "contact": "987654321", "dob": "01-01-1991", "name": "tom benzamin", "address_ids": [ objectid("52ffc4a5d85242602e000000"), objectid("52ffc4a5d85242602e000001") ] } for getting user information , addresses information have make 2 query 1 user , other addresses can possible user info addresses in single query using eloquent relationship. sorry new in mongodb collection. you don't need save document id's of addresses in user document trying achieve. laravel clean code, ain't clean. make following relationships: user > hasmany > addresses addresses > belongsto > user to load user object in larav

Android: BroadcastReceiver Time limit -

are there time limits defined actions run inside broadcastreceiver.onreceive method? onreceive() called on main application thread, same thread drives ui. in general, want onreceive() return in under millisecond, in case ui in foreground, not freeze ui (a.k.a., have "jank"). there 5-10 second limit, after android crash app. however, cannot reliably fork background thread onreceive() , once onreceive() returns, process might terminated, if not in foreground. for manifest-registered receiver, typical pattern have onreceive() delegate work intentservice , has own background thread and, being service, tells os process still doing work , should let process run bit longer.

java - Should I use one global Retrofit instance or create one for each request in Android? -

well, lost in using retrofit now... @ first write singleton helper class hold service instance created retrofit instance. convenient service , make http request, find can't access token sharedpreferences, because helper instance static. because use authenticator interface deal authentication, not possible pass access token when making request. try extend application class , hold application instance in static field, android studio give me warning( do not place android context classes in static fields; memory leak (and breaks instant run) ). so have choice: write static helper method that, each request, accepts access token, build retrofit instance, create service instance , make request. confusing whether best practice. what's difference between reusing 1 service instance , creating service each request? ps: word service above refers service instance created someretrofit.create(someserviceinterface.class) , not android.app.service . i suggest go ahead singleto

file get contents - php file_get_contents executes twice -

i have created script check in backup tapes our tape library , check them in tsm. script activated sms. our sms server receives command start check-in , executes script on tsm server file_get_contents command. i have issue script being executed twice when there allot of tapes check in(+20). results errors on out tsm server because move media commands allso double. i overcame putting in inital timestamp logging when first file_get_content started commands arent executed twice. allthough fixes double command issue still presents problem because sms server sends confirmation script started or not. means on every check in +20 tapes, operator gets 2 messages, 1 saying check in failed, other check in started. i suspect caused because of time takes commands passed onto tsm server (can take upto 45seconds). long story short, there way can set sort of longer timeout, or give parameter/checks prevent behaviour? in advance. paths replaced *****. sms server code //drm checkin

javascript - Passing value through the ng-include tag -

i new angular js. have requirement values database user.html. in page (user.html) need call details.html using ng-include tag call details.html. while calling need pass values details.html, value dynamic, dynamic value need pass details.html. example: routemanager.js: .when( '/mydetails', { templateurl : "./client/assets/views/user.html", controller : "mydetailscontroller" }) user.html: <div ng-include="'client/assets/views/details.html'" {{here need pass 2 parameters }}></div> details.html: <h1>{{need display 2 parameters}}</h1> note: details.html there not controller. need without controller. you can use onload: <div ng-include="'mycomponent.html'" ng-controller="mycomponentcontroller" onload="myitem = myitemvalue"> </div> this recommended way in documentation.

scroll - VB.Net: Space between dynamically added controls on form increases if you pause -

purpose: create textboxes , labels dynamically , place them on form. i've enabled autoscroll setting on form able see controls. problem: clicking 'add' button without more seconds pause creates no problem. however, @ (random) point space between controls become arbitrarily large. seems have amount of time wait click button reason. more details: there no timer on form, don't see how factor 'time' have any effect on spacing the variable affecting position of controls number of controls added (which i've checked during run-time - checks out). rest constants. i've tried same on panel. same problem occurrs. it never same unwanted distance added, seems increasing longer wait. my form: public class form1 'public public mytextbox, boxes(0), minboxes(0), maxboxes(0), cusboxes(0) textbox public lngtextboxcount, lngcusboxcount long public mylabel label 'local 'settings public lngantaltests long = 10

ruby on rails - disable sidekiq in staging -

i've got sidekiq set in rails app , fine. now want disable stagin env only. i can change redis password in yml file, sure there must better (more elegant way) stop workers in 1 env. btw, kill process in box every time deploy staging ( capistrano-sidekiq ), creates new process. maybe like: require 'capistrano-sidekiq' if fetch(:stage) != 'staging'

Limitations for Firebase Notification Topics -

i want use firebase notification android application , want know is there limitation number of topics ? or number of users can subscribe topic ? example can have 10000 topics 1 million users each of them ? there no limitation on number of topics or subscriptions. there limitation of 1 million subscriptions first year after topics launched restriction removed @ year's (2016) google i/o. fcm supports unlimited topics , subscribers per app. see docs confirmation .

doctrine2 - How to setup a custom form/page within EasyAdminBundle -

i have been able build simple crud app project using symfony easyadminbundle , has worked great normal entity based use cases. have additional use cases though want things rebuilding data. these have capture request attributes, pass on controller , delegate backend api call remote service. this can done in symfony running trouble how wire easyadmin view/method of working. ideally want page inside easy admin , not lose left menu etc. far, way have found create model class using 1 of existing tables has properties need drive api. override controller actions rather default save, handle against remote api. the problem approach bound doctrine entities , problematic requests not mappable database. is there way define logical entity let me leverage associations can have lookups etc, wire bundle seamlessly, not tied backend database table or view? i'd solve problem creating custom action as explained here (probably want route-based action) , use template extends @easyad

javascript - error TS2384: Overload signatures must all be ambient or non-ambient -

i'm trying configure new webpack + angular2 project , i'm getting errors: when use "npm start", got lot of errors this: error in ./~/reflect-metadata/reflect.ts (953,21): error ts2384: overload signatures must ambient or non-ambient. error in ./~/reflect-metadata/reflect.ts (985,21): error ts2384: overload signatures must ambient or non-ambient. error in ./~/reflect-metadata/reflect.ts (1021,21): error ts2384: overload signatures must ambient or non-ambient. error in /home/gchiara/desenvolvimento/honda/typings/globals/node/index.d.ts (2301,5): error ts2309: export assignment cannot used in module other exported elements. here code: package.json { "name": "app", "version": "1.0.0", "description": "app", "main": "index.js", "scripts": { "test": "echo \"error: no test specified\" && exit 1", "ty

I'm beginner in php and I don't understand what is means the 'cid=' -

i'm beginner in php , don't understand means 'cid=' , example have php page 'view_category.php' , saw in youtube video expalined write <a href='view_category.php?cid="$id." i don't understand how working? how page create? create view_category, how possible see pages difference id. the 'cid=' not constant in php can value name or name. referred url parameters . value of url parameter can fetched using $_get[''] method when click link "<a href='view_category.php?cid=".$id."'> link </a>" browser open page url looking www.domain.com?cid=5 then using php may value of url parameter cid $valueofparameter = $_get['cid'];

VBA code for custom ribbon tool errors in Excel 2016 -

the code follows works in excel 2013 , prior , upon installing excel 2016 (via office 365 subscription) , opening 1 of workbooks custom ribbon tools, "can't find library" error. ( there no missing references) here 1 sample sub (dropdown control in ribbon) error pops up. error on call, doesn't returnedval. 'callback rxdrdnacctname onaction sub rxdrdnacctname_click(control iribboncontrol, id string, index integer) on error resume next call rxdropdownitemlabel(control, index, returnedval) sheets("tables").range("acctnametoplot").value = returnedval if err.number <> 0 logerror(now & "...ribbontool--> " & err.description) end if end sub here code sub getting called 'callback rxdrdnacctname getitemlabel sub rxdropdownitemlabel(control iribboncontrol, index integer, byref returnedval) dim varitems variant if (control.id = "rxdrdnacctname" or control.id = &quo

javascript - Draw a chart after location.assign() -

i want draw chart (with library highchart.js ) after window.location.assign(). problem chart drew before location.assign() can't see it.i see blank page! how can resolve problem?i post code: window.location.assign("http://localhost:8009/web#grafici"); $('#mychart').highcharts({ xaxis: { categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { type: 'line', color: 'red', marker: { enabled: false }, data: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100] }] }); <script src="https://ajax.goo

ios - A:pch not found pods install xxx.h -

Image
today found isuue after in project -> info -> configurations add configuration file, run project, goes wrong in pch file . it shows xxx.h not found , search lot of solutions, can not right answer. remember step. i deleted configuration file , , project become normal. i hope helpful kind issue. update for more detail, add information show issue: at first, add configuration file : then, project -> archive project. at last: run project simulator, shows error:

sql - Justify seconds (integer number) to date format (more than days and months) in PostgreSQL -

i know how can justify big number (million of seconds) date format hh:mm:ss , days : months : year in same time. using sql query in postgresql 9.4 example : 1 000 000 seconds = 11 days 13 hours 46 minute 40 seconds. thank you test=> select justify_hours(interval '1000000 s'); ┌──────────────────┐ │ justify_hours │ ├──────────────────┤ │ 11 days 13:46:40 │ └──────────────────┘ (1 row) you can use justify_interval instead of justify_hours months , years, how many days there in month?

I need to send multiple users monthly invoices using crystal reports and logicity as auto emails -

is there way send multiple emails of invoice reports using 1 crystal report. i facing issue have send multiple emails each user. thanks in advance. ajay well, (fio) figured out generating reports , saving local drive rather sending emails time consumption. // cs file method. //0. setting controller opsmanagementcontroller om = new opsmanagementcontroller(); //1. getting users list: var result = om.getusersforinvoice(); //2. creating folder invoices: string foldername = @"d:\google drive\monthlyinvoices"; string filename = ("invoices_" + datetime.now.tostring("dd-mm-yyyy").tostring()); string pathstring = system.io.path.combine(foldername, filename); system.io.directory.createdirectory(pathstring); //3. generating invoices user name: (int = 0; < result.userdetail.count;

python - Manipulating Azure storage containers in a Djano project -

in django project, i'm uploading video files azure storage via following snippet: content_str = content.read() blob_service.put_blob( 'videos', name, content_str, x_ms_blob_type='blockblob', x_ms_blob_content_type=content_type, x_ms_blob_cache_control ='public, max-age=3600, s-maxage=86400' ) where name random uuid string , videos name of container. how upload video files without specifying container, i.e. de facto creating unique container every file upload? how upload video files without specifying container, i.e. de facto creating unique container every file upload? each blob (a video file in case) must belong container. create container using blob_service.create_container before call blob_service.put_blob . can name container uuid .

sql server - SQL query last transactions -

Image
you can't see on image have many till_id numbers. (1,2,3,4,5). what want showing last "trans_num" without repeating till_id. for example: till_id trans_num 1 14211 2 14333 3 14555 a typical way is: select t.* t t.trans_date = (select max(t2.trans_date) t t2 t2.till_id = t.till_id );

Bootstrap next and previous button in modal window -

i using bootstrap modal window next , previous buttons project, default "modal-footer" in bottom. want keep next , previous button on left , right vertically center of modal window. please suggest. may can try bootstrap carousel combine modal body { padding-top: 20px; } .btn-default { top: 25%; left:25%; color: #999; background: #fffccc; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <div class="container text-center"> <h1> click me </h1> <!-- large modal --> <button class="btn btn-default" data-toggle="modal" data-target=".bs-exam

ruby on rails - Why RVM requires YAML? -

while installing rvm from, suggested provide yaml source tar well. don't know why yaml needed rvm? ( link :- https://github.com/rvm/rvm-site/blob/master/content/rvm/offline.md ) can install separate gem , right? please provide insights. yaml part of ruby's standard library , shipped ruby itself. in order compile ruby yaml support, need libyaml installed. since yaml quite popular in ruby , e.g. used specify metadata in packaged rubygems, ruby without yaml not useful nowadays. now, time ago, there a pretty nasty bug in libyaml (the library used ruby parse , generate yaml). in versions <= 0.1.4, possible execute arbitrary code making ruby process parse specially crafted yaml source. because of this, rvm downloads , compiles up-to-date version of libyaml ensure compiles rubies safe vulnerability.

sql server - Unable know the exception in query -

i'm writing below query in sql server update time_tracker set logout = getdate(), totaltime = substring(convert(varchar(20), (logout - login),120),12,8) time_tracker userid = 0138039 , convert(date, login) = convert(date, getdate()); basically, when user hits logout button i'm trying achieve below. enter logout datetime stamp in logout column calculate difference between login , logout time , update total time column, bu checking today's date , current user. when this, i'm getting exception: msg 8114, level 16, state 5, line 1 error converting data type varchar float. please let me know i'm going wrong , how can fix this. also when run below query select substring(convert(varchar(20), (logout - login),120),12,8) time_tracker; it working fine, mean i'm getting correct time output. thanks you trying hh:mm:ss logout - login based on 12,8 in substring function. , put them float column. i think bett

logging - Golang juju/logger does not log the actual line in the log file -

i'm using juju/logger in golang application logging. have configured logger log error,info , trace example: filelog.go ----------- func (obj filelog) infof(format string, args ...interface{}) { log.logger.infof(format, args) } and when called, logger file shows line number of filelog.go logger defined , not actual location logger called. i'm calling filelog log.logger().infof("invalid data passed" + err.error()) is there param configured log line number of actual caller function? please help.

objective c - How to get first video frame? -

i programming media player using vlckit. want take preview picture of video. how can using vlckit or maybe tools? p.s. i've used avfoundation , qtkit, didn't work. argue on video format (.mkv) you want use vlckit's thumbnailer class. doing you.

google drive sdk - files().list returns incomplete and inconsistent list when using different pageSize -

i have python script attempts list files , folders in given folder. python code: page_token = in_json.get('pagetoken', none) res = self._drive.files().list( orderby='folder, name', pagesize=1000, pagetoken='page_token', q='(\'parent_id\' in parents) , (trashed = false)', fields='nextpagetoken, files(id, parents, name, modifiedtime, size, mimetype, md5checksum, trashed)').execute() parent_id id of parent folder, , page_token set nextpagetoken of previous response. folder (folder_0) want list contains 4096 files (0.a, 0.b, 1.a, 1.b, ..., 2047.a, 2047.b), return list contains 4095 files (603.a missing) change query filter q '(\'parent_id\' in parents) and (name = \'603.a\') , (trashed = false)', , keep other fields unchange, file 603.a can list normally. use original query filter q , change pagesize 400/300/100, different files missing (400: missing 1353.a, 300: no

java - executorService.shutdownNow() doesn't stop the thread -

i have scheduled executor service setup class test { private final scheduledexecutorservice executor; public test() { executor = executors.newsinglethreadscheduledexecutor((runnable) -> { thread thread = new thread(runnable, this.getclass().getname()); thread.setdaemon(true); return thread; }); executor.schedulewithfixeddelay( new testrefreshtask(), 0, 50000, timeunit.milliseconds ); } private class testrefreshtask implements runnable { @override public void run() { //refresh data refreshdata(); } } public void close() { executor.shutdown(); try { if(!executor.awaittermination(60, timeunit.seconds)) { executor.shutdownnow(); executor.awaittermination(60, timeunit.seconds)); } } catch (interruptedexception e) { //retry dispose task

javascript - Leaflet map not loading tiles -

my code: <!doctype html> <html> <head> <title>openttd map</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="https://npmcdn.com/leaflet@1.0.0-rc.3/dist/leaflet.css" /> <script src="https://npmcdn.com/leaflet@1.0.0-rc.3/dist/leaflet.js"></script> </head> <body> <div id="map" style="width: 1600px; height: 900px"></div> <script> var tile_url = 'http://dev.ruun.nl/zelf/openttd/tiles/map_{x}_{y}.png'; var map = l.map('map', { maxzoom: 20, minzoom: 20, crs: l.crs.simple }).setview([0, 0], 20); //65409x32839 var southwest = map.unproject([0, 32839], map.getmaxzoom()); var northeast = map.unproject([65409, 0], map.getm

angularjs - Prevent word wrap in angular handsontable -

Image
i'm using nghandsontable , trying prevent word wrapping expanding rows. can see there table option wordwrap doesn't seem work. tried applying in various ways: ie add in settings object wordwrap: false, or add class on classname 'htnowrap' or add attribute on table , column word-wrap=false <hot-table hot-id="blotter" settings="{wordwrap: false, colheaders: colheaders, classname: 'htcenter htnowrap', contextmenu: ['row_above', 'row_below', 'remove_row']}" row-headers="false" min-spare-rows="minsparerows" datarows="rows"> <!-- sort order? --> <hot-column ng-repeat="column in columns" data="{{column.fieldname}}" title="::column.title" word-wrap="false"> </hot-column> </hot-table> update: actually can

angularjs - How to sort a table on basis of date of Birth when using angular js -

i want sort table on basis of date of birth. using angular js in code not working sorting date column if date string. using below code sorting- <th> <a href="#" ng-click="sorttype = 'dob'; sortreverse = !sortreverse"> date of birth <span ng-show="sorttype == 'dob' && !sortreverse" class="glyphicon glyphicon-chevron-down"></span> <span ng-show="sorttype == 'dob' && sortreverse" class="glyphicon glyphicon-chevron-up"></span> </a> </th> i have created plunker here- https://plnkr.co/edit/6jx3lnqh6jvo6u00qvvk?p=preview can 1 tell me how can achieve that? you should define date of births date objects, , use formatters display correct format in view "dob": new date(1980, 0, 12) see https://plnkr.co/edit/1yupcexjb2dojintytds?p=preview

java - org.apache.commons.vfs2.FileSystemException: Could not create file -

i want access file remotely , using code : fileobject destn=vfs.getmanager().resolvefile(f.getabsolutepath()); logger.debug("object created" +destn); domain, username, password userauthenticator auth=new staticuserauthenticator(domain, username, password); logger.debug("authenticator object created" +auth); filesystemoptions opts=new filesystemoptions(); defaultfilesystemconfigbuilder.getinstance().setuserauthenticator(opts, auth); fileobject fo=vfs.getmanager().resolvefile(remotefilepath,opts); at line getting exception : org.apache.commons.vfs2.filesystemexception: not create file "file:////172.50.33.115/d$/testfile.txt". @ org.apache.commons.vfs2.provider.abstractfileobject.createfile(abstractfileobject.java:382) @ controller.inputcontroller.dopost(inputcontroller.java:92) @ javax.servlet.http.httpservlet.service(httpservlet.java:647) @ javax.servlet.http.httpservlet.se

AngularJS Typescript IRouteParamsService undefined -

i´am using angular-route. based on this question i´ve tried url parameter. i following error: angular.js:13920 typeerror: cannot read property 'zvar' of undefined seems $routeparams undefined. my routing config: angular.module('app').config(['$routeprovider', function routes($routeprovider: ng.route.irouteprovider) { $routeprovider .when('/', { templateurl: 'views/start.html', }) .when('/calc/:zvar?', { templateurl: 'views/calc.html', controller: 'app.controllers.calcctrl' }) .otherwise({ redirectto: '/' }); } ]); my url: http://localhost:64025/#/calc?zvar=test123 the access in constructor: interface irouteparams extends ng.route.irouteparamsservice { zvar: string; } export class calcctrl implements icontroller { static $inject: