I am able to send plain text from mt4 to telegram in my MQL4 code. But I'm having trouble adding telegram emojis to my code.
Since this is not possible in mql4, I managed to pass the data to php and add the necessary emojis to telegram.
Related
I am using http://datamine.mta.info/list-of-feeds api to get GTFS data for United States transportation.
When you call http://datamine.mta.info/mta_esi.php?key=<key>&feed_id=1 api you get one "gtfs" file which contains data that I need to parse in iOS so that I can display.
Once I get the file, how do I parse it? So far I haven't found a way to do so. Anyone can help me on this?
Thanks,
Pratik
The MTA requires that you serve the realtime data from your own server, so you might as well parse the Protocol Buffers server-side, and then make your data available to your iOS app from your server. If you do it that way, then you can use e.g., a Python or C++ library to parse the PB into JSON or whatever and structure it in an optimal way for your app for download.
I'm building a Social App where users can post a blog with content of type NSAttributedString (supporting Text-color, Bold, Italic,..). How should I send this NSAttributedString content to Server, so that when I receive it, I can populate it to the UITextview without any lost in decoration (Text-color, Bold, Italic, ..).
I tried sending an NSStringto server, but no luck, the text I received back is something unreadable when using [UITextView setAttributedString].
I guess there should be some kinds of encode and decode right?
NSAttributedString conforms to NSCoding, so you can convert an NSAttributedString back and forth to NSData. It's been a while since I've used AFNetworking, but doesn't it have a way to transfer binary data? That seems like your best bet.
(NSAttributedString also has the ability to read from .rtf files on both Mac and iOS >= 7.0.
According to this thread on SO it's also possible to export the contents of an attributed string to rtf format, so that's another possibility.
I'm trying to enable translating some text in my app. I want user to be able to launch whichever translation tool they use on their device (Google Translate or iTranslate) and see the translation without having to type it. For this, I'm using the url schemes:
googletranslate://
itranslate://
Now, I need to pass the query to those apps. I know how to do this for iTranslate:
itranslate://translate?from=auto&to=en&text=<encoded_string>
This is cool, now I would like to know how to do the same for Google Translate. It needs to automatically detect the language and translate it to english.
It is not currently possible to prefill UI elements in the Google Translate iOS application when opening it from googletranslate:// URLs. The contents of the URL after googletranslate:// appear to be completely ignored. So the most you can get from using these links at the moment is opening the iOS application.
If this does get implemented at some point in the future, one can test by opening a link like googletranslate://example%20text/?param=value&from=zh_TW. I would strongly recommend that you let your voice be heard on the Google Translate product forum by requesting this feature.
In the meantime, you may want to consider using Translation API to provide translations within your application. This can be achieved using the REST API.
If is there anyone still looking for the answer, you can use it like this.
googletranslate://?sl=en&tl=tr&text=hello%20world
You can change the parameters
sl = source language
tl = translation language
text = the thing you want to translate
Is there any way to retrieve the text from a website such as a Wikipiedia site using Corona SDK without having to parse through all of the HTML?
You can use the MediaWiki api doc to get data from wikipedia. Just don't forget to use the format as json.
I would like to be able to intercept a hyperlink from an email on BlackBerry.
e.g.
dummy site
I have been able to intercept and identify text in a plain text email using PatternRepository. However, it doesn't seem to work with HTML emails - is this even possible?
I would like to avoid the solution of scanning every incoming email myself, and parsing all the text, but this might be the only option.
Thanks
This is not possible (up to and including BlackBerry 6 afaik). It is not related to the hyperlink concept - it is not possible to use PatternRepository with any type of text within HTML text.
For performance reasons, the BlackBerry designers decided not to implement pattern matching within HTML fields (browser, or email). This is very unfortunate, but it must be dealt with.
In my app, I had the freedom to define the contents of the email. In my case, I ended up including the pattern into the subject of the email - the user can click on the subject to get to my app.
In most other situations, I think the best/only way forward is to intercept each mail as it arrives and parse it looking for the text. If I have to do that in the future, I'll try to update this post with some sample code.
There are various posts on the BlackBerry forums about this issue.
Richard