Posts

Showing posts from July, 2015

angularjs - Angular on a svg - $sce.trustAsHtml inside svg does not work in safari and ie -

i new angular , svg , can't seem past problem. i using $sce.trustashtml on <g> element. code works fine in chrome , firefox reason fails in appending variable in safari , ie11. ideas why? p.s. have find way link content <g> because svg has dynamic content ng-repeat (that part woks fine) in html: <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px"y="0px" width="800px" height="800px" viewbox="0 0 800 800" enable-background="new 0 0 800 800" xml:space="preserve"><g ng-bind-html="svg"></g>.... other dynamic content...</svg> in js $scope.svg = $sce.trustashtml('<path fill="#f5f5f5" d="m153.065,320.752l-43.868,14.321c28.69,86.341,107.159,149.954,201.385,156.805l3.875-42.49 c238.671,442.564,175.884,390.696,153.065,320.752z"></path> ...

python - Results of reduce and count differ in pyspark -

for spark trials, have downloaded ny taxi csv files , merged them single file, nytaxi.csv . saved in hadoop fs. using spark on yarn 7 nodemanagers. i connecting spark on ipython notebook. here sample python script counting number of lines in nytaxi.csv. nytaxi=sc.textfile("hdfs://bigdata6:8020/user/baris/nytaxi/nytaxi.csv") filtered=nytaxi.filter(lambda x:"distance" not in x) splits = filtered.map(lambda x: float(x.split(",")[9])) splits.cache() splits.count() this returns 73491693. when try count lines following code, returns value around 803000. def plusone (sum, v): #print sum, v return sum + 1; splits.reduce(plusone) i wonder why results vary. thanks a sample line csv: u'740bd5be61840be4fe3905cc3ebe3e7e,e48b185060fb0ff49be6da43e69e624b,cmt,1,n,2013-10-01 12:44:29,2013-10-01 12:53:26,1,536,1.20,-73.974319,40.741859,-73.99115,40.742424' the problem daniel specified in operation used in reduce must associative ...

javascript - jQuery click event on wrong element created via loop -

i'm trying dynamically create portfolio parts website in jquery can add stuff later ease through database. i've got working, except listener redirects last listener created, seems. no matter header click, opens last option, not 1 clicked. here's code have: var portfolio_array = <?php echo json_encode($globals["portfolio_array"]); ?>; (var = portfolio_length - 1; >= 0; i--) { var project_name = portfolio_array[i]["name"]; var project_tag = portfolio_array[i]["tag"]; var project_description = portfolio_array[i]["description"]; var project_year = portfolio_array[i]["year"]; var project_image = portfolio_array[i]["image"]; $("projects").append("<project class = " + project_tag + ">"); $("."+project_tag).append("<br><project_header class = project-header...

linux - RHEL Java application - specific name instead of generic java process -

i have custom java application running on rhel machine. running java application bash exec script parameters , options appended. result, java application gets generic name "java" in system processes not useful me apply monitoring process (to know when crashed or not) , name not unique, potentially deploy similar java application, therefore not able distinguish them. how give java application specific unique name? example top below... pid_no user 20 0 other_info java pid_no user 20 0 other_info java pid_no user 20 0 other_info java ideally have... pid_no user 20 0 other_info my_app1 pid_no user 20 0 other_info my_app2 pid_no user 20 0 other_info my_app3 thank in advance. it seems have maybe 2 relatively simple options - create soft link java "desired" application name, , start app that for example: ln -s /usr/bin/java /usr/bin/yourapp /usr/bin/yourapp {options} yourapp.class ps ...

Regex search in list for numbers have 3 or more digit occures -

i have list of 6 digits number [0-9]. examples: 001601 001602 001610 145784 487457 894571 111299 121118 results: 001601 001602 001610 0 occurs 3 times 111299 1 occurs 3 times 121118 1 occurs 4 times here perl way it: my $re = qr~(.).*\1.*\1~; while(<data>) { chomp; $_ =~ $re ? "ok : $_" : "ko : $_"; } __data__ 001601 001602 001610 145784 487457 894571 111299 121118 output: ok : 001601 ok : 001602 ok : 001610 ko : 145784 ko : 487457 ko : 894571 ok : 111299 ok : 121118

