Posts

Showing posts from March, 2013

hadoop - How can I access HDInsight Blob Storage from C# Mapper? -

i have "hadoop on windows" cluster blob storage ( log-container @ logfstore ) default storage configured (input , output read , written from/to there). i'm using mapreduce sdk write , manage mapper , reducer in c#. how can access other files on blob storage within c# code? i tried following: file.readalllines(@"/log100by10/input/filelist_short.txt"); result: not find part of path 'c:\log100by10\input\filelist_short.txt' exception file.readalllines(@"log100by10/input/filelist_short.txt"); result: not find part of path 'c:\apps\temp\hdfs\nm-local-dir\usercache\admin\appcache\application_1453123456785_0006\container_1453123456785_0006_01_000002\log100by10\input\filelist_short.txt' file.readalllines(@"wasb://log100by10/input/filelist_short.txt"); result: given path's format not supported file.readalllines(@"wasb://log-container@logfstore/log100by10/input/filelist_short.txt"); result: given pa

scala - How do I add a dependency to an SBT build file -

i have sbt build file lots of lines this: "org.apache.mahout" % "mahout-math" % "0.5" specifying dependencies. have new jar want add dependencies. how figure out "blah" % "blah" % "blah.0" form should write in? i know basic question. thank in advance help. if dependency want not available repository can put jar "lib" folder in root of project, otherwise dependency should information (groupid, name, version , repository) of artifact (try searching 'maven' + library name in google). everything explained in great detail in sbt documentation .

ios - Google Drive GTL framework, dyld: Library not loaded: @loader_path/../Frameworks/GTL.framework/GTL -

Image
i have app called tripla can sync data via google drive ios 8- devices. however, got crash when synchronizing data on ios 9 devices. therefore, tried upgrade google frameworks latest library , follow tutorial https://developers.google.com/drive/ios/quickstart . this update, got error msg - dyld: library not loaded: @loader_path/../frameworks/gtl.framework/gtl ....... image not found when debugging on real devices. after looking many similar solutions such as: add "gtl.framework" "embedded binary" in tab "general", add "gtl.framework" "linked frameworks , libraries" in tab "general", add "gtl.framework" "copy files" in tab "build phrase", add dynamic path "runpath_search_path" in tab "build settings", the issue still not been solved. does have same issue , solved? ps. debugging on simulator working when clicking "run" on xcode. it, however, get

Bluemix - MQA : Stop notification that keeps on popping up on screen in android -

i trying integrate bluemix mqa mobile app. using mqa-android-2.7.4.arr file in project. have 1 query related notification popups in android below. how stop notifications keep popping on screen in android? the popup notification cannot suppressed in qa (pre-production) mode not displayed in market (production) mode.

pdfsharp - How to remove border in .FillRectangle garphics method in c# -

Image
i using following code print graphics rectangle var gr = xgraphics.frompdfpage(1); color color = system.drawing.color.white; var brush = new system.drawing.solidbrush(color); gr.fillrectangle(brush, item.position.x, item.position.y, item.width, item.height); but when execute above code there border on rectangle.that rectangle in following image. in image border showing when execute above code, there way can remove border? how when skip fillrectangle ? think "border" there , reactangle little small.

javascript - convert executable to node module/object -

i tried searching, not luck. i want convert/wrap executable use , nicely in node, , not calling child_process.exec time. example, if wanted git, instead of git help or git clone git://repo.git i'll have somethings like: var git = new cmd('git'); git.help(); git.clone('git://repo.git'); etc.. doe's knows if exist? the closest thing i've found far run-cmd can somethings not automatically. i'll need create object parameters want. thanks, ariel

python 2.7 - Adding new line on a one2many computed field with inverse odoo -

i have one2many computed field want users able add new line of records into. added inverse field it, thing allow existing records modified @api.one def accumulate_files(self): documents = self.env['document.customer'] document_gotten = documents.search([('name','=', self.name)]) docs in document_gotten: self.res_line_ids |= docs.customer_line_ids @api.one def edit_accumulate_files(self): documents = self.env['document.customer'] lines in documents.customer_line_ids: lines.write(self.res_line_ids) i did workaround, not sure how can values of one2many field in inverse method, in new api, in old api. works me @api.multi def _save_telefone(self): partner in self: phone in partner.phone_number_ids: try: # write on exisiting record int(phone.id) # write possible values phone.writ

java - How is the code flows in method overriding -

