Search Results

Search found 512 results on 21 pages for 'chinese'.

Page 14/21 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How to choose how to store data?

    - by Eldros
    Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. - Chinese Proverb I could ask what kind of data storage I should use for my actual project, but I want to learn to fish, so I don't need to ask for a fish each time I begin a new project. So, until I used two methods to store data on my non-game project: XML files, and relational databases. I know that there is also other kind of database, of the NoSQL kind. However I wouldn't know if there is more choice available to me, or how to choose in the first place, aside arbitrary picking one. So the question is the following: How should I choose the kind of data storage for a game project? And I would be interested on the following criterion when choosing: The size of the project. The platform targeted by the game. The complexity of the data structure. Added Portability of data amongst many project. Added How often should the data be accessed Added Multiple type of data for a same application Any other point you think is of interest when deciding what to use. EDIT I know about Would it be better to use XML/JSON/Text or a database to store game content?, but thought it didn't address exactly my point. Now if I am wrong, I would gladely be shown the error in my ways.

    Read the article

  • How to indicate to a web server the language of a resource

    - by Nik M
    I'm writing an HTTP API to a publishing server, and I want resources with representations in multiple languages. A user whose client GETs a resource which has Korean, Japanese and Trad. Chinese representations, and sends Accept-Language: en, ja;q=0.7 should get the Japanese. One resource, identified by one URI, will therefore have a number of different language representations. This seems to me like a totally orthodox use of content negotiation and multiple resource representations. But when each translator comes to provide these alternate language representations to the server, what's the correct way to instruct the server which language to store the representation under? I'm having the translators PUT the representation in its entirety to the same URI, but I can't find out how to do this elegantly. Content-Language is a response header, and none of the request headers seem to fit the bill. It seems my options are Invent a new request header Supply additional metadata in a multipart/related document Provide language as a parameter to the Content-Type of the request, like Content-Type: text/html;language=en I don't want to get into the business of extending HTTP, and I don't feel great about bundling extra metadata into the representation. Neither approach seems friendly to HTTP caches either. So option 3 seems like the best way that I can think of, but even then it's decidedly non-standard to put my own specific parameters on a very well established content type. Is there any by-the-book way of achieving this?

    Read the article

  • Default Keyboard for new users in Windows 7

    - by xited
    I just installed Windows 7 and I want all users signing in to the computer to see the Language Bar customized with the following three languages: "English (American)" "French (Standard)" "Chinese (Simplified PRC)" I am running the following four lines of code at log on in order to change the registry such that each user will see the language bar, and then have access to the three keyboard layouts mentioned above. reg add "HKCU\Software\Microsoft\CTF\LangBar" /v ShowStatus /t REG_DWORD /d 4 /f reg add "HKCU\Keyboard Layout\Preload" /v 2 /d 0000040c reg add "HKCU\Keyboard Layout\Preload" /v 3 /d 00000c0a reg add "HKCU\Keyboard Layout\Preload" /v 4 /d 00000804 The above works fine, but with one small/major inconvenience: the user has to log off and then log back on in order for these changes to take effect and see the language bar, as described above. The question becomes: How can I force these changes to take effect so that users don't have to log off and then log back in to see the language bar. This has to be done automatically when users log in.

    Read the article

  • How to connect ethernet on ubuntu (with auto-detection by Ubuntu)

    - by user12285
    Do I need to post another thread for the same? If so, sorry. Yes, I saw that it's been well over six months but I have the same router SmartAX MT880d with ethernet, and the exact same problem, that is no internet even though I can successfully reach the modem settings page by entering 192.168.1.1 in Firefox. Sorry if I don't use the right (technical) terminology to express my issue. English is not my mother tongue. I'm a total beginner with ubuntu. My internet works great in Windows but does not work in Ubuntu. For 2 weeks, I've kept reading on the web and forums and the ubuntuguide.org to name a few but to no avail. Now I see no other solution but to ask for help. My problem is that as a beginner, I can't find a way to put the right digits in the right place because I don't know what numbers I need to put in what files (eg: do I need to use DHCP? or a static IP address? No clue whatsoever. I'm confused between putting figures in the wrong spaces. For example, is the modem/router's IP exactly 192.168.1.1 for Huawei Smart AXMT880d modem?? Is the subnet 255.255.255.0? Gateway 192.168.1.1. I'm confused as I can also see a different IP starting with 155131*** (is it an account number? no clue again) on my contract with Huawei (a Chinese ISP). Apart from calling 911, what other numbers do I need to put in and where? How do I check that all the numbers have been entered correctly in every appropriate space before trying to connect the Internet?

    Read the article

  • china and gmail attachs -

    - by doug
    "We have evidence to suggest that a primary goal of the attackers was accessing the Gmail accounts of Chinese human rights activists. Based on our investigation to date we believe their attack did not achieve that objective. Only two Gmail accounts appear to have been accessed, and that activity was limited to account information (such as the date the account was created) and subject line, rather than the content of emails themselves.” [source] I don't know much about how internet works, but as long the chines gov has access to the chines internet providers servers, why do they need to hack gmail accounts? I assume that i don't understand how submitting/writing a message(from user to gmail servers) works, in order to be sent later to the other email address. Who can tell me how submitting a message to a web form works?

    Read the article

  • Why isn't Adobe software multilingual?

    - by Takowaki
    I work in a design studio with several non-native English speakers (in this case, into Japanese and Chinese). I have installed the latest Creative Suite (CS5) on our mac stations and was once again disappointed that unlike so many modern software packages there is still no option to change the language of the software. Most of the team has been good enough to work on their English, but it would be much more helpful for them to work in their native language. Why does Adobe continue to require separate licenses based on language? Are they operating under the assumption that only a single language is ever spoken in any given country? Are there any other third party options or does Adobe at least have some sort of statement regarding this policy?

    Read the article

  • Converting or playing a .264 video file?

    - by Dan
    I recently bought a Chinese brand DVR (to record security cams). The DVR exports the video files with a ".264" extension. This is my first time ever dealing with this video format. Anyhow I've been trying to convert the videos to any other format so it will be easier to watch the videos. The problem is that I could only find one program that can convert and play those files which is Elecard studio something, and even that Elecard studio thing is having trouble with these files, some of them are just making it crash so I can't convert them. I've tried to find some other programs but I couldn't find anything that can actually play those files. How can I play or convert these files to another format?

    Read the article

  • As a programmer, what's the most valuable non-English (human) language to learn?

    - by Andrew M
    I was thinking that with my developer skills, learning new languages like French, German etc. might be easier for me now. I could setup the verbs as objects in Python and use dir(verb) to find its methods, tenses and stuff ;-) But seriously, if you're a professional developer, in my case in the UK, what's the best foreign language to learn from an employment perspective? I'm thinking, like Hindi - if all our programming jobs are getting outsourced to India, might as well position yourself to be the on-site, go-between guy. Mandarin - if the Chinese become the pre-eminent economy, the new USA, in ten or twenty years, then speaking their language would open up a huge market to you. Russian - maybe another major up-and-comer, but already closer to Western standards. More IT-sector growth here than anywhere else in the coming years? Japanese - drivers of global technology, being able to speak their language could give you a big competitive advantage over other Westerners But I'm just guessing/musing with all these points. If you have an opinion, or even better, some evidence, I'd like to hear it. If the programming things falls through then at least it'll make for more interesting holidays.

    Read the article

  • Web Service Standard Complexity

    Are we over-standardizing web services and hindering their adoption? No, and in fact I feel that it is helping its adoption in the modern corporate world. Standards, although they can be daunting and tedious, provide a universal framework to which we all can operate in and around. These frameworks provide a common interface for all of to use when interaction with various computing environments so that data can be transfer freely.  Standards are protocols in which computers communicate with one another. If we take this to the living world, the united nations hires interprets for all each countries dignitaries so that they can understand what other countries are talking about. Imagine if the president of the United States wanted to talk to the ruler of China. How would these to communicate? The interpreter would translate data back and forth acting as in intermediary using both standard American English and Chinese. Without knowing the standards in either language no one would be able to communicate. Even though we work within the framework of standards does not mean that we are stuck with these standards. As technology evolves all standards will be out of touch, and when this occurs standards need to be refactored or replaced with new standards that are current with the technology at that time. How else are we as developers and the technology going to grow? What do you guys think?

    Read the article

  • How to connect Ethernet via a Huawei Smart AXMT880s modem (with auto-detection)?

    - by user12285
    It's been well over six months but I have the same router SmartAX MT880d with Ethernet, and the exact same problem : no internet, even though I can successfully reach the modem settings page by entering 192.168.1.1 in Firefox. I'm a total beginner with Ubuntu. My internet works great in Windows but does not work in Ubuntu. Sorry if I don't use the right (technical) terminology to explain my issue. English is not my mother tongue. For 2 weeks, I've been doing reading on the web and forums and the ubuntuguide.org to name a few, but to no avail. Now I see no other solution but to ask for help. My problem is that I can't find a way to put the right digits in the right place because I don't know what numbers I need to put in what files. E.g.: do I need to use DHCP? or a static IP address? No clue whatsoever. I'm concerned that I might put figures in the wrong spaces. For example, is the modem/router's IP exactly 192.168.1.1 for Huawei Smart AXMT880d modem? Is the subnet 255.255.255.0? Gateway 192.168.1.1? I'm confused as I can also see a different IP starting with 155131*** (is it an account number?) on my contract with Huawei (a Chinese ISP). Apart from calling 911, what other numbers do I need to put in and where? How do I check that all the numbers have been entered correctly in every appropriate space before trying to connect the Internet?

    Read the article

  • How to handle multiple pages of the same site with the same outlinks

    - by pandafromchina
    I am developing a back link tool for Chinese SEO (our web site URL is: http://link.aizhan.com just like ahrefs.com. I encountered a problem which is how to handle multiple pages of the same site with the same out links. For example: Most pages of bbs.chinaz.com have the same out links such as: bbs.chinaz.com/Tea/thread-6293993-1-1.html bbs.chinaz.com/Tea/list-1.html bbs.chinaz.com/alimama/thread-6265032-1-1.html bbs.chinaz.com/alimama/thread-6265032-2-1.html?userid=-1&extParms= bbs.chinaz.com/Shuiba/list-1.html bbs.chinaz.com/FeedBack/thread-4456753-1-1.html etc.. All of the pages have the same out links in the top of the page: www.cnzz.com(anchor text:????) www.313.com(????) www.idc123.com(????) Suppose I store these outlinks into database. The SEO will find there are six backlinks from bbs.chinaz.com of www.cnzz.com. This is obviously no sense for the SEO. Can you tell me how do you deal with this problem?

    Read the article

  • Automation for filling in sets of numbers in each row

    - by Brad
    I need to populate the same number 10 times in a row, then the next number up on the next row. starting at 0, ending at 1000 for example: 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 .... 1000 1000 1000 1000 1000 and to 1000 I need to print out these numbers to cut up and put each row of numbers in each envelope to be sold for a Chinese auction at a benefit. How do I do this dynamically without entering in all of the rows by hand?

    Read the article

  • Event 4625 - Logon Failure - Server 2008 R2 is logging them all over the place ! How to stop the attack?

    - by user72593
    I've been monitoring failed logons to a server which is directly connected to the internet with no hardware firewall in the way...testing purposes only. Using the Server 2008 R2 firewall, I blocked access to just about everything except RDP, then I told the firewall to only allow connections to the RDP port from "MY" static IP. I tested from other locations and I am not able to login to the server unless i'm at my office. So how are people coming from Chinese IP's able to attempt logons and get logged as failures ?? Is there something i'm missing that needs to be blocked? Any help would be appreciated.

    Read the article

  • jQuery Globalization Plugin from Microsoft

    - by ScottGu
    Last month I blogged about how Microsoft is starting to make code contributions to jQuery, and about some of the first code contributions we were working on: jQuery Templates and Data Linking support. Today, we released a prototype of a new jQuery Globalization Plugin that enables you to add globalization support to your JavaScript applications. This plugin includes globalization information for over 350 cultures ranging from Scottish Gaelic, Frisian, Hungarian, Japanese, to Canadian English.  We will be releasing this plugin to the community as open-source. You can download our prototype for the jQuery Globalization plugin from our Github repository: http://github.com/nje/jquery-glob You can also download a set of samples that demonstrate some simple use-cases with it here. Understanding Globalization The jQuery Globalization plugin enables you to easily parse and format numbers, currencies, and dates for different cultures in JavaScript. For example, you can use the Globalization plugin to display the proper currency symbol for a culture: You also can use the Globalization plugin to format dates so that the day and month appear in the right order and the day and month names are correctly translated: Notice above how the Arabic year is displayed as 1431. This is because the year has been converted to use the Arabic calendar. Some cultural differences, such as different currency or different month names, are obvious. Other cultural differences are surprising and subtle. For example, in some cultures, the grouping of numbers is done unevenly. In the "te-IN" culture (Telugu in India), groups have 3 digits and then 2 digits. The number 1000000 (one million) is written as "10,00,000". Some cultures do not group numbers at all. All of these subtle cultural differences are handled by the jQuery Globalization plugin automatically. Getting dates right can be especially tricky. Different cultures have different calendars such as the Gregorian and UmAlQura calendars. A single culture can even have multiple calendars. For example, the Japanese culture uses both the Gregorian calendar and a Japanese calendar that has eras named after Japanese emperors. The Globalization Plugin includes methods for converting dates between all of these different calendars. Using Language Tags The jQuery Globalization plugin uses the language tags defined in the RFC 4646 and RFC 5646 standards to identity cultures (see http://tools.ietf.org/html/rfc5646). A language tag is composed out of one or more subtags separated by hyphens. For example: Language Tag Language Name (in English) en-AU English (Australia) en-BZ English (Belize) en-CA English (Canada) Id Indonesian zh-CHS Chinese (Simplified) Legacy Zu isiZulu Notice that a single language, such as English, can have several language tags. Speakers of English in Canada format numbers, currencies, and dates using different conventions than speakers of English in Australia or the United States. You can find the language tag for a particular culture by using the Language Subtag Lookup tool located here:  http://rishida.net/utils/subtags/ The jQuery Globalization plugin download includes a folder named globinfo that contains the information for each of the 350 cultures. Actually, this folder contains more than 700 files because the folder includes both minified and un-minified versions of each file. For example, the globinfo folder includes JavaScript files named jQuery.glob.en-AU.js for English Australia, jQuery.glob.id.js for Indonesia, and jQuery.glob.zh-CHS for Chinese (Simplified) Legacy. Example: Setting a Particular Culture Imagine that you have been asked to create a German website and want to format all of the dates, currencies, and numbers using German formatting conventions correctly in JavaScript on the client. The HTML for the page might look like this: Notice the span tags above. They mark the areas of the page that we want to format with the Globalization plugin. We want to format the product price, the date the product is available, and the units of the product in stock. To use the jQuery Globalization plugin, we’ll add three JavaScript files to the page: the jQuery library, the jQuery Globalization plugin, and the culture information for a particular language: In this case, I’ve statically added the jQuery.glob.de-DE.js JavaScript file that contains the culture information for German. The language tag “de-DE” is used for German as spoken in Germany. Now that I have all of the necessary scripts, I can use the Globalization plugin to format the product price, date available, and units in stock values using the following client-side JavaScript: The jQuery Globalization plugin extends the jQuery library with new methods - including new methods named preferCulture() and format(). The preferCulture() method enables you to set the default culture used by the jQuery Globalization plugin methods. Notice that the preferCulture() method accepts a language tag. The method will find the closest culture that matches the language tag. The $.format() method is used to actually format the currencies, dates, and numbers. The second parameter passed to the $.format() method is a format specifier. For example, passing “c” causes the value to be formatted as a currency. The ReadMe file at github details the meaning of all of the various format specifiers: http://github.com/nje/jquery-glob When we open the page in a browser, everything is formatted correctly according to German language conventions. A euro symbol is used for the currency symbol. The date is formatted using German day and month names. Finally, a period instead of a comma is used a number separator: You can see a running example of the above approach with the 3_GermanSite.htm file in this samples download. Example: Enabling a User to Dynamically Select a Culture In the previous example we explicitly said that we wanted to globalize in German (by referencing the jQuery.glob.de-DE.js file). Let’s now look at the first of a few examples that demonstrate how to dynamically set the globalization culture to use. Imagine that you want to display a dropdown list of all of the 350 cultures in a page. When someone selects a culture from the dropdown list, you want all of the dates in the page to be formatted using the selected culture. Here’s the HTML for the page: Notice that all of the dates are contained in a <span> tag with a data-date attribute (data-* attributes are a new feature of HTML 5 that conveniently also still work with older browsers). We’ll format the date represented by the data-date attribute when a user selects a culture from the dropdown list. In order to display dates for any possible culture, we’ll include the jQuery.glob.all.js file like this: The jQuery Globalization plugin includes a JavaScript file named jQuery.glob.all.js. This file contains globalization information for all of the more than 350 cultures supported by the Globalization plugin.  At 367KB minified, this file is not small. Because of the size of this file, unless you really need to use all of these cultures at the same time, we recommend that you add the individual JavaScript files for particular cultures that you intend to support instead of the combined jQuery.glob.all.js to a page. In the next sample I’ll show how to dynamically load just the language files you need. Next, we’ll populate the dropdown list with all of the available cultures. We can use the $.cultures property to get all of the loaded cultures: Finally, we’ll write jQuery code that grabs every span element with a data-date attribute and format the date: The jQuery Globalization plugin’s parseDate() method is used to convert a string representation of a date into a JavaScript date. The plugin’s format() method is used to format the date. The “D” format specifier causes the date to be formatted using the long date format. And now the content will be globalized correctly regardless of which of the 350 languages a user visiting the page selects.  You can see a running example of the above approach with the 4_SelectCulture.htm file in this samples download. Example: Loading Globalization Files Dynamically As mentioned in the previous section, you should avoid adding the jQuery.glob.all.js file to a page whenever possible because the file is so large. A better alternative is to load the globalization information that you need dynamically. For example, imagine that you have created a dropdown list that displays a list of languages: The following jQuery code executes whenever a user selects a new language from the dropdown list. The code checks whether the globalization file associated with the selected language has already been loaded. If the globalization file has not been loaded then the globalization file is loaded dynamically by taking advantage of the jQuery $.getScript() method. The globalizePage() method is called after the requested globalization file has been loaded, and contains the client-side code to perform the globalization. The advantage of this approach is that it enables you to avoid loading the entire jQuery.glob.all.js file. Instead you only need to load the files that you need and you don’t need to load the files more than once. The 5_Dynamic.htm file in this samples download demonstrates how to implement this approach. Example: Setting the User Preferred Language Automatically Many websites detect a user’s preferred language from their browser settings and automatically use it when globalizing content. A user can set a preferred language for their browser. Then, whenever the user requests a page, this language preference is included in the request in the Accept-Language header. When using Microsoft Internet Explorer, you can set your preferred language by following these steps: Select the menu option Tools, Internet Options. Select the General tab. Click the Languages button in the Appearance section. Click the Add button to add a new language to the list of languages. Move your preferred language to the top of the list. Notice that you can list multiple languages in the Language Preference dialog. All of these languages are sent in the order that you listed them in the Accept-Language header: Accept-Language: fr-FR,id-ID;q=0.7,en-US;q=0.3 Strangely, you cannot retrieve the value of the Accept-Language header from client JavaScript. Microsoft Internet Explorer and Mozilla Firefox support a bevy of language related properties exposed by the window.navigator object, such as windows.navigator.browserLanguage and window.navigator.language, but these properties represent either the language set for the operating system or the language edition of the browser. These properties don’t enable you to retrieve the language that the user set as his or her preferred language. The only reliable way to get a user’s preferred language (the value of the Accept-Language header) is to write server code. For example, the following ASP.NET page takes advantage of the server Request.UserLanguages property to assign the user’s preferred language to a client JavaScript variable named acceptLanguage (which then allows you to access the value using client-side JavaScript): In order for this code to work, the culture information associated with the value of acceptLanguage must be included in the page. For example, if someone’s preferred culture is fr-FR (French in France) then you need to include either the jQuery.glob.fr-FR.js or the jQuery.glob.all.js JavaScript file in the page or the culture information won’t be available.  The “6_AcceptLanguages.aspx” sample in this samples download demonstrates how to implement this approach. If the culture information for the user’s preferred language is not included in the page then the $.preferCulture() method will fall back to using the neutral culture (for example, using jQuery.glob.fr.js instead of jQuery.glob.fr-FR.js). If the neutral culture information is not available then the $.preferCulture() method falls back to the default culture (English). Example: Using the Globalization Plugin with the jQuery UI DatePicker One of the goals of the Globalization plugin is to make it easier to build jQuery widgets that can be used with different cultures. We wanted to make sure that the jQuery Globalization plugin could work with existing jQuery UI plugins such as the DatePicker plugin. To that end, we created a patched version of the DatePicker plugin that can take advantage of the Globalization plugin when rendering a calendar. For example, the following figure illustrates what happens when you add the jQuery Globalization and the patched jQuery UI DatePicker plugin to a page and select Indonesian as the preferred culture: Notice that the headers for the days of the week are displayed using Indonesian day name abbreviations. Furthermore, the month names are displayed in Indonesian. You can download the patched version of the jQuery UI DatePicker from our github website. Or you can use the version included in this samples download and used by the 7_DatePicker.htm sample file. Summary I’m excited about our continuing participation in the jQuery community. This Globalization plugin is the third jQuery plugin that we’ve released. We’ve really appreciated all of the great feedback and design suggestions on the jQuery templating and data-linking prototypes that we released earlier this year.  We also want to thank the jQuery and jQuery UI teams for working with us to create these plugins. Hope this helps, Scott P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. You can follow me at: twitter.com/scottgu

    Read the article

  • Algorithm to price bulk discounts

    - by sam munkes
    Hi, i am designing a Chinese auction website. Tickets ($5, $10 & $20) are sold either individually, or via packages to receive discounts. There are various Ticket packages for example: 5-$5 tickets = receive 10% off 5-$10 tickets = receive 10% off 5-$20 tickets = receive 10% off 5-$5 tickets + 5-$10 tickets + 5-$20 tickets = receive 15% off When users add tickets to their cart, i need to figure out the cheapest package(s) to give them. the trick is that if a user adds 4-$5 tickets + 5-$10 tickets + 5-$20 tickets, it should still give him package #4 since that would be the cheapest for him. Any help in figuring out a algorithm to solve this, or any tips would be greatly appreciate it. thanks

    Read the article

  • SQL Server -> 'SQL_Latin1_General_CP1_CI_AS' Collation -> Varchar Column -> Languages Supported

    - by Ajay Singh
    All, We are using SQL Server 2008 with Collation Setting as 'SQL_Latin1_General_CP1_CI_AS'. We are using Varchar column to store textual data. We know that we cannot store Double Byte data in Varchar column and hence cannot support languages like Japanese and Chinese without converting it to NVarchar. However, will it be safe to say that all Single Byte Characters can be stored in Varchar column without any problem? If yes then from where can I get the list of languages which needs Single Byte for storage and the list of languages which needs double byte? Any assistance in this regard is highly appreciated. Thanks in advance.

    Read the article

  • running VisualStudio CF3.5 apps on WINCE

    - by marc
    Hi, I am trying to write a program for a chinese PNA device with wince 5.0. But everytime I write a simple program in VS8 with C# and 'deploy' it to my device it just doesn't run. First it complains about disposing an object call menu, although I don't want an menu but VS8 just creates one for me. If I delete the menu from the form the program gives an exception. I installed a program call MIOPocket on the PNA with has powertoys some games and MS media player. It also creates a directory .net framework 3.5 so I known 3.5 is installed and must be working. But I think I am missing something. I am also not sure what to choice as target device ; windows mobile or WINCE. If I click the .exe file under win7 it works but under wince its a no go. Maybe someone has a clue what is going wrong ?

    Read the article

  • Populating DataGrid with SQLResult Air Flex

    - by Deyon
    I been beating my self up all day on this...I'm about to call it quits and get some Chinese food -=\ I'm selecting data from a local SQL DB. [Bindable] public var ac:ArrayCollection; public function select():void { statement.sqlConnection=conn; statement.text="SELECT * FROM PROJECT"; statement.execute(); var res : SQLResult = statement.getResult(); ac = new ArrayCollection(res.data); //So this traces out [Object][object] So it works trace(ac); } If I do var myObj:Object=res.data[0]; I can trace myObj and view the data. But I don't know how to insert the data into a datagrid. mygrid.dataProvider=ac; dose not work. I'm using Flash Builder 4 Help please....

    Read the article

  • regex to filter all but whitelisted characters from a multi-language string

    - by jeroen
    I am trying to cleanup a string coming from a search box on a multi-language site. Normally I would use a regex like: $allowed = "-+?!,.;:\w\s"; $txt_search = preg_replace("/[^" . $allowed . "]?(.*?)[^" . $allowed . "]?/iu", "$1", $_GET['txt_search']); and that works fine for English texts. However, now I need to do the same when the texts entered can be in any language (Russian now, Chinese in the future). How can I clean up the string while preserving "normal texts" in the original language? I though about switching to a blacklist (although I´d rather not...) but at this moment the regex just completely destroys all original input.

    Read the article

  • while downloading filenames from non english languages are not getting displayed on the downloaded f

    - by pks83
    When i am trying to download a file whose name has characters from languages like chinese japanese etc...... non ascii... the downloaded file name is garbled. How to rectify it. I have tried to put charset=UTF-8 in the Content-type header property, but no success. Please help. Code below. header("Cache-Control: ");// leave blank to avoid IE errors header("Pragma: ");// leave blank to avoid IE errors header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"".$instance_name."\""); header("Content-length:".(string)(filesize($fileString))); sleep(1); fpassthru($fdl);

    Read the article

  • 2 fundamental questions for the Androgurus ...Can someone guide me

    - by Saul Carpenter
    I have'nt plunged into Android Development as yet though Java Classes C++ all that is not new to me. Here are the questions folks. Appreciated any help on these : - If I need to develop test and deploy Android Apps do I NEED AN ANDROID Hardware device or is there a software Android Simulator like VMWARE or Virtual PC , where I can emulate the results.If there is such can you point me more info I have a Netbook ( the Chinese Ipad Clone ) running Android that has only Wi-Fi for the present. Is it possible to add the following features via the spare USB Port --- a USB Based 56K Modem : Are there Android platform H/W Drivers. --- a USB based RJ45 ( Ethernet LAN LandLine connection ) Adapter :Are there Android platform H/W Drivers. Please advise Thanks Saul

    Read the article

  • Preserving multi-byte characters in Flex XML object

    - by Dan Petker
    I'm having an issue with the Flex XML object type mangling multi-byte characters (such as Japanese or Chinese characters). The basic setup is this. I'm getting an XML-formatted string from the server, and in that string there can be multi-byte characters. A lot of the time, these characters are in attributes, for example: <example id="foo" name="[some multi-byte characters]"/> Now, when I examine the raw string, the multi-byte characters display just fine. However, as soon as I convert the string to an XML object using the top-level XML() function, all the multi-byte characters become mangled. I've tried setting the XML's encoding by including an <?xml version="1.0" encoding="utf-8"?> element in the XML-formatted string, but this doesn't seem to have any effect on the resulting XML object. Is there a way to get the XML object to respect the encoding of the XML-formatted string and prevent the multi-byte characters from being mangled?

    Read the article

  • Some special characters defined in "ISO-8859-1" can't be shown when encoding with "UTF-8"

    - by Mike.Huang
    I need to get a string from URL request of brower, and then create a text image by requested text. I know the default encoding of the Java net transmission is "ISO-8859-1", it can works normally with all characters what defined in "ISO-8859-1". But when I request a multi-byte Unicode character (e.g. chinese or something like ¤?), then I need to decode it by "UTF-8" from "ISO-8859-1". My codes like: String reslut = new String(requestString.getBytes("ISO-8859-1"), "UTF-8"); Everything is fine, but I found some characters in ISO-8859-1 are not been shown now, which characters are 0x80 - 0xFF(defined in" ISO-8859-1"), i.e. the characters after 0x80 (in "ISO-8859-1") not been shown when converted to "UTF-8" from "ISO-8859-1". Any other method can solve this query?

    Read the article

  • How to do google webpage translate in a Java class

    - by Robert
    Hi,this is a follow-up question of mine. Suppose now I have a URL : http://www.baidu.com/s?bs=%B0%C2%B0%CD%C2%ED&f=8&wd=%B0%C2%B0%CD%C2%ED and it work perfectly by inputting it in the text field of google translate and select from "Chinese" to English. My question is ,suppose now I want to achieve this in Java, I would like to adopt "Process q=Runtime.getRuntime().exec( "cmd /c start +URL" approach to do this. Could I achieve that by simply concatenating the Google translate URL and the webpage URL? If yes,could you please elaborte,thanks.

    Read the article

  • How to prevent Windows XP from stealing my input Ctrl-Space which is meant for Emacs

    - by Dean
    I am learning and using Emacs. What I found annoying is that Ctrl-Space input will be stolen by Windows XP to switch the language bar instead of setting the mark in Emacs. The "language bar" is the native input languages selection such as Chinese keyboard other than English keyboard. Is there a way to temporarily prevent XP from stealing it? I have disabled the language bar from "Regional and language options" from Control Panel but the problem still exists. It doesn't happen on my Windows 2000 desktop at office but it happens on my work Windows XP laptop. Thank you very much.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >