Posts

Showing posts from May, 2012

swift - CocoaAsyncSocket: Error creating iOS UDP socket when dispatch_sync(socketQueue, block) is called -

Image
i write ios swift app connects udp server locally. here code wrote using library called cocoaasyncsocket , when run it crash. i haven't found similar high level api in apple. thing found documentation suggest higher level api. would able point me towards better library or towards resolving bug get? import uikit import cocoaasyncsocket class outputsocket: nsobject, gcdasyncudpsocketdelegate { var serverip = "127.0.0.1" var port:uint16 = 10000 var socket:gcdasyncudpsocket! override init(){ super.init() setupconnection() } func setupconnection(){ socket = gcdasyncudpsocket(delegate: self, delegatequeue: dispatchqueue.main) { try socket.bind(toport: self.port) } catch { print("binding error: ", error.localizeddescription) } let addressdata = serverip.data(using: string.encoding.utf8) { try socket.connect(toaddress:

Docker for nginx and php-fpm -

i'm getting started docker , docker-compose my first step build stack 2 containers : 1 nginx , 1 php-fpm with config, it's working version: '3.3' services: web: image: nginx ports: - "9090:80" volumes: - ./conf/default.conf:/etc/nginx/conf.d/default.conf:ro - ./content:/usr/share/nginx/html:ro links: - php php: image: php:7.1.8-fpm volumes: - ./content:/usr/share/nginx/html:ro in /content have both index.html , phpinfo.php i can both pages in browser. but don't understand why have put pages in both containers ? if don't put volume php service , index.html displaying not phpinfo.php (file not found.) if don't put volume web service , nginx index.html displaying not phpinfo.php (404 error). so if want deploy wordpress site have copy files in both containers ? bad configuration. practice separate process

sql server - pandas + pyodbc ODBC SQL type -150 is not yet supported -

