Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Reading Notes #384

Programming

  • Install WSL 2 on Windows 10 (Thomas Maurer) - Awesome tutorial. If like me you didn't want to wait until the next Windows release or take the time to compile and debug a deployment....this tutorial is for us!

Databases


Miscellaneous

~

Reading Notes #359

DockerDesktopCloud


Programming


Databases


Miscellaneous


Books

How to Be a Bawse_cover
How to Be a Bawse A Guide to Conquering Life
Lilly Singh
Not only the message is strong, but the way she delivers it is awesome. Many times I laugh and nod of the head... Definitely a great book to read at the end of the year when resolution time is not far...









~

Reading Notes #348

IMG_20181016_073145

Cloud


Programming


Data


Miscellaneous


~enjoy!

Reading Notes #347

MVIMG_20181011_103658

Cloud


Programming


Data


Miscellaneous



Reading Notes #330

IMG_20180602_073928

Cloud


Programming


Data

  • Apply a Filter to a Slicer (Mike Carlo) - Sooooo useful. If you don't know how to do it (yet), just watch the video, you'll thanks me later.

Miscellaneous



Reading Notes #316

Kubernetes-logoSuggestion of the week


Cloud


Programming


Miscellaneous



Reading Notes #298

IMG_20170919_161146Cloud


Programming


Miscellaneous

  • #222: Patrick Lencioni—Getting Hiring Right (EntreLeadership Team) - It was my first episode of this podcast, but definitely not the last one. Very interesting speakers... nice books referenced... loved it.
  • Why Your Boss Makes You Punch a Time Clock (Suzanne Lucas Suzanne Lucas is a freelance writer who spent 10 years in corporate human resources, where she hired, fired, managed the numbers, and double-checked with t) - Most of us have to do timesheets... I'm sure that at one point, you asked yourself the reason about it. It's time read an answer, in this post.


Reading Notes #277

IMG_20170422_130532Cloud

Programming

Miscellaneous

  • Bots are the new Apps – Part 2 (Alexandre Brisebois) - This post asks a lot of questions. .Bots are could be very powerful but are they easy to build? Iterate, test, fail, learn, and try again.


Reading Notes #222

hourglassSuggestion of the week


Cloud


Data



Reading Notes #221

logo_JavaScriptSuggestion of the week

  • Why You Should Learn JavaScript in 2016 (Ken Powers) - I eared a lot of people complaining about Javascript, this excellent post explains why you undeniably, we should all know it, an if it's not the case why 2016 is a great time to learn it.

Cloud


Programming


Data

  • Power BI Service February Update (Amanda Cofsky) - Fantastic! This update will give us the possibility to share outside ou organization... And many other things.

Miscellaneous


~Frank


Reading Notes #198

P1020009Cloud


Podcast

  • .NET Rocks! - Great episode very interesting discussion about the new Azure Service Fabric.

Programming


Databases



Reading Notes #194

IMG_20150716_225401Suggestion of the week


Cloud

Customers can replicate on-premises workloads to Azure with Azure Site Recovery for 31 days at no charge

Programming


Documentation


Miscellaneous



~ Frank



Reading Notes #189

2015-06-15_0745Suggestion of the week


Cloud


Programming


~Frank


Reading Notes #184

CDxQRhpUIAAqBij[1]Last week, Microsoft released tones of news during the //Build 2015. The event was broadcast live, but if you are like me, you probably work during the day.... That smile because the conferences were recorded and are now available on Channel 9

You should definitely take a look and create your own schedule, but in all cases, you must watch the day's one Keynote
Enjoy!

Suggestion of the week


Cloud


Programming


Miscellaneous

Reading Notes #181

Post It - MVP V-ConfSuggestion of the week


Cloud


Programming


Miscellaneous

  • Making the Complex Simple - Not sure how to "classify" this post, is it a top list of the best bad practices, or literally "du bonbon"? A post to read, and relax.

Reading Notes #177

2015-03-15 13.45.14

Suggestion of the week


