Figer's Technology Consulting |

Microsoft Azure mobile services Node.js - Insert record into another table with-in an insert/update call

From Azure portal go into the Insert or update script and add this

function update(item, user, request) {
    request.execute({ success: insertAuditEntry });

    function insertAuditEntry() {
        var auditTable = tables.getTable('audit');
        var audit = {
            record: 'checkins',
            timestamp: new Date(),
            values: 'Add value here'
        auditTable.insert(audit, {
            success: function() {
                // Write to the response now that all data operations are complete

Simple Javascript to stop the double tap action of zooming on Mobile

var time_stamp=;


if (event_.timeStamp-time_stamp<300){ //300ms delay



    return false;






Installing free SSL cert on Azure website

No need to re-invent the wheel so I'm just linking to Troy Hunt's article which walks you through the entire process.

1.) Make sure your site is atleast a basic website instance (free and shared don't work, shared really should)

2.) on StartSSL make sure you are using your main browser and that it's a desktop browser when you first sign-up, you need to be able to save the SSL cert the company installs on your browser for further authentication, failing to do so will probably lock you out of your account.

Azure Mobile Services Async in .NET Web Forms applications

It's easy to code in Javascript or Java and catch the successful asyncinsert, but in web forms the proper code wasn't obvious nor easily found online. Here is my solution to add a record to my Azure Mobile Service on web forms button click. The key is the line in bold.

        protected void btnAdd_Click(object sender, EventArgs e)


            RegisterAsyncTask(new PageAsyncTask(() => SaveRecord()));


        public async Task SaveRecord()


            //Get Domain name from username (which is email address)

            String[] strUsername = User.Identity.Name.Split('@');

            String strUserDomain = strUsername[1];


                var sunshineTable = client.GetTable<sunshine>();

                var SunshineRecord = new sunshine


                    firstname = this.txtFirstName.Text,

                    lastname = this.txtLastName.Text,

                    email = this.txtEmail.Text,

                    userdomain = strUserDomain


                await sunshineTable.InsertAsync(SunshineRecord);

                String strID = SunshineRecord.Id;

                //Sunshine Record Saved Successfully, now lets save group NPI records

                    var npirecords = client.GetTable<npirecords>();

                    var npirecord = new npirecords();

                    NPIDatatable dtNPIrecords = (NPIDatatable)Session["NPIGroupRecords"];

                    foreach (DataRow row in dtNPIrecords.lNPIDatatable.Rows) // Loop over the rows.


                        //coveredrecipienttype = this.ddlCoveredRecipientType.SelectedValue,

                        npirecord.firstname = row["First Name"].ToString();

                        npirecord.lastname = row["Last Name"].ToString();

                        npirecord.npi = row["NPI"].ToString();

                        npirecord.credentials = row["Credentials"].ToString();

                        npirecord.gender = row["Gender"].ToString();

                        npirecord.address = row["Address"].ToString();

               = row["City"].ToString();

                        npirecord.state = row["State"].ToString();

               = row["Zip"].ToString();

               = row["Country"].ToString();

                        npirecord.licensenumber = row["License Number"].ToString();

                        npirecord.licensestate = row["License State"].ToString();

                        npirecord.taxonomycode = row["Taxonomy Code"].ToString();

                        npirecord.sunshinerecordid = strID;

                        await npirecords.InsertAsync(npirecord);



            catch (Exception ex)





Simple Login Page Background Image using CSS

$('body').css('background-image', 'url(../images/glassbackground.png)');
$('body').css('background-repeat', 'no-repeat');
$('body').css('background-size', '100% 200%');
$('body').css('background-origin', 'content-box');

ADB over wifi

These easy commands from Terminal on a Mac

To find the IP address of the device: run ./adb shell and then netcfg.

1.) adb tcpip 5555

2.) adb connect

Disconnect USB and proceed with wireless debugging.

To switch back to USB when done

3.) adb -s usb 

Google Glass Hello World GDK app in Eclipse