Posts

Showing posts from June, 2015

xamarin.android - Permission Denied using Xamarin.Mobile to access contact list xamarin.form -

hey day using xamarin.mobile got error on permission denied added read_contacts in androidmanifest , add permission @ runtime. how solve this? method public async task<ienumerable<mobileusercontact>> getallcontacts() { if (_contacts != null) return _contacts; var contacts = new list<mobileusercontact>(); await _book.requestpermission().continuewith(t => { if (!t.result) { log.debug("perm", "permission denied!"); return; } foreach (var contact in _book.where(c => c.emails.any())) // filtering contact's has e-mail addresses { var firstordefault = contact.emails.firstordefault(); if (firstordefault != null) { contacts.add(new mobileusercontact() { contactfirstname = contact.firstname,

c understanding struct pointer -

could explain line static volatile gpio_registers* const gpio[] in code below? and syntax (volatile gpio_registers*) inside block do? // gpio hardware registers // typedef struct { uint32_t mode; uint32_t type; uint32_t speed; uint32_t push_pull; uint32_t idr; uint32_t odr; uint32_t bsrr; uint32_t lock; uint32_t alt_fn1; uint32_t alt_fn2; } gpio_registers; // ports can selected using enumeration // (port) index array. // port addresses can calculated using enum since // ports @ same offset each other. // static volatile gpio_registers* const gpio[] = { (volatile gpio_registers*)(gpio_base_addr + (port_a << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_b << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_c << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_d << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_e << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_f << 1

java.util.logging.Filter does not work when set in config-Class -

i trying set java.util.logging.filter discard logs pollute standard.out. i'am starting jvm -djava.util.logging.config.file=/path/to/my/logging.properties , in properties file config = my.package.owbdelegatehanderlogdiscarder set. when debug can see logger retrieved , filter set. isloggable method never called. any ideas? package my.package; import java.util.logging.filter; import java.util.logging.logrecord; import java.util.logging.logger; public class owbdelegatehanderlogdiscarder { /* * see org.apache.webbeans.config.owblogconst.error_0012 */ private static final string owb_log_const_error_0012 = "error_0012"; private static final string logger_name = "org.apache.webbeans.decorator.delegatehandler"; public owbdelegatehanderlogdiscarder() { logger delegatehandlerlogger = logger.getlogger(delegatehandler.class.getname()); if (delegatehandlerlogger != null) { delegatehandlerlogger.setfilter(new filter() { @overri

xcode - DynamoDB Swift Table Scan Mapping Class -

i trying simple table scan aws , dynamodb using swift. new apple programming , not sure issue is. documentation aws sdk in objective c , examples aws give swift rubbish. the best info got question here have been trying work through it. best way make amazon aws dynamodb queries using swift? there many error 1 question break multiple questions: the first part tried class item defines mapping database "item" i have written code , errors getting underneath each line in bold: class item : nsobject, awsdynamodbmodel, awsdynamodbmodeling { 'item' not conform protocol 'awsdynamodbmodeling' var artist : string = "" var songtitle : string = "" var albumtitle : string = "" var category : string = "" var pictureurl : string = "" var songurl : string = "" var

jquery - Add css to class with style (url) find -

im looping through divs on specific page , url thats defined theme in 'style' attribute. if find url add css specific class. getting no errors, can take took wrong turn? code: if (top.location.pathname === '/news/') { $j("div").each(function() { if ($j(this).css('background-image') === 'http://daddykate-acc.daddykate.be/wp-content/plugins/js_composer/assets/vc/vc_gitem_image.png') { $j('.vc_gitem-zone').css('display', 'none'); } }); } little ps: $j required make code work (wp theme obligation) edit: ok, used 'settimeout' function make function run after dom loaded. working fine now, thank input ! asking background-image return somthing url("http://...") , check fails here. regex or indexof : if( top.location.pathname === '/news/' ) { $j("div").each(function() { if( $j(this).css('background-image').indexof

send a php variable as part of an html form -

i working on website didn't create , not have full access (i can create page , add html scripts not more) trying add form send data processed third-party servlet. i trying include in form client id, saw can retrieved using php function session_id() . my question is, how send information along rest of input data. my form this: <form class="form-horizontal" action = "url" method="post" target="_blank"> <fieldset> <!-- select basic --> <div class="form-group"> <label class="col-md-4 control-label" for="selectbasic">culture</label> <div class="col-md-4"> <select id="crop" name="crop" class="form-control"> <option value="1">maïs</option> <option value="2">ble</option> </select> </div> </div> <!-- select basic --> <div clas

Windows Services on Azure Virtual Machines with Availability Sets -

i have few (around 10) windows services on existing environment. planning migrate azure following. host our database on azure sql database. install 10 windows services in azure virtual machine. please note these windows services bulk inserts azure sql databases. take 2 instances of vm (specified in #2 above) , configure them in availability set avail sla. i have 2 questions. do need install 10 services both vms? will not reduntant running windows services in both vms? so, bulk inserts duplicated azure sql databases. please let me know if thinking in right direction or there alternate methods (like worker roles) of utilizing existing windows services on azure minimum or no changes? it looks like, got answer question. when there 2 vms in given availability set, 1 , running. other vm come picture when primary vm down. thanks, prawin

maven - Getting unable to discover open pages. Can't run my test suite from jenkins in chrome browser -

i'm getting stack trace. default logging level set error loping strbrowsertype chrome starting chromedriver (v2.9.248315) on port 42027 tests run: 32, failures: 1, errors: 0, skipped: 31, time elapsed: 67.337 sec <<< failure! - in testsuite setupsuite(com.ambab.carworkz.testcases.serviceestimatortesttc) time elapsed: 66.668 sec <<< failure! org.openqa.selenium.webdriverexception: unknown error: unable discover open pages (driver info: chromedriver=2.9.248315,platform=windows nt 6.1 sp1 x86_64) (warning: server did not provide stacktrace information) command duration or timeout: 61.06 seconds build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' system info: host: 'rober-qa', ip: '192.168.0.70', os.name: 'windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91' driver info: org.openqa.selenium.chrome.chromed

android - Aidl result via callback -

i have written application records audio signal. signal has processed plug-in installed on device. communication between main application , plug-in, use aidl interface. as new interfaces, wonder if following work plug-in return result main application: i created interface: public interface mainappcallback { public void onresult(string result); } i implement in recording thread : mainappcallback callback = new mainappcallback() { @override public void onresult(string result) { // add result member variable of recording thread } }; in aidl interface , defined methods plug-in: /** callback send results main application */ void registercallback(mainappcallback callback); /** code documentation enough */ void unregistercallback(); i want in recording thread : plugin.registercallback(callback); is correct way go, or doing wrong here? that correct. make sure have defined aidl file callback interface too. here answer here has example

opencv - cv::imread doesn't work using release x64 (c++, visual studio 2013) -

i'm trying use opencv in microsoft visual studio project. code following one: cv::mat irgb; irgb = cv::imread("c:\\pierre\\prog\\toolboxes\\libim\\tests_unitaires_cpp\\ressources\\mandrill.jpg"); if (irgb.data){ cv::mat igray; cv::cvtcolor(irgb, igray, cv::color_bgr2gray); cv::imshow("image originale", igray); cv::waitkey(); } else{ std::cout << "l'image n'a pas été chargée" << std::endl; } i have set include path: properties-> c/c++ -> $(opencv)\include and also, lib path: properties -> linker -> $(opencv)\x64\vc12\lib properties ->input -> additional dependencies -> {opencv_calib3d249.lib opencv_contrib249.lib opencv_core249.lib, ... } the compilation indicates 0 errors , 0 warnings when run program imread doesn't work , image empty. hoewever followings messages present in console : 'project1.exe' (win32): loaded 'c:\windows\system32\msvfw32.dll'. cann

c# - Why my code throws thread aborted error? -

i using code download file throws error. please me in handling it. thread being aborted. protected void download_click(object sender, eventargs e) { try { string filepath = convert.tostring(attachment); string fullfilepath = ("../../siteimages/" + "donald.jpg"); response.clear(); response.clearheaders(); response.clearcontent(); response.addheader("content-disposition", "attachment; filename=\"" + path.getfilename(fullfilepath) + "\""); response.contenttype = contenttype; response.transmitfile(fullfilepath); //mnglogs.insertauditsinfo("tender downloaded via" + " " + mnglogs.pagename, mnglogs.usermacaddress, mnglogs.useripaddress, userid, "download"); //response.end(); } catch (exception ex) { utility.msg_error(master, ex.message); } } could download approach work? try

android - GridLayout LayoutParams - programmatically apply weight and span -

i want apply colspan , rowspan on gridlayout programmatically. have searched lot same. have doubts: is there other way can create gridlayout params programmatically?? can create using generatelayoutparams(attributeset attrs) method? if yes how should it. how can create attributeset programmatically. appreciated. in advance! if have height , width , want create gridlayout params programmatically use : gridlayout.layoutparams param =new gridlayout.layoutparams(); param.height = layoutparams.wrap_content; param.width = layoutparams.wrap_content; layoutparams.rowspec = gridlayout.spec(gridlayout.undefined, item.getrowspan()); layoutparams.columnspec = gridlayout.spec(gridlayout.undefined, item.getcolumnspan()); gridlayout.setlayoutparams(param);

How to resolve java.lang.java.lang.NoSuchFieldError:DEF_CONTENT_CHARSET in rest assured? -

i beginner, , trying check response given url. have written simple code, recieving exception. have tried lot of things, have not been able resolve it. please me. code: public class restapitest { @test public void test() { final string url = "http//:127.0.0.1:8080/myproject/api/"; given().parameter("header_name", "x-auth-token", "my_default_token", "_my_rest_token"). contenttype("application/json; charset=utf-16").when().get(url).then().statuscode(200); } } exception occured: java.lang.nosuchfielderror: def_content_charset @ com.jayway.restassured.config.encoderconfig.<init>(encoderconfig.java:48) @ com.jayway.restassured.config.restassuredconfig.<init>(restassuredconfig.java:41) @ com.jayway.restassured.restassured.<clinit>(restassured.java:423) @ com.rest.restapitest.test(restapitest.java:59) it seems dependency issue. see this thread

javascript - Configuring JSHint for Vim -

i installed jshint me out debugging javascript code. jshint seems working flawlessly want tweak suit me better. for exampled. want disable warning "wxxx", error "exxx" or add settings. how using global .jshintrc file? currently have ~/.jshintrc looks this: { //settings "debug": true', "devel": true', //and more settings "-wxxx": false, "-wxxx": false, "-exxx": false } but far can tell doing nothing. to disable warning, have use "-wxxx": true . you can't disable errors ( exxx ): http://jshint.com/docs/ this syntax works warnings (code starts w ), doesn't work errors (code starts e ).

angularjs - How to solve sticky foundation for sites navbar with angular 1.5 -

i trying adapt this example angular project. here plunkr link own adaptation, , important code here: i have no idea missing or mistyped... appreciated since it's week facing issue , can't figure out. <div id="page"> <header id="landing" class="header"> <div class="medium-4 small-centered text-center columns"> <h4 class="text-center">expand dimensions</h4> <a class="">scroll content</a> </div> </header> <div data-sticky-container id="navigation"> <div data-sticky data-margin-top='0' data-top-anchor="landing:bottom" data-btm-anchor="page:bottom"> <div class="top-bar"> <div class="top-bar-left"> <a href="#"> <img src="http://placehold.it/150x38" alt="" /> </a&

Searching a Database for and input aswell as array values in one search PHP, MYSQL, AJAX -

i having issue can not search exact data want. can search database fine , return values in format want. want add in ability search company's name , display results in same table. companys names not stored in databse in array session pulled api. store id each company in database set keys array. i want know if there way results given form array database search. know can foreach loop around sql select statement, issue if there no match in array not run search, making rest of search limited searching ip address 1 of main reasons this. way think possible adding foreach loop sql statement don't see how possible nor can find documentation on online. please help! here code runs based on input search box sent ajax. // start sessions, connected db set customer array session_start(); $conn = connect(); $customers = $_session['array']; // if ajax posted search input if($_post){ $search = mysqli_real_escape_string($conn, $_post['search']); //set sec

python - Error while testing the raise of self-defined exceptions (using assertRaises()) -

i creating tests python project. normal tests work fine, want test if in condition function raises self-defined exception. therefor want use assertraises(exception, function). ideas? the function raises exception is: def connect(comp1, comp2): if comp1 == comp2: raise e.invalidconnectionerror(comp1, comp2) ... the exception is: class invalidconnectionerror(exception): def __init__(self, connection1, connection2): self._connection1 = connection1 self._connection2 = connection2 def __str__(self): string = '...' return string the test method following: class testconnections(u.testcase): def test_connect_error(self): comp = c.powerconsumer('bus', true, 1000) self.assertraises(e.invalidconnectionerror, c.connect(comp, comp)) however following error: error traceback (most recent call last): file "c:\users\t5ycxk\pycharmprojects\electricpowerdesign\test_component.py", lin

gradle - Dynamic dependency checking tool for Java -

i'm looking tool analyses , optimises dependency hierarchy in gradle projects. i've taken @ https://github.com/wfhartford/gradle-dependency-analyze , on 1 coming netflix https://github.com/nebula-plugins/gradle-lint-plugin . both job based on static analysis of compiled classes. nevertheless, based on reflection can't found using static code analyse tools, injection frameworks fail , analysis yield results dependencies static code not using while running code be. so there tools can used? i'm thinking code coverage tools based on running unit tests. ideas highly welcome!

ios - use audioQueue Record Audio but missing data -

enter image description here i use audioqueue record audio file, data received in callback function, these not problems. when finished recording。 last data missing。i think buffer no fill not call callback function. therefore, final data lost zhis callback fuction enter image description here

.htaccess - Redirect all accessible URL's to only one specific subdomain -

i have working worpress domains, subdomain , alias working , locate @ root web server " www/ ". htpps://domain.com htpps://domain.net htpps://en.domain.net later decide install support web application in same server in folder " www/support/ ". setting support app needed set 1 domain or subdomain, , set " support.domain.com ". after last step realise following url's access support app: htpps://domain.com/support htpps://domain.net/support htpps://en.domain.net/support htpps://support.domain.com/support htpps://support.domain.net/support since support app doesn't work correctly differents domains or subdomains main 1 set ( was: " support.domain.com " ), i'm trying redirect 1 unique subdomain: " support.domain.com ". the file " .htaccess " locate in support app folder (" www/support/.htaccess ") still empty, rewrite rules try didn't worked, due low knowledge. how redirect accessible

android - Get data from database and share the content -

i have listactivity data mysql , insert them inside listview ... have sharemethod need receive data listview sharing .. im sorry think have put whole activity here .. “thanks in advance” listactivity.java public class listactivity extends appcompatactivity implements asyncresponse, adapterview.onitemclicklistener { public static final int notification_id = 1; final string log = "listactivity"; private arraylist<product> productlist; private listview lvproduct; private fundapter<product> adapter; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_list); imageloader.getinstance().init(uilconfig.config(listactivity.this)); postresponseasynctask taskread = new postresponseasynctask(listactivity.this, this); //taskread.execute("http://10.0.3.2/customer/product.php"); taskread.execute("http://symphonyrecords.6te.net/product

How to edit lines of all text files in a directory with python -

i edit , replace lines of .txt files in directory python purpose using following code: path = '.../dbfiles' filename in os.listdir(path): in os.listdir(path): if i.endswith(".txt"): open(i, 'r') f_in: line in f_in: line=tweet_to_words(line).encode('utf-8') open(i, 'w').write(line) where tweet_to_words(line) predefined function edition lines of text file. although not sure if logic of code right!? facing following error: ioerror: [errno 2] no such file or directory: 'thirdweek.txt' but 'thirdweek.txt' exist in directory! question see if method using editing lines in file right or not!? , if how can fix error ? you should add base path when use open : open(path + '/' + i, 'r') f_in: the same goes for: open(path + '/' + i, 'w').write(line)

javascript - functions return add to variable -

i have array of prices items var st = [0, 1, 2, 0, 3, 0, 4, 0, 0, 0, 0, 0] to figure out how money player gets runs function function buy(a) { money += st[return a;] } this should make function buy(a) { money += st[1] } the button pressed run buy() this <button onclick='buy(1)'>sell</button> when press button should return 1 , therefore add $1 players account getting , error unexpected keyword 'return' if need more information happy supply it fidde if need it as error message tells you, return has no place you've put it. you've put statement ( return a; ) inside property accessor ( st[...] ). isn't valid. from way you're using buy , don't want return @ all: function buy(a) { money += st[a]; } but if did want return value, you'd use return separately. instance, if wanted return updated value of money : function buy(a) { money += st[a]; return money; } (technically, return mo

c# - No InnerException in global HttpModule for ASMX Services -

i implemented ihttpmodule our asmx-services suggested in https://stackoverflow.com/a/551532/6607492 unfortunately serialized exception (which in json-format in our case) not contain information innerexception. is there way see innerexception also? my code ist similar has been given in answer mentioned above: public class globalerrorlogmodule : ihttpmodule { private ilogger log = logger.getlogger(); private errorhandlerfilter errorhandlerfilter = null; public void init(httpapplication context) { context.postrequesthandlerexecute += context_postrequesthandlerexecute; context.endrequest += context_endrequest; } private void context_postrequesthandlerexecute(object sender, eventargs e) { httpapplication app = (httpapplication)sender; if (app.response.statuscode == 500) { errorhandlerfilter = new errorhandlerfilter(app.response.filter); app.response.filter = errorhandlerfilter;

Angular 2, Webpack Uncaught ReferenceError: vendor... is not defined when add an external lib -

when add library (in case jplayer ) got error external "vendor_d73928c…":1 uncaught referenceerror: vendor_d73928c989153b363873 not defined at line module.exports = vendor_d73928c989153b363873 in file webpack:///external "vendor_d73928c989153b363873" here code (which add vendor jplayer ). entry: { vendor: [ 'bootstrap', 'bootstrap/dist/css/bootstrap.css', 'font-awesome/css/font-awesome.css', 'style-loader', 'jquery', '@angular/common', '@angular/compiler', '@angular/core', '@angular/http', '@angular/platform-browser', '@angular/platform-browser-dynamic', '@angular/router', '@angular/platform-server', 'angular2-google-maps/core', 'jplayer' ] }, do missing something? i found solution. exit visual

java websocket client does not connect -

i'm trying connect ethernet module via websocket protocol. i've connected module using javascript , nodejs. want create standalone application using java. i use following library https://github.com/tootallnate/java-websocket , conected nodejs socket server succesfully. same code fails connect said ethernet module, connected via javascript , node js. i've tried both of these sample codes. https://github.com/tootallnate/java-websocket/wiki#user-content-client-example processing - how send data (through websockets?) javascript application log successful connection: write(153): {get / http/1.1 host: localhost:9991 upgrade: websocket connection: upgrade sec-websocket-version: 13 sec-websocket-key: tjqdsjtjlaonzw5lzph3pa== } process(129): {http/1.1 101 switching protocols upgrade: websocket connection: upgrade sec-websocket-accept: 4s+ufw9gnz7icnrle0ak5ohjl00= } open using draft: draft_17 log failed connection: write(157): {get / http/1.1 host: 192.168.1.

java - How can I bind two SimpleDoubleProperty`s to each other with an exponential relation? JavaFX -

i know how binding this: doublepropertyone.bind(doublepropertytwo.multiply(2)); what need example above exponential relation: doublepropertyone.bind(doublepropertytwo.asexponentialofe()); so doubleproperty equals e^doubleproperty. there way accomplish relation or how else implement it? you can use bindings class crate binding depends on doublepropertytwo : doublepropertyone.bind(bindings.createdoublebinding(() -> math.exp(doublepropertytwo.get()), doublepropertytwo)); here callable passed first parameter createdoublebinding reevaluated every time dependencies passed starting second parameter (in case doublepropertytwo ) change.

Search for text in windows using java -

i have directory d://../../ , inside folder there many folders , in folders there many properties files *.properties. want search particular text in properties files in d directory.how in java? i have tried file f = new file( "d:/code" ); file[] matchingfiles = f.listfiles( new filenamefilter() { public boolean accept( file dir, string name ) { return name.endswith( ".properties" ); } } ); but searching in d:/code/ not in sub folders. you can use fileutils.listfiles apache iterate through files (not listfiles method of file, did in extended question): https://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/fileutils.html you define iofilefilter accepts *.properties files. having list of files, read them e.g. fileutils.readlines , string.

node.js - Use JOIN in Sequelize -

prompt how use join in sequelize ? have following code: db.user.findall({ attributes: ['id'], where: {vipend: {lt: expiresvip}, vip: true}, limit: 100, order: 'id' }).then(function(users) { in terms of 4, looks this: select "vkid" "id" "user" "user" "user"."vipend" < 1469699683 --expiresvip , "user"."vip" = true order id limit '100'; how achieve such result? select "vkid" "id" "user" "user" left join "notification" on "notification"."userid" = "user"."vkid" "user"."vipend" < 1469699683 , "user"."vip" = true , "notification"."type" = 4 , "notification"."expiresvipdate" < 1469699683 order id limit '100'; thank you! you nee

java - Inserting date from JDateChooser to Oracle DB -

i having trouble inserting date jdatechooser oracle db. below action event in class staffdisplay. `public void savebuttonpressed(actionevent e){ try{ int result = staff.addstaff( firstnametextfield.gettext(), lastnametextfield.gettext(), dateofbirthdatechooser.getdate(), departmenttextfield.gettext(), double.parsedouble(salarytextfield.gettext()), startdatedatechooser.getdate(), boolean.parseboolean(fulltimetextfield.gettext())); if(result == 1){//it worked joptionpane.showmessagedialog(this,"staff member added successfully"); }else{//didn't work joptionpane.showmessagedialog(this, "error occured - staff member not added"); }` this prepared statement in different class. `public class staffqueries { private static final string

Google Drive API - PHP (CRUD) -

i tried make script editing google spreadsheets. documentation it's not enough understand how work api. made registration in api manager , downloaded json file. give me examples how can edit document in google drive? thanks you can use google realtime api , provides collaboration service files in google drive via use of operational transforms. api javascript library hosted google provides collaborative objects, events, , methods creating collaborative applications. realtime api data model may change result of edits made other current user. realtime data models "eventually consistent." means if collaborators stop editing, see same data model. applications multiple people need edit same data simultaneously. document editors excellent examples of kind of application. realtime api handles aspects of data transmission, storage, , conflict resolution when multiple users editing file. for scripting, use class documentapp , document service creates , opens docu

php - How to override a vendor class in Laravel 5? -

i can't seem specific class overridden. in routeserviceproviders boot() function have line: $this->app->bind('dingo\api\routing\route', 'app\extensions\vendor\dingo\api\routing\route'); i'm trying override dingo route class can see, own custom class located @ app\extensions\vendor\dingo\api\routing my custom route class looks this: <?php namespace app\extensions\vendor\dingo\api\routing; use dingo\api\routing\route routebase; class route extends routebase { /** * merge controller properties onto route properties. * * @return void */ protected function mergecontrollerproperties() { echo 'huge success'; exit; } } what doing wrong? calls mergecontrollerproperties() on dingo route class instead of custom class?? i can mention worked fine until ran composer update while ago.

gtk - The API applets can make such a bubble popup -

Image
the api applets can make such bubble popup. how make own, contents fill complex layout elements gtk ui xml or html , css? it's more complicated simple vertical menu. in documentation can't find solution. the class want gtkpopover. available starting gtk+ 3.12.

powershell - Different time formats in same variable -

i writing script filtering computer accounts in ad. want disable/delete accounts @ least inactive more 90 days . if inactive @ least 90 days should disabled , if inactive more 180 days should deleted so, dates disabling , deleting $disbale= (get-date).adddays(-90) $delete = (get-date).adddays(-180) now loop through given ou , accounts @ least 90 days inactive, therefore inactive more 180 days, too. $acc = get-adcomputer -filter {lastlogontimestamp -lt $disable)} -properties lastlogontimestamp,description -searchbase "ou=computer,dc=dom,dc=de" -server dom then put them foreach disbale or delete them foreach ($pc in $acc) {if($pc.lastlogontimestamp -lt $delete){write-host 'delete'} else {write-host 'disable'}} but here ran error $pc.lastlogontimestamp of type [int64] , number of 18 digits , $delete in format time. why did same comparison above lastlogontimestamp -lt $disable work , doenst? how can work arround easy? you should use s

libgdx - com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: (Internal) -

i developing game using libgdx, when run game pc using desktop launcher have no errors , works perfectly. when connect phone , try execute directly on it, error errorlibgdx it's device couldn't find files inside assets folder. did have change directory paths? "hero.pack" loaded libgdx public class playscreen extends fatherscreen { private hero player; private textureatlas heroatlas; public playscreen (mygdxgame game, string levelname, music music){ super(game, levelname, music); heroatlas = new textureatlas("hero.pack"); ... } accept @m.antkowicz hero.pack code: hero.png format: rgba8888 filter: nearest,nearest repeat: none hero rotate: false xy: 1, 1 size: 705, 49 orig: 705, 49 offset: 0, 0 index: -1 it's simple code of animation of hero character. @manabreak hero.pack file in android/assets folder on pc. said before have no problem running game directly on pc! maybe have copy assets folde

VBA - Application.EnableCancelKey is acting somehow strange -

pretty question following - why in immediate window this: application.enablecancelkey = 2 ?application.enablecancelkey 1 the last line should 2 or missing something? thanks! edit: the basis enum xlerrorhandler states "the interrupt sent running procedure error, trappable error handler set on error goto statement.", need error handler use enum ( xlerrorhandler or 2 ). since statements not possible within immediate window , , on error goto 1 of these statements, cannot have error handler in immediate window , change value of enablecancelkey 2 . hence excel switches automaticaly 1 , giving value 1 when ask display value. the solution use sub. original reply: ok, used code in documentation provided on msdn , edited few things test following code. to explain shortly stopped execution pressing once "esc" button , preventing textbox exited. can watch in immediate window last enablecancelkey has changed in value normaly. sub test1()

windows 10 desktop - Opening visual studio solution from a linux drive -

i upgraded win7 win10 , noticed following change, don't explain now. i used checkout source code on in mounted linux drive (\myremote\myaccount\ x:) before able open visual studio 2008 solution (.sln file) , build since upgrade win10, devenv fails when double click on sln, saying that: the following files specified on command line: x:\blahblah\myproject\myproject.sln these files not found , not loaded but can open , save sln file using text editor. note devenv run administrator. any idea ?

http - Cache-control max-age setting using .htaccess -

Image
this http.confg file: mutex file:${apache_lock_dir} default pidfile ${apache_pid_file} timeout 300 keepalive on maxkeepaliverequests 100 keepalivetimeout 5 user ${apache_run_user} group ${apache_run_group} hostnamelookups off errorlog ${apache_log_dir}/error.log loglevel warn includeoptional mods-enabled/*.load includeoptional mods-enabled/*.conf include ports.conf <directory /> options followsymlinks allowoverride none require denied </directory> <directory /usr/share> allowoverride none require granted </directory> <directory /var/www/> options indexes followsymlinks allowoverride require granted </directory> accessfilename .htaccess <filesmatch "^\.ht"> require denied </filesmatch> logformat "%v:%p %h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" vhost_combined logformat "%h %l %u %t \"%r\" %>s %o \"%{refer

.htaccess - Htaccess - The requested URL /index.php was not found on this server in flynax -

i new htaccess , flynax, have installed flynax on localhost path localhost/flynax. shows index page content when click on shows error requested url /index.php not found on server. tried somany things shows error. changing rewritebase /flynax, rewritebase http://localhost/flynax/ .. please me . think problem lies in htaccess. following htaccess in flynax folder project main folder # configures footer on server-generated documents serversignature off # enable apache morrewrite module rewriteengine on # url prefix used per-directory #rewritebase / rewritebase / # block bad user agents rewritecond %{http_user_agent} ^blackwidow [or] rewritecond %{http_user_agent} ^bot\ mailto:craftbot@yahoo.com [or] rewritecond %{http_user_agent} ^chinaclaw [or] rewritecond %{http_user_agent} ^custo [or] rewritecond %{http_user_agent} ^disco [or] rewritecond %{http_user_agent

php - How to create ZF3 console application -

in zend framework 2 it's simple add initial module banner console applications. all need implement getconsolebanner , getconsoleusage methods , implement zend\modulemanager\feature\consoleusageproviderinterface or consolebannerproviderinterface interfaces. this enough dump messages in console when public/index.php started via cli. in zend framework 3 it's not same. doing same setup not provide same result. in console see default html page skeleton app same way visit via browser. that page being seen before install custom module: here docs zend-mvc-console module https://zendframework.github.io/zend-mvc-console/intro/ even after module installed suggested ( 'zend\mvc\console' added in module definitions) console banners not shown. i've tested var dumping inside methods , i'm able view data, framework executes methods shows no result in console. i've tested console routes , controllers. route found, controller action executed nothing s

GLUT in small part of window. (winapi) -

is there simple way see opengl images in small part of window? need controls buttons or checkboxes on rest part. how possible? possible (free)glut? ===edit1=== in other words, need children window, quarter of existing window. have change next code in order pack glut entity in small window. glutinit(&argc, argv); glutinitdisplaymode(glut_rgba | glut_double); glutinitwindowposition(20, 20); glutinitwindowsize(frame_width, frame_height); glutcreatewindow("myvideo2"); this article explains way of creation such program minutely in detail, works me few ommited moments couldn't set calling ontimer on picture control in vs13 have set on dialog. http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c10975/setting-up-opengl-in-an-mfc-control.htm

routing - Cakephp 3 : Plugin’s rooting in a prefix -

i have problem routing. have plugin can not connect route in prefix. plugins url : /plugin-name/test : call testcontroller in "pluginsname/testcontroller.php" i wan't /myprefix/plugin-name/test : call testcontroller in "pluginsname/testcontroller.php my differents test : <?php router::prefix('myprefix', function ($routes) { // call testcontroller in plugin in "pluginsname/api/testcontroller.php" $routes->connect('/plugin-name/test', ['plugin' => 'pluginname', 'controller' => 'test', 'action' => 'display']); // error $routes->connect('/plugin-name/test', ['plugin' => 'pluginname', 'controller' => 'test', 'action' => 'display', 'prefix'=>false]); not work $routes->plugin('pluginname', function($routes) { $routes->connect('/test', [

java - Hibernate produces incorrect update statement -

i have this: string hql = "update user u set u.externalid = u.id u.directory.name = 'mysuperawesomename' , u.externalid = null"; query query = session().createquery(hql); query.executeupdate(); and hibernate throws exception saying that: unexpected token join, requires set in statement [update user cross join set external_id=id name='mysuperawesomename' , (external_id null)] please, me pointing did wrong. mapping user entity: <?xml version="1.0"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd//en" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="com.example.user" table="user" lazy="true"> <id name="id" column="id" unsaved-value="null"> <generator class="com.example.mysuperawesomegenerator"/> </id>

c# - cannot convert from 'string' to 'System.Collections.Specialized.NameValueCollection' -

i working on asp.net mvc-4 web application , , have following method upload json object 3rd part application. want set url header application/x-www-form-urlencoded :- using (webclient wc = new webclient()) { string url = currenturl + "resources?authtoken=" + pmtoken; uri uri = new uri(url); wc.headers.add(httprequestheader.contenttype, "application/x-www-form-urlencoded"); var encodedjson = webutility.urlencode(data); crudoutput = wc.uploadvalues(uri, "input_data=" + encodedjson); } but above raising following error :- cannot convert 'string' 'system.collections.specialized.namevaluecollection' the best overloaded method match 'system.net.webclient.uploadvalues(system.uri, system.collections.specialized.namevaluecollection)' has invalid arguments so can adivce on please

tfs - How to fix out TF53001 issue in TFS2015? -

working tfs2015 upade2 , vs2015 update2. works until 1 of project collection can't add, rename, delete files. prompt error message: tf53001: database operation canceled administrator. this issue can reproduced in team team project collection administrator. how fix out issue? appreciate! thanks tomhans. in order resolve error, might want start checking version of sql instance hosting tfs databases. to find version of sql instance run query ‘select @@version’ . version list sql can found here . if sql version lesser sql 2014 cu4 update cu4 or higher update. , try again. more details please refer this blog msdn.

c# - set CultureInfo to a language with country unknown -

i'm trying set cultureinfo of application depending on settingfile that's being given me (i can't change it's content). in settingfile have access language name should display (no information country) example german , french , english . i managed cultureinfo using cultureinfo cultureinfo = cultureinfo.getcultures(culturetypes.allcultures) .where(c => c.englishname == languagename).firstordefault(); my problem i'm supposed : thread.currentthread.currentculture = new cultureinfo({lang-country}); but have language (via cultureinfo.name ), can't create culture info. trying thread.currentthread.currentculture = cultureinfo; did not work either. i thought doing new culltureinfo({cultureinfo.name+"-"+cultureinfo.name.toupper()}); but doesn't work example english ... is there way set cultureinfo common country related language ? know not perfect solution (for example common between en-uk ,

unity3d - Google Play Games TurnBased Multiplayer starts without connections -

i trying wrote turnbased multiplayer unity , google play games package. when users sucessfully login on google account , press "start button", i'm trying create turnbased match: //called 1, 1, 0 params public void startmatch(uint minopponents, uint maxopponents, uint variant) { playgamesplatform.instance.turnbased.createquickmatch(minopponents, maxopponents, variant, this.onmatchstarted); } void onmatchstarted(bool success, turnbasedmatch match) { if (success) { if (multiplayerhandler == null) multiplayerhandler = gameobject.find ("multiplayerhandler").getcomponent<multiplayerhandler> (); multiplayerhandler.startgame (); } } but onmatchstartedmethod calling right after startmatch method. logcat write this: passing converted match user callback:[turnbasedmatch: mmatchid=chokcqjz2su-ywwqahacgaag____________ardz7pmjjczzwvcb, mdata=, mcanrematch=false, mselfparticipantid=p_1, mparticipants=[participant: 'o

angularjs - hide list items on the basis of data in angular using ng-hide -

i want show list items data coming api . want use standard way show data coming <div class="row" ng-repeat="query in prev_queries"> <div class="col-md-12 cell"> <div class="well" > <p class="history">{{query.query_string}}</p> <ul class="history-filter"> <li ng-hide="true"> <i class="fa fa-twitter fa-2x" aria-hidden="true"></i> </li> <li ng-hide="true"> <i class="fa fa-facebook fa-2x" aria-hidden="true"></i> </li> <li ng-hide="false"> <i class="fa fa-instagram fa-2x" aria-hidden="true"></i> </li> <l

Cookie not saving in Web view in Xamarin(Android) -

i creating android application in xamarin. using web view display website. after user login website create cookie , should store in web view. there 2 web view in app, 1 web view displaying pages , if there text box in page page opened in second web view. so when user tries login, second web view opened(as login page contains text box), after user enter details , click next button, second view closed , next page opened in first web view. after login cookie created , stored in web view , when user open app next time doesn't asks login. should happen. the problem is, if user enter details , after clicks next button(next page loading in first web view) , quits application start app again cookies not exists , app asks login again. after login reading cookie value on page finish event of webview , displaying in toast. if quits app after login, gets cookie value in toast when starts app again cookie doesn't exists anymore , asks me login again public override void onpagefi