Cloud


Programming


Miscellaneous



Reading Notes #168

poteauSuggestion of the week


Cloud


Programming


Miscellaneous


See you in 2015!


~Frank B


The making of: Franky's Notes Azure Search - part 2

This post concludes The making of: Franky’s Notes Azure Search. In the previous post, I build a console application in .Net using the RedDog.Search library, to populate an index in my Azure Search Service with my notes.
In this post, I’m sharing with you how I created the user interface to query my notes. To know more about the Azure Search REST API, all the documentation is available online.

Objectives


For this part of the project, we will use the azure-search javascript client of Richard Astbury available on Github. The idea is to build a nice user interface (UI) that will provide a simple and efficient way to search. Since the code will be in JavaScript, it’s strongly suggested to use a query key instead of a master key. These keys can be managed from the Azure Portal.

Azure Search Query Keys

Creating the Interface


First, we need to get the azure-search. To get it, you can whether download the file azure-search.min.js on Github or by execute npm install azure-search from a Node.js console.
Now we need a simple HTML page with a form, a textbox and a button.
    <html>
        <head>
            <title>Search</title>
            <link  href="css/bootstrap.min.css" rel="stylesheet">
            <!--[if lt IE 9]>
                <script src="scripts/html5shiv.min.js"></script>
                <script src="scripts/respond.min.js"></script>
            <![endif]-->
        </head>
        <body>
            <form>
                <label>Search</label>
                <input id="txtSearch" placeholder="Search">
                <button id="btnSearch" type="button">Search</button>
            </form>

            <div id="result"></div>

            <script src="scripts/jquery.min.js"></script>
            <script src="scripts/bootstrap.min.js"></script>
            <script src="scripts/azure-search.min.js"></script>
            <script>

                var client = AzureSearch({
                  url: "https://frankysnotes.search.windows.net",
                  key:"DB7B9D1C53EC08932D8A8D5A1406D8CA" // - query only
                });

            </script>
        </body>
    </html> 
As you can see I’m creating the AzureSearch client using my query key from before. Afterwards, we create a Search function to retrieve the search criteria from the textbox and pass it to the client. A dynamic function is used as a callback that receives the parameter noteList which is an array of matching documents. We finally just need to loop through the result to build a nice output.
    function Search(){

        var _searchCriteria = $("#txtSearch").val();   
        var _objSearch = {search: _searchCriteria, $orderby:'title desc'};

        client.search('notes', _objSearch, function(err, noteList){
            var $divResult = $("div#result");
            $divResult.html( "<div class='panel-heading'><h3 class='panel-title'>" + noteList.length + " Result(s)</h3></div><div class='panel-body'>" );

            if(noteList.length > 0){

                var _strResult = "";
                _strResult = "<ul class='list-group'>";

                for(var key in noteList){
                    var fNote = noteList[key];

                    _strResult += = "<li class='list-group-item'><a href='" + fNote.url + "' target='_blank'>" + fNote.title + "</a><p>" + fNote.note + "</p></li>";
                }

                _strResult += "</ul></div>";
                $divResult.append( _strResult );
            }
      });
    }

If we put all this together, we got a nice result.

Franky's Notes Search UI

Live Demo

Conclusion


I really had a lot of fun creating these little applications. I found the client incredibly easy to use. I hope it will help you to get ideas and moving forward to use Azure Search. Any comments, suggestions and/or questions are welcome.


~ Frank Boucher


References


Reading Notes #157

microsoftazurewebsitescheatsheetSuggestion of the week


Cloud


Programming

  • Inception-Style Nested Data Formats (Scott Hanselman) - What seem to be a good solution at one point could put you in a big problem tomorrow. This post explains one possible cause.

Database


Miscellaneous

  • Markdown Style Guide - This post gives some simple tips to keep our Markdown document easy to read when not converted.

~Frank


Reading Notes #156

IMG_20140927_092417Suggestion of the week


Cloud


Programming


Miscellaneous


~Frank