java - Android with outside database -

hy, can me, new in android databases. want create database on server, , connect android server. can give me advice.. don't want stuck, need advice,.. first of not proper way ask questions. must research before asking question here. since asked question already, let me answer this. cannot(and shouldn't) access database server directly android device. need web service in order that. here simple tutorial topic.

symfony - Inject variable into extended twig form_theme -

i have dynamic form create , want extend widget in order display <tr> . fact each column of table dynamic group containing fields. all want iterate on groups in myform_widget : here table header <table id="myforms-table" class="table"> <thead> <tr> {% group in groups %}<th>{{ group.label }}</th>{% endfor %} </tr> </thead> <tbody data-prototype="{{ form_widget(form.myforms.vars.prototype)|e }}"> </tbody> </table> here myform block : {% block myform_widget %} <tr> {% group in groups %} <td> {% field in group.fields %} {{ form_row( form.children.(field.codefield) ) }} {% endfor %} </td> {% endfor %} </tr> {% endblock %} and exception variable "groups" not exist . assume form_theme cannot access groups variable,...

ios - Change user location in GMSMapView -

i want set custom user location in gmsmapview. locations based on ibeacons. have idea how achieve this? i don't think can change user location. there 2 options though: use custom marker (annotation) acts user location. you can implement gps spoofing can simulate user current location. see how set fake gps location on ios real device

linux - The limit of ulimit -Hn -

using trial , error, i've found maximum number can give ulimit -hn without getting error 1048576 . number come from? sys.fs.file-max 20000500 (20 million). actually, limit can increased. set fs.nr_open=5242880 in /etc/sysctl.conf , run sysctl -p , login again. limit 5 million! set both , file-max.

Android Studio Accessing SQLite Database Java -

hi have been working on project requires database store answers, hints, etc , have added 1 row database using method. made getanswer method uses rawquery() answer in specified row (1) first , item added in database. so database class finished , want use database game. i'm assuming has run method once fill database (couldn't figure out better way internal database run every time game opened, if know better way i'm ears). in main activity can't seem call method fills database or method retrieve item database. have been looking , don't understand why not working. i posting main activity first , game database. on how use database appreciated. main activity class package tekvision.codedecrypter; import android.content.intent; import android.database.sqlite.sqlitedatabase; import android.support.v7.app.actionbaractivity; import android.os.bundle; import android.view.view; import android.view.windowmanager; import android.widget.button; import android.widget.t...

java - JavaFX- Don't scale image for stage icon? -

i setting image stage becomes logo javafx application. stage.geticons().add(new image("mylogo.png")); however, image gets scaled , stretched horizontally since not @ ratio likes. is there way can manipulate image centered in placement, or add margins matches expected ratio? i don't want create whole new image if can it.

c# - When is Datagridview's Paint and Cellpainting called? -

Image
i have datagridview dgv , let's 3 of columns want affect manually : col1 : datagridviewtextboxcolumn, displaying number col2 : datagridviewtextboxcolumn, used color indicator, without text. backcolor will changed later. col3 : datagridviewimagecolumn other columns binded respective datapropertyname of underlying datasource . 3 columns above not binded datapropertyname , affected manually, example when want change image or color indicator. every time affect datasource , datasource rebind , dgv.invalidate() update grid's graphic. when , how ask dgv take account manual values in 3 edited columns ? manually affect 3 above column inside dgv_cellpainting . work cellpainting takes long time , decide remove it. tried putting them inside dgv_paint (which used merging headers) not take color nor image. with cellpainting : rectangles spaces between rows, filling background, separater between rows, boxes image , color, etc. 3 columns refering first column (index), co...

How to read Excel in Mac using C# -

i wonder how can read excel file c# code in mac. generally cannot use microsoft excel in mac. tried converting excel .csv , read same. is there alternate this? better approach help thanks in advance i think, can use exceldatareader library it's cross-platform library. short sample github: filestream stream = file.open(filepath, filemode.open, fileaccess.read); //1. reading binary excel file ('97-2003 format; *.xls) iexceldatareader excelreader = excelreaderfactory.createbinaryreader(stream); //2. reading openxml excel file (2007 format; *.xlsx) iexceldatareader excelreader = excelreaderfactory.createopenxmlreader(stream); //3. dataset - result of each spreadsheet created in result.tables dataset result = excelreader.asdataset(); //4. dataset - create column names first row excelreader.isfirstrowascolumnnames = true; dataset result = excelreader.asdataset(); //5. data reader methods while (excelreader.read()) { //excelreader.getint32(0); } //6....

