Posts

Showing posts from April, 2010

javascript - Google Maps API custom marker animation and orientation along path -

i trying create google map app shows route source destination in straight line ('as crow flies'). have general app working. can put in start , end destination , draw line start finish. also, have generic marker moves along straight line route start finish. want replace generic marker custom drawn marker. also, custom marker oriented in line route. in other words if custom marker car want car facing right direction goes along route. i see demo, not sure how doing this. http://www.morethanamap.com/demos/visualization/flights any suggestions? thanks! you'll need set iconsequence polyline. iconsequence requires symbol, example-svg car : https://upload.wikimedia.org/wikipedia/commons/f/f6/car.svg (© pypaertv ) demo: function initialize() { var origin = new google.maps.latlng(39.904211, 116.407394), destination = new google.maps.latlng(40.4167754, -3.703790), map = new google.maps.map(document.getelementbyid('map-canvas'), {...

html - image firefox chrome missmatch -

i'm first time poster, long time enthusiast. so i'm working on personal website, , haven't got experience in html/css, i've come across strange mismatch between firefox , chrome. , wondering if wise people of internet direct me (probably obvious) error is. the problem im experiencing firefox cut of last 2 letters of image. ive colored different parts more visible. i'll post code want see that. if guys point me towards solution obliged. firefox: http://i.imgur.com/afbyws7.png chrome: http://i.imgur.com/xumaiwk.png /* reset ------------------------------------------------------------ */ * { margin: 0; padding: 0; } html { overflow-y: scroll;} body { background:#ffffff; font-size: 13px; color: #666666; font-family: arial, helvetica, sans-serif;} ol, ul { list-style: none; margin: 0;} ul li { margin: 0; padding: 0;} h1 { margin-bottom: 10px; color: #111111;} a, img { outline: none; border:none; color: #000; font-weight: bold; text-transform: upp...

wpf - Notify parent ViewModel of changes in child ViewModels -

i have read few articles on here, describe how listen notifications raised. however: still having trouble apply application. i have application several "pages". one of pages contains wpf treeview control in along several viewmodels , data models. public class folderssearchviewmodel { private readonlycollection<drivetreeviewitemviewmodel> _drives; public folderssearchviewmodel(string[] logicaldrives) { _drives = new readonlycollection<drivetreeviewitemviewmodel>( environment.getlogicaldrives() .select(s => new driveinfo(s)) .where(di => di.isready) .select(di => new drivetreeviewitemviewmodel(di)) .tolist() ); } public readonlycollection<drivetreeviewitemviewmodel> drives { { return _drives; } } } this viewmodel contains drivetreeviewitemviewmodels , bound via datacontext usercontrol ("page"). the drive- , director...

package - How to apply puppet manifests and modules WITHOUT installing Puppet RPM? -

i create rpm package applies puppet manifest on server not contain puppet, facter , hiera. also, , more importantly, should able apply without being obliged install neither of these tools (puppet, facter, hiera) on production server. so basically, package should run following command without installing of required packages: puppet apply install.pp --modulepath=./modules --hiera_config=./conf/hiera.yaml how can proceed make such package ? idea extract 'binary' files puppet/hiera/facter rpms include them in 1 ? thanks! installing relevant packages , removing them far fastest , safest way wish. maybe can convince customer cost in time other solution not worth money. anyway, if packages not option, let's innovative: you not have install packages, can install puppet via ruby gems in same way, can use source tarballs those 2 options might work, not innovative enough. what installing puppet 'locally' on disk via gems or tarballs, , mounting ...

javascript - How to detect Facebook in-app browser? -

have had experience in facebook in-app browser detection? what's core difference in user agent? i don't want know if mobile/ios/chrome. need know whether user agent specific facebook in-app browser you can check fban / fbav in user agent. check link: facebook user agent sample code @sascha suggested function isfacebookapp() { var ua = navigator.useragent || navigator.vendor || window.opera; return (ua.indexof("fban") > -1) || (ua.indexof("fbav") > -1); }

Java websocket client using tyrus in OSGi container -

