Posts

Showing posts from March, 2013

ios - Is it safe to upgrade XCode 4.6.3 to Xcode 7? -

i have developed universal app works on both ipad running ios 9.3.5 & iphone running ios 6.1.4, using 2 different storyboards. i realise need upgrade in order able distribute app on app store. can run xcode 7 on os x lion? and, more importantly, objective-c code still work in xcode 7? the code using basic. using uinavigationcontroller present data sqlite database. not using animation, location services or camera based classes. @ moment, have set deployment target 6.1. using 2 third party frameworks: ssziparchive & reachability can give me reassurance, before assign month's worth of work scrap heap? it hard tell, since means jumping 3 versions (!) ahead. anyway, wholeheartedly recommend set git in project, make sure can revert if goes wrong. btw- recommend updating xcode 8, latest version of xcode.

pdo - Easyphp 16.1 can't connect to mysql if alter php.ini -

i've downloaded latest easyphp-devserver 16.1. it's set , working fine. thing pdo driver work need go configuration file (php.ini) , comment out 'extension=php_pdo_mysql.dll' i've done, server won't connect/stat again. i've noticed if open php.ini file , anything; if make change save how originally, never connect again database. what's going on? how pdo driver working , connect again?

ios - 'FBSDKMacros.h' file not found -

my podfile has following dependecies in swift. pod 'fbsdkloginkit' pod 'fbsdkcorekit' pod 'fbsdksharekit' pod 'fbaudiencenetwork' when building project, issue thrown below: lexical or preprocessor issue 'fbsdkmacros.h' file not found fbsdkaccesstokencachev3.h i new ios programming , not able identify error about.

installation - Install gnuplot with tex option while already installed with x11 option -

on mac, have installed xquartz (x11) homebrew gnuplot gcc latex i have installed gnuplot following option --with-x11 . i allow use of gnuplot on latex. should brew install gnuplot --with-tex or going redundant. i pretty new terminal, gnuplot ...etc , not want stupid. thanks lot , sorry if question has been asked. bests did install via homebrew or compiled source? keep in mind can view options homebrew recipes with brew options gnuplot these options passed gnuplot configuration prior compilation (they need enabled @ compile-time). you'll find --with-tex option doesn't exist because gnuplot enables default. more complete set of compile-time options, of aren't available via homebrew, getting gnuplot sourcecode , running ./configure -h in source directory tell available options , defaults: ... --without-latex disable latex support, (default enable) ...

Using Guava 20.0 in a GWT 2.8 project for dummys -

Image
i trying use guava 20.0 in gwt 2.8 project, getting errors when try compile; ... [error] errors in 'com/google/common/base/function.java' [error] line 64: canignorereturnvalue cannot resolved type [error] line 18: import com.google.errorprone cannot resolved [error] errors in 'com/google/common/base/supplier.java' ... and solutions find online; including guava gwt in gwt app https://github.com/gwtproject/gwt/issues/9323 are little unclear me. guava working added; <inherits name="com.google.common.collect.collect" />. to gwt.xml of project. i assuming has changed , need add 2 more? or need download separate *.jars well? (and there gwt versions of jars need use there guava-gwt?) i apologize if there's documentation missing regarding these changes using guava, can find on guava site reference needing use gwt2.8, already. so advice on current (november 2016) method use new guava in new gwt welcome. th...

class - How to correctly implement communication between Java classes -

i'm beginner in java programming , i'm working on app more complex class structure , gui. might stupid questions, hard google, i'm asking here. i have main class, looking this: package app; public class app { private firstclass fc; private secondclass sc; public app () { fc = new firstclass (); sc = new secondclass (); // ... code continues ... } } say secondclass defined outside of .java file (like gui forms are). there way me access "fc" instance (or other member variables of app instance) "sc" instance (without passing "this" pointer)? like: class secondclass { public void somemethod() { getwhoevercreatedthisinstance().fc.getsomedata(); // ... code continues ... } } and if not, doing wrong? should design differently? maybe setting "fc" static? if want more of app's classes communicate each other, should make them static? point of having non-static...

Create Project in Visual Studio 2015 with Entity Framework 5 -

