<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-820464427634666804</id><updated>2026-09-23T11:29:38.870-07:00</updated><title type='text'>Cloud Bazaar</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-8271657002026466965</id><published>2019-08-04T07:04:00.001-07:00</published><updated>2019-08-04T07:04:18.371-07:00</updated><title type='text'>Design consideration for novice mobile app developers </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this blog I want to share an experience where I had to switch to a micro-service architecture for a mobile app. The requirement was to create an appointment scheduler for the business. Being a huge fan of ionic I with one of my friend started with the same, and in few days our first version was out in the market. During the initial discussion with the customer, the requirements which came forth had simple static pages and one dynamic appointment scheduling page. For the appointment scheduling page we used Firebase in the backend.&lt;br /&gt;
&lt;br /&gt;
Things were going fine after the release and the customer started marketing the app. The initial customer reviews/downloads were very inspiring. After the release of the first version we started getting bugs and change in requirements. We got a tricky bug filed during this time.&lt;br /&gt;
&lt;br /&gt;
The customer initially told that his shop was scheduled to open at 9 am and will continue till 6:30pm. Our appointment timings were not having this restriction, so a person can book an appointment at 8:00 am and expect the owner to serve him/her then. This proved to be a great issue as the owner would have to call the customer and inform him/her about the timings.&lt;br /&gt;
&lt;br /&gt;
The fix was simple just have a restriction in the UI which allows the customer to chose a time slot between 9-6:30. We implemented this and pushed the fix. As soon as we were about to celebrate the success with a chilled beer, the customer again informed us that the bug was still not fixed. On further investigation we saw that few customers were having the old version, and asking them to upgrade to a new version was not a good approach.&lt;br /&gt;
&lt;br /&gt;
Our chilled beers went back in the fridge and we started scratching our head again.&lt;br /&gt;
&lt;br /&gt;
The issue was we were novice mobile app developers without having a real life project experience. During our design phase we never considered version upgrades as a issue. We developed everything in ionic and had scripts talking to firebase which led to this issue.&lt;br /&gt;
&lt;br /&gt;
Time was running out for us, and we had to do something quick to calm our infuriated customer. We started doing spike and started going through such scenarios. Surprisingly there were so many cases where version upgrades proved to be a challenge for the businesses.&lt;br /&gt;
&lt;br /&gt;
We happened to see a way to fix this issue, luckily for us the solution was in firebase. Firebase provided a way to create functions which can help in creating small microservices&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQyRE-9neUj8iAk2ehL910YY3v5g2nePKe7naf54wJ8iHi-EZPeQJQFmdkGVLFnJW-jr-3mqRbcaIm7AIdh4O2XORXd0soMIUftDft7kZ0Y1VFhAdV-zE1MBhwAqGj4TYxEfmzer_pvCM/s1600/firebase.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;565&quot; data-original-width=&quot;1600&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQyRE-9neUj8iAk2ehL910YY3v5g2nePKe7naf54wJ8iHi-EZPeQJQFmdkGVLFnJW-jr-3mqRbcaIm7AIdh4O2XORXd0soMIUftDft7kZ0Y1VFhAdV-zE1MBhwAqGj4TYxEfmzer_pvCM/s640/firebase.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Firebase functions helps to create triggers on CRUD operations. For us this was the optimal solution as we thought to create a trigger on insertion action, where a customer who is booking an appointment before 9am or after 6:30pm will get notified that he/she has been rescheduled to the working hours.&lt;br /&gt;
&lt;br /&gt;
Now we were able to notify the users who were having older version of the app. We were also able to verify the logs and monitor how many users were booking out of business working hours&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ3XkM3Zbwb9BELMjm09OuxDsfqMPwXk4CAMYIg2pZv-Xh9vFfbUOmb_rAzeRT2HRJGdljNh0sI4YqlVSZa1fmf7UizbZLhFDoMsLEjqhRIUUZZy-UgE5_kKR38z-2TkQROJHlk6RhshA/s1600/firebase1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;674&quot; data-original-width=&quot;1600&quot; height=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ3XkM3Zbwb9BELMjm09OuxDsfqMPwXk4CAMYIg2pZv-Xh9vFfbUOmb_rAzeRT2HRJGdljNh0sI4YqlVSZa1fmf7UizbZLhFDoMsLEjqhRIUUZZy-UgE5_kKR38z-2TkQROJHlk6RhshA/s640/firebase1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
That&#39;s it now we were able to relax with our chilled beer as things went back to normal.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Summary&lt;/h3&gt;
&lt;div&gt;
If you are starting with your mobile app development do consider version upgrade issues. Firebase functions can provide micro service architecture which can prove extremely useful for your app development.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/8271657002026466965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2019/08/design-consideration-for-novice-mobile.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/8271657002026466965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/8271657002026466965'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2019/08/design-consideration-for-novice-mobile.html' title='Design consideration for novice mobile app developers '/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQyRE-9neUj8iAk2ehL910YY3v5g2nePKe7naf54wJ8iHi-EZPeQJQFmdkGVLFnJW-jr-3mqRbcaIm7AIdh4O2XORXd0soMIUftDft7kZ0Y1VFhAdV-zE1MBhwAqGj4TYxEfmzer_pvCM/s72-c/firebase.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-4719443835911165418</id><published>2018-05-31T21:39:00.000-07:00</published><updated>2018-05-31T22:05:51.906-07:00</updated><title type='text'>Code review guidelines for GRPC </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This blog we are going to discuss some nuances one should be aware of while reviewing GRPC related code. GRPC stands for (gRPC Remote Procedure Call. This is primarily getting developed by google as a platform for binary serialized messaging protocol. gRPC has made api development seamless because of its ability to support multiple coding languages, api versioning, high performance achieved due to binary data serialization etc.&lt;br /&gt;
&lt;br /&gt;
This blog is not related to introduction of gRPC, for that we have many other links like this one &lt;a href=&quot;https://www.youtube.com/watch?v=OZ_Qmklc4zE&quot; target=&quot;_blank&quot;&gt;gRPC Intro&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In this blog I want to share my learnings during my recent project in gRPC. In my project I am having a file getting streamed from one service to another and vice-versa. A sample scenario will be conversion of JPG to PNG where a JPG file is streamed to the server which converts it and sends back a PNG file.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;1. Which one will you choose&lt;/b&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7cO1V8PwiNUfWljEw2-I2P3hG1AH2helA7Z7vdr3oMlvwiqudLiJQwKbr9rkGDuCIWmY-H-twm370uJ5c7Ludj1CgMUvNzFoeX3PfuA7Hl5gTU5te4e7Eb13WSBVs7xngTQLTe_RccTo/s1600/grpc2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;479&quot; data-original-width=&quot;638&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7cO1V8PwiNUfWljEw2-I2P3hG1AH2helA7Z7vdr3oMlvwiqudLiJQwKbr9rkGDuCIWmY-H-twm370uJ5c7Ludj1CgMUvNzFoeX3PfuA7Hl5gTU5te4e7Eb13WSBVs7xngTQLTe_RccTo/s320/grpc2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
First question that you need to get answer while you are reviewing someone&#39;s code is what type of gRPC service flavor did they opt for and why. Take a minute to think about our scenario, what do you think should be an ideal choice?&lt;br /&gt;
&lt;br /&gt;
For our scenario we need to send file bytes and receive them so preferred way should be bi-directional streaming. This will give you a flexibility to break the file into chunks of bytes and send it to the server. You can either monitor the network transmission time or performance through such mechanism.&lt;br /&gt;
&lt;br /&gt;
So having a chat with the author regarding the choice of service and getting to know why he/she didn&#39;t choose the other types is a good way to start code reviewing.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;2. Follow TDD&lt;/b&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjiG0K4f3l-SWo8ZHgMB8u8oH7tumoh-EY1EBzWvbqdpBusiZMLW2Tt66UuFb6nJnsSH_n2x8hLb-MowacyKiIVlw3COc3qfGhfbwbpoC66HgNsYQpDSZDylh9RP2E8VSR7S0NpZyV7lo/s1600/grpc3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;400&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjiG0K4f3l-SWo8ZHgMB8u8oH7tumoh-EY1EBzWvbqdpBusiZMLW2Tt66UuFb6nJnsSH_n2x8hLb-MowacyKiIVlw3COc3qfGhfbwbpoC66HgNsYQpDSZDylh9RP2E8VSR7S0NpZyV7lo/s320/grpc3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
An industrial way to write code in production is begin with unit tests. TDD (Test data driven) development has proven not only to be efficient in producing less bugs but also has proven to be a good way of understanding the code for a new pair of eyes.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This can help you as a code reviewer to understand the problem in hand and give reviews accordingly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In order to write efficient unit tests, note we are creating a channel to talk to the grpc service from client. A test should not be complicated in the sense of creating a channel and stub , processing it&amp;nbsp; and eventually cleaning it. gRPC provides few ways through which you can create mocks of such channel and stubs seamlessly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Take a look at this &lt;a href=&quot;https://github.com/grpc/grpc-java/blob/master/examples/src/test/java/io/grpc/examples/helloworld/HelloWorldServerTest.java&quot; target=&quot;_blank&quot;&gt;example&lt;/a&gt;&amp;nbsp;provided by them.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/*&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;* This rule manages automatic graceful shutdown for the registered servers&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;and channels at the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;end of test.&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;@Rule&lt;br /&gt;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public final &lt;/span&gt;GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();&lt;/blockquote&gt;
&lt;br /&gt;
Creating a stub for tests should use such channel in order to prevent the hassle of graceful shutdown handling code&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;GreeterGrpc.GreeterBlockingStub blockingStub = GreeterGrpc.newBlockingStub(
   &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;// Create a client channel and register for automatic graceful shutdown.&lt;/span&gt;grpcCleanup.register(InProcessChannelBuilder.forName(serverName).directExecutor().build()));&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
Talking about the stub takes us to the next point which one should keep in mind while code reviewing&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
3. Deadlines&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvwqskk6siQIbblas5SOvkANgvYA6jQW-igjuLa7HtnR2EeXti0sQ0BpksdAs5gbCauqOeXkOfHPDbWsDZeRDgrr3tleDajQN60cfxIdALGTMq1cEsYeklJ2Zhb5llE6xu1hHAXBPBTXg/s1600/grpc4.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;223&quot; data-original-width=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvwqskk6siQIbblas5SOvkANgvYA6jQW-igjuLa7HtnR2EeXti0sQ0BpksdAs5gbCauqOeXkOfHPDbWsDZeRDgrr3tleDajQN60cfxIdALGTMq1cEsYeklJ2Zhb5llE6xu1hHAXBPBTXg/s1600/grpc4.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Indeed one should not be missing deadlines :) In world of gRPC deadline is considered to be timeouts. There is an emphatic statement at the start of this &lt;a href=&quot;https://grpc.io/blog/deadlines&quot; target=&quot;_blank&quot;&gt;blog&lt;/a&gt;&amp;nbsp;which I am sure will keep you awake during those sleepless nights of gRPC :)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the earlier example we saw how to create a stub, if the author is creating the stub in a similar way there should be a comment for him/her to think about deadlines&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;
response = blockingStub.withDeadlineAfter(deadlineMs, TimeUnit.MILLISECONDS).sayHello(request);&lt;/blockquote&gt;
Monitoring deadlines often can help understand various issues which are due to external factors like network, instance shutdown etc.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
4. Stubs&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdUURcwUKmTXqPrp0qQ7cL1VOklbQL5EWcbuDqfh6CWXBogXaZh3Kd8Iyds1OzCUNCvbTdj86KbHwKgkOrwI6UjFJD18IYhDMF-x5n2tN7qOMciSOt-vQeYkt6-LXhIbUI4f6M41Z3mGY/s1600/groc5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;499&quot; data-original-width=&quot;509&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdUURcwUKmTXqPrp0qQ7cL1VOklbQL5EWcbuDqfh6CWXBogXaZh3Kd8Iyds1OzCUNCvbTdj86KbHwKgkOrwI6UjFJD18IYhDMF-x5n2tN7qOMciSOt-vQeYkt6-LXhIbUI4f6M41Z3mGY/s320/groc5.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We have been talking about stubs, and this is the next thing as a code reviewer you should consider. gRPC provides 2 ways to create stubs blocking and non/blocking. Details at &lt;a href=&quot;https://grpc.io/docs/tutorials/basic/java.html#creating-a-stub&quot; target=&quot;_blank&quot;&gt;here&amp;nbsp;&lt;/a&gt;. If you happen to see a blocking gRPC stub ask the author from where it should get invoked. If that is a UI feature then there is a big red flag waving in front of that code.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
As we already know Asynchronous actions are the preferred way to do UI flow creation unless there is a dire need to have a blocking action.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
While code reviewing this is a critical observation that you need to make and discuss the consequences with the author.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;clear: both; text-align: center;&quot;&gt;
5. onError&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx-nPqtXUIWfxemfAg6zQRlhwyHSKPSCM42jlDtq-E5BwvtbbbuI13NB4p34cxr72eJj-qHTYgYNPZZPmp1LX6ElX7aZv6m71VTT8ozVftGxD_1VDndhMPg7aeSaHjI_mlx0WaIdXdKpQ/s1600/grpc8.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx-nPqtXUIWfxemfAg6zQRlhwyHSKPSCM42jlDtq-E5BwvtbbbuI13NB4p34cxr72eJj-qHTYgYNPZZPmp1LX6ElX7aZv6m71VTT8ozVftGxD_1VDndhMPg7aeSaHjI_mlx0WaIdXdKpQ/s1600/grpc8.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;@&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;Override&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onError(Throwable t) {
logger.log(Level.WARNING, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Encountered error in routeChat&quot;&lt;/span&gt;, t);&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
gRPC StreamObserver response comes with onNext, onComplete and onError scopes. onNext and onComplete is having a strict binding with your custom logic. But onError scope is interesting and should be considered for code reviewing.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This gets invoked whenever there is an error in server side. While debugging errors should be logged both on client and server side, but there are some scenarios when you don&#39;t throw specific exception to client because of information disclosure (security reason). In such cases it is very imperative to understand how the user is handling the error and how can you monitor for such exceptions.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;clear: both; text-align: center;&quot;&gt;
6. How to monitor for such exceptions&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcVvOLpCrwBCSTox3ZYwlXmdyjji3E9Vu529D9hPclbfxtE1PVEueDtbTDXoRVPZQ3XzarSFE6Be55skVUTpRuKSFEa091dw9bJkz0I7RoUvCG29zGiTpZGRnOT4zTsgk9MB0zf92RTM4/s1600/grpc7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;400&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcVvOLpCrwBCSTox3ZYwlXmdyjji3E9Vu529D9hPclbfxtE1PVEueDtbTDXoRVPZQ3XzarSFE6Be55skVUTpRuKSFEa091dw9bJkz0I7RoUvCG29zGiTpZGRnOT4zTsgk9MB0zf92RTM4/s320/grpc7.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Monitoring is the next crucial thing which the author should be thinking about. In order to have good monitoring one should be logging some kind of metric counter in scenarios like onError or onCompleted.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Prometheus provides an excellent way to create metrics which can help track errors on success and can help project in a dashboard. Take a look at the different types of counters they provide at &lt;a href=&quot;https://prometheus.io/docs/concepts/metric_types/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Here is a typical dashboard which I have for my image conversion service&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh3WSge8D5lhTdKvSpBCv3uU2IAo9-_WdIW5Kit9Gd4aiQrgzZ7xcrl-gqMID-N8QWg3OAoEa5DuPmtHpJI9Gb0Uxby8Fg7heE9ustInlfKRye91ofhKH22LZcpsiy05kCykse8sUeqnw/s1600/Screen+Shot+2018-05-31+at+9.32.41+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;753&quot; data-original-width=&quot;1600&quot; height=&quot;299&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh3WSge8D5lhTdKvSpBCv3uU2IAo9-_WdIW5Kit9Gd4aiQrgzZ7xcrl-gqMID-N8QWg3OAoEa5DuPmtHpJI9Gb0Uxby8Fg7heE9ustInlfKRye91ofhKH22LZcpsiy05kCykse8sUeqnw/s640/Screen+Shot+2018-05-31+at+9.32.41+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Dashboards like this not only can help monitor your service but also can help you create alert notifications in case something goes bad.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;clear: both; text-align: center;&quot;&gt;
Conclusion&lt;/h2&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ81y83PEdkldwBXt-LylEGtwXzeOveopeZXO1QZxdSp6bGGmYdoedHabQYlBw1fgBxMLLME4M1dbESIOEmBhn5d57lfA2khdwHSdKIaYTEc7-ANAYvHuSEsA0YmUQKr1sXseVhoqTv_g/s1600/grpc9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;480&quot; data-original-width=&quot;720&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ81y83PEdkldwBXt-LylEGtwXzeOveopeZXO1QZxdSp6bGGmYdoedHabQYlBw1fgBxMLLME4M1dbESIOEmBhn5d57lfA2khdwHSdKIaYTEc7-ANAYvHuSEsA0YmUQKr1sXseVhoqTv_g/s320/grpc9.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I still consider myself newbie to the world of gRPC, I am capturing the learnings which I got during my project. Will look forward to the community to highlight any points I have missed which you feel can be crucial while reviewing for gRPC code.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope to get your feedback on my understanding. &lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sayonara for now....&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/4719443835911165418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2018/05/code-review-guidelines-for-grpc.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/4719443835911165418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/4719443835911165418'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2018/05/code-review-guidelines-for-grpc.html' title='Code review guidelines for GRPC '/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7cO1V8PwiNUfWljEw2-I2P3hG1AH2helA7Z7vdr3oMlvwiqudLiJQwKbr9rkGDuCIWmY-H-twm370uJ5c7Ludj1CgMUvNzFoeX3PfuA7Hl5gTU5te4e7Eb13WSBVs7xngTQLTe_RccTo/s72-c/grpc2.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-5712600562648425696</id><published>2018-04-19T21:50:00.004-07:00</published><updated>2018-04-19T21:50:49.387-07:00</updated><title type='text'>Miracles can happen with Watson and Salesforce </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
After a long time I am writing this blog to share my experience with some ML stuff. Over past few days I made myself busy in learning about IBM Watson apis and how can they help Salesforce customers in their businesses.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBHEIiQX2umrY7Q1j4iBPNbLxpSLOSHGlbDw3Pm4hABqhfI3NtfEVNhcp3HkhpH-hScdFPyyLRjosEwrKScW3RslTavRksFrhPUVm31cS5z3YsYdZDsk5pwddvh5bJ0FFVJJWcTuf08lk/s1600/1_rDPXhjlvIbvephkMl5szZA.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;593&quot; data-original-width=&quot;1600&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBHEIiQX2umrY7Q1j4iBPNbLxpSLOSHGlbDw3Pm4hABqhfI3NtfEVNhcp3HkhpH-hScdFPyyLRjosEwrKScW3RslTavRksFrhPUVm31cS5z3YsYdZDsk5pwddvh5bJ0FFVJJWcTuf08lk/s320/1_rDPXhjlvIbvephkMl5szZA.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Thanks to Salesforce &lt;a href=&quot;https://trailhead.salesforce.com/en/projects/surface-data-from-ibm-watson-discovery-in-salesforce&quot; target=&quot;_blank&quot;&gt;trailhead module&amp;nbsp;&lt;/a&gt;&amp;nbsp;getting ramped up on IBM watson SDK for Salesforce was a piece of cake. During the trail one can learn about how to setup federated search in Salesforce in order to search through the files in IBM Watson.&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of my IBM Watson collection. Note all the ML stats that comes readily baked from IBM Watson&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKRC211VloLqRXwhvsgNUpLNwhwfpgtLLdJhtepwEPj97quNqutmzRgfBWJlALtoxkv5WLLt26-p9vOlRbW4c_STF3W1EZiNEUo0-fF6vJCbvnDjyHVAM51msxIS7Yvued1adjQLf41xs/s1600/Screen+Shot+2018-04-19+at+9.09.23+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;887&quot; data-original-width=&quot;1600&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKRC211VloLqRXwhvsgNUpLNwhwfpgtLLdJhtepwEPj97quNqutmzRgfBWJlALtoxkv5WLLt26-p9vOlRbW4c_STF3W1EZiNEUo0-fF6vJCbvnDjyHVAM51msxIS7Yvued1adjQLf41xs/s400/Screen+Shot+2018-04-19+at+9.09.23+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I have 34 documents uploaded in my collection as soon as the documents are uploaded IBM Watson massages the data and finds out top topics getting discussed in the document, overall sentiments in those documents, finds out the context(concepts) that the document is talking about, classification of those documents upto 5 levels etc.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
All the mentioned above aspects are already explained in multiple blog sources. What I am interested in sharing with you all is the use case scenarios where we can leverage this feature.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Salesforce has 3 primary standard Objects - Accounts, Opportunities and Cases. Most of the time there is a need of getting relevant informations. This implies a strong need of recommendation services. Among the recommendation features, files recommendation is an important aspect. Netflix leverages this aspect a lot. Based on context of what you are watching it tries to recommend you the next probable movie.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Similarly in Salesforce, based on the opportunity and the stage that you are in, recommendation feature can help the customer with the relevant file that is going to help him/her close that opportunity or deal.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Earlier it was difficult because Salesforce still don&#39;t provide Smart search feature for files. But with IBM watson NLP search feature we can create an intelligent component for the same.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Use Case Scenario: &lt;/b&gt;As a customer I should get document recommendation for closing my deal/opportunity, case or account&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Acceptance Criteria:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;If I change the opportunity stage from prospect to negotiation/review the component should be able to recommend me all the relevant documents which are similar to this opportunity and were used in such similar stage.&lt;/li&gt;
&lt;li&gt;If a support person searches for something like &quot;Show me relevant files to fix login issues&quot; the component should respond back with all the relevant examples&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
There are such n number of examples like these which can be solved with such component.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Such scenarios can be achieved using the IBM Watson Discovery api for Natural Language Processing. Let me show you the API call and then discuss about that briefly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;Coding Time = (2hrs Trailhead + 3 hour Apex code + 1 hour testing)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
It took me around 5-6 hours to get this thought into reality.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx1cnFasSrqMz7HVrQQ4dZto5oOnkcK2DKA_Y-XY1_roC2S8kxL0nB-pMowwhQ0CIcj0dYsPicqEMNjakEvvIQ524FvkpQI6CGoDVX7uy4zU-2Z6bSUmz4A06gTXL162O0gAN7lUZPPvk/s1600/team-trailhead_project-ibm-discovery_en-us_surface-data-from-ibm-watson-discovery-in-salesforce_images_cj7u022cf013h0p9d9y9t9gun_e4187708493e61af27e50d3b1158f587.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;505&quot; data-original-width=&quot;800&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx1cnFasSrqMz7HVrQQ4dZto5oOnkcK2DKA_Y-XY1_roC2S8kxL0nB-pMowwhQ0CIcj0dYsPicqEMNjakEvvIQ524FvkpQI6CGoDVX7uy4zU-2Z6bSUmz4A06gTXL162O0gAN7lUZPPvk/s400/team-trailhead_project-ibm-discovery_en-us_surface-data-from-ibm-watson-discovery-in-salesforce_images_cj7u022cf013h0p9d9y9t9gun_e4187708493e61af27e50d3b1158f587.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Step 1: We need to create an apex controller which will be invoking the IBM Watson Discovery API through Heroku Service.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
@AuraEnabled&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; public static String getSearchResults(String query) {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IBMDiscoveryV1 discovery = new IBMDiscoveryV1(&#39;2017-11-07&#39;);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IBMDiscoveryV1Models.QueryOptions options&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = new IBMDiscoveryV1Models.QueryOptionsBuilder(&#39;&amp;lt;&amp;lt;environmentId&amp;gt;&amp;gt;&#39;,&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;&amp;lt;&amp;lt;collectionId&amp;gt;&amp;gt;&#39;)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .naturalLanguageQuery (query)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .returnField(new List&amp;lt;String&amp;gt; {&#39;url&#39;,&#39;extracted_metadata&#39;,&#39;enriched_text&#39;})&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .build();&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IBMDiscoveryV1Models.QueryResponse response = discovery.query(options);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.debug(response.toString());&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return response.toString();&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
With this small code snippet we can create our own intelligent component. In here we are query a NLP string which goes as a NLPQuery. In response we ask Watson to give us extracted metadata like file name, title etc. along with enriched text like Top Topics getting discussed, Context of those documents, Classification categories etc.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Step 2: Below is the javascript sample where we can create an NLP query such as &quot;Give recommended files for &amp;lt;opportunity name&amp;gt;&amp;gt; in stage &amp;lt;&amp;lt;Opportunity Stage&amp;gt;&amp;gt; Such query can help us mine through our vast data and retrieve other similar opportunity documents where files were uploaded or created by other teams.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
getQuery : function(cmp, id) {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var self=this;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var action = cmp.get(&#39;c.getSearchResults&#39;);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var acctAction = cmp.get(&#39;c.getOpportunity&#39;);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; acctAction.setParams({recordId: id});&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; acctAction.setCallback(this, function(response) {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var result = response.getReturnValue();&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;var query = &quot;Get recommended files for &quot; + result.Name+&quot; in stage &quot;+ result.StageName;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(query);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;action.setParams({name: query});&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; action.setCallback(this, function(response) {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var state = response.getState();&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let fileNames = new Set();&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(cmp.isValid() &amp;amp;&amp;amp; state === &#39;SUCCESS&#39;) {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var resp = response.getReturnValue();&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var respArr = JSON.parse(resp)[&quot;results&quot;];&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; respArr.forEach(function(file){&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileName = file[&#39;additional_properties&#39;][&quot;extracted_metadata&quot;][&quot;filename&quot;]&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName=fileName.replace(/\.[^/.]+$/, &quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileNames.add(fileName);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.getUrl(cmp, Array.from(fileNames));&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $A.enqueueAction(acctAction);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $A.enqueueAction(action);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Note there are 2 nested actions. First action will get the opportunity Id and do a SOQL query to get the opportunity name and stage&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
@AuraEnabled&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; public static Opportunity getOpportunity(Id recordId) {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Opportunity oppt = [SELECT Name, StageName FROM Opportunity WHERE Id=:recordId LIMIT 1];&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return oppt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Second action creates the NLP query with the results of the first action and send it to IBM Watson to get the response. In the javascript controller I am just getting the filename from the extracted metadata, this can be enhanced to get top topics for that document, sentiment analysis and classification categories.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;Conclusion&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
In this blog I wanted to share my experience of creating a lightning component within hours which is equipped with AI features in order to break the apprehension that comes along with AI requirements. I am trying to enhance this component with more Watson responses and hope to share those experiences with you all pretty soon. As always thanks for inspiring me by giving your feedback on my blogs. If you need more details regarding this, do let me know in the comment section.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/5712600562648425696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2018/04/miracles-can-happen-with-watson-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/5712600562648425696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/5712600562648425696'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2018/04/miracles-can-happen-with-watson-and.html' title='Miracles can happen with Watson and Salesforce '/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBHEIiQX2umrY7Q1j4iBPNbLxpSLOSHGlbDw3Pm4hABqhfI3NtfEVNhcp3HkhpH-hScdFPyyLRjosEwrKScW3RslTavRksFrhPUVm31cS5z3YsYdZDsk5pwddvh5bJ0FFVJJWcTuf08lk/s72-c/1_rDPXhjlvIbvephkMl5szZA.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-2580630076217102156</id><published>2017-10-06T21:51:00.000-07:00</published><updated>2017-10-06T21:51:23.838-07:00</updated><title type='text'>Unleash the power of Google Vision and Metamind apis in Salesforce</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
POC&lt;/h2&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dz04OlkJkflO5wWNMt0ZQ17XrWMKscrdRJDer9ab-Bb4e0Sah4UrT57OzqM2JNpEen7RfoW6QnVlFihUEa4hw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/2580630076217102156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2017/10/unleash-power-of-google-vision-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2580630076217102156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2580630076217102156'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2017/10/unleash-power-of-google-vision-and.html' title='Unleash the power of Google Vision and Metamind apis in Salesforce'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-2635863447457099399</id><published>2017-09-27T00:32:00.000-07:00</published><updated>2017-09-27T12:39:07.024-07:00</updated><title type='text'>Create an easy #AI enabled Lightning component in #Salesforce using #Gensim</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&amp;lt;&amp;lt; If you like to see the component live in my na30 org, please post your email id and Name in this blog comment and I will send you the org details&amp;gt;&amp;gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
Salesforce is a major player in CRM industry. Among its major key features are Marketing cloud, Sales cloud, Service cloud, community cloud etc. Across all the clouds resides a platform called files. There is a huge potential of improving the way we use files though Artificial Intelligence.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsmLhA0cgu06Cdgl8xagV7__P4O1ecqzjKKZZ_njQPC4BVzXRGLzLHM3K534jgZtgSZROJfpxJb23p26bDZIbSROYcT1N27JzL7L5UoK1YNkce0NZuZuKqrRS1eEgPmnnsS6ZWfcYI_BM/s1600/Screen+Shot+2017-09-25+at+10.49.31+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;862&quot; data-original-width=&quot;1600&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsmLhA0cgu06Cdgl8xagV7__P4O1ecqzjKKZZ_njQPC4BVzXRGLzLHM3K534jgZtgSZROJfpxJb23p26bDZIbSROYcT1N27JzL7L5UoK1YNkce0NZuZuKqrRS1eEgPmnnsS6ZWfcYI_BM/s400/Screen+Shot+2017-09-25+at+10.49.31+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Chatter is another prevalent aspect of Salesforce. This looks like a corporate Facebook platform. Here you share your views, ask questions, update your groups, Follow your peers etc. This is another platform which is having exposed to variant amount of data and can help us infer lots of hidden meaning.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhE4RRCN39AM6YF6B_TDct1Qoy2Q5dPKiD_4j02H1FhwqhAq84gfvCm5_XO988Juo-m7n8g6LriUqZPXRaaLpED4BXyi4IIMXYUHZTJXrazrt3HkbzUb3hgdLrvDQwSpVKUCOa2JCvfXg/s1600/chatter_feed_lightning.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;616&quot; data-original-width=&quot;873&quot; height=&quot;281&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhE4RRCN39AM6YF6B_TDct1Qoy2Q5dPKiD_4j02H1FhwqhAq84gfvCm5_XO988Juo-m7n8g6LriUqZPXRaaLpED4BXyi4IIMXYUHZTJXrazrt3HkbzUb3hgdLrvDQwSpVKUCOa2JCvfXg/s400/chatter_feed_lightning.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So what I am trying to infer? I mentioned about Artificial intelligence, so definitely we are going to talk about that. In this blog I want to show how we can easily create a Lightning component which can help you do some interesting cool things related to Files and Chatter Feed.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Problem Statement&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
First and foremost I wrote down the issues which were affecting me on a daily basis. Out of which I ranked 2 scenarios which I felt if solved, will have a beneficial impact on the customer.&lt;br /&gt;
&lt;br /&gt;
1. First was File Summarization. We tend to upload multiple files on a daily basis but how to make the user interested to read them was an issue. If I was&amp;nbsp;@mentioned in a feed with a big pdf as an attachment, normally I would skip reading it unless I felt it is really important. Even if it was important most of the time I felt reading first few paragraphs from the document. I always felt a need to file summarization which would have highlighted only the high priority sentences. I felt if this problem was solved it will not only help the user to save time and effort but also will have a great impact in recommending files.&lt;br /&gt;
&lt;br /&gt;
2. Second similar problem was in Chatter feeds. Most of the time we have seen in a question and answer feed, the comment posts grow beyond 5 or 10 threads. In such threads it is time consuming for a reader to go through each and every post and figure out the answer from them. The solution that I thought was to have a summarized view of a feed which can highlight the main feeds and can also suggest the user which post to refer.&lt;br /&gt;
&lt;br /&gt;
Both the above problems were flavors of a single text summarization feature. I felt like if I was able to get a solution of these 2 problems then it will suffice me for my needs.&lt;br /&gt;
&lt;br /&gt;
After finalizing the Problem statement my next intent was to figure out the tool or utility which I will use for this solution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Why Gensim?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Nowadays thanks to the open source world there are numerous tools and utilities which can help you do machine learning without any detailed prior knowledge about the same. Among these tools one of them is Gensim.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://radimrehurek.com/gensim/&quot; target=&quot;_blank&quot;&gt;Gensim&lt;/a&gt;&amp;nbsp;has been used by many corporates because of its ease to use and free licenses (Please note not all features in Gensim are having free licenses, please go through the documentation before you opt for it)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Gensim is written in python language. Because of it modular designs it is easy to install and leverage the apis. During this learning phase I did a little bit of research with Metamind and ML libraries for Apache Spark.&lt;br /&gt;
&lt;br /&gt;
Metamind is a best opted tool for this purpose because&lt;br /&gt;
a. It is Salesforce product&lt;br /&gt;
b. Its apis easily bind with Salesforce.&lt;br /&gt;
But there was a blocker in terms of text related analysis. Metamind has just beta released a&amp;nbsp;&lt;a href=&quot;https://metamind.readme.io/docs/intro-to-einstein-language&quot; target=&quot;_blank&quot;&gt;sentiment analysis&lt;/a&gt;&amp;nbsp;feature. Apart from this it is not having any other text related model.&lt;br /&gt;
&lt;br /&gt;
ML Lib in Apache spark comes with a set of libraries which can be trained and used for different machine learning use cases. There was no con for this, but the fact that you need to have a dataset on which you need to run your model was cumbersome. Moreover the effort quadruples itself when we consider multi language scenarios.&lt;br /&gt;
&lt;br /&gt;
Gensim proved to be the best among the 3 tools based on following aspects&lt;br /&gt;
1. It is open sourced and has free commercial license&lt;br /&gt;
2. It can easily be deployed in Heroku. Heroku has been owned by Salesforce and normally customers don&#39;t have issues sharing their data with Heroku services&lt;/div&gt;
&lt;div&gt;
3. It is having support for fasttext. FastText as you might know it is a research lab for Facebook which has pre-trained models for 90+ languages. So all the goodness of that comes with Gensim too.&lt;br /&gt;
4. You get a generic model which can be used right away instead of making the model learn from scratch with your data. For a hackday this felt as a boon.&lt;br /&gt;
&lt;br /&gt;
Gensim leverages Text2Rank algorithm where it ranks each sentences respecting their occurrence of appearance in the document. It then shows top ranked sentences based on weighing factor which will be discussed later. You can read more about it at &lt;a href=&quot;https://radimrehurek.com/gensim/tutorial.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
After finalizing the tool, the next item was to design the system.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Architectural Design&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Gensim can be easily ported as a microservice. The intent was to have a microservice which talks to a custom lightning component. The custom lightning component can be easily integrated in the user&#39;s page and can help the user retrieve the summary details.&lt;br /&gt;
&lt;br /&gt;
In order to port Gensim in Microservice I began to explore all the options and figured out that we can easily host gensim in Heroku.&lt;br /&gt;
&lt;br /&gt;
Following diagram gives more details&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8m6p1e231M9MU41NYdgAv9vXtGHugoOXT5bejwC38fs1taz-r5IVTzpaxX5qHIeXvANHm42FkhKLaT2jz-L42vml-8LNTO7qSLJfLf6uslQ5Td5Xowv5LBXGZX3t3_0bgaoCucoA36W4/s1600/Screen+Shot+2017-09-26+at+11.12.34+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1199&quot; data-original-width=&quot;1600&quot; height=&quot;479&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8m6p1e231M9MU41NYdgAv9vXtGHugoOXT5bejwC38fs1taz-r5IVTzpaxX5qHIeXvANHm42FkhKLaT2jz-L42vml-8LNTO7qSLJfLf6uslQ5Td5Xowv5LBXGZX3t3_0bgaoCucoA36W4/s640/Screen+Shot+2017-09-26+at+11.12.34+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Details&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;1.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Lightning
Component talks to Heroku Service.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;2.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Heroku
Service talks to Salesforce Rest &lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;apis&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;3.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Through
Rest Api we fetch Salesforce File content or Chatter Feed data based on request&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;4.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Data
is sent back to Heroku Service&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;5.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Data
sent to Gensim which summarizes the content and sends back the result&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;6.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Summary
saved in custom object&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;7.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Heroku
Service fetches summary data from custom object&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: +mj-lt; mso-special-format: &amp;quot;numbullet3\,1&amp;quot;;&quot;&gt;8.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;Heroku
Service returns the results to Lightning component&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;color: black; font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;b&gt;Coding Time&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Let&#39;s start with the microservice first.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Note we need will be deploying the python application on Heroku using gunicorn and Flask. There are numerous example in internet which can show you how. Here is a &lt;a href=&quot;https://github.com/datademofun/heroku-basic-flask&quot;&gt;link&lt;/a&gt; of such approach that you can refer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As per the documentation we need a requirements.txt file which will have all the pre-requisites. For our case we need the following softwares to be installed as a setup process. Note we are having gensim 0.12.4 and simple-salesforce=0.72.2. Gensim will help us to do the summarization while simple-salesforce will help us connect to Salesforce&lt;br /&gt;
&lt;div style=&quot;direction: ltr; margin-bottom: 0pt; margin-left: .5in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; text-indent: -.5in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;asn1crypto==0.22.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;certifi==2017.4.17&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;cffi==1.10.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;chardet==3.0.4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;click==6.7&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;cryptography==1.9&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;enum34==1.1.6&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Flask==0.12.2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;gunicorn==19.7.1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;idna==2.5&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;ipaddress==1.0.18&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;itsdangerous==0.24&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Jinja2==2.9.6&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;MarkupSafe==1.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;pycparser==2.17&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;pyOpenSSL==17.0.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;requests==2.18.1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;six==1.10.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;urllib3==1.21.1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Werkzeug==0.12.2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;gensim==0.12.4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Cython==0.24&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;simple-salesforce==0.72.2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Here is the Python code for the same&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;import sys&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;import requests&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;from flask import Flask, request&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;from simple_salesforce import Salesforce&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;from gensim.summarization import summarize, keywords&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
We need to import Flask which will help us create the get and post api endpoints. Note with summarization from gensim I am also importing keywords. Keywords api helps in doing topic classification from within the content.&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;app = Flask(__name__)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;reload(sys)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;sys.setdefaultencoding(&#39;utf-8&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Flask needs to be initialized which will give the app object. We have to set the default encoding value to utf-8 else it will throw exception during GET and POST transactions.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;@app.route(&#39;/getfilesummary/&#39;,methods=[&#39;GET&#39;])&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;def getFileSummary():&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;docId = request.args.get(&#39;docId&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;print docId&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;summaryObj = Summary()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;content =summaryObj.getcontentfromtextfile(docId)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;summary=summarize(content, word_count=50)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;topics=keywords(content, ratio=0.01)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if summaryObj.verifyDocEntryExist(docId) is False:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#Insert the summary with document in custom object&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;summaryObj.insertSummaryInFileSummaryObject(docId, summary, topics)&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return summary&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Believe me when I say you just need to do this for summarization logic. Now you will realize how easy it is to integrate gensim with Salesforce. Let me explain what is done in this module. First and foremost the endpoint is named as getfilesummary and it is invoked over GET protocol. Ex: http://herokuserviceurl/getsummary&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
The endpoint accepts you to send a docId (which starts with a prefix 069). We are invoking a Summary Class object which we have defined later which will help us with the handle of the object. it has a method called getcontentfromtextfile which gets the text content of that file. Then with the content we just need to invoke the summarize method which was imported from gensim. While calling summarize method we can mention a weight which says how much word should the resultant summary has. In my case I wanted to keep it short so made 50 words.&lt;br /&gt;
&lt;br /&gt;
Once we get the summary we are calling for the topics for the same file by invoking the keywords method. Note here there is a different weight given to the method and that is ratio. Ratio helps you define a percentage which you want to skim from the top as the output. Precisely you can play around with these 2 weighing factors. After getting the summary we&amp;nbsp;need to insert the same in our custom object. &lt;br /&gt;
&lt;br /&gt;
The intent is if the summary is already present in the custom object then skip insertion else insert the data. Note: we should also have another scope to update the summary. As it was a hackday project I didn&#39;t felt the necessity to make it full proof for all scenarios. Eventually you return the summary&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;@app.route(&#39;/getfeedsummary/&#39;, methods=[&#39;GET&#39;])&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;def getFeedSummary():&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;feedId = request.args.get(&#39;feedId&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;summaryObj = Summary()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;summary = summaryObj.getdatafromfeed(feedId)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if summaryObj.isFeedEntryExist(feedId) is False:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#Insert the summary with feed in custom object&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;summaryObj.insertInFeedSummaryObject(feedId, summary)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;print summary&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return summary&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Similarly we can have the same flow for feed summary too, where you get the feed data from Salesforce, send the text to gensim summary and get the summary. Eventually insert the details in the Salesforce custom object&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;@app.route(&#39;/getsummary/&#39;, methods=[&#39;GET&#39;,&#39;POST&#39;])&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;def getSummary():&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;text = request.values.get(&#39;text&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;summary = summarize(text, word_count=50)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;print &quot;SUMMARY: &quot; + summary&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return summary&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
I made a generic method just for fun where if you send a text as an argument it should respond back with the summary text.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Now comes the Summary class definition&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;class Summary:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def getcontentfromtextfile(self, docId):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;sf=self.__getSalesforceObject()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sessionId = sf.session_id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;versionobject = sf.query_all(&quot;SELECT VersionData from ContentVersion WHERE ContentDocumentId=&#39;%s&#39;&quot; % (docId))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;versionDataUrl=&#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for record in versionobject[&#39;records&#39;]:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;versionDataUrl&amp;nbsp;= record[&#39;VersionData&#39;]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;url = &#39;https://na30.salesforce.com&#39;+versionDataUrl&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;response = requests.get(url,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;headers={ &#39;Content-Type&#39;: &#39;application/json&#39;, &#39;Authorization&#39;: &#39;Bearer %s&#39; % sessionId })&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;content = response.text&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return content&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The first method of Summary class is getcontentfromtextfile. In here our intent is to get the text content of a file. We will try to execute sobject query using simple_salesforce.&lt;br /&gt;
&lt;br /&gt;
Firstly we need to get the salesforce object, this is nothing but initialization of simple salesforce object. docId is sent to the sobject query as an argument. Note to get the text content we need to construct an url which will have the versionData from Content Version pertaining to the content document Id.&lt;/div&gt;
&lt;br /&gt;
Once the url is constructed , querying the same should give you the text content&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def insertSummaryInFileSummaryObject(self, docId, summary, keywords):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf = self.__getSalesforceObject()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf.FileSummary__c.create({&#39;ContentDocumentId__c&#39;:docId, &#39;FileSummaryText__c&#39;:summary, &#39;Topics__c&#39;:keywords})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def insertInFeedSummaryObject(self, feedId, summary):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf = self.__getSalesforceObject()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf.FeedSummary__c.create({&#39;FeedId__c&#39;:feedId, &#39;FeedSummaryText__c&#39;: summary})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def deleteSummaryObject(self, docId):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf=self.__getSalesforceObject()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf.FileSummary__c.delete(docId)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def verifyDocEntryExist(self, docId):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;totalRecords=&#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf=self.__getSalesforceObject()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;fileSummaries = sf.query_all(&quot;SELECT FileSummaryText__c from FileSummary__c WHERE ContentDocumentId__c=&#39;%s&#39;&quot; % (docId))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;totalRecords=fileSummaries[&#39;totalSize&#39;]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;except ValueError:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;print &#39;I see an exception&#39; + ValueError&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if totalRecords == 0:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return False&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return True&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def updateDocEntryExist(self, docId, summary):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf=self.__getSalesforceObject()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;record = sf.query_all(&quot;SELECT FileSummaryText__c from FileSummary__c WHERE ContentDocumentId__c=&#39;%s&#39; LIMIT 1&quot; % (docId))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;record.FileSummaryText__c= summary&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf.FileSummaryText__c.upsert(record)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
All the above methods are related to the CRUD operations for custom object. These are pretty simple to understand and can be interpreted from the Sobject query.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;#Get the salesforce object&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def __getSalesforceObject(self):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sf = Salesforce(username=‘&amp;lt;&amp;lt;username&amp;gt;&amp;gt;’, password=“&amp;lt;&amp;lt;password&amp;gt;&amp;gt;“, security_token=‘&amp;lt;&amp;lt;token&amp;gt;&amp;gt;’)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return sf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
Finally documenting the method which was helping us to create the simple_salesforce object. In here I was using the username/password authentication approach as it was easy to implement and less risky for a hackathon. If you want to implement this in production, I would suggest you follow the oauth approach.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Conclusion&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
Note I have not documented the feed summarization method here as it is pretty similar to files summarization.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Well that&#39;s it folks this is the only code snippet you need to follow for your heroku service. I am not documenting the implementation of Lightning component as there are multiple examples available on net. In order to query this heroku service endpoint from your lightning component, setup a named credential and then create a http request from inside the controller.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There is a huge opportunity to leverage this solution in multiple arenas of Salesforce&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihsAEKY6xzl54yewVwnMSKyjEzhJRQwNrthV68ZtSgokAT9xcWUmbxtaPBnnLW1SQ7_qGc2tj0fxVxQt95cwpTRM_Wf8pWOeFepGQE4j1-mP8l3Iz9vi-ALXxWdLadT-J8BveU7wyf_SA/s1600/Screen+Shot+2017-09-27+at+12.17.16+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1197&quot; data-original-width=&quot;1600&quot; height=&quot;475&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihsAEKY6xzl54yewVwnMSKyjEzhJRQwNrthV68ZtSgokAT9xcWUmbxtaPBnnLW1SQ7_qGc2tj0fxVxQt95cwpTRM_Wf8pWOeFepGQE4j1-mP8l3Iz9vi-ALXxWdLadT-J8BveU7wyf_SA/s640/Screen+Shot+2017-09-27+at+12.17.16+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Above figure highlights a few&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
1. New Sales representatives can quickly digest files and feed information&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
2. Better file search if the indexing happens on summary field&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
3. Machine can now suggest which could be the correct answer in a question answer feed. Humans can just vote up or down the particular answer&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
4. Support representative has the ability to connect documents with cases without going through the entire document and just by following the summary.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Screenshots&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
File Summary&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRYhnZksNzddn3-bgMBtYtv6VMx0zqAyQO6GVQNPgZsnu2IHKWVtBL6i4bdx4P5AMjew_z7PPi-hGBe_1ibYW5hQKgmhLga7_3REzrrWP1fjfx1_1Pj3bad1d5PLqxoeCE_wyaX7Rahl0/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;572&quot; data-original-width=&quot;652&quot; height=&quot;560&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRYhnZksNzddn3-bgMBtYtv6VMx0zqAyQO6GVQNPgZsnu2IHKWVtBL6i4bdx4P5AMjew_z7PPi-hGBe_1ibYW5hQKgmhLga7_3REzrrWP1fjfx1_1Pj3bad1d5PLqxoeCE_wyaX7Rahl0/s640/Untitled.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For the above summary here is the text for the actual document&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Pomegranate stimulates fat reduction and prevent insulin resistance&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Pomegranate is a rich source of punicic acid.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;A study conducted Leiden University Medical Centre, Netherlands demonstrated that obese and insulin resistant mice after feeding with pomegranate seed oil for 12 weeks showed lower body weight, significant decrease in body fat and improved peripheral insulin sensitivity.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;A research study was conducted at The Department of Biological Sciences and Biotechnology, Tsinghua University, China to investigate the anti-obesity effects of pomegranate leaf extract (PLE).&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Obese mice were treated with this extract for 5 weeks. It was observed that obesity and hyperlipidaemia were inhibited by the PLE. Scientists concluded that PLE can be a novel appetite suppressant too.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Another study conducted to investigate the benefits of pomegranate seed oil (PSO) on hyperlipidaemic subjects showed that PSO has favourable effects on the lipid profiles.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Insulin resistance is associated with weight gain and obesity.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Pomegranate is a good source of anthocyanins. A scientific study demonstrated that anthocyanins reduce dyslipidaemia, enhances antioxidant capacity and prevents insulin resistance in diabetic patients.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;A review conducted in the King Saud University, Saudi Arabia mentions pomegranate as a preventive agent against obesity. This is mainly because of the tannin, anthocyanin, antioxidants and flavonoid content in them.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;What it means? Pomegranate through various mechanisms is found to promote fat reduction and prevents insulin resistance thereby averting the risk of obesity.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;2. Pomegranate enhances satiety, appetite control and prevent over-eating&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Dietary fiber has a great physiological effect on satiation because of its properties of bulk addition and viscosity impartment.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;These fibers prolong the intestinal phase of digestion and absorption. This provides a good time for macronutrients to trigger the signals of satiation and thus prevent in over eating. This property of dietary fiber is highly beneficial in weight management.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Pomegranate is a great source of dietary fiber. They consist of around 11.3g per fruit providing 45% of the daily need of dietary fiber.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;Dietary fiber withdraws water and holds on to it. This results in expanding of dietary fiber in stomach enhancing the satiety. As a result, food is absorbed slowly preventing the intake of unnecessary calories.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;What it means? Pomegranate is a great source of dietary fiber. Dietary fiber enhances satiation, appetite control and thus helps in controlling body weight.&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/2635863447457099399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2017/09/create-your-own-ai-in-salesforce-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2635863447457099399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2635863447457099399'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2017/09/create-your-own-ai-in-salesforce-with.html' title='Create an easy #AI enabled Lightning component in #Salesforce using #Gensim'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsmLhA0cgu06Cdgl8xagV7__P4O1ecqzjKKZZ_njQPC4BVzXRGLzLHM3K534jgZtgSZROJfpxJb23p26bDZIbSROYcT1N27JzL7L5UoK1YNkce0NZuZuKqrRS1eEgPmnnsS6ZWfcYI_BM/s72-c/Screen+Shot+2017-09-25+at+10.49.31+PM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-2088599950542380704</id><published>2017-07-08T21:42:00.002-07:00</published><updated>2017-07-08T21:43:42.298-07:00</updated><title type='text'>Creating Lightning component for Salesforce using Machine Learning</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span class=&quot;ember-view&quot; id=&quot;ember10415&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: inherit; color: rgba(0, 0, 0, 0.7); font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; font-size: 15px; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;background: 0px 0px; border: 0px; box-sizing: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Excited to share my new &lt;/span&gt;&lt;a class=&quot;hashtag-link ember-view&quot; data-control-name=&quot;update_hashtag&quot; href=&quot;https://www.linkedin.com/search/results/content/?keywords=%23Salesforce&amp;amp;origin=HASH_TAG_FROM_FEED&quot; id=&quot;ember10418&quot; style=&quot;background: 0px 0px transparent; border: 0px; box-sizing: inherit; color: #827be9; font-weight: 700; margin: 0px; padding: 0px; text-decoration-line: none; touch-action: manipulation; vertical-align: baseline;&quot;&gt;Salesforce&lt;/a&gt;&lt;a class=&quot;hashtag-link ember-view&quot; data-control-name=&quot;update_hashtag&quot; href=&quot;https://www.linkedin.com/search/results/content/?keywords=%23Lightningcomponent&amp;amp;origin=HASH_TAG_FROM_FEED&quot; id=&quot;ember10421&quot; style=&quot;background: 0px 0px transparent; border: 0px; box-sizing: inherit; color: #827be9; font-weight: 700; margin: 0px; padding: 0px; text-decoration-line: none; touch-action: manipulation; vertical-align: baseline;&quot;&gt;Lightningcomponent&lt;/a&gt;&lt;span style=&quot;background: 0px 0px; border: 0px; box-sizing: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; which takes in a File content and shows the File Summary and Top File Topic&lt;/span&gt;&lt;/span&gt;&lt;span data-entity-hovercard-id=&quot;urn:li:fs_miniCompany:3185&quot; style=&quot;background: 0px 0px; border: 0px; box-sizing: inherit; color: #0084bf; cursor: pointer; font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; font-size: 15px; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; text-align: left; text-decoration-line: none; touch-action: manipulation; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifBfF1859BLa3F5tMLRYqUaXzu1z37GZGzhxJ3mQEy25wh_YhpMjHicFZE60S2RELUidX9Yd8rvhGU-Y_QI-5V6tI6uTOaDftA8qJ4evWVjHOkENtfMsiFop3xG64i6tQo_ZHe3njmp6I/s1600/Screen+Shot+2017-07-08+at+8.36.24+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;770&quot; data-original-width=&quot;1600&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifBfF1859BLa3F5tMLRYqUaXzu1z37GZGzhxJ3mQEy25wh_YhpMjHicFZE60S2RELUidX9Yd8rvhGU-Y_QI-5V6tI6uTOaDftA8qJ4evWVjHOkENtfMsiFop3xG64i6tQo_ZHe3njmp6I/s640/Screen+Shot+2017-07-08+at+8.36.24+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/2088599950542380704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2017/07/creating-lightning-component-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2088599950542380704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2088599950542380704'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2017/07/creating-lightning-component-for.html' title='Creating Lightning component for Salesforce using Machine Learning'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifBfF1859BLa3F5tMLRYqUaXzu1z37GZGzhxJ3mQEy25wh_YhpMjHicFZE60S2RELUidX9Yd8rvhGU-Y_QI-5V6tI6uTOaDftA8qJ4evWVjHOkENtfMsiFop3xG64i6tQo_ZHe3njmp6I/s72-c/Screen+Shot+2017-07-08+at+8.36.24+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-2196627998087044876</id><published>2017-02-20T21:28:00.001-08:00</published><updated>2017-07-23T20:28:05.423-07:00</updated><title type='text'>Firebase authentication with Ionic creator</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Why Ionic creator?&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Mobile first is the new mantra of today&#39;s applications. Building mobile based apps has also seen a huge growth from early 90s. Along with languages like swift and Java, which are focussed on specific environments like IOS and Android respectively, we have seen good traction on platforms like phonegap and cordova.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Today&#39;s startup are aiming mostly on business logic which are compatible with desktop and mobile devices. Investing on individuals for each aspects might be expensive. For ex: Instead of having 3 developers, 1 for android 1 for IOS and 1 for web is far too expensive than having 1 for all 3. Here platforms like Phonegap and Cordova play a vital role in binding one code for all 3 platforms.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Cordova is just a fork of Phonegap, but as per my research if someone ask you which one you will chose, I suggest go with Cordova. Phonegap is a adobe project compared to Cordova which is an apache open source project. Being a part of Apache community it seems to be more reliable and maintainable in future by the community.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You might be wondering where Ionic is going to come?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Well here it is, Ionic plays a critical role in binding cordova plugins with angularjs components. Ionic framework exists since past few years, but what we want to talk about here is Ionic creator which is a web version of creating mobile based app with easy to use utilities.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It took me just 3 hours to have a basic app up and running without going through Android or IOS based native coding tutorials.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ionic creator gives you a web view where you can not only preview your changes real time but also can create beautiful designs and give that standard native look and feel which will make your app great for the consumer&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89a0xfeHUVcMeot6U-p12X0EME7sh0BV8M7-sbnC7OMXs0DAAk2XcB7uLBqEGpABg22CUsEKqLBl1Q4gkengzFHomtx3SXvcmmAitVwrNevnvbeDnLbyUEXmXF1BXY7kHQHezFXrC0qY/s1600/Screen+Shot+2017-02-20+at+8.33.03+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;211&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89a0xfeHUVcMeot6U-p12X0EME7sh0BV8M7-sbnC7OMXs0DAAk2XcB7uLBqEGpABg22CUsEKqLBl1Q4gkengzFHomtx3SXvcmmAitVwrNevnvbeDnLbyUEXmXF1BXY7kHQHezFXrC0qY/s400/Screen+Shot+2017-02-20+at+8.33.03+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Why Firebase authentication?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now after getting the knowledge of ionic creator, which is the UI look and feel, let&#39;s now focus on the backend stuff. When we are talking about backend we should be considering couple of questions which will help us design our app&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. App performance should be good, &amp;nbsp;Database related actions should not prove to be a poor performant.&lt;/div&gt;
&lt;div&gt;
2. App should be able to handle offline data. This becomes incredibly important for mobile based apps. Offline data should sync seamlessly when it gets network back.&lt;/div&gt;
&lt;div&gt;
3. App authentication can be personified as a backbone to your app work. Authentication should be secure and managed by certified vendor.&lt;/div&gt;
&lt;div&gt;
4. It should work in scale&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The list of design consideration goes on and on. But let&#39;s focus on a solution based on the above listed aspects.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Firebase is a relatively new product released by Google. Yeah Google! that answers you scaling requirement.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Performance is relatively fast, as the data transmission is done in form of json objects. Being a no sql type , fields can be added or deleted on the fly.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Firebase has support for offline data also, however I have not explored this, but as per documentation feel this can be achieved with minimal effort&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are tons of other advantages for this. But the most striking advantage is with Ionic creator Firebase comes as a plugin. Believe me when I say it will take 15 min for you to setup an app and get it authenticated from Firebase.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXWc0v3J1DBtS1_Eu_hB3XQj05gsY7dk7ewu7dYuNWWgBVYLTg0kUNoV3LF2OORi9gqoqQHz4E2ELKAKikcxxNAQ5cmlPn52yakRft9PGMdmeCA_45WFmkarsKccv-QjSLa0NmCi3M2bs/s1600/Screen+Shot+2017-02-20+at+8.48.29+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXWc0v3J1DBtS1_Eu_hB3XQj05gsY7dk7ewu7dYuNWWgBVYLTg0kUNoV3LF2OORi9gqoqQHz4E2ELKAKikcxxNAQ5cmlPn52yakRft9PGMdmeCA_45WFmkarsKccv-QjSLa0NmCi3M2bs/s400/Screen+Shot+2017-02-20+at+8.48.29+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Why Ionic creator with Firebase authentication?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Let&#39;s jump to the other topic which is the crux of this blog. Let&#39;s first talk about the motivation behind this blog.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you search youtube there are samples where Ionic creator team has shown how to create an app in minutes. If you checkout the authentication part &lt;a href=&quot;https://www.youtube.com/watch?v=McBS4fbPt5Q&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&amp;nbsp;you will see they used ionicauth for the same.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now when I started working with this, the first question I had that where I want to store my data. I wanted to go with Firebase, now my question was how will I authorize my app. Examples showed by integration with ionic auth. Honestly this did not make sense to me.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I didn&#39;t like the fact that ionic auth will authorize the app and the data then will go and get stored in firebase. This was weird because Firebase itself has an authentication piece where user can signup/signin with their email and password&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So I started exploring Firebase auth with Ionic creator. Now comes the exciting part. The code which was working with ionic auth in case of error was not working with Firebase. In error scenario, ionicauth was able to update the ui element with the corresponding error message. Here {{errorBox}} is the ui element.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrIskKgMNV7hphXNOYggSKjgO8Ce5_TaIBr_4HQNIOuSSjnuiM6AFZvZDLKEQm0rPKDAJ8zZbcbS_bQHVheYjO9WRGfwcC74D-yaKmlyu7AZBdkBXu-AN9dG2Ce1N2ztrSUmVB_e5ft_o/s1600/Screen+Shot+2017-02-20+at+9.29.16+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrIskKgMNV7hphXNOYggSKjgO8Ce5_TaIBr_4HQNIOuSSjnuiM6AFZvZDLKEQm0rPKDAJ8zZbcbS_bQHVheYjO9WRGfwcC74D-yaKmlyu7AZBdkBXu-AN9dG2Ce1N2ztrSUmVB_e5ft_o/s320/Screen+Shot+2017-02-20+at+9.29.16+PM.png&quot; width=&quot;195&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
People have posted on forums (https://forum.ionicframework.com/t/basic-firebase-error-handling/65798 ) but I couldn&#39;t find any solution for this. Note there are examples with ionic framework and firebase auth but none with ionic creator.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The reason for this blog is to share the fix with you&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Enough of whys now let&#39;s answer how?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Refer to&amp;nbsp;https://github.com/driftyco/creator-weekly-workshops/tree/master/04-ionic-auth-and-gravatar for the ionic auth integration with ionic creator, video is available at&amp;nbsp;https://www.youtube.com/watch?v=McBS4fbPt5Q&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The code which is handling the auth and on success helping the user to navigate to the home page is as following&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;background-color: white; color: #333333; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; white-space: pre;&quot;&gt;
&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$ionicAuth&lt;/span&gt;.&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;signup&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$scope&lt;/span&gt;.&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;data&lt;/span&gt;).&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;function&lt;/span&gt;() {&lt;br /&gt;
&lt;table class=&quot;highlight tab-size js-file-line-container&quot; data-tab-size=&quot;8&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 14px; tab-size: 8;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;19&quot; id=&quot;L19&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC19&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;//&lt;/span&gt; `$ionicUser` is now registered&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;20&quot; id=&quot;L20&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC20&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$ionicAuth&lt;/span&gt;.&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;login&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;basic&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$scope&lt;/span&gt;.&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;data&lt;/span&gt;).&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;function&lt;/span&gt;(){&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;21&quot; id=&quot;L21&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC21&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$state&lt;/span&gt;.&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;go&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;menu.home&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;);&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;22&quot; id=&quot;L22&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC22&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;});&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;23&quot; id=&quot;L23&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC23&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;}, &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;err&lt;/span&gt;) {&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;24&quot; id=&quot;L24&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC24&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;25&quot; id=&quot;L25&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC25&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;var&lt;/span&gt; error_lookup &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; {&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;26&quot; id=&quot;L26&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC26&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;required_email&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;Missing email field&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;,&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;27&quot; id=&quot;L27&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC27&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;required_password&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;Missing password field&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;,&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;28&quot; id=&quot;L28&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC28&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;conflict_email&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;A user has already signed up with that email&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;,&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;29&quot; id=&quot;L29&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC29&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;conflict_username&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;A user has already signed up with that username&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;,&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;30&quot; id=&quot;L30&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC30&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;invalid_email&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;The email did not pass validation&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;31&quot; id=&quot;L31&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC31&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;}    &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;32&quot; id=&quot;L32&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC32&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;33&quot; id=&quot;L33&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC33&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$scope&lt;/span&gt;.&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;errorBox&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; error_lookup[&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;err&lt;/span&gt;.&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;details&lt;/span&gt;[&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;0&lt;/span&gt;]];&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td class=&quot;blob-num js-line-number&quot; data-line-number=&quot;34&quot; id=&quot;L34&quot; style=&quot;box-sizing: border-box; color: rgba(0, 0, 0, 0.298039); cursor: pointer; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; min-width: 50px; padding: 0px 10px; text-align: right; user-select: none; vertical-align: top; white-space: nowrap; width: 50px;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;blob-code blob-code-inner js-file-line&quot; id=&quot;LC34&quot; style=&quot;box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 12px; line-height: 20px; overflow: visible; padding: 0px 10px; position: relative; vertical-align: top; white-space: pre; word-wrap: normal;&quot;&gt;});&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; white-space: pre;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
Note on success the ionicAuth.login is going to home and on error it should update a paragraph component populating it with the error details. This error scenario fails when you try to get Firebase auth. Why? because the firebase auth action is asynchronous and we need a mechanism to invoke the update action on the ui paragraph element in case of error so that it is updated properly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To solve this we can have the following&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;$scope.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;errorBox&lt;/span&gt;=&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&#39;&#39;&lt;/span&gt;;

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;promise &lt;/span&gt;= firebase.&lt;span style=&quot;color: #7a7a43;&quot;&gt;auth&lt;/span&gt;().createUserWithEmailAndPassword($scope.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;data&lt;/span&gt;.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;email&lt;/span&gt;, &amp;nbsp;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;$scope.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;data&lt;/span&gt;.password);
&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;promise&lt;/span&gt;.then(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;resp &lt;/span&gt;=&amp;gt; {
    
        $state.&lt;span style=&quot;color: #7a7a43; font-size: 9pt;&quot;&gt;go&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green; font-size: 9pt; font-weight: bold;&quot;&gt;&#39;menu.home&#39;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;);&lt;/span&gt;
    })
    .catch(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;err &lt;/span&gt;=&amp;gt; {
        $scope.$apply(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function&lt;/span&gt;(){
        &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//Set error box message&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;        &lt;/span&gt;$scope.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;errorBox &lt;/span&gt;= &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;err&lt;/span&gt;.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;message&lt;/span&gt;;
    });
}) &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;
In case of firebase, when there is an error one should do $scope.$apply and then update the element with the message&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Note the intent of this blog is to save that one hour which I spent learning about firebase async transaction and angularjs $apply function. Once this was done everything worked fine.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope this blog will help someone to save his/her few hours of investigation. Let me know if you see any issues.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
Part 2 - (This section has been updated with the latest)&lt;br /&gt;
&lt;br /&gt;
Thanks all for liking the earlier analysis. As few of you wanted to know the implementation I am pasting the code snippet which helped me create the login and signup feature. In my app I had a restaurant signup page and a user signup page. The login page was common for both.&lt;br /&gt;
&lt;br /&gt;
Will request you to post any questions/concerns if you have regarding the following. I will try to help to the best of my knowledge.&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Login method:&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;.controller(&#39;loginCtrl&#39;, [&#39;$scope&#39;, &#39;$stateParams&#39;, &#39;$firebaseArray&#39;, &#39;$state&#39;, function ($scope, $stateParams,&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;$firebaseArray, $state) {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.data = {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&#39;email&#39;: &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&#39;password&#39;: &#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.login = function(){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.errorBox = &#39;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;const promise = firebase.auth().signInWithEmailAndPassword($scope.data.email, $scope.data.password);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;promise.then(resp =&amp;gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$state.go(&#39;myHome&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;.catch(err =&amp;gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.$apply(function(){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.errorBox = err.message;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;






















&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;}])&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Here is the corresponding template&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;lt;form id=&quot;login-form1&quot; class=&quot;list center-form&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;img src=&quot;img/gOVYEwjOT2WxJu2pPPKA_e6bcbbd8-e870-4615-81a8-a937930488e2.png&quot; style=&quot;display: block; width: 50%; height: auto; margin-left: auto; margin-right: auto;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;ion-list id=&quot;login-list1&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;label class=&quot;item item-input top-input&quot; id=&quot;login-input1&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;span class=&quot;input-label&quot;&amp;gt;Email&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;input type=&quot;text&quot; placeholder=&quot;&quot; ng-model=&quot;data.email&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;label class=&quot;item item-input bottom-input&quot; id=&quot;login-input2&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;span class=&quot;input-label&quot;&amp;gt;Password&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;input type=&quot;password&quot; placeholder=&quot;&quot; ng-model=&quot;data.password&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/ion-list&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;div class=&quot;spacer&quot; style=&quot;width: 290px; height: 28px;&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;button id=&quot;login-button1&quot; ng-click=&quot;login()&quot; class=&quot;button button-assertive&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;button-block button-positive&quot;&amp;gt;Log in&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;a ui-sref=&quot;signup&quot; id=&quot;login-button2&quot; class=&quot;button button-positive&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;button-block&quot;&amp;gt;Or create an account&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;




&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;



















&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;Signup:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;.controller(&#39;signupCtrl&#39;, [&#39;$scope&#39;, &#39;$stateParams&#39;, &#39;$firebaseArray&#39;, &#39;$state&#39;, // The following is the constructor function for this page&#39;s controller. See https://docs.angularjs.org/guide/controller&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;// You can include any angular dependencies as parameters for this function&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;// TIP: Access Route Parameters for your page via $stateParams.parameterName&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;function ($scope, $stateParams, $firebaseArray, $state) {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.data = {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&#39;email&#39;: &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&#39;password&#39;: &#39;&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&#39;usertype&#39;:&#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.signup = function(){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.errorBox=&#39;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;const promise = firebase.auth().createUserWithEmailAndPassword($scope.data.email, $scope.data.password);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;promise.then(resp =&amp;gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;createUser();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;if($scope.data.usertype == &quot;individual&quot;){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$state.go(&#39;individualSignup&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;} else if($scope.data.usertype = &quot;restaurant&quot;){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$state.go(&#39;restaurantSignup&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;.catch(err =&amp;gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.$apply(function(){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;//Set error box message&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.errorBox = err.message;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;//By default check the individual option&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.activeSection = 1;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.data.usertype = &quot;individual&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;//Choose Occupation type as individual or business&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.choseType = function(option){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.activeSection = option;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;if(option == 1){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.data.usertype = &quot;individual&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;else if(option == 2){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;$scope.data.usertype = &quot;restaurant&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;function createUser(){&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;firebase.auth().onAuthStateChanged(function(user) {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;if (user) {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;var uid = user.uid;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;var email = user.email;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;




&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;






















































&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;var userType = $scope.data.usertype;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firebase.database().ref(&#39;users/&#39; + uid).set({&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;email: email,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;user_type : userType&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;} else {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// No user is signed in.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;




&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;












&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;}])&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Here is the corresponding template&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;lt;form id=&quot;signup-form12&quot; class=&quot;list center-form&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;img src=&quot;img/gOVYEwjOT2WxJu2pPPKA_e6bcbbd8-e870-4615-81a8-a937930488e2.png&quot; style=&quot;display: block; width: 50%; height: auto; margin-left: auto; margin-right: auto;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;div id=&quot;signup-button-bar4&quot; class=&quot;button-bar&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;button id=&quot;signup-button30&quot; ng-class=&quot;{&#39;active&#39;:activeSection==1}&quot; ng-click=&quot;choseType(1)&quot; class=&quot;button button-positive&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;button-block&quot;&amp;gt;Individual&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;button id=&quot;signup-button31&quot; ng-class=&quot;{&#39;active&#39;:activeSection==2}&quot; ng-click=&quot;choseType(2)&quot; class=&quot;button button-positive&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;button-block&quot;&amp;gt;Restaurant&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;ion-list id=&quot;signup-list4&quot; ng-show=&quot;activeSection==1&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;label class=&quot;item item-input top-input&quot; id=&quot;signup-input3&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;span class=&quot;input-label&quot;&amp;gt;Email&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;input type=&quot;text&quot; placeholder=&quot;&quot; ng-model=&quot;data.email&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;label class=&quot;item item-input bottom-input&quot; id=&quot;signup-input4&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;span class=&quot;input-label&quot;&amp;gt;Password&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;input type=&quot;password&quot; placeholder=&quot;&quot; ng-model=&quot;data.password&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/ion-list&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;ion-list id=&quot;signup-list5&quot; ng-show=&quot;activeSection==2&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;label class=&quot;item item-input top-input&quot; id=&quot;signup-input6&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;span class=&quot;input-label&quot;&amp;gt;Restaurant Email&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;input type=&quot;text&quot; placeholder=&quot;&quot; ng-model=&quot;data.email&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;label class=&quot;item item-input bottom-input&quot; id=&quot;signup-input7&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;span class=&quot;input-label&quot;&amp;gt;Password&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;input type=&quot;password&quot; placeholder=&quot;&quot; ng-model=&quot;data.password&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/ion-list&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;div id=&quot;signup-markdown5&quot; class=&quot;show-list-numbers-and-dots error-box&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;p style=&quot;margin-top:0px;color:#000000;&quot;&amp;gt;{{errorBox}}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;button id=&quot;signup-button25&quot; ng-click=&quot;signup()&quot; class=&quot;button button-assertive&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;button-block button-positive&quot;&amp;gt;Signup&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;lt;a ui-sref=&quot;login&quot; id=&quot;signup-button26&quot; class=&quot;button button-positive&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;button-block&quot;&amp;gt;Already have an account&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;




&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;



































&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/2196627998087044876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2017/02/firebase-authentication-with-ionic.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2196627998087044876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2196627998087044876'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2017/02/firebase-authentication-with-ionic.html' title='Firebase authentication with Ionic creator'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89a0xfeHUVcMeot6U-p12X0EME7sh0BV8M7-sbnC7OMXs0DAAk2XcB7uLBqEGpABg22CUsEKqLBl1Q4gkengzFHomtx3SXvcmmAitVwrNevnvbeDnLbyUEXmXF1BXY7kHQHezFXrC0qY/s72-c/Screen+Shot+2017-02-20+at+8.33.03+PM.png" height="72" width="72"/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-6322213827427613080</id><published>2017-01-27T23:49:00.004-08:00</published><updated>2017-01-27T23:49:58.988-08:00</updated><title type='text'>Challenges faced with Runc</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;Introduction and motivation&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I started working on Runc since past 2 weeks and it has indeed helped me articulate the infrastructure I wanted to have. The use cases for Runc stands out as it helps to create a docker container with ease. A docker container can help you add more security to your app or solution. As an attacker I will always look for secure system related information access like /etc/passwd. Docker solution can provide a jail environment which will not allow the attacker to get access of anything outside jail scope. The use case is potent enough for any application scope.&lt;br /&gt;
&lt;br /&gt;
Creating a docker container is not at all a rocket science, and to add a cherry to the cake, now we have runc. Runc is a wrapper around docker which in turn spawns up a container without you installing docker on your machine. Let me give a brief about the environment setup before diving into the challenges I faced during this exploration.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;Pre-requisites&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
I verified all my experiments in CentOS so will be discussing the same&lt;br /&gt;
&lt;br /&gt;
1. Make sure Kernel OS is&amp;nbsp;&lt;span style=&quot;background-color: white; color: #222222; font-family: &amp;quot;salesforce sans&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;sans serif&amp;quot;; font-size: 14px;&quot;&gt;2.6.32-642.6.2 or higher&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &amp;quot;salesforce sans&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;sans serif&amp;quot;; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
2. Install Go from here&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
https://golang.org/doc/install&lt;/blockquote&gt;
3. Build Runc by following documentation at here&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
https://github.com/opencontainers/runc&lt;/blockquote&gt;
4. Make sure you have gcc if not execute the following&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo yum install gcc gcc-c++&lt;/blockquote&gt;
5. Runc will get installed in /usr/local/sbin , make sure this is in your path&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&amp;nbsp;Troubleshoot&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
I am not going to talk about the execution aspect of Runc because the intention of this blog is to save time for others who might get stuck in situations I have faced&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Troubleshoot #1&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Issue Link : https://github.com/opencontainers/runc/issues/1270&lt;br /&gt;
&lt;br /&gt;
I started getting this broken pipe error pretty early in the stage. Things began to get worse when I was getting solution related to docker and not related to runc. Runc is pretty new player, so we don&#39;t see enough discussion threads around it. I was struggling to get response from Runc forum too.&lt;br /&gt;
&lt;br /&gt;
During my exploration I happen to hit this thread where people were discussing about the related services. This led me to search for cgroup services.&lt;br /&gt;
&lt;br /&gt;
Here cgroup means control groups, you can define max min caps for cpu processes, memory utilization etc in these cgroups. For me this service was turned off. I need to explicitly execute&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 14px;&quot;&gt;Service cgconfig start&lt;/span&gt;&lt;/blockquote&gt;
to make this service start which solved the issue.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Troubleshoot #2&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
In config.json you can have mounted section for cgroup&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;destination&quot;: &quot;/sys/fs/cgroup&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;type&quot;: &quot;cgroup&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;source&quot;: &quot;cgroup&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;options&quot;: [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;nosuid&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;noexec&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;nodev&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;relatime&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ro&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
This section means that there will be a mounted path created on container which is noexecutable and read only path in the target container&lt;br /&gt;
&lt;br /&gt;
The issue we are talking here is similar to broken pipe issue which we discussed in troubleshoot #1, whose solution is also the same. Because of service unavailable you might see the broken pipe issue. Service cgconfig start , solves the issue.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Troubleshoot #3&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;
Issue Link:&amp;nbsp;https://github.com/opencontainers/runc/issues/1299&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;
I should mention the solution of this issue is a sloppy hack. Runc is currently built with glibc 2.14. Another blocker arose when I figured out that my machine had glibc.2.12 and till date I have not found any solution where I can build runc using libc 2.12&lt;br /&gt;
&lt;br /&gt;
Still I am trying to find a permanent solution to this but to unblock you here is the sloppy hack I mentioned earlier&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; sed s#&quot;2.14&quot;#&quot;2.12&quot;#gi /path/to/runc &amp;gt; runc_new&lt;br /&gt;
&lt;br /&gt;
This will rename all 2.14 versions to 2.12, and will help you to get unblocked.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Troubleshoot #4&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
When you are building runc you get couple of BuildTags with which you can build it&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;table style=&quot;border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: #333333; display: block; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; overflow: auto; width: 888px;&quot;&gt;&lt;thead style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;background-color: white; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box;&quot;&gt;&lt;th style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;Build Tag&lt;/th&gt;&lt;th style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;Feature&lt;/th&gt;&lt;th style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;Dependency&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;
&lt;tr style=&quot;background-color: white; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;seccomp&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;Syscall filtering&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;libseccomp&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background-color: #f8f8f8; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;selinux&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;selinux process and mount labeling&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background-color: white; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;apparmor&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;apparmor profile support&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;libapparmor&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background-color: #f8f8f8; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;ambient&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;ambient capability support&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(221, 221, 221); box-sizing: border-box; padding: 6px 13px;&quot;&gt;kernel 4.3&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&amp;nbsp;&lt;i&gt;Quoting from&amp;nbsp;https://github.com/opencontainers/runc/blob/master/README.md&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
Each Build Tag has its importance. Initially I was having selinux from my tutorial while building runc&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
make BUILDTAGS=&#39;selinux&#39;&lt;/blockquote&gt;
I figured out this was an issue for my runc as SeLinux was not a compiler support in my case. In such situation I will suggest you include BUILDTAGS with empty params like&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
make BUILDTAGS=&#39;&#39;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
The primary intent to capture these findings in a blog is not only for future reference but also is an approach of validating my observation. If you feel I have captured something wrong please do mention it.&lt;br /&gt;
&lt;br /&gt;
I will continue capturing the issues with associated learnings. Hope this helps.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;/blockquote&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/6322213827427613080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2017/01/challenges-faced-with-runc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6322213827427613080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6322213827427613080'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2017/01/challenges-faced-with-runc.html' title='Challenges faced with Runc'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-7516770844067196845</id><published>2017-01-22T23:03:00.002-08:00</published><updated>2017-01-22T23:17:37.815-08:00</updated><title type='text'>Create Salesforce Contacts from Quip Contacts</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Quoting Wikipedia: &lt;i&gt;&quot;&lt;b style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;Quip&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;is a collaborative&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Productivity_software&quot; style=&quot;background: none rgb(255, 255, 255); color: #0b0080; font-family: sans-serif; font-size: 14px; text-decoration: none;&quot; title=&quot;Productivity software&quot;&gt;productivity software&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;suite for mobile and the Web. It allows groups of people to create and edit documents and spreadsheets as a group, typically for business purposes&quot;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;Motivated by Quip Apis mentioned at &lt;a href=&quot;https://salesforce.quip.com/api/reference&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;I started exploring use cases where we can leverage the apis to solve a particular problem. One use case which prevailed on all others was to Create Salesforce Contacts from Quip Contacts&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;i&gt;Use Case: Assuming there is a sales document which was shared with some key stake holders who may or may not be associated with Salesforce org. These contacts may make sense to associate with a lead or &amp;nbsp;opportunity or account. As a Salesforce Administrator I should be able to import contacts from Quip documents to Salesforce orgs.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In order to do this my plan was to create a lightweight utility which can easily be used. As a part of my study I figured out that Quip came with 2 kind of api wrappers one was written in python and another one in nodejs.&amp;nbsp;&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://github.com/quip/quip-api/tree/master/nodejs&quot; style=&quot;font-family: sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;node.js library&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;does a rest api call in the backend.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;I chose nodejs because I had some experience with &lt;a href=&quot;https://jsforce.github.io/&quot; target=&quot;_blank&quot;&gt;Jsforce&lt;/a&gt;&amp;nbsp;which is a Salesforce nodejs library.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;Before starting I played around with the nodejs api for quip contacts. Interestingly I got following response&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIBPOm5zUOpFC4x9Z2u-EfWeEf9kY8y3abEEgMQT3wTyfbU9pzIF6RwcJZsZKEd1kf88E7AO3OC3SVfKC_Kh_dbv9dxuCb4r1ybjEOs22v7IgDmN0846Is8rUE4ZFJm7IHt5DcfbRpWiM/s1600/screenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;234&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIBPOm5zUOpFC4x9Z2u-EfWeEf9kY8y3abEEgMQT3wTyfbU9pzIF6RwcJZsZKEd1kf88E7AO3OC3SVfKC_Kh_dbv9dxuCb4r1ybjEOs22v7IgDmN0846Is8rUE4ZFJm7IHt5DcfbRpWiM/s640/screenshot.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;Note the API not only sends the name but also sends a weightage factor called affinity.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;Interestingly this affinity seems to be accurate as it somehow recommends who are the users which might be more related to this document in comparison with others. Somehow I feel this is a potent entity which can be used in many use cases to filter out those users who might not be interested in the document.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;After getting comfortable with Quip Api it was time for importing Quip contacts and bridging the gap by creating those contacts in salesforce. For this I used Jsforce which gives an easy access to play around with SOQL queries&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;Following is the nodejs script which does this&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #252525; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;quipaccessToken &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&amp;lt;&amp;lt;Quip Access Token&amp;gt;&amp;gt;&quot;&lt;/span&gt;;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginUrl &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&amp;lt;&amp;lt;Salesforce Login Url&amp;gt;&amp;gt;&quot;&lt;/span&gt;;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginUserName &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&amp;lt;&amp;lt;Salesforce login username&amp;gt;&amp;gt;&quot;&lt;/span&gt;;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginPassword &lt;/span&gt;= &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;&amp;lt;&amp;lt;Salesforce login password&amp;gt;&amp;gt;&quot;&lt;/span&gt;;
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;quip &lt;/span&gt;= &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&#39;./quip.js&#39;&lt;/span&gt;);
&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;client &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;quip&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;Client&lt;/span&gt;({&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;accessToken&lt;/span&gt;: &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;quipaccessToken&lt;/span&gt;});

&lt;span style=&quot;font-style: italic;&quot;&gt;importQuipContactsAndCreateSalesforceContacts&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;client&lt;/span&gt;);

&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/*&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;Get Quip Contacts and create Salesforce contacts&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;*/&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;importQuipContactsAndCreateSalesforceContacts&lt;/span&gt;(client) {
    &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/*&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;     &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    Get contacts with affinity&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;     Result: name, id, affinity&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;     &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    */&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;    &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;    client.&lt;span style=&quot;color: #7a7a43;&quot;&gt;getContacts&lt;/span&gt;(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function &lt;/span&gt;(err, user) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if &lt;/span&gt;(err != &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;null&lt;/span&gt;) {
            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;err: &quot; &lt;/span&gt;+ err);
        }

        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;for &lt;/span&gt;(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;i &lt;/span&gt;= &lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #458383;&quot;&gt;len &lt;/span&gt;= user.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;length&lt;/span&gt;; &lt;span style=&quot;color: #458383;&quot;&gt;i &lt;/span&gt;&amp;lt; &lt;span style=&quot;color: #458383;&quot;&gt;len&lt;/span&gt;; &lt;span style=&quot;color: #458383;&quot;&gt;i&lt;/span&gt;++) {
            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;nameArr &lt;/span&gt;= user[&lt;span style=&quot;color: #458383;&quot;&gt;i&lt;/span&gt;].&lt;span style=&quot;color: #7a7a43;&quot;&gt;name&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;split&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;/\s+/&lt;/span&gt;);
            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;FirstName: &quot;&lt;/span&gt;+&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;nameArr&lt;/span&gt;[&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;]+&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot; LastName: &quot;&lt;/span&gt;+ &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;nameArr&lt;/span&gt;[&lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;]);

            &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//Verify if Salesforce Contact exists and then Create it&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;            &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;            verifyAndCreateSalesforceContact&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;nameArr&lt;/span&gt;[&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;], &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;nameArr&lt;/span&gt;[&lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;]);
        }

    });
}


&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/*&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;Create a Contact in salesforce&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;*/&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;createContactsInSalesforce&lt;/span&gt;(firstname, lastname){
    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;jsforce &lt;/span&gt;= &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&#39;jsforce&#39;&lt;/span&gt;);
    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;conn &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;jsforce&lt;/span&gt;.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;Connection&lt;/span&gt;({
        &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;loginUrl&lt;/span&gt;: &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginUrl&lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;    &lt;/span&gt;});
    &lt;span style=&quot;color: #458383;&quot;&gt;conn&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;login&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginUserName&lt;/span&gt;, &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginPassword&lt;/span&gt;, &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function&lt;/span&gt;(err, res) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if &lt;/span&gt;(err) {
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;error&lt;/span&gt;(err);
        }

        &lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;//Verify if the user exists. If the user is not there then insert it.&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;        &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;        console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Inside Create&quot;&lt;/span&gt;);
        &lt;span style=&quot;color: #458383;&quot;&gt;conn&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;sobject&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Contact&quot;&lt;/span&gt;).&lt;span style=&quot;color: #7a7a43;&quot;&gt;create&lt;/span&gt;({&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;FirstName&lt;/span&gt;: firstname, &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;LastName&lt;/span&gt;: lastname}, &lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;        function &lt;/span&gt;(err, ret) {
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if &lt;/span&gt;(err || !ret.&lt;span style=&quot;color: #7a7a43;&quot;&gt;success&lt;/span&gt;) {
                &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;error&lt;/span&gt;(err, ret);
            }

            &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Created record id: &quot; &lt;/span&gt;+ ret.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;id&lt;/span&gt;);
        });
    });
}