for below code got output in base.foo() in derived.bar() code: class base { public static void foo(base bobj) { system.out.println("in base.foo()"); bobj.bar(); } public void bar() { system.out.println("in base.bar()"); } } class derived extends base { public static void foo(base bobj) { system.out.println("in derived.foo()"); bobj.bar(); } public void bar() { system.out.println("in derived.bar()"); } } class overridetest { public static void main(string []args) { base bobj = new derived(); bobj.foo(bobj); } } how code flows? how getting output above. confused little bit , looking explanation. static methods not overridden, there's no virtual invocation. in derived class, static foo method hiding parent class' static foo method. however, in main method, invoking foo on reference type base , hence bas

Android MediaPlayer streaming video setSurface jump back -

i m developing android app can play streaming videos , navigate through app video playing in background. the video playing on service , watch video set mediaplayer 's surface surfacetexture of textureview . no problems here, works fine. the problem comes when user minimizes player (without problem) , wants re-open it. here, when re-set surface mediaplayer video jumps 1 or 2 seconds , continues reproducing fine. here code when set surface mediaplayer: public void onsurfacetextureavailable(surfacetexture surface, int width, int height) { surfacetexture = new surface(surface); if (mymusicservice != null) { mymusicservice.getmediaplayer().setsurface(surfacetexture); } } i tried surfaceview (instead textureview ) same result. any ideas? thanks,

android - Left margin is not working from java -

i adding image , giving margin left using below code. layoutparams.setmargins(translateby, 0, 0, marginbottom); slideicon.setlayoutparams(layoutparams); this code working devices of different density , size. but not working device properties :- 540x960, 240dpi, 4.7 inch device but if give margin .xml file working. please me on this. thanks in advance. you can use displaymetrics logic a structure describing general information display, such size, density, , font scaling. displaymetrics metrics = getresources().getdisplaymetrics(); int devicetotalwidth = metrics.widthpixels; int devicetotalheight = metrics.heightpixels; layoutparams.setmargins(devicetotalwidth/8, 0, 0, marginbottom); // left, top, right, bottom // devicetotalwidth/8 set yours left margin edited @courtesy goes # stanojkovic layoutparams params = new layoutparams( layoutparams.wrap_content, layoutparams.wrap_content ); params.setmargins(left, top, r

c# - GridView SelectedValue is null after selecting a row -

i have simple gridview select button. in gridview.rowcommand event when select row want read gridview.selectedvalue null. time gridview.selectedvalue valued right data when select row twice. protected void gridview1_rowcommand(object sender, gridviewcommandeventargs e) { code_bimehtextbox.text = gridview1.selectedvalue.tostring();//selectedvalue null after clicking select button after clicking again works right } you using wrong event. when using select button should use selectedindexchanging , selectedindexchanged events. here can find complete list of buttons/events: gridview.rowcommand event

java - Connect to PostgreSQL from SpringBootApplication -

i building simple spring application scratch using maven , postgresql. i've been following thousand of tutorials isn't clear me store different configurations connect , work postgresql database. my pom.xml file: <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>org.springframework</groupid> <artifactid>gs-rest-service</artifactid> <version>0.1.0</version> <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.3.2.release</version> </parent> <dependencies> <dependency&g

c# - How to suppress the subreport when subreport dataset value has a status of "false" -

my scenario working crystal reports, in main report document viewer consists many sub-reports , now problem is how suppress(hide) sub report based on data set column (database fields) can 1 me write expression based on value. 1) if database column value "1" --> show sub report. 2) if database column value "0" --> hide sub report. you can edit formula in surpress, , enter formula if {db_column} = 1 false else true

javascript - socket.io - check if a client is in an specific room -

i check if client subscribed specific room. have array saved sockets , index username. have if clause don't work : if(io.sockets.manager.rooms['/' + data.to].indexof(users[partner].socket.id) >= 0) { so maybe have working code. update: code: /* mysql setup here connection */ var count = 0; var messages = 0; var users = {}; var io = require('socket.io')(3000); io.sockets.on('connection', function(client) { count++; client.emit('send login'); client.on('login user',function (data) { if(data.name in users) { } else { client.u_name = data.name; client.u_id = data.id; users[client.u_id] = {'name':client.username,'socket':client}; io.sockets.emit('online users', { 'count': count }); } }); client.on('disconnect', function(){ count--; delete users[client.username]; io.sockets.emit('online

