Posts

Showing posts from August, 2013

javascript - How to store images out of meteor project on live server but access them from web -

i have small meteor project image library. have 100k images uploaded on server , use them in project. when create bundle images inside /public/img/ folder, resource entries present inside bundle\programs\web.browser\program.json makes ~40mb. when try start server live on vps server, not start unfortunately. so need suggestion how manage these images accessed web using meteor? note : know little s3 storage, want keep simple , on server. using s3 doesn't have complicated. can set , solve issue having. i'd recommend read this great article meteor chef find out how use s3!

python 3.x - Values are not equal when they should be -

here snippet of code asking user input. issue evaluation of current month. if current month input, gooddate should = 0. reason not evaluating equal. tried making variables integers strings, 08 doesn't equal 08 current month reason. let me know if isn't clear enough. #!/usr/bin/python3 import time month = str(time.strftime("%m")) # user input print("""starting time time format - month/day hours:minutes - example 7/21 08:00 option - leave month out, keep / - example /21 08:00""") date1 = input("enter starting time -> ",) # split / x = date1.split('/') # evaluate if current month user entered. print("x value=", x[0]) print("month value=", month) if month == x[0]: gooddate1 = 0 else: start_replacement1 = month+date1 gooddate1 = 1 print("gooddate value=", gooddate1) the problem appears forgot indent second last line: gooddate1 = 1 . right gooddate1 aways 1 inste...

python - Spoofing bytes of a UDP checksum over network -

i'm trying play security tool using scapy spoof ascii characters in udp checksum. can it, when hardcode bytes in hex notation. can't convert ascii string word binary notation. works send bytes of "he" (first 2 chars of "hello world"): sr1(ip(dst=server)/udp(dport=53, chksum=0x4865)/dns(rd=1,qd=dnsqr(qname=query)),verbose=0) but whenever try use variable of test2 instead of 0x4865 , dns packet not transmitted on network. should create binary ascii: test2 = bin(int(binascii.hexlify('he'),16)) sr1(ip(dst=server)/udp(dport=53, chksum=test2)/dns(rd=1,qd=dnsqr(qname=query)),verbose=0) when print test2 variable shows correct binary notation representation. how convert string such he shows in checksum notation accepted scapy, of 0x4865 ?? i able working removing bin(). works: test2 = int(binascii.hexlify('he'),16)

ios - swift CollectionView cell textLabel auto resize -

