How to retrieve keystroke/character mapping table from Microsoft IME program? - cjk

I want to know how to retrieve the character mapping table from ms IME?
When the user key in "gao xing", ms IME will display 高兴 in Chinese.
What I want to achieve is the other way round; when user key in 高兴, the program will convert it to "gao xing". In order to do that, I need a database / mapping table for this. And I guess MS IME contains this table already, it's just the matter how i retrieve it.
Do you have any idea how to do it?

There is no mapping that you can retrieve as a simple table. You could look into CEDICT for an open-source dictionary of Chinese with PinYin readings.

Related

Conditional Formatting in Microsoft Word 2016 Table Cells

I have a table and it is for a test plan I am doing for a project, there is a column at the end of the table where the 2 values in it will be Y (passed the criteria) or N (didn't pass the criteria)
Is there a way in Microsoft Word to change the colour of the text on the row with the value of N at the end, this makes it easier to spot the places where it failed the criteria.
I know you can do the find and replace method but I was wondering if there was a way to do this automatically so when the user enters N it changes the whole row to red and when they enter Y it changes it back to normal.
Here is a screenshot of my table:
A point in the right direction to an article I may have missed or a direct answer would be greatly appreciated, thanks.
I see four ways you can go from here:
Either you create a VBA Macro which automatically jumps in once you change something in your document and updates the table. This will force you to save the document with the file extension *.docm.
Or you create two styles (of type character) which automatically format the table Cell and it's content as you like. You would need to guide the users how to use those styles by advising them or you could also provide separate buttons within your document to call a macro which would apply those styles. Also here the macro option would force you to save the document with the file extension *.docm.
Another option would be to use a Word document with an OLE Microsoft Excel object. The drawback is the users would need to know how to use this embedded Excel object.
The third way you could go is to use Microsoft Excel and use the inbuilt Conditional Formatting of Excel. If you need the results to be in a Word document you would still be able to copy the table back to Word.
Note:
I especially mention the document file extension *.docm because this can cause your document to appear dangerous when you send it by email. Perform a google search to read more about Microsoft Office documents containing macros.

Is it possible to create T-SQL file containing mixed Arabic (right-to-left) and English?

I have a database that caters for English and Arabic, and normally these are separate and cause no issues. I have a requirement to mix them - and this is not a problem in the database using nvarchar and when the user directly inputs the values.
However, we can't give the user direct access to the DB, so we wanted to write a simple insert script (xxx.sql file) and get them to edit the values...but we are struggling!
In Word, you can change language/text direction fairly simply to get the correct message, but when c&p'd into a sql file (plain text) the direction and/or encoding get messed up :(
Does anyone know how to achieve this?
Let user use any text editor which can produce correct text file. This file should be not sql script but a file with comma separated values. Then you will be able to bulk import these values correctly into any database structure you need.

Must be possible to filter table names in a single database?

As far as I can tell, the search filter in the navigator will only search available database names, not table names.
If you click on a table name and start typing, it appears that a simple search can be performed beginning with the first letter of the tables.
I'm looking for way to be able to search all table names in a selected database. Sometimes there can be a lot of tables to sort through. It seems like a feature that would likely be there and I can't find it.
Found out the answer...
If you type for example *.test_table or the schema name instead of the asterisk it will filter them. The key is that the schema/database must be specified in the search query. The asterisk notation works with the table names as well. For example *.*test* will filter any table in any schema with test anywhere in the table name.
You can use the command
SHOW TABLES like '%%';
To have it always in your tools, you can add it as a snippet to SQL aditions panel on the right.
Then you can always either bring it in your editor and type your search key between %%, or just execute it as it is (It will fetch all the tables of the database) and then just filter using the "filter rows" input of the result set.

Filtering fields containing foreign characters (Chinese) in Access 2010?

I have an access 2010 database that contains foreign characters and this data needs to be filtered, searched ect...
The data is stored in a SQL database using NVARCHAR. Visually they look good but when I go to search on the a field that has these characters I am unable to use the like function. I can get an exact match.
I am able to search for the foreign characters in SQL.
In the front end access 2010 DB that this is attached to when I filter on these columns I am unable to get an exact match or a like match.
It looks lke the sorting function works properly.
How can I get the filtering, sorting ect to function properly in Access 2010?
Thank you for your help.

coldfusion - bind a form to the database

I have a large table which inserts data into the database. The problem is when the user edits the table I have to:
run the query
use lots of lines like value="<cfoutput>getData.firstname#</cfoutput> in the input boxes.
Is there a way to bind the form input boxes to the database via a cfc or cfm file?
Many Thanks,
R
Query objects include the columnList, which is a comma-delimited list of returned columns.
If security and readability aren't an issue, you can always loop over this. However, it basically removes your opportunity to do things like locking certain columns, reduces your ability to do any validation, and means you either just label the form boxes with the column names or you find a way to store labels for each column.
You can then do an insert/update/whatever with them.
I don't recommend this, as it would be nearly impossible to secure, but it might get you where you are going.
If you are using CF 9 you can use the ORM (Object Relation Management) functionality (via CFCs)
as described in this online chapter
https://www.packtpub.com/sites/default/files/0249-chapter-4-ORM-Database-Interaction.pdf
(starting on page 6 of the pdf)
Take a look at <cfgrid>, it will be the easiest if you're editing table and it can fire 1 update per row.
For security against XSS, you should use <input value="#xmlFormat(getData.firstname)#">, minimize # of <cfoutput> tags. XmlFormat() not needed if you use <cfinput>.
If you are looking for an easy way to not have to specify all the column names in the insert query cfinsert will try to map all the form names you submit to the database column names.
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c78.html
This is indeed a very good question. I have no doubt that the answers given so far are helpful. I was faced with the same problem, only my table does not have that many fields though.
Per the docs EntityNew() the syntax shows that you can include the data when instantiating the object:
artistObj = entityNew("Artists",{FirstName="Tom",LastName="Ron"});
instead of having to instantiate and then add the data field by field. In my case all I had to do is:
artistObj = entityNew( "Artists", FORM );
EntitySave( artistObj );
ORMFlush();
NOTE
It does appear from your question that you may be running insert or update queries. When using ORM you do not need to do that. But I may be mistaken.