angular - Including external javascript libraries inside Angularjs 2 component templates -

angularjs 2 documentation mentions, almost html syntax valid template syntax. <script> element notable exception; forbidden in order eliminate possibility of javascript injection attacks (in practice ignored). so there other way of including external javascript files component template? (like chart plugin, j3d etc.) my problem in details.. i have charts inside angular2 template(say charts.html). these charts interactive.. show more details when user move pointer on charts. (jquery based) . since injecting charts index.html dynamically (with angularjs), charts plugins doesn't recognizing dynamic content. (even css properties doesn't apply classes of dynamic contents). it's not clear me want do. can use external javascript files include them html page. can use them in components. that said, need aware executed outside context of angular2. mean won't take account regarding change detection. matter of fact, angular2 uses zonejs trigger change de

swift - NSFetchedResultsController different sort descriptors for each section -

i have objects nsdate property , need split them 2 sections (first - future events, second - historic events) , first section need sort them date property in ascending order , second section in descending order. idea how sorting? assuming using nsfetchedresultscontroller , underlying fetch must sorted 1 way or other. can think of 2 different solutions: use 2 separate frcs, complementary predicates 1 handles past events, while other handles future events. 1 sorted ascending, other descending. problem both frcs generate indexpaths section 0. therefore need remap second frc's indexpaths use section 1 of tableview. example, in cellforrowatindexpath need this: if (indexpath.section == 0) { objecttodisplay = self.futurefetchedresultscontroller.objectatindexpath(indexpath) } else { // use second frc let frcindexpath = nsindexpath(forrow: indexpath.row, insection: 0) objecttodisplay = self.pastfetchedresultscontroller.objectatindexpath(frcindexpath) }

c# - NPOI Excel Format not working -

i have function generating excel file using npoi library. witch part working fine got problem style's seem function dodgy. focus number formats: i decimals display as: 12.156.235,33 example according reserach on google format should should be: "#,##0.00" value shows as: 12156235,33 , cell type set general instead of number it looks alot of people have problems this. hope there solution cos else whanted managed npoi library , not whant switch now. the procedure: idataformat dataformat; public string generateexcel(exceldata data) { var dateformat = dataformat.getformat("dd.mm.yyyy hh:mm:ss"); var decimalformat = dataformat.getformat("#,##0.00"); string xlspath, xlsfile, xlsname; xlspath = environment.getenvironmentvariable("temp"); xlsname = path.getrandomfilename().replace(".", ""); //datetime.now.tostring("yyyy-mm-dd"); xlsname += ".xlsx"; xlsfile = path

javascript - in php i m creating registration and login but its not dynamic -

