You are here

Feed aggregator

Using the Project Oxford Emotion API in C# and JavaScript

MSDN Blogs - Mon, 03/07/2016 - 00:42
Machine Learing is a hot topic at the moment and Microsoft has some great tools for making Machine Learning accessible to developers , not just Data Scientists. One of these tools is a set of REST APIs which are collectively called Project Oxford and/or Cortana Analytics . These services takes some very clever Machine Learning algorithms which Microsoft have already applied to very broad sample data sets to provide models which are callable via REST APIs. These map to common machine Learning scenarios...(read more)

Physics in Small Basic

MSDN Blogs - Mon, 03/07/2016 - 00:00
What is Physics

According to SmallBasic.Dictionary, physics is "study of physical forces and qualities".

Velocity Model

I once wrote about velocity in a blog post Small Basic Game Programming - Game Math.  This is the basic of physical simulation.  A program JLF545-1 illustrates the relation between time and velocity.

A program KXQ212-2 is a simple sample of physical simulation.  You can accelerate the moon lander with up arrow key.

Inverted Pendulum

Writing physical simulation program is not so easy.  But there are some physics engines that supports physical simulations.  Box2D is one of them and LitDev Extension contains LDPhysics object that wraps Box2D physics engine.  I wrote a sample ZFJ443 which simulates inverted pendulum.  You can move the inverted pendulum with left and right arrow keys. 

See Also These are links to Small Basic blog posts about physics.

[Sample Of Mar. 07] How to create an Azure SQL Database programmatically with Visual Studio 2015

MSDN Blogs - Sun, 03/06/2016 - 22:12
Mar. 7 Sample : This sample shows how to create an Azure SQL Database programmatically with Visual Studio 2015. You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension . They give you the flexibility to search samples, download samples on demand, manage the downloaded...(read more)

Little strange thing

MSDN Blogs - Sun, 03/06/2016 - 07:01

Last week, my colleague and I were working on an issue in which we had to restrict user from clicking the same submit button (on a form rendered in a browser) multiple times. We thought of handling it through the client side JavaScript. It was a simple fix to handle onClick event of the submit button and disable the button. We did it by using jQuery and the code shown below:

$("#submitButton").on("click", function()

We had tested the fix and was working fine. So, went back home.


The next day we started seeing that user is unable to submit the form at all. (STRANGE !) After a bit of analysis we figured out that, this is happening only in Chrome browser while we had verified it in Internet Explorer.

This is interesting. (PROBLEM) Disabling the submit button on client-side using JavaScript is completely blocking the form from submitting in Chrome while it works well in IE and Firefox. (Not tested in other browsers).

To understand this correctly, I have created a simple HTML page - Page1.html has a form and submit button, which upon clicking submits the form to another page.

(FIX) Hence, as a work around, we had used setTimeOut() function of JavaScript as shown in the code below:

$("#submitButton").on("click", function()
}, 1, this);

So, this way browser does not block the form from submitting and submit button gets disabled after 1 milli second from the button click action. This works well in three of the browsers - Chrome, IE, Firefox.

Attaching the HTML page used for this little experiment.


Subscribe to Randy Riness @ SPSCC aggregator
Drupal 7 Appliance - Powered by TurnKey Linux