single-character pinyin, and return the character itself when no pinyin is found.
Wang Siyan July 23, 2012 NightConvert Chinese to the. NET component of the phonetic text and initials. Example:Using System;Using System.Collections.Generic;Using System.Text;Using Npinyin;Namespace Npinyintest{Class Program{Static void Main(String[]Args){String[]Maxims= New String[]{"Things often violate people, things are always human.", "The steed is run out, th
Query cities (query by Chinese characters, Pinyin, and initials) and Chinese pinyinYou can query all Chinese cities by Chinese characters, Pinyin, and initials. You can also query the full name, Pinyin, and first letter of the city.Note: Database initialization will take 2 to 4 minutes for the first operation. You do not need to wait for the task to run again. If you do not want to wait, copy the city_info
/*** Convert Chinese characters to PinYin characters that contain polyphonic characters, including native ZH, CH, and sh */Public void topinyinall () {string initials = "ZH, CH, Sh "; // returns the complete list of Chinese pinyin
Result:
[Wozhongqingzhang, wochongqingzhang, wozhongqingchang, wochongqingchang][Wzhqzh, wchqzh, wzhqch, wchqch]
Based on the Chinese Initials, how can we find relevant records in the table? For example, enter "zgyh" to find all records of "Bank of China.
If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [f_getpy] ') and xtype in (n'fn', n'if', n'tf '))Drop function [DBO]. [f_getpy]Go-- Create a pinyin FunctionCreate Function f_getpy (@ STR nvarchar (400 ))Returns nvarchar (4000)AsBeginDeclare @ strlen int, @ Re nvarchar (4000)Declare @ t
Before a period of time on the internet to see an interview question, the requirements are as follows:
Work number and name are recorded in the employee file
The code is as follows:
Cat Employee.txt:
Jason Smith
John Doe
Sanjay Gupta
Ashok Sharma
Record work number and salary in bonus file
The code is as follows:
Cat Bonus.txt:
100 $5,000
200
300 $3,000
400 $1,250
Request to merge two files and output as follows, processing the result:
The code is as follows:
Ashok Sharma $1,250
Jason Smith $
if ((icnchar>=47010) (icncharreturn "F";} else if ((icnchar>=47297) (icncharreturn "G";} else if ((icnchar>=47614) (icncharreturn "H";} else if ((icnchar>=48119) (icncharreturn "J";} else if ((icnchar>=49062) (icncharreturn "K";} else if ((icnchar>=49324) (icncharreturn "L";} else if ((icnchar>=49896) (icncharreturn "M";}else if ((icnchar>=50371) (icncharreturn "N";} else if ((icnchar>=50614) (icncharreturn "O";} else if ((icnchar>=50622) (icncharreturn "P";} else if ((icnchar>=50906)
In reality, we often see such a description, ranking in no order, by name first letter to sort. This is the sort of method most Chinese use. So how do you do it in a PHP program?
The following to share in the PHP program to obtain the first letter of Chinese pinyin method, the most of the online search is problematic, this is a small series of practical application, really can use OH.
PHP gets Chinese character phonetic initials function Getfirs
By default, the Word 2010 document user name is the user name that is currently logged on to the Windows system, typically the administrator. The user can change the Word 2010 document user name to the appropriate name based on the actual work, as described in the following procedure:
Step 1th, open the Word 2010 document window, click the file → options command, and so on, as shown in Figure 2011120401.
Figure 2011120401 Click the Options command
Step 2nd, open the Word Options dialog box,
union ALL SELECT ' B ', n ' book ' union ALL Select ' C ', n ' wrong ' union ALL Select ' D ', n ' 鵽 ' union ALL SELECT ' E ', n ' 樲 ' union ALL Select ' F ', n ' leiognathi ' union ALL Select ' G ', n ' hiker ' union ALL Select ' H ', n ' inceѕt ' union ALL Select ' J ', n ' 攈 ' UNION ALL Select ' K ', n ' 穒 ' union ALL Select ' L ', n ' 鱳 ' union ALL Select ' M ', n ' temperature ' union ALL SELECT ' n ', n ' 桛 ' union ALL Select ' O ', n ' retting ' UN ION all Select ' P ', n ' exposure ' UN
@intLen = @intLen-1Endreturn Lower (@strRet)End --EXECUTE statement declare @id int;DECLARE @UserName varchar (100);DECLARE @cursor cursor;--CursorsSet @cursor =cursor forSelect Id,username from T_user;Open @cursorFETCH NEXT from @cursor into @id, @UserName;While @ @FETCH_STATUS =0BeginBeginUpdate T_user set username= (SELECT [dbo].[ FN_GETPY] (@UserName)) where [email protected]EndFETCH NEXT from @cursor into @id, @UserName;EndClose @cursorDeallocate @cursor SQL converts all names (kanji) of e
SELECT ' not '/*because have no ' I '/UNION ALL SELECT ' NOT ' union ALL select ' KA ' UNION ALL SELECT ' UNION ALL SELECT ' 嘸 ' union ALL SELECT ' Hallasan ' UNION ALL SELECT ' Oh ' UNION ALL SELECT ' 妑 ' UNION ALL select ' Seven ' union ALL Select ' 呥 ' UNION ALL SELECT ' Three ' union ALL select ' He ' union ALL select ' 屲 '/*no ' u ' */UNION ALL SELECT ' 屲 '/*no ' V ' */UNION ALL SE Lect ' 屲 ' union ALL SELECT ' XI ' union ALL Select ' Ya ' union ALL SELECT ' as ' union ALL select @chn] as
the Chinese character, can be used as a query condition
Select e.fullname,e.expert_id from Expert e where f_trans_pinyin_capital (substr (E.fullname,1,1)) = ' Z '
Finally, an example of combining the two together is shown:
Select E.expert_id,e.eperson_id,e.fullname,
SUM (b2i.browse_num) Browsecount,
Count (o.object_id), Wmsys.wm_concat (distinct d.name)
From expert E
Left join Expert2disciplinetype e2d on e2d.expert_id = e.expert_id
Left join Disciplinetype
We sometimes encounter situations where we need to get some Chinese pinyin, Chinese initials and Chinese initials, and I'll show you how to get the abbreviation for Chinese pinyin.
1. Project establishment and configuration
First, we build a Java project, create a new Libs folder and introduce a 734a7099-4830-39f2-a136-0e850ccdcc7a.jar file, which I believe will not be written in detail, skipped.
2, to o
The following methods are found on the Internet and feel useful (for example, you can combine Ajax techniques to find Chinese characters through Hanyu Pinyin).
But the following methods, many Chinese characters can not give a positive solution (such as "Xin Mao garden" "Xin"). Think about it, Chinese pronunciation have a lot of. Package sample;public class Gb2alpha ... {The letter Z uses two tags, here are 27 valuesI, u, v do not make initials, follow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.