&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;/*&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;Verify if the contact exists&lt;/span&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;*/&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;verifyAndCreateSalesforceContact&lt;/span&gt;(firstName, lastName){
    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;jsforce &lt;/span&gt;= &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&#39;jsforce&#39;&lt;/span&gt;);
    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;conn &lt;/span&gt;= &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color: #458383;&quot;&gt;jsforce&lt;/span&gt;.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;Connection&lt;/span&gt;({
        &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;loginUrl&lt;/span&gt;: &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginUrl&lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;    &lt;/span&gt;});
    &lt;span style=&quot;color: #458383;&quot;&gt;conn&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;login&lt;/span&gt;(&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginUserName&lt;/span&gt;, &lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;loginPassword&lt;/span&gt;, &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function&lt;/span&gt;(err, res) {
        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if &lt;/span&gt;(err) {
            &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;error&lt;/span&gt;(err);
        }
        &lt;span style=&quot;color: #458383;&quot;&gt;conn&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;sobject&lt;/span&gt;(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Contact&quot;&lt;/span&gt;)
            .&lt;span style=&quot;color: #7a7a43;&quot;&gt;find&lt;/span&gt;(
                {
                    &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;FirstName&lt;/span&gt;: firstName,
                    &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;LastName&lt;/span&gt;: lastName
                },
                {
                    &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;Id&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;,
                    &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;Name&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;,
                    &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;CreatedDate&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;                &lt;/span&gt;}
            )
            .&lt;span style=&quot;color: #7a7a43;&quot;&gt;execute&lt;/span&gt;(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;function &lt;/span&gt;(err, records) {
                &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if &lt;/span&gt;(err) {
                    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #7a7a43;&quot;&gt;error&lt;/span&gt;(err);
                }
                &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;if&lt;/span&gt;(records.&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;length &lt;/span&gt;=== &lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;){
                    &lt;span style=&quot;font-style: italic;&quot;&gt;createContactsInSalesforce&lt;/span&gt;(firstName, lastName);
                }
            })
    });
}&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;Note here we are getting Quip Access token from this &lt;a href=&quot;https://salesforce.quip.com/api/personal-token&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The above script imports QuipContacts in &lt;/span&gt;&lt;span style=&quot;background-color: #fce5cd;&quot;&gt;importQuipContactsAndCreateSalesforceContacts&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt; &lt;/span&gt;function.&lt;/pre&gt;
&lt;pre style=&quot;font-family: Menlo; font-size: 9pt;&quot;&gt;In &lt;span style=&quot;background-color: #fce5cd;&quot;&gt;verifyAndCreateSalesforceContact&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt; we verify if the contact is existing in salesforce or not.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;In &lt;/span&gt;&lt;span style=&quot;background-color: #fce5cd;&quot;&gt;createContactsInSalesforce&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt; we create Salesforce contacts.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The app gives following response&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;Created record id: 003R0000001WuFEIA0
Created record id: 003R0000001WuF4IAK
Created record id: 003R0000001WuFOIA0
...&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;where it responds back with the newly created userId in Salesforce.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12px;&quot;&gt;Hope this information helps. I feel the design for the above script can be improved, &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12px;&quot;&gt;but here the intent was to quickly come up with a utility for import contacts. Let me know &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;menlo&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12px;&quot;&gt;if you have any feedback for this.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/7516770844067196845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2017/01/create-salesforce-contacts-from-quip.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/7516770844067196845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/7516770844067196845'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2017/01/create-salesforce-contacts-from-quip.html' title='Create Salesforce Contacts from Quip Contacts'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIBPOm5zUOpFC4x9Z2u-EfWeEf9kY8y3abEEgMQT3wTyfbU9pzIF6RwcJZsZKEd1kf88E7AO3OC3SVfKC_Kh_dbv9dxuCb4r1ybjEOs22v7IgDmN0846Is8rUE4ZFJm7IHt5DcfbRpWiM/s72-c/screenshot.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-1446841952612262784</id><published>2016-08-10T21:38:00.001-07:00</published><updated>2016-08-10T21:50:01.196-07:00</updated><title type='text'>Topic Classification using Latent Dirichlet Allocation(LDA)  ML Library </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-0 cell-349-359&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 156px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 156px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;sql&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;SparkSession&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;sparkSession&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;SparkSession&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;builder&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;master&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;local&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;appName&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;my-spark-app&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;config&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;spark.some.config.option&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;config-value&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;getOrCreate&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;df&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;read&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;json&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;dbfs:/mnt/JSON10/JSON/sampleDoc.txt&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 156px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
import org.apache.spark.sql.SparkSession
sparkSession: org.apache.spark.sql.SparkSession = org.apache.spark.sql.SparkSession@351b4b37
df: org.apache.spark.sql.DataFrame = [filename: string, id: string ... 1 more field]
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$ed63e7a6-0fcc-4050-9c75-d9e0b978da05.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-1 cell-349-363&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 204px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;display&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results dashboard&quot; data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;dashboard&quot; style=&quot;margin-bottom: 0px; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div style=&quot;margin-top: 0px; position: relative; width: auto;&quot;&gt;
&lt;div class=&quot;widget ui-resizable&quot; data-guid=&quot;a223a976-3d7c-440c-95df-c1790d36c55c&quot; style=&quot;background: none; border: 1px solid transparent; height: auto; left: 0px; min-height: 18px; padding: 3px; position: relative; top: 0px; width: auto;&quot;&gt;
&lt;div class=&quot;ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se&quot; style=&quot;background-image: url(&amp;quot;images/ui-icons_222222_256x240.png&amp;quot;); background-position: -64px -224px; background-repeat: no-repeat; bottom: 1px; cursor: se-resize; font-size: 0.1px; height: 16px; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; right: 1px; text-indent: -99999px; touch-action: none; width: 16px; z-index: 90;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;widget-content dashboard&quot; style=&quot;height: 134px; margin-bottom: 0px; position: static; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;results&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;results-table noscroll&quot; style=&quot;border: 1px solid rgb(221, 221, 221); margin: 2px 0px 0px; overflow: auto; padding: 0px;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;floatThead-wrapper&quot; style=&quot;clear: both; pointer-events: none; position: relative;&quot;&gt;
&lt;div class=&quot;inner&quot; style=&quot;max-height: 246px; overflow: auto;&quot;&gt;
&lt;fthfoot style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-footer-group; height: 0px;&quot;&gt;&lt;fthtr style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-row; height: 0px;&quot;&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;/fthtr&gt;&lt;/fthfoot&gt;&lt;table class=&quot;table table-bordered table-condensed table-hover&quot; style=&quot;background-color: transparent; border-collapse: collapse; border-radius: 4px; border-spacing: 0px; border: none; margin: 0px; max-width: 100%; min-width: 1938px; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 664px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 404px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 870px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr class=&quot;size-row&quot; style=&quot;border-radius: 0px !important; height: 20px; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;border-radius: 0px !important; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0AAC_v003.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;Getting started is wonderful here&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZFAA2_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZF&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;re: december fy13 wonderfully explained �&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBkAAM_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBk&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;fitness reimbursement ?? slide number 1&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div aria-hidden=&quot;true&quot; class=&quot;floatThead-floatContainer floatThead-container&quot; style=&quot;left: 0px; margin-top: 0px; overflow: hidden; position: absolute; top: 0px; width: 1938px; z-index: 1;&quot;&gt;
&lt;table class=&quot;table table-bordered table-condensed table-hover floatThead-table&quot; style=&quot;background-color: transparent; border-bottom: 0px none; border-left: none; border-radius: 4px; border-right: none; border-spacing: 0px; border-top: none; margin: 0px; max-width: 100%; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 664px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 404px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 870px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th style=&quot;border-bottom-left-radius: 4px; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;filename&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;id&lt;/th&gt;&lt;th style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 4px; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;text&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;download-controls&quot; style=&quot;display: inline-block; margin-top: 3px;&quot;&gt;
&lt;a class=&quot;btn btn-small results-download-preview&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.137255); border-radius: 3px; border-style: solid; border-width: 1px; box-shadow: none; cursor: pointer; display: inline-block; font-size: 12px; line-height: 20px; margin: 0px; padding: 2px 10px; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; vertical-align: middle;&quot; title=&quot;Download CSV&quot;&gt;&lt;span class=&quot;fa fa-download&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$70ff170f-1909-431f-b0f7-15aff447b97f.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-error cellIndex-2 cell-349-399&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 155px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-error&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; min-height: 31px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 99px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 99px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;drop&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;col&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;_corrupt_record&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;splits&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;randomSplit&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot; style=&quot;color: #0000c0;&quot;&gt;Array&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;0.8&lt;/span&gt;, &lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;0.2&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;seed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;11L&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;train&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;splits&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;0&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;cache&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;test&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;splits&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;1&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;cache&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 99px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0.4&quot;&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0.4.0&quot;&gt;
&lt;span class=&quot;ansiout command-result-error-summary&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0.4.0.0&quot; style=&quot;color: #555555; display: inline-block; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;a class=&quot;toggle-error-btn command-button&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0.4.0.0.0&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;color: rgba(0, 0, 0, 0.458824); cursor: pointer;&quot; title=&quot;Maximize&quot;&gt;&lt;span class=&quot;fa fa-fw fa-plus-square-o&quot; data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0.4.0.0.0.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-align: center; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;span data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.0.0.4.0.0.1&quot;&gt;org.apache.spark.sql.AnalysisException: Cannot resolve column name &quot;_corrupt_record&quot; among (filename, id, text);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$1b55c426-e0ce-4e76-9e26-7244d43fdb1b.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-3 cell-349-400&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 204px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;display&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results dashboard&quot; data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;dashboard&quot; style=&quot;margin-bottom: 0px; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div style=&quot;margin-top: 0px; position: relative; width: auto;&quot;&gt;
&lt;div class=&quot;widget ui-resizable&quot; data-guid=&quot;9f9315ee-0eb1-4ab8-b6ce-4a09b7bb4cbd&quot; style=&quot;background: none; border: 1px solid transparent; height: auto; left: 0px; min-height: 18px; padding: 3px; position: relative; top: 0px; width: auto;&quot;&gt;
&lt;div class=&quot;ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se&quot; style=&quot;background-image: url(&amp;quot;images/ui-icons_222222_256x240.png&amp;quot;); background-position: -64px -224px; background-repeat: no-repeat; bottom: 1px; cursor: se-resize; font-size: 0.1px; height: 16px; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; right: 1px; text-indent: -99999px; touch-action: none; width: 16px; z-index: 90;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;widget-content dashboard&quot; style=&quot;height: 134px; margin-bottom: 0px; position: static; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;results&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;results-table noscroll&quot; style=&quot;border: 1px solid rgb(221, 221, 221); margin: 2px 0px 0px; overflow: auto; padding: 0px;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;floatThead-wrapper&quot; style=&quot;clear: both; pointer-events: none; position: relative;&quot;&gt;
&lt;div class=&quot;inner&quot; style=&quot;max-height: 246px; overflow: auto;&quot;&gt;
&lt;fthfoot style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-footer-group; height: 0px;&quot;&gt;&lt;fthtr style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-row; height: 0px;&quot;&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;/fthtr&gt;&lt;/fthfoot&gt;&lt;table class=&quot;table table-bordered table-condensed table-hover&quot; style=&quot;background-color: transparent; border-collapse: collapse; border-radius: 4px; border-spacing: 0px; border: none; margin: 0px; max-width: 100%; min-width: 1938px; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 664px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 404px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 870px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr class=&quot;size-row&quot; style=&quot;border-radius: 0px !important; height: 20px; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;border-radius: 0px !important; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0AAC_v003.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;Getting started is wonderful here&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZFAA2_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZF&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;re: december fy13 wonderfully explained �&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBkAAM_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBk&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;fitness reimbursement ?? slide number 1&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div aria-hidden=&quot;true&quot; class=&quot;floatThead-floatContainer floatThead-container&quot; style=&quot;left: 0px; margin-top: 0px; overflow: hidden; position: absolute; top: 0px; width: 1938px; z-index: 1;&quot;&gt;
&lt;table class=&quot;table table-bordered table-condensed table-hover floatThead-table&quot; style=&quot;background-color: transparent; border-bottom: 0px none; border-left: none; border-radius: 4px; border-right: none; border-spacing: 0px; border-top: none; margin: 0px; max-width: 100%; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 664px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 404px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 870px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th style=&quot;border-bottom-left-radius: 4px; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;filename&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;id&lt;/th&gt;&lt;th style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 4px; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;text&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;download-controls&quot; style=&quot;display: inline-block; margin-top: 3px;&quot;&gt;
&lt;a class=&quot;btn btn-small results-download-preview&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.137255); border-radius: 3px; border-style: solid; border-width: 1px; box-shadow: none; cursor: pointer; display: inline-block; font-size: 12px; line-height: 20px; margin: 0px; padding: 2px 10px; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; vertical-align: middle;&quot; title=&quot;Download CSV&quot;&gt;&lt;span class=&quot;fa fa-download&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$4658b741-a43e-4125-80a7-1262b6f9a6d1.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-4 cell-349-351&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 307px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 213px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 213px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;ml&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;feature&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;RegexTokenizer&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Set params for RegexTokenizer&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;tokenizer&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;RegexTokenizer&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setPattern&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;[\\W_]+&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setMinTokenLength&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;4&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Filter away tokens with length &amp;lt; 4&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setInputCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;text&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setOutputCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;tokens&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Tokenize document&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;tokenized_df&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;tokenizer&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;transform&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 213px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
import org.apache.spark.ml.feature.RegexTokenizer
tokenizer: org.apache.spark.ml.feature.RegexTokenizer = regexTok_05b9b2c90cb1
tokenized_df: org.apache.spark.sql.DataFrame = [filename: string, id: string ... 2 more fields]
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$d6503d14-4e95-4aa4-98e9-0ee010dd4fd4.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-5 cell-349-352&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 204px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;display&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;tokenized_df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results dashboard&quot; data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;dashboard&quot; style=&quot;margin-bottom: 0px; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div style=&quot;margin-top: 0px; position: relative; width: auto;&quot;&gt;
&lt;div class=&quot;widget ui-resizable&quot; data-guid=&quot;a1427776-3793-452c-ad65-6d988065e87a&quot; style=&quot;background: none; border: 1px solid transparent; height: auto; left: 0px; min-height: 18px; padding: 3px; position: relative; top: 0px; width: auto;&quot;&gt;
&lt;div class=&quot;ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se&quot; style=&quot;background-image: url(&amp;quot;images/ui-icons_222222_256x240.png&amp;quot;); background-position: -64px -224px; background-repeat: no-repeat; bottom: 1px; cursor: se-resize; font-size: 0.1px; height: 16px; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; right: 1px; text-indent: -99999px; touch-action: none; width: 16px; z-index: 90;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;widget-content dashboard&quot; style=&quot;height: 134px; margin-bottom: 0px; position: static; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;results&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;results-table noscroll&quot; style=&quot;border: 1px solid rgb(221, 221, 221); margin: 2px 0px 0px; overflow: auto; padding: 0px;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;floatThead-wrapper&quot; style=&quot;clear: both; pointer-events: none; position: relative;&quot;&gt;
&lt;div class=&quot;inner&quot; style=&quot;max-height: 246px; overflow: auto;&quot;&gt;
&lt;fthfoot style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-footer-group; height: 0px;&quot;&gt;&lt;fthtr style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-row; height: 0px;&quot;&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;/fthtr&gt;&lt;/fthfoot&gt;&lt;table class=&quot;table table-bordered table-condensed table-hover&quot; style=&quot;background-color: transparent; border-collapse: collapse; border-radius: 4px; border-spacing: 0px; border: none; margin: 0px; max-width: 100%; min-width: 1938px; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 446px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 271px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 583px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 638px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr class=&quot;size-row&quot; style=&quot;border-radius: 0px !important; height: 20px; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;border-radius: 0px !important; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0AAC_v003.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;Getting started is wonderful here&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;getting&quot;,&quot;started&quot;,&quot;wonderful&quot;,&quot;here&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZFAA2_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZF&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;re: december fy13 wonderfully explained �&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;december&quot;,&quot;fy13&quot;,&quot;wonderfully&quot;,&quot;explained&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBkAAM_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBk&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;fitness reimbursement ?? slide number 1&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;fitness&quot;,&quot;reimbursement&quot;,&quot;slide&quot;,&quot;number&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div aria-hidden=&quot;true&quot; class=&quot;floatThead-floatContainer floatThead-container&quot; style=&quot;left: 0px; margin-top: 0px; overflow: hidden; position: absolute; top: 0px; width: 1938px; z-index: 1;&quot;&gt;
&lt;table class=&quot;table table-bordered table-condensed table-hover floatThead-table&quot; style=&quot;background-color: transparent; border-bottom: 0px none; border-left: none; border-radius: 4px; border-right: none; border-spacing: 0px; border-top: none; margin: 0px; max-width: 100%; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 446px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 271px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 583px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 638px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th style=&quot;border-bottom-left-radius: 4px; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;filename&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;id&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;text&lt;/th&gt;&lt;th style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 4px; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;tokens&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;download-controls&quot; style=&quot;display: inline-block; margin-top: 3px;&quot;&gt;
&lt;a class=&quot;btn btn-small results-download-preview&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.137255); border-radius: 3px; border-style: solid; border-width: 1px; box-shadow: none; cursor: pointer; display: inline-block; font-size: 12px; line-height: 20px; margin: 0px; padding: 2px 10px; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; vertical-align: middle;&quot; title=&quot;Download CSV&quot;&gt;&lt;span class=&quot;fa fa-download&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$31c72b66-31d8-46ac-8e46-c766123805a1.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-6 cell-349-364&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 204px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;display&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;tokenized_df&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;tokens&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results dashboard&quot; data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;dashboard&quot; style=&quot;margin-bottom: 0px; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div style=&quot;margin-top: 0px; position: relative; width: auto;&quot;&gt;
&lt;div class=&quot;widget ui-resizable&quot; data-guid=&quot;2cc5a67c-8a60-456f-b675-e338b88a27f4&quot; style=&quot;background: none; border: 1px solid transparent; height: auto; left: 0px; min-height: 18px; padding: 3px; position: relative; top: 0px; width: auto;&quot;&gt;
&lt;div class=&quot;ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se&quot; style=&quot;background-image: url(&amp;quot;images/ui-icons_222222_256x240.png&amp;quot;); background-position: -64px -224px; background-repeat: no-repeat; bottom: 1px; cursor: se-resize; font-size: 0.1px; height: 16px; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; right: 1px; text-indent: -99999px; touch-action: none; width: 16px; z-index: 90;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;widget-content dashboard&quot; style=&quot;height: 134px; margin-bottom: 0px; position: static; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;results&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;results-table noscroll&quot; style=&quot;border: 1px solid rgb(221, 221, 221); margin: 2px 0px 0px; overflow: auto; padding: 0px;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;floatThead-wrapper&quot; style=&quot;clear: both; pointer-events: none; position: relative;&quot;&gt;
&lt;div class=&quot;inner&quot; style=&quot;max-height: 246px; overflow: auto;&quot;&gt;
&lt;fthfoot style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-footer-group; height: 0px;&quot;&gt;&lt;fthtr style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-row; height: 0px;&quot;&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;/fthtr&gt;&lt;/fthfoot&gt;&lt;table class=&quot;table table-bordered table-condensed table-hover&quot; style=&quot;background-color: transparent; border-collapse: collapse; border-radius: 4px; border-spacing: 0px; border: none; margin: 0px; max-width: 100%; min-width: 1938px; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 1938px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr class=&quot;size-row&quot; style=&quot;border-radius: 0px !important; height: 20px; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 4px; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;border-radius: 0px !important; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;getting&quot;,&quot;started&quot;,&quot;wonderful&quot;,&quot;here&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;december&quot;,&quot;fy13&quot;,&quot;wonderfully&quot;,&quot;explained&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;fitness&quot;,&quot;reimbursement&quot;,&quot;slide&quot;,&quot;number&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div aria-hidden=&quot;true&quot; class=&quot;floatThead-floatContainer floatThead-container&quot; style=&quot;left: 0px; margin-top: 0px; overflow: hidden; position: absolute; top: 0px; width: 1938px; z-index: 1;&quot;&gt;
&lt;table class=&quot;table table-bordered table-condensed table-hover floatThead-table&quot; style=&quot;background-color: transparent; border-bottom: 0px none; border-left: none; border-radius: 4px; border-right: none; border-spacing: 0px; border-top: none; margin: 0px; max-width: 100%; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 1938px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-radius: 4px; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;tokens&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;download-controls&quot; style=&quot;display: inline-block; margin-top: 3px;&quot;&gt;
&lt;a class=&quot;btn btn-small results-download-preview&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.137255); border-radius: 3px; border-style: solid; border-width: 1px; box-shadow: none; cursor: pointer; display: inline-block; font-size: 12px; line-height: 20px; margin: 0px; padding: 2px 10px; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; vertical-align: middle;&quot; title=&quot;Download CSV&quot;&gt;&lt;span class=&quot;fa fa-download&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$71b02144-9082-4726-bdc1-ccb4c3b2add8.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-7 cell-349-365&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 269px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;sh&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;http&lt;/span&gt;:&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;//ir.dcs.gla.ac.uk/resources/linguistic_utils/stop_words -O /tmp/stopwords&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
--2016-08-11 04:48:37--  http://ir.dcs.gla.ac.uk/resources/linguistic_utils/stop_words
Resolving ir.dcs.gla.ac.uk (ir.dcs.gla.ac.uk)... 130.209.240.253
Connecting to ir.dcs.gla.ac.uk (ir.dcs.gla.ac.uk)|130.209.240.253|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2237 (2.2K) [text/plain]
Saving to: ?/tmp/stopwords?

     0K ..                                                    100%  350M=0s