javascript - The masonry bricks are stacked together until page resize on Wordpress -

i found few questions on stackoverflow didn't resolve problem, i'm trying asking here. when load page masonry bricks stacked in top/left of window. when resize page arrange in correct position. i'm using javascript in page of wordpress. code @ bottom of page: <script src="http://www.bitumephotofest.it/wordpress/wp-content/themes/sequential/js/masonry.pkgd.min.js"></script> <script> var container = document.queryselector('#container'); var msnry = new masonry( container, { // options columnwidth: 10, itemselector: '.item' }); </script> i undestrood previous questions on stackoverflow have use "imagesloaded()". , how should add it? i'm novice in javascript. any suggests? it's difficult know without example url try: <script> $(document).ready(function() { var container = document.queryselector('#container'); var msnry = new masonry( container, { // options co...

ibm mobilefirst - Disabling default security using @OAuthSecurity(enabled=false) -

the following link indicates security can disabled using @oauthsecurity(enabled=false) - see under "security configuration of jax-rs resource" question: does mean default security disabled? i have scenario wherein javascript adapter (developed , being used in previous version of product) auto-deployed on upgraded server (from 6.1 7.0) - using in-place upgrade. js adapter had no security tests defined , such not protected. question: when adapter runs on 7.0 - out-of-the-box default security take effect? if so, how 1 disable it? thanks, in anticipation. starting mfpf 7.0 there two authentication models : classic: know pre-7.0 versions oauth-based if adapter developed in classic way, continues work before. if want procedure have no security defined it, not default internal 1 (when not setting securitytest), use securitytest="wl_unprotected" . @oauthsecurity(enabled=false) refers java adapters whereas asking existing javascript ada...

c# - Oracle.DataAccess.Client.OracleConnection Exception IIS 500 Error -

