Google Input Tools User Dictionary Format - transliteration

I am using a discontinued Google Product Called 'Google Input Tools' which is still available for download through non MS websites.
It is a very useful tool for transliterating text from one script to another.
It has dictionary import and export feature but the problem I am facing that that export creates a utf-8 file like this
text (tab) typed text (tab) count
but If I make a change and import it back into Google Input Tools it creates two entries for same text with tab as a part of the replaced text.
Does anyone know of what input format works for google input tools custom dictionary?
or any workaround ?

Related

TinyButStrong magnet tag shows in output docx

Hi my colleague and I has been trying to get the TinyButStrong plugin openTBS to create some docx files.
We have a live system which creates some RTF files, with data from MySQL. We want to change this to docx, use openTBS. A couple of super users then in Word manage the templates.
We have a problem with creating the files, as we need to remove a line, if data isn't present.
If we in the Word template do
<w:p>[*fieldname*;magnet=w:p]*some kind of text*</w:p>
it hiddes the line if fieldname contains no data, and if if contains data, it will show the line. GREAT :-)
The problem is, that it also shows <w:p> and </w:p> when it contains data, and we don't like that.
How do we get it to stop showing these tags?
The TBS parameter ope=minv is done for thus purpose: it performs the magnet behavior but keep the field invisible (minv stands for magnet invisible).
So the solution is:
<w:p>[*fieldname*;magnet=tbs:p;ope=minv]*some kind of text*</w:p>
By the way, magnet=tbs:p is better than magnet=w:p because your template stays compatible when converted to another other format (LibreOffice).

How to write text formatting in translated strings with Qt / Qt Linguist?

Part of my source code displays text in English that uses common text formatting characters (E.g.: \n: "This is my\nstring"). When I call lupdate and open the .ts file in Qt Linguist, it correctly displays the formatted text in the source text preview space (so without the \n or else).
The problem is that, when I translate the string and put the formatting characters in the translation and run the application with the translation file, my app reads the special characters as normal ones!
How may I overcome this problem? How can I put the necessary text formatting so the translation procedure don't generate such kind of bugs?
When you translate your app, you should press Enter, where you see \n.
For example,you see this string in source code
This is my\nstring
In linguist you should write:
This is my[here press Enter]
string.
When you run app with this translation, you'll see that all good.
I hope, it helps.

Visual FoxPro 9.0 report show unicode

I am using Visual Foxpro 9, I want to print Unicode chars in report (frx).
There are some ways to extend report listener to show unicode. I need the code to extend/show reportListner to show unicode.
I've never had to work with Unicode within VFP either, or spent any time working with Reports, but the Help for the Render method of the ReportListener does mention Unicode:
cContentsToBeRendered
Indicates the text to be rendered for Expression (Field) and Label layout elements.
For Picture layout elements sourced from a file, cContentsToBeRendered contains the filename.
When specifying a filename for an image, ReportListener provides cContentsToBeRendered
as a DBCS string, which is the standard format for strings in Visual FoxPro.
However, when indicating text to be rendered, ReportListener provides
cContentsToBeRendered as a Unicode string, appropriately translated to the correct
locale using any regional script information associated with this layout control in
its report definition file (frx) record.
If your derived class sends the text value through some additional processing, such as
storage in a table, you can use the STRCONV() function, and its optional regional
script parameter, to convert the string to DBCS first. For more information, see
STRCONV( ) Function.
Although I could be incorrect, but I believe VFP does NOT support UniCode and only works with the base ASCII character set. But then again, I've never needed to use Unicode either and have used FoxPro since the beginning of its lifetime.
I would imagine Rick Strahl's article Using Unicode in Visual FoxPro
Web and Desktop Applications would be fairly definitive on the topic.

Why won't Google Calendar load my dynamically generated ICS file?