2016-08-11 04:48:37 (350 MB/s) - ?/tmp/stopwords? saved [2237/2237]

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$e2e1ffa4-4241-4895-8077-c3bce55d73a8.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-8 cell-349-366&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 79px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;fs&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;file&lt;/span&gt;:&lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;tmp&lt;/span&gt;&lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;stopwords&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;dbfs&lt;/span&gt;:&lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;tmp&lt;/span&gt;&lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;stopwords&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
res53: Boolean = true
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$50d11252-e876-4bc3-b378-22be1c0ee7b9.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-9 cell-349-367&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 250px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;stopwords&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;textFile&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;/tmp/stopwords&quot;&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;collect&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
stopwords: Array[String] = Array(a, about, above, across, after, afterwards, again, against, all, almost, alone, along, already, also, although, always, am, among, amongst, amoungst, amount, an, and, another, any, anyhow, anyone, anything, anyway, anywhere, are, around, as, at, back, be, became, because, become, becomes, becoming, been, before, beforehand, behind, being, below, beside, besides, between, beyond, bill, both, bottom, but, by, call, can, cannot, cant, co, computer, con, could, couldnt, cry, de, describe, detail, do, done, down, due, during, each, eg, eight, either, eleven, else, elsewhere, empty, enough, etc, even, ever, every, everyone, everything, everywhere, except, few, fifteen, fify, fill, find, fire, first, five, for, former, formerly, forty, found, four, from, front, full, further, get, give, go, had, has, hasnt, have, he, hence, her, here, hereafter, hereby, herein, hereupon, hers, herself, him, himself, his, how, however, hundred, i, ie, if, in, inc, indeed, interest, into, is, it, its, itself, keep, last, latter, latterly, least, less, ltd, made, many, may, me, meanwhile, might, mill, mine, more, moreover, most, mostly, move, much, must, my, myself, name, namely, neither, never, nevertheless, next, nine, no, nobody, none, noone, nor, not, nothing, now, nowhere, of, off, often, on, once, one, only, onto, or, other, others, otherwise, our, ours, ourselves, out, over, own, part, per, perhaps, please, put, rather, re, same, see, seem, seemed, seeming, seems, serious, several, she, should, show, side, since, sincere, six, sixty, so, some, somehow, someone, something, sometime, sometimes, somewhere, still, such, system, take, ten, than, that, the, their, them, themselves, then, thence, there, thereafter, thereby, therefore, therein, thereupon, these, they, thick, thin, third, this, those, though, three, through, throughout, thru, thus, to, together, too, top, toward, towards, twelve, twenty, two, un, under, until, up, upon, us, very, via, was, we, well, were, what, whatever, when, whence, whenever, where, whereafter, whereas, whereby, wherein, whereupon, wherever, whether, which, while, whither, who, whoever, whole, whom, whose, why, will, with, within, without, would, yet, you, your, yours, yourself, yourselves)
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$f343b185-4fdb-478c-b5e4-3bc682156037.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-10 cell-349-368&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 288px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 194px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 194px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;ml&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;feature&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;StopWordsRemover&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Set params for StopWordsRemover&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;remover&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;StopWordsRemover&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setStopWords&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;stopwords&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// This parameter is optional&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setInputCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;tokens&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setOutputCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;filtered&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Create new DF with Stopwords removed&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;filtered_df&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;remover&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;transform&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;tokenized_df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 194px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
import org.apache.spark.ml.feature.StopWordsRemover
remover: org.apache.spark.ml.feature.StopWordsRemover = stopWords_783ff1555eb7
filtered_df: org.apache.spark.sql.DataFrame = [filename: string, id: string ... 3 more fields]
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$16209458-dcd3-41a4-b642-936213ce2e75.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-11 cell-349-369&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 204px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;display&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;filtered_df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results dashboard&quot; data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;dashboard&quot; style=&quot;margin-bottom: 0px; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div style=&quot;margin-top: 0px; position: relative; width: auto;&quot;&gt;
&lt;div class=&quot;widget ui-resizable&quot; data-guid=&quot;e638a5f8-508d-4f0e-882a-673647884215&quot; style=&quot;background: none; border: 1px solid transparent; height: auto; left: 0px; min-height: 18px; padding: 3px; position: relative; top: 0px; width: auto;&quot;&gt;
&lt;div class=&quot;ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se&quot; style=&quot;background-image: url(&amp;quot;images/ui-icons_222222_256x240.png&amp;quot;); background-position: -64px -224px; background-repeat: no-repeat; bottom: 1px; cursor: se-resize; font-size: 0.1px; height: 16px; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; right: 1px; text-indent: -99999px; touch-action: none; width: 16px; z-index: 90;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;widget-content dashboard&quot; style=&quot;height: 134px; margin-bottom: 0px; position: static; transform-origin: 0px 0px 0px;&quot;&gt;
&lt;div class=&quot;results&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;results-table noscroll&quot; style=&quot;border: 1px solid rgb(221, 221, 221); margin: 2px 0px 0px; overflow: auto; padding: 0px;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;floatThead-wrapper&quot; style=&quot;clear: both; pointer-events: none; position: relative;&quot;&gt;
&lt;div class=&quot;inner&quot; style=&quot;max-height: 246px; overflow: auto;&quot;&gt;
&lt;fthfoot style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-footer-group; height: 0px;&quot;&gt;&lt;fthtr style=&quot;border-collapse: collapse; border-spacing: 0px; display: table-row; height: 0px;&quot;&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;fthtd style=&quot;display: table-cell; height: 0px; width: auto;&quot;&gt;&lt;/fthtd&gt;&lt;/fthtr&gt;&lt;/fthfoot&gt;&lt;table class=&quot;table table-bordered table-condensed table-hover&quot; style=&quot;background-color: transparent; border-collapse: collapse; border-radius: 4px; border-spacing: 0px; border: none; margin: 0px; max-width: 100%; min-width: 1938px; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 336px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 204px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 439px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 479px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 480px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr class=&quot;size-row&quot; style=&quot;border-radius: 0px !important; height: 20px; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;th class=&quot;floatThead-col&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; height: 19px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;border-radius: 0px !important; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0AAC_v003.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000002Uik0&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;Getting started is wonderful here&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;getting&quot;,&quot;started&quot;,&quot;wonderful&quot;,&quot;here&quot;]&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;getting&quot;,&quot;started&quot;,&quot;wonderful&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZFAA2_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;069300000033HZF&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;re: december fy13 wonderfully explained �&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;december&quot;,&quot;fy13&quot;,&quot;wonderfully&quot;,&quot;explained&quot;]&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;december&quot;,&quot;fy13&quot;,&quot;wonderfully&quot;,&quot;explained&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;td style=&quot;border-left: none; border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBkAAM_v001.txt&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;06930000001cVBk&lt;/td&gt;&lt;td style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;fitness reimbursement ?? slide number 1&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;fitness&quot;,&quot;reimbursement&quot;,&quot;slide&quot;,&quot;number&quot;]&lt;/td&gt;&lt;td class=&quot;nestify nestify-expandable&quot; style=&quot;border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 1px solid rgb(221, 221, 221); line-height: 20px; padding: 4px 5px; vertical-align: top;&quot;&gt;&lt;span class=&quot;nestify-expand fa fa-caret-right&quot; style=&quot;-webkit-font-smoothing: antialiased; color: #999999; cursor: pointer; display: inline; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-weight: bold; line-height: 1; min-width: 12px; padding-right: 3px; text-align: center; text-rendering: auto;&quot;&gt;&lt;/span&gt;[&quot;fitness&quot;,&quot;reimbursement&quot;,&quot;slide&quot;,&quot;number&quot;]&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div aria-hidden=&quot;true&quot; class=&quot;floatThead-floatContainer floatThead-container&quot; style=&quot;left: 0px; margin-top: 0px; overflow: hidden; position: absolute; top: 0px; width: 1938px; z-index: 1;&quot;&gt;
&lt;table class=&quot;table table-bordered table-condensed table-hover floatThead-table&quot; style=&quot;background-color: transparent; border-bottom: 0px none; border-left: none; border-radius: 4px; border-right: none; border-spacing: 0px; border-top: none; margin: 0px; max-width: 100%; table-layout: fixed; width: 1938px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 336px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 204px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 439px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 479px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 480px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead style=&quot;background: rgb(250, 250, 250); border-bottom: 1px solid rgb(221, 221, 221); border-radius: 0px !important; box-shadow: none; color: #888888; font-size: 13px; line-height: 19px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;
&lt;tr style=&quot;border-radius: 0px !important; padding-bottom: 3px !important; padding-top: 3px !important;&quot;&gt;&lt;th style=&quot;border-bottom-left-radius: 4px; border-bottom-right-radius: 0px !important; border-bottom: 1px solid rgb(221, 221, 221); border-left: none; border-top-left-radius: 4px; border-top-right-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;filename&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;id&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;text&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-radius: 0px !important; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;tokens&lt;/th&gt;&lt;th style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 4px; border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-top-left-radius: 0px !important; border-top-right-radius: 4px; border-top: 0px; line-height: 20px; padding: 4px 5px; text-align: left; vertical-align: bottom;&quot;&gt;filtered&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;download-controls&quot; style=&quot;display: inline-block; margin-top: 3px;&quot;&gt;
&lt;a class=&quot;btn btn-small results-download-preview&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-color: rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.109804) rgba(0, 0, 0, 0.137255); border-radius: 3px; border-style: solid; border-width: 1px; box-shadow: none; cursor: pointer; display: inline-block; font-size: 12px; line-height: 20px; margin: 0px; padding: 2px 10px; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; vertical-align: middle;&quot; title=&quot;Download CSV&quot;&gt;&lt;span class=&quot;fa fa-download&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$357f348a-34f8-4d18-b122-20da64db3568.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-12 cell-349-370&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 345px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 232px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 232px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;mllib&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;linalg&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;Vectors&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;sql&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;Row&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;ml&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;feature&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;CountVectorizer&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Set params for CountVectorizer&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;vectorizer&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;CountVectorizer&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setInputCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;filtered&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setOutputCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;features&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;fit&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;filtered_df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 232px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.sql.Row
import org.apache.spark.ml.feature.CountVectorizer
vectorizer: org.apache.spark.ml.feature.CountVectorizerModel = cntVec_663ad4846e39
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$33d3587e-e783-47cc-a42a-ad8915094b94.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-13 cell-349-372&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 212px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 23px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 23px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;vectorizer&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;transform&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;filtered_df&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;id&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;text&quot;&lt;/span&gt;,&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;features&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;filtered&quot;&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;show&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 23px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
+---------------+--------------------+--------------------+--------------------+
|             id|                text|            features|            filtered|
+---------------+--------------------+--------------------+--------------------+
|06930000002Uik0|Getting started i...|(11,[2,3,6],[1.0,...|[getting, started...|
|069300000033HZF|re: december fy13...|(11,[5,7,8,10],[1...|[december, fy13, ...|
|06930000001cVBk|fitness reimburse...|(11,[0,1,4,9],[1....|[fitness, reimbur...|
+---------------+--------------------+--------------------+--------------------+

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$b4a569c5-cfaf-4493-88e9-2c479533fa00.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-14 cell-349-373&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 193px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 99px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 99px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;mllib&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;linalg&lt;/span&gt;.&lt;span class=&quot;cm-variable-3&quot; style=&quot;color: #0000c0;&quot;&gt;Vector&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;mllib&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;linalg&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;Vectors&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;countVectors&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;vectorizer&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;transform&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;filtered_df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 99px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
import org.apache.spark.mllib.linalg.Vector
import org.apache.spark.mllib.linalg.Vectors
countVectors: org.apache.spark.sql.DataFrame = [filename: string, id: string ... 4 more fields]
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$a8a840c4-bfb8-4d95-9810-258f36bf813f.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-15 cell-349-392&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 231px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 42px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 42px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;countVectors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;show&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 42px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
+--------------------+---------------+--------------------+--------------------+--------------------+--------------------+
|            filename|             id|                text|              tokens|            filtered|            features|
+--------------------+---------------+--------------------+--------------------+--------------------+--------------------+
|06930000002Uik0AA...|06930000002Uik0|Getting started i...|[getting, started...|[getting, started...|(11,[2,3,6],[1.0,...|
|069300000033HZFAA...|069300000033HZF|re: december fy13...|[december, fy13, ...|[december, fy13, ...|(11,[5,7,8,10],[1...|
|06930000001cVBkAA...|06930000001cVBk|fitness reimburse...|[fitness, reimbur...|[fitness, reimbur...|(11,[0,1,4,9],[1....|
+--------------------+---------------+--------------------+--------------------+--------------------+--------------------+

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$2b63b870-0c8c-4fb4-b5b8-f7c3dcd29031.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-16 cell-349-375&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 288px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 175px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 175px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;ml&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;clustering&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;DistributedLDAModel&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;sql&lt;/span&gt;.{&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;Row&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;SQLContext&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;org&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;apache&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;spark&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;sql&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;types&lt;/span&gt;.{&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;StructField&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;StructType&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;lda&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;LDA&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setK&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;3&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setMaxIter&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;10&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;  .&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;setFeaturesCol&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;color: #2a00ff;&quot;&gt;&quot;features&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 175px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
import org.apache.spark.ml.clustering.DistributedLDAModel
import org.apache.spark.sql.{Row, SQLContext}
import org.apache.spark.sql.types.{StructField, StructType}
lda: org.apache.spark.ml.clustering.LDA = lda_f977d0e6a90e
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$c1515ca4-9f69-4bb2-b52f-c3f918c7c94d.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-17 cell-349-406&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 136px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.4&quot; style=&quot;margin-left: 6px; margin-right: 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 80px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 80px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;transformed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;model&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;transform&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;countVectors&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 80px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
transformed: org.apache.spark.sql.DataFrame = [filename: string, id: string ... 5 more fields]
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div data-reactid=&quot;.0.2.0.0.0.1:$546ae8eb-5883-49a4-8c6b-2c67ddad9926.0.5.1&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;command divider&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7-divider&quot; style=&quot;background-color: white; border-radius: 4px; border: 1px solid transparent; box-shadow: none; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; height: 21px; line-height: 18px; margin-bottom: -4px; margin-top: -4px; opacity: 0; overflow: visible; padding: 0px; pointer-events: none; position: relative; transition: opacity 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: 1;&quot;&gt;
&lt;hr data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7-divider.0&quot; style=&quot;background-color: transparent; border: none; color: white; height: 1px; margin: 10px 0px; transition: background-color 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53); z-index: -1;&quot; /&gt;
&lt;a class=&quot;btn btn-default btn-circle insert-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7-divider.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;background-color: whitesmoke; background-image: none; background-repeat: repeat-x; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.109804); box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; color: rgb(169, 169, 169) !important; cursor: pointer; display: block; height: 19px; left: 981px; line-height: 22px; margin: 0px; padding: 0px; position: absolute; text-align: center; text-shadow: rgba(255, 255, 255, 0.74902) 0px 1px 1px; top: 0px; vertical-align: middle; width: 19px; z-index: 1;&quot; title=&quot;Insert a new cell&quot;&gt;&lt;span class=&quot;fa fa-plus fa-fw&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7-divider.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-stretch: normal; line-height: 1; text-rendering: auto; width: 1.28571em;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight-inactive&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div class=&quot;new-notebook command mainCommand no-edit no-run command-finished cellIndex-18 cell-349-377&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0&quot; draggable=&quot;true&quot; style=&quot;-webkit-user-select: text; border-radius: 2px; border: 1px solid transparent; box-shadow: rgba(0, 0, 0, 0.117647) 0px 0px 2px 0px, rgba(0, 0, 0, 0.117647) 0px 1px 2px 0px; margin-bottom: 0px; padding: 0px; position: relative; transition: all 0.14s;&quot;&gt;
&lt;div class=&quot;command-comments-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.0&quot; style=&quot;float: right; margin-top: 25px; position: relative; right: 0px; vertical-align: top; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;a class=&quot;move-command-btn&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.1&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;bottom: 2px; color: rgb(169, 169, 169) !important; cursor: move; font-size: 20px; height: 877px; left: -6px; line-height: 17px; opacity: 0; padding: 4px; pointer-events: none; position: absolute; top: -4px; width: 12px; z-index: 3;&quot;&gt;&lt;span class=&quot;fa fa-sort&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.1.0&quot; style=&quot;-webkit-font-smoothing: antialiased; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; line-height: 1; text-rendering: auto;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;command-input previousPrompt primaryPrompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.4&quot; style=&quot;margin: 0px 6px;&quot;&gt;
&lt;div class=&quot;command-text command-text-finished&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.4.0&quot; style=&quot;background-color: transparent; border-radius: 2px; border: none !important; box-shadow: none !important; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; margin: 0px; padding: 12px 0px 6px 4px; position: relative;&quot;&gt;
&lt;span class=&quot;prompt&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.4.0.0&quot; style=&quot;-webkit-user-select: none; color: rgba(0, 0, 0, 0.239216); float: left; font-weight: bold; margin-right: -2px; padding-top: 5px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;command-box wrappable&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.4.0.1&quot; style=&quot;margin-right: 0px; overflow: hidden; word-wrap: break-word;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-eclipse-focus CodeMirror-wrap&quot; style=&quot;background: transparent !important; height: auto; line-height: 19px; min-height: 20px; overflow: hidden; padding-bottom: 1px; padding-top: 5px; position: relative;&quot;&gt;
&lt;div style=&quot;height: 0px; left: 4px; overflow: hidden; position: relative; top: 5px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;border-color: rgb(204, 204, 204); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px inset; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; height: 1em; line-height: 20px; margin: 0px 0px 10px; outline: none; overflow: auto; padding: 0px; position: absolute; transition: border 0.2s linear, box-shadow 0.2s linear; vertical-align: middle; width: 1000px;&quot; tabindex=&quot;1&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 213px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 30px solid transparent; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; min-height: 213px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;cursor: text; min-height: 1px; overflow: hidden; padding: 0px 0px 4px;&quot;&gt;
&lt;div style=&quot;outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: static; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 1932.39px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; height: 19px; left: 4px; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;background: transparent !important; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;ll&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;model&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;logLikelihood&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;countVectors&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;lp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;model&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;logPerplexity&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;countVectors&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// describeTopics&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;color: blue;&quot;&gt;topics&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;color: black;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;model&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;describeTopics&lt;/span&gt;(&lt;span class=&quot;cm-number&quot; style=&quot;color: #116644;&quot;&gt;10&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;color: #3f7f5f;&quot;&gt;// Shows the result&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;topics&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;show&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;false&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;transformed&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot; style=&quot;color: black;&quot;&gt;show&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;color: #7f0055; font-weight: bold; line-height: 1em;&quot;&gt;false&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 30px; position: absolute; top: 213px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;results-and-comments&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.5&quot; style=&quot;padding-top: 6px; vertical-align: top;&quot;&gt;
&lt;div class=&quot;command-result-wrapper&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.5.0&quot; style=&quot;width: auto;&quot;&gt;
&lt;div class=&quot;command-result&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.5.0.0&quot; style=&quot;margin: 0px 7px 7px; overflow: auto;&quot;&gt;
&lt;div class=&quot;results&quot; data-reactid=&quot;.0.2.0.0.0.1:$db2706de-b1e3-4306-b060-fac61c4140e7.0.5.0.0.3&quot; style=&quot;margin: 0px; padding: 0px; position: relative;&quot;&gt;
&lt;div class=&quot;ansiout&quot; style=&quot;color: #555555; font-family: &amp;quot;Source Code Pro&amp;quot;, Menlo, monospace; line-height: 19px; margin-left: 4px; unicode-bidi: embed; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;
+-----+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|topic|termIndices                    |termWeights                                                                                                                                                                                                       |
+-----+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|0    |[2, 5, 7, 9, 4, 10, 1, 0, 3, 8]|[0.1062041440811267, 0.10583753784271348, 0.10442749933639424, 0.09682858305200294, 0.09351340983989168, 0.09131890650704068, 0.08714867387466924, 0.08070231248484354, 0.0802804983696842, 0.07701228167379913]  |
|1    |[1, 6, 2, 5, 0, 3, 8, 9, 4, 7] |[0.10195178268898618, 0.09823618268931927, 0.09637471483627483, 0.09537821409096363, 0.09317671877781553, 0.08903558963685265, 0.08890389418467605, 0.08631694410851917, 0.08621391878142007, 0.08438517259595037]|
|2    |[1, 9, 4, 2, 5, 10, 3, 8, 6, 7]|[0.10612398716703186, 0.09757374578910046, 0.09660179632115497, 0.09375920815595054, 0.09318237101826143, 0.09050611023493967, 0.08978021671904904, 0.08546034203857293, 0.08355203917046891, 0.08177244097296857]|
+-----+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

+---------------------------+---------------+-------------------------------------------+----------------------------------------+----------------------------------------+---------------------------------+------------------------------------------------------------+
|filename                   |id             |text                                       |tokens                                  |filtered                                |features                         |topicDistribution                                           |
+---------------------------+---------------+-------------------------------------------+----------------------------------------+----------------------------------------+---------------------------------+------------------------------------------------------------+
|06930000002Uik0AAC_v003.txt|06930000002Uik0|Getting started is wonderful here          |[getting, started, wonderful, here]     |[getting, started, wonderful]           |(11,[2,3,6],[1.0,1.0,1.0])       |[0.10318703949282229,0.7938521983720901,0.10296076213508765]|
|069300000033HZFAA2_v001.txt|069300000033HZF|re: december fy13 wonderfully explained   �|[december, fy13, wonderfully, explained]|[december, fy13, wonderfully, explained]|(11,[5,7,8,10],[1.0,1.0,1.0,1.0])|[0.835109741017235,0.08292735466870861,0.08196290431405635] |
|06930000001cVBkAAM_v001.txt|06930000001cVBk|fitness reimbursement   ??   slide number 1|[fitness, reimbursement, slide, number] |[fitness, reimbursement, slide, number] |(11,[0,1,4,9],[1.0,1.0,1.0,1.0]) |[0.08429553958886034,0.08695919972860706,0.8287452606825326]|
+---------------------------+---------------+-------------------------------------------+----------------------------------------+----------------------------------------+---------------------------------+------------------------------------------------------------+

ll: Double = -46.015729151104544
lp: Double = 4.183248263936846
topics: org.apache.spark.sql.DataFrame = [topic: int, termIndices: array&amp;lt;int&amp;gt; ... 1 more field]&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/1446841952612262784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/08/topic-classification-using-lda-ml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/1446841952612262784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/1446841952612262784'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/08/topic-classification-using-lda-ml.html' title='Topic Classification using Latent Dirichlet Allocation(LDA)  ML Library '/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-3208871398833197254</id><published>2016-07-31T11:52:00.002-07:00</published><updated>2016-08-13T22:39:21.097-07:00</updated><title type='text'>For developers only - Runu Apis</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Site:&amp;nbsp;&lt;a href=&quot;http://runu.herokuapp.com/&quot; target=&quot;_blank&quot;&gt; http://runu.herokuapp.com/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #e69138; font-size: large;&quot;&gt;Introduction&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Runu has been running live from past 3 weeks and is getting traction on how to interact with cognitive apis. This has been a platform to showcase the learning algorithms of Google and Microsoft, thereby helping any individual to decide if he/she wants to leverage these features in their app or not.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Runu currently comes with 8 kinds of cognitive Analysis&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Image detection - Talking to Google Vision&lt;/li&gt;
&lt;li&gt;Logo Detection - Talking to Google Vision&lt;/li&gt;
&lt;li&gt;Face detection - Talking to Google Vision&lt;/li&gt;
&lt;li&gt;Location detection - Talking to Google Vision&lt;/li&gt;
&lt;li&gt;Celebrity detection - Talking to Microsoft&#39;s Cognitive APIs&lt;/li&gt;
&lt;li&gt;Text Detection - Talking to Google Vision&lt;/li&gt;
&lt;li&gt;Emotion Detection -&amp;nbsp;Talking to Microsoft&#39;s Cognitive APIs&lt;/li&gt;
&lt;li&gt;What is this image (Caption detection)-Talking to Microsoft&#39;s Cognitive APIs&lt;/li&gt;
&lt;li&gt;Sentiment Analysis for text - Talking to Google NLP&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
The app has an hybrid mechanism to talk to both Google and Microsoft apis in order to leverage both the features in analyzing an image.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e69138; font-size: large;&quot;&gt;What&#39;s new in Runu?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Runu &amp;nbsp;has been updated with a REST api layer for each features mentioned above. This will help any developer to leverage the apis easily with his/her own features. (Please note, this is an experimental version and can be changed in future). If you want to integrate this feature drop a mail to sengupta.nabarun@gmail.com so that we can make you aware of any kind of disruption in service.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
These features will be available without any cost of payment.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Currently all REST Apis are giving JSON responses.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #ea9999;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;1. Image Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getlabels?url=http://runu.herokuapp.com/Images/runu-imagedetection_owl.jpg&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type: &lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt; JSON&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;[&quot;bird&quot;,&quot;owl&quot;,&quot;wildlife&quot;,&quot;beak&quot;,&quot;nature&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;2. Logo Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getlogo?url=http://runu.herokuapp.com/Images/runu-logodetection_cocacola.png&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;JSON&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;[&quot;Coca-Cola&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;3. Face Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getface?url=http://runu.herokuapp.com/Images/runu-facedetection.png&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format: &lt;/b&gt;STRING&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&quot;Found 1 face&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;4. Location Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getlandmark?url=http://runu.herokuapp.com/Images/wunu-locationdetection_tajmahal.jpeg&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;JSON&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;[&quot;Taj Mahal&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;5. Celebrity Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getcelebrity?url=http://runu.herokuapp.com/Images/runu-celebritydetection.jpg&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;JSON&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;[&quot;Brad Pitt&quot;,&quot;Angelina Jolie&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;6. Text Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/gettext?url=http://runu.herokuapp.com/Images/runu-ocrdetection.jpg&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;JSON&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;[&quot;Imagination is\nGG\nmore important\nthan knowledge.\nAlbert Einstein\n&quot;,&quot;Imagination&quot;,&quot;is&quot;,&quot;GG&quot;,&quot;more&quot;,&quot;important&quot;,&quot;than&quot;,&quot;knowledge.&quot;,&quot;Albert&quot;,&quot;Einstein&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;7. Emotion Detection&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getemotion?url=http://runu.herokuapp.com/Images/runu-emotiondetection.jpg&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;JSON&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;{&quot;Anger&quot;:0.999675453,&quot;Contempt&quot;:0,&quot;Disgust&quot;:0,&quot;Fear&quot;:0,&quot;Happiness&quot;:0,&quot;Neutral&quot;:0,&quot;Sadness&quot;:0,&quot;Surprise&quot;:0}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;8. What is this image (Caption Detection)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getAnswers?url=http://runu.herokuapp.com/Images/runu-answerme.jpg&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;STRING&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&quot;there is a star&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;9. Sentiment Analysis for text&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;API call:&lt;/b&gt;&amp;nbsp;http://runu.herokuapp.com/getentities?text=Stop%20human%20killing.%20This%20is%20not%20helping%20anyone.%20We%20want%20peace.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Request Type:&amp;nbsp;&lt;/b&gt;GET&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Response Format:&lt;/b&gt;&amp;nbsp;STRING&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;{&quot;documentSentiment&quot;:{&quot;polarity&quot;:-0.9,&quot;magnitude&quot;:1.8},&quot;language&quot;:&quot;en&quot;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;Details: &lt;/b&gt;https://www.linkedin.com/pulse/runu-sentiment-analysis-nabarun-sengupta&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #e06666; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e69138; font-size: large;&quot;&gt;Conclusion&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
The intent of these apis are to provide easy rest api calls to the cognitive apis in backend. These features can be leveraged in creation of demo POCs. For further enquiry regarding the transaction drop a mail to sengupta.nabarun@gmail.com.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy Coding!!!&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/3208871398833197254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/07/for-developers-only-runu-apis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3208871398833197254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3208871398833197254'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/07/for-developers-only-runu-apis.html' title='For developers only - Runu Apis'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-6556299693391735844</id><published>2016-07-10T11:50:00.000-07:00</published><updated>2016-07-10T11:50:24.966-07:00</updated><title type='text'>Project Runu - Try it out yourself</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhukpccCeJkYo3yVhLuKy_BoMEaFojOr-T023PaB7qdkigpv7hLeOYSt6At5HROooWWIEkjfyaDiGWHbj6AybQntY-QNozdXUCHWoL4UsAXhoRc8MT7ZGNJPKiYoIa8FeREMz813mTciNY/s1600/hero3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhukpccCeJkYo3yVhLuKy_BoMEaFojOr-T023PaB7qdkigpv7hLeOYSt6At5HROooWWIEkjfyaDiGWHbj6AybQntY-QNozdXUCHWoL4UsAXhoRc8MT7ZGNJPKiYoIa8FeREMz813mTciNY/s640/hero3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;Ever imagined how robots in future will understand object.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;Well, here it is... Introducing Runu vision which works with Google Vision apis to understand what is there in an image.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&amp;nbsp;Find out exciting stuff where the system not only understand the images but also learn about them.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;URL: &lt;/span&gt;&lt;a data-trk=&quot;link&quot; href=&quot;http://runu.herokuapp.com/&quot; style=&quot;background-color: white; border: 0px; color: #008cc9; font-family: Helvetica, Arial, sans-serif; font-size: 13px; font-stretch: inherit; line-height: 17px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline; white-space: pre-line;&quot; target=&quot;_blank&quot;&gt;http://runu.herokuapp.com/&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #f1f3f5; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 14px; white-space: pre-line;&quot;&gt;Demo:&amp;nbsp;&lt;/span&gt;&lt;a data-trk=&quot;link&quot; href=&quot;https://youtu.be/PL8ewCu79gU&quot; style=&quot;background-color: #f1f3f5; border: 0px; color: #008cc9; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-stretch: inherit; line-height: 14px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline; white-space: pre-line;&quot; target=&quot;_blank&quot;&gt;https://youtu.be/PL8ewCu79gU&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&amp;nbsp;Copy and paste any image url and click on Analyze button and see how the system understands what is there in the image.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&amp;nbsp;For further questions ask sengupta.nabarun@&lt;/span&gt;&lt;a data-trk=&quot;link&quot; href=&quot;http://gmail.com/&quot; style=&quot;background-color: white; border: 0px; color: #008cc9; font-family: Helvetica, Arial, sans-serif; font-size: 13px; font-stretch: inherit; line-height: 17px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline; white-space: pre-line;&quot; target=&quot;_blank&quot;&gt;gmail.com&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 17px; white-space: pre-line;&quot;&gt;Please do share if you like this and give your feedback for improvement.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/6556299693391735844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/07/project-runu-try-it-out-yourself.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6556299693391735844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6556299693391735844'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/07/project-runu-try-it-out-yourself.html' title='Project Runu - Try it out yourself'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhukpccCeJkYo3yVhLuKy_BoMEaFojOr-T023PaB7qdkigpv7hLeOYSt6At5HROooWWIEkjfyaDiGWHbj6AybQntY-QNozdXUCHWoL4UsAXhoRc8MT7ZGNJPKiYoIa8FeREMz813mTciNY/s72-c/hero3.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-1553093730160317267</id><published>2016-06-04T10:27:00.002-07:00</published><updated>2016-06-04T10:27:25.864-07:00</updated><title type='text'>Project Runu- Giving eyes to machine</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;section class=&quot;section-container collapsed&quot; id=&quot;about-project&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; color: #4d4d4d; font-family: proxima-nova, HelveticaNeue, Helvetica, Arial, &#39;Lucida Grande&#39;, sans-serif; font-size: 18px; line-height: 25.7143px; margin-top: 40px; padding-top: 20px; word-break: break-word; word-wrap: break-word;&quot;&gt;&lt;div class=&quot;section-content hljs-active hljs-monokai&quot; style=&quot;box-sizing: border-box; padding: 10px 0px 0px;&quot;&gt;
&lt;div class=&quot;medium-editor&quot; style=&quot;box-sizing: border-box; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
Project Runu is interacting with Microsoft cognitive apis to analyze an Image and tell the user the details about it.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;Motivation&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
The motivation of project runu came from Microsoft cognitive api demo. In here it showed a blind person leveraging the power of cognitive api and learning about his surroundings.&lt;/div&gt;
&lt;div class=&quot;embed-frame&quot; style=&quot;box-sizing: border-box; margin: 20px 0px;&quot;&gt;
&lt;div class=&quot;figure youtube&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;
&lt;div class=&quot;figcaption embed-figcaption&quot; data-contenteditable=&quot;true&quot; data-default-text=&quot;Type in a caption&quot; data-disable-toolbar=&quot;true&quot; style=&quot;box-sizing: border-box; color: #888888; margin-bottom: 10px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;embed widescreen&quot; style=&quot;box-sizing: border-box; height: 0px; margin-bottom: 0px; outline: transparent solid 1px; padding-bottom: 364.969px; position: relative;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;100%&quot; src=&quot;https://www.youtube.com/embed/R2mC-NUAmMk?rel=0&quot; style=&quot;box-sizing: border-box; height: 364.969px; left: 0px; margin-bottom: 0px; position: absolute; top: 0px; width: 637.5px;&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
This led me think of an alternate solution for security cameras, face detection badge swapping machines, tourist helper etc. I will mention about these ideas later.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;Preparation Time&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box;&quot;&gt;I am a great fan of Node.js. With&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://node.js/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;&quot;&gt;Node.js&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;you can easily device a lightweight javascript application for your system. The increasing popularity of&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://node.js/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;&quot;&gt;Node.js&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;made Technical Machine team to device an unique IOT device which we know as Tessel.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
Coding with IOT is no longer a challenge for any node.js enthusiast like me as deployment of code on IOT has never got so easy. In this project I am using Tessel 2, which is having support for io.js. Tessel2 comes with USB support, so any USB supported camera can easily marry with it.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;Action Time&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box;&quot;&gt;To start with I explored the npm modules for tessel camera, when I got this resource&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;. Tessel-AV helps you interact with image, video and audio streams easily.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
The next thing was to marry this with the Microsoft cognitive api. For that one need to register in Microsoft cognitive service. On registering it will give a API key. For our project we just need this api key.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Here is the&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://node.js/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;&quot;&gt;node.js&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;&amp;nbsp;script which is interacting with USB supported camera, capturing a picture, sending it to cognitive api, and coming back with the analysis&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;hljs javascript&quot; style=&quot;background: rgb(35, 36, 31); border-radius: 0px; border: none; box-sizing: border-box; color: #f8f8f2; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 13px; line-height: 1.42857; margin-bottom: 10px; max-height: 400px; overflow-x: auto; overflow-y: scroll; padding: 0.5em; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: inherit; margin-bottom: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; fs = &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;fs&#39;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; av = &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;tessel-av&#39;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; os = &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;os&#39;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; http = &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;http&#39;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; port = &lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box; color: #ae81ff; margin-bottom: 0px;&quot;&gt;8082&lt;/span&gt;;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; camera = &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;new&lt;/span&gt; av.Camera();
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-literal&quot; style=&quot;box-sizing: border-box; color: #ae81ff; margin-bottom: 0px;&quot;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;box-sizing: border-box; color: #75715e; margin-bottom: 0px;&quot;&gt;//Create a http server and capture the image from tessel&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;box-sizing: border-box; color: #75715e; margin-bottom: 0px;&quot;&gt;//supported usb camera&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;http.createServer((request, response) =&amp;gt; {
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt; response.writeHead(&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box; color: #ae81ff;&quot;&gt;200&lt;/span&gt;, { &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;Content-Type&#39;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;image/jpg&#39;&lt;/span&gt; });
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;var&lt;/span&gt; capture = camera.capture();
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt; capture.pipe(response);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt; capture.on(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;data&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-function&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #66d9ef;&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: border-box; color: #f8f8f2; margin-bottom: 0px;&quot;&gt;data&lt;/span&gt;)&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;       saveimage(data);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;       analyzeimage();
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt; });
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;}).listen(port, () =&amp;gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;console&lt;/span&gt;.log(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;`http://&lt;span class=&quot;hljs-subst&quot; style=&quot;box-sizing: border-box;&quot;&gt;${os.hostname()}&lt;/span&gt;.local:&lt;span class=&quot;hljs-subst&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;${port}&lt;/span&gt;`&lt;/span&gt;));
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-literal&quot; style=&quot;box-sizing: border-box; color: #ae81ff; margin-bottom: 0px;&quot;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;box-sizing: border-box; color: #75715e; margin-bottom: 0px;&quot;&gt;//Analyze the captured image by sending it to the cognitive&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;box-sizing: border-box; color: #75715e; margin-bottom: 0px;&quot;&gt;//api for description&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-function&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #66d9ef;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot; style=&quot;box-sizing: border-box; color: #a6e22e;&quot;&gt;analyzeimage&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: border-box; color: #f8f8f2; margin-bottom: 0px;&quot;&gt;&lt;/span&gt;)&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;       fs.readFile(__dirname+&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;/captured-image.jpg&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-function&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #66d9ef;&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: border-box; color: #f8f8f2; margin-bottom: 0px;&quot;&gt;err,data&lt;/span&gt;)&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;       &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;if&lt;/span&gt;(err)
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;console&lt;/span&gt;.log(err);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;       &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;else&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               parseURL = &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;url&#39;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               parsedURL = parseURL.parse(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&quot;https://api.projectoxford.ai/vision/v1.0/analyze?visualFeatures=Description&quot;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;console&lt;/span&gt;.log(parsedURL.host);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;var&lt;/span&gt; options = {
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       host: parsedURL.host,
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       path: &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&quot;/vision/v1.0/analyze?visualFeatures=Description,Tags&quot;&lt;/span&gt;,
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       headers: {
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                               &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;Content-Type&#39;&lt;/span&gt;:&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;application/octet-stream&#39;&lt;/span&gt;,
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                               &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;Content-Length&#39;&lt;/span&gt;:data.length,
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                               &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;Ocp-Apim-Subscription-Key&#39;&lt;/span&gt;:&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;&amp;lt;&amp;gt;&#39;&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       },
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       method:&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;POST&#39;&lt;/span&gt;,
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       };
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               callback = &lt;span class=&quot;hljs-function&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #66d9ef;&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: border-box; color: #f8f8f2; margin-bottom: 0px;&quot;&gt;response&lt;/span&gt;)&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; str =&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&#39;&#39;&lt;/span&gt;;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       response.on(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;data&#39;&lt;/span&gt;, &lt;span class=&quot;hljs-function&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #66d9ef;&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: border-box; color: #f8f8f2; margin-bottom: 0px;&quot;&gt;chunk&lt;/span&gt;)&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                               str+= chunk;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       });
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       response.on(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&#39;end&#39;&lt;/span&gt;, &lt;span class=&quot;hljs-function&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #66d9ef;&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: border-box; color: #f8f8f2; margin-bottom: 0px;&quot;&gt;&lt;/span&gt;)&lt;/span&gt;{
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                               &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672;&quot;&gt;var&lt;/span&gt; obj = &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;JSON&lt;/span&gt;.parse(str);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                                
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                                &lt;span class=&quot;hljs-comment&quot; style=&quot;box-sizing: border-box; color: #75715e; margin-bottom: 0px;&quot;&gt;//Print out the caption&lt;/span&gt;
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                               &lt;span class=&quot;hljs-built_in&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;console&lt;/span&gt;.log(&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&quot;I think the caption of this object should be &quot;&lt;/span&gt; + obj.description.captions[&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box; color: #ae81ff;&quot;&gt;0&lt;/span&gt;].text+&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74;&quot;&gt;&quot;. I am &quot;&lt;/span&gt;+obj.description.captions[&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box; color: #ae81ff;&quot;&gt;0&lt;/span&gt;].confidence+&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #e6db74; margin-bottom: 0px;&quot;&gt;&quot;sure.&quot;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;                       });
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               }
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #f92672; margin-bottom: 0px;&quot;&gt;var&lt;/span&gt; post_req = http.request(options, callback);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               post_req.write(data);
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;               post_req.end();
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;       }
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;   });
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
This simple 100 approx line of code helped me create this low cost solution which can act as a mobile image identification system.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
Here is the demo POC for the same, where I am analyzing a vase of flower and a table clock. The technology not only gives the correct observation but also it considers the environment, like table clock sitting on a desk&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;POC&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;embed-frame&quot; style=&quot;box-sizing: border-box; margin: 20px 0px;&quot;&gt;
&lt;div class=&quot;figure youtube&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;
&lt;div class=&quot;figcaption embed-figcaption&quot; data-contenteditable=&quot;true&quot; data-default-text=&quot;Type in a caption&quot; data-disable-toolbar=&quot;true&quot; style=&quot;box-sizing: border-box; color: #888888; margin-bottom: 10px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;embed widescreen&quot; style=&quot;box-sizing: border-box; height: 0px; outline: transparent solid 1px; padding-bottom: 364.969px; position: relative;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;100%&quot; src=&quot;https://www.youtube.com/embed/lJ5rBiqeA9k?rel=0&quot; style=&quot;box-sizing: border-box; height: 364.969px; left: 0px; margin-bottom: 0px; position: absolute; top: 0px; width: 637.5px;&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;figcaption class=&quot;text-center&quot; style=&quot;box-sizing: border-box; color: #888888; font-size: 0.9em; font-style: italic; margin-bottom: 0px; margin-top: 10px; text-align: center;&quot;&gt;Project Runu&lt;/figcaption&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;Conclusion&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
This technology can prove to be having immense potential in few fields. Some of the ideas are as follows&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;1. Security cameras:&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Security cameras can talk to cognitive apis and send the video stream. As soon as there is any kinds of violence detected by the api, a security alarm can be sent in order to prevent it. The detection alarm can work on captions which have text like gun, knife, bomb etc. A captured image is sent to the officials who can decide whether or not to respond to the alert. Face detection is another story for the same&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;2. Badge swapping systems:&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin-bottom: 0px;&quot;&gt;Currently badge surfing is quiet common. There need to be another system which detects the person face and then allow him/her. To strengthen the system, we can use this technology for verification.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 20px;&quot;&gt;
These are few of my ideas where I see this technology useful apart from visual impaired support system. If you have any such ideas let us know.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Thanks for reading through this!!&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/1553093730160317267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/06/project-runu-giving-eyes-to-machine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/1553093730160317267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/1553093730160317267'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/06/project-runu-giving-eyes-to-machine.html' title='Project Runu- Giving eyes to machine'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/R2mC-NUAmMk/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-3114063007730577341</id><published>2016-04-30T11:11:00.001-07:00</published><updated>2016-04-30T11:11:23.557-07:00</updated><title type='text'>CRMTest - Understanding the Github Repo</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/m-RrkLhYxnk/0.jpg&quot; src=&quot;https://www.youtube.com/embed/m-RrkLhYxnk?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
This video is created to walk you through the github project for CRMTest. In this video we took an example of a scenario - Interaction with public cloud. The intent was to show the starting point of understanding the whole flow. Hope you guys will like it. Please post your feedback if you have.&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/3114063007730577341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/04/crmtest-understanding-github-repo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3114063007730577341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3114063007730577341'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/04/crmtest-understanding-github-repo.html' title='CRMTest - Understanding the Github Repo'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/m-RrkLhYxnk/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-3170316269469656799</id><published>2016-04-08T01:38:00.001-07:00</published><updated>2016-04-08T01:38:15.903-07:00</updated><title type='text'>Salesforce + Azure = Happy Customers :)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/s_vi/hgFM-LhP2d4/default.jpg?sqp=CLTanbgF&amp;rs=AOn4CLC8cq94z_iW5WkpCWoxxVlDEwnXJA&quot; src=&quot;https://www.youtube.com/embed/hgFM-LhP2d4?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/3170316269469656799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/04/salesforce-azure-happy-customers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3170316269469656799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3170316269469656799'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/04/salesforce-azure-happy-customers.html' title='Salesforce + Azure = Happy Customers :)'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/hgFM-LhP2d4/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-6556289341776963549</id><published>2016-04-05T00:59:00.001-07:00</published><updated>2016-04-05T01:02:17.911-07:00</updated><title type='text'>Salesforce Rendition + Microsoft Cognitive API = Happy Customers - Part 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Yesterday I blogged about the idea of including microsoft&#39;s cognitive api to analyze image getting generated from Salesforce content rendition at&amp;nbsp;&lt;a href=&quot;http://nabaruns.blogspot.com/2016/04/salesforce-content-microsoft-cognitive.html&quot;&gt;http://nabaruns.blogspot.com/2016/04/salesforce-content-microsoft-cognitive.html&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
However yesterday I was facing challenge in connecting the Salesforce file preview image to cognitive apis.&lt;br /&gt;
&lt;br /&gt;
The major challenge was that Salesforce was not allowing me to get an insecure http image url for the preview renditions. Because of this I was not sure how the image url will be scanned by the cognitive apis.&lt;br /&gt;
&lt;br /&gt;
But wait! there was another way to provide the content&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #fff2cc; color: #333333; line-height: 25.6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Supported input methods: Raw image binary in the form of an application/octet stream or image URL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The documentation said it can take raw image binary. This was a life saver for me as the rendition apis in Salesforce&amp;nbsp;https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_files_rendition.htm was capable of giving an InputStream for the generated thumbnail.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now the only gap that need to be bridged was to convert this InputStream to InputStreamEntity and send it to the cognitive apis. Wallah! it worked seamlessly. :)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Here is the node.js client call that has been added after making the changes&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 25.6px; margin-bottom: 16px; margin-top: 16px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Upload a File in Chatter feed&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-js&quot; style=&quot;background-color: white; box-sizing: border-box; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;&quot;&gt;response &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;crmtest&lt;/span&gt;.&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;insertChatterFeedFile&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;/Users/Documents/pdf.pdf&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;File Name&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;,&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;Title&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, accessToken);
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;var&lt;/span&gt; fileId &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;crmtest&lt;/span&gt;.&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;parseresponse&lt;/span&gt;(response,&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;id&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; line-height: 25.6px; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;In order to upload a file in chatter insertchatterfeedwithfile method is invoked&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;First parameter is the file location&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Second parameter will be the file name&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Third will be the file title&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Fourth will be the oauth accesstoken&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Once the response is recieved it can be parsed through and corresponding file id of the uploaded file can be retrieved.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Send the generated thumbnail preview from file rendition to Microsoft&#39;s cognitive api and get image analytics&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-js&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;&quot;&gt;response &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;crmtest&lt;/span&gt;.&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;analyzeimage&lt;/span&gt;(fileId, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;Microsoft cognitive api key&amp;gt;&amp;gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, accessToken);
&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;log&lt;/span&gt;(response&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;pl-cce&quot; style=&quot;box-sizing: border-box;&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Once file preview are generated, in order to get more analytics out of that send the fileId to the analyzeimage call with the Microsoft&#39;s cognitive api and accessToken&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Raw Image is read from the chatter api and passed to the Microsoft&#39;s cognitive api.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Note: Microsoft is not going to store the images as per its documentation&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;b&gt;Execution time&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;I uploaded the below seminar pic in my chatter feed&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCtxLVWah0wlenpS_y7Qe2oFPznu8jdHZ-a5PMsJ4IWzN8N_Qv4d2VPWRUyaB-yEsrFKpupH7RNnLb3HiSX6dmwdrAnPJUmFvwNErvvPoqXASH0UMTnGcdgVLOQzuExcIRQxmwSSah7E/s1600/seminar.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;154&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCtxLVWah0wlenpS_y7Qe2oFPznu8jdHZ-a5PMsJ4IWzN8N_Qv4d2VPWRUyaB-yEsrFKpupH7RNnLb3HiSX6dmwdrAnPJUmFvwNErvvPoqXASH0UMTnGcdgVLOQzuExcIRQxmwSSah7E/s320/seminar.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;Here is the output&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;background-color: #fff2cc;&quot;&gt;-------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;background-color: #fff2cc;&quot;&gt;-----------Analyze the generated file preview----------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;background-color: #fff2cc;&quot;&gt;-------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;{&quot;tags&quot;:[{&quot;name&quot;:&quot;indoor&quot;,&quot;confidence&quot;:0.98557054996490479},{&quot;name&quot;:&quot;auditorium&quot;,&quot;confidence&quot;:0.23898179829120636}],&quot;description&quot;:{&quot;tags&quot;:[&quot;indoor&quot;,&quot;room&quot;,&quot;large&quot;,&quot;building&quot;,&quot;sitting&quot;,&quot;table&quot;,&quot;auditorium&quot;,&quot;computer&quot;,&quot;people&quot;,&quot;man&quot;,&quot;group&quot;,&quot;laptop&quot;,&quot;crowd&quot;,&quot;standing&quot;],&quot;captions&quot;:[{&quot;text&quot;:&quot;a crowd of people in a room&quot;,&quot;confidence&quot;:0.26782138202681804}]},&quot;requestId&quot;:&quot;a23ecf3e-c0da-42b2-8d48-367848a97b93&quot;}&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;i&gt;Note tags are nothing but the suggested topics in salesforce terms.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;For more details refer to&amp;nbsp;&lt;a href=&quot;https://www.npmjs.com/package/crmtest&quot;&gt;https://www.npmjs.com/package/crmtest&lt;/a&gt; which is updated with these changes. In order to contribute towards crmtest refer at&amp;nbsp;&lt;a href=&quot;https://github.com/Nabarun/CrmTest/&quot;&gt;https://github.com/Nabarun/CrmTest/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;Hope this will help you in getting more out of Salesforce content.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/6556289341776963549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/04/salesforce-rendition-microsoft.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6556289341776963549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6556289341776963549'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/04/salesforce-rendition-microsoft.html' title='Salesforce Rendition + Microsoft Cognitive API = Happy Customers - Part 2'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCtxLVWah0wlenpS_y7Qe2oFPznu8jdHZ-a5PMsJ4IWzN8N_Qv4d2VPWRUyaB-yEsrFKpupH7RNnLb3HiSX6dmwdrAnPJUmFvwNErvvPoqXASH0UMTnGcdgVLOQzuExcIRQxmwSSah7E/s72-c/seminar.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-7735531690722583741</id><published>2016-04-04T01:15:00.002-07:00</published><updated>2016-04-05T01:03:30.199-07:00</updated><title type='text'>Salesforce Content + Microsoft Cognitive API = Happy Customers :)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I cannot hold myself writing a blog on a most amazing video demonstration of cognitive api from Microsoft at &lt;a href=&quot;https://www.youtube.com/watch?v=R2mC-NUAmMk&quot;&gt;https://www.youtube.com/watch?v=R2mC-NUAmMk&lt;/a&gt;. This video shows a blind person who is getting assisted with emotions through a cognitive api.&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Wow!! first of all hats off to this thinking. I bet whoever is seeing this is having the same impression as I have.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
They say innovation triggers innovation, and here it is. After watching this amazing video I went through the Microsoft cognitive api at&lt;a href=&quot;https://www.microsoft.com/cognitive-services/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;https://www.microsoft.com/cognitive-services/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This to me is a goldmine to solve many real life problems.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The problem that I am focussed now is on driving topic suggestion out of generated thumbnail preview in chatter file post. &lt;span style=&quot;background-color: cyan;&quot;&gt;The idea is as soon as the chatter post with file attachment is made, based on preview thumbnail generation, the salesforce user should be able to see the topics recommendation/suggestion&lt;/span&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Following step helped me to bring out a partial story around this. (I say partial as still I am trying to bridge the gap between salesforce rendition image url and microsoft&#39;s cognitive api.)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Signup to Microsoft cognitive api&amp;nbsp;https://www.microsoft.com/cognitive-services/ Register for the free edition&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. After successful registration, click on &quot;My Account&quot; and make a note of key1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. Follow the instructions at&amp;nbsp;&lt;a href=&quot;https://www.npmjs.com/package/crmtest&quot;&gt;https://www.npmjs.com/package/crmtest&lt;/a&gt; and install crmtest by executing the following&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
npm install crmtest&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. Observe crmtestclient.js and note the cognitive api calls in the bottom&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;//Suggest topics in preview image&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-----Suggest Topics in generated file preview----------------&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;response = crmtest.suggesttopicsinimage(&quot;&amp;lt;&amp;lt;image url&amp;gt;&amp;gt;&quot;, &quot;&amp;lt;&amp;lt;cognitive api key&amp;gt;&amp;gt;&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(response+&#39;\n&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;//Analyze preview image&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-----------Analyze the generated file preview----------------&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;response = crmtest.analyzeimage(&quot;&amp;lt;&amp;lt;image url&amp;gt;&amp;gt;&quot;, &quot;&amp;lt;&amp;lt;cognitive api key&amp;gt;&amp;gt;&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(response+&#39;\n&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;5. Note the first call is for getting the suggested topics from cognitive api, and the second call is for getting an analysis on the caption of the image .&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;I verified it on a sample image url at&amp;nbsp;&lt;a href=&quot;https://cdn1.getyourguide.com/niwziy2l9cvz/1QSurmYr9OmqaMOcOYysq4/1a330fafe9e96da25259c5f004756f36/rome-Vatican-Museum-1112x630.jpg&quot;&gt;https://cdn1.getyourguide.com/niwziy2l9cvz/1QSurmYr9OmqaMOcOYysq4/1a330fafe9e96da25259c5f004756f36/rome-Vatican-Museum-1112x630.jpg&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSILNuNs2lnDT400c1SWG-YYOkLioNWbX7wcRkD28d5FfiVfllnir5uhQecJ3cVRQphCDta5J9YMhQSKQTbrXSs1_e-JvcB9k1B8ifE2L2kUIOLobKALATNd0u3yQ3Iltjb0zCOKFHkSY/s1600/rome.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSILNuNs2lnDT400c1SWG-YYOkLioNWbX7wcRkD28d5FfiVfllnir5uhQecJ3cVRQphCDta5J9YMhQSKQTbrXSs1_e-JvcB9k1B8ifE2L2kUIOLobKALATNd0u3yQ3Iltjb0zCOKFHkSY/s320/rome.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
First impression for a human eye will be what?&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;Execution time&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
This is a group of people standing in front of a building and watching an object. Sounds reasonable for me. When I executed the following script I was amazed to see the analysis.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; dir=&quot;rtl&quot; style=&quot;text-align: right;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;var crmtest = require(&#39;./crmtest.js&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;//Suggest topics in preview image&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-----Suggest Topics in generated file preview----------------&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;response = crmtest.suggesttopicsinimage(&quot;&amp;lt;&amp;lt;image url&amp;gt;&amp;gt;&quot;, &quot;&amp;lt;&amp;lt;cognitive api key&amp;gt;&amp;gt;&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(response+&#39;\n&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;//Analyze preview image&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-----------Analyze the generated file preview----------------&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(&quot;-------------------------------------------------------------&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;response = crmtest.analyzeimage(&quot;&amp;lt;&amp;lt;image url&amp;gt;&amp;gt;&quot;, &quot;&amp;lt;&amp;lt;cognitive api key&amp;gt;&amp;gt;&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;console.log(response+&#39;\n&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;Here is the output&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-----Suggest Topics in generated file preview----------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: outdoor&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: road&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: building&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: street&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: front&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: large&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: man&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: riding&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: walking&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: people&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: sidewalk&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: city&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: standing&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: table&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: group&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: bus&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: train&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: holding&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: air&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: parked&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: board&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: track&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: trick&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: doing&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Topic Name: white&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-----------Analyze the generated file preview----------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Category: building_&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Confidence Value: 0.38671875&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Category: others_&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Confidence Value: 0.0078125&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Category: outdoor_&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Confidence Value: 0.01953125&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
Whoever eager to contribute to this framework, please note the github link for the develop branch is at&amp;nbsp;&lt;a href=&quot;https://github.com/Nabarun/CrmTest/tree/develop&quot;&gt;https://github.com/Nabarun/CrmTest/tree/develop&lt;/a&gt;. Will really look forward for innovative enthusiast for contribution.&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;Life is not accumulation, it is about contribution.-&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;Stephen Covey&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;&quot; /&gt;
Continued at&amp;nbsp;&lt;a href=&quot;http://nabaruns.blogspot.com/2016/04/salesforce-rendition-microsoft.html&quot;&gt;http://nabaruns.blogspot.com/2016/04/salesforce-rendition-microsoft.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/7735531690722583741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2016/04/salesforce-content-microsoft-cognitive.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/7735531690722583741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/7735531690722583741'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2016/04/salesforce-content-microsoft-cognitive.html' title='Salesforce Content + Microsoft Cognitive API = Happy Customers :)'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSILNuNs2lnDT400c1SWG-YYOkLioNWbX7wcRkD28d5FfiVfllnir5uhQecJ3cVRQphCDta5J9YMhQSKQTbrXSs1_e-JvcB9k1B8ifE2L2kUIOLobKALATNd0u3yQ3Iltjb0zCOKFHkSY/s72-c/rome.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-6763364815095504863</id><published>2015-08-07T15:15:00.000-07:00</published><updated>2015-08-07T15:15:34.906-07:00</updated><title type='text'>Observer desgin pattern in Service Fabric Actor</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;First of all I want to thank Service Fabric Team to help me
overcome and understand the actor logic with clarity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;In this blog I aim to create an Observer design Pattern of a
real world sample using Service Fabric as a backbone. Apart from reliable
service creation Service fabric also allows an author to create actor
instances. Details are at &lt;/span&gt;&lt;a href=&quot;https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-actors-get-started/&quot;&gt;&lt;span style=&quot;color: #0563c1; font-family: Calibri;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;.
These actors can be imagines as entities with specific business logic. These
have proven to be fast and highly reliable in gaming solutions where response
is the prime factor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Today we are going to discuss of a widely used design
pattern - Observer pattern in Service Fabric Actor to accomplish a threat
analyzer for our test framework.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span class=&quot;Heading1Char&quot;&gt;&lt;span style=&quot;font-size: 16pt; line-height: 107%;&quot;&gt;&lt;span style=&quot;color: #2e74b5;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light;&quot;&gt;Problem Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Every company big or small emphasizes on testing frameworks.
Usually these are typical dashboard based web solution which have compute role scheduling
and triggering tests, monitoring them while they execute and storing the result
in database. Test Dashboard shows a report view of the stored data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;We have often come across statements like &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;How many tests are failing due to infra issue?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;How many tests are failing due to real code issue?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;What are the Azure Infra Issue type? etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;In my case we have a parser which goes and reads the
database and do the bucketing based on different regex expressions. The
challenge was the service was not reliable. This include service failures,
connectivity issues etc. for our analyzer system, so we thought to try out
Service Fabric and create a reliable service which will not only help us bucket
the issue types but also will help us maintain the state for later analysis
through dashboard. This was the time when we started going through service
fabric actor model. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;We heavily rely on Observer design pattern for our service.
The intent was all the different issue types will be listening to a subject.
The subject will at an interval of 30 min or so will query the database and
push the list to all the observers. Based on issue type observers will add the
object to itself.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;When we tried to visualize this with Service Fabric, we had a
picture which is described below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiizbtTq-60CEbmlXdcU5iw1i0fGH0uvfAHAG6yS6vZWaksyUK4mnPf6nXfcmt2q9BSStHYbqUYlqoL2LaHI2cWOTAKosm5F3tXdZ-I2XjAKmzOdTbdZ78sUOkhiSX4u0u8SKPLwLU7jto/s1600/obs1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;441&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiizbtTq-60CEbmlXdcU5iw1i0fGH0uvfAHAG6yS6vZWaksyUK4mnPf6nXfcmt2q9BSStHYbqUYlqoL2LaHI2cWOTAKosm5F3tXdZ-I2XjAKmzOdTbdZ78sUOkhiSX4u0u8SKPLwLU7jto/s640/obs1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;In the above picture there is a stateless Fabric Actor which
is our subject which will talk to the database at an interval of 30 min, and
will push the objects to the observers. Observers will add the data based on
its exception type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Stateless Actor will push the data to the stateful actors,
which will maintain the state as a list of issues. (Refer to the diagram below)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKdnlU-JXwZGtJqO9dKoJuXJjrjhK-qAzY7MnXaVkkeRbY4cIn7BsyAn87pgIrD2ALHFILOiUFIQ2gEYHuweH1MHaPlj097rdhiv5ABRT05wPF9vcIhQ9G2FmS3L0TdfYdUQLMJKamXr0/s1600/obs2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;425&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKdnlU-JXwZGtJqO9dKoJuXJjrjhK-qAzY7MnXaVkkeRbY4cIn7BsyAn87pgIrD2ALHFILOiUFIQ2gEYHuweH1MHaPlj097rdhiv5ABRT05wPF9vcIhQ9G2FmS3L0TdfYdUQLMJKamXr0/s640/obs2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Later during analysis the user can directly call the actors
and get their corresponding data. (Refer to the pic below)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF0ZNYkeRRkmhKfX5ooC1ZAYMvanJiNCLz1eQpFjE8e8H3y8XobnWSPzOaHUiyjVlXS40kCZZVlsEO604a4DTPdF3u10TW5y0k_lFJfiziVxnI-950WbpRPlS4q4Mv_EFBrkD2wtcrEI8/s1600/obs3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;416&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF0ZNYkeRRkmhKfX5ooC1ZAYMvanJiNCLz1eQpFjE8e8H3y8XobnWSPzOaHUiyjVlXS40kCZZVlsEO604a4DTPdF3u10TW5y0k_lFJfiziVxnI-950WbpRPlS4q4Mv_EFBrkD2wtcrEI8/s640/obs3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1 style=&quot;margin: 12pt 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #2e74b5;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light;&quot;&gt;Coding Time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Now let’s deep dive into how an actor works. As per my
understanding author should keep these following things in mind. I will map the
pointers to my example for better clarification&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Create a Serializable class which the Actor
interface can call. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;In this case my class was &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;DataContract&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;DataMember&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; ExceptionMessage;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;DataMember&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; ExceptionType;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;DataMember&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; TestRunId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;DataMember&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; TestId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Define a Subject Interface. Following OOD for
implement to interface instead of concrete implementation, here is my ISubject
interface&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;interface&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ISubject&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IActor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #70ad47; font-family: Consolas; font-size: 9.5pt; mso-highlight: white; mso-themecolor: accent6;&quot;&gt;//Register Observer to Subject&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt; RegisterObserver(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; observer);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: #70ad47; font-family: Consolas; font-size: 9.5pt; mso-highlight: white; mso-themecolor: accent6;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: #70ad47; font-family: Consolas; font-size: 9.5pt; mso-highlight: white; mso-themecolor: accent6;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;//Remove Observer from Subject&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt; RemoveObserver(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; observer);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: #70ad47; font-family: Consolas; font-size: 9.5pt; mso-highlight: white; mso-themecolor: accent6;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;//Set the Observable class state&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt; SetState(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; state);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Define a Observer Interface&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;interface&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IActor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: #70ad47; font-family: Consolas; font-size: 9.5pt; mso-highlight: white; mso-themecolor: accent6;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;//Update the Observer object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt; Update(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; t);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Note: In both these interfaces we have
implemented IActor which makes them actor interface. One primary thing to keep
in mind is all the actor interfaces should return Task results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;The Stateless Observable class will implement
Actor and ISubject&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatObservable&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Actor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ISubject&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;5.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;For Stateful Observers here is the only
change we need to make from Actor point of view&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorService&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(Name=&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;AzureIssue&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;AzureInfraIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Actor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorService&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(Name=&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;MachineIssue&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;MachineIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Actor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorService&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(Name=&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;ProductIssue&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ProductIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Actor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorService&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(Name = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;TestIssue&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;TestIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Actor&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;IIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;6.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Now in your Service Code during initiation add
the different observers to the subject&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; Main(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;FabricRuntime&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; fabricRuntime = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;FabricRuntime&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;.Create())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;fabricRuntime.RegisterActor(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatObservable&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;fabricRuntime.RegisterActor(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;AzureInfraIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;fabricRuntime.RegisterActor(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;MachineIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;fabricRuntime.RegisterActor(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ProductIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;fabricRuntime.RegisterActor(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;TestIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; machineIssue = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;MachineIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; testIssue = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;TestIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; codeIssue = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ProductIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; azureIssue = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;AzureInfraIssueObserver&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatObservable&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;
observable = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatObservable&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; registerMachine =
observable.RegisterObserver(machineIssue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; registerTest = observable.RegisterObserver(testIssue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; registerCode =
observable.RegisterObserver(codeIssue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; registerAzure =
observable.RegisterObserver(azureIssue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; (!registerMachine.Result ||
!registerAzure.Result || !registerTest.Result || !registerCode.Result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Trace&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;.WriteLine(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Registeration failed&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;.Sleep(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Timeout&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;.Infinite);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Exception&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorEventSource&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;.Current.ActorHostInitializationFailed(e);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;7.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;This is what needs to be done from Service point
of view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;8.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;I tested the service with the following client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; Main(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; proxy = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorProxy&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;.Create&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ISubject&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ActorId&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;ThreatObservable&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Uri&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;fabric:/ThreatObserverApplication/SubjectActorService&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; lstThreats = GetListOfThreats();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; result1 = proxy.SetState(lstThreats[0]).Result;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; result2 = proxy.SetState(lstThreats[1]).Result;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; result3 = proxy.SetState(lstThreats[2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; result4 = proxy.SetState(lstThreats[3]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;//Assert
all the results to true and verify&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt; GetListOfThreats()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; listThreats = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;listThreats.Add(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;() {ExceptionMessage
= &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Azure Storage Exception&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, ExceptionType = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Azure&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, TestRunId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;1234&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;,TestId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;2345&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;listThreats.Add(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;() {
ExceptionMessage = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Bad Machine
Exception&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, ExceptionType = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Machine&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;,
TestRunId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;1234&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, TestId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;2345&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; });&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;listThreats.Add(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;() {
ExceptionMessage = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Test Exception&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, ExceptionType = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Test&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, TestRunId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;1234&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, TestId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;2345&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; });&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;listThreats.Add(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ThreatState&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;() {
ExceptionMessage = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Code Exception&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, ExceptionType = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;Code&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, TestRunId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;1234&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;, TestId = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;2345&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; });&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; listThreats;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 8pt 0.5in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;That is it!! &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;As I wanted to keep this short, I wanted to focus on major
interactions of your code with service fabric actor model. If you want to know
more I have pushed a sample app at &lt;/span&gt;&lt;a href=&quot;https://github.com/Nabarun/ServiceFabricSample.git&quot;&gt;&lt;span style=&quot;color: #0563c1; font-family: Calibri;&quot;&gt;https://github.com/Nabarun/ServiceFabricSample.git&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;.
Let me know if there are any feedback or suggestion.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/6763364815095504863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/08/observer-desgin-pattern-in-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6763364815095504863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6763364815095504863'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/08/observer-desgin-pattern-in-service.html' title='Observer desgin pattern in Service Fabric Actor'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiizbtTq-60CEbmlXdcU5iw1i0fGH0uvfAHAG6yS6vZWaksyUK4mnPf6nXfcmt2q9BSStHYbqUYlqoL2LaHI2cWOTAKosm5F3tXdZ-I2XjAKmzOdTbdZ78sUOkhiSX4u0u8SKPLwLU7jto/s72-c/obs1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-6235663426730469668</id><published>2015-07-29T23:12:00.002-07:00</published><updated>2015-07-29T23:21:31.572-07:00</updated><title type='text'>Somebody clean my log container, it is growing exponentially</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Who has the time to keep a check of log container size. Nowadays most organization rely on cloud&amp;nbsp; services for storage and maintenance. One of the most common artifact which gets uploaded in these storage account is Logs.&lt;br /&gt;
&lt;br /&gt;
Let me give an example from my experience. I have seen teams using Azure blob storage for storing logs files, dumps, manifest files etc. During investigation these files are downloaded and rendered at user&#39;s box. Similarly alert traces go to Azure Table storage. &lt;br /&gt;
&lt;br /&gt;
Now who has the time and effort to keep a check on these storage capacity. I once wrote a simple powershell command which helped me to delete all artifacts older than 60 days as of that day. &lt;br /&gt;
&lt;br /&gt;
Cool! but after 2 months, here comes a mail from one team member saying he is not able to see the containers from CloudXplorer or Azure Explorer. &lt;br /&gt;
&lt;br /&gt;
What happened?? I forgot to rerun my script again and the container grew exponentially again.&lt;br /&gt;
&lt;br /&gt;
OK so now I added a task scheduler which will invoke my script on daily basis. &lt;br /&gt;
&lt;br /&gt;
After another 2-3 months later I got to see a similar mail from another team member. What happened this time? &lt;br /&gt;
&lt;br /&gt;
My machine got formatted because I wanted to deploy a new OS, and everything got deleted. Again I thought I&amp;nbsp;need to write the script and enable the task scheduler.&lt;br /&gt;
&lt;br /&gt;
But Wait!! What if my account stops working? What if again I format my machine?? &lt;br /&gt;
&lt;br /&gt;
It will not only be a re-work but also loss of time and effort. &lt;br /&gt;
&lt;br /&gt;
In a midst of confusion one of my team member told me why don&#39;t you write a stateless azure fabric service for this and deploy it on one of the azure cluster and forget about it?&lt;br /&gt;
&lt;br /&gt;
Cool! why did not I think about this....&lt;br /&gt;
&lt;br /&gt;
So I started writing this service. Problem statement was delete azure container and azure table which are 60 days older, so Ideally the service will trigger itself once in a day and find out all the container and table older than 60 days and delete it.&lt;br /&gt;
&lt;br /&gt;
Now comes designing of this app. There are 2 actions performed by this service DeleteAzure container and Delete Azure Table. Both depends on time limit of 60 days. The user can also delete a Azure Table or Azure Container by its name. &lt;br /&gt;
&lt;br /&gt;
As per me this resembled a Strategy design pattern. Following is a simple conceptual diagram&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjedkvUz1pGLNRh3f65zae62a1Gbh_jJO-O2tTgcYFCe_kluPRUjpGKrkWHFrN7LhYKkx29IegUO92uEFfR6zO8vZiDLeF_SxBxAOGOpVb1_0vHRDGNDU4B2mx9MVTlokDkdott1mTe624/s1600/stateless.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;316&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjedkvUz1pGLNRh3f65zae62a1Gbh_jJO-O2tTgcYFCe_kluPRUjpGKrkWHFrN7LhYKkx29IegUO92uEFfR6zO8vZiDLeF_SxBxAOGOpVb1_0vHRDGNDU4B2mx9MVTlokDkdott1mTe624/s400/stateless.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Now I hope I will never ever get any issues for cloud storage clean :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/6235663426730469668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/07/somebody-clean-my-log-container-it-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6235663426730469668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6235663426730469668'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/07/somebody-clean-my-log-container-it-is.html' title='Somebody clean my log container, it is growing exponentially'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjedkvUz1pGLNRh3f65zae62a1Gbh_jJO-O2tTgcYFCe_kluPRUjpGKrkWHFrN7LhYKkx29IegUO92uEFfR6zO8vZiDLeF_SxBxAOGOpVb1_0vHRDGNDU4B2mx9MVTlokDkdott1mTe624/s72-c/stateless.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-2755816238304869361</id><published>2015-07-11T14:25:00.004-07:00</published><updated>2015-07-11T14:33:41.578-07:00</updated><title type='text'>Does my organization need AzureServiceFabric?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF2OwnHnfzepn8rUEm_v3ClrVvanlyygXecheYtoWqQh_0VoBDVWI1QjSTdDpzxjujNlTbsA8eHZr7lbJ55IyZU8FXt-90-DYpscsNk88vcmAfwwq2OmtIobOa6C2PeH6JPgnYqisr1lw/s1600/back.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF2OwnHnfzepn8rUEm_v3ClrVvanlyygXecheYtoWqQh_0VoBDVWI1QjSTdDpzxjujNlTbsA8eHZr7lbJ55IyZU8FXt-90-DYpscsNk88vcmAfwwq2OmtIobOa6C2PeH6JPgnYqisr1lw/s400/back.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;a href=&quot;http://azure.microsoft.com/en-us/documentation/services/service-fabric/&quot;&gt;&lt;span style=&quot;color: #0563c1; font-family: Calibri;&quot;&gt;Azure
Service Fabric&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; is a technology to provide high reliable
stateful/stateless/stateful persisted services. In this blog I want to relate
few of the solution which helped me envisage answers for simple day to day
problem at work. Microsoft is trying to promote this service currently for both
private and public clouds. In Open networking summit of 2015 Azure chief
Technology officer Mark Russinovich presented the roadmap of this service which
encompasses future release support for Linux and Java containers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Support for Java can open horizon of comparison between
existing technologies prevailing in distributed computing field. Based on same
Leader Election and Replication concept, technologies like Hadoop, HDFS, Zoo
Keeper already dominate the space. Deep Diving into Azure Service Fabric pops
out many similar concepts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h1 style=&quot;margin: 12pt 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #2e74b5;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light;&quot;&gt;Similarity with existing technologies&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;h2 style=&quot;margin: 2pt 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #2e74b5;&quot;&gt;&lt;span style=&quot;mso-bidi-font-family: &amp;quot;Calibri Light&amp;quot;; mso-bidi-theme-font: major-latin; mso-fareast-font-family: &amp;quot;Calibri Light&amp;quot;; mso-fareast-theme-font: major-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light; font-size: medium;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light;&quot;&gt;Data locality in Hadoop = Hot data in Azure
Service Fabric (ASA)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Hadoop is having this concept of Data Locality where it
tries to co-locate the data with the compute nodes, so data access is faster.
This is the reason for it good performance and which makes it at the heart of
data computing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Azure Service Fabric term the local data as hot data (ref: &lt;/span&gt;&lt;a href=&quot;https://azure.microsoft.com/en-us/documentation/articles/service-fabric-application-scenarios/&quot;&gt;&lt;span style=&quot;color: #0563c1; font-family: Calibri;&quot;&gt;link&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;).
The intent of this is same high performance. These hot data features are
provided by Reliable actors or Reliable services. Service Fabric replicates the
data to other instances for data reliability.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;This concept of hot data is also debatable as some say it is
good to have this for higher performance and in some guidelines it is not
preferred. Let me point to the &lt;/span&gt;&lt;a href=&quot;http://docs.cloudfoundry.org/devguide/deploy-apps/prepare-to-deploy.html&quot;&gt;&lt;span style=&quot;color: #0563c1; font-family: Calibri;&quot;&gt;link&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;
at Cloud foundry. Cloud Foundry avoids writing to local file system primarily
because the disk might be taken. It always suggest you to go with Cold Data
which can be stored in external storage. Again it depends on the architecture
and design of replication implemented. Discussion on this might be another blog
of comparison.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Organization which are new to big data analysis, which is
thinking around the terms of hot and cold data might want to leverage Azure
service Fabric for their requirement. Here Cold data is termed as that set of
data that can be stored into external storage like database, or storage
containers for future reference. Here going with Hadoop or small micro-service
on ASA is a point of debate. It depends on what is the business need. If you
are a c# guy your best bet is to try ASA.&lt;/span&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2 style=&quot;margin: 2pt 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #2e74b5;&quot;&gt;&lt;span style=&quot;mso-bidi-font-family: &amp;quot;Calibri Light&amp;quot;; mso-bidi-theme-font: major-latin; mso-fareast-font-family: &amp;quot;Calibri Light&amp;quot;; mso-fareast-theme-font: major-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light; font-size: medium;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light;&quot;&gt;Reliable Application development using Zookeeper
in Hadoop or Reliable Service/Actors in ASA&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Zookeeper is about building general distributed
applications. It is also termed as Hadoop’ distributed coordination system.
Zookeeper deals with some common terminologies in distributed computing world-
Distributed Queues, Distributed Locks and leader election. At Yahoo, Zookeeper
has been benchmarked at over 10000 operation per seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Azure Service Fabric comes up with a similar feature which
it calls as Reliable Service and Reliable Actors. Reliable Services/Actors
offers reliable data structures like Reliable dictionaries and Reliable Queues.
These are based on same replication concepts. One can create an application and
define x number of partition, each partition may have n number of replicas
which fulfil the purpose. Hot data in Service Fabric Cluster get replicated
across other instances for high reliability.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Here Zookeeper is having an advantage over ServiceFabric and
that is termed as HBase. Hbase which is based on ZooKeeper has proved its
ability to geo replicate. Microsoft on other hand has still not mentioned
anything about geo replication in Service Fabric.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Organization can really leverage the reliable data structures
provided by Service Fabric. One simple implementation that I envisage is
machine management where in organizations are having huge number of machines
and bucketing them in different scenarios like health, test failures, suspicious
activities can easily be done using reliable dictionaries. Reliable Queues on
other hand can provide a good implementation of priority queues. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h1 style=&quot;margin: 12pt 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #2e74b5;&quot;&gt;&lt;span style=&quot;font-family: Calibri Light;&quot;&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 8pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Still Service Fabric is in its infancy and this blog needs a
lot of meat, but this is a start. Compared to Hadoop a huge opportunity lies in
terms of feature development in ASA. Once Microsoft decides to release this in
Java and Linux containers it will open more opportunities to explore. As
reported this is also a back bone for some of upcoming technologies Microsoft
plan to release like Cortana along with existing technologies like Skype,
Intune and Azure SQL, so this will encourage developers to create real time,
high reliable applications. The intent is to provide a one button solution for
all the needs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/2755816238304869361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/07/does-my-organization-need.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2755816238304869361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2755816238304869361'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/07/does-my-organization-need.html' title='Does my organization need AzureServiceFabric?'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF2OwnHnfzepn8rUEm_v3ClrVvanlyygXecheYtoWqQh_0VoBDVWI1QjSTdDpzxjujNlTbsA8eHZr7lbJ55IyZU8FXt-90-DYpscsNk88vcmAfwwq2OmtIobOa6C2PeH6JPgnYqisr1lw/s72-c/back.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-6120009425861872800</id><published>2015-06-24T16:51:00.002-07:00</published><updated>2015-06-24T16:51:28.628-07:00</updated><title type='text'>3 lines of Node.JS code to run a Web Server on ServiceFabric</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Since Service Fabric got publically released we saw many enthusiasts trying creating their apps with this. One of the proven strong case study is having a website hosted on Service Fabric. &lt;br /&gt;
&lt;br /&gt;
If one goes through the documentation of Service Fabric he/she will find the tutorial on OWIN hosted webapp at &lt;a href=&quot;https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-services-communication-webapi/&quot;&gt;https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-services-communication-webapi/&lt;/a&gt;. This is pretty descriptive and explains how quickly you can host a website on Service fabric.&lt;br /&gt;
&lt;br /&gt;
I started this blog taking reference of this tutorial. The intent was to reduce the code and try to come up with a story around this. This was the time when I thought to see if we can figure out something with Node.JS. My early experience with Node.Js was pretty exciting wherein we created a Azure Mobile Service pinger to Service fabric Cluster. &lt;a href=&quot;http://nabaruns.blogspot.com/2015/05/azure-mobile-service-service-fabric.html&quot;&gt;http://nabaruns.blogspot.com/2015/05/azure-mobile-service-service-fabric.html&lt;/a&gt;. The only challenge was how to call Node.JS script from C#.&lt;br /&gt;
&lt;br /&gt;
With a little bit of research I found that this issue has been solved by Tomasz Janczuk. Acknowledging Tomasz let me now touch a little bit of Edge.JS. &lt;br /&gt;
&lt;br /&gt;
Edge.JS GIT: &lt;a href=&quot;https://github.com/tjanczuk/edge&quot;&gt;https://github.com/tjanczuk/edge&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Pre-requisite&lt;/strong&gt; of this exercise is you have Node.JS and Service Fabric installed in your machine.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Step By Step : How to create a web host from Service Fabric&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
1. In my example I have created a Stateful Service Fabric Service. Stateful is just by choice as I plan to explore some more stuff with Node.JS and at a later stage have a stateful story around that. You can start with stateless or actor services too&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDHRCkprept0uu5m39au55_XuVk6xqoPs75ePX2hXsh21tUc-3DrKdbCI7DeWhJaWZ8gkEa4wc51g_4fY-ZFw5cno6WT0Az_vKQGUh5F0NPDsorXU-iAaq2ZRI2K-m6YlfOh8LRd_ymsM/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDHRCkprept0uu5m39au55_XuVk6xqoPs75ePX2hXsh21tUc-3DrKdbCI7DeWhJaWZ8gkEa4wc51g_4fY-ZFw5cno6WT0Az_vKQGUh5F0NPDsorXU-iAaq2ZRI2K-m6YlfOh8LRd_ymsM/s400/1.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
2. Install the Nuget package of Edge.js from NPM (Tools -&amp;gt; Nuget Package Manager)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8nvLtOmPIJP-i2P9eGz5zr1ObIKQAtbQsocdubBR0TgQjjfTo4aC4_QAhouKKVeYYDL9LAbZ8XqWja-ZKIlGszYVUCA26NVyhwEC0mdmgRiWtXZj1oWMyydPRZb-OaTttX-xHuSdcpSY/s1600/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8nvLtOmPIJP-i2P9eGz5zr1ObIKQAtbQsocdubBR0TgQjjfTo4aC4_QAhouKKVeYYDL9LAbZ8XqWja-ZKIlGszYVUCA26NVyhwEC0mdmgRiWtXZj1oWMyydPRZb-OaTttX-xHuSdcpSY/s400/2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
3. Now let&#39;s write our 3 line code for creating the webserver &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (FabricRuntime fabricRuntime = FabricRuntime.Create())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt; // This is the name of the ServiceType that is registered with FabricRuntime. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This name must match the name defined in the ServiceManifest. If you change&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this name, please change the name of the ServiceType in the ServiceManifest.&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fabricRuntime.RegisterServiceType(&quot;WebHostStaefulSFType&quot;, typeof(WebHostStaefulSF));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceEventSource.Current.ServiceTypeRegistered(Process.GetCurrentProcess().Id, typeof(WebHostStaefulSF).Name);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;CallWebServer(&quot;Thanks for creating this server&quot;).Wait();&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.Sleep(Timeout.Infinite);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceEventSource.Current.ServiceHostInitializationFailed(e);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;private async static Task CallWebServer(string greeting)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const string jSFunction = &quot;return function createServer (data, callback){ var http = require(\&quot;http\&quot;);&amp;nbsp; var server = http.createServer(function(request, response) { response.write(\&quot;Hello World!\&quot;); response.end();});server.listen(8081);}&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var func = Edge.Func(jSFunction);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteLine(await func(greeting));&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;That&#39;s it. That is what we need to spawn a http web server using node.js&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As per my understanding, from Service Fabric point of view it does not care how the web server is hosted. Here it just considers the Primary replica is ready or not. Once ready it executes the code. &lt;br /&gt;
&lt;br /&gt;
It will be great to know other views on this.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/6120009425861872800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/06/3-lines-of-nodejs-code-to-run-web.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6120009425861872800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/6120009425861872800'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/06/3-lines-of-nodejs-code-to-run-web.html' title='3 lines of Node.JS code to run a Web Server on ServiceFabric'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDHRCkprept0uu5m39au55_XuVk6xqoPs75ePX2hXsh21tUc-3DrKdbCI7DeWhJaWZ8gkEa4wc51g_4fY-ZFw5cno6WT0Az_vKQGUh5F0NPDsorXU-iAaq2ZRI2K-m6YlfOh8LRd_ymsM/s72-c/1.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-2520013195929757005</id><published>2015-05-14T02:02:00.003-07:00</published><updated>2015-05-14T11:33:29.563-07:00</updated><title type='text'>Azure Mobile Service + Service Fabric = Easy Monitoring </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I want to thank all my readers who appreciated my previous blogs on Service Fabric. It is indeed a motivation which drives an tech-enthusiast like me. While driving home, I was thinking of my next blog, when all of a sudden I remembered of a POC which involved Service Fabric Rest API and Azure Mobile Service.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Intent of the POC&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
The intent of POC was to create a quick efficient way of monitoring Service Fabric cluster without writing tons of code and making things complex. The POC ask was from a client who wanted a feasible solution to monitor his Service Fabric Cluster. The ETA for this was decided to be 7 days, but believe me the first POC was ready by end of second day.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Why Azure Mobile Service?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Azure Mobile Service is an awesome tool for developers who want to write lightweight services, which runs continuously without incurring much effort and cost. I was aware of AMS as I wrote couple of scripts interacting with facebook api and Linkedin in past. (If interested, you can take a look into my netme blog). I thought it will be efficient if the same scripts are used for Service Fabric monitoring. As Service Fabric was exposing REST APIs , it was easy to perform a call from AMS and output the result into Azure Table Storage. A MVC app was created to read the Azure Table storage and show the output in a graphical chart.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Acknowledgement&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
I want to acknowledge Balaji who mentored me through out this process and made the simple blatant script turn out to be a generic utility.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Let&#39;s get our hands dirty&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Before starting the problem statement was broken down to major 2 chunks&lt;br /&gt;
1. Do Rest API calls to Service Fabric&lt;br /&gt;
2. Store the output in table storage&lt;br /&gt;
&lt;br /&gt;
Performing above 2 operations were pretty simple as AMS provide 2 Node.JS packages&lt;br /&gt;
a. azure&lt;br /&gt;
b. request&lt;br /&gt;
&lt;br /&gt;
If you are new to Node.Js no issues, following script section will help one understand what is the usage for them&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pre-requisite&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ensure that the Http gateway is enabled in Service Fabric Cluster. This will be a section in Cluster Manifest&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;Section Name=&quot;HttpGateway&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Parameter Name=&quot;IsEnabled&quot; Value=&quot;true&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/Section&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Also in your ServiceDefinition.csdef under Endpoints, we should have an endpoint for HttpGateway&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;InputEndpoint name=&quot;HttpGatewayListenAddress&quot; protocol=&quot;http&quot; port=&quot;19007&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;In my case the endpoint port is 19007&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Do Rest API calls to Service Fabric&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Service Fabric provides multiple REST Apis which are documented at&amp;nbsp;https://msdn.microsoft.com/library/azure/dn707692.aspx&lt;br /&gt;
&lt;br /&gt;
For this POC we will discuss few of them&lt;br /&gt;
&lt;br /&gt;
1. In order to start with the POC first we need to create a AMS service&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEHS7ja1qX3Xhm6Jl_PYM9Mf8FZN9U_9ihVj0OeDaGLQe7HZYV9ZiKsprMhGBC3nv-9SpoXwhOAUJYrDuZnjlzjcqD5Drprv8TWWlvwnne5Ovq7Ued473MywGJpnMA1-brgFUof5iVMlA/s1600/ams1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEHS7ja1qX3Xhm6Jl_PYM9Mf8FZN9U_9ihVj0OeDaGLQe7HZYV9ZiKsprMhGBC3nv-9SpoXwhOAUJYrDuZnjlzjcqD5Drprv8TWWlvwnne5Ovq7Ued473MywGJpnMA1-brgFUof5iVMlA/s400/ams1.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
2. Once the mobile service is created one should go to the Scheduler section and create a new job&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfCcQD3iurXKVgMwcykgUr_ehaJ9SZxh98y91eHm7TWrFpqe3x_K1UI88jAB7eHNGyIlFJZncg3mB8_jJF9xi-bxO0Z9pktBfNs5krvPZUOCG88KqTz-z9iTGlHDLy-crPckawicTGghg/s1600/ams2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfCcQD3iurXKVgMwcykgUr_ehaJ9SZxh98y91eHm7TWrFpqe3x_K1UI88jAB7eHNGyIlFJZncg3mB8_jJF9xi-bxO0Z9pktBfNs5krvPZUOCG88KqTz-z9iTGlHDLy-crPckawicTGghg/s400/ams2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3. Once the scheduler job is created one can click the AMS scheduler job and go to the Scheduler section, where we will get an area to write our script&lt;br /&gt;
&lt;br /&gt;
4. &amp;nbsp;Once the job is created one will see an empty function with the job name. Consider this to be the first entry point to the script. As my job name is smurfjob , I got a function name with the same name&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function smurfjob() &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&lt;span style=&quot;color: red;&quot;&gt;&quot;Starting My App Monitor&quot;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&lt;span style=&quot;color: red;&quot;&gt;&quot;This will monitor Node, Application, App Services , Sestem Services, Partition and Replica&quot;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var dataTypes = [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;&quot;Node&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &lt;span style=&quot;color: red;&quot;&gt;&quot;Application&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &lt;span style=&quot;color: red;&quot;&gt;&quot;AppServices&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &lt;span style=&quot;color: red;&quot;&gt;&quot;SystemServices&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &lt;span style=&quot;color: red;&quot;&gt;&quot;Partition&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &lt;span style=&quot;color: red;&quot;&gt;&quot;Replica&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dataTypes.forEach(getData);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As mentioned in the above log statements we are going to monitor Service Fabric Node, Application, Application Services, System Services, Partition and Replica&lt;br /&gt;
&lt;br /&gt;
5. Our next module will be saying what is the input and what should be the output. For instance if input is AppServices, it should go to MyAppCurrTable storage table&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function &lt;/span&gt;getData(dataType, index, array) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dataType == &lt;span style=&quot;color: red;&quot;&gt;&quot;Node&quot;&lt;/span&gt;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getNodesData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else if (dataType == &lt;span style=&quot;color: red;&quot;&gt;&quot;Application&quot;&lt;/span&gt;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getApplicationData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else if (dataType == &lt;span style=&quot;color: red;&quot;&gt;&quot;SystemServices&quot;&lt;/span&gt;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fetchAndUpdateServicesDataForAppName(&lt;span style=&quot;color: red;&quot;&gt;&quot;System&quot;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;AppServices&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getChildDataForParent(&lt;span style=&quot;color: red;&quot;&gt;&quot;MyAppCurrTable&quot;&lt;/span&gt;, fetchAndUpdateServicesData);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;Partition&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getChildDataForParent(&lt;span style=&quot;color: red;&quot;&gt;&quot;MySvcCurrTable&quot;&lt;/span&gt;, fetchAndUpdatePartitionData);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;Replica&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getChildDataForParent(&lt;span style=&quot;color: red;&quot;&gt;&quot;MyPrtnCurrTable&quot;&lt;/span&gt;, fetchAndUpdateReplicaData);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
6. Now let&#39;s have the modules for different datatypes&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Nodes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let me now take a single module and explain what we want&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function &lt;/span&gt;getNodesData() {&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp; &amp;nbsp; //Import the request node.js and azure node.js module&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var &lt;/span&gt;req = require(&lt;span style=&quot;color: red;&quot;&gt;&#39;request&#39;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var &lt;/span&gt;azure = require(&lt;span style=&quot;color: red;&quot;&gt;&#39;azure&#39;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp; &amp;nbsp; // Url for fetching the Node Data&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var &lt;/span&gt;nodeUrlToMonitor = &lt;span style=&quot;color: red;&quot;&gt;&quot;http://serviceFabricClusterName.cloudapp.net:19007/Nodes?api-version=1.0&quot;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; console.log(&lt;span style=&quot;color: red;&quot;&gt;&quot;Url to Monitor&quot;&lt;/span&gt; + urlToMonitor);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #38761d;&quot;&gt;// fetch Node data&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; req.get({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; uri:urlToMonitor,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeout : 200000,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; headers:{&#39;content-type&#39;: &#39;application/x-www-form-urlencoded&#39;},&lt;br /&gt;
&amp;nbsp; &amp;nbsp;},&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function (error, response, body) {&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp;//This is where we fetch the response body&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error &amp;amp;&amp;amp; response.statusCode == 200) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Parse the json body&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var items = JSON.parse(body);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Now create the azure storage Table&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var tableService = azure.createTableService(&quot;azure storage account name&quot;, &quot;azure storage account key&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tableService.createTableIfNotExists(TableName, function (error) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #38761d;&quot;&gt;//Parse the items in json and insert them in Azure Table Storage&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableService.insertEntity( parse relevant info)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;CreateTableIfNotExists for &quot; + currentTableName + &quot; returned error: &quot; + error);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;ERROR: GET &quot; + urlToMonitor + &quot; returned error: &quot; + error + &quot;and statusCode &quot; + response.statusCode);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;})&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Hope in the above section we got the actual intent of the idea mentioned earlier. Following is a snapshot of tabular structure of Application service&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 704px;&quot;&gt;
 &lt;colgroup&gt;&lt;col span=&quot;11&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt; width: 48pt;&quot; width=&quot;64&quot;&gt;PartitionKey&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;RowKey&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;ServiceKind&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;Name&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;TypeName&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;ManifestVersion&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;HasPersistedState&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;HealthState&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;ServiceStatus&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;IsServiceGroup&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;AppName&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;System_ClusterManagerService&lt;/td&gt;
  &lt;td&gt;5VbGMVNM2EZ7NFYu81gAfO&lt;/td&gt;
  &lt;td&gt;Stateful&lt;/td&gt;
  &lt;td&gt;fabric:/System/ClusterManagerService&lt;/td&gt;
  &lt;td&gt;ClusterManagerServiceType&lt;/td&gt;
  &lt;td&gt;4.0.99.9490&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;TRUE&lt;/td&gt;
  &lt;td&gt;Ok&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;System&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;System_FailoverManagerService&lt;/td&gt;
  &lt;td&gt;GSc38KxoFFXFThEJbP+vQ0&lt;/td&gt;
  &lt;td&gt;Stateful&lt;/td&gt;
  &lt;td&gt;fabric:/System/FailoverManagerService&lt;/td&gt;
  &lt;td&gt;FMServiceType&lt;/td&gt;
  &lt;td&gt;4.0.99.9490&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;TRUE&lt;/td&gt;
  &lt;td&gt;Ok&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;System&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;System_ImageStoreService&lt;/td&gt;
  &lt;td&gt;YcPTmeiqsR0Vh33CpC+7nC&lt;/td&gt;
  &lt;td&gt;Stateful&lt;/td&gt;
  &lt;td&gt;fabric:/System/ImageStoreService&lt;/td&gt;
  &lt;td&gt;FileStoreServiceType&lt;/td&gt;
  &lt;td&gt;4.0.99.9490&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;TRUE&lt;/td&gt;
  &lt;td&gt;Ok&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;System&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;System_InfrastructureService&lt;/td&gt;
  &lt;td&gt;uEvwax1amAIoal0LvoRL0y&lt;/td&gt;
  &lt;td&gt;Stateful&lt;/td&gt;
  &lt;td&gt;fabric:/System/InfrastructureService&lt;/td&gt;
  &lt;td&gt;InfrastructureServiceType&lt;/td&gt;
  &lt;td&gt;4.0.99.9490&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;Ok&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;System&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;System_NamingService&lt;/td&gt;
  &lt;td&gt;x+vT3v9YgNundefinedYvZJPgbTKvo&lt;/td&gt;
  &lt;td&gt;Stateful&lt;/td&gt;
  &lt;td&gt;fabric:/System/NamingService&lt;/td&gt;
  &lt;td&gt;NamingStoreService&lt;/td&gt;
  &lt;td&gt;4.0.99.9490&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;TRUE&lt;/td&gt;
  &lt;td&gt;Ok&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;System&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;System_RepairManagerService&lt;/td&gt;
  &lt;td&gt;1bj5zeS2ReeKwbPVSQ1dOE&lt;/td&gt;
  &lt;td&gt;Stateful&lt;/td&gt;
  &lt;td&gt;fabric:/System/RepairManagerService&lt;/td&gt;
  &lt;td&gt;RepairManagerServiceType&lt;/td&gt;
  &lt;td&gt;4.0.99.9490&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;TRUE&lt;/td&gt;
  &lt;td&gt;Ok&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;center&quot;&gt;FALSE&lt;/td&gt;
  &lt;td&gt;System&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
Now one can easily create a MVC app or use PowerBI to read this data , and create a simple dashboard&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
7. Once all this is done you can save the script and enable it. AMS will act as a background task manager script, and will keep uploading the results as required&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is the full Azure Mobile Script&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function smurfjob() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;Starting My App Monitor&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;This will monitor Node, Application, App Services , Sestem Services, Partition and Replica&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var dataTypes = [&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Node&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Application&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;AppServices&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;SystemServices&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Partition&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Replica&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; dataTypes.forEach(getData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function getData(dataType, index, array) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; if (dataType == &quot;Node&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getNodesData();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;Application&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getApplicationData();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;SystemServices&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fetchAndUpdateServicesDataForAppName(&quot;System&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;AppServices&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getChildDataForParent(&quot;MyAppCurrTable&quot;, fetchAndUpdateServicesData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;Partition&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getChildDataForParent(&quot;MySvcCurrTable&quot;, fetchAndUpdatePartitionData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; } else if (dataType == &quot;Replica&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getChildDataForParent(&quot;MyPrtnCurrTable&quot;, fetchAndUpdateReplicaData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function getNodesData() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var req = require(&#39;request&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var nodeUrlToMonitor = &quot;http://servicefabricname.cloudapp.net:19007/Nodes?api-version=1.0&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var nodeHistoryTableName = &quot;NodeHistoryTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var nodeCurrentTableName = &quot;NodeCurrentTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var nodeEventsTableName = &quot;NodeEventsTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var nodePrimaryKeyName = &quot;Name&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdate(&quot;Node&quot;, nodeUrlToMonitor, nodePrimaryKeyName, nodeCurrentTableName, nodeEventsTableName, nodeHistoryTableName, 15, null);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function getApplicationData() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var req = require(&#39;request&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var appCurrentTableName = &quot;MyAppCurrTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var appEventsTableName = &quot;MyAppAppEventsTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var appHistoryTableName = &quot;MyAppAppHistoryTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var applicationURL = &quot;http://servicefabricname.cloudapp.net:19007/Applications?api-version=1.0&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var appPrimaryKeyName = &quot;Id&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdate(&quot;Application&quot;, applicationURL, appPrimaryKeyName, appCurrentTableName, appEventsTableName, appHistoryTableName, 15, null);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function getChildDataForParent(parentTableName, fetchAndUpdateChildData) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var tableService = azure.createTableService(&quot;storageaccountname&quot;, &quot;storageaccountkey&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var getMatchingEntities = azure.TableQuery&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; .select()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; .from(parentTableName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; tableService.queryEntities(getMatchingEntities, function (error, entities) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entities.forEach(fetchAndUpdateChildData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;ERROR: queryEntities in &quot; + parentTableName + &quot; returned error &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdateServicesData(item, index, array) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdateServicesDataForAppName(item.PartitionKey);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdateServicesDataForAppName(appName) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var svcCurrentTableName = &quot;MySvcCurrTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var svcEventsTableName = &quot;MyAppSvcEventsTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var svcHistoryTableName = &quot;MyAppSvcHistoryTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var serviceURL = &quot;http://servicefabricname.cloudapp.net:19007/Applications/&quot; + appName + &quot;/$/GetServices?api-version=1.0&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var svcPrimaryKeyName = &quot;Id&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var additionalData = {&quot;AppName&quot;: appName};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; console.log(&quot;Fetching svc data for app &quot; + appName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdate(&quot;Service&quot;, serviceURL, svcPrimaryKeyName, svcCurrentTableName, svcEventsTableName, svcHistoryTableName, 15, additionalData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdatePartitionData(item, index, array) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var svcName = item.PartitionKey.toString();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var appName = item.AppName;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdatePartitionDataForServiceName(appName, svcName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdatePartitionDataForServiceName(appName, svcName) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var prtnCurrentTableName = &quot;MyPrtnCurrTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var prtnEventsTableName = &quot;MyAppPrtnEventsTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var prtnHistoryTableName = &quot;MyAppPrtnHistoryTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var updatedSvcName = svcName.toString().replace(&#39;_&#39;, &#39;/&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; console.log(&quot;Fetching partition data for app &quot; + appName + &quot; and svc &quot; + updatedSvcName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var partitionURL = &quot;http://servicefabricname.cloudapp.net:19007/Applications/&quot; + appName + &quot;/$/GetServices/&quot; + updatedSvcName + &quot;/$/GetPartitions?api-version=1.0&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var prtnPrimaryKeyName = &quot;PartitionId&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var additionalData = {&quot;AppName&quot;: appName, &quot;ServiceName&quot;: updatedSvcName};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdate(&quot;Partition&quot;, partitionURL, prtnPrimaryKeyName, prtnCurrentTableName, prtnEventsTableName, prtnHistoryTableName, 15, additionalData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdateReplicaData(item, index, array) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var svcName = item.ServiceName.toString().replace(&quot;_&quot;, &quot;/&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdateReplicaDataForPartitionId(item.AppName, svcName, item.PartitionKey, item.ServiceKind);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdateReplicaDataForPartitionId(appName, svcName, partitionId, serviceKind) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var replCurrentTableName = &quot;MyAppReplCurrTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var replEventsTableName = &quot;MyAppReplEventsTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var replHistoryTableName = &quot;MyAppReplHistoryTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var updatedSvcName = svcName.toString().replace(&#39;_&#39;, &#39;/&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; console.log(&quot;Fetching replica data for app &quot; + appName + &quot; and svc &quot; + updatedSvcName + &quot; and prtnId &quot; + partitionId);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var replicaURL = &quot;http://servicefabricname.cloudapp.net:19007/Applications/&quot; + appName + &quot;/$/GetServices/&quot; + svcName + &quot;/$/GetPartitions/&quot; + partitionId + &quot;/$/GetReplicas?api-version=1.0&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var replicaPrimaryKeyName = &quot;NodeName&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; /*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; if (serviceKind == &quot;Stateless&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; replicaPrimaryKeyName = &quot;InstanceId&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var additionalData = {&quot;AppName&quot;: appName, &quot;ServiceName&quot;: svcName, &quot;PartitionId&quot;: partitionId};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; fetchAndUpdate(&quot;Replica&quot;, replicaURL, replicaPrimaryKeyName, replCurrentTableName, replEventsTableName, replHistoryTableName, 15, additionalData);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function fetchAndUpdate(dataType, urlToMonitor, primaryKeyName, currentTableName, eventsTableName, historyTableName, frequency, additionalData)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var date = new Date();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var current_min = date.getMinutes();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var fUpdate = current_min % frequency;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var req = require(&#39;request&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;fetchAndUpdate &quot; + urlToMonitor);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; // fetch data&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; req.get({&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; uri:urlToMonitor,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; timeout : 200000,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; headers:{&#39;content-type&#39;: &#39;application/x-www-form-urlencoded&#39;},&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;},&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;function (error, response, body) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error &amp;amp;&amp;amp; response.statusCode == 200) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var items = JSON.parse(body);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// console.log(items);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var tableService = azure.createTableService(&quot;storageaccountname&quot;, &quot;storageaccountkey&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tableService.createTableIfNotExists(currentTableName, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// for each row&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;items.forEach(updateTables.bind(null, dataType, primaryKeyName, urlToMonitor, currentTableName, eventsTableName, historyTableName, fUpdate, additionalData));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// items.forEach(getHealth.bind(null, dataType, primaryKeyName, urlToMonitor, additionalData));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;CreateTableIfNotExists for &quot; + currentTableName + &quot; returned error: &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;ERROR: GET &quot; + urlToMonitor + &quot; returned error: &quot; + error + &quot;and statusCode &quot; + response.statusCode);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function getHealth(dataType, primaryKeyName, primaryKeyValueToUse, urlToMonitor, additionalData, item&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;// , index, array&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; // Modify url to add data and GetHealth query&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; // console.log(&quot;getHealth &quot; + dataType + &quot; item &quot; + item[primaryKeyName]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var primaryKeyValue = item[primaryKeyName];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; if (dataType == &quot;Partition&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; primaryKeyValue = primaryKeyValueToUse;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; /*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var primaryKeyValue = item[primaryKeyName];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; if (dataType == &quot;Partition&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var partitionInformation = item[&quot;PartitionInformation&quot;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; primaryKeyValue = partitionInformation[&quot;Id&quot;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var healthUrl = urlToMonitor.replace(&quot;?api-version=1.0&quot;, &quot;/&quot; + primaryKeyValue +&quot;/$/GetHealth?api-version=1.0&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var req = require(&#39;request&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; req.get({&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; uri:healthUrl,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; timeout : 200000,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; headers:{&#39;content-type&#39;: &#39;application/x-www-form-urlencoded&#39;},&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;},&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;function (error, response, body) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error &amp;amp;&amp;amp; response.statusCode == 200) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var items = JSON.parse(body);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// console.log(items);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var entityName = primaryKeyValue;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataType == &quot;Service&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entityName = primaryKeyValue.toString().replace(&#39;/&#39;, &#39;_&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (dataType == &quot;Replica&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entityName = additionalData[&quot;PartitionId&quot;] + &quot;_&quot; + primaryKeyValue;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;items[&quot;HealthEvents&quot;].forEach(updateHealthEventsTable.bind(null, dataType, entityName));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;ERROR: GET health for &quot; + healthUrl + &quot; returned error: &quot; + error + &quot;and statusCode &quot; + response.statusCode);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function updateHealthEventsTable(dataType, entityName, item, index, array) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var healthEventsTable = &quot;MyAppHealthEventsTable&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var tableService = azure.createTableService(&quot;storageaccountname&quot;, &quot;storageaccountkey&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; tableService.createTableIfNotExists(healthEventsTable, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;PartitionKey&quot;] = entityName;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;RowKey&quot;] = item[&quot;SequenceNumber&quot;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;DataType&quot;] = dataType;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;HealthState&quot;] = mapEnum(&quot;HealthState&quot;, item[&quot;HealthState&quot;]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tableService.insertOrReplaceEntity(healthEventsTable, item, function(error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(item.PartitionKey + &quot; Health event updated&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;ERROR while updating health event for &quot; + item.PartitionKey + &quot; : &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;})&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;ERROR: CreateTableIfNotExists for &quot; + healthEventsTable + &quot; returned error: &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; })&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function updateTables(dataType, primaryKeyName, urlToMonitor, currentTableName, eventsTableName, historyTableName, fUpdate, additionalData, item, index, array) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var primaryKeyValue = item[primaryKeyName];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; if (dataType == &quot;Service&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; primaryKeyValue = item[primaryKeyName].toString().replace(&#39;/&#39;, &#39;_&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; else if (dataType == &quot;Partition&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var partitionInformation = item[&quot;PartitionInformation&quot;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; primaryKeyValue = partitionInformation[&quot;Id&quot;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[&quot;PartitionInformation&quot;] = null;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; else if (dataType == &quot;Replica&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; primaryKeyValue = additionalData[&quot;PartitionId&quot;] + &quot;_&quot; + item[primaryKeyName];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; for (var prop in additionalData) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[prop] = additionalData[prop];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var getMatchingEntities = azure.TableQuery&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; .select()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; .from(currentTableName).where(&#39;PartitionKey eq ?&#39;, primaryKeyValue);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var tableService = azure.createTableService(&quot;storageaccountname&quot;, &quot;storageaccountkey&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; tableService.queryEntities(getMatchingEntities, function (error, entities) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (entities.length &amp;gt; 0) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var prop in item) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // console.log(&quot;item[&quot; + prop + &quot;] = &quot; + item[prop] + &quot; ; eProp &quot; + entities[0][prop]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (prop != &quot;id&quot; &amp;amp;&amp;amp; prop != &quot;Id&quot; &amp;amp;&amp;amp; prop != &quot;link&quot; &amp;amp;&amp;amp; prop != &quot;updated&quot; &amp;amp;&amp;amp; prop != &quot;etag&quot; &amp;amp;&amp;amp; prop != &quot;PartitionKey&quot; &amp;amp;&amp;amp; prop != &quot;RowKey&quot; &amp;amp;&amp;amp; prop != &quot;Timestamp&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if different from currenttable, then update events table&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataType == &quot;Application&quot; &amp;amp;&amp;amp; prop == &quot;Parameters&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[prop] = JSON.stringify(item[prop]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[prop] = mapEnum(prop, item[prop]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var iProp = (item[prop] == null) ? null : item[prop].toString();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var eProp = (entities[0][prop] == null) ? null : entities[0][prop].toString();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (iProp != eProp) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writeToEventsTable(eventsTableName, primaryKeyValue, prop, item[prop]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entities[0][prop] = item[prop];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update row of existing entity&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[&quot;PartitionKey&quot;] = primaryKeyValue;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[&quot;RowKey&quot;] = entities[0].RowKey;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableService.updateEntity(currentTableName, item, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // console.log(item.PartitionKey + &quot; Entity updated&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;ERROR while updating entity &quot; + item.PartitionKey + &quot; : &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;PartitionKey&quot;] = primaryKeyValue;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;RowKey&quot;] = randomString(128);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var prop in item) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[prop] = mapEnum(prop, item[prop]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataType == &quot;Application&quot; &amp;amp;&amp;amp; prop == &quot;Parameters&quot;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var jsonValue = JSON.stringify(item[prop]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;App Parameters = &quot; + jsonValue);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item[prop] = jsonValue;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tableService.insertEntity(currentTableName, item, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(item.PartitionKey + &quot; &quot; + dataType + &quot; Entity inserted in current table&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;Error while inserting entity &quot; + item.PartitionKey + &quot; in current table : &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Update history table if frequency is met&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (fUpdate == 0) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tableService.createTableIfNotExists(historyTableName, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[&quot;RowKey&quot;] = randomString(128);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tableService.insertEntity(historyTableName, item, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// console.log(item.PartitionKey + &quot; Entity inserted in history table&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;ERROR while inserting entity &quot; + item.PartitionKey + &quot; in history table : &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;queryEntities returned error: &quot; + error);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; getHealth(dataType, primaryKeyName, primaryKeyValue, urlToMonitor, additionalData, item);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function mapEnum(prop, value) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var retVal = value;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var NodeStatus = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;0&quot;: &quot;Invalid&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;1&quot;: &quot;Up&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;2&quot;: &quot;Down&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;3&quot;: &quot;Enabling&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;4&quot;: &quot;Disabling&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;5&quot;: &quot;Disabled&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var HealthState = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;0&quot;: &quot;Invalid&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;1&quot;: &quot;Ok&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;2&quot;: &quot;Warning&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;3&quot;: &quot;Error&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;65535&quot;: &quot;Unknown&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var ReplicaRole = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;0&quot;: &quot;Invalid&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;1&quot;: &quot;None&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;2&quot;: &quot;Primary&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;3&quot;: &quot;IdleSecondary&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;4&quot;: &quot;ActiveSecondary&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var ReplicaStatus = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;0&quot;: &quot;Invalid&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;1&quot;: &quot;InBuild&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;2&quot;: &quot;Standby&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;3&quot;: &quot;Ready&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;4&quot;: &quot;Down&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;5&quot;: &quot;Dropped&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var ServiceKind = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;0&quot;: &quot;Invalid&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;1&quot;: &quot;Stateless&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;2&quot;: &quot;Stateful&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; switch (prop) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;NodeStatus&quot;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = NodeStatus[value];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;HealthState&quot;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = HealthState[value];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;ReplicaRole&quot;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = ReplicaRole[value];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;ReplicaStatus&quot;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = ReplicaStatus[value];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;ServiceKind&quot;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = ServiceKind[value];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = value;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; return retVal;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function writeToEventsTable(eventsTableName, partitionKey, propertyName, propertyValue)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var azure = require(&#39;azure&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; var tableService = azure.createTableService(&quot;storageaccountname&quot;, &quot;storageaccountkey&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; tableService.createTableIfNotExists(eventsTableName, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var rowKey = randomString(128);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var task = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PartitionKey: partitionKey&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , RowKey: rowKey&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , NotifyStateName: propertyName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , NotifyStateValue: propertyValue&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableService.insertEntity(eventsTableName, task, function (error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!error) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // console.log(&#39;Event table updated for &#39; + partitionKey + &#39; property &#39; + propertyName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&#39;ERROR while Event Table update: &#39; + error + &quot;;pk = &quot; + partitionKey + &quot;; rk = &quot; + rowKey + &quot;; pname = &quot; + propertyName + &quot;; pval = &quot; + propertyValue);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function randomString(bits){var chars,rand,i,ret&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chars=&#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret=&#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // in v8, Math.random() yields 32 pseudo-random bits (in spidermonkey it gives 53)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(bits &amp;gt; 0){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rand=Math.floor(Math.random()*0x100000000) // 32-bit integer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // base 64 means 6 bits per character, so we use the top 30 bits from rand to give 30/6=5 characters.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(i=26; i&amp;gt;0 &amp;amp;&amp;amp; bits&amp;gt;0; i-=6, bits-=6) ret+=chars[0x3F &amp;amp; rand &amp;gt;&amp;gt;&amp;gt; i]}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return ret&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope this blog will give readers confidence of creating a service fabric monitor with less cost and effort. Any suggestion or views are always welcome.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/2520013195929757005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/05/azure-mobile-service-service-fabric.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2520013195929757005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/2520013195929757005'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/05/azure-mobile-service-service-fabric.html' title='Azure Mobile Service + Service Fabric = Easy Monitoring '/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEHS7ja1qX3Xhm6Jl_PYM9Mf8FZN9U_9ihVj0OeDaGLQe7HZYV9ZiKsprMhGBC3nv-9SpoXwhOAUJYrDuZnjlzjcqD5Drprv8TWWlvwnne5Ovq7Ued473MywGJpnMA1-brgFUof5iVMlA/s72-c/ams1.JPG" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-3734254024157341406</id><published>2015-05-07T15:05:00.001-07:00</published><updated>2015-05-07T15:15:05.139-07:00</updated><title type='text'>ServiceFabric + ASA = Crime Detection, Part2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This blog is a continuation of &lt;a href=&quot;http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-smurf.html&quot;&gt;http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-smurf.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In this blog we want to highlight the PowerMap Analysis and the Database schema which we already discussed.&lt;br /&gt;
&lt;br /&gt;
Thanks to one of my colleague, who quickly&amp;nbsp;got the PowerMap skills,&amp;nbsp;I am keeping this short by showing the analytics fetched by him.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFJJoFAmtriRtisRpb1roV1ed-Uw3BhV7aMoMNU30yeprrL0c06avav-77DcFe_IBaggAHXWALaZVpP6Yuxe9jteGWQ-dov76vItmmz6x8T4rpazTSYZNFT-9RCjcOV0DqsvyJJ_m5rec/s1600/86512A40.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFJJoFAmtriRtisRpb1roV1ed-Uw3BhV7aMoMNU30yeprrL0c06avav-77DcFe_IBaggAHXWALaZVpP6Yuxe9jteGWQ-dov76vItmmz6x8T4rpazTSYZNFT-9RCjcOV0DqsvyJJ_m5rec/s400/86512A40.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The data is getting simulated while I am writing this blog. It is fetching the results from Database as follows&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHYH6P7nflG7hcBXM-1bF9KEjaZNxzGgd9oA-HK328QlQrkkvBrECHlYbT6r79DATYj6bFEAxBuOOuhHuj-JkPVyh8uAcYRQisbJt6RPETTik2-YBQC6NFyogmHC1Gzi4fO7MApZ9ghU/s1600/4934A541.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;217&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHYH6P7nflG7hcBXM-1bF9KEjaZNxzGgd9oA-HK328QlQrkkvBrECHlYbT6r79DATYj6bFEAxBuOOuhHuj-JkPVyh8uAcYRQisbJt6RPETTik2-YBQC6NFyogmHC1Gzi4fO7MApZ9ghU/s400/4934A541.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The latitude and longitude&amp;nbsp;data are helping us to point it in PowerMap, thus giving a real time tracking analysis of the stolen car, hence proving the POC.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/3734254024157341406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-part2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3734254024157341406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/3734254024157341406'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-part2.html' title='ServiceFabric + ASA = Crime Detection, Part2'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFJJoFAmtriRtisRpb1roV1ed-Uw3BhV7aMoMNU30yeprrL0c06avav-77DcFe_IBaggAHXWALaZVpP6Yuxe9jteGWQ-dov76vItmmz6x8T4rpazTSYZNFT-9RCjcOV0DqsvyJJ_m5rec/s72-c/86512A40.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-5166417036428271370</id><published>2015-05-07T01:11:00.000-07:00</published><updated>2015-05-08T08:53:08.415-07:00</updated><title type='text'>ServiceFabric + ASA = Crime Detection, Smurf Part2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This blog captures a story of an idea which was in my mind from a long time, but did not prove to be feasible in past. With Service Fabric and Azure Stream Analytics this has now become possible for us to perceive the potential of technology to prevent crime.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Scenario&lt;/h3&gt;
Here in this story we have tried to emulate a scenario wherein there are multiple&amp;nbsp;traffic cameras capturing the vehicle number plates and sending it to ASA(Azure Stream Analytics) service. Suppose there is a vehicle that got stolen and has been reported just now. Law agencies need to add this vehicle in lookout table. Now the stolen vehicle happens to pass from Camera3. Camera3 which is continuously emitting data to Event Hub which in turn goes to ASA, captures the number plate data. ASA queries the input against the lookout table and filters the vehicle data as soon as it is scanned by the ASA query into the database. PowerMap sheet provides a analysis based on the database content and shows a&amp;nbsp;pointer at Camera3 location, thus providing the law agencies a quick mechanism to track the vehicle&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem Breakdown&amp;nbsp;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Broadly for our POC we need to see these 2 paths&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
1. Simulate the traffic cam scenario which is sending continuous data to event hubs&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
2. Input is read by ASA and stolen vehicle details with the Camera details are sent to output DB&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Technical details&lt;/h3&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Input&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In order to have input. We created a Stateless Service Fabric Actor project. As Service Fabric Actor has a compute and a state , this is feasible to simulate a traffic camera. &lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Broadly we are looking for following data structures. StolenCarModel is a datastructure that is holding the Car details such as SerialId (Any identification, we are considering this as unique id, and this will help us to create the clustered index in our db), Vehicle Number(Captured from image), CameraSerial(Identification Id of Camera), CaptureTime(Timestamp when it was captured, which will help in tracking investigation)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;public class StolenCarModel&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int SerialId { get; set; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string VehicleNumber { get; set; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string CameraSerial { get; set; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string CaptureTime { get; set; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Another datastructure that needs to be maintained is CameraDetails , which will have the CameraID, Latitude and Longitude where Camera is positioned (This will help us to point in powermap), and Area which will have the name of the area&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class CameraDetails&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string CamID { get; set; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Latitude { get; set; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Longitude { get; set; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Area { get; set; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Service Fabric&amp;nbsp;Details&amp;nbsp;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
First and foremost is the interface Actor for our service&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
public interface IStolenCarStatelessActor : IActor&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Task&amp;lt;bool&amp;gt; StartSendingCarDetails(List&amp;lt;StolenCarModel&amp;gt; stolenCarList);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Corresponding to the interface the Actor Class should have the implementation&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
public async Task&amp;lt;bool&amp;gt; StartSendingCarDetails(List&amp;lt;StolenCarModel&amp;gt; cameraDetails)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActorEventSource.Current.ActorMessage(this, &quot;Start Sending Data&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EventHubLayer hub = new EventHubLayer();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sendDetails = await hub.SendEventsToEventHub(cameraDetails);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sendDetails;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Smurf Details&amp;nbsp;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
We are using Smurf core libraries in order to send data to event Hubs. Please refer to my previous blog on Smurf Core api at &lt;a href=&quot;http://nabaruns.blogspot.com/2015/03/smurfan-asa-based-tool-in-making-part-1.html&quot;&gt;http://nabaruns.blogspot.com/2015/03/smurfan-asa-based-tool-in-making-part-1.html&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In order to populate the StolenCarDetails class, we are using this function&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Get List of sample StolenCarModel details which can be sent later to the event hub&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;returns&amp;gt;Returns the list of stolen car model&amp;lt;/returns&amp;gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static List&amp;lt;StolenCarModel&amp;gt; GetMetricDataList(string camera)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Random rand = new Random();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var metricDataList = new List&amp;lt;StolenCarModel&amp;gt;();&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&quot;#####################{0}####################&quot;, camera);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var loop = 0; loop &amp;lt; 5; loop++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var date = DateTime.Now;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var serialId = rand.Next(0, 50);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var nowTime = date.Ticks.ToString();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Write(&quot;Camera:{0} SerialId:{1} TimeStamp:{2} Vehicle:{3}&quot;, camera, serialId, nowTime, &quot;ADC01&quot; + serialId);&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine();&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var info = new StolenCarModel() { CameraSerial = camera, SerialId = serialId, CaptureTime = nowTime, VehicleNumber = &quot;ADC01&quot; + serialId };&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; metricDataList.Add(info);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&quot;##############################################&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine();&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return metricDataList;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In our POC at time t=0, we are assuming there are 5 events getting generated by each camera. We are currently simulating the camera details as mentioned in the marked line&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
This is giving us the following input &lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_RO8RjzrZLd4dI3OBSCk_CrYbJlUIvLnIaaSHEH5WCjX-yKYYqvaDWyq4rXCjN75LB1ubJkelGlW7eazihY7sq0eULgJ-KfUfA9_4C3vdxODcVhhgcTS5y7m8LYaVdOQg4IeN8QX1c-E/s1600/smurf1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_RO8RjzrZLd4dI3OBSCk_CrYbJlUIvLnIaaSHEH5WCjX-yKYYqvaDWyq4rXCjN75LB1ubJkelGlW7eazihY7sq0eULgJ-KfUfA9_4C3vdxODcVhhgcTS5y7m8LYaVdOQg4IeN8QX1c-E/s1600/smurf1.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now moving ahead we need to simulate multiple actors as cameras. &lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
var camera1 = ActorProxy.Create&amp;lt;IStolenCarStatelessActor&amp;gt;(ActorId.NewId(), &quot;fabric:/StolenCarStatelessActorApplication&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var camera2 = ActorProxy.Create&amp;lt;IStolenCarStatelessActor&amp;gt;(ActorId.NewId(), &quot;fabric:/StolenCarStatelessActorApplication&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var camera10 = ActorProxy.Create&amp;lt;IStolenCarStatelessActor&amp;gt;(ActorId.NewId(), &quot;fabric:/StolenCarStatelessActorApplication&quot;);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int loop = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var tollboothList = GetMetricDataList(&quot;Camera1&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sendSuccess = camera1.StartSendingCarDetails(tollboothList);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&quot;Sending Camera1 Details {0}: {1}&quot;, camera1.GetActorId(), sendSuccess.Result);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.Sleep(5000);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tollboothList = GetMetricDataList(&quot;Camera2&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sendSuccess = camera2.StartSendingCarDetails(tollboothList);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&quot;Sending Camera2 details {0}: {1}&quot;, camera2.GetActorId(), sendSuccess.Result);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.Sleep(5000);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tollboothList = GetMetricDataList(&quot;Camera10&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sendSuccess = camera10.StartSendingCarDetails(tollboothList);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&quot;Sending Camera10 details {0}: {1}&quot;, camera10.GetActorId(), sendSuccess.Result);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.Sleep(5000);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loop++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (loop &amp;lt; 10);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In above code we are creating 10 actor objects calling the&amp;nbsp;Stolen Car&amp;nbsp;service and then sending random data under them&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now having done the input part next is ASA query which will help us populate the data to db&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
ASA Query&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In order to have a POC for the idea, our ASA query is very simple&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
SELECT SerialId, VehicleNumber, CameraSerial, CaptureTime FROM CallStream WHERE VehicleNumber=&#39;ADC0116&#39;;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In here we are saying that the stolen vehicle is ADC0116, if I get any data related to that , populate the data in my database.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
SQL Database&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In order to create a database which will keep a track of the stolen vehicles we need to create a table similar to the StolenCar Schema&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Keeping it very simple I create the table as follows&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Create table StolenCardTable (SerialId varchar(255), VehicleNumber varchar(255), CameraSerial varchar(255), CaptureTime varchar(255));&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
CREATE CLUSTERED INDEX StolenCardTable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ON StolenCardTable(SerialId ASC);&lt;br /&gt;
GO&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Action Time&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Till now I have all pieces in place to verify my app. Here is a screenshot which verifies the stateless service actor app deployed on my localhost cluster&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiALMKxCq9kRJq6rdjGcwDzEaElg1jJ3rJmsScFTvLKTCpHtC5Oh_PXzu1mrj1qKTQvrplkYwiVMRaMloHNmXRhvJJsHnyq1RFyqrMRgq54MAPUzmJAJvPPdPoZgqUPZoRZHAmcoeHAEIU/s1600/smurf2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiALMKxCq9kRJq6rdjGcwDzEaElg1jJ3rJmsScFTvLKTCpHtC5Oh_PXzu1mrj1qKTQvrplkYwiVMRaMloHNmXRhvJJsHnyq1RFyqrMRgq54MAPUzmJAJvPPdPoZgqUPZoRZHAmcoeHAEIU/s1600/smurf2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now after starting the client first point of verification is event hub dashboard and logs&amp;nbsp;which should start receiving the events&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_x8zYsNAw8gDaP7-rDD__xHdQ95H9dl-dWB-0qw3BDDYU52-C37TyaBc1QMnw1u0hmkMpXs3IfNxTZQGM721ic4ieRanLdtr1xK51tr0KtD8lJksc13D6lJg1hq9262HrjE9elHtcIbc/s1600/smurf3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_x8zYsNAw8gDaP7-rDD__xHdQ95H9dl-dWB-0qw3BDDYU52-C37TyaBc1QMnw1u0hmkMpXs3IfNxTZQGM721ic4ieRanLdtr1xK51tr0KtD8lJksc13D6lJg1hq9262HrjE9elHtcIbc/s1600/smurf3.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Second verification will be ASA dashboard and logs&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguf3NM_ZY5SXpyiHlaW1mfzwj-8x21ZYVVjt4DsPQfrqSTvkci7X2V5Iyz4WCDu26UvMyDxBnlDy4Uu5iEcLZR1tOe0dUb8FIiXmNdF5UbTEPuBReEpj3E6Tn4fQUEW9Ipf_Je9dWupI0/s1600/smurf4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguf3NM_ZY5SXpyiHlaW1mfzwj-8x21ZYVVjt4DsPQfrqSTvkci7X2V5Iyz4WCDu26UvMyDxBnlDy4Uu5iEcLZR1tOe0dUb8FIiXmNdF5UbTEPuBReEpj3E6Tn4fQUEW9Ipf_Je9dWupI0/s1600/smurf4.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
If till now you have seen everything is fine most probably you will get the data in database&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera7&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera9&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera7&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera10&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera3&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera2&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera2&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera9&amp;nbsp;NULL&lt;br /&gt;
16&amp;nbsp;ADC0116&amp;nbsp;Camera2&amp;nbsp;NULL&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I have got this sample output in my db which says ADC0116 was first seen in Camera7 then 9 then again 7 and so on , eventually ending in 2. This can be now easily highlighted in PowerMap based on camera details and location which will be my next blog.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I think by now I am having a story to share with you all. The intent of this blog is to utilize the potent technologies and try to make this world a better place. Hope you will like it. Please feel free to comment your views or suggestions.&lt;br /&gt;
&lt;br /&gt;
Continuation blog is at &lt;a href=&quot;http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-part2.html&quot;&gt;http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-part2.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/5166417036428271370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-smurf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/5166417036428271370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/5166417036428271370'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/05/servicefabric-asa-crime-detection-smurf.html' title='ServiceFabric + ASA = Crime Detection, Smurf Part2'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_RO8RjzrZLd4dI3OBSCk_CrYbJlUIvLnIaaSHEH5WCjX-yKYYqvaDWyq4rXCjN75LB1ubJkelGlW7eazihY7sq0eULgJ-KfUfA9_4C3vdxODcVhhgcTS5y7m8LYaVdOQg4IeN8QX1c-E/s72-c/smurf1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-820464427634666804.post-8316856657179768377</id><published>2015-05-05T08:42:00.002-07:00</published><updated>2015-05-05T08:43:14.253-07:00</updated><title type='text'>Why Service Fabric?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;
This is a brief article which is not
related to What is&amp;nbsp; Service Fabric. The intent is to add more pointers to this as we explore Service Fabric.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Here in this article the focus is
to study Why Service Fabric is needed. Following is a comparison study that I manage to collect talking to some Service Fabric devs and PMs. Having said that the intent of this blog is to open debate points.&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;direction: ltr; font-family: Calibri; font-size: 11pt; font-weight: bold; margin-bottom: 0in; margin-left: 0.375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;1&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot; value=&quot;1&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Why we want to use Service Fabric as Hadoop Map Reduce&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .75in; margin: 0in;&quot;&gt;
Suppose
we have 1 TB of data size, and the data is divided in many sections.
Considering one section , if there is a failover during the execution. The
processing start again from the beginning of the section in case of Hadoop Map
Reduce. If we implement map reduce in Service Fabric, as the states are saved
this will not be an issue.&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .75in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .75in; margin: 0in;&quot;&gt;
Traditional
Map Reduce is having mapper, combiner and reducer. Data gets copied from mapper
to combiner and then Reducer. In case of Service Fabric we save the data from
getting copied multiple times (Copy happens from Mapper directly to Reducer)&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .75in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;direction: ltr; font-family: Calibri; font-size: 11pt; font-weight: bold; margin-bottom: 0in; margin-left: 0.375in; margin-top: 0in; unicode-bidi: embed;&quot; type=&quot;1&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-top: 0px; vertical-align: middle;&quot; value=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Distributed Data Structures&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .375in; margin: 0in;&quot;&gt;
Service Fabric is providing Distributed data structures like Distributed Queue and
Distributed Dictionary. These in built data structure helps one to quickly
develop stateful services on windows fabric. This also ensures that your
service never loses data inspite of cluster wide failures.&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .375in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .375in; margin: 0in;&quot;&gt;
Unlike
Azure Redis cache , Azure Table Store, Azure Queue the state is kept locally in
service instance. Advantages are all reads are local, all&amp;nbsp; write incur minimum number of network.&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .375in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin-left: .375in; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nabaruns.blogspot.com/feeds/8316856657179768377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nabaruns.blogspot.com/2015/05/why-service-fabric.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/8316856657179768377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/820464427634666804/posts/default/8316856657179768377'/><link rel='alternate' type='text/html' href='http://nabaruns.blogspot.com/2015/05/why-service-fabric.html' title='Why Service Fabric?'/><author><name>Nabarun Sengupta</name><uri>http://www.blogger.com/profile/07288590554477886756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy4bGsi5t7eRX7yI3kBULX8vhHSKMuVsz92MiXayrp1q73z-Xg0CRwSc-bke36MiEVHUMeVMo3XvNLlVcvAITk9IQEiXpCCM-r0l9fKQ3XMkBMuVuAfPHC9Pe32BjnQ/s113/3374071.jpg'/></author><thr:total>1</thr:total></entry></feed>