i'm using vs 2015 , need create new project can't find how use new project template older version of entity framework. i need use ef 5.0 , "new project" in vs 2015 adds reference of ef 6 login , other stuff. tired search in web still don't know how this.

Comparing a specific character of an array index in Ruby -

what i'm trying input numbers through hash function, , storing resulting hash array. i'm trying find if numbers result in similar hashes match in last characters. i'm trying find largest possible matching characters. i have hash array created. code doing this: create hash array i=1 computation i, new result call 'result' put result hash pointing created it hash[result]=i so have this: {"abcd"=>1} increment i loop until condition so when increment i, , put thru computation again, want check if there similarities previous results, first comparing character @ end of result say when put 2 through computations result in "hwed", want way compare , see "abcd" , "hwed" match in last character. know how can this. what you're trying (perform sequence of operations , store each computation's result) can done simply, though in ruby there many other pote...

java - Android Google Maps Zoom not to right Location and Activity Crash when high frequently open and close -

i've got problem mapmapfragment of googlemaps in android. i used method, have override: @override public void onmapready(googlemap googlemap) { gm = googlemap; gm.setmaptype(googlemap.map_type_hybrid); if (activitycompat.checkselfpermission(this, android.manifest.permission.access_fine_location) != packagemanager.permission_granted && activitycompat.checkselfpermission(this, android.manifest.permission.access_coarse_location) != packagemanager.permission_granted) { toast.maketext(getapplicationcontext(), getapplicationcontext().getresources().getstring(r.string.choose_festival_gps_disabled), toast.length_short).show(); } else { gm.setmylocationenabled(true); } gm.getuisettings().setzoomcontrolsenabled(true); gm.addmarker(new markeroptions().position(new latlng(latitude(), longitude())).title(name())); gm.movecamera(cameraupdatefactory.newlatlng(new latlng(latitude(), longitude()))); gm.animatecamera(cameraupdatefa...

javascript - Determine Distance between two Addresses Client Side -

i'm building web site needs calculate shipping costs of products based on distance store (we ship product ourselves). want automatically calculate cost based on distance (driving or exact). other questions on here mention google maps api, don't want display map (required policy). preferably, determine value client side, , not have use api key.

qt - c++ program crashes when adding new QGraphicsItem to scene -

my c++ program crashes when add new qgraphicslineitem qlist of qgraphicspixmapitem. below function. void mainwindow::linkcomputernodes(qlist<node*> routers) { for(int i=0;i<routers.length();i++) { scene->additem(new link(routers.at(i),routers.at(i+1))); } } your loop: for(int i=0;i<routers.length();i++) goes through every single router in list, add link each router router directly after it. means last router, trying add link 1 doesn't exist. try changing loop to: for(int i=0;i<routers.length() - 1;i++) so add links between existing routers.

PHP not found when i run on eclipse PDT -

im doing app needs server databases , code take data them. have functions coded in php. example, have project called "api_kirolapp" contains php files one: <?php /*mejoras de escalabilidad. ahora la lista de países puede ser actualizada según se añadan países con deportes.*/ //recoger información para query: $continentid= 1; //$_get['idcontiente']; //el id del continente es columna de paises echo "hola \n"; //iniciamos la solicitud de información $server = "127.0.0.1:3306"; $conn = mysqli_connect($server, "root", "root", "kiroldb_v2",3306); $query = "select * kiroldb_v2.pais continente_idcontinente=$continentid"; $result = mysqli_query($conn, $query); $countries = array(); $i = 1; if(mysqli_num_rows($result) != 0){ $countries[0] = 'success'; while($row = mysqli_fetch_array($result)){ $countries[$i] = $row['nombre']; $i++; } return json_encode($countries); }else{ $countries...

Placing elements in horizontal layout (android) -

Image
i want place imageview on center of screen , imagebutton on right of imageview, see screen . how can this? tried horizontal linear layout , gravity: center both elements on center. thanks in advance :) the idea use relativelayout. set imageview in center of parent. put imagebutton on right of it. see example: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:orientation="vertical"> <textview android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#ff00ff00" android:text="text1...

plot - seaborn/Matplotlib export EPS causes "falling back to Agg renderer" -

