Tuesday, 15 September 2015

xsl fo - xsl-fo table - text align right - numbers not quite right-justified - a bit wonky -



xsl fo - xsl-fo table - text align right - numbers not quite right-justified - a bit wonky -

having bit of problem doing table numbers - seems right justification bit wonky.

when fo renders this, seems right justification of invoice number (ie 2311678) tiny bit left, , of vat number bit much right.

i had table positioned top right of page in test, , right border of vat number tiny bit left.

<xsl:template name="testlayout"> <fo:table width="59mm"> <fo:table-column column-width="23mm"/> <fo:table-column column-width="20mm"/> <fo:table-column column-width="25mm"/> <fo:table-body> <fo:table-row> <fo:table-cell number-columns-spanned="3"> <fo:block font-weight="bold">details</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>our ref:</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <fo:block text-align="right"> e/2004/001234 </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>policy no:</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <fo:block text-align="right"> gb0012345678 </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>invoice date:</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <fo:block text-align="right"> 17th june, 2014 </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>invoice no:</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <fo:block text-align="right"> 2311678 </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>due date:</fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <fo:block text-align="right"> 17th july, 2014 </fo:block> </fo:table-cell> </fo:table-row> <!-- vat details --> <fo:table-row> <fo:table-cell number-columns-spanned="2"> <fo:block>vat registration no:</fo:block> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block>119 1699 59</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template>

xsl-fo

jquery - Receiving an AJAX response in Node.js local server -



jquery - Receiving an AJAX response in Node.js local server -

i succesfully posting ajax post request mongodb.

however cannot seem grasp how receive response. scoured info , got impression has same-origin policy when running local server.

i trying log code sent via ajax in console.

ps: finish beginner in node.js.

here code in users.js file

router.post('/adduser', function(req, res) { var db = req.db; db.collection('userlist').insert(req.body, function(err, result){ res.send( (err === null) ? { msg: '',code:'1234' } : { msg: err } ); }); });

and ajax phone call in global.js file

