Posts

Showing posts from August, 2013

json - How to programmatically download website sources? -

i need download data feed website: http://www.oddsportal.com/soccer/argentina/copa-argentina/rosario-central-racing-club-hnmq7geq/ in chrome using developer tools able find link http://fb.oddsportal.com/feed/match/1-1-hnmq7geq-1-2-yj45f.dat which contains need. question how programmatically (preferably in java) second link when know first. thanks in advance useful help. this quite similar issue . can use string sources. search string find you're looking for. can this. first start chromedriver , navigate page wish scrap. webdriver driver = new chromedriver(); driver.get("http://www.oddsportal.com/soccer/argentina/copa-argentina/rosario-central-racing-club-hnmq7geq/"); then download sources string string scripttoexecute = "var performance = window.performance || window.mozperformance || window.msperformance || window.webkitperformance || {}; var network = performance.getentries() || {}; return network;"; string netdata = ((javascript

Unable to get property 'options' in javascript -

i have javascript codes here : function setoptdcsn(objid, objsrc){ var optobj = document.getelementbyid(objsrc); var newcbo = document.getelementbyid(objid); var i; var cntopt=1; (i=0; i<optobj.options.length; i++) { newcbo[cntopt] = new option(optobj[i].innerhtml,optobj[i].value); cntopt++; } } but, when call function, says error: unable property 'options' of undefined or null reference. error: unable property 'options' of undefined or null reference. this means optobj null , implication document.getelementbyid(objsrc); null , therefore , element id objsrc not exist.

javascript - Debugging with chrome with es6 -

Image
i trying use ecmascript 2015 project , finding hard add breakpoints @ specific places (places thought logical have breakpoint). i have #enable-javascript-harmony flag in chrome set true (if helps), using babeljs transpile , have sourcemaps directly set breakpoints in file want debug. doing wrong can point me making mistake. for reference have added gif of talking about. the problem source code (via source maps) real code mapping. while source concise , dense, generated code typically longer , mapping between 2 isn't (and cannot be) done in way guarantee 1:1 relationship between two. so when try place breakpoint in single line statement such (foo) => bar , actual executed code @ least few lines long , assume (and don't know!) devtools tries place real breakpoint on first line of real, running code. - in turn fails expressions. it inherent disadvantage of generated code , applies compile-to-js languages source maps. unfortunately, i'm not aware of w

Change in behaviour of declare/local from bash 4.2 to 4.3 -

i've updated system , got new bash version. since i've encountered nasty behaviour of bash scripts, managed track down new behaviour of bash's declare / local commands. considering following minimal working example: #!/bin/bash function printarray1 () { local -a arr=("${!1}") echo "${arr[@]}" # printing complete array echo "${arr[9]}" # check if recognized integer indexed array } function printarray2 () { local arr=("${!1}") echo "${arr[@]}" # printing complete array echo "${arr[9]}" # check if recognized integer indexed array } arr=("01" "02" "03" "04" "05" "06" "07" "08" "09" "10") echo "declaration indexed array:" printarray1 arr[@] echo "undefined declaration:" printarray2 arr[@] on gnu bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) results in declaration

meteor mongodb limit return only id -

i want limit number of post query db.posts.find({}); i got posts. want first 10 posts i've done this. db.posts.find({}, {limit: 10}); but instead of having 10 posts, return id posts it looks you're doing in mongo shell rather in meteor app directly. limit syntax differs between 2 environments: mongo shell ( docs ): db.posts.find().limit( 10 ) meteor js: posts.find({},{limit: 10});

how to render a php page as a png image using data uri -

