Posts

Showing posts from September, 2010

Interactive directory input in Shiny app (R) -

i building shiny app requires user select folder on local machine, contains files processed app. i using solution proposed here . works fine on local machine, not work if app deployed shinyapps server. author of solution confirmed designed work local shiny apps, since makes os shell calls display directory dialog. i wondering if there different solution directory dialog, work on deployed shiny apps (i deploying shinyapps.io). edited: notice cannot use fileinput interface 2 reasons: the users of app not technical people , not know files inside folder used app. the selected folder may contain other folders within needed files reside, such impossible select files @ once, if fileinput interface has multiple option enabled. the folder/files structure not can change, downloaded medical device , therefore thing can expect users specify parent folder , rest should done inside r code. this working example based on using "webkitdirectory" attribute. @ momen...

ios - SocketMobile SocketScan -[AccessoryMonitor CheckForChanges:] NSRangeException -

i have integrated socket mobile scanners using scanapisdk (v 10.2.227). received crash log on -[accessorymonitor checkforchanges:] seems part of sdk. has experienced before? best way find cause of issue? appreciate help. crash log below. *** -[__nsarraym getobjects:range:]: range {0, 1} extends beyond bounds empty array #7. crashed: com.twitter.crashlytics.ios.exception 0 myfirstapp 0x10076389c clsprocessrecordallthreads + 4302256284 1 myfirstapp 0x10076389c clsprocessrecordallthreads + 4302256284 2 myfirstapp 0x100763d4c clsprocessrecordallthreads + 4302257484 3 myfirstapp 0x10074e78c clshandler + 4302169996 4 myfirstapp 0x100761aa4 __clsexceptionrecord_block_invoke + 4302248612 5 libdispatch.dylib 0x1811d947c _dispatch_client_callout + 16 6 libdispatch.dylib 0x1811e4728 _dispatch_barrier_sync_f_invoke + 100 7 myfirstapp 0...

laravel 5.2 - Starting with angular 2, what is the best approach? -

i had question regarding angular 2. we using laravel 5.2 our backend or api provider , want write our frontend in angular 2. best way use them together? serve angular 2 files via laravel on same node. have separate nodes front end , backend, angular 2 runs on 1st node served node.js (as of examples on angular 2 show) , api services using laravel on 2nd node. i couldn't find best guide satisfy 1st option. can suggest how proceed? i believe both practices fine. if host on same node, won't have specify api node when making calls. if see backend api being more general service other applications building, consider second, more general node.

How do I run a python script between two times? -

i have python script run between 9 , 4 pm everyday, there's part of same script i'd run every 10 seconds during time. how go in doing this? have looked @ datetime modules, did not come across examples compare times , schedule event. there seems difference datetime module in python 2.7 , 3.x. using python 2.7. me or direct me right sources? thank you. if using linux,you should read crontab ,it powerful tool schedule. on other hand,in python2.7 ,try sched schedule repeating event . hope helps.

dataframe - Python pandas: delete the data in a data frame that the size of data is below a value -

