Posts

Showing posts from March, 2010

android - LayoutInflate Exception with ViewPager -

java.lang.runtimeexception: unable start activity componentinfo{urlinq.android.com.edu_chat_lollipop/urlinq.android.com.edu_chat.loginactivity}: android.view.inflateexception: binary xml file line #10: binary xml file line #10: error inflating class android.support.v4.view.viewpager still getting message after reinstalling android studio. not sure going on here got message after updating minsdk version. i have user using same files , application able run. fragment runs viewpager. have red exclamation mark next background on viewpager defined in activity. private viewpager mviewpager; private pageradapter mcustompageradapter; private imagebutton signupbtntoggle; private imagebutton loginbtntoggle; private imagebutton loginbtn; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); } @override /** * load login_main.xml layout. * in addition, load viewpager. */ public view oncreateview(layoutinflater inflater, viewgroup container...

ios - Getting element from NSString -

my app data php web service , return nsstring ["first name","last name","adress","test@test","000-000-0000","password","code","0"] how can second element ? this json formatted string getting web service. you must getting bytes server. replace variable have bytes stored variable " response data ". code: nserror* error; nsarray* myresultarray = [nsjsonserialization jsonobjectwithdata:responsedata options:kniloptions error:&error]; you array in variable " myresultarray " , can value index. code: nsstring* first name = [myresultarray objectatindex:0];

documentum - Xcp 2.1 Preview mode error -

when trying run preview mode in xcp 2.1 . getting below error. http://localhost:8888/concordant_insurance/reloadcontext?webby http error 404 problem accessing /concordant_insurance/reloadcontext. reason: not found -------------------------------------------------------------------------------- powered jetty:// also , when checked xcp designer logs seeing below. 2015-09-21t11:02:01.894 info [tmain] [com.documentum.fc.client.impl.connection.docbase.docbaseconnection:377] object protocol version 2 2015-09-21t11:02:02.519 info [tmain] [com.documentum.fc.client.security.internal.authenticationmgr:448] new identity bundle <dfc_m0m14wki50bkqjx3rbvf33lciuca 1442813522 synpszd4515.syntelorg.com akqqpudgiie/tvvx5nqwoeowkmssd3w19n1lkwpftu/4ahaw5e+iln7lsrtgjpcgluvanmex7jb64cgupy+kitzi/limqlewy8iqqa2kdsfo3x7uzjqanf+fyqivinhg0sjw7z1mtqdazujifmnzrcyzyearhpe/cfyb0wzw4vy=> 2015-09-21t11:03:45.821 info [tmain] [com.documentum.deployment.service.deploymentma...

assembly - How does a loader in operating system work? -