i've data uri of png image, i've stored data uri in mysql data base. lets img.php file returns png image <?php $id=$_get['id]; //data base connection , mysql queries $data = "data:image/png;base64,ivborw0kggoaaaansuheugaaaoaaaadmcayaaabqq6+saaaen0leqvr4xu3tuqkaibafqc1ihsoaumes+znx4mfwo9fzdzgcbbkbkcde3siblybaj0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjibap0agfbbgig+agad9aifqqiahvmkcavqdbeibayb4pgki0a8qcauegokbjib

performance - Xcode 7 slow and sluggish -

since upgrading xcode 7 , greater, performance of xcode terrible. when click on class or scroll code pane takes 30 seconds before reacting , need force quit xcode , restart. i have turned off source control , not using swift. i have new macbook pro 8gb memory , ssd. computer fast , has no other performance issues. -update- have cleared derived data , not using unusual plugins does know may problem? imagine build setting causing im not sure which. the issue totally xcode 7. try commit/save every time make changes, increase performance

weblogic12c - Caused by: java.lang.ClassNotFoundException: weblogic.application.descriptor.MungerLogger -

i deploying in weblogic got error: exception in thread "main" java.lang.noclassdeffounderror: weblogic/application/descriptor/mungerlogger [java] @ weblogic.application.descriptor.abstractdescriptorloader2.getdescriptorbeanfromreader(abstractdescriptorloader2.java:823) [java] @ weblogic.application.descriptor.abstractdescriptorloader2.createdescriptorbean(abstractdescriptorloader2.java:413) [java] @ weblogic.application.descriptor.abstractdescriptorloader2.loaddescriptorbeanwithoutplan(abstractdescriptorloader2.java:779) [java] @ weblogic.application.descriptor.abstractdescriptorloader2.loaddescriptorbean(abstractdescriptorloader2.java:792) [java] @ weblogic.servlet.internal.webappdescriptor.getwebappbean(webappdescriptor.java:142) [java] @ weblogic.servlet.jsp.jspc20.initdescriptors(jspc20.java:537) [java] @ weblogic.servlet.jsp.jspc20.runbody(jspc20.java:273) [java] @ weblogic.utils.compiler.tool.

php - Convert Multidimensional Array to Single -

i using yii2 php framework , have query in accessing users in db: $allusersquery = new query; $allusersquery->select(['_id'])->from('user')->where([ 'parent' => new \mongoid($session['company_owner']) ]); $allusers = $allusersquery->all(); when var_dump $allusers array, gives me output: array (size=5) 0 => array (size=1) '_id' => object(mongoid)[147] public '$id' => string '55d5a227650fc90c35000044' (length=24) 1 => array (size=1) '_id' => object(mongoid)[148] public '$id' => string '55d5a22a650fc90c35000047' (length=24) 2 => array (size=1) '_id' => object(mongoid)[149] public '$id' => string '55d5a22a650fc90c3500004a' (length=24) 3 => array (size=1) '_id' => object(mongoid)[150] public 

key value - Iterative querying the ArangoDB using AQL -

i have stored json data in arangodb collection in following format. { "data": { "1": [ {"db_name": "dsp"}, {"rel": "2"} ], "2": [ {"rel_name": "datasource"}, {"tuple": "201"}, {"tuple": "202"}, {"tuple": "203"} ], "201": [ {"src_id": "pos201510070"}, {"src_name": "postgres"}, {"password": "root"}, {"host": "localhost"}, {"created_date": "20151007"}, {"user_name": "postgres"}, {"src_type": "structured"}, {"db_name": "postgres"}, {"port": "none"} ], "202": [ {"src_id": "pos201510060"}, {"src_name": "postgres"},{"password": "root"}, {"host": "

android - How to import a cordova apache plugin in IBM worklight? -

i have cordova apache plugin. dn't know how import file mfp. idea? thanks since worklight not support cordova's plug-man install cordova plug-ins, can follow instructions provided in following blog post, detailing steps needed take in order manually add plug-in in way work. note may differ plug-in plug-in: https://developer.ibm.com/mobilefirstplatform/2015/08/03/integrating-3rd-party-cordova-plug-ins/

c - Close a socket from the main thread -

i'm implementing p2p file transfer peer , tracker. tracker keeps track of peers , files, , peer connects peer when wanting download file , accepts requests other peers download 1 of files. this, peer acting both client , server other peers, , client tracker. so, using threads , have server process in 1 thread, client process in another, , 1 connecting tracker in main thread. when peer chooses exit, want close server process ie: process in separate server thread. tried making global variable containing file descriptor can close when client exits, giving me error after exit. here peer code: if want know how stop other threads main thread here 1 method. create struct let's call thread_state_t has flag tells threads stop, call active example. in thread check in loop value , whatever need based on state. in simple case this #include <stdio.h> #include <pthread.h> typedef struct { int active; } thread_state_t; void* t1(void* arg) { thread_st

Artisan Laravel Unexpected end of file when making controller -

i following pluralsight tutorial on laravel , @ point need add controllers. put command work artisan: c:\wamp\www\laravel>php artisan make:controller productcontroller and get: [symfony\component\debug\exception\fatalerrorexception] syntax error, unexpected end of file i have no idea wrong new laravel / artisan, appreciated. edit: installed laravel way composer create-project laravel/laravel --prefer-dist probable fix: check syntax... didn't realize stop artisan.

What is the meaning of apache camel Unit Of Work? -

i new camel , trying understand concept of uow in apache camel. can shed light on this? an object representing unit of work processing "exchange" allows use of synchronization hooks. object might map one-to-one transaction in jpa or spring, or might not.

html - Collapsed Navbar no longer appears, what happened? -

i using carousel template page , comes code navbar collapses when screen width less px size. , using brackets live preview , navbar collapse properly. i made changes carousel , font sizes in nav bar. when screen width small, nav bar doesn't show individual list items (as expected) button collapsed nav doesn't appear. i using chrome view it. http://getbootstrap.com/examples/carousel/ edit: figured out happened. i changed following auto fixed width of 1000px. caused dropdown button show way off page when small width. .navbar-wrapper .navbar .container { width: auto; } in order fix this, added above code (but set 1000px) in media query section of css applies larger width screens. i figured out happened. i changed following auto fixed width of 1000px. caused dropdown button show way off page when small width. .navbar-wrapper .navbar .container { width: auto; } in order fix this, added above code (but set 1000px) in media query section of css app

node.js - NODEJS - mysqlPool.getConnection - calling stored proc within MYSQL - out return value -

i have stored proc in mysql working fine. trying call nodejs. how out value of stored proc in nodejs? mysqlpool.getconnection(function(error,conn){ conn.query(" set @p1 = '" + p_member_id + "' ; " + " set @p2 = '" + p_member_id_test + "' ; " + " set @p3 = @insertresults'" + "' ; " + "call proc_member_insert(" + " @p1 , " + " @p2 , " + " @p3 )", function(error,results) { if (error) { console.error(error); throw error; }else{ console.log(results); res.status(200).jsonp({insertresults:test[2][0]}); }; }); conn.release(); }

node.js - base64 images not displaying in Outlook when using ejs + emailjs -

i'm using mix of ejs , emailjs send out emails in node.js app when various events happen. i'd embed base64 image (a small logo) email when sends, both outlook , gmail (plus inbox google) fail render image. i'm using bit of code find mime type of image , put base64 string: myapp.prototype.imagetobase64 = function(image) { var mime = require("mime") file = fs.readfilesync(__dirname + "/images/" + image, { encoding: 'base64'}) return 'data:' + mime.lookup(image) + ';base64,' + file; } that works great, because i'm able copy , paste resulting string right browser , see image. when send email via emailjs, outlook converts + s &#43; . when "view original" in gmail, base64 split 'chunks'. each chunk on newline , each line ends = . if take gmail's version , remove = , newline paste browser, whole picture loads perfectly, refuses load anywhere else, regardless of whether user in contact list

ios - Swift - Bridging header failed. '*' does not have a member named '*' -

i develop app using commoncrypto library. problem can create instance in swift file. object created using objective- c. seems can't create bridging header well. error message /users/mnurdin/documents/ios/xxxxx/models/main.swift:15:9: 'customobject' not have member named 'encrypt' customobject.h #import <foundation/foundation.h> #import <commoncrypto/commoncrypto.h> #import "gtmbase64.h" @interface customobject : nsobject + (nsstring*)encrypt:(nsstring*)plaintext withkey:(nsstring*)key; @end customobject.m #import "customobject.h" @implementation customobject + (nsstring*)encrypt:(nsstring*)plaintext withkey:(nsstring*)key{ /*--*/ return result; } @end global.swift var instanceofcustomobject: customobject = customobject() println(instanceofcustomobject.encrypt("p@$$w0rd","12345678")) please advice. thank you. the initial + in declaration indicates that + (nsstring*)encrypt:

performance - Why use a compile_pattern for binary:replace? -

is there documentation states why 1 should use compile_pattern/1 result pattern binary:replace/4 search for? i suspect it's performance reasons can't find official states such. i don't know of documentation explicitly states either, yes, it's performance reasons. if pass non-compiled pattern calls in binary module, compile pattern , use it. means single use, compiling first doesn't matter since call compile anyway. if you're performing multiple matches or replacements using same pattern, makes sense compile once front , pass compiled pattern each of calls.

c++ - Can't get wxTaskBarIcon::CreatePopupMenu() to work -

according this documentation , you're supposed able override wxtaskbaricon::createpopupmenu() when user right-clicks icon, menu pops up. however, no matter do, cannot seem force wxwidgets execute damned method! @ point, i'm not sure if because i'm doing c++ inheritance wrong, or whether i'm using wxwidgets wrong. it's driving me crazy! #include <wx/taskbar.h> #include <wx/menu.h> #include <wx/string.h> class taskbaricon : public wxtaskbaricon { private: wxicon _icon; public: void settooltip(const std::string tooltip); protected: virtual wxmenu * createpopupmenu(); }; void taskbaricon::settooltip(const std::string tooltip) { wxstring wx_tooltip(tooltip.c_str(), wxconvutf8); this->seticon(_icon, wx_tooltip); } wxmenu * taskbaricon::createpopupmenu() { wxmenu * menu = new wxmenu(); menu->append(wxid_close, wxt("exit")); return menu; } the icon appears fine, tooltip correct, no mount of cl

Padding percent in container-fluid in Bootstrap -

Image
i'm try add padding-left , padding-right container-fluid in bootstrap. when reload page, padding work after end of loading page. (u use in project: bootstrap,razor, durandaljs, knockout, asp.net mvc) first page looks this: then, after 2-3 second, page becoming necessary code of global page: <div class="container-fluid"> <div class="row"> </div> <div class="row"> <div class="page-host" id="content-host" data-bind="router: { transition: 'entrance' }"></div> </div> this css style: .page-host { position: relative; left: 0; top:30px; right: 0; bottom: 0; overflow-x: hidden; overflow-y: auto; padding-left: 5% !important; padding-right: 5% !important; } how make container-fluid padding-left: 5% , padding-right: 5% when loading page? if add row need put column padding go normal. if there nothing inside of col, believe required. <div class=&

ios - Xcode push notification certificate -

i have update provision profile (added new users). generated new provision , set xcode. don't receive push notification , error code 8, meaning wrong certificates. do need update push certificates? upd: use production environment. wondering need update push notification certificate when update provision profile or independent. per apple documentation , error code 8 means invalid device token . it happens commonly when use test device token against apple apns production server or vice-versa. when build ios app have development , production profiles, device token different based on profile chose! edit : post op update - provisioning profile & push notification related things. push notification, open provisioning portal , go app ids section. find app , there 2 options configuring push notification, 1 development , production. if app under testing , development, use development , configure , in return certificate. placed on server send push notifications. th

angularjs - Two ng-inits not working -

i have 2 ng-inits located here. <div class="text-center"> <h3 style="font-size: 26px"> <editable ng-init="option={title:'event title here'};" model="option.title">{{option.title}}</editable> <!-- <editable model="option.title">{{option.title}}</editable> --> </h3> <h5> <editable ng-init="option={description:'event description here'};" model="option.description">{{option.description}}</editable> </h5> </div> what happens first ng-init ignored , second 1 used. need both used i have no idea why, wanting have both {{}} areas have placeholder, , way have found out how far. you overwriting object created in first ng-init 1 created in second ng-init. should either have upper ng-init initalize option object @ {

How to write JSON code from PHP in JavaScript file -

this employeeshift.js code , can't figure out how php code in javascript file this code inside employeeshift.js var inorno null $(document).ready(function(){ var inorno= "<?php echo json_encode($inorout ); ?>"; if(inorno=="0"){ $('.sales1').hide(); }else{ $('.sales1').show(); } }); rename js file php ....or past js code php file below <?php //some of main php file code .......... ?> <script type="text//javascript"> $(document).ready(function(){ var inorno= "<?php echo json_encode($inorout ); ?>"; if(inorno=="0"){ $('.sales1').hide(); }else{ $('.sales1').show(); } }); </script>

javascript - reslover function doesn't work for promise object in Node.js -

i'm trying use promise in node.js read files, return promise got {} . code bellow: http.createserver(function(req, res) { var readpath = __dirname + '/users.json'; readjsonfile(readpath).then(function(userlist) { insertuser(userlist); console.log("read ok", userlist); }, function(err) { console.log(err); }); }).listen(8888); function readjsonfile(readpath) { console.log("readjsonfile called"); var promise = new promise(function(resolve, reject) { fs.readfile(readpath, 'utf8', function(err, data) { if(err) { reject(err); } else { var json = json.parse(data); console.log("json ok", data); resolve(json); } }); }); console.log(promise); return promise; } the output is app-0 readjsonfile called app-0 {} app-0 json ok [...the json string...] i have no idea w

objective c - App thinning with deployment target set to iOS 6 -

to take advantage of app thinning feature came along ios 9, have use xcassets catalog in our project. however, document said: xcode 6 provides different functionality asset catalogs depending on deployment target project: for projects, individual images can loaded using set names. for projects deployment target of @ least ios 7 or os x 10.9, xcode compiles asset catalogs runtime binary file format reduces download time app. if deployment target set ios 7, assets catalog compiled .car file, while target of ios 6, images copied app bundle. so question is: if use assets catalog instead of bundles, let deployment target stay on ios 6, , upload app archive itunes connect, server app slicing devices running ios 9? if have @2x images in asset catalog, sliced app include images iphone 6 plus devices? thanks in advance! ok, after several tests, got answers. app slicing not applied if set deployment target ios 6. images in images.xcassets copied ap

django models - display existing values of databse into formfields -

how can data databse(sqllite) dropdown button , based on selected value retrive matching values on datagrid or in csv in django class analyzedfile(models.model): sha256 = models.charfield(db_column='sha256', max_length=64, blank=true) md5 = models.charfield(db_column='md5', max_length=32, blank=true) sha1 = models.charfield(db_column='sha1', max_length=40, blank=true) filename = models.charfield(db_column='filename', max_length=5000, blank=true) filelength = models.integerfield(db_column='filelength', blank=true, null=true) filetype = models.charfield(db_column='filetype', max_length=3, blank=true) fileentropy = models.charfield(db_column='fileentropy', max_length=50, blank=true) peidsig = models.charfield(db_column='peidsig', max_length=1000, blank=true) exeinfosig = models.charfield(db_column='exeinfosig', max_length=1000, blank=true) ssdeepsig = models.cha

Use variable inside Hugo content -

i'm trying use variable within content of hugo statically generated site. example, content looks following: go site's url ({{ .site.baseurl }}) enter credentials .....(blah blah blah) when gets rendered, {{ .... }} part doesn't processed...it stays same put above. i've tried '$' in front well. variables within templates seem work fine. need create shortcode use within content pages? so looks shortcode way this. it's worth, changed document following: go site's url ({{< siteurl >}}) in layouts/shortcodes , created file siteurl.html . looks following: {{ .page.site.baseurl }} i needed add .page in there access site variables. see issue report more details.

javascript - Checkbox Grouping in DIvs -

i want group checkbox in following 2 divs, when user checks on of checkbox, other checkboxes in div uncheck. how can using jquery? i trying use following jquery snippet not working. $('input[type="checkbox"]').on('change', function() { $(this).siblings('input[type="checkbox"]').prop('checked', false); }); the following html groups of checkboxes. <!--- group 1 --> <div id="banner_main" class="row"> <div class="question"> banner main </div> <div class="switch"> <input id="cmn-toggle-banner_main-admob" class="cmn-toggle cmn-toggle-yes-no" checked type="checkbox"> <label for="cmn-toggle-banner_main-admob" data-on="admob" data-off="admob"><

Android 6 bluetooth -

i upgraded android 6 , applications use bluetooth doesn't work new api version. it's same problem application on play store: bluetooth spp tools pro (good application view if bluetooth works) doesn't discovery of devices. the problem seems in bluetooth discovery: bluetoothadapter mbluetoothadapter = bluetoothadapter.getdefaultadapter(); mbluetoothadapter.startdiscovery() log.i("bluetooth", string.valueof(mbluetoothadapter.isdiscovering())); // return false my applications work android 4/5 , followed : http://developer.android.com/guide/topics/connectivity/bluetooth.html staring android 6.0 not enough include permissions on manifest. have ask user explicitly each permission considered "dangerous". bluetoothdevice.action_found requires bluetooth , access_coarse_location permissions http://developer.android.com/reference/android/bluetooth/bluetoothdevice.html#action_found the access_coarse_location http://developer.android.com/referenc

ios - Embedding third-party framework in both app and my custom framework targets -

in xcode project have framework target, need ship other developers. have app target depends on framework target. both app target , framework target should use same third-party framework. added framework both targets. when run app, see lot of warnings in console this: class <classname> implemented in both <path framework> , <path app>. 1 of 2 used. 1 undefined. i realized warnings disappear when remove -objc linker flag. flag required frameworks use. so questions is: how can avoid such warnings? should embed third-party framework inside framework? (as know not choise) what want implement: how can build framework other developers can download third-party framework independently framework still can use it?

loops - Generate variables that move information between rows in hierarchical data with spss syntax -

i wondering if can me following problem in spss syntax. dataset has nested structure. data nested in companies, each company has 1 or 2 bosses, in case care boss 1. @ previous stage in time boss graded workers (not of them). now, id , grade of workers on row each worker. i move information obtained during worker's assessment , create new sets of variables each (worker id , grade) on line/row of boss. +---------+------+--------+--------------+---------+---------+--------+---------+ | company | boss |workerid|worker's grade|n:workid1|n:grade1 |n:work2 |n:grade2 | +---------+------+--------+--------------+---------+---------+--------+---------+ | | 1 | 1 | | 3 | | 4 | | | | 2 | 2 | | | | | | 0 | 3 | | | | | | 0 | 4 | | | | | | 0 | 5 | | | | | b | 1

java arraylist example with no symbol resolved -

i'm unsure why isn't working. arraylist<string> test1 = new arraylist<string>(); string[] input = new string[]{"biggest", "next", "not"}; test1.add(input); there's error in 3rd line, @ add. editor says symbol cannot resolved, , test, typed test1. , ctrl + spaced see give me, no suggestion. help? by using add can add list defined in generic, string in case. isn´t valid since try add array of string list. achive addall function this. arraylist<string> test1 = new arraylist<string>(); string[] input = new string[]{"biggest", "next", "not"}; test1.addall(arrays.aslist(input));

javamail: why IMAPStore.connect switch to port 993 even if mail.imap.ssl.enable=false and port=143? -

in following code (an ibm domino 9.0.1 java agent) trying connect via port 143 no ssl imap store. package com.fm; import javax.mail.internet.*; import javax.mail.*; import java.net.connectexception; import java.util.*; public class jsaveimap { private store store=null; private string host; private string port; private string user; private string password; private javax.mail.session mailsession=null; private boolean dodebug; public jsaveimap() { system.out.println("creato oggetto"); } public void savemessage(mimemessage message, string foldername) throws messagingexception { //http://stackoverflow.com/questions/11524716/save-draft-message-using-java-mail-api folder folder=null; if (foldername.length()>0) { folder= store.getfolder(foldername); } else { folder= store.getfolder("inbox"); } if (dodebug) {system.out.println("

Eclipse MARS - Cannot install Android ADT Plugin -

when try install android developer tool, following error. unable read repository @ https://dl-ssl.google.com/android/eclipse/content.xml . unable read repository @ https://dl-ssl.google.com/android/eclipse/content.xml . unrecognized windows sockets error: 10106: create i'm running eclipse mars 64bit version. point me in right direction?

swift - How to get exact user sitting position latitude and longitude values in a room? -

i want exact user sitting position latitude , longitude values in room or building. getting user location latitude , longitude values through cllocationmanager not showing. possibility through user exact building latitude , longitude values. thanks laxman gps precision @ best 10m, cannot expect obtain positions better precision that, not enough positioning within building. besides, if user not using gps, network-based positioning data has yet lower precision. i don't think can use cllocationmanager or other out-of-the-box positioning service that. technologies exist can used locate phone within building based on other sensor data (eg. https://en.situm.es/solutions.php ), perhaps apply. there ways improve gps precision outdoors (eg. https://es.wikipedia.org/wiki/wide_area_augmentation_system ) depending on live. depends on application.

OpenCV imrite gives washed-out result for jpeg images -

Image
i using opencv 3.0 , whenever read image , write result washed-out image. code: cv::mat img = cv::imread("dir/frogimage.jpg",-1); cv::imwrite("dir/result.jpg",img); does know whats causing this? original: result: you can try increase compression quality parameter shown in opencv documentation of cv::imwrite : cv::mat img = cv::imread("dir/frogimage.jpg",-1); std::vector<int> compression_params; compression_params.push_back(cv_imwrite_jpeg_quality); compression_params.push_back(100); cv::imwrite("dir/result.jpg",img, compression_params); without specifying compression quality manually, quality of 95% applied. but 1. don't know jpeg compression quality original image had (so maybe might increase image size) , 2. (afaik) still introduce additional minor artifacts, because after lossy compression method. update problem seems not because of compression artifacts because of image adobe rgb 1998 color format

linker errors - Venmo iOS SDK pod integration issues -

Image
i trying integrate venmo ios sdk having problems importing project. upon installing pod, here error: the sdk mentions there may issues integrating venmo parse, followed redirect link , added following recommended other linker flags : -force_load $(built_products_dir)/libpods-venmo-ios-sdk.a -force_load $(built_products_dir)/libpods-vencore.a doing produced error: there little information on web or in docs these issues. have ideas? solved adding use_frameworks! podfile.

functional programming - Elm: Generate Signal Graph for Elm program -

i watched laszlo's talk time travel debugging in elm ( https://youtu.be/lk0vph1zr8s ) , in presentation used signal graph visualize effects of time traveling. can use debugger elm-reactor, see no option turn on signal graph visualization. there discussion this: https://groups.google.com/forum/#!msg/elm-discuss/24jtnacha6g/9wipfs9pbwaj are there news it? in general, there possibility generate signal graph elm program? thanks in advance. the talk laszlo quite old, considering rapid development of elm language. @ talk showed hacked prototype based on adapted elm runtime. time traveling debugger ( elm-reactor ) tool resulted expanding on work. the discussion link on mailing list last 1 i'm aware of adding signal graphs reactor. at time (iirc), laszlo generated graph using adapted runtime implementation of signals. every signal node in graph had string identifying kind of node. running elm program, graph set up. graph traversed , recorded in simple data struct

php - Get the string to the right of another string -

been working bit on chat/shoutbox of mine, , have row in users table called muted (0 not muted, 1 muted). want is, when type !mute <target> should update row <target> , set muted 1. i know how check if string contains !mute, this: if (strpos($sboxmsg,'!mute') !== false) { } the thing is, have no idea how right of !mute. , need turn right variable can use in query later on. example: !mute nick then store nick in variable called eg. $variable1 is possible? appreciated! use $variable1 = preg_replace('/^\!mute\s+/', '', $whatever_input);

eclipselink - JPA metamodel and @Convert on a List<String> attribute -

i'm exploring possibilities of using jpa metamodel criteria api. i have entities have attributes this: @column( name = "defaultvalue" ) @convert( converter = stringlisttostringconverter.class ) private list<string> defaultvalue; the db column varchar holds comma-separated list of strings (it's legacy table). converter nicely allows use real collection type when working entity attribute. i'm confused metamodel eclipselink creates. attribute represented this: public static volatile singularattribute<myentity, list> defaultvalue; the raw type warning declaration triggers little ugly. enforced specification? there prevent declaration instead: public static volatile singularattribute<myentity, list<string>> defaultvalue; i wonder if declaration can lead problems when construct criteria queries based on metamodel. example, possible construct filter checks if specific value contained in list, like [...] where( literal( "e

variables - How to access regex groups using For Each Controller in JMeter -

is possible access different groups using output variable of foreach controller ? for instance i'm using regular expression extractor extracts 2 elements , both of them have 2 groups. using debug sampler i'm seeing values extracted correctly: treenodes_1_g1=id1 treenodes_1_g2=first title treenodes_2_g1=id2 treenodes_2_g2=second title next i'm iterating results using foreach controller with: input variable: treenodes output variable name: node add "_" before number: checked and use ${node_${c}_g2} titles in name field in view results tree , ${node_${c}_g1} in other place, ${c} counter variable according http://jmeter.apache.org/usermanual/component_reference.html#foreach_controller . values not resolved instance see ${node_${c}_g2} ${node_${c}_g2} text instead of first title . what missing here? in order evaluate multiple variables need use __v function. jmeter _v() function ${__v(node_${c})} ${__v(node_${c}_g2)}

php - Call from template with $_GET -

so i'm trying make own template site it's easy use , i'm trying figure out how include different paths. currently have below nested inside of body navbar.php <? include 'content.php' ?> what i've tried is <? $_get["path"]; include "$_get" . ".php"; ?> i want change out content.php have less static pages. assume above isn't safe. alternative this? if want make more secure, can use array checking includes pages: <?php $validpages = array('content', 'home', ...); if(in_array($_get['path'], $validpages)) { include($_get['path'].".php"); } ?>

How to display the names over named ranges in Excel? -

Image
i accidentally dicovered excel 2010 can automatically display names of named regions on them kind of overlay layer: based on findings occurs if 2 conditions met: the view zoom level not greater 39% the name defines range bigger single cell (but still single area) did know this? bug or feature? how intentionally turn on feature @ possibly zoom level? interesting result; found little on post on first page of bing's search results. seems per here: http://www.mrexcel.com/forum/excel-questions/119051-dont-display-range-name-when-zooming.html though there command make name not appear when zoomed below 40%, there not seem command change threshold 40% else. you perhaps use vba code move translucent word art shapes align top left cell in named range, seems lot of work unless have specific payoff in mind.

java - RestEasy's @Form annotation doesn't works on Glassfish 4.1 -

i trying make legacy java web application packaged inside ear written jboss 7 work on glassfish 4.1. the application not built maven nor gradle (so please, not post answers maven dependencies, because can't mavenize or gradleize application yet). dependencies bunch of jars located on lib folder. my issue jax-rs methods have parameters annotated org.jboss.resteasy.annotations.form . application declared no dependency on resteasy packages, guess used found somewhere inside jboss or in weird endorsed classpath. not have access original jboss, looking there not option. by removing methods @form -annotated parameters , deploying it, jax-rs part works. parts important application , should not removed. i tried add following jars: resteasy-jaxrs-3.0.13.final.jar resteasy-atom-provider-3.0.13.final.jar resteasy-cdi-3.0.13.final.jar resteasy-crypto-3.0.13.final.jar resteasy-jackson2-provider-3.0.13.final.jar resteasy-jaxb-provider-3.0.13.final.jar resteasy-jaxrs-3.0.13.f

Selecting Objectify data from the Google DataStore using GSQL in the Developer Console -

i have objectify entity called userentity contains object called user . want dump last sync times , other data user objects bit of analysis. i'm trying in developers console using gsql can't work out how results want. the query below works everything select * userentity using query get's keys select __key__ userentity this returns nothing, saying no data found. select user userentity but can't work out how (or if can) select individual properties objects. possible achieve in developer console, or shall write code it? ideally i'd able like select user.synctime, user.currentlevel userentity stripped userentity class below @entity @cache public class userentity extends wordbuzzentity { @id private string facebookid; public user user = new user(null); private hashmap<string, date> accesstokens = new hashmap<string, date>(); } this not how datastore fundamentally works. datastore key/value store indexing. v

html - Eonasdan Bootstrap Datetimepicker not working properly when I click on the calendar icon or input box -

i'm having problem eonasdan bootstrap datetimepicker. copied , pasted code website (minus row , container because made layout of panel messy). suspect calendar buried , not visible reason. hoping guys give me hand! <div class="col-sm-6"> <div class="form-group"> <div class="input-group date" id="datetimepicker1"> <input type="text" class="form-control active" /> <span class="input-group-addon btn"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> </div> </div> <script type="text/javascript"> $('#datepicker').off('focus').datepicker().click( function () {

javascript - TDD principle, how to make the test fail -

i m studying tdd , on, learn examples. actually m building little (very little) orm introduce me real unit test, stubs , mock. i run way, played tests , make little implementation (getall method) (fail -> make test pass -> refactor) actually, here's code : mongodbadapter export default class mongoadapter{ getall(){ return new promise((resolve, reject)=>{ resolve(['a','b','c','d']); }); } } mysqladapter export default class mysqladapter{ getall(){ return new promise((resolve, reject)=>{ resolve(['a','b','c','d','e']); }); } } factoryadapter class import mysqladapter './adapters/mysqladapter'; import mongoadapter './adapters/mongoadapter'; export default class factoryadapter{ static get(name){ if(name.tolowercase() === 'mysql') return new mysqladapter(); if(name.tolowercase() === 'mongodb') return ne

ubuntu - SVN Defining the Root Directory -

i have installed subversion on ubuntu 14.04 lts. have created repository under /home/svnadmin/svn/repo-one . can use toroisesvn connect , view using full path - /home/svnadmin/svn/repo-one . i make /home/svnadmin/svn root directory svnserve use. have consulted svnserve --help manual , found this: -r [--root] arg: root of directory serve but when attempt run command: svnserve -r /home/svnadmin/svn/ when execute command error: you must specify 1 of -d, -i, -t or -x. can me please? have misunderstood -r command supposed do? i've tried searching answer , can't find solution problem anywhere. these flags select model process uses listen connections: -d - run standalone daemon, listening on port itself -i - run xinetd backend, communicating parent process on stdin , stdout -t - in ssh tunnel mode -x - in debug listen mode, accepting single connection stopping. documentation here . need select one: discussion in comments sounds want -i

Is there a Bluemix API (eg. REST) to order/cancel Bluemix services and containers? -

does bluemix have api endpoint supports ordering , cancelling bluemix services , containers? want orchestrate ordering of bluemix containers , dependent services without having manually. for services can use cloud foundry rest api: https://apidocs.cloudfoundry.org/222/ for containers there rest api: http://ccsapi-doc.mybluemix.net/

c# - UWP NetworkConnectionChanged Event -

i developing uwp app , need things after lost network connection or device connected again. is there event firing after connection lost or connected? i searched www found wp8... i need uwp on windows 10. i tried use networkinformation.networkstatuschanged . i had same problem too. article (and whole website) has helped me alot: http://windowsapptutorials.com/windows-10/how-to-check-for-network-availability-in-universal-windows-apps/ i hope it's need. problem is, can detect if example wifi or mobile network connected. if connected wifi , pull plug on router won't detect it. now this: public static bool isinternetconnected() { var isinternetconnected = false; var connectionprofile = networkinformation.getinternetconnectionprofile(); if (connectionprofile != null) { var connectivitylevel = connectionprofile.getnetworkconnectivitylevel(); isinternetconnected = connectivitylevel == networkconnectivitylevel.internetaccess;