$.ajax({ type: 'post', data: newuser, url: '/users/adduser', datatype: 'json' }).done(function( response ) { // check successful (blank) response if (response.msg === '') { console.log(response.code); // clear form inputs $('#adduser fieldset input').val(''); // update table populatetable(); } else { // if goes wrong, alert error message our service returned alert('error: ' + response.msg); }

jquery ajax node.js mongodb

file sharing - Why does directory vanish when I do SSHFS? How to setup SSHFS share on Max OSX 10.9? -



file sharing - Why does directory vanish when I do SSHFS? How to setup SSHFS share on Max OSX 10.9? -

i'm running max osx 10.9.3 , i'm trying setup sshfs file-share between macbook pro , remote file system. however, when seek it, doesn't work.

strangely enough, makes target directory disappear. has else seen happen? bug?

first see can ssh target machine:

% ssh remoteuser@xxx.xxx.xxx.xxx # <--- ssh remote scheme works! see below. remoteuser@xxx.xxx.xxx.xxx % ls -altr remotedir total 8 drwxr-xr-x 26 remoteuser remoteuser 4096 jun 22 01:00 .. drwxrwxrwx 2 remoteuser remoteuser 4096 jun 22 01:08 . remoteuser@xxx.xxx.xxx.xxx % exit % # <--- logged out of remote scheme

next, create directory locally , verify created:

% pwd /mnt % ls total 0 drwxr-xr-x 31 root admin 1122 jun 18 18:34 ../ drwxr-xr-x 2 root admin 68 jun 23 08:11 ./ % sudo mkdir share1 % ls drwxr-xr-x 31 root admin 1122 jun 18 18:34 ../ drwxr-xr-x 4 root admin 136 jun 23 08:50 ./ drwxr-xr-x 2 root admin 68 jun 23 08:50 share/

now seek setup sshfs share:

% sudo sshfs remoteuser@xxx.xxx.xxx.xxx:remotedir /mnt/share1 remoteuser@xxx.xxx.xxx.xxx's password: %

ok. seems have worked. no errors. let's see share created, shall we?

% ls ls: share1: no such file or directory total 0 drwxr-xr-x 31 root admin 1122 jun 18 18:34 ../ drwxr-xr-x 3 root admin 102 jun 23 08:12 ./

what? not file sharing not working, share1 directory seems have vanished! (although file scheme seems know missing, weird).

where did /mnt/share1 go , how setup sshfs?

sshfs doesn't come os x afaik, should mention how installed it. i'm guessing sshfs designed used fstab or mount rather called directly. seek like:

mount -t sshfs remoteuser@xxx.xxx.xxx.xxx:remotedir /mnt/share1

osx file-sharing sshfs

doxywizard - Generate Source Code for specific file using Doxygen -



doxywizard - Generate Source Code for specific file using Doxygen -

setting source_browser = true show source code files.

is possible show source of specific file? or enable \ref or equivalent using source_browser = false or remove source code specifics files if source_browser = true or equivalent

it possible using \include , \verbinclude.

/** * \verbinclude example.cs * \include example.cs * */ public class illustration { }

doxygen doxywizard doxygen-wizard doxygen-addtogroup

google maps api v3 - waypoints not returned in response object -



google maps api v3 - waypoints not returned in response object -

this question exact duplicate of:

google maps route generation waypoints 1 reply

i have next code, send requestobj 1 waypoint. result show me path 2 legs , 0 waypoints. want maintain waypoints. doing wrong ?

var requestobj = { origin: new google.maps.latlng(sn['lat'],sn['lng']), destination: new google.maps.latlng(en['lat'],en['lng']), travelmode: google.maps.directionstravelmode.driving, waypoints: new google.maps.latlng(45.00334,-73.00228), optimizewaypoints: true }; directionsservice.route(requestobj, function(response, status) { if (status == google.maps.directionsstatus.ok) { //process data. no way points found in : //directionsdisplay.directions.routes[0].legs[0].via_waypoints.length }});

see examples in the documentation

a waypoint consists of next fields:

location (required) specifies address of waypoint. stopover (optional) indicates whether waypoint actual stop on route (true) or instead preference route through indicated location (false). stopovers true default.

from api reference:

waypoints | array. | array of intermediate waypoints. directions calculated origin destination way of each waypoint in array. maximum allowed waypoints 8, plus origin, , destination. maps api business customers allowed 23 waypoints, plus origin, , destination. waypoints > not supported transit directions. optional.

you aren't passing in valid array of waypoints. see below:

var requestobj = { origin: new google.maps.latlng(sn['lat'],sn['lng']), destination: new google.maps.latlng(en['lat'],en['lng']), travelmode: google.maps.directionstravelmode.driving, waypoints: [{location:new google.maps.latlng(45.00334,-73.00228)}], optimizewaypoints: true }; directionsservice.route(requestobj, function(response, status) { if (status == google.maps.directionsstatus.ok) { //process data. no way points found in : //directionsdisplay.directions.routes[0].legs[0].via_waypoints.length }});

working fiddle

google-maps-api-3

linux - multi cpu core gzip a big file -



linux - multi cpu core gzip a big file -

how can utilize cpu cores in server(has 4 cores) linux debian on openvz gzipping faster one big file?

i trying utilize these commands can not set pieces together

get number of cores cores=$(grep -c '^processor' /proc/cpuinfo)

this split big file in more split -b100 file.big

this utilize gzip command multiple core find /source -type f -print0 | xargs -0 -n 1 -p $cores gzip --best

i don't know if best way optimize gzip process of big files..

use pigz, parallel gzip implementation.

unlike parallel gzip, pigz produces single gzip stream.

linux compression gzip cpu-cores

How do I call a JavaScript function that uses jQuery? -



How do I call a JavaScript function that uses jQuery? -

this question has reply here:

how execute jquery code [closed] 2 answers

i found function:

function squarifyme(element) { squareitup() window.onresize = function(element) { squareitup(); } function squareitup() { $(element).height($(element).width()); } }

with call:

$(document).ready(function() { squarifyme('.myelement'); });

but don't know how add together webpage... i've done bunch of times can't work.

the function named squarifyme() uses jquery.

this means first thing have import jquery.

the easiest way utilize hosted library.

to utilize google's hosted version of jquery, add together html page:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

alternatively, download jquery , include yourself.

. . .

now explain sec piece of code:

$(document).ready(function() { squarifyme('.myelement'); });

the first line says "execute next code when page ready."

you can learn more reading documentation $(document).ready().

. . .

now explain next piece of code:

squarifyme('.myelement'); function squareitup() { $(element).height($(element).width()); }

the first line above invokes function squarifyme() string parameter when document ready.

inside squarifyme() function squareitup() invoked.

it next (piece piece):

$('.myelement')

this code selects elements in document have css class myelement.

all such elements returned set, manipulated chained jquery code follows.

you can learn more selecting dom elements class here.

let's rewrite line of code clarity:

$(element).height($(element).width());

we'll rewrite this:

var $s = $(element); $s.height($s.width());

now $s equals set of dom elements have css class myelement.

in sec half of line, get width of each element in $s this:

$s.width()

you can learn more reading documentatino jquery.width().

we set height of element equal width this:

$s.height($s.width());

this create every element class myelement square.

. . .

now explain lastly piece of code:

window.onresize = function(element) { squareitup(); }

this code registers event handler window.onresize.

in other words, causes squareitup() invoked whenever user resizes browser window.

so... every time resize browser, every dom element class myelement become square.

you can learn more reading documentation window.onresize.

javascript jquery

Exception in thread "main" java.lang.IllegalArgumentException: Wrong number of attributes in the string + Mahout -



Exception in thread "main" java.lang.IllegalArgumentException: Wrong number of attributes in the string + Mahout -

i trying create file descriptor using command:

$ mahout_home/core/target/mahout-core--job.jar org.apache.mahout.classifier.df.tools.describe -p testdata/kddtrain+.arff -f testdata/kddtrain+.info -d n 3 c 2 n c 4 n c 8 n 2 c 19 n l

from link: https://mahout.apache.org/users/classification/partial-implementation.html on info file whatever file take , alter number of attributes string n 3 c 2 n c 4 n c 8 n 2 c 19 n l .

i next exception:

exception in thread "main" java.lang.illegalargumentexception: wrong number of attributes in string

please help!

there couple of reasons might error that...

wrong descriptor: putting sake of completeness. must have checked 1 out. have given wrong descriptor data. re-check number , type of columns , give them correctly descriptor. bad separator: re-check delimiter used in data. might create trouble. may info have has wrongly placed delimiter in records. create sure of that. special characters: in few experiments, have noticed mahout not enjoy if there special characters, or info consists of characters of language other english language (unless of course, tweak around code). create sure have way of handling them, , should go.

anyways these fighting can create descriptor of data. atb.

mahout

Flex / adobe air error collection service -



Flex / adobe air error collection service -

i have adobe air .exe application randomly crashes without clear reason of cause.

i investigating ways in run service integrated app when crashes works in same way windows error dialog(send error log).

ideally log collect scheme info such event log, cpu , ram state, running processes etc

does know of that?

closest thing have found airbrake

thanks

you should uncaughterrorevent, allow hear thrown errors unhandled. can send info service (google analytics, maybe). there 2 problems this:

you don't have access much scheme info in flash/air, limited info supplied capabilities , system class. this can supplemented ane provides more info (i don't have on-hand, though have seen few in past) it not work if error occurs lower air runtime. if goes wrong in ane or in air itself, won't see error, crash.

alternatively, utilize crashlytics ane (mobile only, sorry) freshplanet seems handle lot improve (this hard crashes only, believe, , won't provide info air app itself, since lower level that).

documentation:

uncaughterrorevent system capabilities

flex error-handling air error-logging error-reporting

MySQL Select all items IS NOT NULL -



MySQL Select all items IS NOT NULL -

i have next structure:

//extra item1 item2 item3 1 2 null

with query everything:

selet * extra;

i homecoming results don't have null , don't want manually type each field these added @ time:

select * e e.sid = s.id , * not null

this fails.

if dont know names of columns . have this

show columns

you can utilize php array of columns got result . , can concat columns :

concat(<your list of columns>) not null

concat here returns null if of arguments null.

mysql

json - Converting str to dict in python -



json - Converting str to dict in python -

i got process's output using subprocess.popen() :

{ about: 'rrdtool xport json output', meta: { start: 1401778440, step: 60, end: 1401778440, legend: [ 'rta_min', 'rta_max', 'rta_average' ] }, data: [ [ null, null, null ], [ null, null, null ], [ null, null, null ], [ null, null, null ], [ null, null, null ], [ null, null, null ] ] }

it doesn't seem valid json me. have used ast.literal_eval() , json.loads(), no luck. can help me in right direction ? in advance.

indeed, older versions of rddtool export ecma-script, not json. according this debian bug report upgrading 1.4.8 should give proper json. see project changelog:

json output of xport json compilant keys beingness quoted now.

if cannot upgrade, have 2 options here; either effort reformat apply quoting object key identifiers, or utilize parser that's more lenient , parses ecma-script object notation.

the latter can done external demjson library:

>>> import demjson >>> demjson.decode('''\ ... { about: 'rrdtool xport json output', ... meta: { ... start: 1401778440, ... step: 60, ... end: 1401778440, ... legend: [ ... 'rta_min', ... 'rta_max', ... 'rta_average' ... ] ... }, ... data: [ ... [ null, null, null ], ... [ null, null, null ], ... [ null, null, null ], ... [ null, null, null ], ... [ null, null, null ], ... [ null, null, null ] ... ] ... }''') {u'about': u'rrdtool xport json output', u'meta': {u'start': 1401778440, u'step': 60, u'end': 1401778440, u'legend': [u'rta_min', u'rta_max', u'rta_average']}, u'data': [[none, none, none], [none, none, none], [none, none, none], [none, none, none], [none, none, none], [none, none, none]]}

repairing can done using regular expression; going assume identifiers on new line or straight after opening { curly brace. single quotes in list have changed double quotes; work if there no embedded single quotes in values too:

import re import json yourtext = re.sub(r'(?:^|(?<={))\s*(\w+)(?=:)', r' "\1"', yourtext, flags=re.m) yourtext = re.sub(r"'", r'"', yourtext) info = json.loads(yourtext)

python json dictionary rrdtool

entity framework - Cannot remove reference to EF version 6 in build -



entity framework - Cannot remove reference to EF version 6 in build -

i using tfs 2010 , vs 2012.

i failed in effort upgrade mvc4 mvc5. thought rolled project ok in tfs builds fail because references ef version 6 have not been removed.

as far can tell have removed ef v6 everywhere in code. in build have next message;

unified primary reference "entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089". using version instead of original version "4.4.0.0" in "c:\builds\3\solutiona\solutiona- test\sources\projectb\projectb\bin\debug\projectb.dll" because autounify 'true'. resolved file path "c:\builds\3\solutiona\solutiona - test\sources\mvc4\solutiona\solutiona.model\lib\entityframework.dll". reference found @ search path location "{candidateassemblyfiles}".

so "autounify true" mean?

decided create proper reply our comments. think initial problem out of sync dll, packages folder. re-installed ef 5 fresh still having packages issues.

this appears nuget setup. article same error latest build error. build cannot find entity framework .

in particular article accepted reply sounds similar issues you're having. http://msmvps.com/blogs/rfennell/archive/2011/10/17/using-nuget-and-tfs-build-2010.aspx point works locally, not in build process. allow me know if issues seems different.

entity-framework tfs msbuild

android - invalid key hash the key hash does not match any stored key hash -



android - invalid key hash the key hash does not match any stored key hash -

i have created app on facebook. have added keyhash , app running fine when came today , seek run 1 time again gives me error.

this sec time happens. previsouly when error removed app , add together 1 time again , starts working 1 time again , offcourse can't 1 time again , again.

one more thing, key hash mentioned in error not same added in app , if go app setting key hash right there.

delete app , seek create new hash key next method!

android facebook

apache - redirect from specific request -



apache - redirect from specific request -

i have this:

rewritecond %{query_string} ^something=true$ rewriterule ^$ http://www.a123dress.com/ [r=301,l]

i want redirect (*) request have "?something=true" to

http://www.a123dress.com/

it works for:

http://www.a123dress.com/?something=true

i want rewrite example:

http://www.a123dress.com/test/?something=true

to:

http://www.a123dress.com/test/

so cutting off ?something=true above in first example

your regex ^$ allowing home page / redirected. alter rule to:

rewritecond %{query_string} ^something=true$ [nc] rewriterule ^ %{request_uri}? [r=301,l,ne]

apache .htaccess mod-rewrite redirect rewrite

php - Should a switch statement be used this way? -



php - Should a switch statement be used this way? -

is acceptable utilize switch way of supporting multiple file formats, or bad practice?

like (untested):

<?php // load file switch ($data_format) { case 'xml': $openfile = simplexml_load_file($filename . '.xml'); break; case 'json': $openfile = json_decode(file_get_contents($filename . '.json')); break; } // stuff // save file switch ($data_format) { case 'xml': $openfile->asxml($filename . '.xml'); break; case 'json': file_put_contents($filename . '.json', json_encode($openfile, json_pretty_print)); break; } ?>

it depends on style of coding. if want work object oriented against idea. in case you'd utilize like:

class="lang-php prettyprint-override">$file = $repository->open($filename, $data_format); // stuff $file->save();

of course of study $repository->open() needs homecoming object different save method depending on info format.

however if not working object oriented old procedural style cannot see wrong utilize of switch statement.

php switch-statement

css - Problems with 'floating' UL -



css - Problems with 'floating' UL -

.menu li { float: left; color: #fff; font-weight: bold; } .menu li { display: block; height: 20px; min-width: 110px; text-decoration: none; border-radius: 3px; padding: 4px; padding-left: 6px; padding-right: 6px; margin-left: 25px; margin-right: 25px; } .menu li ul { display: none; max-width: 110px; padding: 4px; margin-left: 25px; margin-right: 25px; list-style: none !important; list-style-image: none !important; } .menu li a:hover { background-color: rgba(0, 88, 153, 0.8); } .menu li:hover ul { display: block; padding: 0; margin-top: 9px; list-style: none !important; list-style-image: none !important; } .menu li:hover ul { display: block; background-color: rgba(0, 88, 153, 0.8); width: 110px; border-radius: 3px; padding-top: 6px; padding: 4px; padding-left: 6px; padding-right: 6px; text-align: left; margin: 0; margin-bottom: 5px;

above here code i'm using, want ul float above everything, tried 'fixed' , 'absolute' disappears, tried alter 'margin-left' 'inherit' didn't work either. want ul float beneath parent li.

jsfiddle

you need position submenu absolutely after first having positioned parent li relative

html (corrected) (with @malcom container

<div class="container"> <div class="menu"> <ul> <li><a href="#">home</a> </li> <li><a href="#">sub</a> <ul> <li><a href="#">sub1</a> </li> <li><a href="#">sub2</a> </li> <li><a href="#">sub3</a> </li> </ul> </li> </ul> </div> </div> can see, text moves when hover 'sub'

css (clipped relevant parts)

.menu li { float: left; color: #fff; font-weight: bold; position: relative; /* */ } .menu li ul { position: absolute; /* */ display: none; max-width: 110px; padding: 4px; margin-left: 25px; margin-right: 25px; list-style: none !important; list-style-image: none !important;

}

jsfiddle demo

css

want to add one more column in my Sql server query -



want to add one more column in my Sql server query -

i using query result

select t.accode,t.acname, sum(t.debit)as debit, sum(t.credit) credit transactions t inner bring together accounts on a.code = t.accode a.typecode = 5 , t.date between '2014-05-01' , '2014-05-15' grouping t.accode,t.acname

i getting result query

accode acname debit credit 1 umer 200 300

now want add together previos balance column in result. sample query is

sum(debit)-sum(credit) previousbalance transaction date < '2014-05-01'

and result this

accode acname previousbalance debit credit 1 umer 50 200 300

can 1 please tell me how ? shall thankful you.

you can insert subquery in select statement this:

select t.accode,t.acname, sum(t.debit)as debit, sum(t.credit) credit , (select sum(t2.debit) - sum(t2.credit) transactions t2 inner bring together accounts a2 on t2.accode = a2.code a2.code = t.accode , t2.date < '2014-05-01') prevbalance transactions t inner bring together accounts on a.code = t.accode a.typecode = 5 , t.date between '2014-05-01' , '2014-05-15' grouping t.accode,t.acname

you might need grouping in subquery, not sure that.

sql sql-server sql-server-2012

javascript - Map the Json Array values -



javascript - Map the Json Array values -

trying map 2 array values. 1 array values coming local json file , other array values coming service or backend.

local json:

var localjsonarray = { "records": { "cat1": [{ "id": 1234, "label": "a" }, { "id": 2345, "label": "b" }], "cat2": { "id": 12345, "label": "c" } } }

backend array values:

i storing value coming backend as:

var backendarray =[0: "1234", 1: "3456", 2:"4567"];

js:

$.each( localjsonarray, function( key, value ) { var index = $.inarray( value, backendarray ); if( index != -1 ) { console.log( index ); } });

now how map id of local json id of backend json. if value matches loop should break else should value.

you can't create array var backendarray =[0: "1234", 1: "3456", 2:"4567"];

so way ... follow code above:

var localjsonarray = { "records": { "cat1": [{ "id": 1234, "label": "a" }, { "id": 2345, "label": "b" }], "cat2": { "id": 12345, "label": "c" } } }; var backendarray =["1234", "3456", "4567"]; $.each( localjsonarray['records'], function( a,b,c ) { if(!(b.length == undefined)){ for(var = 0;i < b.length; i++) { var index = $.inarray( b[i].id.tostring(), backendarray ); if( index != -1 ) { console.log( index ); } } } else{ var index = $.inarray( b.id.tostring(), backendarray ); if( index != -1 ) { console.log( index ); } } });

hope help!!! :)

javascript arrays json loops

Python: RuntimeError: maximum recursion depth exceeded -



Python: RuntimeError: maximum recursion depth exceeded -

i trying read through lines of text file split , pull strings between # signs. when run code getting error

runtimeerror: maximum recursion depth exceeded

here code below, help appreciated. thanks!

#function def parameterpull(line): if line.count('#') > 0: temp = eachline.split('#',1)[1] temp2 = temp.split('#',1)[0] temp3 = temp.split('#',1)[1] #write these scripts file parameterfile.write('\n'+temp2+'\n') #check multiple instance on same line if temp3.count('#') > 0: parameterpull(temp3) #make replacements eachline in resultfile: parameterpull(eachline) parameterfile.close()

you need line instead of eachline in function body. made quick test sample resultfile (several lines of # x # y # z #) , no error occurred after making change.

python recursion runtime-error

java - How to get the default ResourceBundle regardless of current default Locale -



java - How to get the default ResourceBundle regardless of current default Locale -

i have 3 resource files in class path:

labels.properties:

language = default

labels_en.properties:

language = english language

labels_fr.properties:

language = french

is there way resourcebundle object loads labels.properties no matter default locale is?

resourcebundle.getbundle("labels") returns 1 corresponding current default locale (as expected).

the way can find set default locale non-existing locale, may break other modules.

thank you!

locale.setdefault( locale.english); assert.assertequals( "english", resourcebundle.getbundle( "labels").getstring( "language")); locale.setdefault( locale.french); assert.assertequals( "french", resourcebundle.getbundle( "labels").getstring( "language")); assert.assertequals( "french", resourcebundle.getbundle( "labels", new locale( "do-not-exist")).getstring( "language")); locale.setdefault( new locale( "do-not-exist")); assert.assertequals( "default", resourcebundle.getbundle( "labels").getstring( "language"));

you can pass in resourcebundle.control which, regardless of requested locale, searches root resourcebundle:

resourcebundle rootonly = resourcebundle.getbundle("labels", new resourcebundle.control() { @override public list<locale> getcandidatelocales(string name, locale locale) { homecoming collections.singletonlist(locale.root); } });

java internationalization locale resourcebundle