I have designed an application, which sends message from an application to a mobile number. It uses the CIMD protocol, developed by Nokia. The application is working fine except for the NEW LINE FEED. It does not send the LINE FEED character. According to Nokia's document "CIMD_Interface_Specification_SC70", _XXascii(10) should be used for LINE FEED, but it's not.
Related
Can I somehow take the chart (which was made with CorePlot) from view and send it as a file to another person via mail app? I want to send mail with the help of MessageUI. I feel fine if just the picture will be sent.
Use the -imageOfLayer method to get a PNG of the graph or the -dataForPDFRepresentationOfLayer method to get a PDF and attach the resulting file to a message.
In golang, is there a way to pipe a variable to part of a web form?
For example, sending "123 Random St." to the Street address part of https://www.dominos.com/en/pages/order/#/locations/search/ and so on? I found pizza_party*, but the GUI used is no longer available, I have also found pizzadash**, but this uses a credit card where I want to use cash. I even found a list of golang ones, but the links that they use doesn't work anymore.***
Therefore, my goal is so: order a pizza in golang through the dominos website API!
NOTE: Please suggest a package or function with example!
NOTE: I do not want to make a web scraper/data getter.
NOTE: Your answer must work on at least one box of my linked website.
NOTE: I want to fill out links similar to the provided link from the linux command line.
*https://github.com/coryarcangel/Pizza-Party-0.1.b
**https://github.com/bhberson/pizzadash
***https://golanglibs.com/top?q=pizza
This is how you post any form values onto an online form. Provided you know the POST endpoint of the service.
func main():
resp, err := http.PostForm(targetPostUrlHere,
url.Values{"Service_Type": {"Delivery"},
"Address_Type_Select": {"House"},
"Street": {"123 E 24th St"},
"Address_Line_2": {"4D"},
"City": {"New York"},
"Region": {"NY"},
"Postal_Code": {"10027"}})
}
**Note: The field keys and values are guesstimates. You must inspect the actual key names expected in the form.
In your case, https://www.dominos.com/en/pages/order/ is an endpoint for the form page. Once the form is filled and submitted, the information is submitted using POST method akin to the code afore-mentioned to a dedicated CREATE endpoint (C in the CRUD), which normally can be found in the <form> html tag.
<form action="posttargetendpoint" method="POST">...</form>
Once the POST operation is successful, usually a web service would redirect you to another page. In your case, it is https://www.dominos.com/en/pages/order/#/section/Food/category/AllEntrees/
However, any good web service wouldn't expose the POST endpoint in the clear since it is the vulnerable point of attack. You're welcome to find out by inspect he Domino's page source and adjust the field values in the Go code accordingly.
Now to make a command line prompt to wrap around the PostForm code, I suggest you look into https://github.com/codegangsta/cli which is a very nice package for creating quick command line app.
I assume you mean pipe information originating from your backend to another site on behalf of a user?
The standard way of passing information between domains is via HTTP params, usually via a GET request, but this capability would need to be supported by established protocols the remote site. You can also use an iframe to embed the page of another site onto your page, however, you wouldn't be able to remotely interact, call JS code, or even query the page at all. Cross-domain security safeguards justifiably prohibit such capability, and generally speaking, interacting on behalf of the user via their browser is also restricted for security reasons.
However, if you're looking to emulate user behavior such as with a bot or web scraper from your own host or browser then that's a different story. There are tons of frameworks provide rich capability for interacting with a page. I'd recommend checking out Selenium, which acts as a virtual browser. There are also tons of libraries in Python for processing data from HTML and structured data. You might want to check out Beatiful Soup and Scrapy.
Hope this helps.
I run into an issue with module webform2pdf, which I am too unable to solve for a few days. I am using Commerce Kickstart as a drupal commerce module for handling all the shopping fuctionality, and we were in need to add webforms for returns policy (required by law in my country).
This form has many fields, like when you have pursached the product, what is it's serial number etc. Webform2pdf module was used for sending submitted data as PDF as attachment to email. But the received PDF by mail has blank data tokens, no matter how I try. Weird thing is, that when I hit download PDF in administration of drupal website, it just fills the data tokens right.
I have tried many tokens, all of these:
[submission:values:meno:withlabel]
[submission:values:meno]
[webform:val-meno]
[webform:meno]
%email[meno]
%email_values
%label_nl[meno]
%nl[meno]
%label_all[meno]
%label_all_nl[meno]
%all[meno]
%all_nl[meno]
[submission:values]
%value[meno]
Neither of them works, most of them simply prints token label. For example [submission:values] prints all the labels, but no data.
Upper in the mail, I have also token:
%label_all[typ_servisu]
Which prints correctly when sent via mail, but refuses to print when "download PDF" in administration. This token holds select radio buttons.
I have also tried send pdf as attachment via Rules, but with no success. I am not very experienced developer.
Any advice would be greatly appreciated. Thank you.
In my Windows 8 Store app, I have a Send Email button on a page and users are able to click it and send us an email for some general enquiries.
I need to pre-load some text in the email body but I can't seem to add line breaks to it. I tried Environment.NewLine and "\r\n". None of them works.
var mailto = new Uri("mailto:?to=james.jones#example.com&subject=Hello world&body=Hi," + Environment.NewLine + "Can you please ...");
await Windows.System.Launcher.LaunchUriAsync(mailto);
When I run it, I get "Hi,Can you please...". The line break is omitted.
Try using "%0d%0a" as your line break, as in
"Hi,%0d%0aCan you please..."
That's a URL-encoded ASCII CR/LF sequence. That works for me for the built-in Mail app but you don't have any particular guarantee that it would work for any arbitrary mail app that the user might install in the future.
The reason it doesn't work is because you're launching a Uri, Uris require that their contents be UrlEncoded / UrlEncodable. In the case of Environment.Newline etc you'd get an invalid Uri.
You can counter this by UrlEncoding the Environment Newline like this:
System.Net.WebUtility.UrlEncode(Environment.NewLine)
You maybe should consider using a Share Contract to share your content to your Mail App. Benefits: Users using your software can share it to other Apps, not only Email.
The Roku media player provides a RESTful API with the following commands:
query/apps This ‘query/apps’ returns a map of all the channels installed on the Roku box paired with their app id. This command is accessed via an http GET.
keydown takes an argument describing the key pressed. Keydown is equivalent to pressing down the remote key whose value is the argument passed. This command is sent via a POST with no body.
keyup takes an argument describing the key to release. Keyup is equivalent to releasing the remote key whose value is the argument passed. This command is sent via a POST with no body.
keypress takes an argument describing the key that is pressed. Keyup is equivalent to pressing down and releasing the remote key whose value is the argument passed. This command is sent via a POST with no body.
launch takes an app id as an argument and a list of url parameters that are sent to the app id as an roAssociativeArray passed the the RunUserInterface() or Main() entry point. This command is sent via a POST with no body.
After I get a query a list of applications like so:
<apps>
<app id="5127" version="1.0.28">Roku Spotlight</app>
<app id="11" version="2.2.2002">Roku Channel Store</app>
<app id="28" version="2.0.20">Pandora</app>
<app id="12" version="2.4.6">Netflix</app>
<app id="13" version="3.2.7">Amazon Instant Video</app>
<app id="2285" version="2.1.1">Hulu Plus</app>
</apps>
I want to launch the Netflix (ID 12) application into a specific TV program or Movie:
POST /launch/12?foo=bar&someVar=someValue HTTP/1.1
Where foo and someVar are variables that I would send to Netflix that would correspond to that particular piece of content. However, I don't know which variables nor which values I need to send to the premium applications.
Is there any list of params that are accepted by Netflix/Amazon/Hulu/etc?
Currently these content providers do not provide an interface for launching content externally. The best you can do is use for example, the Netflix API to add content to the user's Queue. There are several 3rd party Roku channels that do this already, specifically Instant Watch Browser and MultiQ's, both are in the Roku Channel Store.
I recently wrote a small python script which enables me to control my Roku and launch and play tv shows and movies directly within Netflix/Hulu/Amazon/etc.
It makes use of the search functionality of the External Control API, and then follows up with a scripted series of keypresses to blindly play the first search result.
It seems to be working pretty well for me, so far! I have even wired it up to my Amazon Alexa, so I can launch just about anything I want, entirely by voice!
Here's the URL to the github project, if you are interested:
https://github.com/tomchapin/roku-search-launcher