Image
i have watch lot of yt tutorials uicollectionview , uitableview, app searching made watching , reading several tutorials, there 1 problem can not find. this app made user decide username , wrote text username. have made firebase, connect everything, post getting app, problem is showing 2 lines of text. this how look, can imagine better: i textlabel above username expands towards down full text written inside. number of lines on text label set 0. have tried several things in storyboard, lot of different codes , approaches, result same. should in tableview? thought collectionview better approach , easier design-wise. here codes page vc: import uikit import firebase class feedviewcontroller: uiviewcontroller, uicollectionviewdelegate, uicollectionviewdatasource { @iboutlet weak var collectionview: uicollectionview! override func viewdidload() { super.viewdidload() loaddata() } var fetchposts = [post]() override func didreceivememory...

angular - Setting Start / End Time in Primeng Schedule -

i adopt primeng schedule component https://www.primefaces.org/primeng/#/schedule , looking example of 'rich' event details editor dialog. primeng 'event details' popup sample displays date 'yyyy-mm-dd' event , need able set / edit event start , end time well. in spirit of 'dry' believe must have been done others before me! can point me example can see working model? i see there older sample based on underlying fullcalender jquery component upgraded angular here: https://www.alinous.org/web-developer/design-pattern/fullcalendar/ . failing else guess start that. ok - can answer own question. the embedded p-calendar component in p-dialog html sample code can updated accommodate adding showtime attribute , setting value "true". the source sample html https://github.com/primefaces/primeng/blob/master/src/app/showcase/components/schedule/scheduledemo.html can modified show time picker: to started change this: <div class...

machine learning - Visualizing the Model using export_graphviz from .pkl file -

i have exported model .pkl file. trying import via joblib imports in form sklearn.model_selection._search.gridsearchcv . however not able use sklearn.tree import export_graphvizexport_graphviz expects tree_ first parameter. is there way this? here code: export_graphviz(model,out_file="out.dot") traceback (most recent call last): file "", line 1, in file "/home/anaconda3/lib/python3.6/site-packages/sklearn/tree/export.py", line 433, in export_graphviz recurse(decision_tree.tree_, 0, criterion=decision_tree.criterion) attributeerror: 'gridsearchcv' object has no attribute 'tree_' how did define gridsearchcv , train it? most underlying tree in gridsearchcv can accessed by:- decision_tree.best_estimator_.tree_ if decision_tree gridsearchcv object

google navigation intent kills the background service android -

background service stopped after time due google navigation intent open. background service using gps tracking. code as public class longbackgroundintentservice extends intentservice { private static final string tag = "map"; windowmanager windowmanager; imageview back; windowmanager.layoutparams params; private locationlistener locationlistener; private locationmanager locationmanager; private context context; public static final long min_time_bw_updates = 1500; // sec public static final long min_distance_change_for_updates = 10; // meters public longbackgroundintentservice() { super(null); } public longbackgroundintentservice(string name) { super(name); //setintentredelivert(true); } @override public void oncreate() { super.oncreate(); context = this; devicegpslocation(); windowmanager = (windowmanager) getsystemservice(window_service); = n...

nginx - phpPgAdmin - log in works but I have to login again after clicking on any links -

i have setup postgres 9.6 , phppgadmin on centos 7 server nginx, i can log in phppgadmin, postgresql server on right of page remains crossed out , link try browse (databases, roles etc) requires log in again. i'm thinking seems sessions problem, unsure how resolve it. any pointers on how fix or should looking @ in order track down problem? solved. turns out owner of /var/lib/php/session apache - needed nginx. sorted changing ownership nginx below: chown -r nginx:nginx /var/lib/php/session/

android - Initializing field that has getter and setter? -

i created class has example field in kotlin class someclass { var smth: string = "initial value" get() = "here is" set(value) { field = "it $value" } } when create object of class , call smth field, call get() property anyway. val myvalue = someclass().smth// myvalue = "here is" so, question is: why have initialize field has getter? var smth: string // why gives error? get() = "here is" set(value) { field = "it $value" } it return value get() property, doesn't it? i think because compiler not smart enough infer not null. actually similar code presented official doc here https://kotlinlang.org/docs/reference/properties.html var stringrepresentation: string get() = this.tostring() set(value) { setdatafromstring(value) // parses string , assigns values other properties } ap...

Angular JS: Function to Textarea -

any here appreciated. trying achieve pass value angularjs function textarea. my function : [....] $scope.updatedata = function(id, note){ $scope.id = id; $scope.note = note; } [....] any idea how pass 'note' textarea?

sed - Replace nth regex issue -

if want remove first period , behind string, in sed can e.g. do: echo 2.6.0.3-8 | sed 's/\..*//' output: 2 but if want remove second period , behind it, think should able (gnu sed): echo 2.6.0.3-8 | sed 's/\..*//2g' however output is: 2.6.0.3-8 from manual: 'number' replace numberth match of regexp. what have missed here? you're there getting burned .* , greediness. have specific case replace .* [^.]* : $ echo 2.6.0.3-8 | sed 's/\.[^.]*//2g' 2.6 $ echo 2.6.0.3-8 | sed 's/\.[^.]*//3g' 2.6.0 $ echo 2.6.0.3-8 | sed 's/\.[^.]*//1g' 2 [^.] means characters aren't dot.

tensorflow - Convolution neural networks -- all feature maps are black(pixel value is 0) -

Image
i doing project maps trained cnns on zynq soc. trained lenet in tensorflow , extracted weights , biases. far observed, value of weights close 0, none of them larger 1. input data of lenet gray scale image , pixel value 0 255. when tried 2-d convolution between input image , kernel (trained weights), output feature maps black image since convolution result close 0. takes relu layer account. shown in picture below, value of weight in kernel , feature maps should value between 0 255 according brightness. i wonder why got black(0 pixel value) feature maps? the inputs normalized before doing convolution , feature maps created normalized create images. create similar images have find out how inputs normalized in network created weights using , normalize inputs in same way, min-max normalization on feature map , 0-255 range.

python - Is there a recent pytest alternative with simple "assert"? -

i want use pytest basic testing using simple asserts . pytest best choice or there better recent alternatives? to best of knowledge, py.test still business!

html - Cannot center text of links -

i have tried center text of links created. using bootstrap classes. reason cannot use text-align: center on of elements center text. .categories_col { margin-top: 10px; text-align: center; } .categories_col .row { margin: 0 auto; text-align: center; } .categories_col { font-family: rockwell; font-size: 18px; color: #8d8d8d; } .categories_col a:hover { text-decoration: none; color: #087abf; } .categories_col a:active { text-decoration: none; color: #087abf; } <div class="container"> <div class="row "> <div class="col categories_col"> <div class="row"><a href="#">spirits &amp; wines</a></div> <div class="row"><img src="images/wine.jpg"></div> <div class="row"><a href="#"><i class="mdfi_av_play_circle_fill"></i>...

java - alternative to findViewById() in classes other than activities (Android Studios) -

i'm working on android game have several levels , since each level have same code, thought idea create code in separate class , using object of class use code. however, of current code inside main activity uses findviewbyid() refer different view in app i'm unfortunately unable use function outside of activity inside normal class file. there alternative ways of referring views may able use in other classes? thanks you have several options so, maybe can pass view parameter careful check if view in correct context , if view exists in current screen avoid null pointer exceptions. it's difficult decide if solution can work without seeing code

java - How to debug ClassCastException error in Spark? -

when try in pyspark simple read spark 2.1.1 elasticsearch 2.4 via elasticsearch-spark connector 5.1.2 (es_read_field_exclude , es_read_field_as_array_include environment variables, rest variables passed arguments reading function or contained in self object): df = spark.read.format("org.elasticsearch.spark.sql") \ .option("es.net.proxy.http.host", self.server) \ .option("es.net.proxy.http.port", self.port) \ .option("es.net.http.auth.user", self.username) \ .option("es.net.http.auth.pass", self.password) \ .option("es.net.proxy.http.user", self.username) \ .option("es.net.proxy.http.pass", self.password) \ .option("query", qparam) \ .option("pushdown", "true") \ .option("es.read.field.exclude",es_read_field_exclude) \ .option("es.read.field.as.array...

python - TypeError: array is not a numpy array, neither a scalar -

i'm trying run script error "typeerror: array not numpy array, neither scalar" on line 60 moment = cv.moments(points) i didn't make script, here https://github.com/openalpr/train-detector/blob/master/crop_plates.py and modified bit in order work changed "import cv" "import cv2 cv" since couldn't make work (ref: no module named cv ) changed line 60 "moment = cv.moments(points)" "moment = cv.moments(points)" (the capital m) the script: #!/usr/bin/python import os import sys import json import math import cv2 import cv2 cv import numpy np import copy import yaml argparse import argumentparser parser = argumentparser(description='openalpr license plate cropper') parser.add_argument( "--input_dir", dest="input_dir", action="store", type=str, required=true, help="directory containing plate images , yaml metadata" ) parser.add_argument( ...

c++11 - JSON format in Sublime Text 3 compiler build file -

i'm trying compile c++11 file in sublime text3 on mac os sierra json configuration, unfortunately print statements dont appear in 'compiled' text box. { "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", //from c++ build file "shell":true, "shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\" 2>&1 >/dev/null | grep -v -e '^/var/folders/*' -e '^[[:space:]]*.section' -e '^[[:space:]]*^[[:space:]]*~*' && \"${file_path}/${file_base_name}\"", "syntax" : "packages/user/cppoutput.tmlanguage", } -however print when "shell_cmd" replaced with "shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"", -but compiler print out many various warnings read this ...

python - Drop row where integer column equals value fails -

i have dataframe datatypes are:- > dfg.dtypes std float64 label object count int64 dtype: object but when try drop columns count=1 following error:- can explain? thanks > dfg = dfg[dfg.count != 1] --------------------------------------------------------------------------- keyerror traceback (most recent call last) c:\anaconda3\lib\site-packages\pandas\indexes\base.py in get_loc(self, key, method, tolerance) 1944 try: -> 1945 return self._engine.get_loc(key) 1946 except keyerror: pandas\index.pyx in pandas.index.indexengine.get_loc (pandas\index.c:4154)() etc. it turns out there's problem naming column "count". if change column name "mycount" works fine. sorry bother you!

java - How to maintain fragment state when switching fragments -

in mainactivity class, have bottomnavigationview 3 tabs switch between activities (home, search, , personal). whenever click on of tabs, pulls respective fragment, believe calling new fragment each , every time. i need these fragments maintain whatever changes made in them (similarly how instagram does). each fragment basic (newly created , unchanged), want set them in way in states saved when switch fragment , restored when go them. below code main activity , home fragment. public class mainactivity extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); bottomnavigationview navigationview = (bottomnavigationview) findviewbyid(r.id.bottomnavigationview); navigationview.setonnavigationitemselectedlistener(monnavigationitemselectedlistener); fragmentmanager fragmentmanager = getsupportfragmentmanager(); fragmenttransaction transaction = fragm...

javascript - How do I return the response from an asynchronous call? -

i have function foo makes ajax request. how can return response foo ? i tried return value success callback assigning response local variable inside function , return one, none of ways return response. function foo() { var result; $.ajax({ url: '...', success: function(response) { result = response; // return response; // <- tried 1 } }); return result; } var result = foo(); // ends being `undefined`. -> more general explanation of async behavior different examples, please see why variable unaltered after modify inside of function? - asynchronous code reference -> if understand problem, skip possible solutions below. the problem the a in ajax stands asynchronous . means sending request (or rather receiving response) taken out of normal execution flow. in example, $.ajax returns , next statement, return result; , executed before function passed success callback ca...

javascript - Set cookie's secure flag in IE11 (client-side) -

Image
as seen in screenshot, setting in dev console ignores flag. document.cookie="test=that;secure" adding domain or path not seems either. (another answer saying made work) this works flawlessly in chrome, firefox , safari. i'm not sure see point in setting secure flag locally if possible. cookie flag should set web application or webserver running in front of application.

visual studio 2013 - The command "C:\Main\Src\.nuget\nuget.exe restore -SolutionDirectory ..\" exited with code 1 -

i've been struggling getting nuget work on week now. got work on local builds, not on tfs 2013 builds. narrowed down nuget not happening during team builds, when added $(solutiondir).nuget\nuget.exe restore -solutiondirectory ..\ to pre-build event on first project in build order , error. , if execute command command line in solution directory works fine. builds locally fine, on build server "code 1" error. helpful grrrrr! opened source tfs gets before build , tried doing local build on builds server , same error (even though works fine on local machine). tried increased verbosity on team build shows same error. sorry - i've googled error , found many responses, nothing has helped... btw, when run version of nuget.exe in solution it's version 3.4.3.855. to enable restore nuget package tfs xaml build, please try follow below steps: in vs ide, go tools -> options -> nuget package manager -> enable allow nuget download missing packag...

c# - IBM Webshpere MQ .net client, which is more suitble amqmdnet or XMS -

i have ibm websphere mq .net client application uses amqmdnet dll. works fine not able read messages in event(subscription) based manner. reading online found xms library has in-built subscriber methods. i looking @ scalability of .net client application allow cluster of nodes reading same mq pipeline. objective create .net message consumer supports point-to-point & publish/subscribe method cluster of nodes connecting same queue , consuming messages. remove messages pipeline once persisted. which of method preferred in such scenario? both ibm mq classes .net(amqmdnet.dll) , ibm message service api .net(xms .net) support features of ibm mq: both support point-to-point & publish/subscribe. both support multiple clients connecting , consuming single queue. both support units of work. both supported ibm. xms .net supports messagelistener objects simplify consuming queue. in ibm mq classes .net need write own function consume queue. ibm technote " x...

how to check and get new message from db on real time in jquery ajax without page refresh -

i working on project,as trying check new inserted messages in db each user , echo when user chat without refreshing page see new message,but try using setinterval problem once user login messages wait 3 seconds , disappear chat. now question how keep message , show new messages db setinterval(function(){ var id = $(".id").val(); //alert(id); $.ajax({ type:'get', url:"msg.php", data:{id:id}, success: function(data){ $("#msgnot").html(data); } }); },3000); msg.php <?php session_start(); include 'db.php'; if(isset($_get["id"])){ $ids = $_get["id"]; $sql = "select * answers userid='$ids' , msgstatus='0'"; $query = mysqli_query($con,$sql); while($rows = mysqli_fetch_assoc($query)){ ?> <div id="reply"><a href="read.php?id=<?php echo $rows["id"]; ?>"...

c++ - What kind of exception is thrown by boost::ifind_first? -

i've found boost documentation frustrating read , despite best effort, cannot determine kind of exception may thrown in call boost::ifind_first. documentation notes: this function provides strong exception-safety guarantee however there no notes on type of exception may thrown. primary question how determine exception may thrown ifind_first? it tough answer since, stated, documentation use kick in butt. being said when boost says: this function provides strong exception-safety guarantee they refering exception-safety in generic components states: the strong guarantee provides full “commit-or-rollback” semantics. in case of c++ standard containers, means, example, if exception thrown iterators remain valid. know container has same elements before exception thrown. transaction has no effects if fails has obvious benefits: program state simple , predictable in case of exception. in c++ standard library, of operations on node-based cont...

c++ - Is there an rvalue that I can directly take an address of? -

i can take address of rvalue binding in reference (which itself, understand, can referred lvalue). is there way rvalue can directly take address of (i.e. &(<rvalue>) valid expression, without overriding operator&() )? or maybe such @ least possible through 'binding' rvalue? (this not seems case can 'bind' references lvalues, see above. maybe i'm missing similar concept here.) the more general question i'm trying answer whether following true: rvalues strictly correspond set of expressions 1 can directly take address of, except lvalue bitfields , maybe other such 'special' kinds of lvalues. [expr.prim.id.qual] : a nested-name-specifier denotes class, optionally followed keyword template ([temp.names]), , followed name of member of either class ([class.mem]) or 1 of base classes, qualified-id ; [class.qual] describes name lookup class members appear in qualified-ids. result member. type of result type of m...

php - Laravel 5 how to run mutator before validation -

i green @ laravel (first project) bear me if i'm making novice mistakes. i'm trying create project while running through laracasts, i'm using suggestions. i'm using laravel 5.4 , php 7.1.4 i have checkbox on form boolean field. if checkbox not checked when form submitted returns null. not want null values boolean's have validator ensuring accepts true/false values. in order work had create mutator change value false if null. i have 2 models, item , itemnote. i'm trying create itemnote item model. on item page there place add itemnote runs through itemnotecontroller, call method in item add itemnote. issue can't mutator run in itemnote model validation fails because boolean field (calendar_item) null. i @ first trying create itemnote relationship item, according stack overflow laravel 5 mutators work when create record , not when update record answer mutator not run when creating via relationship $this->notes()->create($request->all()). ha...

How can I combine multiple splitting criterion when using Haskell package split? -

i use data.list.split split on hackage split text sublists @ ". " (period followed blank) split (keepdelimsr $ onsublist ". " ) but split on multiple sequence (i.e. "? " (question mark, blank), possibly others. documentation in split cannot see how use multiple (more 1 character) conditions split. anybody knows solution? thank you!

php - Inserting data into database using ajax -

i trying insert data database using ajax reason code not doing that. here have far: index page: <form id="notify" action="" method="post" accept-charset="utf-8" enctype="multipart/form-data"> <div class="note-wrapper"> <div class="note-title">new employee</div> <input type="hidden" name="employee_id" value="<?php echo $employee_id; ?>" id="employee_id"> <p>name</p> <input type="text" name="name" id="name"> <p>description</p> <textarea name="text" id="text"></textarea> <div class="action-wrapper"> <button class="cancel-btn">cancel</button><button class="submit-btn flt-rt" type="submit" name="new_note">...

wordpress - When adding or removing items to cart, it takes cart 30 seconds to 1 minute to update? -

i have basic cart page. when add products , move cart shows cart empty. few refreshes 30 seconds 1 minute , items there. when remove items cart shows items though removed them (sometimes price in navbar cart updates), , after few seconds gone. causing issue? problem occurring due footnotes plugin , when deactivated problem solved , i tried couple more footnotes plugins same issue re-occur . hope helps .

python - Create new webdriver session manually -

i trying play little bit webdriver protocol using python , requests module. i started chromedriver binary: $ chromedriver_2.31 starting chromedriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 9515 local connections allowed. so far good. but problem session not created exception when trying create session: import requests r = requests.post("http://127.0.0.1:9515/session", {}) print("status: " + str(r.status_code)) print("body: " + str(r.content)) execution output: status: 200 body: b'{"sessionid":"286421fcd381ee0471418ebce7f3e125","status":33,"value":{"message":"session not created exception: missing or invalid capabilities\\n (driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=linux 4.4.0-91-generic x86_64)"}}' i searched through webdriver protocol docs , couldn't find information capabilities manda...

Tableau REST API: Using Javascript to get the Token -

i complete beginner rest api , not figure out how proceed. installed postman , able token, not sure how send raw xml payload in javascript. <tsrequest> <credentials name ="xxx" password="yyy" > <site contenturl = "" /> </credentials> </tsrequest> i have : httprequest.open('post', 'http://my-server/api/2.4/auth/signin', false); httprequest.setrequestheader("content-type", "application/xml"); not sure how add xml payload. have access tableau server(my-server) , everything. appreciated! thank you! you getting closer, need use send method send xml: https://developer.mozilla.org/en-us/docs/web/api/xmlhttprequest/send just make sure xml encoded in javascript when you're inputting it. if using double quotes inside xml, make sure have single quotes declare string in javascript (e.g.) var data = '<credentials name="xxx" >...

Microservice architecture, does it really encourage copy / paste? -

i'm working in middle size organisation. year started refactor our old solution creating microservices. backend part go chosen, front have node.js now imagine have html form user puts data. after front end part makes own validation , call 1 of 3 different endpoints (three different microservices). this validated front end data validated 3 micro services separately. same rules copy/pasted. , there lot of other examples this. i proposed create validator service perform validation in 1 place , got answer 'in microservices architecture cannot create strong dependencies' my question if 'strong dependencies' bad need stupid copy/paste , create unit tests copy/pasted code (we copy/paste them , change names). if 'strong dependencies' bad give examples why. for first question, answer shouldn't ever have "copy/paste" anything, , elimination of "hard" synchronous dependencies between services has nothing it. it's stron...

c# - Merge a list of viewmodels into one -

i not sure if asking correctly, i'll best explain , provide code. i have actionresult on controller loops through every year available, prints out results each year id, , loops through until it's finished, produces final product. the problem having sorting feature. sorts via every year instead of whole thing table. figured easiest way of fixing 1 model instead of multiple separated year somehow merge list one. i pretty new c# mvc, helpful tips, tricks , examples immensely. if need other code please ask , provide it. controller // list of models, because want of them var managementmodels = new list<collectionsmanagementviewmodel>(); var setupids = _repository.getallyearsetupids(); foreach (var setupid in setupids) { // new model created each setup id var managementmodel = _repository.getoverduebalances(type,page, pagelength, setupid.yearsetupid, bala...

javascript - load script using jquery ajax and remove based on change of a variable -

i adding google api script using jquery ajax, based on language lang chosen user inside app: var src = ''; if (lang == 'en') { src = 'https://script1.googleapis.com/script1'; } else { src = 'https://script2.googleapis.com/script2'; } jquery.ajax({ url: src, datatype: 'script', success: function () { }, async: true }); once added, when user changes language, second script gets added page, , error: you have included google maps api multiple times on page. may cause unexpected errors. how can remove old script once language changed? each time script corresponding chosen language of site loaded? thanks once script loaded, objects , functions defines kept in memory. best can is remove globally delete window.ga , load again script. and if duplication of script on dom remove before calling next script.

java - uses-sdk:minSdkVersion 9 cannot be smaller than version 14 -

Image
error:execution failed task ':basegameutils:processdebugandroidtestmanifest'. manifest merger failed : uses-sdk:minsdkversion 9 cannot smaller version 14 declared in library [com.google.android.gms:play-services-ads:11.0.4] c:\users\nekos.android\build-cache\ac3e2c727e192cdc9e7fe0403f8315232b0e8024\output\androidmanifest.xml suggestion: use tools:overridelibrary="com.google.android.gms.ads.impl" force usage google play services don't support android api 2.3x (gingerbread) starting google play services 10.2, here's documentation : google play services 10.2.x first release no longer includes full support android version 2.3.x (gingerbread). apps developed using sdk release 10.2.x , later require minimum android api level of 14 , cannot installed on devices running api level below 14. if happen use support library, please noted version 26 need minimum api level 14.

php - PHPUnit times out running on empty cache -

i'm trying create build process using phing. during process want run composer install script , phpunit, installed composer inside buildfile have 2 targets. <target name="composer"> <composer command="install" composer="./composer.phar" /> <autoloader autoloaderpath="./vendor/autoload.php" /> </target> <target name="phpunit" depends="composer"> <if> <os family="windows" /> <then> <property name="phpunit.executable" value="phpunit.bat" /> </then> <else> <property name="phpunit.executable" value="phpunit" /> </else> </if> <exec executable="vendor/bin/${phpunit.executable}" dir="${project.basedir}" level="debug" returnproperty="phpunit.return"> ...

php - Laravel - Sentinel password field name -

i'm learning cartalyst/sentinel , use login. did work , i'm doing changes. i'm trying change password name in database table, bus return undefined index: password. my question is: can change password field name in table, 'pass'? for login used protected $loginnames, can same thing password field. thanks o/

matlab - gpuDevice command takes looong time to complete -

i testing whether gpu coding works in matlab. found out everytime run gpudevice command after opening matlab first time, takes long time. tic var = gpudevice() toc >> gpu_test it takes @ least 100-seconds or more: var = cudadevice properties: name: 'geforce gtx 1060' index: 1 computecapability: '6.1' supportsdouble: 1 driverversion: 8 toolkitversion: 7.5000 maxthreadsperblock: 1024 maxshmemperblock: 49152 maxthreadblocksize: [1024 1024 64] maxgridsize: [2.1475e+09 65535 65535] simdwidth: 32 totalmemory: 6.4425e+09 availablememory: 5.3035e+09 multiprocessorcount: 10 clockratekhz: 1670500 computemode: 'default' gpuoverlapstransfers: 1 kernelexecutiontimeout: 1 canmaphostmemory: 1 devicesupported: 1 deviceselected: 1 elapsed time 108.818430 seconds. the thing after first tim...

razor - How to display current user's custom property in a View -

using asp.net identity can display current user's name follows. i've created custom property of users fullname . can use property in controller such as: _usermanager.users.where(u => u.fullname == "bob doe") etc. but, in view, i'm not able display property. example, intellisense not recognize @user.identity.fullname . view ... @user.identity.name ....

datetime - Populate the monthly date from quarterly date in Oracle -

i have values in fact table below: as of date f_type value 31-mar-17 abc corp 1.0 30-jun-17 abc corp 1.1 as of dates quarter end dates, need write query result set below:(month end dates between dates after value changed) as of date f_type value 31-mar-17 abc corp 1.0 30-apr-17 abc corp 1.0 31-may-17 abc corp 1.0 30-jun-17 abc corp 1.1 how can populate 30-apr-17 , 31-may-17 rows?? code tried far: select as_of_date, f_type, value,x.* fact f inner join (select m_date,trunc(m_date+1,'q')-1 qtr_date (select to_date('31-jan-2017','dd-mon-yyyy') m_date dual union select to_date('28-feb-2017','dd-mon-yyyy') dual union select to_date('31-mar-2017','dd-mon-yyyy') dual union select to_date('30-apr-2017','dd-mon-yyyy') dual union select to_date('31-may-2017','dd-mon-yyyy') dual union select to_date('30-jun-2017','dd-mon-yyyy') dual unio...

automation - I want my Mturk to use the results of HITs as variables when transcribing from images -

when date valid , unique identifier matches, can potentially build basic if/then logic? eg: image 1 has date , id. image 2 has different date , same id. if image 2 have different id, both images invalid. i using mturk verify identity , me nice timestamps images.

Not able to display DateTime from json on page with PHP -

i have json data have pulled api looks following: { data: { loans: { totalcount: 301, values: [ { name: "anastacia", status: "fundraising", plannedexpirationdate: "2017-08-19t22:10:06z" }, { name: "mercy", status: "fundraising", plannedexpirationdate: "2017-08-19t22:10:05z" } ] } } } i able display names , totalcount on page, not plannedexpirationdate. $json_a = json_decode($curl_response, true); //this works: echo $json_a['data']['loans']['values'][0]['name']; //this not: echo $json_a['data']['loans']['values'][0]['plannedexpirationdate']; //this not either. prints date in 1970. $date= $json_a['data']['loans']['values'][2]['plannedexpirationdate']; echo date('d-m-y h:i:s', strtotime($date)); t...

excel - protect worksheet while keeping data validation working without macros -

i tried googling question can't seem find answer without using macros. i have data validation in h1:h1000. cells have formulas in them. i'd prevent users deleting formulas, , @ same time allow drop down menu working. locking h1:h1000 & protecting them prevent users deleting formulas; however, disables drop down menu. thanks heaps guys!

java.lang.StringIndexOutOfBoundsException: String index out of range Error - Morse to English Java Code -

i working on morse code english java code (below) in | in morse stands blank space between letters , numbers, , blank space in morse stands in between 2 letters or digits. ex., "to be" = "- --- | -... ." in morse. // import scanner. import java.util.scanner; public class project1_szhu1249322 { public static void main(string[] args) { scanner input = new scanner (system.in); system.out.println("would translate 'morse code' english, or 'english' morse code? (enter 'morse code' or 'english'.)"); string unit1 = input.nextline(); system.out.println("enter string of " + unit1 + " characters (for english, numbers , letters, only): "); string amountunit1 = input.nextline(); if (unit1.equals("morse code")) toenglish(amountunit1); else if (unit1.equals("english")) tomorsecode(amountunit1); else system.out.println("invali...