i know loader program loads program main memory. so,how works? happens exactly? when loader loads program, entry in pcb created , program put in job pool. how executable codes of program copied main memory? in simple how load codes of file main memory using c or c++ ? this largely depends on operating system. write here linux specific, similar things happens on other operating systems. first, fork() call initiated, creating new process (and appropriate pcb entry). next step calling exec system call hard work. i'll assume we're talking elf executables here. in case, after recognizing elf executable (by inspecting magic number) exec call load_elf_binary ( http://lxr.free-electrons.com/source/fs/binfmt_elf.c#l664 ) the argument struct linux_binprm *bprm passed function contains metadata binary (already filled exec ) such executable name, environment info, etc. ( http://lxr.free-electrons.com/source/include/linux/binfmts.h#l14 ) the elf program loading com...

babeljs - disable es6 features in Chrome 45.0.2454.93 -

in chrome 45.x, few features of es6 seems enabled default, experimental flags not enabled: class model { constructor(properties) { this.properties = properties; } toobject() { return this.properties; } } is there way disable this? reason is, i'd use transpiler babel transpile code es5, es6 disabled, can more realistic test in chrome, possible? thanks, a.c. open chrome://flags/#disable-javascript-harmony-shipping , enable feature. disable harmony(es6) features.

django - Python SSL Error- Error while sending email using Mandrill / Djrill -

i below error while sending mail using djrill. app_1 | file "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response app_1 | response = wrapped_callback(request, callback_args, *callback_kwargs) app_1 | file "/code/invitations/views.py", line 102, in request_invite app_1 | msg.send() app_1 | file "/usr/local/lib/python2.7/site-packages/django/core/mail/message.py", line 303, in send app_1 | return self.get_connection(fail_silently).send_messages([self]) app_1 | file "/usr/local/lib/python2.7/site-packages/djrill/mail/backends/djrill.py", line 81, in send_messages app_1 | sent = self._send(message) app_1 | file "/usr/local/lib/python2.7/site-packages/djrill/mail/backends/djrill.py", line 132, in _send app_1 | response = requests.post(api_url, data=api_data) app_1 | file "/usr/local/lib/python2.7/site-packages/requests/api.py", line 109, in post app_1 | return request('post',...

Yii2 params access within local config file in common directory -

i'm using yii2 advanced template, want access params.php in main-local.php file, called ways: main-local.php: 'mailer' => [ 'class' => 'myclass', 'apikey' => \yii::$app->params['mandrill_api_key'], 'viewpath' => '@common/mail', ], and have stored mandrill_api_key in params.php params.php: <?php return [ 'adminemail' => 'admin@example.com', 'supportemail' => 'support@example.com', 'user.passwordresettokenexpire' => 3600, 'mandrill_api_key' => 'mykey' ]; i'm getting error: notice: trying property of non-object in c:\xampp\htdocs\myproject\common\config\main-local.php on line 25 what should access these parameters? the config files read before application instantiated explained in request lifecycle : a user makes request en...

java - Directed graph with non negative weights (adjacency matrix) -

Image
first off, apologize bad paint drawing of graph. weights not scaled. having hard time coming algorithms solve few problems. first, want find paths take 3 "stops" or less c c (just example... can 2 vertexes). after researching, found bfs might i'm looking solve problem. correct in assumption? there 2 paths have 3 stops or less: c -> d -> c c -> e -> b -> c i want find shortest path c (just example.. can 2 vertexes). after doing little bit of research, came conclusion should use dijkstra's algorithm. correct in assumption? if so, saw there various implementations. matter if use binary heap, fibonacci heap, or queue? thank , please let me know if need more information! first, want find paths take 3 "stops" or less c c (just example... can 2 vertexes). after researching, found bfs might i'm looking solve problem. correct in assumption? yes, are. property of bfs processes nodes in level-order, therefore ...

datetime - how will i take future months by the given month and year in php -

insert:<input type="text" name="my"> no of months:<input type="text" name="noofmonths"> <input type="submit" name="sub" value="submit"> ater clicking submitting button want corresponding future month/year. eg:insert: septemeber 2015; no of months:4; want o/p:january 2016; another eg: eg:insert: december 2015; no of months:2; want o/p:february 2016; you can try code suppose user enter date $date = "20 september"; //your spelling september wrong make sure user enter correct spelling user enter 4 in months echo $effectivedate = date('f y', strtotime("+4 months", strtotime($date)));

android - Widget click not working after changing device language -

i have simple widget 2 textview, in it's onupdate(): pendingintent pendingintent = intentutils.getclockwidgetproviderpendingintent(context); views.setonclickpendingintent(r.id.timetext, pendingintent); works great, when users changes device language can't click on widget anymore (untill rebooting device). any ideas problem? thanks. are using updateappwidget invocations somewhere else in code? should invoke setonclickpendingintent before each updateappwidget invocation or can use public void partiallyupdateappwidget (int appwidgetid, remoteviews views) instead because "note because these updates not cached, state modify not restored restoreinstancestate not persist in case widgets restored using cached version in appwidgetservice." so every time when user rotate device or change language, widget reseted values keeped in latest updateappwidget invocation.

How to remove virtual machine in vSphere -

i removed test virtual machine inventory. how delete disk. have using vsphere client. click on host, choose 'configuration' tab under 'hardware' choose 'storage'. right click on datastore , choose 'browse datastore'. locate virtual machine located , right click , 'delete disk'.

django rest swagger does not display properly -

Image
i want use django-rest-swagger document apis, follow official doc setting in django app. doesn't display below: i using nginx+supervisor+gunicorn serve django app. possible cause it? the proper page should below: s http://www.django-rest-framework.org/img/django-rest-swagger.png i assume static files not configured. can see in firebug or chrome dev tools. read documentation how deploy static files ( https://docs.djangoproject.com/en/1.8/howto/static-files/deployment/ ) check rest_swagger in installed_apps. check static_url, static_root settings setted properly. call collectstatic management command. check nginx configured serve static files in static_root folder.

explode associative array in php and adding two fields in the array -

output of form: array ( [0] => (19.979802102871425,73.78671169281006) [1] => (19.97978382724978,73.78682289971039) [2] => (19.979765551626006,73.78697712672874) ) expect output: array ( [0] => [lag]=>19.979802102871425, [long]=>73.78671169281006, [1] => [lag]=>19.97978382724978, [long]=>73.78682289971039 [2] => [lag]=>19.979765551626006, [long]=>73.78697712672874 ) following code working not given me desired output unaware of adding 2 associate element in array foreach($_post['textbox'] $value): $value = str_replace(array('(',')'), '',$value); foreach (explode(',', $value) $topic) : list($name, $items) =$topic; ///stuck here } $test[] = explode(',', $value); endforeach; endforeach; could please suggest changes i...

javascript - Show/Hide divs on Form with multiple radio groups -

i'm trying create form 10+ questions on it. each question have 3 answer options, "yes" "no" "not applicable" chosen via radio buttons. when "no" selected div shown additional information, applicable each question. not being great @ javascript consulted stack overflow, found , have failed miserably amend it: <script type="text/javascript"> function yesnocheck() { if (document.getelementbyid('nocheck').checked) { document.getelementbyid('ifno').style.display = 'block'; } else document.getelementbyid('ifno').style.display = 'none'; } </script> <p>question 1</p> <input type="radio" onclick="javascript:yesnocheck();" name="q1" id="yescheck"> yes <br> <input type="radio" onclick="javascript:yesnocheck();" name="q1" id="nocheck"> no <br>...

c# - The modifier 'new' is not valid for this item -

i created class groupprincipalextension : groupprincipal can see inherits system.directoryservices.accountmanagement.groupprincipal now when try create constructor in extension class, public new groupprincipalextension() { //do } i error, the modifier 'new' not valid item based on read, can add own constructors derived class or without 'new' keyword edit if remove new keyword: 'system.directoryservices.accountmanagement.groupprincipal' not contain constructor takes 0 arguments remove new constructor , should work. declare new keyword when you're creating instance. also since inherits class might want declare this: public groupprincipalextension() : base() // parameters ?? { //do }

Get thumbnail of the newest picasa picture using the Google Data Api -

what want simple, once user logged in want retrieve newest picture uploaded picasa show preview gallery. i had solution querying for: https://picasaweb.google.com/data/feed/api/user/default?kind=photo&max-results=1&thumbsize=320&fields=entry(media:group(media:thumbnail)) however no longer works, believe because way deprecated. basically using partial response shown here want xml response can parse. (i got parsing figured out). the problem can't seem find "right" combination of field values give me 1 picture is not user icon. using old way described above not getting single one. you may try "listing photos uploaded": form documentation: it possible retrieve photos associated user, without specifying particular album. following request retrieves last 10 photos uploaded userid: get https://picasaweb.google.com/data/feed/api/user/userid?kind=photo&max-results=10 https://developers.google.com/picasa-web/docs/2...

python - Create compact/human-friendly floats using unicode vulgar fractions -

are there modules (preferably in standard library), can turn float number more human friendly? maybe it's not more human friendly, @ least more compact. eg. 4.625 become "4⅝" (bonus brownie points recognizing pi reasonable precision) this code outline best come with: import unicodedata def simplify_float(number): vf = "vulgar fraction " vulgars = {0.125 : unicodedata.lookup(vf + "one eighth"), 0.2 : unicodedata.lookup(vf + "one fifth"), 0.25 : unicodedata.lookup(vf + "one quarter"), 0.375 : unicodedata.lookup(vf + "three eighths"), 0.4 : unicodedata.lookup(vf + "two fifths"), 0.5 : unicodedata.lookup(vf + "one half"), 0.6 : unicodedata.lookup(vf + "three fifths"), 0.625 : unicodedata.lookup(vf + "five eighths"), 0.75 : unicodedata.loo...

javascript - how to make centre align divs vertically and horizontally? -

could please tell me how make centre align divs vertically , horizontally ? have 2 divs need display on centre of page .secondly there margin between 2 divs how remove margin here code <div style="height:100px;width:100px;border:1px solid red;"class="moreinfo"> </div> <div style="height:100px;width:100px;border:1px solid red" class="moreinfo"> </div> https://jsfiddle.net/tbnd90fd/ i https://jsfiddle.net/tbnd90fd/1/ best way? .maindiv{ text-align: center; position: absolute; left: 45%; top: 45%; } i give top , left ..is best way ? , how remove margins? from .maindiv remove text-align , set left , right 50% and, finally, add 1 more line transform:translate(-50%, -50%); . way, maindiv upper left corner placed in center , transform "pull" , left half size of (and don't need margin:auto anymore). there example : .moreinfo { display: inl...

javascript - undefined offset error in php somewhere in the date and time error -

i making program updating database , time clicked update button displays error this: notice: undefined offset: 2 in c:\xampp\htdocs\maritime_database\students_entry.php on line 103 notice: undefined offset: 1 in c:\xampp\htdocs\maritime_database\students_entry.php on line 103 it somewhere in line 103 , code: <?php if($opr=="upd") { $sql_upd=mysql_query("select * students stud_id=$id"); $rs_upd=mysql_fetch_array($sql_upd); list($y,$m,$d)=explode('-',$rs_upd['dob']); ?> why parse date manually ? php has date built-in function : <?php if($opr=="upd"){ $sql_upd = mysql_query("select * students stud_id=$id"); $rs_upd = mysql_fetch_array($sql_upd); $dob = strtotime($rs_upd['dob']); // convert unix time $y = date("y",$dob); // extract year $m = date("m",$dob); // extract month $d = date("d",$dob); // extract day echo "day :...

java - Method that walks through combinations and counting those who passes condition -

i should find every 5-number combination of values 0 1 2 3 4 5 0 not first , 1 digit not repeated more 1 time.the method shall return number of valid combinations. valid combinations: 1 0 0 2 1 1 2 3 4 5 1 1 2 2 3 invalid combinations: 0 1 2 3 4 (0 cant first) 2 3 3 3 5 (not allowed 3 of same digits) 0 1 2 3 4 5 (6 digit numbers not allowed) i did similar task permutations, i'm not quite sure how approach one. right answer 5100 (i solved mathematically). you need write isvalid function , try following pseudo-code nb_solution = 0 = 0 ; < 100000; i++ if isvalid(i) nb_solution ++ edit : did, , find same value found. public static void computeexample() { int count = 0; for(int = 0; < 100000; i++) { if(isvalid(i)) { count++; } } system.out.println(count); } public static int[] splitciffers(int number) { int tmp = number; int unite = tmp % 10; tmp = (tmp - unite) / 10; int dizaine ...

java - Job interview test - finding the index of the first of two chars to appear in a string -

i had online interview , asked neat question. thought share community, along answer. see if think answer correct , if not - how improve on it? think benefit people me relatively short coding experience, trying make first steps. note - problem did not have explanation in body - had figure out functionality on own. function return the first instance of char a or char b in given string s or -1 if either not found. problem simplify implementation below as can. better if can improve performance part of simplification! fyi: code on 35 lines , on 300 tokens, can written in 5 lines , in less 60 tokens. static int func(string s, char a, char b) { if (s.isempty()) return -1; char[] strarray = s.tochararray(); int i=0; int aindex=-1; int bindex=-1; while (aindex==-1 && bindex==-1 && i<strarray.length) { if (strarray[i] == a) aindex=i; if (strarray[i] == b) bindex=i; i++; } if ...

windows 10 - UWP apps accessing files from random location on system -

in uwp there files , permissions restrictions, can acces files directly few folders or can use filepicker access anywhere on system. how can use files picked filepicker , use them anytime again when app runs ? tried use them again path gives permission error. know "futureacceslist" limit 1000 , make app slow if not wrong? . there better way ? or can store storage files link somehow in local sqlite database? considering method.. public async static task<byte[]> tobytearray(this storagefile file) { byte[] filebytes = null; using (irandomaccessstreamwithcontenttype stream = await file.openreadasync()) { filebytes = new byte[stream.size]; using (datareader reader = new datareader(stream)) { await reader.loadasync((uint)stream.size); reader.readbytes(filebytes); } } return filebytes; } this class.. public class appfile ...

Oracle sql statement to store blob images with PHP -

hi have question regards storing images oracle sql developer database through use of php. have created column in table accepts blob data types. take instance have html form submit , store image database html form <form action ="image.php" method ="post" enctype="multipart/form-data"> <input type ="file" name ="pic" accept ="image/*"/> <input type ="submit" value ="submit" name ="submit"/> </form> image.php $_file = $_files[pic]; $filenmae = $_file['name']; $imagedata = file_get_contents($_file['tmp_name']); $sql ="insert sql statement here" what have write in sql statement work? tried inserting entire imagedata database got returned ora-0097(which means value i'm trying insert exceeds limit of characters) exception.

sql - The conversion of a varchar data type to a datetime data type resulted in an out-of-range value using a script -

using following code getting error: exception calling "fill" "1" argument(s): "the conversion of varchar data type datetime data type resulted in out-of-range value." @ c:\users\username\desktop\test.ps1:47 char:1 + $commandcompl.fill($dt7) | out-null + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : notspecified: (:) [], methodinvocationexception + fullyqualifiederrorid : sqlexception $host.ui.rawui.buffersize = new-object management.automation.host.size (200, 25) $date = (get-date).tostring("yyyymmdd") clear $sqltablecomplia = 'abc' $sqlservercomplia = "123.123.123.123" $sqldbnamecomplia = "test" $usernamecomplia = "abc" $passwordcomplia = "pasword" $sqlserverlandesk = "cba\test1" $sqlconnectionlandesk = new-object system.data.sqlclient.sqlconnection $global:dt = new-object system.data.datatable $dr = "" $lona = "...

c# - Implementing generic interface that takes a generic interface as a parameter -

i have these 2 interfaces /// <summary> /// represents interface knows how 1 type can transformed type. /// </summary> /// <typeparam name="tinput"></typeparam> /// <typeparam name="toutput"></typeparam> public interface itransformer<in tinput,out toutput> { toutput transform(tinput input); } public interface itransform { toutput transform<tinput,toutput>(itransformer<tinput, toutput> transformer); } i have class in in want implement itranform this. public class messagelogs :itransform { // am not able implement itransform interface // messagelogs getting binded in param not getting binded // tinput in transform<tin,tout> // public t transform<messagelogs, t>(itransformer<messagelogs, t> transformer) { return transformer.transform(this); } } how correctly without losing genericness of 2 interfaces? have many tranformers. ...

javascript - AngularJS on IIS - Browser Cache doesn't return updated page template -

i developing b2b in production. problem when update application on iis html files of template not updated. after clear cache of browser gets updated. how can avoid iis cache pages of templates? or more how can have recent server files? thanks matteo when update files on html , means applying patch eveytime have updated number build number or patch number. have append patch number or build number @ end of each page. have set build number in global service , embed @ last of each html template. for example. @ start: build_number =1; your_template ='content.html?'+buildnumber at second iteration: build_number =2; this way updated htmls everytime apply changes on server. build number final svn build number. hope point.

php - Expected response code 220 but got code "", with message "" in Laravel -

i using laravel mail function send email. following app/config/mail.php file settings. 'driver' => 'sendmail', 'host' => 'smtp.gmail.com', 'port' => 587, 'from' => array('address' => 'email@gmail.com', 'name' => 'myname'), 'encryption' => 'tls', 'username' => 'myusername', 'password' => "password", 'sendmail' => '/usr/sbin/sendmail -bs', 'pretend' => false, controller mail method //send mail mail::send('sendmail', array('key' => 'value'), function($message) { $message->to('emailid@hotmail.com', 'sender name')->subject('welcome!'); }); when run code gives me following error message: swift_transportexception expected response code 220 got code "", message "" i have created sendmail.php file i...

javascript - How to filter from a combobox in Sencha-touch? -

i trying filter in combobox under sencha touch framework not loading correct records in list. my code is: ontemplatesfilterchoosen: function(field, newvalue, oldvalue){ var store = ext.getstore('customers'), templatesstore = store.getat(0).templates(), //get associated store text = field.getrecord().data.text; templatesstore.clearfilter(); //here code filter main store based in records of associated store } but not working correctly , store.getcount() for example 0, showing empty list. in main model adding new model based in properties of filter called "customertemplatemodel" associations: [ { type: 'hasmany', associatedmodel: 'x.customer.model.customertemplatemodel', ownermodel: 'x.customer.model.customermodel', associationkey: 'templates', autoload: true, filterproperty: 'value', name: 'templates...

android - Gingerbread - No Support for Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS -

when send user settings on ginger bread device, error there no activity handle intent settings.action_application_development_settings what's solution. how can send user development settings? how can let them adjust this. i error there no activity handle intent settings.action_application_development_settings not every device, prior api level 15, had support action. what's solution do not support android 2.x, setting minsdkversion 15. or, let user know cannot take them straight screen, , lead user on general settings app, via settings.action_settings .

ruby - EventMachine not receiving TCP data on localhost -

using eventmachine gem trying send , receive data on localhost. following code of client , server files. server.rb class bccserver < em::connection attr_accessor :server_socket def post_init puts "bcc server" end def recieve_data(data) puts "received data: #{data}" send_data "you sent: #{data}" end end em.run em.start_server("0.0.0.0", 3000, bccserver) end client.rb class dcclient < eventmachine::connection def post_init puts "sending " send_data "send data" close_connection_after_writing end def receive_data(data) puts "received #{data.length} bytes" end def unbind puts 'connection lost !' end end eventmachine.run eventmachine::connect("127.0.0.1", 3000, dcclient) end i executed both server , client files in separate console. following output of client client output sending connecti...

asp.net mvc - Historical URL resolving to new ActionResult instead of 404 -

i have controller has parent , child actionresult. [route("parent/", name = "parent")] public actionresult parent() [route("parent/{child}/", name = "child")] public actionresult child(string myparam) if put in url www.mysite.com/parent good. if address child parameter @url.routeurl("child", new { param = myparam }), www.mysite.com/parent/child however have historical page need 301 www.mysite.com/parent/child.htm. when put in above url triggers parent actionresult. www.mysite.com/parent when need 301 www.mysite.com/parent/child

javascript - how to send value in proctractor of date field -

this html <input id="filter-datepicker" type="daterange"ranges="ranges" class="form-control date-picker" placeholder="select date range" name="sensordetails.date" ng-model="mydaterange" ranges="ranges" required /> this proctor js var date = element(by.model('mydaterange')) date.sendkeys("2015-05-04 - 2015-09-30") this not working,i cannot send value. you can try executescript("document.getelementbyid('someelem').value = '2011-11-11';");

python - Django log operations between two publish actions -

i got problem django. i have site has 'publish' function. i need keep changes between 2 'publish' actions. details example: when first click publish, 2 objects(assume obj1 , obj2) stay in state state1. now change, e.g. change field of ojb1 , delete ojb2, don't press publish. so, currently, users browser still see obj1 , obj2 in state state1. then, trigger "publish", user should see changed obj1 , obj2 disappears. so, firstly, thought use 2 databases(currently use mysql), assume db1 , db2, views functions data db1 , show users. db2 used keep realtime data containning changes administrator. so, when press publish button, dump db2 db1. this method has problem produce hign latency when sync db , somethings waists io resources,e.g. changed 2 objects, sync whole db. anyone has better idea? thanks. wesley

html - justify-content: space-between elements are not at the edges -

i have problem, items not use full width . in codepen use space better in original code, dont use full width , dont know why. the differenze between space-between , space-around minimal shouldnt be. (not tested in codepen) http://codepen.io/notyetnamed/pen/kdmqjv html: <div class="wrapper"> <h2>lorem ipsum</h2> <ul class="cf"> <li> <a href="#"> <img src="http://lorempixel.com/180/180/" alt=""> <h3>lorem</h3> </a> </li> <li> <a href="#"> <img src="http://lorempixel.com/180/180/" alt=""> <h3>lorem</h3> </a> </li> <li> <a href="#"> <img src="http://lorempixel.com/180/180/" alt=""> <h3>lorem</h3...

android - Cannot filter assets for multiple densities using SDK build tools 21 or later -

due issue building application in release mode gradle plugin 1.3.0, have switched 1.4.0 (beta 2), fixes said build issue. however, whereas flavors build perfectly, others have build aborted following error message: cannot filter assets multiple densities using sdk build tools 21 or later. consider using apk splits instead. i haven't found reference sentence above, should resources of these flavors, or why error appears in couple of flavors , not in of them. edit: build.gradle apply plugin: 'com.android.application' android { signingconfigs { config { } } compilesdkversion 23 buildtoolsversion "23.0.1" defaultconfig { applicationid "com.example.appname" minsdkversion 8 targetsdkversion 23 versioncode 1 versionname '0.0.1' } buildtypes { release { proguardfiles getdefaultproguardfile('proguard-android.txt'), 'progua...

geolocation - How to insert the polygon and checking if a passed polygon is inside it in mysql database? -

can check if polygon inside polygon in mysql query? query polygons contains passed polygon in string? after googling, found query:- select *, astext(poly) geos contains( geomfromtext('polygon((42.000497 -109.050149, 41.002380 -102.051881, 39.993237 -102.041959, 38.999037 -109.045220, 42.000497 -109.050149))'), poly ); i not sure doing basically? query insert polygon , checking if passed polygon inside it? thanks in advance! you can insert polygon this: set @g1 = 'polygon (( //your points of polygon here ))'; insert geos set poly=st_geomfromtext(@g1); and if want check g2 if contains g1: select * geos st_contains(st_geomfromtext(@g2), poly);

javascript - can I attach event listeners to canvas events? -

i'd know if it's possible if there canvas tag in html i'd attach event listener each time it's programmed draw callback function increment value or something ah found it! needed mutationobserver , going through addednodes list returns search canvas node fyi in future here resource: https://developer.mozilla.org/en-us/docs/web/api/mutationobserver

case insensitive - Is there a reason to use uppercase letters for hexadecimal CSS color values? -

i see colors in css properties values commonly written in uppercase form: .foo .bar { background-color: #a41b35; color: #fff; } but can use: /* same same */ .foo .bar { background-color: #a41b35; color: #fff; } it looks using lowercase values same, and, css values colors are not case-sensitive . lots of graphic design software use uppercase form. , common find uppercase notations in source code, looks there tradition. i understand consistency thing, should same everywhere in software, standard doesn't give indication, people what want or what told do . is there rational reasons this, historic, compatibility, old ie6 hacks, performances or practical reasons? i not aware of differences other personal preference. personally, prefer lowercase since it's quicker read, although in short strings such css color values, benefit negligible. really , think it's because think lowercase looks better. hexadecimal, however, is traditionally written in ...

java - How do I dynamically change the background of an item in a listview in JavaFX -

i writing program places set of items in listview. checks if finds items in database. if item can't found in database want change background of item in listview. using javafx program. how do this? you can use custom cell factory listview checks condition , applies appropriate css style class each item/cell. the following code shows how go listview items of type string. listview.setcellfactory(new callback<listview<string>, listcell<string>>(){ @override public listcell<string> call(listview<string> p) { listcell<string> cell = new listcell<string>(){ @override protected void updateitem(string t, boolean bln) { super.updateitem(t, bln); if (t != null ) { settext( t); if (item_is_not_available){ if (!getstyleclass().contains("mystylecla...

OrientDB concurrent graph operations in Java -

i'm trying use orientdb (v2.1.2) in multithreaded environment (java 8) update vertex within multiple threads. i'm aware orientdb using mvcc , operations may fail , have executed again. i wrote small unit test tries provoke such situations waiting on cyclic barrier within threads fork. unfortunately test fails obscure exception don't understand: sep 21, 2015 3:00:24 pm com.orientechnologies.common.log.ologmanager log info: orientdb auto-config diskcache=10,427mb (heap=3,566mb os=16,042mb disk=31,720mb) thread [0] running thread [1] running sep 21, 2015 3:00:24 pm com.orientechnologies.common.log.ologmanager log warning: {db=tinkerpop} requested command 'create edge type 'testedge_1442840424480' subclass of 'e'' must executed outside active transaction: transaction committed , reopen right after it. avoid behavior execute outside transaction sep 21, 2015 3:00:24 pm com.orientechnologies.common.log.ologmanager log warning: {db=tinkerpop} reque...

mysql - Fix PHP port 34543 Issue -

i've been setting phpbb forum, , have been encountering bug in many of page redirects. when logs in, example, goes this: your domain.com:34543/index.php?sid=6bcf305366b67a83a882c2323d9ee967. when delete : 34543 , loads fine. how prevent happening? go /library/server/web/config/apache2/sites/ , open 0000_127.0.0.1_34543_.conf in textedit. in case, i'm using xcode. change <virtualhost 127.0.0.1:34543> <virtualhost 127.0.0.1> note: must enable permissions admin account. this, right click on folder , choose info. scroll bottom , click lock authenticate. in permissions change read read , write. files, too. edit: i forgot add need restart web services in order fix take effect. i'm sorry people lead wrong, distracted while writing this. note: you need every time update server. idea .default file, too

ios - Xcode - Change the status bar in a UIActivityViewController selected activity -

how change status bar in uiactivityviewcontroller selected activity in message or mail. able change bar tint color, title color , buttons tint colors. not status bars color. saw question asked few times quit old wondering if found answer. thanks

powershell - Clarification of syntax used -

can explain me syntax? think didn't work, if can me find syntax. $fichesaenvoyer = @($fiches | {($_.typefiche -eq '2') -and (($_.causes -eq '') -or ($_.causes -eq $null) -or ($_.causes.count -eq 0) -or ($_.actioncorrective -eq '') -or ($_.actioncorrective -eq $null) -or ($_.dateactioncorrective -eq '') -or ($_.dateactioncorrective -eq $null) -or ($_.actionpreventive -eq '') -or ($_.actionpreventive -eq $null) -or ($_.dateactionpreventive -eq '') -or ($_.dateactionpreventive -eq $null) )}) i don't understand why there $_ instead of $fiches $_ variable where cmdlet creates represent current object in pipeline. example, if do: 1,2,3 | {$_ -ge 2} | write-host then $_ set 1 followed 2, followed 3.

node.js - Uploading multiple files with nodemailer/sendgrid -

is there way upload multiple attachments sendgrid nodemailer/express/multer? i'm able send single file thoroughly testing array of attachments failed. this controller function submit files: $scope.submitemail = function(email) { var formdata = new formdata(); $scope.email.to = $scope.email_employer; formdata.append('from', $scope.email.from); formdata.append('to', $scope.email.to); formdata.append('subject', $scope.email.subject); formdata.append('text', $scope.email.text); var fileselect = document.getelementbyid('file-select'); var files = fileselect.files; (var = 0; < files.length; i++) { var file = files[i]; // add file request. formdata.append('attachment', file, file.name); } /* object.keys($scope.email).foreach(function(key) { formdata.append(key, $scope.email[key]); }); */ $http.post('/api/email', formda...

Three.js Hemisphere Light -

i`m examining different types of light dat.gui , three.js (r72) , stucked on dinamically turning on/off hemispherelight. have 1 instance of each light being added scene: var pointlight = new three.pointlight(this._whitecolor); pointlight.visible = false; var hemispherelight = new three.hemispherelight(this._whitecolor, this._whitecolor); hemispherelight.visible = false; ect... and buttons turning on/off simple handler. this: me._sceneobjects.hemispherelight.visible = value; so, before rendering lights present in scene, not visible. when executing handler hemisphere light - stay invisible. after excluding hemispherelight.visible = false; works fine. currently i`m disabling light after rendering 1st frame: function render() { code ... if (!sentenceexecuted && firstcall > 0) { hemispherelight.light.visible = false; sentenceexecuted = true; } else { firstcall++; } }; i grateful suggestions fix without workaround. sorr...