Posts

java - how to convert S3ObjectInputStream to PushbackInputStream -

i uploading excel(xls) file s3 , application should download file s3 , parse using apache poi reader. reader accepts inputstream type input proper parsing of excel expects pushbackinputstream . inputstream file downloaded s3 of type s3objectinputstream . how convert s3objectinputstream pushbackinputstream ? i tried directly passing s3objectinputstream (since inputstream ) pushbackinputstream , resulted in following exception : org.springframework.batch.item.itemstreamexception: failed initialize reader @ org.springframework.batch.item.support.abstractitemcountingitemstreamitemreader.open(abstractitemcountingitemstreamitemreader.java:147) @ org.springframework.batch.item.support.compositeitemstream.open(compositeitemstream.java:96) ..... ..... caused by: java.lang.illegalstateexception: inputstream must either support mark/reset, or wrapped pushbackinputstream @ org.springframework.batch.item.excel.poi.poiitemreader.openexcelfile(poiitemreader.java:82) ..... i tried...

node.js - error TS2304: Cannot find name 'Promise' -

hello guys went through solution avaialble on stackoverflow. none of work me. hence posting question. tsconfig.json { "version":"2.13.0", "compileroptions": { "target": "es5", "module": "commonjs", "sourcemap": true, "emitdecoratormetadata": true, "experimentaldecorators": true, "removecomments": true, "noimplicitany": false }, "exclude": [ "node_modules" ] } package.json { "name": "anguapp", "version": "1.0.0", "description": "angular2 gulp typescript , express", "main": "dist/server.js", "scripts": { "test": "echo \"error: no test specified\" && exit 1", "postinstall": "gulp build" }, "keywords": [], "...

WCF performance issues - weird slowdown -

i have video-processing engine i've written while ago, combination of c# , c++, processes video file on disk @ 10 frames per second... c# part of spawns threads, , c++ bits of instantiate reader , video processing routines… there 1 main thread created when main c# object created, , main thread spawns off c++-based reader thread , video processing threads. threading verifiably correct. there no blocking or deadlock issues in it. code is/was stable. now, if wrap whole thing inside wcf service, , use wcf set file process, tell (the video engine) “go”, individual frames process @ same speed, except once in while, every few seconds, threads stall out while, they're being suspended. it's weird!! doesn't happen when don't run through wcf. this has nothing wcf calls themselves, because make few initialization calls wcf service running, don’t call wcf longer!!! service “persession”, concurrencymode = multiple, what’s going on not multithreading (locking/blocking) iss...

javascript - Server response time in browser -

Image
after searches in google cant found answer. have requested data server. takes time load in browser. don't know whats happening. have pasted browser network time. want is, server response slow or browser rendering slow. please describe things in image, helpful. the server slow 1.5 seconds wait request sent small answer being returned. there initial delay setting connection ok being reused. however, picture not show details of browser delay. i focus on improving server response.

fullcalendar - Fullcalender load static event on ajax call -

i want current event on ajax call when calender load. how can possible? tried $(document).ready(function() { console.log(event.title); $.ajax({ url: 'ajax_call1.php', //data: {vv:vv}, type: 'post', success: function( response ) { $("#result").html(response); alert("you click --"+response); } }) } but can not event title on ajax call please me.

ios - Xcode - warning "Method definition not found". Call Method from Category file -

i have created method in category file. want reuse methods in view controllers. have imported category file in view controllers , declared method in header file also. calling this: category class: @interface uiviewcontroller (headerview) -(uilabel *)somemethod; @implementation uiviewcontroller (headerview) -(uilabel *)somemethod{ } homeviewcontroller: @interface homeviewcontroller : uiviewcontroller -(uilabel *)somemethod; @implementation homeviewcontroller [self somemethod]; iam getting warning message in line: @implementation homeviewcontroller its working. want clear warning. how can it? if want category in view controller that your category @interface uiviewcontroller (extendedmethods) - (void)somemethod; @end @implementation uiviewcontroller (extendedmethods) - (void)somemethod { nslog(@"some method"); } @end myviewcontroller.m #import "myviewcontroller.h" #import "uiviewcontroller+extendedmethods.h" @impleme...

javascript - es6 code broken in es5 -

i have been trying translate code es6 es5 because of framework restrictions @ work... although have been quite struggling locate problem is. reason code not work quite same, , there no errors either ... can tell me if have translated ? this es6 code : function filterfunction(items, filters, stringfields = ['title', 'description'], angular = false) { // filter keys of filters parameter const filterkeys = object.keys(filters); // set mutable filtered object items let filtered; // angular doesn't deep clones... *sigh* if (angular) { filtered = items; } else { filtered = _.clonedeep(items); } // each key in supplied filters (let key of filterkeys) { if (key !== 'textinput') { filtered = filtered.filter(item => { // make sure have filter by... if (filters[key].length !== 0) { return _.intersection(filters[key], item[key]...