i'm getting error 500 on iis references oracle data connections. i've attached stack trace. i've verified have oracle client installed , dlls exist within application directory. i'm running windows server 2012 iis 8.0. attached stack trace... {"message":"an error has occurred.","exceptionmessage":"the type initializer 'oracle.dataaccess.client.oracleconnection' threw exception.","exceptiontype":"system.typeinitializationexception","stacktrace":" @ oracle.dataaccess.client.oracleconnection..ctor(string connectionstring)\r\n @ cecc.ami.controllers.getblinkscontroller.getamidata(string startdatestring, string enddatestring)\r\n @ cecc.ami.controllers.getblinkscontroller.getblinks(string startdate, string enddate)\r\n @ lambda_method(closure , object , object[] )\r\n @ system.web.http.controllers.reflectedhttpactiondescriptor.actionexecutor.<>c__displayclass10.<get...

java - Tomcat8 shutdown randomly with AbstractProtocol.pause -

Image
1. problem i deployed webapp in tomcat, , found shutdowns randomly , time varies 2 or 3 hours 2 or 3 days. log in catalina.out is: 26224 2015-06-10 13:59:04.110 {http-nio-8080-exec-3} info com.timediff.controller.user.userprofilecontroller#getuserhome - /user/profile/home done, curuid: 889 26225 10-jun-2015 14:15:35.050 info [thread-11] org.apache.coyote.abstractprotocol.pause pausing protocolhandler ["http-nio-8080"] 26226 10-jun-2015 14:15:35.052 info [thread-11] org.apache.coyote.abstractprotocol.pause pausing protocolhandler ["ajp-nio-8009"] 26227 10-jun-2015 14:15:35.053 info [thread-11] org.apache.catalina.core.standardservice.stopinternal stopping service catalina 26228 10-jun-2015 14:15:35.058 info [localhost-startstop-2] org.springframework.web.context.support.xmlwebapplicationcontext.doclose closing webapplicationcontext namespace 'timediff-dispatcher-servlet': startup date [wed jun 10 13:38:14 cst 2015]; root of context hierarchy 26229 1...

rust - Detecting client hangup in MIO -

when using mio (0.3.5) how detect termination of connection? i tried following: extern crate mio; use mio::{eventloop,token,readhint}; use std::io::read; fn main(){ let listener = mio::tcp::tcplistener::bind("localhost:1234").unwrap(); let (stream,_) : (mio::tcp::tcpstream, _) = listener.accept().unwrap(); let mut event_loop = eventloop::new().unwrap(); event_loop.register(&stream,token(0)).unwrap(); println!("run..."); event_loop.run(&mut h{stream:stream}).unwrap(); } struct h{stream : mio::tcp::tcpstream} impl mio::handler h{ type timeout = (); type message = (); fn readable(&mut self, _ : &mut eventloop<self>, _ : token, hint: readhint){ let mut buf: [u8; 500] = [0; 500]; println!("{} {}",(hint==readhint::data()),self.stream.read(&mut buf).unwrap()); std::thread::sleep_ms(1000); } } run this. connect using nc localhost 1234 . terminate connection using ctrl-c. code think there ne...

mysql - Saving Class to Database in Object Oriented PHP -

i'm new object oriented programming , don't know if i'm doing right. want take data form submitted , add database. database credentials correct. <?php require_once('../layout.php'); require_once('../dbconnect.php'); class student{ public $f_name; public $l_name; public $email; public $state; public $phone; public $birthday; public function __construct($f_name,$l_name,$email,$state,$phone,$birthday) { $f_name = $_post['f_name']; $l_name = $_post['l_name']; $email = $_post['email']; $state = $_post['state']; $phone = $_post['phone']; $birthday = $_post['birthday']; $query = 'insert `student`(`first_name`, `last_name`, `email`, `state`, `phone`, `birthday`) values ($f_name,$l_name,$email,$state,$phone,$birthday)'; $resultquery = mysqli_query($dbconnect,$query); if($resultquery) { e...

ios - UITableViewCell Custom Add to favourites button issue -

Image
in table view, placed custom "add favs" button in every cell enable user copy exact cell content second tableview controller. when hit "add favs" button alert view shows ask if want copy cell , paste second view controller or not. there 2 things. 1- there way delete "add favs" button permanently cell if "ok" selected alert view indicate cell copied , pasted second tableview? - user won't able add cell content on , on again. 2- bigger question: how copy , paste cell content secondtableview controller "add favs" click? here way cells re configured: - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstylesubtitle reuseidentifier:cellidentifi...

How can I extend typed Arrays in Swift? -

how can extend swift's array<t> or t[] type custom functional utils? browsing around swift's api docs shows array methods extension of t[] , e.g: extension t[] : arraytype { //... init() var count: int { } var capacity: int { } var isempty: bool { } func copy() -> t[] } when copying , pasting same source , trying variations like: extension t[] : arraytype { func foo(){} } extension t[] { func foo(){} } it fails build error: nominal type t[] can't extended using full type definition fails use of undefined type 't' , i.e: extension array<t> { func foo(){} } and fails array<t : any> , array<string> . curiously swift lets me extend untyped array with: extension array { func each(fn: (any) -> ()) { in self { fn(i) } } } which lets me call with: [1,2,3].each(println) but can't create proper generic type extension type seems...

Displaying database records in android using JAVA RESTful webservice -

i trying display database record using java restful web service. have able create login form using cannot display records on database. tried code not working @ all. when button pressed nothing happens. heres code. driverdetails.java class details extends activity { textview name1; textview plate1; button btngetdata; //url json array private static string url = "http://192.168.254.108:8080/taxisafe/display/taxidetails"; //json node names private static final string tag_user = "taxi"; private static final string tag_name = "taxi_name"; private static final string tag_email = "taxi_plate_no"; jsonarray user = null; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); btngetdata = (button)findviewbyid(r.id.getdata); btngetdata.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { ...

html - Bootstrap navbar spacing issue -

please take @ homepage on website. navbar spacing on place. i'm not sure i'm going wrong code. i linked bootstrap cdn , have no custom css file of own linked it. i tried change settings in sublime text 3 change indent using indent rather spaces. i have re-written code. thing seems work if not put of elements of navbar on new line. no line drops; continuous coding no spaces. any appreciated. thank you. my html: <div class="navbar navbar-inverse navbar-static-top"> <div class="container"> <a href="/" class="navbar-brand">kellumonline</a> <button class="navbar-toggle" data-toggle="collapse" data-target=".navheadercollapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> ...

c# - Windows Phone asynchronous call terminates -

i creating rest communication interface small windows phone application since can not call soap web services. interface simple , uses jsonconverter parse json responses. code looks public class communicate<requesttype,resposetype> resposetype:class requesttype :class { public async task< resposetype> communicatesvr(requesttype _parameter,string methodname,string serverip) { string reqdata = jsonconvert.serializeobject(_parameter); httprequestmessage request = new httprequestmessage(httpmethod.post, serverip+methodname); request.content = new stringcontent(reqdata, encoding.utf8, "application/json"); httpclient client = new httpclient(); client.defaultrequestheaders .accept.add(new mediatypewithqualityheadervalue("application/json")); httpresponsemessage response = await client.sendasync(request, httpcompletionoption.responseheadersread); if (response...

dictionary - Cartography in R - how to plot numeric and binary values on a map? -

i'm trying produce 2 maps, 1 multiple categoric values , 1 continous numeric values, in: link i have dataset provides npa , 2 informations each npa: item (category) , frequency (on scale 1 10): npa item frequency 1000 huitante 0 1002 huitante 10 1006 quatre-vingt 3 2000 huitante 9 i have specific shapefile country work on (switzerland). on previous post , found interesting code, copy/paste here: # open shapefile require(rgdal) require(rgeos) require(ggplot2) ch <- readogr(work.dir, layer = "plzo_plz") # convert data frame plotting ggplot - takes while ch.df <- fortify(ch) # generate fake data , add data frame ch.df$count <- round(runif(nrow(ch.df), 0, 100), 0) # plot ggplot ggplot(ch.df, aes(x = long, y = lat, group = group, fill = count)) + geom_polygon(colour = "black", size = 0.3, aes(group = group)) + theme() the author gives in comment information plot specific dataset (and not f...

shell - SAPUI5: Disable scrollbar for sap.ui.unified.ShellLayout -

Image
i using sap.ui.unified.shelllayout toolbar @ top , sap.ui.core.componentcontainer underneath. content of component container exchanged on navigation while toolbar stays. unfortunately, whole shell (layout) has scrollbar although component container should have one. how can disable scrolling shelllayout? method init in view: sap.ui.unified.shelllayout.prototype.init.call(this); var = this; this.setheadervisible(false); // action bar this.otoolbar = new sap.m.toolbar({ transparent: true, content: [ new sap.m.toolbarspacer(), new sap.m.text({ text: "elektronischer einkaufszettel" }), new sap.m.toolbarspacer() ], height: "3rem" }); this.addcontent(this.otoolbar); this.ocomponentcontainer = new sap.ui.core.componentcontainer({ name: 'router', enablescrolling: true }); this.addcontent(this.ocompone...

jquery - Internet Explorer 11 default document view mode to Edge -

Image
i have windows 7 , ie 11 installed in local machine. working on asp.net, c# web application used bootstrap, jquery etc. i have created 1 checkbox dropdown list (ref: http://www.aspsnippets.com/articles/multiple-select-multiselect-dropdownlist-with-checkboxes-in-aspnet-using-jquery.aspx ). but local intranet website showing default document view mode 7 , check box drop down list this but when on production looks see below screenshot, on production default document view mode edge (i don't know how.) is there anyway, can set default document view mode edge local intranet website users? add meta between <head></head> : <meta http-equiv="x-ua-compatible" content="ie=edge" /> for reference: legacy document modes

makefile - Android NDK - Including prebuilt static libraries gives undefined reference errors -

Image
i trying build shared library using prebuilt static library. reason, building fails giving undefined reference errors. if add local_allow_undefined_symbols := true , building succeeds shared library few kilobytes while static library 3 megabytes... seems went wrong in linking static library. have no idea be. using c++ code. android.mk: local_path := $(call my-dir) include $(clear_vars) local_module := kes local_export_c_includes := $(local_path)/include local_src_files := libkes.a include $(prebuilt_static_library) include $(clear_vars) local_module := portakes local_src_files := portakes.cpp local_static_libaries := kes include $(build_shared_library) application.mk: app_abi := app_stl := stlport_static jni directory structure: output: ./obj/local/arm64-v8a/objs/portakes/portakes.o: in function `java_com_kurzweil_portakes_kesfile_createpolefile': c:\users\niels.mylle\documents\kurzweil mobile android\portakes/jni/portakes.cpp:18: undefined referenc...

networking - Where can I get the image thats qcow2 that is in this Youtube Video for openmano NFV? -

i know can image openmano nfv qcow2 image in youtube video below, or image able use. helpful https://github.com/nfvlabs/openmano/wiki/getting-started#manual-installation https://www.youtube.com/watch?v=5szc-vgdhi4 thanks if goal have openmano setup inside virtual machine on openstack: create vm image https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img (64-bit) or https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-i386-disk1.img (32-bit). use "raw" format, , either of urls above image location. go access & security , create key pair. save key on local machine, password access disabled in ubuntu cloud images. launch vm instance image. assign key pair step #2 (access & security tab). select network allows internet access - need install openmano , required packages. connect ssh using key saved in step #2. follow https://github.com/nfvlabs/openmano/wiki/getting-started#installation install o...

statistics - Elasticsearch date histogram aggregation includes more than one bucket per month -

Image
i trying create elasticsearch date histogram aggregation using monthly intervals. reason, month of november ends getting 2 buckets - 1 start , end of month. following screenshot kibana data table visualization: this doubling metric values month of november bad news reporting. couldn't find in docs relating issue... ideas why aggregation including 2 buckets month of november?

android - Show Rating bar in google marker -

i have been trying put rating bar google marker, yet failed find way it. followed example using layout custom marker . there way can put rating bar inside google marker? you have place rating bar inside info window : https://developers.google.com/maps/documentation/android/infowindows

javascript - HTML with first column and first row locked -

Image
i have 1 html file exported html microsoft excel application, wanted freeze first row , column in html, when tried add position:fixed;, size , alignment of headers getting changed. please advice how done without having alignment , size changed. have pasted source code of html. great me, in advance. david. <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/tr/rec-html40"> <head> <meta http-equiv=content-type content="text/html; charset=windows-1252"> <meta name=progid content=excel.sheet> <meta name=generator content="microsoft excel 14"> <style id="store-freeze_14759_styles"> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} .xl1514759 {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:b...

Django (1.4) how to use with template tag to assign several variables -

i trying assign several variables in same : {% 'foo' description 'blah' description_2 %} ... {% endwith %} is there way achieve ? (it works 2 with ) assigning multiple variables possible new syntax: {% description='foo' description_2='blah' %} ... {% endwith %} see https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#with .

c++ - Xcode 7 handling of include files changed -

since xcode 7 came out, tried compile , run game it, see awesome performance boost ;). the problem apparently handling of #include files changed in xcode 7. best way explain example: we have imaginary project flowing structure: source_folder main_header.h utility_code my_class.cpp my_class.h now want include main header file in my_class.cpp. in xcode 6, write #include "main_class.h" into my_class.cpp , work since starting point of includes @ source_folder level. in xcode 7, changed , 1 have write #include "../main_class.h" since starting point @ same path our my_class.cpp file. my project rather huge , rewriting includes not option. question if knows if setting of xcode 7 or maybe bug?!?! your apreciated! cheers, tk there setting should fix problem. in utilities box right of project screen there option labeled location. default "relative group", changing "relative project" should fix problem. change mu...

python - Normalize unicode does not work as expected -

i face problems different unicode representations of special characters, ones accents or diaereses , on. wrote python script, parses multiple database dumps , compares values between them. problem is, in different file, these special characters stored differently. in files, these characters composed, in others decomposed. want have string extracted dump in composed representation, tried adding following line: value = unicodedata.normalize("nfc", value) however, solves problem in cases. example, umlauts works expected. nevertheless, characters ë remain in decomposed schema ( e͏̈ ). i figured out, there combining grapheme joiner -character(u+034f) between e , diaeresis character. normal, or cause of problem? does know, how handle issue? the purpose of u+034f combining grapheme joiner ensure sequences remain distinct under searching/sorting/normalisation. required correct handling of characters , combining marks used in languages unicode algorithms. sect...

xmlhttprequest - How do I load JSON data synchronously with d3.js? -

when site first initializes, queries server data. can't lay out on page until data gets back. d3.js, can use d3.json() data, because it's asynchronous, need put entire page logic in callback function. how request data , wait come back? you're doing way. callback function has 1 initiating rest of code. don't need code in callback function though, can introduce indirection. callback function call function inside in callback function.

php - querying another table after login -

this seems should simple, i've tried every way , can't seem work. i have login script adapted online tutorial. i'd have users sign in username , password, , if these correct, have go after lab results in table (same database) , display them. can sign in, that's it. here's login code: <?php //start session session_start(); require('connect.php'); //3. if form submitted or not. //3.1 if form submitted if (isset($_post['username']) , isset($_post['password'])){ //3.1.1 assigning posted values variables. $username = $_post['username']; $password = $_post['password']; //3.1.2 checking values existing in database or not $query = "select * `user` username='$username' , password='$password'"; $result = mysql_query($query) or die(mysql_error()); $count = mysql_num_rows($result); //3.1.2 if posted values equal database values, session created user. if ($count == 1){ $_session[...

Confused about web fonts -

i confused fonts use in websites. i have font purchased - says desktop font. i'm calling css using @fontface , working fine. site on localhost. i aware of fonts google fonts , have used them before don't need project. can use desktop font website , load font folder onto server? realize desktop fonts meant use applications photoshop - there reason cant use website using @fontface? technically valid font file should work @fontface . file (.otf, .ttf, .woff, etc...) handled browser font file - significant difference between desktop font , web font is, in cases, web font have optimizations made since being delivered on web. not prevent desktop font being used, makes font designed web more efficient. a description of these differences can found here: http://creativepro.com/print-vs-web-fonts-what-s-the-difference/ regardless of file working or not need review font's licensing know sure if allowed or not. purchased fonts have licenses allow use on web ...

javascript - Get Download Request from Google Keyword Planner -

is there way receive request csv downloads inside google keyword planner can trigger via external web application? after performing keyword search in google keyword planner able download results csv-file. function opens in new tab - able trigger event outside.

javascript - Semantic UI: How to define selected item of search dropdown ("<select>")? -

how can set selected item of search dropdown (select) form field? tried following jquery/javascript code: if (equal == 0) { $('#sj_company').html($('#sj_company').html() + '<option value="' + key + '" selected="selected">' + data[key] + '</option>'); $('.searchdropdown').dropdown('set selected', data[key]); } else { $('#sj_company').html($('#sj_company').html() + '<option value="' + key + '">' + data[key] + '</option>'); } edit: base semantic ui frontend framework ;-) for semantic ui framework, should consult guide here: dropdown behavior . tells make following call: $('#dropdown').dropdown('set selected', value); or pass object (perhaps useful multiple select or developer's preference): $('#dropdown').dropdown({'set selected': value}); non-framework answer (before q...

amazon web services - Spring AWS SQS Reconnect After Losing Connection -

i using spring cloud aws (1.0.1.release) spring boot run sqs consumer. application runs fine, when looses network connection (for instance if switch wifi off on laptop when runs on it), see errors on console , application never recovers. hangs there , not reconnect after network becomes available. have kill , bring up. how force recover itself? // spring boot entry point: public static void main(string[] args) { springapplication.run(myconsumerconfiguration.class, args); } // message listener (a different class) @messagemapping(value = "mylogicalqueuename" ) public void receive(mypojo object) { } the error see @ console: exception in thread "simplemessagelistenercontainer-1" com.amazonaws.amazonclientexception: unable execute http request: sqs.us-east-1.amazonaws.com @ com.amazonaws.http.amazonhttpclient.executehelper(amazonhttpclient.java:473) @ com.amazonaws.http.amazonhttpclient.execute(amazonhttpclient.java:297) @ com.amazon...