locale

unix sort -n -t“,” gives unexpected result

拟墨画扇 提交于 2020-01-01 11:09:29
问题 unix numeric sort gives strange results, even when I specify the delimiter. $ cat example.csv # here's a small example 58,1.49270399401 59,0.000192136419373 59,0.00182092924724 59,1.49270399401 60,0.00182092924724 60,1.49270399401 12,13.080339685 12,14.1531049905 12,26.7613447051 12,50.4592437035 $ cat example.csv | sort -n --field-separator=, 58,1.49270399401 59,0.000192136419373 59,0.00182092924724 59,1.49270399401 60,0.00182092924724 60,1.49270399401 12,13.080339685 12,14.1531049905 12,26

Assigning Arabic text to R variables

↘锁芯ラ 提交于 2020-01-01 10:02:46
问题 R doesn't display correctly Arabic text. I get very weird stuff when I use Arabic. Here's a screenshot: The problem is that I want to create a wordcloud with Arabic text and I need to solve this problem first. R version: R 2.15.2 GUI 1.53 Leopard build 64-bit (6335) Here are more info: > options("encoding") $encoding [1] "native.enc" > Encoding("الله") [1] "unknown" SessionInfo(): > sessionInfo() R version 2.15.2 (2012-10-26) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C/C

Why does Symfony ignore the browsers locale-setting (HTTP-Request Accept-Language Header)?

落花浮王杯 提交于 2020-01-01 07:53:46
问题 i am currently trying to enable the translator in Symfony 2.0. Symfony is ignoring the Accept-Language Header variable and is using default_locale (and when that is not defined the fallback). My request looks like: Accept-Language de-DE,de;q=0.8,en-us;q=0.5,en;q=0.3 but $this->getRequest()->getLocale(); gets me en with that same request. Can somebody tell me what may be wrong? Yes, I have tried to clear the cache and deleting my cookies (omnomnom) :) 回答1: This is the expected behaviour.

What is the difference between C and Posix locales on Postgres?

不羁的心 提交于 2020-01-01 07:39:06
问题 I know that database locales on Postgres are responsible for proper order of national characters, proper lower/upper-casing etc. But why there are two language-neutral locales: posix and c ? Is there any difference between them or is it just one neutral locale with two different names? UPDATE As Magnus Hagander states in his answer, POSIX and C locales are the same locale with different names (no matter if Postgres is installed on POSIX or Windows System). I don't know how to confirm this

How to create a SQL Server login for a service account on a non-English Windows?

这一生的挚爱 提交于 2020-01-01 05:13:47
问题 Given a Windows Server 2008 R2 system, where the service accounts use a non-English display language, with SQL Server 2008, the following Transact-SQL statement fails: CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS ... with the following error: Windows NT user or group 'NT AUTHORITY\NETWORK SERVICE' not found. Check the name again. (or the same message in the non-English display language for the service accounts, depending on the context). This same statement succeeds if the service

How to create a SQL Server login for a service account on a non-English Windows?

二次信任 提交于 2020-01-01 05:13:10
问题 Given a Windows Server 2008 R2 system, where the service accounts use a non-English display language, with SQL Server 2008, the following Transact-SQL statement fails: CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS ... with the following error: Windows NT user or group 'NT AUTHORITY\NETWORK SERVICE' not found. Check the name again. (or the same message in the non-English display language for the service accounts, depending on the context). This same statement succeeds if the service

Facebook FQL user table `sex` field : how to return male/female even the user is using different locale?

痴心易碎 提交于 2020-01-01 01:13:53
问题 Situation: my facebook application ( http://apps.facebook.com/mymagicmirror/ ) needed to detect user's gender, and then query opposite sex or male or female FQL: SELECT uid, name, pic, sex FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user_id.') and sex='male' Problem: When the facebook user is using other locale, then the 'sex' field doesn't match 'male' and 'female' anymore. Instead, say in Chinese, the sex will become 男性 / 女性, and the FQL for where sex='male' will return

How to validate a locale in java?

China☆狼群 提交于 2019-12-31 17:54:42
问题 I read a file in an application that specifies a language code: public void setResources(String locale) { // validate locale // ULocale lo = new ULocale(locale); // System.out.println(lo.getDisplayCountry()); } that must be in the format: <ISO 639 language code>_<ISO 3166 region code> eg. en_UK, en_US etc. Is it possible to validate that the locale string is valid before continuing? 回答1: I do not know ULocale, but if you mean java.util.Locale , the following code may do: public void

How to set locale in a custom Struts 2 ActionMapper

元气小坏坏 提交于 2019-12-31 05:08:05
问题 I have implemented a custom ActionMapper which obtains the locale from the URI (the URI itself, not the request parameters). From within ActionMapper.getMapping(), how do I set the locale for the current action? Here are some ideas I've considered: ActionContext.getCurrent().setLocale(). Unfortunately, it seems that a fresh new ActionContext is created when the action is invoked, and the locale is reset to the default. Set the parameter request_locale, which will be processed by the i18n

How can I format Date with Locale in Android

泄露秘密 提交于 2019-12-31 02:50:09
问题 I am using SimpleDateFormat to format my date "dd Mmm yyy" format but I want Mmm to be translated to Malay. I am using below code to do so but unable to get the expected result. SimpleDateFormat sdf = new SimpleDateFormat(format,new Locale("ms","MY")); return sdf.format(date); 回答1: I am not sure if below code works for you, its written in Scala its almost same in Java. val malaysia = new Locale("ms","MY","MY") val cal = Calendar.getInstance(malaysia) val df = DateFormat.getDateTimeInstance