Linux / Silverlight question - linux

I have a PHP script running via crontab on hourly basis under Linux.
This script is basically does some tests against database and returns results,
smth like: table_name, number_of_rows, number_of_duplicates.
Also, I have a Silverlight Dashboard for displaying various data and now I want to include results of the tests.
So, question is: how do I push data from Linux based PHP script to Silverlight client?
Thanks

As you are restricted to a Linux server, I assume you are serving the Silverlight app from an Apache site. Is that correct?
Silverlight can use its WebClient class to download any web content, so you could have a PHP page make your results available via HTTP (SOAP, XML, HTML etc).

Related

Can i use Chromecast as a server?

Studying the possibility to achieve the following:
We have a CMS that from time to time posts to a web hook a media URL (video) (public internet hosted)
This web hook post we would like to post directly to a ChromeCast which is plugged in to a TV
Questions:
1. Can a web server like nodeJS be installed on a chrome cast?
2. Is it possible to use for example DynamicDNS to link the Chromecast to a domain name so the post from the web hook can be made?
ChromeCast has a sender API which allows you to "send" content to a specific Chromecast. Right now, the sender API works on Android, IOS and Chrome OS. You can read more about it here: https://developers.google.com/cast/docs/sender_apps.
And, here's how a receiver application that would receive your content on the ChromeCast would work: https://developers.google.com/cast/docs/receiver_apps or if you're content is a standard type, then you can use a prebuilt receiver application without building your own.
To answer your specific questions:
Can a web server like nodeJS be installed on a chrome cast?
No, not without enormous hacking and development yourself to basically take over the hardware somehow and get your own stuff to run on it.
Is it possible to use for example DynamicDNS to link the Chromecast to
a domain name so the post from the web hook can be made?
Not that I know of.
The chromecast has an android like google chrome operating system. It is possible to root it, but you will not be able to (to my knowledge) get a server on it. I would suggest taking a look at the Raspberry Pi. You should be able to run a slim server on it. After you get that set up it might be feasible to pass command line commands to chrome or another web browser to display the data you like. A browser is not necessary, but I'm not sure if you know of any other way to display the media.
A different approach would be to have a server anywhere (could be in your home) and have something like the raspberry pi (any computer for displaying the content) connect to a webpage hosted with that server. Using websockets something like socket.io, you could set it up so that the server could send messages (url of video) to the browser session you have open. The javascript of your webpage would then use that message to open that url.

Accessing file system in an iOS device

I'm an absolute newbie to Xamarin world. I'm working on a web application where a user completes a long form (say some 100+ fields) and then submits the form which will write the information to a database. One of the requirement is user should be able to load the form, resume his work even when he is Offline( No internet connection). I have used HTML5 Application cache, Local Storage in Html5, KnockOut.JS, Java script so that for every 2 seconds all the user form information is saved to Local Storage of the browser. But lately, I noticed with few users that the forms are getting deleted sometimes due to an iOS update. Also I don't want to rely on browsers cookie/cache to store this information.
I want to find out what my options are with Xamarin. Can I use a component like 'UIWebview' in the Xamarin app to launch my web application and then access the file system of iOS of that Xamarin app from the browser launched ?
Sure you can!
One launch image plus one screen with UIWebView is what you need for your task. You can handle UIWebView's event to save and load it's state.
Good news is that such app could be small enought to build it using free (Starter) version of platform.

Connect Microsoft SharePoint to Linux server

I am new to sharepoint and I created a web page in SharePoint. I want to make connectivity to this page with linux server. So that we can run some commnads from sharepoint (send that commnad to linux server and execute from there) and we can read from Linux server into SharePoint page.
Is it very complex? or can we write small script where we can pass the server name and userid/ password to connect Linux server. Any help will be highly appreciated.
There isn't much SharePoint specificity in this question, I think.
The button on your SharePoint page may perform one of the following client-side actions:
Add or set SRC attribute of an IFRAME on the page to display a resource from the Linux server to the user
Send an asynchronous AJAX request to a resource on the Linux server and process the result.
Depending on your needs, you could also implement some server-side communication with the Linux server, but that should be unnecessary in most scenarios.

Native Mobile App Secure Bridge to Hosted Content

I would greatly appreciate some help with the following problem.
I am attempting to build an app with HTML/CSS/JQM that I plan to wrap with PhoneGap to package as a native app for deployment on Android & iOS Platforms.
The app will be basically a form for users to input information which upon submit will be posted to an email using PHP on our web server. It is of the utmost importance that the information is encrypted between the user device and our web server.
I have planned to do this by having a single terms & conditions page packaged with the native app, with the 'accept' button loading the 'form' page on the web server.
I would like to make it impossible to access the hosted 'form' page via a web browser (i.e. the only way to access the page is via the native app).
What I would like to do is to have the native app automatically log in to the web server, so that the user does not have to go through a registration process.
I have considered using Wordpress, Drupal or Joomla as a solution but as there will only ever be a single html page, jquery, jqm and php form submission scripts on the server - this seems overcomplicated.
It is very important that the hosted files are unable to be hacked as the user information being submitted is of a sensitive nature (e.g. financial information). Also the connection between the native app and the host server must be SSL.
Would a .htaccess / .htpasswd restriction be the best way to go about this?
Any advice would be greatly appreciated, thanks.

Ideas for launching an installed app from a webpage

I am thinking about having the following use-case:
User installs application on local machine.
User goes to our website, and are presented with many links (choices).
User clicks on a link.
Application starts, with some information contained within the link passed to the application.
Step 4 is obviously a security minefield. The end goal is that the user makes a choice, and if the application is installed, it starts with some information passed to it (ie command line parameters, or perhaps a temp file somewhere on the user's machine)
Can I/ Should I access the registry from javascript? Are there any ideas about how I might go about this? Do you have an alternative suggestion?
Assuming the applications the user installs are also developed by you.
Register a file extension for use by the specific application - then your web links can be links to a file that is downloaded and auto-run by your app. The file could contain details on the defaults for your app to use.
Sort of like how clicking on a .pdf file opens your pdf reader.
As an alternative to the file-extension solution you may want to know about Custom Application Protocol feature. Link is for Windows but there are nearly same techniques on other systems. I can't say if this approach works in every browser but you may want to try it out.
Accessing the registry from JavaScript inside a browser is nigh on impossible for the security implications. To access the registry from the web, I'd imagine you'd have to use a binary (C++ or others) program that can read the registry, but also has an HTTP module to communicate with your server.
Sounds like you might need the Click Once deployement feature for your app. I think once it's installed over http there should be a pretty easy way to launch an executable.
http://en.wikipedia.org/wiki/ClickOnce

Resources