i have data frame called df(this example, real data big, please consider computing speed) following: name id text tom 1 a1 lucy 2 b1 john 3 c1 tick 4 d1 tom 1 a2 lucy 2 b2 john 3 c2 tick 4 d2 tom 1 a3 lucy 2 b3 john 3 c3 tick 4 d3 tom 1 a4 tick 4 d4 tom 1 a5 lucy 2 b5 tick 4 d5 the dataframe can grouped name(tom, john, lucy, tick). want delete data size of each group(by name)is less 5. mean since size of name of lucy , john less 5, want delete these data , new df(just have tick , tom data), such as. could tell me how it,please! thanks! i think can use filter this. 1 line: df = pd.dataframe({'name': ['tom','lucy','john','tick','tom','lucy','john','tick', 'tom', 'lucy','john...

animation - Unreal 4 C++ Actor Movement -

i have data actors movement being read in file @ start of game. data gets read in contains vector positions actor should move next. have actor moving position position no problem... until start add animation skeletal mesh attached actor. my problem: how can found out velocity work out animation play idle, walk, jog , running? doesnt have velocity lerping position: setactorlocation(fmath::lerp(getactorlocation(), newpos, 0.01)); any thoughts on how set right animation based on distance travel , speed? should move actors movement character can use addmovementinput velocity. then, if go down route, how say: move character current position, next position in x amount of time giving character correct velocity use in animation selection. can normalize difference between 2 vector lengths (getworldlocation) , use abs(floating point) result x variable put 1d blend space idle, walk, jog, run in animation bp? sure account "acceptance radius" or else once gets locat...

image - Want to edit page layout in wordpress -

i need make website layout have in link below white frame around images , label below images on white part. not sure how it. , familiar css , html . any help, please. https://www.saatchiart.com/ use following code pure css assuming u need same design link have .maindiv \\ ur main div{width:100%; background:#fff;padding:1%;} .maindiv img \\ ur img inside div{width:100%; \\ in case} .maindiv p,maindiv \\ ur label , link {width:100%;text-align:left;} .maindiv p:first-child{font-weight:bold;font-family: ur choice;} \\ change occurence of first label in ur div .maindiv p:last-child{padding-top:1%;} \\ change last link label

c# - How to check size of screen in xamarin forms and is there any way to show different layout for different orientation? -

i want show 2 different layout according screen orientation of mobile phone vertical different , horizontal different there . trying width of screen on base of screen can display layout right way, if yes please tell how screen size in xamarin forms or if no suggest right way in xamarin forms cross platform application. thanks, ???

javascript - Browserify and babelify works locally, but not on live website -

i'm building project in react , javascript, , i'm building browserify , babelify, outputting bundle.js file. when run index.html locally, bootstrap, fonts, , css files loaded properly. after submitting github pages onto custom domain, everything's messed - images everywhere, no formatting, bootstrap not loaded. i'm assuming file path got messed up, why? <head> <link rel="stylesheet" href="./src/stylesheet/style.scss"> # path works locally </head> <body> <div id="app"></div> <script src="./bundle.js"></script> </body>

mysql - Getting error importing into phpMyAdmin a database exported from phpMyAdmin -

i'm trying deploy drupal 7 site local dev server online host. i export database using export function in phpmyadmin , import file on host end using phpmyadmin. phpmyadmin versions same on both ends, , have tried both quick export , many settings, matching settings on import, , same #1064 syntax error every time. don't see issues sql, looks fine me. have taken exported sql , pasted phpmyadmin sql statement , exact same error when run it. here's error: error static analysis: 1 errors found during analysis. closing bracket expected. (near ")" @ position 88) sql query: create table if not exists `actions` ( `aid` varchar(255) not null default '0'comment ) mysql said: documentation #1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near ')' @ line 3 here's top of sql file error triggered: set sql_mode = "no_auto_value_on_zero"; set time_zone = "+00:00"; /*!40101 se...

JavaScript: Cookies aren't cleared on logout from user page -

i'm using cookies keep user's information present on front end. logging them in happening through passport . on login, code sets cookies user's information returned passport . on logout, cookies unset , /auth/logout called log user. everything works login/logout, whenever try delete cookies on logout, nothing happens. this occurs on user.js page of site . able log off other page here's code: dynamically setting navbar document.getelementbyid( 'navigation-bar' ).innerhtml = '<ul>'+ "<li><button onclick='home();' id='home-link'>home</button></li>"+ "<li><a id='recipes-link' href='/recipes'>recipes</a></li>"+ "<li><a id='festivals-link' href='/festivals'>festivals</a></li>"+ "<li><button id='logout-button' onclick='logout()'>logout</button...

php - How to update multiple pages by just editing one -

i have header on each page of website, , more pages added, increasingly difficult change of them. looked up, , found need use php, using include("menu.html");. possible on github pages. found out need end file in .php, whenever try access page, there 404 error. ex. blahblah.php i can't got page. how can page? edit: well, looks github can't php. there anyway can update files @ once on github, or other web hosts can that?

ImportError: matplotlib requires dateutil, Python OSX 10 -

i installed matplotlib homebrew along other things link followed said necessary, exception had python installed before. after if ran python calling pyplot tell me needed install x11, didn't know looked up, found link , installed app , followed steps. now when running code following error. file "/library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py", line 143, in <module> raise importerror("matplotlib requires dateutil") importerror: matplotlib requires dateutil i know python-dateutil installed, matplotlib, numpy , others in links. checked them in terminal, don't understand problem is. also numpy on it's own works fine, gives me no errors if that's package being used, matplotlib problem. made sure of upgrading pip install, matplotlib, numpy , dateutil , nothing changed. it's not duplicate question. question resolved installing dateutil, have installed.

javascript - Application Wide Modal Issue rails 5 Bootstrap 3 -

i have setup modals new , edit actions in users controller. keep display consistency user show page appear in modal well. right users access show page via <li><%= link_to "view profile", current_user %></li> link in nav-bar. i set link display desired modal show action in user controller. im stuck, i've tried google how don't think asking right questions. if can direct me resource or give me general outline of how achieve appreciated! i realize question bit vague i'm not sure how else proceed. you can use rails js if want load profile when clicked. 1. set remote: true on link tag. <li><%= link_to "view profile", current_user, remote: true %></li> 2. create partial containing modal can render via rails js. app/views/users/_show.html.erb <%= content_tag :div, class: "modal fade", id: dom_id(@user, :modal) %> <div class="modal-dialog"> <div cla...

eclipse - java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder -

hi using followng maven dependencies. when run application in eclipse, working fine. when deploy application jar file, throwing following error. caused by: java.lang.classnotfoundexception: org.glassfish.jersey.client.jerseyclientbuilder @ java.net.urlclassloader.findclass(unknown source) following maven dependency file. <dependencies> <dependency> <groupid>org.glassfish.jersey.core</groupid> <artifactid>jersey-client</artifactid> <version>${jersey.client.version}</version> <scope>provided</scope> </dependency> <dependency> <groupid>org.glassfish.jersey.media</groupid> <artifactid>jersey-media-moxy</artifactid> <version>${jersey.client.version}</version> </dependency> <!-- http://mvnrepository.com/artifact/com.googlecode.json-simple/j...

javascript - React Native - Animated.spring blinks when reverting the animation -

in react native app i'm trying create drawer. when click button should open, , works fine, problem when close it. when click close button animation blinks, kind of opening , closing 2-3 times before closes. this how i'm doing it export default class drawer extends component { constructor(props) { super(props); this.state = { height: new animated.value(0) } } showcontent = () => { animated.spring(this.state.height, {tovalue:130}).start(); } hidecontent = () => { animated.spring(this.state.height, {tovalue:0}).start(); } render() { return ( <view> <touchablehighlight onpress={this.showcontent} underlaycolor="transparent" > <text>show</text> </touchablehighlight> <touchablehighlight ...

android - LibGDX using Animations with a skin (for drag n' drop) -

i have set game actor fireflies randomly fly across screen, while glowing on , off — , user can drag them mason jar. pretty happy i've got working, i'd add bit more detail. i'd add two-step animation looks wings flapping. i know how animation class, making use of textureatlas , textureregion. prior me heading in drag n drop direction. my issue, think, i'm using skins , , might not play nice animations. /////////////////// portions of code. /////////////////// some of items declare top: private textureatlas textureatlas; private texture texture; private textureregion[] regions = new textureregion[3]; private animation ffflapping; setting textureatlas: textureatlas = new textureatlas(gdx.files.internal("player animation/player_animation.png.atlas")); texture = new texture(gdx.files.internal("player animation/player_animation.png.png")); setting skin: final skin skin = new skin(); skin.addregions(textureatlas); doing animation: ...

visual studio 2015 - Crystal report not working in client enviroinment,how to resolve this exception? -

Image
even installed (crforvs_redist_install_64bit_13_0_17) version both client machine , developer machine also.

javascript - TypeError: d is undefined error in summernote text editor -

i integrating summernote text editor in project, when browse insert image getting typeerror: d undefined error. have attached screen shot. please help. [1]: http://i.stack.imgur.com/ggwjt.png following code. <script> $(document).ready(function(){ $('#cause_desc').summernote({ height: 300, // set editor height minheight: 150, // set minimum height of editor maxheight: 350, // set maximum height of editor placeholder: 'write here...', }); }); </script> when click on insert image button getting above error.

php - How to include a debugger in phpmyadmin in my cPanel -

i have write few php scripts , don't want install wamp/lamp server. i writing these scripts directly on cpanel on server side. so if run script , there error doesn't show me line number or instead gives message url not available makes difficult debug. so how can debug code if writing directly on server side. there software or can install? my code : here have removed semi colon in $query line make error, otherwise code fine. <?php /* make connection database*/ $con = mysqli_connect("localhost","*****", "****", "****"); /*function check connection*/ if(mysqli_connect_errno()){ printf("connection failed : %s \n",mysqli_connect_error()); exit(); } error_reporting(e_all); ini_set("display_errors", 1); $query = "select * music order id desc" if($result = mysqli_query($con, $query)){ $i = 0; while($row = mysqli_fetch_row($result)){ if($i == 0){ echo "$ro...

c++ - Is it possible to use different libstdc++ libraries in one program? -

i have old application framework must compiled gcc 4.4.4 , old libstdc++.so , don't support c++14. i want use gcc 6.2 write new functions in c++14, , compiled them static library myslib.a . myslib.a exports functions in pure c interfaces abi compatibility. my issue is: framework uses old libstdc++.so , not compatible c++14. is possible enforce myslib.a statically link latest libstdc++.a , ignore older libstdc++.so ?

android - How to add two FrameLayout in single screen -

Image
i developing ui , want add 2 framelayout in single activity. want 1 framelayout fill parent(full screen) layout , framelayout on first layout. want make rounded circle fixed in entire application on each screen. <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <linearlayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <imageview android:layout_width="wrap_content" ...

azure - Best Table Structure Design for Synchronization or Replication -

dears, i have choose following table structure common tables in application : create table [dbo].[equipm]( [id2] [uniqueidentifier] not null, [id] [bigint] identity(1,1) not null, ...... ...... constraint [pk22_equipm] primary key nonclustered ( [id2] asc)with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary]) on [primary] textimage_on [primary] explanation: guid primary key not clustered. use newsequentialid() bigint unique , clustered index, , used relations other tables. question 1: structure optimal ? question 2: shall use guid primary key , relations other tables since use synchronization or may replications in future ? if yes, consequences should keep in mind ? extra information above design used in application support multi user signing different geographical locations, use sql azure sync databases between main office of company , branches. i hope post clear thanks

python - numpy 3 dimension array middle indexing bug -

i seems found bug when i'm using python 2.7 numpy module: import numpy np x=np.arange(3*4*5).reshape(3,4,5) x here got full 'x' array follows: array([[[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]], [[20, 21, 22, 23, 24], [25, 26, 27, 28, 29], [30, 31, 32, 33, 34], [35, 36, 37, 38, 39]], [[40, 41, 42, 43, 44], [45, 46, 47, 48, 49], [50, 51, 52, 53, 54], [55, 56, 57, 58, 59]]]) then try indexing single row values in sheet [1]: x[1][0][:] result: array([20, 21, 22, 23, 24]) but wrong while try indexing single column in sheet [1]: x[1][:][0] result still same previous: array([20, 21, 22, 23, 24]) should array([20, 25, 30, 35])?? it seems wrong while indexing middle index range? no, it's not bug. when use [:] using slicing notation , takes list: l = ["a", "b", "c"] l[:] #out...

java - Spring application Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver] -

why application not able read class build path? did added ojdbc6.jar in build path of application. now when kept jar in web-inf/lib directory, worked fine. can please explain why not read project build path. when add on build path in ide , used compiling code (if there dependency on it). unless package , deploy on server , server has no reference these files used compilation. when place on web-inf/lib , package , jar file packaged in .war file deployed , hence @ runtime not class missing or driver missing error.

python - Creating a slot machine for school -

i'm programming slot machine school , cannot machine re-run once finished. relatively new , honest feedback. how can program re-run? code i'm trying with. i've modified code this. import random import sys print "hi there user, welcome amazing poker machine simulator." print "your opening account has in $1000." print "to win jackpot, 3 leprachauns must in row." print "enter yes or no when prompted finish or continue program." balance = 1000 balance == int(balance) winnings = 0 winnings == int(winnings) symbols = ["leprachaun", "goldbar", "pyramid", "blackcat"] # subroutines: checking bet input , amount def betcheck(betamount): if betamount.isdigit() == true: betamount == int(betamount) rightbet = true else: rightbet = false print "please enter whole number, no decimals , bet on or below balance." return rightbet # limiting bet d...

javascript - How to update PhantomJS in Karma or set correct version to start? -

i installed "phantomjs-prebuilt": "2.1.12" but when start test grunt still see in console info [phantomjs 2.1.1]. also have installed plugin: "karma-phantomjs-launcher": "1.0.1", "karma": "1.1.2", if knows can updated ? or set correct version start ?

php - how to find empty values in array -

i working on create comparison of college completed want find empty values , put strike instead of empty column know can using if statements seeking there better way other using nested if else or multiple if controller has function select value public function test() { $insid = "ins20160738"; $course = "b.tech electronics & communication engineering"; $this->load->model('comparisonmodel'); $resfirst = $this->comparisonmodel->selfirst($insid,$course); foreach ($resfirst $key => $value) { echo '<h6> name:</h6><p>'.$value['course_name'].'</p><h6>duration:</h6>'.$value['duration'].' <h6>eligiblity:</h6><p>'.$value['eligibility'].'</p><h6>recognition:</h6><p>'.$value['recognition'].'</p><h6...

javascript - Silverstripe Argument 1 of Node.appendChild does not implement interface Node -

i running version silverstripe 3.0x. have few websites on codero , of them working fine. decided move 1 new amazon linux server. able make work except one. when got admin side of project ex: http://illusion.info/admin/pages/ , loads fine , works fine. when try navigate through ajax clicking on other navigation link settings or reports, javascript error is typeerror: argument 1 of node.appendchild not implement interface node. fragment.appendchild(script);}}} in http://illusion.info/assets/_combinedfiles/lib.js i have no idea issue. how can fix or try track it? you have old version of ss 3.0.x, please upgrade @ least latest ss 3.0.14 the problem in leftandmain.js if(xhr.getresponseheader('content-type')=='text/json') { newfragments=data; } else { newfragments['content']=data; } the actual response header longer , not match condition content-type:text/json;charset=utf-8 it fixed handled with if(xhr.getresponseheader('co...

rest - Time offset value of a datetime is missing in Azure Web API application -

i have wep api hosted in azure .net core. simple crud api now. have interesting problem not find or understand reason. in api, there datetime property usual. when post data api, time offset disappears in server side. "datetime":"2016-08-29t05:13:21.931+03:00" +03:00 turns 00:00 can explain reason , solution? { "content":"test data", "location":{ "name":"some location", "address":"", "latitude":41.0920448, "longitude":28.9444847 }, "owner":{ "username":"some user", "name":null, "registrationtype":0, "profilepictureurl":null }, "datetime":"2016-08-29t05:13:21.931+03:00", "createtime":"2016-08-29t05:13:21.7791051+00:00", "rankingpoint":0.0 } 1.first of azure service runnig on 00:0...

NSURLSession when app goes into background or iOS looses network connectivity -

what happens ephemeral nsurlsession of type data task when app switches foreground or ios looses network connectivity? in particular, nsurlsessiondelegate notified, or have observe @ level of uiapplicationwillresignactivenotification ( as as uiapplicationwillterminatenotification ) , kreachabilitychangednotification respectively, if don't want nsurlsession disappear "silently".

ios - How to fix dyld: Library not loaded error -

i have used xcode7.3.1, add framework project,then build error, error message : dyld: library not loaded: @rpath/youare.framework/youare referenced from: /var/containers/bundle/application/823267f9-aa33-4518-98b1-b4e6c7d239f7/we.app/we reason: no suitable image found. did find: /private/var/containers/bundle/application/823267f9-aa33-4518-98b1-b4e6c7d239f7/we.app/frameworks/youare.framework/youare: mmap() errno=1 validating first page of '/private/var/containers/bundle/application/823267f9-aa33-4518-98b1-b4e6c7d239f7/we.app/frameworks/youare.framework/youare' i have installed renewed certificate applewwdrca,but have same error.

mysql - How to verify whether localhost username and password is correct or not using java? -

i've been looking verification of localhost(in case xampp) username , password i.e 'root' , '' (null). suppose user changed localhost username , password how can verify using java + sql query. //database credentials public static connection conn = null; public static statement stmt = null; public static string jdbc_driver = "com.mysql.jdbc.driver"; public static string db_url = "jdbc:mysql://localhost/"; class.forname("com.mysql.jdbc.driver"); conn = drivermanager.getconnection(db_url); system.out.println("driver loaded"); conn = drivermanager.getconnection( db_url , lh_username , lh_password); stmt = conn.createstatement(); is there way can boolean result while executing 1 of above you can surround conn = drivermanager.getconnection( db_url , lh_username , lh_password); whit try catch block in way: try { conn = drivermanager.getconnection( db_ur...

iphone - Get US only map for iOS -

Image
i want draw map of united states states , state boundaries, please image below use svg file parsing fsinteractivemap charting library visualize , interact vector map on ios. it's geochart ios! https://www.cocoacontrols.com/controls/fsinteractivemap

javascript - Leaflet Circle Z-Index -

Image
i'm drawing route using leaflet . the route divided in frames, each frame marked circle , on hover event frame shows opaque overlay on route. the issue circle drawn behind frame overlay want on top of (on z-axis). i've searched , tried i've found can't make stay on top.. can do? this i'm doing: l.geojson(route, { style: function(feat) { return { weight: 10, opacity: 1, cursor: 'pointer', color: 'transparent', classname: 'journey-frame' } }, oneachfeature(feat, layer) { var c = layer.getbounds().getcenter() var color = getcolor() var circle = l.circle(c, { color: 'black', weight: 2, radius: 3, fill: true, fillcolor: color, fillopacity: 1, classname: 'frame-circle', zindexoffset: 1000 // first attempt place circle on top. not working }) // second attempt. not working circle.bringtofront() ...

python - Numpy rolling window over 2D array, as a 1D array with nested array as data values -

when using np.lib.stride_tricks.as_strided , how can manage 2d array nested arrays data values? there preferable efficient approach? specifically, if have 2d np.array looking follows, each data item in 1d array array of length 2: [[1., 2.],[3., 4.],[5.,6.],[7.,8.],[9.,10.]...] i want reshape rolling on follows: [[[1., 2.],[3., 4.],[5.,6.]], [[3., 4.],[5.,6.],[7.,8.]], [[5.,6.],[7.,8.],[9.,10.]], ... ] i have had @ similar answers (e.g. this rolling window function ), in use cannot leave inner array/tuples untouched. for example window length of 3 : have tried shape of (len(seq)+3-1, 3, 2) , stride of (2 * 8, 2 * 8, 8) , no luck. maybe missing obvious? cheers. edit: easy produce functionally identical solution using python built-ins (which can optimised using e.g. np.arange similar divakar's solution), however, using as_strided ? understanding, used highly efficient solution? what wrong as_strided trial? works me. in [28]: x=np.arange(1,...

systemd - caddy.service start request repeated too quickly -

i'm using systemd start caddy webserver on ubuntu 16.04 machine. whenever run sudo service caddy start , service caddy status , error: ● caddy.service - caddy webserver loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled) active: failed (result: exit-code) since mon 2016-08-29 05:03:02 edt; 4s ago docs: https://caddyserver.com/ process: 1135 execstart=/usr/local/bin/caddy -agree -email me@example -pidfile=/var/run/caddy/caddy.pid (code=exited, status main pid: 1135 (code=exited, status=1/failure) systemd[1]: started caddy webserver. caddy[1135]: activating privacy features... done. caddy[1135]: 2016/08/29 05:03:02 caddyfile:12 - parse error: unknown property 'errors' systemd[1]: caddy.service: main process exited, code=exited, status=1/failure systemd[1]: caddy.service: unit entered failed state. systemd[1]: caddy.service: failed result 'exit-code'. in /etc/systemd/system/caddy.service file, had followi...

swift - AVAssetReader - Can not decode MOV -

i trying array of frames video. here code: var frames = [uiimage]() let url = nsbundle.mainbundle().urlforresource(name, withextension: ext, subdirectory: "assets")! let asset = avasset(url: url) let reader = try avassetreader(asset: asset) let output = avassetreadervideocompositionoutput(videotracks: asset.trackswithmediatype(avmediatypevideo), videosettings: nil) output.videocomposition = avvideocomposition(propertiesofasset: asset) reader.addoutput(output) reader.startreading() let framecount = int(asset.duration.seconds*23.973) let context = cicontext() print("asset reader: \(reader.error)") _ in 0..<framecount{ let buff = output.copynextsamplebuffer() if buff == nil{ continue } let pixelbuffer = cmsamplebuffergetimagebuffer(buff!)! cvpixelbuffer let ciimage = c...

docker - how to reach another container from a dockerised nginx -

i have nginx in docker container, , nodejs webapp in docker container. nodejs server reachable host server on port 8080. the nginx docker container listening port 80 (will certificate later, first base must working). and want subdomain forwarded 8080 nodejs app. lets app1.example.com from outside can reach app te server ip (or hostname) , port 8080 not on app1.example.com. , work on app1.example.com:8080 (i have opened port 8080 on host server). i bad gateway nginx message when approaching app1.example.com in first nginx container, how host server proxy pass port 8080 of host server (and not port 8080 of nginx container). looking reverse expose syntax. the main problem is, of course if use ip , port 127.0.0.1:8080 try on nginx container.... how let nginx container route host 127.0.0.1:8080? i have tried 0.0.0.0 , defining upstream, been googling lot, , have tried lot of configurations... not yet found working one.... edit found out, command of docker might help: s...

ios - uicollectionview and searchbar cell height after search -

Image
i have search bar below have collection view . when search , after scrolling display results shows wrong value , happens because of uiviewautoresizingflexibleheight . when delete this(uiviewautoresizingflexibleheight) , shows right result last cell cut off. not using auto layout. below image of storyboard view controller:

cubic spline interpolation in Modelica -

i have set of data have interpolate. first data set contains z1[:] values every x1[:] , y1[:]. have interpolate second data set x2[:], y2[:] w.r.t first set z2[:] values. size of first data set different second data set. there algorithm written in modelica functionality? interpolation on irregular grids requested https://trac.modelica.org/modelica/ticket/1153#comment:15 still not part of modelica standard library (as of version 3.2.2 of today).

javascript - Errors with basic EasyComplete input -

trying include easycomplete plugin (version 1.3.5) future website, have tested simple input tag (the 'basics' one) no success ... not see autcomplete list while typing letters in input tag. here html file: <!doctype html> <html> <head> <link rel="stylesheet" href="./easyautocomplete/easy-autocomplete.min.css"> <link rel="stylesheet" href="./easyautocomplete/easy-autocomplete.themes.min.css"> <script src="./easyautocomplete/jquery.easy-autocomplete.min.js"></script> <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> </head> <body> <input id="basics" /> <script> $(document).ready(function() { var options = { data: ["blue", "green", "pink", "red", "yellow"] }; $("#basics...

jquery - how to add google sign-in oauth to my website? -

i want add google sign-in in website, created google developer console client id , found official tutorial here https://developers.google.com/identity/sign-in/web/sign-in shows how done, did same way tutorial shows here nothing, mean button doesn't appears in browser when run code. here code: <!doctype html> <html lang="en"> <head> <title>login google account using javascript codexworld</title> <meta name="google-signin-client_id" content="921258372597-t5jrb0e9p4ivstp9mfi972lhcvfcuo59.apps.googleusercontent.com"> <script src="jquery.min.js"></script> <script src="https://apis.google.com/js/client:platform.js?onload=renderbutton" async defer></script> <style> .profile{ border: 3px solid #b7b7b7; padding: 10px; margin-top: 10px; width: 350px; background-color: #f7f7f7; height: 160px; } .profile p{margin: 0px 0px 10px 0px;} .head{margin-b...

android - RxJava retry when other observable emits error -

i wanna create chain of request should looks that. i call apiservice.changepassword() , can success 200 , 401 error. if success fine else have call apiservice.refreshtoken() , if refreshed token should call again apiservice.changepassword() . think using retrywhen . should use? [edit:] i got solution: apiservice.joboffers(...) .subscribeon(schedulers.io()) .flatmap(new func1<response<responsebody>, observable<feeddataprovider>>() { @override public observable<feeddataprovider> call(response<responsebody> response) { ... } }).retrywhen(new func1<observable<? extends throwable>, observable<?>>() { @override public observable<?> call(observable<? extends throwable> observable) { return observable.flatmap(new func1<throw...

angularjs - Minify a file during rendering in javascript -

i working on project in angularjs , unable think of way in minifiy file during rendering. there way in javascript or angular ? please newbie you have minimify before, can use plenty of tools online : https://jscompress.com/ https://javascript-minifier.com/ use js minimify tool directly node js : https://github.com/mishoo/uglifyjs2 use task runner gulp or grunt minimify plugin: http://gruntjs.com/ http://gulpjs.com/ or use webpack bundle , minimify website or application: https://webpack.github.io/docs/

php - Unexpected end of JSON input - Uncaught SyntaxError -

everybody. have ajax call returns me error mentioned in title. believe line causes error: var obj = jquery.parsejson(data); maybe wrongly constructed userdata . this jquery: var userdata = 'email=' + email + '&password=' + password; $.ajax({ type: 'post', url: './api/getinfo.php', data: userdata, success: function(data){ var obj = jquery.parsejson(data); $('#name').html(obj.firstname + ' ' + obj.lastname); ... }, error: function(){ alert('error'); } }); and getinfo.php: if($_server['request_method'] == 'post') { $email = prepareinput($_post['email']); $password = prepareinput($_post['password']); $stmt = $connection->conn->prepare('select firstname,lastname,... tb_users email = ? , password = ?'); $stmt->bind_param('ss',$email,$password); $stmt->execute(); $re...

php - cURL csv file submission returning OK status but no data is uploaded -

i'm having difficulty uploading .csv file through curl request restful api. i'm receiving successful response ( 200 ok ) no data appears submitted: { "meta": [ ], "code": 200, "object": "csvfile", "data": [ ], "time": 1472464675 } this being made following request. i've added commenting break down each of curl_setopts : // create curlfile object $cfile = curl_file_create($filename,'text/csv', $filename); // start curl request $curl = curl_init(); // assign post data $data = array('file' => $cfile); // specify post request curl_setopt($curl, curlopt_post, true); // basic auth curl_setopt($curl, curlopt_userpwd, getenv('username').':'.getenv('password')); // destination uri curl_setopt($curl, curlopt_url, 'https://api.arestfulapi.com'); // associate curlfile curl_setopt($curl, curlo...