consider mwe below. cause (seaborn 0.7.1, matplotlib 1.5.1): /usr/local/lib/python3.5/dist-packages/matplotlib/tight_layout.py:222: userwarning: tight_layout : falling agg renderer warnings.warn("tight_layout : falling agg renderer") how fix this? mwe import matplotlib matplotlib.use('ps') import pandas pd import random import seaborn sns import matplotlib.pyplot plt ds = pd.dataframe() ds['x'] = random.sample(range(1, 100), 25) ds['y'] = random.sample(range(1, 100), 25) p = sns.jointplot(x = ds['x'],y = ds['y'],linewidth=1,edgecolor='black',alpha=0.3,stat_func=none) plt.savefig("test.eps")

javascript - converting json data in angularjs module into array and plot using c3 chart -

i generate x-y plot based on json data feed using angularjs. json data shown in code below (eq magnitude vs time). how can convert data array format , plot in c3 chart (such 1 in link http://c3js.org/samples/data_json.html )? thank help. var array1 = []; var app = angular.module('myapp',[]); app.controller('eqfeed',function($scope,$http){ $http.get("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_day.geojson").then(function(response) { $scope.eq=response.data.features; }); }); <!doctype html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <body> <div ng-app="myapp" ng-controller="eqfeed"> <table> <tr ng-repeat="x in eq"> <td>{{x.properties.time | date:'yyyy-mm-dd hh:mm:ss'}}</td> <td>{{x.properties.mag}}...

loops - C programming language exercise 2-4: I dont understand the answer -

i saw answer in web , doesn't understand how can work loop. , why mine won't work.the question : write alternate version of squeeze(s1,s2) deletes each character in string s1 matches character in string s2 . think should check each char in s1 doesn't match every character in s2 . see character in s1 , loop through s2 see if matches char in s1 , move on next char in s1 . outside loop s1 , inner loop s2 . here's code , put in whole code test it. output correct. code function part. don't understand why put s2 in outside loop , works. #include <string.h> #include <stdio.h> void squeeze2(char s[], char t[]); void squeeze2(char s[], char t[]) { int i, j, k; (k = 0; t[k] != '\0'; k++) { (i = j = 0; s[i] != '\0'; i++) if (s[i] != t[k]) s[j++] = s[i]; s[j] = '\0'; } } int main() { char s1[] = "hello meow meow princess"; char s2[] = { 'a', ...

wpf - C# STAThreads not being cleaned up - OutOfMemory exception -

i have console application takes input folder, picks files in folder , process them. processing sequentially , each document launches separate stathread runs wpf dependent action inside it. the application manages process ~1k documents before getting outofmemoryexception , throwing error because dispatcher null. looking processexplorer can see that: there aren't running/hanging .net threads there ~49k handles allocated when crashes out of these 4k thread handles questions: what cause thread handles not released (i can see them being created , deleted live in procexplorer doesn't seem keep rate they're being created). how see 49k handles ? processexplorer shows 5k items - rest of them? how can workaround outofmemory exception? understanding entire process dies because ends allocating memory , causing fragmentation. tried separating threads via appdomains + calling gc forcefully nothing changed.

c# - How to properly set a Datagrid's ContextMenu's databinding (MVVM Light) -

can please take @ xaml , please tell me why command on menuitem not work. assume there error in datagrid's tag binding, however, can't seem wrap head around going on. on side note understand context menus not share same visual tree. understand if set contextmenu datacontext of window, works expected. i'm trying understand why placementtarget.tag binding not work expected. in advance. the view looks like: <window x:class="wpfapplication8.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:wpfapplication8" xmlns:diag="clr-namespace:system.diagnostics;assembly=windowsbase" mc:ignorable="d" ...

ios - Can't I downcast inside a switch ? (Swift 3) -

i have 2 segues in same prepareforsegue, 1 connects uiviewcontroller subclass , other connects uicollectionviewcontroller subclass. i'm trying use switch/case polymorphism set destinationviewcontroller downcast inside switch not visible outside it, keeps seeing var uivc declared originally. doing wrong here ? error "value of type 'uiviewcontroller' has no member 'context'" let identifier: string! var destinationtest: uiviewcontroller! switch identifier { case "add exercise": destinationtest = segue.destination as! addexerciseviewcontroller case "addexerciseincollectionview": destinationtest = segue.destination as! addexercisecollectionvc default: break } destinationtest.context = self.context as rmaddy said, have declared destinationtest uiviewcontroller , though assigning specific uiviewcontroller subclasses inside switch, compiler knows destinationtest uivie...

swift - iOS Constraints of image view inside table view cell gets misplaced on scroll -

Image
the constraints image view inside table view cell gets distorted on scroll. the constraints fine on initial load , view. once table view cell goes out of view , scroll it, image view gets displaced. this screenshot of single tableviewcell. globe icon misplaced original spot (left of name , designation) , overlaps on text below. screenshot of prototype cell storyboard the black lines show constraints added on storyboard. using xcode 8.0 swift 3. doing wrong constraints ? it seems missing height constraint on image view. should able fix problem if add that. also, maybe related well, can set image view's content mode aspect fit? sometime this: objc [self.imageview setcontentmode:uiviewcontentmodescaleaspectfit]; swift self.imageview.contentmode = .scaleaspectfit

python - read a existing csv file in flask and then download it through browser -

i have existing csv file downloaded server desktop using python script. want modify code, or write new 1 download same csv file when user access link in browser. how using flask ? import os import csv flask import flask, make_response app = flask(__name__) w_open=open(filename,'r') @app.route('/csv/') def download_csv(): csv = w_open response = make_response(csv) cd = 'attachment; filename=rosterunified.csv' response.headers['content-disposition'] = cd response.mimetype='text/csv' return response if __name__=='__main__': app.run()

dataframe - suppress repeated values in a column in a data.frame in r -

i have simple data.frame mydf <- read.csv("mydf.csv") mydf soc preferred.term serious non.serious cardiac disorders dizziness 0 0 cardiac disorders dizziness postural 0 1 cardiac disorders palpitations 0 0 cardiac disorders dyspnoea 0 1 cardiac disorders oedema peripheral 0 0 eye disorders lacrimation increased 0 3 eye disorders eye pain 0 0 eye disorders mydriasis 0 0 eye disorders vision blurred 0 0 eye disorders visual impairment 0 1 ...

javascript - How to compare a list of classes against other classes in html? -

i save list of classes attached element click this: function oneachfeature(feature, layer) { layer.on({ click: panelshow }); } function panelshow(e) { $("path").removeclass("active"); this.getelement().classlist.add("active"); function staticclasslistcopy(element) { var dummy = document.createelement('div'); dummy.classname = element.classname; return dummy.classlist; } } i have list of buttons classes this: <button class="1600 1500"></button> <button class="1600 1300 1200"></button> <button class="1300 1200 1700 1800"></button> <button class="1300 1200 1100 1900"></button> now need compare if in saved list there class matches classes on buttons , if so, add .active class matching buttons. jquery has toggleclass feature, , sounds trying do. $('button').toggleclass('act...

java - Run main in a project from EAR project -

i working on ear project jboss eap 6.4, , need run lines of code upon deployment of project. trying add project belonging ear project, java main class, , setting on project on run/debug settings. not working. so question is, how can run main class, or piece of code upon ear project deployment. thanks!! if want run lines of code upon deployment of project can use following options: (1) override servletcontextlistener methods, contextinitialized(servletcontextevent sce) method invoked automatically during server start up. this preferable approach. (2) use code inside servlet init (), called during servlet initialization time (3) use static initializer main class run code during class loading time of server container. the preferred approach option(1), can here servletcontextlistener

arrays - Javascript to select all <h3>'s, get their length, add class if greater than 30 characters -

i have site created using joomla, , i've created blog layout using masonry. right columns using same width it's masonry 3 columns of width. want create function can grab "h3.g-item-title" , store them array; want able use length property determine length of each h3; want test if length of characters greater 30, if so, add additional class h3's parent div in css can create second class give articles longer titles greater width in masonry. in theory understand how execute each step, putting them getting lost (new learning javascript). in english, here steps believe need, can please critique thinking if needed , me code out? create array variable stores h3's desired class. then need test length of each of these h3's , store value each correct title. then need test if h3 has greater length 30 characters, , if so, add additional class it, if it's not greater 30, nothing added. here's markup of each article show div structure , class names:...

c++ - Avoid copying complex data in class constructor -

lets have class, , 1 of member variables complex class. want avoid creating copy of complex class, want use in class. whats best way organize myclass? at moment have this: class myclass { public: myclass(const complexclass& complex_class) : m_class(complex_class) {} private: const complexclass& m_class; // best practice here? }; can this? or maybe m_class should pointer? or in situation? if can guarantee passed reference valid during object lifetime solution enough. if not recommend using smart pointer e.g. shared_ptr extend lifetime of passed data. (note not have reorganize class declaration of complex_class object)

cordova - Phonegap push plugin stopped working after added crosswalk plugin -

i'm developing using ionic , i'm facing odd problem, after added crosswalk webview plugin phonegap push plugin stopped work. i got "errors", if can call them that: ionic.cloud.min.js:6 native: deviceready did not fire within 2000ms. can happen when plugins in inconsistent state. try removing plugins plugins/ , reinstalling them. cordova.js:1223 deviceready has not fired after 5 seconds. cordova.js:1216 channel not fired: oncordovainfoready cordova.js:1216 channel not fired: onfilesystempathsready ionic.cloud.min.js:6 ionic insights: device information unavailable. index.html#/login:1 deferred long-running timer task(s) improve scrolling smoothness. see crbug.com/574343. and doesn't works anymore. here cordova plugin list: cordova plugins cordova-plugin-compat 1.0.0 "compat" cordova-plugin-console 1.0.4 "console" cordova-plugin-crosswalk-webview 2.1.0 "crosswalk webview engine" cordova-plugin-devi...

jquery - Bootstrap Active Menu Changes Navbar Height -

i added 2px border-bottom active menu(bootstrap). because of that, navbar resizes automaticaly. example: navbar 70px height , after adding 2px border-bottom, navbar resizes 72px. know how block that. tried min/max-height doesn't work. <div class="collapse navbar-collapse navbar-right" id="nbar-collapse"> <ul class="nav navbar-nav"> <li><a class="active-page" href="#">home</a></li> <li><a href="#">host2</a></li> <li><a href="#">host3</a></li> </ul> </div> .active-page { border-bottom: 2px solid #f40612; } tried this? .navbar-right { height: 68px; border-bottom: 2px solid #f40612; } or .navbar-right { height: 70px; } .navbar-nav li { background-color: #f40612; padding: 0; margin: 0; padding-bottom: 2px; } .navbar-nav li { margin: 0;...

node.js - Get all network interfaces with node -

how network interfaces , ip address, mac addresses, state, , it's master interface. os.networkinterfaces() won't work, because doesn't report interfaces down, or don't have ip addresses, , doesn't return state ( up / down /etc) or master interface. var shell = require('shelljs'); var interfacecard = shell.ls('/sys/class/net'); this interfacecard has list of network interfaces output [ 'eth0', 'eth1', 'lo', **stdout: 'eth0\neth1\nlo\n',** stderr: null, code: 0, cat: [function: bound ], exec: [function: bound ], grep: [function: bound ], head: [function: bound ], sed: [function: bound ], sort: [function: bound ], tail: [function: bound ], to: [function: bound ], toend: [function: bound ], uniq: [function: bound ] ] interfacecard=interfacecard.**stdout**.split('\n'); interfacecard = eth0, eth1, lo

javascript - Scrapy returning empty list for xpath -

i using scrapy abstracts openreview urls. example, want abstract http://openreview.net/forum?id=bk0fwvcgx , , upon doing $ scrapy shell "http://openreview.net/forum?id=bk0fwvcgx" $ response.xpath('//span[@class="note_content_value"]').extract() i [] . in addition, when view(response) lead blank site file:///var/folders/1j/_gkykr316td7f26fv1775c3w0000gn/t/tmpbehkh8.html . further, inspecting openreview webpage shows me there script elements, i've never seen before. when call response.xpath(//script).extract() things u'<script src="static/libs/search.js"></script>' example. i've read little bit having javascript, i'm kind of beginner scrapy , unsure how bypass , want. i found page uses javascript/ajax load information address http://openreview.net/notes?forum=bk0fwvcgx&trash=true but needs 2 cookies access information. first server sends cookie gclb . later page loads http://openrevie...

extjs - Binding a window button to form validation -

i'm trying use formbind: true on button enable/disable on modal window according validation state of form. i want user have confirm accreditation number, , validation working reasonably. can't bind button state of validation. i've tried wiring event handlers on text fields manually handle this, no event handlers fire. see fiddle running code: https://fiddle.sencha.com/#fiddle/1jrj ext.define('myapp.view.util.dialogs.accreditation', { extend: 'ext.window.window', title: '', config: { name: '' }, modal: true, initcomponent:function() { var me = this; this.title = this.name + ' accreditation'; var accreditation1 = new ext.form.textfield( { fieldlabel: 'accreditation', growmin: 250, allowblank: false }); // doesn't fire // accreditation1.addlistener('activate', function(dis , eopt) {ext.msg....

matlab - Why doesn't `spdiags` put a vector in the correct place? -

i have vector has 1 's in places, , want create diagonal using vector. vector called one_vec_two : n = 4; one_vec_two = zeros(n*n, 1); one_vec_two(1,1) = 1; k=0:(n-1) one_vec_two(k*n+1, 1) = 1; end non_zero_vecs = [one_vec_two]; placement = [n-1]; = spdiags(non_zero_vecs, placement, n*n, n*n); fulla = full(a); disp(a) the first element of vector one_vec_two 1: >> one_vec_two(1) ans = 1 and, placed vector starting @ diagonal n-1 , 3 . but, when go column 4, don't see it: >> fulla(1,4) ans = 0 why isn't matlab putting vector in correct spot? as per doc spdiag , note in syntax, if column of b longer diagonal replacing, , m >= n, spdiags takes elements of super-diagonals lower part of column of b, , elements of sub-diagonals upper part of column of b. it placing lower part of vector location specified. hence result expected. it looks want like a = spdiags(non_zero_vecs([end-placement+1:end 1:end-placeme...

java - Debug Error: Exception is never thrown in body of corresponding try statement -

i have debug assignment class cannot seem figure out. told debug assignment output assignment looks such. output: there problem eagle! java result: 9999 the code given follows: //superclass custom exception. public class eaglelandingexception extends exception { public eaglelandingexception(string msg) { super(msg); } } and main class public class throweagleexceptiontest { public static void main(string[] args) { try { eaglelanding(); } catch (eaglelandingexception badeagle) { system.out.printf("%s\n", badeagle.getmessage()); system.exit(9999); } } private static void eaglelanding () { eaglelandingexception("there problem eagle!"); system.exit(9999); } i error "the exception never thrown" @ line catch (eaglelandingexception badeagle) and receive "cannot find symbol" error on line eaglelandingexception("there problem eagle!"); i don't under...

python 3.5 - How to decode json data from api which contains unicode in python3? -

the data format shown in browser like: "photos" : [ { "height" : 3456, "html_attributions" : [ "\u003ca href=\"https:xxxx" ] } ] when try put json file, pops error unicodeencodeerror: 'ascii' codec can't encode character , how should deal thing? please give me code example. thankssssssss!

geospatial - Issue with coordinate projection for detecting spatial autocorrelation in R -

we have dataset contains latitude , longitude coordinates, attribute information, each in own separate column, stored numeric. these coordinates have been geocoded based on geographic coordinate system wgs 1984. know have significant spatial autocorrelation in our data, hoping visualize in bubble plot using “sp” package. modeling our example off of others online, such here: https://beckmw.wordpress.com/2013/01/07/breaking-the-rules-with-spatial-correlation/ . however, when try use coordinates command within "sp", keep getting error message: code example: coords <- data.frame(lead$x, lead$y) coordinates(coords) <- c("lead6.x","lead6.y") error in if (nchar(projargs) == 0) projargs <- as.character(na) missing value true/false needed we can't load our direct code because it's sensitive , hosted on virtual environment without access internet. have ideas why might happening? we've looked proj4 package can't figure out how sp...

specifications - Is a colon a legal first character in an XML tag name? -

according w3c xml recommendation , start tag-names have definition: stag ::= '<' name (s attribute)* s? '>' ..where name is: name ::= namestartchar (namechar)* namestartchar ::= ":" | [a-z] | ... ..(n.b., states colon can appear first character) suggesting following valid xml document: <?xml version="1.0" ?><:doc></:doc> ..but parser try in shows colon formatting error. also, under appendices b (though depreciated part of document) explicitly states: characters ':' , '_' allowed name-start characters. ..and: <?xml version="1.0" ?><_doc></_doc> ..is accepted xml parsers i've tried. so, colon valid first character in tag-name, , parsers i'm using wrong, or reading specification wrong? yes, @ base xml level, colon ( : ) allowed name-start character. bnf rules cite specify this. however, w3c xml recommendation clear colons should not used...

How to idomatically set the version number in a CMAKE/CPACK project? -

i'm trying edit cpack settings outputted package file has correct version number in it. that's not all. i'd cmake/cpack have places version number updated set. .so file should set. , whatever else needs it. from sit, cpack documentation appears telling us repeat ourselves. if nothing, output file so: mystuff-0.1.1-linux.tar.gz let's version number should 1.2.3. i think minimalistic cpack settings cause version numbers changed -- , placed these lines in cmakelists.txt file: set(cpack_package_description_summary "my app great") set(cpack_package_vendor "my name") set(cpack_package_description_file "${cmake_current_source_dir}/readme.md") set(cpack_resource_file_license "${cmake_current_source_dir}/license") set(cpack_package_version_major "1") set(cpack_package_version_minor "3") set(cpack_package_version_patch "2") when build, output file still mystuff-0.1.1-linux.tar.gz if r...

python - Regenerating Public and Private Key based on modulus and public exponent -

i've got started towards learning how rsa works , overall in cryptography , i've got question. lets have rsa modulus , public exponent of public key: n = aa18aba43b50deef38598faf87d2ab634e4571c130a9bca7b878267414faab8b471bd8965f5c9fc3818485eaf529c26246f3055064a8de19c8c338be5496cbaeb059dc0b358143b44a35449eb264113121a455bd7fde3fac919e94b56fb9bb4f651cdb23ead439d6cd523eb08191e75b35fd13a7419b3090f24787bd4f4e1967 e = 65537 and trying follow guide generate public , private key: https://warrenguy.me/blog/regenerating-rsa-private-key-python my question is, how can literally both private key , public key ? if convert n integer form, get: 119445732379544598056145200053932732877863846799652384989588303737527328743970559883211146487286317168142202446955508902936035124709397221178664495721428029984726868375359168203283442617134197706515425366188396513684446494070223079865755643116690165578452542158755074958452695530623055205290232290667934914919 and doesn't match integer...

c++ - Binary to Octal -

how write code converters input file of binary numbers octal. had write code converts decimal did, i'm supposed write code converts octal grouping binary numbers in groups of 3 , calling binary decimal function. for example 10100 grouped 10 | 100. i'd call binary decimal on 10 , 100 , 2 10 , 4 100, place numbers 24, 10100 decimal in octal. however, cannot figure out how group numbers. (the number type string way). tips thanks. simply add leading zeroes string if length not divisble 3 group them , convert octal.

How to use SoapUI's xml in php -

i have soapui working xml, need consume data on server using php 5.3. think need convert $string array. $xml = (array)simplexml_load_string($string); isn't throwing errors, response call null. $string = ' <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tran="http://www.cornerstoneondemand.com/webservices/transcriptandtask"> <soapenv:header> <wsse:security soapenv:mustunderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:usernametoken wsu:id="usernametoken-115e54b97689076253912"> <wsse:username>me</wsse:username> <wsse:password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#passwordte...

Validation error on Nu HTML Checker: "Bad value radio for attribute type on element input." -

i getting error error: bad value radio attribute type on element input. when trying validate following html on https://validator.w3.org/nu/#file <fieldset> <p class="city" id="citypref">generally, prefer live in...</p> <br> <label for="la" id="lalabel"> <br> <input type="radio" name="city" id="la" value="la" aria-required="false" aria-labelledby="lalabel" role="radiogroup" >los angeles, california</label> <br> <label for="boston" id="bostonlabel"> <input type="radio" name="city" id="boston" value="boston" aria-required="false" aria-labelledby="bostonlabel" role="radiogroup" >boston, massachusetts</label> <br> <label for="both" id="bothlabel"> <input type="radio...

batch file - How to convert text to an image? -

i'm trying make human verification system site, , need way turn text (e.g. what's twelve+3? ) image (e.g. example image )... idea how on windows command prompt? (i using batch-files cgi scripts) p.s. third-party tool fine. from google search looks imagemagick want. have downloads windows, mac , linux. download windows portable or dll versions, depending on if want use dll only. command tutorial want: convert -background white -fill gray -pointsize 36 -size 320x caption:'this long caption line.' caption.gif you can change options fit need. imagine substitute variable text need converted, can use @ symbol pipe in file source. http://www.imagemagick.com

android vision ORC java.lang.RuntimeException: takePicture failed when call mCameraSource.takePicture inside Handler -

i using android vision orc api develop example. example is: after text recognized in ocrdetectorprocessor.receivedetections() send handler message in ui activity. inside handler, want take picture, there error in case 11-06 00:12:43.932 15916-15916/com.google.android.gms.samples.vision.barcodereader e/androidruntime: fatal exception: main process: com.google.android.gms.samples.vision.barcodereader, pid: 15916 java.lang.runtimeexception: takepicture failed @ android.hardware.camera.native_takepicture(native method) @ android.hardware.camera.takepicture(camera.java:1523) ...

c# - Selenium - Output to console in Test Method -

i new selenium, , use (webdriver 3.0) in .net unit test project, ie. great if output debugging information during test case running. i found these questions on stackoverflow: how write console.out during execution of mstest test , selenium webdriver, c# output console after opening driver , selenium c# - test output not appears in console window . most people said system.diagnostics.debug.writeline() job. however, doesn't work in case. run test cases in following way: right click on asp.net project, select view -> view in browser (internet explorer). go menu: test -> run -> tests i wondering if should run tests in way? thanks much. btw: console.writeline() not work either.

hadoop - Flink thowing serialization error when reading from hbase -

when read hbase using richfatmapfunction inside map getting serialization error. trying if datastream equals particular string read hbase else ignore. below sample program , error getting. package com.abb.flinktest import java.text.simpledateformat import java.util.properties import scala.collection.concurrent.triemap import org.apache.flink.addons.hbase.tableinputformat import org.apache.flink.api.common.functions.richflatmapfunction import org.apache.flink.api.common.io.outputformat import org.apache.flink.api.java.tuple.tuple2 import org.apache.flink.streaming.api.scala.datastream import org.apache.flink.streaming.api.scala.streamexecutionenvironment import org.apache.flink.streaming.api.scala.createtypeinformation import org.apache.flink.streaming.connectors.kafka.flinkkafkaconsumer08 import org.apache.flink.streaming.util.serialization.simplestringschema import org.apache.flink.util.collector import org.apache.hadoop.hbase.hbaseconfiguration import org.apache.hadoop.hbase....

emacs - Spacemacs multi-term command cannot insert text in existing text -

Image
i using spacemacs, whenever try insert text in existing text input redirected end of existing text. see screenshot above, trying insert -rf between rm , donate instead redirect -rf end of string.

Spell corrector not working properly in Python -

i have problem autocorrect module, in particular function spell(word): here there's class use class spellcorrector(preprocessmodule): def process(self, text): result = "" word in text.split(): result = result + spell(word) + " " return result the test is: st = "ehi thia ia beautiful dau" w in st.split(): print(spellcorrector.process(w)) and output is: "eh thia ia beautiful dau" so, seems not work well, , remarkably slow. for of have used module "autocorrect" in python, normal? forgetting something? suggestion on other spell checkers? thanks in advance what recommend use peter novig's spell correction. uses probability theory below code first check if english word or not. if not goes correction method belongs peter's algorithm def spell_correct(text): try: output = "" splited_words = text.split...