iso

Converting language names to ISO 639 language codes

早过忘川 提交于 2019-12-21 17:41:42
问题 I need to convert language names like 'Hungarian', 'English' to ISO 639 codes. ISO 639-6 would be the best but ISO 639-2 is good enough. What's the best way to achieve this? I should convert the English to locale and get the language with getLanguage()? If thats the only way how can I convert a string like 'English' to a java locale? My goal is to store book language info using the ISO 639 codes. 回答1: You can get a list of ISO 639-2 codes by passing a regular expression of language names to

standard function to translate iso-639 codes to language name?

会有一股神秘感。 提交于 2019-12-21 12:27:38
问题 I guess there should be some standard method for this, just to avoid everybody retyping dull constants for their applications. ;) I am looking for a function (usable in a php web app on linux) that can take two ISO639 language codes and returns the name of the first language in the second language, i.e. foo("fr","de") should return "französisch" and foo("de","fr") should return "allemagne" . Is there? 回答1: Locale::getDisplayLanguage is what you need. It is in PHP International Extension so if

Compatibility of C89/C90, C99 and C11

对着背影说爱祢 提交于 2019-12-21 09:18:23
问题 I just read: C Wikipedia entry. As far as I know there are 3 different versions of C that are widely used: C89, C99 and C11. My question concerns the compatibility of source code of different versions. Suppose I am going to write a program (in C11 since it is the latest version) and import a library written in C89. Are these two versions going to work together properly when compiling all files according to the C11 specification? Question 1 : Are the newer versions of C i.e. C99, C11 supersets

Why isn't the “noexcept” specifier part of the function type?

南笙酒味 提交于 2019-12-21 03:18:31
问题 I don't get it why? I don't think compatibility should be a problem as functions declared without the specifier actually have it implicitly defined to false. If it's about name mangling - can we just suppose that old one (existing) will imply noexcept(false) and add another new symbol to the mangling for noexcept(true). This is going to be useful when working with templates as now comparing function type and noexcept specifier should be done seperatly. What I basically mean is this: int func(

ISO/IEC Website and Charging for C and C++ Standards

筅森魡賤 提交于 2019-12-20 10:58:43
问题 The ISO C Standard (ISO/IEC 9899) and the ISO C++ Standard (ISO/IEC 14882) are not published online; instead, one must purchase the PDF for each of those standards. I am wondering what the rationale is behind this... is it not detrimental to both the C and C++ programming languages that the authoritative specification for these languages is not made freely available and searchable online? Doesn't this encourage the use of possibly inaccurate, non-authoritative sources for information

NFC standards (NFC Forum, ISO/IEC, ECMA

試著忘記壹切 提交于 2019-12-20 08:39:14
问题 I am often being asked about standards, the NFC is based on. I summarized my knowledge in the text below. I hope it can be an answer to such questions. Please feel free to correct it by posting comments and replies - I will include it into my text. Since NFC is based on RFID, it is often seen as RFID extension, its form or subset. It is correct because many existing standards from RFID were adopted in the NFC. The NFC base standard for physical layer is NFCIP-1 (ISO 18092 or ECMA 340) - it

How to set Cantonese as the voice search language in a app?

橙三吉。 提交于 2019-12-20 05:34:08
问题 My current code below works fine when using the "ZH" ISO code for Mandarin but won't for Cantonese. This is the code below Intent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); String myLanguage= "yue"; i.putExtra(RecognizerIntent.EXTRA_LANGUAGE, myLanguage); i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, myLanguage); i.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, myLanguage); 回答1: I got the code working, the dash just needed replaced with a underscore

Query ISODate on MongoDB with Google Sheets “dd-MM-yyyy HH:ss” as an output

会有一股神秘感。 提交于 2019-12-20 04:23:16
问题 I use a tool called Redash to query (in JSON) on MongoDB. In my collections dates are formulated in ISO, so when my query is imported (with google sheets' importdata function) to a sheet, I have to convert it to the appropriate format with a formula designed in the sheet. I would love to integrate this operation directly in my query, that the ISO date format is directly sent to Sheets in the appropriate "dd-MM-yyyy HH:ss" format. Any ideas ? Many many thanks 回答1: You may be able to use the

£ becomes £ Why? XML ISO encoding issue?

こ雲淡風輕ζ 提交于 2019-12-20 03:32:28
问题 Been happily saving things to my XML files via a web form that is pared by PHP and the SimpleDOM.php I need to save items that have English pricing in them so I need the English pound sign. However when I do this 2 things happen: it returns the saved price as £ if I then save it again without any other changes the SimpleDom parser then barfs and it removes any other content inthe XML file beyond the english pound sign. The top line in my XML file looks like <?xml version="1.0" encoding="ISO

C++ loop until keystroke

夙愿已清 提交于 2019-12-19 08:17:08
问题 If I want to loop until a keystroke there is a quite nice Windows solution: while(!kbhit()){ //... } But this is neither an ISO-Function nor works on other Operating Systems except MS Win. I found other cross-plattform solutions but they are quite confusing and bloated - isn't there another easy way to manage this? 回答1: You can use the next version of kbhit() for *nix OSes: #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> #include <fcntl.h>