I've been given the task of creating an ICAL feed of conference calls for members of our organization. I created a handler in ASP.NET that loops through our database, gets the call data from the database, and creates output that appears valid to me based on what I've read of the ICAL format, and the examples I've seen/disassembled.
Outlook 2007 reads the resulting output and displays the calendar, no problem (screenshot here shows how it renders).
30 Boxes also has no problem with it. (see test here).
But when I try to load the same output into Google Calendar, I get the message "We could not parse the calendar at the url requested":
What's wrong with my output that's causing Google to reject it? You can see the temporary data I'm testing with at this URL: http://www.joshuacarmody.com/temp/icaltest.ics. This is a snapshot of the output from my .ASHX file, unaltered except the phone numbers and passcodes have been sanitized.
Edit with additional Info:
I just tried the following
Created a copy of my test file called "icaltest-1googevent.ics"
Deleted all the VEVENT data from the file
Exported one of my Google calendars to ICS
Copied one VEVENT from Google's exported data into my test file
Attempted to subcribe to icaltest-1googevent.ics in Google Calendar.
I still got an error message. So I'm guessing the issue isn't with my VEVENT data, but with something else about the file. Maybe there's something wrong with my VCALENDAR definition?
the severinghaus ics validator seems to think there is something funny ( a ? ) before the BEGIN CALENDAR
http://severinghaus.org/projects/icv/?url=http%3A%2F%2Fwww.joshuacarmody.com%2Ftemp%2Ficaltest.ics
In my testing google was a lot fussier/rigourous/pedantic - once you get it working with the validator and google it should work in most places.
After lots of trial-and-error, and comparing my output with Google's, I got it working. There were a few problems with my ICS file:
Unescaped characters (I didn't know I had to escape commas!)
Inconsistent line return characters. They didn't show up in my text editor, but I had to use .NET's String.remove() to remove "\r" from my output to get Google to recognize it
The file was missing VCALENDAR:END. Apparently Outlook doesn't much care. Google does.
I had not one, but three funny characters before the BEGIN:VCALENDAR, decimal codes 239, 187, 191.
I found them thanks to the severinghaus.org link above, thanks!
It turns out they're a prefix called BOM in UTF-8, you can read up on it here: http://en.wikipedia.org/wiki/UTF-8#Byte_order_mark
Google doesn't handle this, but after stripping these three characters from the file and uploading to the server, I was able to susbribe to that calendar in Google Calendar (from URL).
I hope this helps someone passing by this page in the future...
I had similar problem until I realised that opening the generated .ics file in Notepad++ wasn't in UTF-8. I was using a method to convert my string to a byte array, but wasn't using an encoder for this, so no matter what content headers I used, the file would never be generated using UTF-8. This simple fix resolved the UTF-8 generation and Google is now happy with my feed:
var utf8 = Encoding.UTF8;
byte[] utfBytes = utf8.GetBytes(myString);
myString= utf8.GetString(utfBytes, 0, utfBytes.Length);

AppleScript to download files from HTTP server, mutating the URL?

I've never messed with AppleScript so this is only a concept to me. Can this work?
Bungie, the game designer, is hosting a ton of PNGs for Halo Reach in systematically named files and directories. IE:
http://www.bungie.net/images/reachstats/commendations/onyx/onyx_large_precision_multiplayer.png
Change two instances of the same word, and you generate another version of the image. Change "onyx" to "iron", "bronze", "silver" or "gold" and you get a corresponding image, like so:
http://www.bungie.net/images/reachstats/commendations/gold/gold_large_precision_multiplayer.png
Would an AppleScript be able to take an input URL, find and change the instances of the words in the URL, and then download the associated file to a directory? Today is my birthday (Oct 27th! hence the XXVII) and if this will work I would be super excited if someone could make this!
Thanks for all of your kind answers!
This works:
set the destination_file to ((path to desktop as string) & "picture.jpg") as file specification
set thisImageSRC to "http://www.bungie.net/images/reachstats/commendations/gold/gold_large_precision_multiplayer.png"
tell application "URL Access Scripting"
download thisImageSRC to destination_file replacing yes
end tell
String manipulation is done completely with changing Applescript's text item delimiters. So to get the components of the URL into a list, you need to do the following:
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "/"
set theUrlComponents to (every text item of theURL) as list
set AppleScript's text item delimiters to oldDelims
Add salt to taste, but I agree with the first commenter that there are better languages to do this. Applescript would be my last choice here.

Resources