as explained in question title, i'm trying create websocket client java (jar) application, later deployed osgi container (kura, if know framework). i'm using tyrus javax.websocket implementation. note library have imported on application is: tyrus-standalone-client-1.11.jar follows code: client.java import java.io.ioexception; import java.net.uri; import javax.websocket.clientendpointconfig; import javax.websocket.endpoint; import javax.websocket.endpointconfig; import javax.websocket.messagehandler; import javax.websocket.session; import org.glassfish.tyrus.client.clientmanager; public class client { private session session; public void connect() { try { final clientendpointconfig configuration = clientendpointconfig.builder.create().build(); clientmanager client = clientmanager.createclient(); client.connecttoserver( new endpoint() { @override public void onopen(session session,endpointco...

Creating a surface with a sketch using Abaqus Python -

my question might sounds rather simple knowledge in abaqus scripting inexistent. aim represent set of polygons in same part each polygon represents 2d surface (in 3d space) of part. creating script generate sketch each polygon (not sure if best approach). creating surface foreach of sketches. how achieve this? many thanks! the code: from abaqus import * abaqusconstants import * import sketch import part mymodel=mdb.model(name='model-1') #-------------first polygon------------------------------- s1=mymodel.constrainedsketch(name='__poly0__', sheetsize=100) g, v, d, c = s1.geometry, s1.vertices, s1.dimensions, s1.constraints s1.line(point1=(10.0, 10.0), point2=(10.0, 15.0)) s1.line(point1=(10.0, 15.0), point2=(-10.0, 15.0)) s1.line(point1=(-10.0, 15.0), point2=(-10.0, -15.0)) s1.line(point1=(-10.0, -15.0), point2=(10.0, -15.0)) s1.line(point1=(10.0, -15.0), point2=(10.0, -10.0)) s1.line(point1=(10.0, -10.0), point2=(5, 0)) s1.line(point1=(5, 0), point2=(...

ruby on rails - How to query two tables from database in one controller -

i have 2 tables 1 many (1 challenge many entry) want last entry challenges want title of challenge last entry. so far have: def index @discovers = challenge.all.map{|c| c.entries.last} end how add fact want challenge.title? def index @challenges = challenge.all end then inside view <% @challenges.each |challenge| %> <%= challenge.title %> # give challenge title <%= challenge.entries.last %> # give last entry challnge <% end %>

javascript - Why does this binding only work for the first three times I change the value? -

consider following snippet: var items = ["item 1", "item 2"] window.app = ember.application.create(); window.app.applicationcontroller = ember.controller.extend({ sitems: items, svalue: items[0], slabel: ember.computed('svalue', function() { return this.get('svalue') == items[0] ? "you picked item 1!" : "you picked item 2!"; }) }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://builds.emberjs.com/tags/v1.13.5/ember.min.js"></script> <script src="http://builds.emberjs.com/release/ember-template-compiler.js"></script> <script type="text/x-handlebars"> {{view "select" content=sitems value=svalue}} {{slabel}} </script> after changing value of <select> 3 times, no longer trigge...

c# - @Html.DisplayFor() is not working with custom model sub-class -

so have mvc application manage list of sites , on details view none of sub classes within model render though @html.displaynamefor rendering label correctly. here view code working fine: <tr> <td> <span class="label label-info">@html.displaynamefor(model => model.sitename)</span> </td> <td style="text-align: center;"> @html.displayfor(model => model.sitename) </td> </tr> this code displayfor generates nothing: <tr> <td> <span class="label label-info">@html.displaynamefor(model => model.version.versionname)</span> </td> <td style="text-align: center;"> @html.displayfor(model => model.version.versionname) </td> </tr> here site model: public class site { public int id { get; set; } [required] [display(name = "link")] [datatype(datatype....

Updating/deleting string variables in a class through the class' methods (functions) in python -

i new user python , trying update class have called player(self, name, position) through new class call api(object). in class api(), have crud approach in creating player, retrieving player, updating player, , lastly, deleting player. struggling method in update , delete function. for update, calling self.retrieve_player[name] since method reads existing players initialized dictionary (found in init file of class api. also, main() function @ bottom instantiating these methods creating instance of object, calling api , specified methods. e.g.: c = api() c.create_player('buster posey', 'catcher') c.retrieve_player('james') c.update_player('buster posey', 'firstbaseman') the code struggling outputting updated object created: def update_player(self, name, position): updated_player = self.retrieve_player(name) updates = self.create_player(name, position) updated_player = updates return updates ...

PagingItemReader vs CursorItemReader in Spring batch -

i have spring batch multiple steps, sequential , parallel. of these steps involve fetching millions of rows , query has multiple joins , left joins. tried using jdbcpagingitemreader order clause hangs query. don't results after 30 minutes of waiting. switched jdbccursoritemreader. approach fine ? understand jdbccursoritemreader fetches data @ once , writes out based on commit interval. there option specify reader fetch, say, 50000 records @ time, application , system not overloaded ? thank response, michael. have 22 customized item readers extended jdbccursoritemreader. if there multiple threads, how spring batch handle resultset? there possibility of multiple threads reading same resultset in case, also? the jdbccursoritemreader has ability configure fetchsize (how many records returned db each request), depends on database , it's configuration. example, databases can configure fetch size , it's honored. however, mysql requires set fetch side integer.m...

try to create new variable using loop in R,but failed -

i new user r.i have imported data txt file using code down below,but want create new variable when importing data,the variable called case.the value of case first row 1 , rest 0. and when try run code,the console did not anytime wrong ,the data has been imported, new variable wasn't created.i don't know why. for(i in filenames){ perpos <- which(strsplit(i, "")[[1]]==".") data=assign( gsub(" ","",substr(i, 1, perpos-1)), read.table(paste(filepath,i,sep=""),fill=true,header=true,quote ="",row.names = null,sep="\t") ) strsplit(i, "") filename = strsplit(as.character(i),"\\.txt") data$case = ifelse(data$name=="filename",1,0) } thanks guys! used @joosts's code , made ajustment. code down below works fine. fn <- paste(filepath,filenames,sep="") mylist <- lapply(fn, read.table,fill = true, header = true, quote = "...

browserify - require is called earlier as import statement -

i've got module m1 needs initialized before can import module m2 : import * m1 'm1'; m1.init(...) import * m2 'm2'; i updated browserify , switched 6to5ify babelify transformer. afterwards, require calls in bundle got moved top: ... var _m1 = require('./m1'); var m1 = _interoprequirewildcard(_m1); var _m2 = require('./m2'); var m2 = _interoprequirewildcard(_m2); m1.init('init value'); ... why require calls moved top? can use es6 module import syntax import m2 after m1.init called? can use require directly import * m1 'm1'; m1.init(...) const m2 = require('m2'); and get var _m1 = require('./m1'); var m1 = _interoprequirewildcard(_m1); m1.init('init value'); var m2 = require('./m2'); but seems hack me. can use es6 module import syntax import m2 after m1.init called? irrespectively how babel transpiles code, answer is: no . spec dictates dependencies evaluated...

javascript - Collada Loader in Three.js does not load a scene of a few objects -

i'm quite new in three.js, question not trivial. i have collada scene in dae format, in fact contains links dae-files. looks inside of "parent" file: <library_visual_scenes> <visual_scene id="thescene" name="thescene"> <node id="designtransform1" name="designtransform1" type="node"> <matrix>0.87811053 0.46947187 0.0922935 19.499561 -0.46690002 0.88294739 -0.04907337 98.835884 -0.10452887 0 0.99452192 0.28129196 0 0 0 1</matrix> <instance_node url="./first_dae/first_dae.dae"/> </node> <node id="designtransform2" name="designtransform2" type="node"> <instance_node url="./second_dae/second_dae.dae"/> </node> </visual_scene> </library_visual_scenes> <scene> <instance_visual_scene url="#thescene"/> </scene> this scene can opened desktop software ...

c# - select from union select with order by and group by in mongodb using aggregation -

i try rewrite next sql query mongodb using c# aggregation framework, can`t understand how it. need union results. select top 100 res.agent, res.type, res.opens ((select ua.clientdomain agent, ua.type type, count(*) opens treadconfirm rc inner join tuseragent ua on rc.useragentid = ua.id rc.userid = 2654 , rc.campaignid = 27442 , ua.type = 1 group ua.clientdomain, ua.type) union (select ua.family agent, ua.type type, count(*) opens treadconfirm rc inner join tuseragent ua on rc.useragentid = ua.id rc.userid = 2654 , rc.campaignid = 27442 , ua.type <> 1 group ua.family, ua...

How to convert epoch time to Human readable in Teradata -

in teradata table, have epoch timestamps under column dhtimestamp dhtimestamp 1435308067705 1434965874565 1434763800794 1434775876034 1434765207057 how can convert epoch timestamp human date/time format on teradata? this sql udf standard unixtime: /********** converting unix/posix time timestamp unix time: number of seconds since 1970-01-01 00:00:00 utc not counting leap seconds (currently 24 in 2011) working negative numbers. maximum range of timestamps based on range of integers: 1901-12-13 20:45:52 (-2147483648) 2038-01-19 03:14:07 (2147483647) can changed use bigint instead of integer 20101211 initial version - dieter noeth **********/ replace function epoch2timestamp (unixtime int) returns timestamp(0) language sql contains sql deterministic returns null on null input sql security definer collation invoker inline type 1 return cast(date '1970-01-01' + (unixtime / 86400) timestamp(0)) + ((unixtime mod 86400) * interval '00:00:01...

php - Using mod rewrite to use urls without query strings -

i trying use mod rwerite cant figure out... the way understand it, following should possible: when user clicks on link <a href="/contents/folder/somepage_17">linktext</a> should able make server believe want /contents/folder/somepage.php?id=17 , access query string via $_get in somepage.php file, right? if so, how put in mod rewrite syntax? also, have lots of pages have dashes in names, i'd have quite high number of urls this-is-a-page_19 . currently, urls have query string in them (like /abc/de/page.php?id=12 ) i'd have urrls without query string. however, need kind of information, page being called because access database information page (title, keywords, description,...). help highly appreciated! this might work rewriteengine on rewritebase / rewriterule ^contents/folder/somepage_([0-9]+)$ /contents/folder/somepage.php?id=$1 [nc,l] and can access var using $_get['id']

javascript - Format not working -

code provided @krr function insertphonenumbers() { var ss = spreadsheetapp.getactivespreadsheet(); var targetsheet = ss.getsheetbyname("report"); var sourcesheet = ss.getsheetbyname("sheet1"); var nrange = sourcesheet.getrange(2, 3, sourcesheet.getlastrow(), 1) var sourcenotes = nrange.getvalues() //logger.log(sourcenotes); var notes = targetsheet.getrange(2, 6, sourcesheet.getlastrow(),1) var formatednotes = notes.setnumberformat(0); notes.setnotes(sourcenotes); works , supposed added var formatednotes = notes.setnumberformat(0); but output i'm getting same if don't put formatting instruction, is: 0000000000.00000 it should (as per code) 00000000000 my first attempt var formatednotes = notes.setnumberformat('(000) 000-0000') didn't work either trying get (123) 456-7890 bottom line can't format work. warp format in quotation marks. setnumberformat("0") or setnumberformat(...

asp.net mvc - JQuery and JQuery.Validate "Unable to get property 'call' of undefined or null reference" error -

Image
i have asp.net mvc 5 application using jquery v1.10.2 , jquery.validate v1.13.1 , getting following error in chrome when validating form clicking "submit" or when input validated after losing focus: and internet explorer gives me same error. i using bundle system bundle different scripts , maintained in project (which shared between applications making code maintainable in 1 place). bundles this: bundletable.bundles.add(new scriptbundle(bundlenames.javascript.jquery).include( string.format("~/{0}/jquery-1.10.2.js",_javascriptfolder""), string.format("~/{0}/jquery-1.10.2.min.js",_javascriptfolder), string.format("~/{0}/jquery-migrate-1.2.1.js",_javascriptfolder), string.format("~/{0}/jquery-migrate-1.2.1.min.js",_javascriptfolder))); bundletable.bundles.add(new scriptbundle(bundlenames.javascript.jqueryvalidation).include( ...

elasticsearch, documents with data in field1 OR field2 -

how instruct elasticsearch return documents have data in 1 of following fields: ['field1','field2']? i have tried: { 'query': { 'bool':{ 'must':[ 'multi_match':{ 'fields':['field1','field2'], 'operator':'and', 'tie_breaker':1.0, 'query': '*', 'type':'cross_fields' } ] } } } i tried: { "query":{ "wildcard": { "field1":"*" } } } which works, but: { "query":{ "wildcard": { "field*":"*" } } } does not you can 2 exists filters in bool filter as example, set simple index , ...

unit testing - Hooking python coverage during a test suite run? -

i have test suite runs in bash, underneath uses number of python scripts. want see during test suite how of python scripts being covered. i've looked @ python-coverage work suite written in python. know of tool can hook python, give list of scripts , on completion of suite see coverage results? tia you can have coverage.py started automatically when python starts. page measuring subprocesses coverage.py explains how it.

spring - int-ftp:inbound-channel-adapter fetch in sequential order? -

how can make int-ftp:inbound-channel-adapter fetch files in order created on remote system ? for example : file1 - 15:31:01 file2 - 15:32:02 file3 - 15:33:03 file4 - 15:34:04 file5 - 15:35:05 assume application down 5 minutes, in time 5 files got created, once restart/redeploy application, int-ftp:inbound-channel-adapter has fetch files local system in order created(timestamp). please suggests. regards, ravi the <int-ftp:inbound-channel-adapter> has comparator attribute: <xsd:attribute name="comparator" type="xsd:string"> <xsd:annotation> <xsd:documentation><![cdata[ specify comparator used when ordering files. if none provided, order determined java.io.file implementation of comparable. ]]></xsd:documentation> </xsd:annotation> </xsd:attribute> it used internal queue : public filereadingmessagesource(comparator<file> receptionordercomparator)...

ruby on rails - nginx load wrong asset file path in production mode -

the nginx tried give me following assets files that. get http://www.lazyair.co/assets/kode/css/font-awesome.min.css but files doesnt exist. actual file path should ugly. get http://www.lazyair.co/assets/kode/css/font-awesome2131e1321e12qd.min.css demo website buggy root cause on nginx.conf location ^~ /assets/ { gzip_static on; expires max; add_header cache-control public; } nginx.conf root /home/sample/rails-app/public ; location ^~ /assets/ { gzip_static on; expires max; add_header cache-control public; } try_files $uri/index.html $uri @rails-app; location @rails-app { proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_redirect off; proxy_pass http://rails-app; # reverse proxy cache proxy_cache default; proxy_cache_lock on; proxy_cache_use_stale updating; add_header x-cache-status $upstream_cache_status; } production.rb co...

file io - write.csv strange encoding in R -

i encountering strange problem not able resolve myself. suddenly, write.csv encoding csv file in way make impossible read in libre office. command has worked until today. now, if try use write.csv (or more general equivalent write.table) , try open file libre office, bunch of symbol , asian character. don't understand what's happening here, seems default encoding of write.csv has changed itself. different thing done today reading text file encoded using program eprime, , had use following command in order read file a=read.delim("pre_newtask_run1.txt", fileencoding="ucs-2le") is possible has changed default encoding of write.csv ? , if case, how can change ? thanks in advance help it may difficult provide precise answer without sample data or reproducible code being made available. having said that, initial attempt can attempt force export of data use of specific encoding example, code: con<-file('filename',encoding=...

c# - WPF set selected item in listview when combobox is selected -

i have following listview : <listview grid.row="1" itemssource="{binding transducers}" selecteditem="{binding selectedtransducer}"> <listview.view> <gridview> <gridviewcolumn header="id" displaymemberbinding="{binding labid}"/> <gridviewcolumn header="manufacturer" displaymemberbinding="{binding manufacturer}"/> <gridviewcolumn header="channel"> <gridviewcolumn.celltemplate> <datatemplate> <combobox itemssource="{binding datacontext.channels, elementname=maininterface}" selecteditem="{binding channel, mode=twoway}" selectedvalue="{binding channel.id}" selectedvaluepath="id"/> </...

Error while receiving ArrayList<Class> in WebService of Spring sent from Android App -

i want send arraylist class spring web service android app, receiving json kind of data should cast automatically arraylist in web service not doing that. code android app some.class public serverresponse addselectedproducts(arraylist<totalselectedproduct> totalselectedproducts) { gson gson = new gsonbuilder() .setfieldnamingpolicy(fieldnamingpolicy.lower_case_with_underscores).create(); restadapter restadapter = new restadapter.builder() .setendpoint("http://10.0.3.2:8082") .setconverter(new gsonconverter(gson)) .build(); retrofitservice service = restadapter.create(retrofitservice.class); try { serverresponse serverresponse = service.addselectedproducts(totalselectedproducts); log.i("imin:aproducts&i got",boolean.tostring(serverresponse.isadded())); return serverresponse; } catch (retrofiterror error) { log.e("***error***",error.tost...

SVN repo sync with TFS integrated Git -

we have bunch of teams happily using integrated tfs git repo in tfs 2013 , set ci/cd, have 1 team that's been off on own while - they've been using tfs work item tracking , have been using local svn repo local builds, manual qa , deploy etc. they don't want transition git (don't see point) , adamant want use svn. because of our other teams use git our standard tfs team project template sets team project use integrated git, can't use svnbridge link svn repo tfs version control without having go through lengthy process of creating new team projects , using tfs integration move of work items (and history) across - messy proposition @ best. what i'd use subgit mirror svn repo tfs integrated git - of subgit documentation refers local git repo gets created part of subgit config - i'd want instead use existing tfs integrated git repo relates existing team project. i'm open suggestions around best way attack conundrum - given team must use svn , ci/cd ...

msmq - Exception on install msmqdistributor for Enterprise Library 6 -

i trying install msmqdistributor service enterprise library 6, got exception: an exception occurred during install phase. system.invalidoperationexception: unable installer types in c:\entlib\msmqdistributor.exe assembly. inner exception system.reflection.reflectiontypeloadexception thrown following error message: unable load 1 or more of requested types. retrieve loaderexceptions property more information.. that requested types looking for? thanks in advance! i have solved myself. hope may other people wanted use msmq logging out. i re-downloaded source code, , using batch command recompiled whole enterprise library 6. generated working msmqdistributor.exe. please note, recompiled source code lab solution, , did not work.

javascript - a function that makes a inner html with a video tag -

can pls fix javascript function: function open(file, poster) { document.getelementbyid("video").innerhtml = "<video class='right' width='320' height='240' controls poster='" + poster + "'> <source src='" + file + "' type='video/mp4'> browser not support video tag. </video>" } and sure, when call it, call this: open(file.mp4, poster.png); or this: open("file.mp4", "poster.png"); all did wrong multiline string - not idea injavascript function openvideo(file, poster) { document.getelementbyid("video").innerhtml = "<video class='right' width='320' height='240' controls poster='" + poster + "'><source src='" + file + "' type='video/mp4'>your browser not support video tag.</video>" } // call using following format openvideo('fi...

How to manage Oauth access token in android and its flow between activities? -

i have built rest api using rails , doorkeeper. i'm using assertion grant flow , facebook login create , login user in android client. i've logged in , got access token server using retrofit. access token has token , refresh_token , token_type , expires_in , created_at info. i have following option manage , maintain token while user browsing android app. save info access token in sharedpreferences when user opens app , logs in. , leads main activity on successful login, access shared preferences , access api using token. second option is, pass access token object parcelable object , access_token in next activity using object. i can check if access_token expired comparing current time , created_at time. everytime before accessing api. if expire, access new token using refresh_token. i think both of above approaches leads code duplication , repeating same thing. if there other approach it, that'll great well. think it'd great if retrofit client can m...

c# - Why i'm getting exception No connection could be made when trying to send data to a server? -

this method: private void senddatatoserver() { webrequest request = webrequest.create("http://10.0.0.2:8080 "); request.method = "post"; string postdata = "this test posts string web server."; byte[] bytearray = encoding.utf8.getbytes(postdata); request.contenttype = "application/x-www-form-urlencoded"; request.contentlength = bytearray.length; stream datastream = request.getrequeststream(); datastream.write(bytearray, 0, bytearray.length); datastream.close(); webresponse response = request.getresponse(); console.writeline(((httpwebresponse)response).statusdescription); datastream = response.getresponsestream(); streamreader reader = new streamreader(datastream); string responsefromserver = reader.readtoend(); console.writeline(responsefromserver); ...

r - Simultaneously merge multiple data.frames in a list -

i have list of many data.frames want merge. issue here each data.frame differs in terms of number of rows , columns, share key variables (which i've called "var1" , "var2" in code below). if data.frames identical in terms of columns, merely rbind , plyr's rbind.fill job, that's not case these data. because merge command works on 2 data.frames, turned internet ideas. got 1 here , worked in r 2.7.2, had @ time: merge.rec <- function(.list, ...){ if(length(.list)==1) return(.list[[1]]) recall(c(list(merge(.list[[1]], .list[[2]], ...)), .list[-(1:2)]), ...) } and call function so: df <- merge.rec(my.list, by.x = c("var1", "var2"), by.y = c("var1", "var2"), = t, suffixes=c("", "")) but in r version after 2.7.2, including 2.11 , 2.12, code fails following error: error in match.names(clabs, names(xi)) : names not match previous names (incidently, ...

What username/credentials are used to do File read/write operation using servlet? -

i writing , reading image file directory using servlet. want know if servlet uses appserver credentials read/write folder or else ? for reading/writing need process runs application server has os priviledges write/read directory/file.

html - Find the browser version using css -

i have problem ie8, need apply css if browser not ie8 in html can using <!--[if lt ie 9]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]--> <!--[if lte ie 8]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]--> but want filter using css is there way can instruct browser apply these styles if not ie8 ? for example, how can make css not have impact in ie8? @font-face{ //some css } conditional comments work (<!--[if lte ie 8]><stylesheet><![endif]-->) , if want in stylesheet, there is way: body { color: red; /* browsers, of course */ color: green\9; /* ie */ } the important thing here "\9", has "\9". i'm not clear on why is. edit: \9 hack isn't enough itself. exclude ie9, need :root hack: :root body { color: red\9; /* ie9 */ } other bro...

operators - BigDecimal Class in Java - Reason behind Constant values -

i working out java puzzlers second puzzle. public class change { public static void main(string args[]) { system.out.println(2.00 - 1.10); } } you think answer 0.9. not. if workout 0.8999999. solution given system.out.println(new bigdecimal("2.00").subtract(new bigdecimal("1.10"))); now print 0.9. understood why prints 0.89999. while curiously debugging bigdecimal class, found there many constant values substituted in of places. i'll list below , interested know reason behind it. bigdecimal.java line number 394, while (len > 10 && character.digit(c, 10) == 0) { offset++; c = in[offset]; len--; } here character.digit (c,10). public static int digit(char ch, int radix) { return digit((int)ch, radix); } here 10 passed radix. q1. why 10 passed there.?? bigdecimal.java line number 732 int sign = ((valbits ...

product - Magento multiple add to cart button -

i'm new in magento development. need multiple add cart buttons quantity field on product page. is there extension ? image link http://i.stack.imgur.com/qc5nl.jpg please me. thank in advance.

Regex to match username using negative look aheads? -

i want use regex such i'm given list of matches username there not "." present in name account name: sasha.grey //bad match account name: liz.hurley //bad match account name: sharonstone //match tried out regex: account name:\s+(.*?(?!.)) i have tried match on regexbudy , result doesn't work in both cases. i think vks answer correct. another way (avoiding lookaheads @ all) match . , \n (and whatever character should not in account name account name:\s+([^.\n]+)$ edit: $ mark end of line (oder end of file - depends on flavor). might want use \n instead. maybe want know expression doing: \s+(.*?(?!.)) is not working because match \s+ whitespace (one or more occurences) .*? character (one or many, less possible) (?!.) not any character \n if wanted ignore literal . , have escape (so it's (?!\.) or (?![.]) - then, still not work since description is: lookahead non literal dot. this, match '' .*? ...

Updating an android notification sequentially -

i building messaging application notifies users when new message comes in. because happen several times day (or several times hour), don't want continually throw new notifications. instead, if user has not dismissed notification, update number of new messages pending (following "stacking" design guideline). in android documentation, there example of updating notification number: mnotificationmanager = (notificationmanager) getsystemservice(context.notification_service); // sets id notification, can updated int notifyid = 1; mnotifybuilder = new notificationcompat.builder(this) .setcontenttitle("new message") .setcontenttext("you've received new messages.") .setsmallicon(r.drawable.ic_notify_status) nummessages = 0; // start of loop processes data , notifies user ... mnotifybuilder.setcontenttext(currenttext) .setnumber(++nummessages); // because id remains unchanged, existing notification // updated. ...

Is it possible to customize or extend the functionality the Phone/contacts application on android phone -

i want customize contacts or phone application on android mobile. instance adding more details while creating contact. adding additional button screen displayed when contact selected. button should trigger custom functionality. a programmer can create separate application managing contacts has features seek. i want customize contacts or phone application on android mobile. there ~1.5 billion android devices in use, spanning thousands of device models hundreds of manufacturers. there dozens, if not hundreds, of built-in "contacts or phone applications" on devices. cannot extend of them, unless happen have api allow that. not aware of do.

android - copy database from assets to phone and access that -

i creating database in sqlitebrowser. copy database file manually converting .sqlite format , copy assets->databases->(file) . , try access it, not able so. my database code public class data extends sqliteopenhelper { sqlitedatabase databaseobject; static string db_path = "/data/data/vishesh.goswami.ithinkk/databases/"; static string db_name = "project_db.sqlite"; sqlitedatabase db; private context mcontext=null; static int l=1; static string database_name="project_db.sqlite"; string getquestion=null; data(context context) { super(context, database_name, null, l); this.mcontext=context; } public void createdatabase() throws ioexception { boolean mdatabaseexist = checkdatabase(); if (!mdatabaseexist) { this.getreadabledatabase(); try { copydatabase()...