i know there many topics on think specific. current code audit purpose: import pandas pd import pyodbc query = """ --top 50 high total cpu queries select top 50 'high cpu queries' type, serverproperty('machinename') 'server name', isnull(serverproperty('instancename'),serverproperty('machinename')) 'instance name', coalesce(db_name(qt.dbid), db_name(cast(pa.value int)), 'resource') dbname, qs.execution_count [execution count], qs.total_worker_time/1000 [total cpu time], (qs.total_worker_time/1000)/qs.execution_count [avg cpu time], qs.total_elapsed_time/1000 [total duration], (qs.total_elapsed_time/1000)/qs.execution_count [avg duration], qs.total_physical_reads [total physical reads], qs.total_physical_reads/qs.execution_count [avg physical reads], qs.total_logical_reads [total logical reads], qs.total_logical_reads/qs.execution_count [avg logical

doctrine - Symfony: Ordered one-to-many relationship -

i have 2 separate entities want link one-to-many relationship. want relationship ordered, meaning every time call on first entity, elements of second entity come in pre-ordered way. cannot use 'order by' calls because order has nothing fields of second entity. thought having 1 field of first entity array of entities, i'm not sure how accomplish either.. edit so far have this: /** * @orm\onetomany(targetentity="fusiondesign\blogbundle\entity\element", mappedby="page") */ private $elements; and /** * @orm\manytoone(targetentity="fusiondesign\blogbundle\entity\page", inversedby="elements") * @orm\joincolumn(name="page_id", referencedcolumnname="id") */ private $page; i'm aware can put "order whatever asc" somewhere in there orders according column in element, , that's not need, because element entities , page entities never persisted @ same time, nor same process. want constructi

excel - Code Skipping Second Cell, Not Supposed To -

this code part of bigger code takes words listbox , places listbox, code separates words in listbox , establishes words able inserted cell, reason second strsplt not showing, else working well, it's one, need , there no error thrown out. i've looked on f8 , breakpoints , problem seems if ii < .columncount - 1 str = str & .list(i, ii) & vbcrlf else str = str & .list(i, ii) end if the whole code: with me.selecteditems thisworkbook.sheets(9).range("a:b").clearcontents = 0 .listcount - 1 if .selected(i) found = true ii = 0 .columncount - 1 redim strsplt(0 i) if str = "" str = .list(i, ii) & vbcrlf else if ii < .columncount - 1 str = str & .list(i, ii) & vbcrlf else str = str & .list(i, ii) end if

android - Cannot acces ActivityCompatApi23 when trying to use FragmentActivity -

i'm trying use viewpager on smartwatch, keep getting error when trying rebuild/run/debug application. i'm using fragmentactivity, error occurs. searched stackoverflow , tutorial websites see problem, , lot of results related build.gradle files. tried pretty stumbled upon, error didn't change once. the error: error: cannot acces activitycompatapi23 the error happens on line, coming piece of code below. public class wearmainactivity extends fragmentactivity { wearmainactivity.java package be.ehb.dt.finalwork_lievenluyckx_v001; import android.os.bundle; import android.support.v4.app.fragment; import android.support.v4.app.fragmentactivity; import android.support.v4.view.pageradapter; import android.support.v4.view.viewpager; import java.util.list; import java.util.vector; /** * created lieven on 14/08/17. */ public class wearmainactivity extends fragmentactivity { private pageradapter pageradapter; /* (non-javadoc) * @see android.support.

sapui5 - Filtering a binding: Property <query> not found in type <Entity> -

Image
the error right, there no property named because that's search query. don't see what's going on, i've implemented filters search queries before. error occurs before call made odata service. onsearchqualification: function(evt){ // create model filter var filters = []; var query = evt.getparameter("query"); if (query && query.length > 0) { var filter = new sap.ui.model.filter("title", sap.ui.model.filteroperator.contains, query); filters.push(filter); } // update list binding var list = evt.osource.getparent().getparent(); //this.getview().byid("qualificationselectionlist"); var binding = list.getbinding("items"); binding.filter(filters); //this._olist.getbinding("items").filter(afilters, "application"); }, the <items> aggregation <list> element missing.

db2 - SQL - Join with default if it's not possible to match -

i have 2 tables this: table 1: +---------+---------+-------------+ | activity| area | responsible | +---------+---------+-------------+ | cooking | meat | peter | | cooking | vegan | sia | | cleaning| kitchen | paul | | cleaning| toilets | selina | +---------+---------+-------------+ table 2: +---------+---------+-------------+ | activity| area | day | +---------+---------+-------------+ | cooking | meat | monday | | cooking | vegan | monday | | cleaning| garden | friday | | cleaning| toilets | friday | +---------+---------+-------------+ now want sql join them, can see responsible persons each day. i think standard sql this: select day, activity, responsible table_2 2 left join table_1 1 on 1.activity = 2.activity , 1.area = 2.area but there rows can not joint (e.g. cleaning garden). in case (if not possible join) want peter responsible it. can in 1 join (maybe case statement?) or how this?

python - Can't create a working elasticsearch-py instance -

i've got amazon elasticsearch service running , can connect fine using curl/postman, when try create elasticsearch-py instance ide hangs indefinitely. endpoints = ['http://xxx.us-east-1.es.amazonaws.com', 'http://xxx.us-east-1.es.amazonaws.com:443', 'http://xxx.us-east-1.es.amazonaws.com:9200'] endpoint in endpoints: try: es = elasticsearch(endpoint) print es.count('analytics_v4') except exception, e: print e print endpoint + " didn't work" this current test set up, ide (pycharm) stops @ point , need end run able try again, i've tried each endpoint individually , none of them work. my access policy : { "version": "2012-10-17", "statement": [ { "effect": "allow", "principal": { "aws": "*" }, "action": "es:*", &qu

ios - update an app in App Store in my case -

i have ios app released app store. now have new ios project created new app different bundle id app on app store. if want release new ios project app update of app in app store instead of new app. need change bundle id of new project same app in app store? there else need take care of? oh, , need generated new provisioning profile since bundle id changed right?

ios - Audio Recording AudioQueueStart buffer never filled -

i using audioqueuestart in order start recording on ios device , want recording data streamed me in buffers can process them , send them server. basic functionality works great in bufferfilled function < 10 bytes of data on every call. feels inefficient. since have tried set buffer size 16384 btyes (see beginning of startrecording method) how can make fill buffer more before calling bufferfilled? or need make second phase buffering before sending server achieve want? osstatus bufferfilled(void *aqdata, sint64 inposition, uint32 requestcount, const void *inbuffer, uint32 *actualcount) { aqrecorderstate *paqdata = (aqrecorderstate*)aqdata; nsdata *audiodata = [nsdata datawithbytes:inbuffer length:requestcount]; *actualcount = inbuffer + requestcount; //audiodata ususally < 10 bytes, 100 bytes never close 16384 bytes return 0; } void handleinputbuffer(void *aqdata, audioqueueref inaq, audioqueuebufferref inbuffer, const audiotimestamp *instart

python - Missing 1 required positional argument (object created and dictionary initialized) -

i see question has been asked before in different variations, feel though have implemented feedback have seen in threads (mainly making sure object created have done in second last night, , making sure dictionary initiated, feel have done in third line) , still receiving error. advice appreciated. thank you! class groceries: def __init__(self, grocery_list): self.grocery_list = {} def add_item(self, item): item = input("name: ") purchased = input(false) self.grocery_list[item] = purchased = groceries() something.add_item() the error is: traceback (most recent call last): file "intermediate_python.py", line 14, in <module> = groceries() typeerror: __init__() missing 1 required positional argument: 'grocery_list' i tried resolve error removing grocery_list def init statement (not sure why work, playing around) , error moved next line with: traceback (most recent call last): file "intermediate_python.py"

python - How to stack channels in Tensorflow input pipeline? -

i started working tf few weeks ago , struggling input queue right now. want following: have folder 477 temporal, greyscale images. want e.g. take first 3 images , stack them (=> 600,600,3), single example 3 channels. next want take fourth image , use label (just 1 channel => 600,600,1). want pass both tf.train.batch , create batches. i think found solution, see code below. wondering if there more fashionable solution. my actual question is: happens @ end of queue. since i'm picking 4 images queue (3 input, 1 label) , have 477 images in queue, things not working out. tf fill queue again , continues (so if there 1 image left in queue, takes image, fills queue again , take 2 more images desired 3 images?). or need number of images divisible 4 in folder if want proper solution? def read_image(filename_queue): reader = tf.wholefilereader() _, value = reader.read(filename_queue) image = tf.image.decode_png(value, dtype=tf.uint8) image = tf.cast(image, tf.float32)

numpy - Python - Data structure of csr_matrix -

i studying tfidf. have used tfidf_vectorizer.fit_transform . return csr_matrix, can not understand structure of result. data input: documents = ( "the sky blue", "the sun bright", "the sun in sky bright", "we can see shining sun, bright sun" ) statement: tfidf_vectorizer = tfidfvectorizer() tfidf_matrix = tfidf_vectorizer.fit_transform(documents) print(tfidf_matrix) the result: (0, 9) 0.34399327143 (0, 7) 0.519713848879 (0, 4) 0.420753151645 (0, 0) 0.659191117868 (1, 9) 0.426858009784 (1, 4) 0.522108621994 (1, 8) 0.522108621994 (1, 1) 0.522108621994 (2, 9) 0.526261040111 (2, 7) 0.397544332095 (2, 4) 0.32184639876 (2, 8) 0.32184639876 (2, 1) 0.32184639876 (2, 3) 0.504234576856 (3, 9) 0.390963088213 (3, 8) 0.47820398015 (3, 1) 0.239101990075 (3, 10) 0.374599471224 (3, 2) 0.374599471224 (3, 5) 0.374599471224 (3, 6) 0.374599471224

Python all items in list of lists true -

made table of true & false, , i'd check if true. used all() before, reason below fail miserably. data = [[false, false, false], [false, false, false], [true, true, true], [true, true, true]] print(all(data)) >>> true why happening? all not check bools in each sublist. each of non-empty lists truthy. to check all items in all sublists true , should do: all(x lst in data x in lst) # -> false

intersystems cache - Does object script supports multiple inheritance? -

i new cache , found different normal oop concept. in object script base class can inherited multiple subclasses(inheritance order can left/right). if objectscript oop, don't know how cache supports this(unlikely other programming language). baseclass class inheritance.thebaseclass extends (%registeredobject, inheritance.thechildclass, inheritance.thechildclass1) [ inheritance = left ] { classmethod init() { //do ##class(inheritance.thechildclass).ping() //do ##class(inheritance.thechildclass1).ping() ..ping() ..pingggg() } } child class 1 class inheritance.thechildclass extends %registeredobject { classmethod ping() { write "i in inheritance.thechildclass",! } } child class 2 class inheritance.thechildclass1 extends %registeredobject { classmethod ping() { write "i in inheritance.thechildclass1",! } classmethod pingggg() { write "i

javascript - Generate barcode from text and convert it to base64 -

does knows tool generate barcode image (preferably code 39) string , converts base64 string, use this: var text = "11220"; // text convert var base64str = texttobase64barcode(text); // function convert input // image formated in base64 string "data:image/jpeg;base64..." ? using jsbarcode function want. function texttobase64barcode(text){ var canvas = document.createelement("canvas"); jsbarcode(canvas, text, {format: "code39"}); return canvas.todataurl("image/png"); }

appcelerator - What properties it is necessary to set view1, so that it fills the rest of the window? -

what properties necessary set view1, fills rest of window? <alloy> <window> <view id="view1"> </view> <view id="view2" height="50"> </view> </window> </alloy> <alloy> <window> <view id="view1" top="0" bottom="50" width="100%"> </view> <view id="view2" height="50" bottom="0" width="100%"> </view> </window> </alloy> also put dimensions in style (tss) file instead of putting them in view xml file. if resolves query mark answer reference rest of community.

net http - How do you make a POST request in ruby 2.3.0 with unlimited read_timeout -

i have following block of code, using ruby 2.3.0 , net:http, how include timeout server can take more 60 seconds respond? i'm having specific challenges including array in body too, when use httparty require 'uri' require 'net/http' require 'open-uri' url = uri.parse('http://local-tomcat.com:8080/local-api/v1/anobject/create') post_params = {"querytoken"=>"4b58f48b-5197-4c86-8783-e15096fe3a6f", "tenantid"=>"99218d0e-1757-4fd7-a7c1-5642adcb57e3", "projectid"=>"4885536d-06a8-41ed-8002-1619966b14e2", "destinations"=>["2cc1053b-20fd-4191-b3f4-219a9099ad63|4885536d-06a8-41ed-8002-1619966b14e2|99218d0e-1757-4fd7-a7c1-5642adcb57e3|5ceabd11-a2b1-4c8e-89b2-c0d75a7d7f8e","515104a7-e4ae-4905-893c-835500f0f962|4885536d-06a8-41ed-8002-1619966b14e2|99218d0e-1757-4fd7-a7c1-5642adcb57e3|5ceabd11-a2b1-4c8e-89b2-c0d75a7d7f8e"],

scroll - jQuery Draggable - Scrolling containers other than its own with -

so have unordered list of draggables want drag unordered list of droppables. if clone draggable , append "body", can drag out of container , drop on droppable elements in other list, not automatically scroll through droppable unordered list. if clone , append other unordered list, automatically scroll droppable list, element not visible when dragging until hovering on droppable list. know of workaround or better approach problem? fiddle code here: https://jsfiddle.net/bkfxjnom/6/ draggable code: $('.draggable').draggable({ helper: 'clone', appendto: "body", zindex: 100, refreshpositions: true, revert: 'invalid', start: function(event, ui) { $(this).css('visibility', 'hidden'); }, stop: function(event, ui) { $(this).css('visibility', 'visible'); } }); droppable list html: <ul class="list-group" id="root" style="overflow-y

configuration - Is calling CMake the equivalent of ./configure step? -

i understand compile , install source, in unix system, 3 steps involved are: 1) ./configure 2) make 3) make install when checked installation of opencv source , noticed had no ./configure step, had cmake step. gave me idea cmake equivalent of ./configure . read cmake can generate build systems such makefiles , ./configure step does. however, article (see first paragraph of what difference? ) says cmake performs actual build well. if case, why opencv installation instruct make after cmake ? also, see cmake compared make , not ./configure . so, cmake fit in? yes, cmake configure step of autotools. not perform build itself, generates necessary files building (makefiles, visual studio projects, etc.). cmake has --build option, option invokes underlying build system, can't use cmake standalone build tool. different plain makefiles, because can write them manually , make them.

php - adding form validation jquery causes previous jquery submit function not to work -

i have form stops behaving expected when add form validation jquery. <form class="myform" action="booking.php?token=<?php echo time(); ?>" method="get" name="f<?php echo ( $row['vehicle_id'] );?>" class="request_submit"> <input type="hidden" name="v_id" value="<?php echo ( $row['vehicle_id'] );?>" /> <input type="hidden" name="p_id" value="<?php echo $params['quote_location']['pickup']['location_id']; ?>" /> <input type="hidden" name="p_val" value="<?php echo $params['quote_location']['pickup']['location_name']; ?>" /> <input type="hidden" name="d_id" value="<?php echo $params['quote_location']['dropp']['location_id']; ?>" /> <input type=&

php - Codeigniter htaccess redirections not redirecting to desired url -

i have codeigniter website want seo on. used routes sluggish urls rather codeigniter default having method name , indices. problem comes in play, 3 different urls opens same page ie. 1. https://www.example.com/seo-freindly-url/ 2. https://www.example.com/index.php?/controller/method/42 3. https://www.example.com/controller/method/42 but want first url work, others want redirect seo friendly 1 using htaccess redirections. please me in that. 1 more thing used htaccess 301 redirection redirect 1 of urls redirect 301 "/plan/index/42" https://www.example.com/services/seo it works extent, whenever open url https://www.example.com/plan/index/42 it redirects https://www.example.com/services/seo?/plan/index/42 but has https://www.example.com/services/seo/ thank you. it's hard test on end, might try this: .htaccess rewriteengine on rewritebase / rewriterule ^controller/method/42$ /seo-friendly-url [l] redirect 301 /plan/index/42 /services/seo

php - How to populate data from database through AJAX and display it in table format? -

<script type="text/javascript"> function select_std(){ var ali=$('#class_std').val(); $('#std_name').html(''); $.ajax({ url:"<?php echo base_url().'admin/test/'?>"+ali, type:"get", success:function(res){ $('#std_name').append(res); } }); } <select id="std_name" class="form-control"> </select> i have populated dropdown menu through ajax , works fine. however, want display in table format, how can this? have searched many sites in vain. this rather broad question stack overflow, happy give pointers. is server-side under control? if so, try returning json web server. so, rather returning single blob of html render directly, return array, each element can rendered per cell (and two-dimensional array can render rows). h

javascript - jQuery.Deferred exception: i is not a function TypeError: i is not a function -

i've deployed carcass of phoenix app heroku ( link ) have similar warning , error in js console: warning: jquery.deferred exception: not function typeerror: not function error: uncaught typeerror: not function in development environment, works fine. tried recompile brunch heroku run brunch build , tried modify brunch config file. looks got lost or put in wrong order after minification. stuck. can me? brunch-config.js exports.config = { // see http://brunch.io/#documentation docs. files: { javascripts: { jointo: "js/app.js", order: { before: [ "node_modules/jquery/dist/jquery.js", "node_modules/what-input/src/what-input.js", "node_modules/foundation-sites/js/foundation.core.js", "node_modules/foundation-sites/js/foundation.topbar.js", "node_modules/foundation-sites/js/foundation.reveal.js", "

c# - Generate Outlook Signature with Open XML -

i have c# application uses wordinterop create outlook signature based off form input. i want deploy application web app , have read online not use wordinterop on server type of application. reason converting open xml . i can create docx file basic formatting signature, how can instead create outlook signature required htm , rtf , txt files? alternatively, how take docx output , convert necessary htm , rtf , txt file types? the code using create file followed style definitions , actual content of signature using (wordprocessingdocument mydoc = wordprocessingdocument.create("c:\\users\\exampleuser\\appdata\\roaming\\microsoft\\signatures\\emailsignature.rtf", wordprocessingdocumenttype.document)) { my thought need change wordprocessingdocument or wordprocessingdocumenttype.document , appreciated edit here full logic can test locally (note step after getting base functionality consolidate st

php - Echo two different user's column -

i want echo information account's line, shown on page. exemple: if user aaron logins, , goes page "yasmine" want echo yasmine's picture. this code now php: mysql_select_db("vestiged_sala"); $user = $_session['username']; $ppoza = ''; // add these lines in place of $result query $result = mysql_query("select * users username='$user' limit 1"); while($row = mysql_fetch_array($result)){ $ppoza = $row['ppoza']; } if (!$result) { echo "could not run query ($sql) db: " . mysql_error(); exit; } and html <div class="ppoza"><?php echo $ppoza; ?></div> the problem echo aaron's profile picture instead of yasmine's you need run select current user's data. select * users username= ? or select * users userid= ? you should update driver pdo or mysqli can use parameterized queries i've shown here. prevent sql i

matlab - Simulink: Add controls to simulink mask tab programatically -

i trying add parameter mask tab, using m-code. let's want add 'edit' parameter, , 'popup' parameter. so far, cannot put them in tab, stay in general group. mathworks documentation failing provide working guidelines: the adddialogcontrol method failing else 'text' , 'hyperlink' items the 'tabname' parameter issue warning (going removed, not allowed use). warning says "use tab dialog controls add parameters tabs ". there's no documentation this, nowhere. the example provide incomplete , goes not give displayed result (parameters stay out of tab), see link: https://www.mathworks.com/help/simulink/ug/control-masks-programmatically.html#bu47973-4 i noticed there's simulink.dialog.control class have 'moveto' method, parameters not simulink.dialog.control, simulink.maskparameter instance. there simulink.dialog.parameter.control class not know objects belong nor if me. thanks helping, need minimal example sho

xamarin.ios - NSURLErrorDomain error -999 in Xamarin iOS -

i working on xamarin ios platform while loading url in webview getting error the operation couldn’t completed. (nsurlerrordomain error -999.) i have added nsapptransportsecurity key in info.plist <key>nsapptransportsecurity</key> <dict> <key>nsallowsarbitraryloads</key> <true/> </dict> but not working. please me resolve issue. this error occurs due request made before previous request of webview completed based on answer just ignore error in loadfailed(uiwebview webview, nserror error) delegate method. try code public override void loadfailed(uiwebview webview, nserror error) { if (error.code == -999) { // show alert or ignore error } } also, check have proper network connection hope solve problem

r - update on merMod object gives different fit -

i trying refit full model of class mermod intercept (the null model). however, refitting using update.mermod gives different answer fitting null model hand, e.g.: # generate random data set.seed(9) dat <- data.frame( x = do.call(c, lapply(1:5, function(x) rnorm(100, x))), random = letters[1:5] ) dat$y = rnbinom(500, mu = exp(dat$x), size = 1) library(lme4) # full model full <- glmer.nb(y ~ x + (1 | random), dat) # write out intercept-only model hand null <- glmer.nb(y ~ 1 + (1 | random), dat) # update null2 <- update(full, . ~ 1 -. + (1 | random)) varcorr(null) varcorr(null2) any idea why how can use update same vcov matrix?

java - Install RWeka package -

i trying install rweka in r. have tried both on lab server , on local machine (mac). checked java version in r makeconf file: java 1.6.0 in both environments. however, able install rweka on mac successfully, error message saying java has >1.7 when installing package on lab server. i have couple of questions: why installation behave differently on server vs. on local machine? i don't have root permission on server, can't modify java version in r makeconf file, also, there many other r packages have been installed on server before, not sure if impact other packages on server if change java version 1.7.0 in makeconf file. possible pass java version variable/parameter package installation in r? can enable java1.7 rweka package without changing makeconf file? thank help!

arrays - Incorrect output for Java in a Morse to English program -

here morse code english , vice versa assignment criteria: in morse code, | stands blank space. in morse code, blank space stands new letter or digit. my code compiling correctly, output (after running it) incorrect. // 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 == "morse code") toenglish(amountunit1); else if (unit1 == "english") tomorsecode(amountunit1); else system.out.println("invalid data. enter 'morse code&

How can I get an already loaded module from a file path in Python? -

i have file paths inside directory , related module each python files. python_file_suffix = u".py" element_name in os.listdir(path): element_path = join(path, element_name) if isfile(element_path): if element_path.endswith(python_file_suffix): # don't know module name here module_name = "???" source = imp.load_source(module_name, element_path) # want methods of python file i don't think can use imp load file 2 reasons: i not know module name i not want load again module (if possible) my ultimate goal methods information (name, docstring, ...) each file. thank help.

java - error while compiling AGSforAndroidProxy lib for B4A -

when compiling agsforandroidproxy-master slc error occured : \tchart\ags\proxy\android\map\locationservicewrapper.java:10: error: cannot find symbol import com.esri.android.map.locationservice; ^ symbol: class locationservice location: package com.esri.android.map note: input files use or override deprecated api. note: recompile -xlint:deprecation details. note: messages have been simplified; recompile -xdiags:verbose full output 1 error

reactjs - React Virtualized performance hiccup in google chrome -

i have ui implements react virtualized table inside of window scroller. have tested in chrome , ie11. have couple interactions in each row , couple bottons @ top of page can clicked. run 3 - 4 second delay in chrome buttons aren't intractable , onrowmouseover doesn't trigger after scrolling in table. wondering if else has seen , if know fix? using chrome version 60.0.3112.90

parsing - Ruby best way to make this string an array? -

what best way make string looks array of hashes real array? the string looks this: [{name:"lol", age:12},{name:"lmao", age:66},{name: "roflcopter", age:99}] , need same array. input: (a string) '[{name:"lol", age:12},{name:"lmao", age:66},{name: "roflcopter", age:99}]' expected output: (an array of hashes) [{name:"lol", age:12},{name:"lmao", age:66},{name: "roflcopter", age:99}] your string similar to, not quite same json. means have 3 choices. 1) convert json (upstream) the difference between string , proper json string in json, keys need wrapped in quotes. if have control on format of string, suggest change in json format: '[{"name":"lol", "age":12},{"name":"lmao", "age":66},{"name": "roflcopter", "age":99}]' once string in format, can turn array of hashes

Wordpress - Lunch Menu Plugin -

i've been looking lunch menu plugin accomplish below haven't found 1 , i've been brainstorming ways in go around having steps done still no luck if knows plugin or innovative way accomplish have below please share. thanks. the idea of how lunch menu work (it's internal ordering of lunch within company calls front desk order or leave desk write order in lunch book. have 2 vendors order lunch both have changing menus on daily basis) in backend of website there section admin/lunch person can enter possible lunch orders fry chicken, curry goat, etc. have premade list of food both vendors offer. (i guess each food categorized under vendor 1 or vendor 2). from premade list, admin/lunch person can go on lunch page , each day of week add respective lunch items under day premade list without having type it. after updating lunch page, users/employees can login intranet , head on lunch page on frontend, tick/select lunch menu want current&/future day(s) , there clic

html - Having trouble being specific enough to scrape what I want from a tag with Beautiful Soup and Python -

here's sample of html want scrape. <a id="catalogentry_img3677183" href="http://www.academy.com/shop/pdp/under-armour%e2%84%a2-mens-tide-chaser-short-sleeve-shirt#repchildcatid=4099002" title="under armour men's tide chaser short sleeve shirt" onclick="javascript:dltrackproductgridclicks(&quot;109457178&quot;,&quot;under armour men's tide chaser short sleeve shirt&quot;,&quot;3677183&quot;);"> and retrieve link inside quotations href attribute. here's code wrote. a_ids = page_soup.findall("a") in range(len(a_ids)): output = a_ids[a]["href"] print(output) however, results code includes bunch of messy stuff other tags below. <a href="http://www.academy.com/shop/pdp/bcg-mens-turbo-mesh-short-sleeve-t- shirt#repchildcatid=4190420" id="catalogentry_img4181006" onclick="javascript:dltrackproductgridclicks(&quot;10940

How does one use Tensorflow's OpOutputList? -

on github, opoutputlist initialized so: opoutputlist outputs; op_requires_ok(context, context->output_list("output",&outputs)); and tensors added this: tensor* tensor0 = nullptr; tensor* tensor1 = nullptr; long long int sz0 = 3; long long int sz1 = 4; ... op_requires_ok(context, outputs.allocate(0, tensorshape({sz0}), &tensor0)); op_requires_ok(context, outputs.allocate(1, tensorshape({sz1}), &tensor1)); i'm assuming opoutputlist opinputlist in jagged arrays allowed. my question is, how opoutputlist work? segfaults can't access first index when use eigen::tensor::flat() because don't understand how allocation works can't pinpoint error. many thanks. opoutputlist object simple value object containing 2 integers - start , end indices of op outputs contained in list. being simple value objects, create them on stack, no "allocation" required. you allocate tensors logically belong opoutputlist other tensor. using

Cannot Debug Xamarin Forms App on Android O -

does have experience debugging xamarin forms app on external android o device? debugging emulator fine (as release mode external device), debugging on physical device causes following error: couldn't connect logcat, getprocessid returned: 0 i have tested adb , works fine. i'm not sure issue be. seems confirmed bug : https://bugzilla.xamarin.com/show_bug.cgi?id=56740

java - How to make a button to generate a random image from Drawable - Android Studio -

i new android studio , question this: have 8 images in drawable called ukchance1 ukchance2 ukchance3 etc. have button , imageview on 1 of layouts. have make when button clicked, random ukchance image shows... ukchancelayout: package com.austinthomas.monopolyactioncards.activity; import android.content.res.typedarray; import android.os.bundle; import android.support.annotation.idres; import android.support.v7.app.appcompatactivity; import android.view.view; import android.view.viewgroup; import android.widget.button; import android.widget.imageswitcher; import android.widget.imageview; import android.widget.viewswitcher; import com.austinthomas.monopolyactioncards.r; import java.util.arraylist; import java.util.collections; import java.util.random; public class ukchancelayout extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.uk_chance); } } uk_chance.xml <?xm

java - Get the count of nearby android cellular devices using cellular signals -

is somehow possible in android count of nearby devices in active state(i.e. connected cellular network)? mean cellular device powered on , installed working sim. the reason why ask because whatever answers have found far suggest making use of bluetooth, wifi, nearby or other custom app. intention devices actively connected cellular network. each time see device emitting/receiving cellular signals counter gets incremented. i tried looking android api not find provides functionality. neighboringcellinfo gives information device(and network) on app installed. , closest get. i thinking if can information nearby cellular carriers getting information nearby cellular device should possible. end of day it's catching radio waves coming out of something. thank valuable time. appreciate help! p.s. : i'm not not sure if question makes sense all. please let me know if additional information needed. come totally different background , first time i'm trying develop mobile

file io - Changing default search directories of fopen() in C -

in directory function fopen() specified file? edit i use linux. is possible change, i.e.add/remove directories, in the function looks specified file? i found out trying achieve can done changing environment variables.

javascript - How can I see if iframe is printing through js? (and instead of printing, email the pdf) -

i using iframe have users submit third party form. when submit form, pdf displayed specific form data , automatically opens print dialog. know 1. way tell if print box visible on screen. 2. if can block print box 3. take pdf going printed, , instead email user

Moving docker image from 1.7 to 17.06 -

i tried move image created docker 1.7 on red hat 6 system running docker 17.06.0-ce on ubuntu 14.04.5. image appeared load after loaded got message: open /var/lib/docker/tmp/docker-import-748740002/repositories: no such file or directory docker images shows it, no repo ot tag: repository tag image id created size <none> <none> 12e143c9efb2 4 weeks ago 6.04gb what error , should expect able move image over? you moved image copying /var/lib/docker directories, guessing? not right way it; should docker push images image repo, , docker pull out repo. you might able recover manually re-tagging image, e.g. docker tag 12e143c9efb2 mycompany/myimage:version . you'll better off letting docker manage own data, , using docker push red hat system , docker pull ubuntu system.

python - Need help getting VPython to work on Atom -

recently started using code editor atom python code. i've been able pretty need work, except vpython. i've been told vpython supported/compatible atom, yet doesn't work. the main issue i'm unable import 'visual' module. i've tried suggested alternatives such importing 'vpython' or 'vis', , uninstalled/reinstalled vpython several times in different ways. any advice highly appreciated. check out hydrogen package in atom: https://atom.io/packages/hydrogen run code , results inline using jupyter kernels ipython, ijulia, , itorch. it's 1 of coolest packages in atom supports inline plot visualizations if that's you're looking for. i hope helps.

mongodb - Query Group Keys with Count in Different Collections -

i trying group set of key values found in different collections. need result value , count each of collections. divisionname chicago in both first collection , second collection. another wrench in can have 15 submitted.submittedforms collections. issue output not combine values. 2 separate lines chicago instance. 1 each collection total count after 2 lines. "submittedforms" : { "submittedforms" : { "0" : { "fullname" : "john smith", "emailaddress" : "'testmail@att.net", "phonenumber" : "(555) 555-5555", "marketid" : luuid("24c111da-bc1c-b14c-8ee9-a4e9d25d4a91"), "comments" : "please send me more information ", "emailsent" : "1", "internalemailsent" : "0", "submi