Posts

merge - Have nomatch return value as-is using match function in R -

merge - Have nomatch return value as-is using match function in R - i have much larger existing dataframe. smaller illustration replace of variables (replace state (df1)) newstate (df2) according column "first." issue values returned na since of names matched in new dataframe (df2). existing dataframe: state = c("ca","wa","or","az") first = c("jim","mick","paul","ron") df1 <- data.frame(first, state) first state 1 jim ca 2 mick wa 3 paul or 4 ron az new dataframe match existing dataframe state = c("ca","wa") newstate = c("tx", "la") first =c("jim","mick") df2 <- data.frame(first, state, newstate) first state newstate 1 jim ca tx 2 mick wa la tried utilize match returns na "state" matching "first" variable df2 not found in ori...

json - Gson handling List Item Pairs of type -

json - Gson handling List Item Pairs of type <String, Object> - i'm reading in json string similar this... {"flags":{"0":null,"2166136261":null}} i have no thought on how handle class representation of this? smaller part of complex response i'm slowing trying class out create reading , writing gson simpler. i can't figure out how represent list item pairs of in class file. seems simple can't figure out @ moment. help appreciated. use code below class flag { map<object, object> flags; public map<object, object> getmap() { homecoming flags; } public void setmap(map<object, object> flags) { this.flags = flags; } } main class flag flag = new flag(); map<object, object> flags = new hashmap<object, object>(); flags.put("0", "test0"); flags.put("1", "test1"); flag.setmap(flags); system.out.println(new ...

SOLVED: Unable to authenticate via LDAP to directory (Active Directory) with Spring Security -

SOLVED: Unable to authenticate via LDAP to directory (Active Directory) with Spring Security - i'm using: - spring 3.1.3 and problem i'm unable connect active directory via ldap using valid credentials. i don't know if caused malformed pattern or configuration issue userdn or url's rootdn. although , @ first glance , seems correct. this current spring security config file: ... <security:authentication-manager alias="authenticationmanager"> <security:authentication-provider ref="ldapauthprovider" /> </security:authentication-manager> <bean id="ldapauthprovider" class="org.springframework.security.ldap.authentication.ldapauthenticationprovider"> <constructor-arg> <bean id="bindauthenticator" class="org.springframework.security.ldap.authentication.bindauthenticator"> <constructor-arg ref="contextsour...

c# - ASP.NET Website: page with multiple forms -

c# - ASP.NET Website: page with multiple forms - i'm having problem while creating dynamically web page in asp.net (c#). i need insert multiple form tags in page, know can't set more 1 runat="server" attribute , don't need it. i want place them c# (one each element i've got manage), without runat attribute htmlform object utilize insert form adds runat attribute automatically , can't remove (tried form.attributes.remove("runat")) if utilize simple string like: "<form id="someid" method="post" action=""></form>" and add together multiple times div works. point don't want insert html objects writing them in string , add together innerhtml method. i'm looking object manage form without runat attribute or way remove htmlform. a user command cleanest solution can add together htmlgenericcontrol instead of htmlform object isn't bound specific attributes. ...

Drop and Inner shadow for button in javafx -

Drop and Inner shadow for button in javafx - i have button in javafx , pseudoclass .button:pressed supposed have drop , inner shadow. i'm trying is .button:pressed { -fx-effect: dropshadow( gaussian , rgba(0,0,0,0.7) , 10,0,0,1 ); -fx-effect: innershadow( gaussian , rgba(0,0,0,0.7) , 20,0,0,0 ); } however, sec effect seems applied button (actually, effect whichever comes sec applied). i've looked here: http://www.canoo.com/blog/2012/07/10/javafx-recipes-css-vs-code/?lang=de, don't see difference approach. there way apply 2 shadows 1 button? thank you. it's not possible in java 7 nor in java 8 chain effects or apply multiple effects via css. see oracle css documentation. the site reference mentions well: well @ moment not possible chain effects in css means apply 1 of needed effects lead next result code above… button javafx dropshadow

How to write API data to a computer file? -

How to write API data to a computer file? - i've never used api before. want start using api gives me prices , characteristics of items in online game. i'm in processing of learning how create api able extract available info specific website has such information. here's question: after extracting info website using api, want download info analysis. example, nice if download info excel file or csv file format can later import. know how can that? let me know if question still vague. here's api means: api, abbreviation of application programme interface, set of routines, protocols, , tools building software applications. api specifies how software components should interact , used when programming graphical user interface (gui) components. api makes easier develop programme providing building blocks. programmer puts blocks together. generally recieve info api json(java script object notation) or xml file.i prefer json because gives programmers...

msbuild - TFS: Wix using TfvcTemplate.12 unable to find source files -

msbuild - TFS: Wix using TfvcTemplate.12 unable to find source files - i need utilize tfvctemplate.12.xaml because of pre , post build script execution back upwards , need run powershell script prebuild event. on tfs 2013, building wix project using old defaulttemplate.xaml works fine. while trying build using new default template tfvctemplate.12.xaml builds csharp project fine, wix unable find files, while files nowadays @ same location. here wix code: <?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?define sourcedir=$(var.outdir)?> <?warning **************** target=$(var.targetdir) ***********?> <?warning **************** src=$(var.sourcedir) **************?> <product id="*" language="1033" manufacturer="test" name="testing" upgradecode="db7dac5a-ed29-45e6-8029-89f6486a9aca" version="1.0.0.0...

php - Acl vs RBAC in ZF2 -

php - Acl vs RBAC in ZF2 - i want incorporate component of access command in application, saw zf2 offer: zend /permissions/acl , zend /permissions/rbac , know more efficient , secured , , zfc-rbac ? give thanks . it totally depends on needs. rbac access command managed permissions on simply roles, acl solution managing both resources , roles. rbac of zend framework 2 has complexities going simplified in zf3. if consider using rbac suggest check zfc-rbac zf-commons built on top of prototype zf3's rbac. here on github can find zfc-rbac . if consider acl suggest take @ bjyauthorize can found here php security zend-framework2 zend-acl zfc-rbac

How to load a VAADIN Java web page using curl or anything else -

How to load a VAADIN Java web page using curl or anything else - for vaadin java application, created class wich loaded when go on designed web page. this class must started each day @ 12:00am, wanted create bash script wich uses curl request designed page tolaod class , start everything. them problem is, when tried page curl using curl http://localhost:8080/cub2dv725/mailengine i this: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="x-ua-compatible" content="ie=11;chrome=1"> <style type="text/css">html, body {height:100%;margin:0;}</style> <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./vaadin/themes/reindeer/favicon.ico"> <link rel="icon" type="image/vnd.microsoft.icon" href="./vaadin/themes/reindeer/favicon.ico"...

javascript - How to set Backbone model to an objcet's child array? -

javascript - How to set Backbone model to an objcet's child array? - i've got backbone app gets info json array , appends html, when seek alter json info array object coundn't manage set related array model. note: i've took illustration of backbone construction website: http://bardevblog.wordpress.com/2012/01/16/understanding-backbone-js-simple-example/ here working code: json [ { "id": 0, "title": "abc", "list": [ { "type": 2, "date": "21.9.2012" } ] }, { "id": 1, "title": "cba", "list": [ { "type": 2, "date": "16.8.2013" }, { ...

java - Updating String variable in JLabel in JFrame -

java - Updating String variable in JLabel in JFrame - i have got little problem. have created 2 jframes, , in main 1 show string name. in other 1 can provide name. , when save 'name' variable name doesn't update in main frame. how update frame? public class main extends jframe { iframe frame = new iframe ("main"); jbutton button_name = new jbutton("enter name"); iframe frame_name = new iframe ("what name?"); point center = graphicsenvironment.getlocalgraphicsenvironment().getcenterpoint(); //get center of screen static image icon = toolkit.getdefaulttoolkit().getimage("icon.png"); buttonlistener button_listen = new buttonlistener(); /**************************************************************************/ string name = new string(); jbutton button_get_name = new jbutton("ok"); jtextfield field_name = new jtextfield(15); jpanel panel_name = new jpanel(); /*...

asp.net - Is cookies shared between two applications on same host machine -

asp.net - Is cookies shared between two applications on same host machine - i have 2 application hosted on machine urls below. "//mymachine:port1/appl" "//mymachine:port2/app2" both app1 , app2 utilize same login credentials. problem when user logs out of app2, app1 seems logged out , redirects login page. there settings in iis logout in app2 not impact app1. browser stores cookies base of operations on domain name , path, if pay attending cookie tab of firebug see session cookies of localhost stores in localhost domain name. 2 application have same cookies. can store application cookies on different path. response.cookies.add(new httpcookie("data") { value = "....", path = "/app1" }); response.cookies.add(new httpcookie("data") { value = "....", path = "/app2" }); asp.net asp.net-mvc cookies iis-7.5

winforms - c# draw linklabel on usercontrol -

winforms - c# draw linklabel on usercontrol - i'm designing usercontrol hold list of linklabel s. this: public class itemcontrol : linklabel {} public class itemscontrol : usercontrol { private readonly list<itemcontrol> items; public taskbox() { this.items = new list<itemcontrol>(); } public list<itemcontrol> items { { homecoming this.items; } } } but how can draw items on usercontrol 1 time add together them list? how can add together clicked event them in code? you can set flowlayoutpanel command on itemscontrol , utilize next code draw itemcontrol s it: foreach (var item in this.items) { flowlayoutpanel1.controls.add(item); item.linkclicked += item_linkclicked; } void item_linkclicked(object sender, linklabellinkclickedeventargs e) { messagebox.show(((item)sender).name); } using flowlayaoutpanel arbitrary, if don't utilize flowlayoutpanel , can set each...

java - concurrent threads for a method of EJB -

java - concurrent threads for a method of EJB - i have stateless ejb method process data. method works 5..20 seconds i need have 10 threads, executes method concurrently. made annotation method @schedule(second = "*", min = "*", hr = "*") container (glassfish 4) launches 1 thread method. i tried utilize annotation @asynchronous , create no effect what should do? write sec class using @schedule(second = "*", min = "*", hr = "*") phone call @asynchronous ejb method - then, if duration said, should start new thread every second. minimal example caller.java public class caller { @ejb asyncejb asyncejb; @schedule(second = "*", min = "*", hr = "*") public void call() { this.asyncejb.call(); } } asyncejb.java @stateless public class asyncejb { @asynchronous public void call() { // long running stuff. } } ...

java - How to get response of Status Command from Thermal printer using Tcp/Ip socket -

java - How to get response of Status Command from Thermal printer using Tcp/Ip socket - i working on new android application utilize (ethernet) thermal printer ,the smartphone , printer in same network (192.168.2.0 ) , till here works fine can print ticket , send command printer successfully, not able satuts of printer (paper status exemple ), send command (socket outputstream )but can't read response (inputstream ) using tcp/ip (socket) , question , how can read response of printer using inputstream ?? help appreciated. java android sockets tcp-ip thermal-printer

html - How to get two h4 tags on the same line? -

html - How to get two h4 tags on the same line? - i'd 2 <h4> tags on same row in bootstrap can't work. i'd have 1 <h4> aligned left side, , 1 right side. i've tried floating left , floating right no avail. http://jsfiddle.net/v8ufbbdl/2/ <div class="container"> <div class="row"> <div class="coolcontainer"> <h1>bootstrap jsfiddle skeleton</h1> <h1>bootstrap jsfiddle skeleton</h1> </div> </div> </div> css @import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css'); .container { margin-top: 10px; } .coolcontainer { border: 3px solid #bbb; } .coolcontainer h1:first-of-type { float: left; } .coolcontainer h1:last-of-type { float: right; } this works. floats first 1 left , sec 1 right. http://jsfiddle.net/x8eszw59/ edit er, guess you'd have alter ...

charts - Advanced charting or plotting in JavaFx? -

charts - Advanced charting or plotting in JavaFx? - i'm looking way have more features basic javafx charts provide. "realtime" plotting of < 50 points divided multiple scatter series adding custom text labels points in scatter drawing lines within chart maybe custom color single scatter points i've seen people using multiple charts overlayed transparent background. i'm not sure if solution work future updates javafx. now i'm looking suggestions. in advance! i don't have exact solution, had similar need. found charting libraries poor in programming languages. however, found javascript had huge selection of charting (plotting) libraries. my suggestion utilize webview, , display chart in using javascript , html using library d3 or dimple. if don't know css/html/javascript there might learning curve. charts javafx real-time javafx-8

css - Fonts rendered incorrectly on SVG (Depending on browser) -

css - Fonts rendered incorrectly on SVG (Depending on browser) - i have svg: http://wefix.cf/resources/wefix2.svg the problem in chrome, looks fine, when switching net explorer, font changed. font using arial rounded mt. i want convert svg png, every online service returns image different font. why happening? as temporary solution, have ie query when browser ie, image displayed: http://wefix.cf/resources/wefix.svg which not appear on chrome... i can't svg work cross browser reason. can't convert of them png, keeps returning image false font. if http://wefix.cf/resources/wefix2.svg works browsers other ie, , http://wefix.cf/resources/wefix.svg works ie, can utilize conditional comments: <!--[if ie]> <img src="http://wefix.cf/resources/wefix.svg" alt="logo" /> <![endif]--> <!--[if !ie]> --> <img src="http://wefix.cf/resources/wefix2.svg" alt="logo" /> <!-- <...

Constrain code to a fixed value or subset ValueSet via FHIR Profile -

Constrain code to a fixed value or subset ValueSet via FHIR Profile - would constrain particular code (defined valueset) fixed value or subset of original valueset via fhir profiles. clinical decision back upwards (cds) need 1) restrict status condition occurrence such status code cannot have value 'refuted' , 2) restrict status nonoccurrence status must 'refuted'. the core profile condition resource this: <element> <path value="condition.status"/> <definition> <short value="provisional | working | confirmed | refuted"/> <formal value="the clinical status of condition."/> <min value="1"/> <max value="1"/> <type> <code value="code"/> </type> <ismodifier value="true"/> <binding> <name value="conditionstatus"/...

java - why is Immutable Objects safe in Double-Checked Locking? -

java - why is Immutable Objects safe in Double-Checked Locking? - at bottom of http://www.cs.umd.edu/~pugh/java/memorymodel/doublecheckedlocking.html, says: double-checked locking immutable objects if helper immutable object, such of fields of helper final, double-checked locking work without having utilize volatile fields. thought reference immutable object (such string or integer) should behave in much same way int or float; reading , writing references immutable objects atomic. the sample , explanation of mutable 1 follows: // broken multithreaded version // "double-checked locking" idiom class foo { private helper helper = null; public helper gethelper() { if (helper == null) synchronized(this) { if (helper == null) helper = new helper(); } homecoming helper; } // other functions , members... } the first reason doesn't work the obvious reason doesn't ...