Beginner here so take it easy. I am building a basic hybrid-platform app using Smartface (a similar platform to Phongap). For purposes of this discussion, the app will do something very basic: you click the start button and it will start counting down from 30 minutes to 0, and when you reach 0 you get 1 star. You can do this multiple times in a day. The more 30-minute sessions you complete, the more stars you get.
What I would like to do is have those stars exported and displayed on a webpage. In other words, I would like the user to browse to that website and see how many stars were collected over a day.
Now what is the easiest way to do this? I have been looking into the Parse platform, and into some of the authentication services out there. I also have a hosting package that includes MySQL and a decent amount of storage/bandwidth.
Without diving into complex discussions of building a backend infrastructure, what is the simplest way to export this very basic data and simply display it on a webpage?
Thanks in advance.
There is an object called WebView, you can check it from this document:
http://www.smartface.io/developer/guides/controls/webview/
You can directly write the url of the webpage that you want to show.
Here is the sample code:
var myWebView = new SMF.UI.WebView({
top : "5%",
left : "5%",
width : "90%",
height : "70%",
URL : "http://www.smartface.io/"
});
Pages.Page1.add(myWebView);
Related
The main objective I have is to read a table in a webpage and account for the total element it has. But since you have to scroll down to find another elements not 'chased' by this sentece
table_css=driver.find_elements_by_id('DeletButtn')
then I decided to zoom in down to 30% to catch them all. But no way I've used is working when trying to zoom in:
driver.execute_script("document.body.style_zoom='30%'")
driver.execute_script("document.body.style.zoom='30%'")
driver.execute_script("document.body.style.zoom='0.3'")
do not work
I have also tried to use key and send keys, but they have been worthless too:
html = driver.find_element_by_tag_name("body")
html.send_keys(Keys.CONTROL, Keys.SUBTRACT)
driver.Keys(html, "ctrl").Keys(html, "-").perform()
action = ActionChains(driver)
action.key_down(Keys.CONTROL).key_down(Keys.SUBTRACT).perform()
None of these combinations have worked up til now. They haven't show me any error so far, so I do not know what I am doing wrong.
I am using python 2.7, geckodriver and Firefox
Thanks for your help and greetings!
I have the attached image as shown in the bottom of this question.
I go to drag and drop: https://cloud.google.com/vision/docs/drag-and-drop
Upload this image on above link and go to Web. I see 50 links under "Pages with Matched Images"
Now I run the vision API client in Java
for (WebPage page : annotation.getPagesWithMatchingImagesList()) {
String url = page.getUrl();
System.out.println(url);
}
The result of above code is only 10 links.
http://www.clubic.com/connexion-internet/fai-sfr-box-neufbox/actualite-755413-probleme-technique-sfr-pu-prevenir.html
https://www.nextinpact.com/news/93154-option-tv-obligatoire-l-information-clients-sfr-a-souffert-d-un-probleme-technique.htm
https://www.macg.co/ailleurs/2015/02/sfr-facture-son-option-tv-obligatoire-sans-prevenir-87427
https://play.google.com/store/apps/details?id=cat.gencat.mobi.vacunes&hl=en
http://pressmans.com/index.php/probleme-sfr-tv-ugg01
https://play.google.com/store/apps/details?id=com.moddity.marketing4ecommerce&hl=en
https://support.shopo.in/hc/en-us/articles/209451025-How-to-get-orders-
https://play.google.com/store/apps/details?id=ru.kontinent.protection&hl=en
https://play.google.com/store/apps/details?id=appinventor.ai_fendy3d.Phone_Jammer&hl=en
http://www.media.mts.ru/technologies/124104/
Why is this mismatch. Is it normal or am I missing something.
I am not sure how exactly looks your http request.
But make sure you read the API docs for that maxResults parameter. This can be the cause for so few results.
I am using www.slideshare.net to allow my users to display embedded slideshows on their profiles.
I'm using slideshare's api to get the slideshow's id, given the slideshow link that users has to get by clicking 'share' on the slideshow and copy/paste the url:
What I would need is to validate thoroughly the latter url.
Just to further explain my process, when I have the slideshow's id, I compute the embedded code like so :
"<iframe src='https://www.slideshare.net/slideshow/embed_code/" + json.slideshow_id + "' frameborder='0' allowfullscreen webkitallowfullscreen mozillaallowfullscreen></iframe>"
where json is the object returned by slideshare's api.
A basic regex to answer my question would be:
^http\://www\.slideshare\.net/[a-zA-Z0-9\-]+/[a-zA-Z0-9\-]+$
But it feels a little weak to me :
I don't want my users to just copy/paste the url in the navigator address bar
I'm not sure this regex works for all slideshare's slideshows as I'm not a slideshare specialist (does that even exist?)
Ideally I would like to exclude all other regular urls from www.slideshare.net that doesn't point to a slideshow.
EDIT 7/12/2014: rewrite
You can use something like this:
(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,#?^=%&:/~\+#]*[\w\-\#?^=%&/~\+#])?
More example from this website
Ive got the following code in my RSS consumer (Vandelay Industries RemoteRSS) in my Orchard CMS implementation:
#using System.Xml.Linq
#{
var feed = Model.Feed as XElement;
}
<ul>
#foreach(var item in feed
.Element("channel")
.Elements("item")
.Take((int)Model.ItemsToDisplay))
{
<li>#T(item.Element("description").Value)</li>
}
</ul>
The rss feed Im using is from Pinterest, and this bundles the image, link, and a short description all inside the 'description' elements of the feed.
<description><a href="/pin/215609900882251703/"><img src="http://media-cache-ec2.pinterest.com/upload/88664686384961121_UIyVRN8A_b.jpg"></a>How to install Orchard CMS on IIS Server</description>
My issue is that I don't want the text bits, and I also need to prefix the 'href=' links with 'http://www.pinterest.com'.
I've managed to edit the original code with my newbie skills to the above,, which essentially displays the images as links which are only relative and thus pointing locally to my server. These images are also then followed by the short description.
So to summarise, I need a way to prefix all links with 'http://pinterest.com' and then to remove the fee text after the image/links.
Any pointers will be greatly appreciated, Thanks.
You should probably parse the description, with something like http://htmlagilitypack.codeplex.com/, and then tweak it to add the prefix. Or you can learn regular expression and do without a library. Could be a little trickier and error-prone however.
My problem seems similar to Not able to visualize a loaded data , but I have no console errors and I have already added the '-allow-file-access-from-files' flag to my Chrome Browser. Here's my Java coding,
window.onload = function() {
var r = new X.renderer3D();
r.init();
pros = new X.mesh();
pros.file = 'file:///C:/Users/Nathan/Downloads/JB Farmer STL ACII.stl';
pros.caption = 'Prosthetic';
r.add(pros);
r.render();
};
Should I "play around" with with camera position, I know I have to do that in Three.js.
Maybe the model needs normals? I'm not sure if it does or not. I haven't worked with 3D modeling, besides Three.js.
Update: Ummmm, I'm not sure what is going on with this, but I realized that XTK generated 2 canvases . I looked at the first two Lessons and they have one.
^ Now eliminated the extra canvas, must have copied a piece and that was in there.
For the moment, the loader of xtk doesn't seem to be done for local. I mean : it uses an XMLHttpRequest (XHR) to get the file with a GET request. First of all the request must be sent to something that can handle it (a server or localhost emilated by Wamp or equivalent). Then let's imagine if one broswer, no matter what one, allows XHR on a file at client side by his url, and imagine I'm a pirate and you come on my website. I know Windows well, I know in C:/Windows/System32 there always is a file where I can find your personals data. What do I do ? An XHR ! You've been hacked. It's a story but you see the idea.
That's why the only ways allowed by browsers to access local files are HTML5 File API & HTML5 Drag&Drop API (unfortunately...). Actualy a way to go through that limitation is having binary code at the client side (flash, java applet). The client is the only one who can ask to open a file or drop a file, so the browser is sure there won't be any security failure because of him.
So you should test it with something like Wamp and access your file with an url like "http://localhost/.../myfile.stl" or the relative url "/.../myfile.stl", or do the following if you realy want local files.
A few weeks ago I wrote my own parser for a private format for xtk and from local file, it worked well, I just used HTML5 APIs to read the file and get a String or BinaryArray from it and then wrote a parser that transformed it in a X.mesh. So I think the best would be to extend the X.loader for HTML5 file APIs, or like me to manualy load the file.
The following jsFiddle from Haehn helps : here !
What happens if you modify the filename with no space?
JB Farmer_STL_ACII.stl instead of JB Farmer STL ACII.stl