<?php session_start(); if (isset($_post["btnsubmit"])) { $nm=$_post["username"]; $pwd=$_post["password"]; $conn = new mysqli("localhost", "root", "", "simple_login"); // check connection if ($conn->connect_error) { die("connection failed: " . $conn->connect_error); } $sql = "select * member username='$nm' , password='$pwd'" ; $result = $conn->query($sql); if ($result->num_rows > 0) { // add sesssion value $_session["memid"]=$row["mem_id"]; $_session["username"]=$row["username"]; header("location:demo2.php"); } } else { echo "wrong username or password" ; } ?> in facing designing database problems , facing problems in storing session variables well <?php session_start(); if (isset($_post["

Visual Studio 2013 Update 5 and Typescript with jQuery DefinitelyTyped results in compilation errors -

i investigating typescript , have run problem others have reported, none of answers i've seen seem particularly satisfactory. the problem that, having added jquery.d.ts (using nuget jquery.typescript.definitelytyped v2.8.8) project results in multiple compiler errors. on 100 in fact. my understanding visual studio pre-update 2, typescript had added extension. however, since update 2, typescript included default. however, note visual studio extensions , updates, "typescript 1.7.5 visual studio" available. need install if have update 5 vs2013? from visual studio command prompt, running "tsc.exe -v" gives me: 1.0.3.0. (i think compiler version , not version of typescript.) notes: c:\program files (x86)\microsoft sdks\typescript shows me 1 folder, "1.0" some posts suggest updating value in proj file 1.0 1.0 higher value. so, steps need take rid of these errors reported in jquery.d.ts file? many thanks griff i uninstal

multithreading - How to cancel execution of a long-running async task in a C# Winforms app -

i'm quite inexperienced c# programmer , need on managing flow of program. winformapp asks multiple user inputs , uses them establish serial communication device in order make measurements. measurements made in async method takes 20 minutes run. i'm using void main() { //setup } private void button1_click(object sender, eventargs e) { await measurements(); //plot results } private async task measurements() { while(true){ //make measurements await task.delay(120000); //make measurements, present data in ui form. //return if done } } now need make button enables user cancel measurements in order change input or parameter , restart measurements. added "cancel"-button. private void button7_click(object sender, eventargs e) { textbox64.enabled = true; button6.enabled = true; button5.enabled = true; textbox63.enabled

python - Django : TokenAuthentication, setting permissions on endpoints -

i using django rest framework build api , quite new it. i set tokenauthentication method, , trying filter result of queryset depending on token. basically, have endpoint (let's "/wallet"), , want /wallet endpoint give wallet of specific user sending query. my approach redefine get_queryset method in viewset can't figure out how token, , how filter results. also, anynomous users shouldn't allowed access endpoint. here viewset, think need customisation here : class walletviewset(viewsets.modelviewset): """ api endpoint allows wallets viewed or edited. """ queryset = wallet.objects.filter() serializer_class = walletserializer my approach redefine get_queryset method in viewset can't figure out how token, , how filter results. django rest framework tokenauthentication linked user. therefore advice filter against user should available in view through self.request.user also, anyno

pkgbuild - osx - remove files as part of pkg installation -

using pkgbuild create installer osx application. there way add install step, delete files? in particular example - when run application creates new file in directory binary located. installation of new version replaces binary, leaves created file. need "fresh start" after installation of new version. you can add postinstall script package , delete files not required more. create shell script , put code deleting files in it. name script postinstall (without extension) , put in folder named script. create package command: /usr/bin/pkgbuild \ --root "$root_location" \ --install-location "$install_location" \ --identifier "$identifier" \ --version "$version" \ --scripts "scripts" \ "$name.pkg" when installer runs postinstall script passes useful information path on script running , on. can read these information input arguments $1, $2, ...

regex - Making multiple search and replace more precise in Python for lemmatizer -

i trying make own lemmatizer spanish in python2.7 using lemmatization dictionary. i replace of words in text lemma form. code have been working on far. def replace_all(text, dic): i, j in dic.iteritems(): text = text.replace(i, j) return text my_text = 'flojo y cargantes. decepcionantes. decenté decentó' my_text_lower= my_text.lower() lemmatize_list = 'exampledictionary' lemmatize_word_dict = {} open(lemmatize_list) f: line in f: depurated_line = line.rstrip() (val, key) = depurated_line.split("\t") lemmatize_word_dict[key] = val txt = replace_all(my_text_lower, lemmatize_word_dict) print txt here example dictionary file contains lemmatized forms used replace words in input , or my_tyext_lower . example dictionary tab-separated 2-column file in col. 1 represented values , col 2 represents keys match. exampledictionary flojo floja flojo flojas flojo flojos cargamento cargamentos cargante

c# - How can I identify which functions and sql procedures are causing high cpu usage on the host server -

i have c#/asp.net web application (non mvc) has pages access sql database many times, using stored procedures , views. application has 5-10 users, , hosts have informed me it's causing 95%+ cpu usage on server. my question, how can identify functions/procedures/threads causing high cpu use can cache or optimise them? note hosts not give me access server logs, stats, or serversystem database tables, application's database, causes major headache! you can use sqlprofiler trace performance , behavior of sql procedure, function , etc. you can check this: sqlprofiler it's helpful tool , it's me lot in enhancing sql stored procedures performance. you run application before go sql profiler , configure listen on needed events, 'procedure completed' , select filtering criteria database or execution user when make action in app related database, profiler track , analyze it. you can check step step usage of here . about c# functions not related data

javascript - How to apply js .join() method to my array after every two values in the array -

i have array of lat longs: latlong = [51.49, -0.05, 51.48, 0.16] i want convert string in format: latlon_string = "lat,lon lat,lon lat,lon" working example: latlon_string = "51.49,-0.05 51.48,0.16" i tried using join() method apply space after every 2 values couldn't figure out how that. or there better solution? thanks you can join array , replace every second comma space this: latlong = [51.49, -0.05, 51.48, 0.16]; latlon_string = latlong.join(',').replace(/(,[^,]*),/g ,'$1 '); console.log(latlon_string); // 51.49,-0.05 51.48,0.16

dynamic columns - Dynamically arrange data of jqgrid -

i not able arrange cell data dynamically respect customize column. in cell collection want arrange cell values per column sequence. column :[column10, column3, column1, column7, column9](those coming database) , column sequence dynamically change. in case not able arrange cell value dynamically respect sequence of column. please find snapshot of code, using in code. jsondata = new { total = totalpages, page, records = totalrecords, rows = ( details in listdata select new { = 1, cell = new string[] { details.column10, details.column3, details.column1, details.column7,

ibm mobilefirst - Cannot use Direct Update for Windows 8 in Worklight 5.0.6 -

i use worklight 5.0.6 , can't use direct update windows 8 application. ibm worklight information center tells windows 8 app can use direct update. my way test direct update follows. please tell me how use direct update in windows8. make windows8 env project change wlinitoptions.connectonstartup value "true" (in common\js\initoptions.js ) select [build , deploy] double click .jsproj file run simulator in visual studio 2012 windows8 make app "back ground" change html file , "re [build , deploy]" make app "foreground" this documentation page misleading (i open defect correct it). direct update (as in process of updating web resources of application after has been installed on device) available ios , android. in environments following steps indeed trigger direct update. the update (or rather, upgrade) of desktop applications has no relation what-so-ever direct update mechanism mentioned above. for desktop enviornm

css - How to embed multiple glyphs -

i have following glyph (on glyph made out of few) generated icomoon <glyph unicode="&#xe905;" d="m0 960h1024v-1024h-1024v1024z" /> <glyph unicode="&#xe906;" d="m0 896h320v-320h-320v320z" /> <glyph unicode="&#xe907;" d="m448 896h512v-128h-512v128z" /> <glyph unicode="&#xe908;" d="m448 704h512v-128h-512v128z" /> <glyph unicode="&#xe909;" d="m0 320h320v-320h-320v320z" /> <glyph unicode="&#xe90a;" d="m448 320h512v-128h-512v128z" /> <glyph unicode="&#xe90b;" d="m448 128h512v-128h-512v128z" /> the problem i'd embed within css 'content' property 1 sign ex.: .some-selector::before { content: '\e900' } but .some-selector::before { content: '\e905\e906\e907\e908\e909\e90a\e90b' } won't work - idea on how embed way? edit: i want

Javascript-Jquery - animate method inside for loop -

i have below loop, counts 1 100. i want use animate method inside loop move picture smoothly, ie altering top , left attributes. although can picture move, in 1 jerky animation. might bit dumb seems execute animations in 1 hit instead of gradually. is javascript being asynchronous? also there way can repeat in javascript,ie rather setting loop there way function can call @ end, so, example, can have display of animated divs bounce around etc. @ moment have set pre defined loop. for (i=1; < 100; i++) { var firsttop = (firsttop + firsttopgoal); var firstleft= (firstleft+ (firstleftgoal)); var secondtop = (secondtop+ (secondtopgoal)); var secondleft = (secondleft + (secondleftgoal)); if (firsttop<100){firsttop=100;firsttopgoal = 2 - math.random()*4;}; if (firstleft<50){firstleft=50;firstleftgoal = 2 - math.random()*4;}; if (firsttop>130){firsttop=130;firsttopgoal = 2 - math.random()*4;}; if (firstleft>500){firsttop=500

facebook - Android AccessToken.getCurrentAccessToken() always null in another activity -

i'm trying implement activity shows facebook friend's of user. graphrequest request = graphrequest.newmerequest(accesstoken.getcurrentaccesstoken(), new graphrequest.graphjsonobjectcallback() { @override public void oncompleted(jsonobject object, graphresponse response) { if (response.geterror() != null) log.d("xxx", "facebook graph request error"); else log.d("xxx", "facebook graph request success"); } }); bundle parameters = new bundle(); parameters.putstring("fields", "friends"); request.setparameters(parameters); request.executeasync(); but currentaccesstoken null. if user logged in 10 seconds before. this login code : parsefacebookutils.loginwithreadpermissionsinbackground(this, arrays.aslist("public_profile", "user_birthday", "use

cut - Accessing data from output R program -

i have output generated cuts functions 1 below...lets call ouput 'data'. cuts: [20,25) time kilometres 21 20 7.3 22 21 8.4 23 22 9.5 24 23 10.6 25 24 11.7 ------------------------------------------------------------ cuts: [25,30) time kilometres 26 25 12.8 27 26 13.9 28 27 15.0 29 28 16.1 30 29 17.2 ------------------------------------------------------------ cuts: [30,35) time kilometres 31 30 18.3 32 31 19.4 33 32 20.5 34 33 21.6 35 34 22.7 how access data in each cut..like kilometres data cuts:[20,25]..etc tried doing data$kilometres...but not work...so want new data frame use kilometres data seperately each cut the output of by here list, can use basic list indexing, either number or name. using data your question few hours ago , , the answer matthew lundberg , can index follows: > x[[1]] time velocity 1 0.0 0.00

networking - using post request in urlib in python -

i trying use post request in https website.but urllib work on http.so can tell me how use urllib https. in advance. it's not true urllib works on http, not https. supports https. in case though, want using third-party library requests .

java - Comparing timestamps with mybatis, postgresql -

i'm using mybatis query on postgres db, problem comparaison between timestamps, think not working since doesn't retrun needed results not throwing exception. here code <select id="select_count" parametertype="map" resulttype="map"> select count(*) count, to_char(created_on, #{xaxis}) xaxis,state my_table 1 = 1 <if test="fromdate != null"> , created_on &gt;= #{fromdate} </if> <if test="todate != null"> , created_on &lt;= #{todate} </if> <if test="state != null"> , state = #{state} </if> group xaxis, state </select> and here java code public list<map<string, object>> getstatescount(date fromdate, date todate, string state, string xaxis) { map<string, object> params = new hashmap<string, object>(); params.put("fromdate", fromdate);

matlab - Creating permutations of all possible non-repeated combinations within N elements -

i wondering if i) there name following combinatorics problem; ii) there way code within matlab? i have n elements, , generate possible permutations of non-repeated combinations varying bracket sizes. instance, n = 5 elements, have following possible permutations: max group combination size of 5: (abcde) max group combination size of 4: (a) (bcde); (bcde) (a); (b) (acde); (acde) (b); (c) (abde); (d) (abce); (e)(abcd) etc. max group combination size of 3: (ab) (cde); (a) (b) (cde); (ac) (bcd); (a) (c) (bcd) etc. max group combination size of 2: (ab) (cd) (e); (ab) (c) (d) (e); (ab) (ce) (d) etc. max group combination size of 1: (a) (b) (c) (d) (e); (b) (c) (d) (e) (a); etc. note that, within brackets, order not matter i.e. combinations. beyond brackets, permutation must occur, instance, (ab) (cde) , (cde) (ab) 2 possible permutations. this partial answer (i). need aware of the twelvefold way . question example of 1 of these, description unclear me way is.

bash - script to Change ip address format, -

i'm trying write bash script convert ip address cidr quad-style. for example 192.168.1.1/24 ===>192.168.1.1 255.255.255.0 i tried write #!/bin/bash echo "enter ip" read ip b=`echo $ip | cut -d/ -f1` a=`echo $ip | cut -d/ -f2` if a=24 ; echo "$b 255.255.255.0" fi if a=25; echo "$b 255.255.255.128" fi i'm getting output: 1.1.1.1 255.255.255.0 1.1.1.1 255.255.255.128 when i'm entering /24 or /25 /26 didn't wrote in if condition, i'm getting same output, wrong in script? in bash can use if (( == 24 ));

php - How to execute xpdf (pdftotext.exe) on shared drive? -

im trying parse pdf text via php , xpdf (pdftotext.exe). on localhost everythings works well, when im trying move on server, im getting troubles. first of checked settings on server , safe_mode off , exec not disabled , permissions rwxrwxrwx . then im trying this $command = "\\\\149.223.22.11\\cae\\04_knowledge-base\\tools\\pdftotext.exe -enc utf-8 ". $filename . " \\\\149.223.22.11\\cae\\04_knowledge-base\\output.txt"; $result = exec($command,$output,$args); echo shell_exec($command); which isnt working. when $result, $output, empty, $args returns 1 coresponds incorrect function document windows system error codes whole command looks \\149.223.22.11\cae\04_knowledge-base\tools\pdftotext.exe -enc utf-8 \\149.223.22.11\cae\04_knowledge-base\testpdf\04_egerland_final_paper.pdf \\149.223.22.11\cae\04_knowledge-base\output.txt , when dirrectly inputed commandline, working. so im bit out of ideas. have hint? edit 20160201 - aditional trying ma

c# - RestSharp / ASP.NET WebAPI - Using POST with url parameters -

i've following asp.net webapi binding: config.routes.maphttproute( name: "defaultapi", routetemplate: "api/{controller}/{action}/{id}", defaults: new {id = routeparameter.optional} ); and controller looks this: public class referencedatacontroller : basecontroller { [requireusertoken(approveddevicetoken = true, validusertoken = true)] [httppost] public ienumerable<synchronizeitem<ireferencedataitem>> sync([frombody]ienumerable<synchronizeitem<ireferencedataitem>> clientsyncitems, [fromuri]int referencedatatype) { // code } on client site use following code send request: var client = new restclient (baseurl); var request = new restrequest (resource, method); request.xmlserializer = new jsonserializer (); request.requestformat = dataformat.json; request.addheader ("x-abc-devicetoken", devicetoken); if (!string.isnullorwhitespace (usertoken)) request.addheader ("x-

php - timetable for scheduled subjects -

Image
i got right though problem how can put style on table row has data inside , better if can put rowspan 1 table row. here output: and here code: <?php $db = new mysqli("localhost", "root", "", "bsu_db"); if($db->connect_errno > 0){ die('unable connect database [' . $db->connect_error . ']'); } $times = ["7:00:00", "7:30:00", "8:00:00", "8:30:00", "9:00:00", "9:30:00", "10:00:00", "10:30:00", "11:00:00", "11:30:00", "12:00:00"]; $days = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; $subjday = array(); $sqlsubjday = "select * subject_day_tbl"; $qrysubjday = $db->query($sqlsubjday); while($rowsubjday = $qrysubjday->fetch_assoc()){ //array_push($subjday, $rowsubjday['sub_

node.js - Getting audio data in api call -

i'm developing api framework handle , manipulate near real time audio data. how can audio data presented our api? push call? reach out , transfer data? both? i haven't worked audio suppose posted byte?

joomla - PHP file containing base64_decode shows up on server -

my server has hole somewhere, , need plug it. php file containing base64 encoded code keeps showing in joomla website. i blacklisted @ first ( kelihos listed reason) , discovered have number of php files random, human friendly (login.php, file.php, alias75.php ... ), names in joomla directory. files had main portion of script after base64_decode function. here example of listing of such file: -rw-r--r-- 1 www-data www-data 155232 dec 24 18:51 file.php note date & time. night before christmass. same - file shows mornig @ 6 date 24th dec. can clue maybe? here snippet of actual code: <?php function jqgwuawwjs($rlkr, $fikixpq){$wynuczq = ''; for($i=0; $i < strlen($rlkr); $i++){$wynuczq .= isset($fikixpq[$rlkr[$i]]) ? $fikixpq[$rlkr[$i]] : $rlkr[$i];} $jeb="base64_decode";return $jeb($wynuczq);} $ldo = 'dgcozsrv5id3bus9xqr9iumt59xg1zcskz0ok0ouzycoipecsx'. 'adigrdius9xqr9x9xg1puok0ouzycoipecsxadiyfhiush5ye2sgcticr6zy2cb90ayxqmxq7v5iwv

woocommerce - Remove header (first row) from csv export -

the company work has bought amazing plugin "woocommerce customer/order csv export" works charm. documentation sublime, got fields , snippets customize export, works perfectly! now, have small problem headers. need remove them , found filter apply don't understand how make function out of this. can maybe provide me way export data without headers on first row? so basicly, can me write function removes first row of export or hide header array? this filter found in documentation: apply_filters( 'wc_customer_order_csv_export_generated_csv', $csv, $this ); many in advance , kind regards, try this: //delete headers function delete_headers_csv($csv){ foreach (explode("\n", $csv) $line) { if ($i != 0 ) { $temp .= $line."\n"; } $i++; } echo $temp; } add_filter( 'wc_customer_order_csv_export_generated_csv','delete_headers_csv');

android - Activity Transitions not working -

i trying implement activity transitions not able see effects. here code first activity: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_architecture); setupwindowanimations(); } private void setupwindowanimations() { if (android.os.build.version.sdk_int >= 21) { log.i("anim", "fade called"); fade fade = new fade(2); fade.setduration(3000); getwindow().setexittransition(fade); } } here code second activity: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_image); setupwindowanimations(); } private void setupwindowanimations() { if (android.os.build.version.sdk_int >= 21) { log.i("anim", "slide called"); s

java - Restful Web service issue - HTTP Status 404 - The requested resource is not available -

Image
i trying 1 restful web service example when going hit url time getting http status 404 - requested resource not available below detail of code, if want other information let me know web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>user management</display-name> <servlet> <servlet-name>jersey restful application</servlet-name> <servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class> <init-param> <param-name>jersey.config.server.provider.packages</param-name> <param-value>com.tutorialspoint</param

Java: Read from Multiple Lines (External File) -

i trying display contents of multiple rows in text file. can no problem single line, add line , i'm not sure need add code make move on next line. need myvalues[1] same myvalues[n] second line in file. believe need se new string next line i'm not sure how setup. package a3; import java.io.*; public class a3 { public static void main(string [] args) { string animals = "animals.txt"; string line = null; try { filereader filereader = new filereader(animals); bufferedreader bufferedreader = new bufferedreader(filereader); string aline = bufferedreader.readline(); string myvalues[] = aline.split(" "); int n = 0; while((line = bufferedreader.readline()) != null) { system.out.println(myvalues[n] + " " + myvalues[1]); n++; } bufferedreader.close(); }

android - MediaCodec Buffer Unavailable -

i attempting record mp4 through use of opengl surfaceview , using mediacodec encoder encode frames of video in 1 thread , in thread using audiorecord record audio samples , using seperate encoder encode audio data , mediamuxer actualy muxing. on devices (mostly higher end devices) method using works fine , output video expected no error or that. however, on other devices isnt case. what happens on devices, (ie moto droid turbo 2) audio encoder (which running in own thread) process few audio samples return mediacodec.info_buffer_unavailable when attempting dequeue input buffer encoder, start happening after 5 samples encoded , video encoder runs fine. on device (ie samsung galaxy alpha) opposite happens video encoder begins return mediacodec.info_buffer_unavailable status when dequeue input buffer video encoder , audio encoder runs fine. i guess question is, , have looked on clear explanation of this, cause of buffer being unavailable? other not releasing buffer before next us

sql - Node.js mssql parameterized query not working with ALTER LOGIN statement -

i'm trying alter someones login using mssql , parameterized queries, keep getting error when try run this: var request = new sql.request(connection); request.input('thepassword', sql.varchar, newpass); request.query('alter login ' + user + ' password = @thepassword' ,function(err, recordset){ if(err){ console.log(err); callback(false); } else{ callback(true); } }); 'newpass' string passed in through function paramter. error keep getting this: requesterror: incorrect syntax near '@thepassword'. anyone know why happening?

mysql - Like best performance in nested query -

i have principal requet 2 requets in. have problem in second nested query, have condition on id , if made request id = 10 takes long time execute, if replace id 10 request execute in 1 second. here request: select sql_no_cache contact_groupe.id_contact_groupe toto.contact_groupe left join toto.`contact` `contact` on ((toto.contact_groupe.id_contact_groupe = toto.contact.id_contact_groupe)) left join toto.`project` `project` on ((toto.contact_groupe.id_contact_groupe = toto.project.id_contact_groupe) , ( toto.project.id_project in ( select max(toto.project.id_project) toto.project ( toto.contact_groupe.id_contact_groupe = toto.project.id_contact_groupe ) ) )) left join toto.`phase` `phase` on ((project.id_phase = toto.phase.id_phase)) left join sql_base.`user` `user_suivi` on ((toto.contact_groupe.id_user_suivi = user_suivi.id_user)) ( en_attente = '0' , contact_groupe.id_contact_groupe in ( select distinct(contact_groupe.id_contact_g

Azure AD authentication issue in cordova plugin -

i following sample add authentication cordova app here: https://github.com/azure-samples/active-directory-cordova-multitarget i have registered tenant , set permissions. have following line retrieve access token: authcontext.acquiretokenasync('https://graph.windows.net', 'myappid', 'http://myappnamehere') .then(function(authresult) { // success handler alert(authresult.userinfo); }); when run app redirected microsoft login page , authenticate. redirects me app page , displays null on alert. inspected authresult , statuscode property 'failed' , accesstoken null. there no other information given me figure out problem was. i modified source code plugin return few more properties including 'errorloginfo' property returning following message: errorcode: invalid_grant user or administrator has not consented use application id 'myappid'. send interactive authorization request user , resource. i running