I want to share this URL in Google+:
https://www.tropic.photo/shri-lanka?image=/assets/images/resources/64/shri-lanka-005.jpg
So, I use this link:
https://plus.google.com/share?url=https%3A%2F%2Fwww.tropic.photo%2Fshri-lanka%3Fimage%3D%2Fassets%2Fimages%2Fresources%2F64%2Fshri-lanka-005.jpg
But when I share it, picture sended in '?image=' GET parameter not shown in G+ share window, but it must (Facebook and VK handles GET parameters fine, as is, even without encoding)
How to share link with image specified in '?image=' GET parameter?
It's because my URL was contained dot '.' symbol before 'jpg'. I've replaced it with '$' ('%24') and I convert it vice versa on server side
Related
Is it possible to replace the location property of the Parse Template? Instead of hardcoding in the location like so
Is it possible to replace this with a variable value that points to a path at runtime?
i have tried replacing the location with a variable but the project then fails to deploy because it cannot find that path. When the POST request comes in it states what file it wants parsed. Then we would ideally like to tell the parse template to go fetch that file but thus far i cant see anything that could help me online
Any suggestions would be very helpfull
I don't think it is possible to use an expression in the location attribute. Note that in the screenshot we can see that it is missing the Fx button to switch to expression mode, like the the Target Value attribute has.
Since Opera no longer implements the shortcut "/." to visit slashdot.org, I thought to write an extension that replaces that functionality.
I have not previously written an Opera extension, so I hit the docs.
Setting up an omnibox extension doesn't work, because it requires the user to put a space after the keyword.
As "/." isn't a valid URL, I'm not seeing an obvious way to intercept it.
My issue boils down to "how do I get the text before Opera assumes the user is trying to do a keyword search?"
"/." is valid url, but this is not working in Opera.
This is bug which should be fixed soon. But still you will have to wait until
user will put space and the start typing text to omnibox.
Event onInputStarted is the earliest event you can catch. I tried
chrome.omnibox.onInputStarted.addListener(function () {
chrome.tabs.create({url:"http://slashdot.org"});
})
and browser create tab after user type first letter.
I've built a web browser for iOS and I'm trying to pull the URL to display in an address bar.
I look at the NSURLRequest in the webView:shouldStartLoadWithRequest:navigationType: and the webViewDidFinishLoad: UIWebView delegate methods.
Should I use the URL or the mainDocumentURL property of the NSURLRequest for that purpose, and what is the difference?
You want to use URL.
mainDocumentURL would be used when loading sub-parts of a page (like images, scripts, whatever) to tell the system which cookies it can safely use when loading those sub-parts. It’s nothing you’d want to display, and is documented to be unused in the current version of the framework anyhow.
/*!
#method mainDocumentURL
#abstract The main document URL associated with this load.
#discussion This URL is used for the cookie "same domain as main
document" policy. There may also be other future uses.
See setMainDocumentURL:
NOTE: In the current implementation, this value is unused by the
framework. A fully functional version of this method will be available
in the future.
#result The main document URL.
*/
The documentation is not very clear, but it appears that mainDocumentURL used for cookie policy internals.
From NSHTTPCookieStorage Class Reference > setCookies:forURL:mainDocumentURL:
mainDocumentURL
The URL of the main HTML document for the top-level frame, if known. Can be nil. This URL is used to determine if the cookie should be accepted if the cookie accept policy is NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain.
If it's possible that the URL you are using is a sub-frame or some media type embedded in an HTML document, then you may wish to know what the mainDocumentURL is; otherwise, just use URL.
I'm creating an iOS5 app (programmed in Objective-C) which provides a couple of functions. One of them is to allow a user to fill out a text field with JavaScript. When the user presses a "Test" button, I want it to save to a specific JS file and move to a new view, displaying an HTML page that will display the results of that JavaScript on a canvas element.
Unfortunately for me, I have no idea how to save to a JS file for a text field. Nor do I know if this is actually the best way to achieve the results I'm after.
So can anyone tell me the code I'd need to place in the IBAction of my test button to save the file, or if there is a better way to get the user's script into the HTML file with the canvas element?
You have some options to do that.
Add a callback in WebView is possible only in desktop apps, but you can make a workaround.
1- Set a handler to click in javascript;
2- This handler parse the value via windows.location (trying to change the current url);
3- In UIWebviewDelegate set webView:shouldStartLoadWithRequest:navigationType: to recognize this values parsed by javascript and returning NO (canceling the url change).
After you have the code typed by user, is easier pass to the new one UIWebView. You can save the file via NSData or other class and load in by the path, or you can parse directly the code to be showed via NSString.
EDIT
I, still, belive what I said is what you want, but with a little more info. Yes, 3 NSString probably solve your problem. You even can call eval in javascript, via objective-c and parse user code too. Those logic ideas are a good approaching. You can choose the easier for you.
There are more info in this another Q&A
You can use html 5 local storage for that.
Recently I have started a personal project to make a media player in Visual Basic .NET
I am trying to get the Album data and Artist data from a .mp3 file, and in many different ways, it has failed. Here is my code I am trying to use but always returns blank:
miniMusic.currentMedia.getItemInfo("Artist")
When I use that property for my application in the way of:
Label1.Text = miniMusic.currentMedia.getItemInfo("Artist")
It returns blank. I made sure it was the actual returning data that was blank by doing:
Label1.Text = "Artist: " + miniMusic.currentMedia.getItemInfo("Artist")
To see the label's text only say "Artist: " when I invoked that code. (Apologies for bad terminology here!)
How can I, correctly, obtain the song file's data and display it in my Visual Basic .NET application?
The only data I was able to display was the title information from the currentMedia.getItemInfo("Title").
I made my own .mp3 file in Audacity and made sure to include the artist name (John) and album title (Laffin' on sunshine (Not a real album!) And my application still cannot find this data. Am I doing it incorrectly or is the media control unable to find this data?
Those tags are id3 tags (id3v1 or id3v2 and the like). I had to use a 3rd party tool to pull them off the mp3 file.