<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>article &#8211; Sibeesh Passion</title>
	<atom:link href="https://mail.sibeeshpassion.com/tag/article/feed/" rel="self" type="application/rss+xml" />
	<link>https://mail.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Fri, 20 May 2022 18:44:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>article &#8211; Sibeesh Passion</title>
	<link>https://mail.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>One Tip Which Can Boost Your Career to the Next Level</title>
		<link>https://mail.sibeeshpassion.com/one-tip-which-can-boost-your-career-to-the-next-level/</link>
					<comments>https://mail.sibeeshpassion.com/one-tip-which-can-boost-your-career-to-the-next-level/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 12 Jul 2018 16:17:59 +0000</pubDate>
				<category><![CDATA[Career Advice]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Personal Branding]]></category>
		<category><![CDATA[Success Stories]]></category>
		<category><![CDATA[Tips to success]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=13190</guid>

					<description><![CDATA[[toc] Introduction Here in this article, I am going to say about one thing which can boost your career to the next level. Trust me, this is going to work. I am Sibeesh Venu, I have been in the software development industry for the past 7 years now. I have worked with many companies now, including a small company with 5 &#8211; 10 members and multinational companies. Let&#8217;s skip the introduction for now, and jump into the contents. I hope you will like this article. Background We all are working in our day to day life, some people run their [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h2>Introduction</h2>
<p>Here in this article, I am going to say about one thing which can boost your career to the next level. Trust me, this is going to work. I am Sibeesh Venu, I have been in the software development industry for the past 7 years now. I have worked with many companies now, including a small company with 5 &#8211; 10 members and multinational companies. Let&#8217;s skip the introduction for now, and jump into the contents. I hope you will like this article.</p>
<h2>Background</h2>
<p>We all are working in our day to day life, some people run their own company, some people work for other companies, some are not employed. The common thing that we can find in all these people is, they are passionate about their career. I am sure you are passionate about your career, aren&#8217;t you? Just being passionate about something will not give you what you deserve. There are some actions you must take from your end. Here in this post, we are going to discuss one key thing, which is nothing but Personal Branding.</p>
<h2>Personal Branding</h2>
<p>Yes, it is just a two word. But the impacts that two words can make is huge. There are many people out there, who think that branding is needed for some products or for some companies. I would strongly disagree with that. As a person, you must consider yourself as a CEO of you (Your personal brand). So as a CEO, you should definitely need some branding. Am I right?</p>
<p>Now you read that, you need a personal brand. How to achieve that? Here are some points which I think important.</p>
<h3>Online search presence</h3>
<p>How many times do you search for something in Google per day? How about an hour? A minute? There are billions of search queries happening in a minute in the world. What does that mean to you? We live in an online world, everything is online here.</p>
<p>So, if someone searches for you on the internet, and they were unable to find you, that means you are not alone in this online world. As a first step, just search your name in Google now. Were you able to find you? Did you get any of your images? Let me show you the result which I got when I search my name &#8220;Sibeesh Venu&#8221; in Google.</p>
<div id="attachment_13200" style="width: 682px" class="wp-caption alignnone"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/07/Google-Search-Result-of-Sibeesh-Venu.jpg"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-13200" class="size-full wp-image-13200" src="https://sibeeshpassion.com/wp-content/uploads/2018/07/Google-Search-Result-of-Sibeesh-Venu.jpg" alt="Google Search Result of Sibeesh Venu" width="672" height="639" srcset="/wp-content/uploads/2018/07/Google-Search-Result-of-Sibeesh-Venu.jpg 375w, /wp-content/uploads/2018/07/Google-Search-Result-of-Sibeesh-Venu-300x285.jpg 300w, /wp-content/uploads/2018/07/Google-Search-Result-of-Sibeesh-Venu-400x380.jpg 400w, /wp-content/uploads/2018/07/Google-Search-Result-of-Sibeesh-Venu-631x600.jpg 631w" sizes="(max-width: 672px) 100vw, 672px" /></a><p id="caption-attachment-13200" class="wp-caption-text">Google Search Result of Sibeesh Venu</p></div>
<p>As you can see, there are links to my blog https://sibeeshpassion.com, my social media presence, my article links etc. If you find some result as this, when you search your name, wow you are doing great. Congratulations.</p>
<p>If not, please grab your domain with your name on it. For example <a href="https://sibeeshvenu.com">https://sibeeshvenu.com</a> and <a href="http://sibeeshpassion.com">https://sibeeshpassion.com</a>. This is very important, we all spent a lot of money on building a home in our real life. So, there is nothing wrong with spending a few thousands money in building your online home.</p>
<h3>Impacts of social media</h3>
<p>All the social media are very useful if you utilize it in a better way. You must create your identity at least in the following social media.</p>
<ul>
<li>LinkedIn</li>
<li>Twitter</li>
<li>Google plus</li>
<li>Facebook</li>
</ul>
<p>Remember, what you share in these social media defines you. So whenever you share something, please make sure that you are sharing the right content. Let&#8217;s say you had created your social media presence, and if you are not active there, it can give a negative impression to your followers or readers. If you are sure that you are not going to be active in these social media, please do not create an account there, so that we can avoid the negative impression.</p>
<p>And I will always recommend you to be active there and connect with the people, I am sure you will be able to find a lot of good people. There is a lot to learn. You should also create pages or accounts for your brand name. In my case, I had created a Facebook page <a href="https://facebook.com/SibeeshPassion/">https://facebook.com/SibeeshPassion/</a> for my brand name Sibeesh Passion.</p>
<h3>Do what you are passionate about and share about them in internet</h3>
<p>This is an important aspect. We all have 24 hours in a day. It is very important that we should prioritize things we need to do in a day, and most importantly you should find some time for yourself to do the things we are passionate about. If you ask me, I am passionate about learning and writing. I always do that no matter what happens. I give a top priority for that.</p>
<p>The biggest advantage of this is, there are other people in the world who may get your advice/work etc useful. So you are helping them in this online world. Helping others is an awesome thing to do right?</p>
<h3>Work and your passion</h3>
<p>If you are working in an environment or in an industry which you are passionate about, then it is the best thing to do, and it is amazing. You will learn a lot in your day to day life, you will not get bored. In that case, you can expertise things easily hence you can share the knowledge.</p>
<p>What if your passion and your work are entirely different? Yes, there are many people who live in that situation. The only advice I would like to give them is, please try to find out a job in the industry you are passionate about. You can be a star there. There is a great quote from Steve Jobs, &#8220;The only way to do great work is to love what you do&#8221;</p>
<h2>Todo</h2>
<p>I may add some more points to this article as I think of something. Till then here is the Todo for you.</p>
<ol>
<li>Get your domain and host it.</li>
<li>Make sure you are following SEO standards. If you are not sure about SEO, I strongly recommend you to read this <a href="https://sibeeshpassion.com/category/seo/">articles</a>.</li>
<li>Start sharing things you are passionate about in social media</li>
</ol>
<h2><span id="conclusion"><span id="conclusion_1">Conclusion</span></span></h2>
<p>Thanks a lot for reading. I will come back with another post on the same topic very soon. Meanwhile please check my online homes <a href="https://sibeeshpassion.com/">https://sibeeshpassion.com/</a> and <a href="https://sibeeshvenu.com/">https://sibeeshvenu.com/</a> Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<h2><span id="your-turn-what-do-you-think">Your turn. What do you think?</span></h2>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/one-tip-which-can-boost-your-career-to-the-next-level/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>End to End (E2E) Tests in Angular Application Using Protractor</title>
		<link>https://mail.sibeeshpassion.com/end-to-end-e2e-tests-in-angular-application-using-protractor/</link>
					<comments>https://mail.sibeeshpassion.com/end-to-end-e2e-tests-in-angular-application-using-protractor/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 08 Jul 2018 15:25:34 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular-cli]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[E2E]]></category>
		<category><![CDATA[End to End Test]]></category>
		<category><![CDATA[Protractor]]></category>
		<category><![CDATA[Why E2E]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=13062</guid>

					<description><![CDATA[[toc] Introduction In this article, we will learn how we can create an end to end tests (e2e) for our Angular application. We will be using an existing end-to-end testing framework, which is nothing but, Protractor. Protractor runs your tests against your application running in a real browser, in the same way, your user may perform the actions. I will be using an existing application which is available in my GitHub profile. The same can be available in the source code section. Please do share your feedback with me. I hope you will like this article. Let&#8217;s start coding. Source Code The [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h2>Introduction</h2>
<p>In this article, we will learn how we can create an end to end tests (e2e) for our <a href="https://sibeeshpassion.com/category/client-side-technologies/angular/">Angular</a> application. We will be using an existing end-to-end testing framework, which is nothing but, Protractor. Protractor runs your tests against your application running in a real browser, in the same way, your user may perform the actions. I will be using an existing application which is available in my <a href="https://github.com/sibeeshvenu">GitHub</a> profile. The same can be available in the source code section. Please do share your feedback with me. I hope you will like this article. Let&#8217;s start coding.</p>
<h2>Source Code</h2>
<p>The source code can be found <a href="https://github.com/SibeeshVenu/ng5">here</a>. Please clone this repository before you start.</p>
<h2>Importance of End to End Testing</h2>
<p>Some of you might have already started writing an end to end testing for your application, and you may be knowing how important that is. Here in this section, I will list down the key benefits of an end to end testing.</p>
<ul>
<li>End to end testing tests the complete flow or the action. For example, a complete login process can be treated as one end to end testing. Basically, it tests a specific functionality.</li>
<li>It doesn&#8217;t improve the code quality as does in Unit testing. Unit testing is a different topic, and an end to end testing and unit testing are completely different.</li>
<li>As I said earlier, an end to end testing run tests on the browser, so it tests your application live, with some real data.</li>
<li>You can easily find out if any functionalities are broken because of your recent changes or implementation</li>
</ul>
<h2>Basic overview</h2>
<p>If you have already cloned the application, you should be able to see a folder e2e in your application code, open that folder. You can see 3 files as below.</p>
<ul>
<li>tsconfig.e2e.json</li>
<li>app.po.ts</li>
<li>app.e2e-spec.ts</li>
</ul>
<p>Here <em>tsconfig.e2e.json</em> is the configuration file, if you open that file, you can see that the file is been extended from <em>tsconfig.json. </em></p>
<pre class="EnlighterJSRAW" data-enlighter-language="json">{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/e2e",
    "baseUrl": "./",
    "module": "commonjs",
    "target": "es5",
    "types": [
      "jasmine",
      "jasminewd2",
      "node"
    ]
  }
}
</pre>
<p><em>app.po.ts </em>is the page object, this is really helpful and important. Here is the place, where we will write the codes to find out the elements on our page or view. So, in future, if you are changing the selectors of your element, your changes will impact only in this file, so that you don&#8217;t need to change anything in your tests. Isn&#8217;t that handy? By default, this file will have the codes as below.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">import { browser, by, element } from 'protractor';

export class AppPage {
  navigateTo() {
    return browser.get('/');
  }

  getParagraphText() {
    return element(by.css('app-root h1')).getText();
  }
}
</pre>
<p>As you can see, on the first line, we are importing browser, by, an element from protractor.</p>
<ol>
<li>browser, is for interacting with the browser</li>
<li>by, is for finding the element by CSS or any other function</li>
<li>element, is for converting the selected element</li>
</ol>
<p>Here in this line, element(by.css(&#8216;app-root h1&#8217;)).getText(), like you have already guessed, we are just finding an element with the selector &#8216;app-root h1&#8217;</p>
<p><em>app.e2e-spec.ts </em> is the tests holder. We will be writing all of our tests here.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">import { AppPage } from './app.po';

describe('my-angular5-app App', () =&gt; {
  let page: AppPage;

  beforeEach(() =&gt; {
    page = new AppPage();
  });

  it('should display welcome message', () =&gt; {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('Welcome to ng5!');
  });
});
</pre>
<p>The first thing we do is, importing the page, in this case, AppPage. This will be very easy for you if you have already written any <a href="https://sibeeshpassion.com/category/unit-testing/">unit test</a> cases using <a href="https://sibeeshpassion.com/category/unit-testing/jasmine-framework/">jasmine</a>. If you are not sure about how you can write the unit tests, I recommend you to visit this <a href="https://sibeeshpassion.com/writing-javascript-tests-using-jasmine-framework/">link</a>.</p>
<p>Once we import the page, we are declaring an object and initialize the same with an AppPage instance in <em>beforeEach</em> function, so that the code can be executed before each test runs.</p>
<p>And in our first test, we are just confirming that the title is &#8216;Welcome to app&#8217; by getting the value from our page object by calling <em>page.getParagraphText(). </em></p>
<h2>Creating Login Component</h2>
<p>As you all know, a component will have two files by default.</p>
<ul>
<li>login.component.html</li>
<li>login.component.ts</li>
</ul>
<h3>login.component.html</h3>
<p>Let&#8217;s write some HTML code for our component.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="html">&lt;div class="container" style="margin-top:100px;"&gt;
  &lt;div class="row justify-content-center align-items-center"&gt;
    &lt;div class="col-lg-4 col-sm-4 center-block "&gt;
      &lt;mat-card&gt;
        &lt;mat-card-header&gt;
          &lt;img mat-card-avatar src="../../../assets/images/App-login-manager-icon.png"&gt;
          &lt;mat-card-title&gt;Login here&lt;/mat-card-title&gt;
          &lt;mat-card-subtitle&gt;Trust us for your data, and sign up&lt;/mat-card-subtitle&gt;
        &lt;/mat-card-header&gt;
        &lt;mat-card-content&gt;
          &lt;div class="signup-fields"&gt;
            &lt;form id="loginForm"[formGroup]="form" (ngSubmit)="login()"&gt;
              &lt;div class="form-group"&gt;
                &lt;input name="email" class="form-control" matInput type="email" placeholder="Email" formControlName="email" /&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                &lt;input name="password" class="form-control" matInput type="password" placeholder="Password" formControlName="password" /&gt;
              &lt;/div&gt;
              &lt;div&gt;
                &lt;button id="btnSubmit" mat-raised-button type="submit" color="primary"&gt;Login&lt;/button&gt;
              &lt;/div&gt;
            &lt;/form&gt;
          &lt;/div&gt;
        &lt;/mat-card-content&gt;
      &lt;/mat-card&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
<h3>login.component.ts</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="js">import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { AuthService } from '../auth.service';

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.css']
})
export class LoginComponent implements OnInit {
  form;
  constructor(private fb: FormBuilder,
    private myRoute: Router,
    private auth: AuthService) {
    this.form = fb.group({
      email: ['', [Validators.required, Validators.email]],
      password: ['', Validators.required]
    });
  }

  ngOnInit() {
  }

  login() {
    if (this.form.valid) {
      this.auth.sendToken(this.form.value.email)
      this.myRoute.navigate(["home"]);
    }
  }

}
</pre>
<p>If you run the application, you can see that we are accepting the form only if we give relevant values to the fields, if not given, the form will be invalid. In our next step, we will write an end to end test for this functionality. Sounds good?</p>
<h2>Write end to end tests for Login component</h2>
<p>To get started, let us create two files as below.</p>
<ol>
<li>login.po.ts</li>
<li>login.e2e-spec.ts</li>
</ol>
<p>Now let us define our page and some functions in login.po.ts.</p>
<h3>Set up login.po.ts</h3>
<p>Open the file and write some code as preceding.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">import { browser, by, element } from 'protractor';

export class LoginPage {
    navigateTo(){
        return browser.get('/login');
    }
}</pre>
<p>Now we will write the codes to find the email and password text boxes.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">getEmailTextbox() {
 return element(by.name('email'));
}

getPasswordTextbox() {
 return element(by.name('password'));
}</pre>
<h3>Set up login.e2e-spec.ts</h3>
<p>It is time to set up our spec file before we start writing the tests.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">import { LoginPage } from './login.po';

describe('Login tests', () =&gt; {
    let page: LoginPage;

    beforeEach(() =&gt; {
        page = new LoginPage();
        page.navigateTo();        
    });
});</pre>
<p>We have imported our login page and initialized the same. It is time to write the tests now.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">it('Login form should be valid', () =&gt; {
 page.getEmailTextbox().sendKeys('info@sibeeshpassion.com');
 page.getPasswordTextbox().sendKeys('1234');

 let form = page.getForm().getAttribute('class');

 expect(form).toContain('ng-valid');
});</pre>
<p>Here what we are doing is, set the values to our text boxes by using sendKeys function and then find the class attribute of our form, so that we can check whether it is valid or not. If the form is valid, the form will be having the class as ng-valid, if not, it will have ng-invalid class.</p>
<h2>Run end to end test</h2>
<p>Running end to end test is as easy as falling off a log. As we are using Angular CLI, all we have to do is run the command <em>ng e2e. </em> This will be set in our <em>package.json </em>file.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="json">"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  }</pre>
<p>let us run <em>ng e2e </em>now.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">PS F:\My Projects\ng5&gt; ng e2e</pre>
<p>If everything goes well, your application should open in a browser and test the functionality. You will also get a message saying &#8220;Chrome is being controlled by automated test software&#8221;.</p>
<div id="attachment_13064" style="width: 453px" class="wp-caption alignnone"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/07/ng-e2e-browser-output.jpg"><img decoding="async" aria-describedby="caption-attachment-13064" class="size-full wp-image-13064" src="https://sibeeshpassion.com/wp-content/uploads/2018/07/ng-e2e-browser-output.jpg" alt="ng e2e browser output" width="443" height="180" srcset="/wp-content/uploads/2018/07/ng-e2e-browser-output.jpg 443w, /wp-content/uploads/2018/07/ng-e2e-browser-output-300x122.jpg 300w, /wp-content/uploads/2018/07/ng-e2e-browser-output-400x163.jpg 400w" sizes="(max-width: 443px) 100vw, 443px" /></a><p id="caption-attachment-13064" class="wp-caption-text">ng e2e browser output</p></div>
<p>And in your terminal console, you should see an output saying all of your tests are passed.</p>
<div id="attachment_13065" style="width: 644px" class="wp-caption alignnone"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/07/Automated-test-output-e1531050755639.jpg"><img decoding="async" aria-describedby="caption-attachment-13065" class="size-full wp-image-13065" src="https://sibeeshpassion.com/wp-content/uploads/2018/07/Automated-test-output-e1531050755639.jpg" alt="Automated test output" width="634" height="187" /></a><p id="caption-attachment-13065" class="wp-caption-text">Automated test output</p></div>
<h2>Writing a few more tests</h2>
<p>Let us write a few more tests to check some other functionalities.</p>
<h3>Check form is invalid</h3>
<p>To check the form is invalid or not, we need to pass some invalid data to the form. The final test should be as follows.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">it('Login form should be invalid', () =&gt; {
 page.getEmailTextbox().sendKeys('');
 page.getPasswordTextbox().sendKeys('');

 let form = page.getForm().getAttribute('class');

 expect(form).toContain('ng-invalid');
});</pre>
<h3>Check whether the value is been saved to local storage</h3>
<p>You might have already looked at what is the functionality we are doing when we click the login button in our application. For now, we are just saving the email value to the local storage. Below is the function which gets called when we click the login button.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">login() {
    if (this.form.valid) {
      this.auth.sendToken(this.form.value.email)
      this.myRoute.navigate(["home"]);
    }
  }</pre>
<p>And this is the sendToken method in out AuthService.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">sendToken(token: string) {
    localStorage.setItem("LoggedInUser", token)
 }</pre>
<p>Now, we are going to write an automated test for this functionality. First, let us add a function which returns submit button in login.po.ts.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">getSubmitButton() {
 return element(by.css('#btnSubmit'));
}</pre>
<p>Now, write the test as preceding.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">it('Should set email value to local storage', () =&gt; {
 page.getEmailTextbox().sendKeys('info@sibeeshpassion.com');
 page.getPasswordTextbox().sendKeys('1234');

 page.getSubmitButton().click();

 let valLocalStorage = browser.executeScript("return window.localStorage.getItem('LoggedInUser');");
 expect(valLocalStorage).toEqual('info@sibeeshpassion.com');
});</pre>
<p>As you can see that, we are actually setting some valid data to the form and triggering the click event of our button, and the value of the email text box is being saved to the <a href="https://sibeeshpassion.com/?s=local+storage">localStorage</a>. In our test, we are checking the value of the localStorage by executing the script <em>browser.executeScript(&#8220;return window.localStorage.getItem(&#8216;LoggedInUser&#8217;);&#8221;). </em>We should get an output as below if everything is fine.</p>
<div id="attachment_13066" style="width: 644px" class="wp-caption alignnone"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/07/locaStorage-in-Protractor.jpg"><img decoding="async" aria-describedby="caption-attachment-13066" class="size-full wp-image-13066" src="https://sibeeshpassion.com/wp-content/uploads/2018/07/locaStorage-in-Protractor.jpg" alt="locaStorage in Protractor" width="634" height="252" srcset="/wp-content/uploads/2018/07/locaStorage-in-Protractor.jpg 634w, /wp-content/uploads/2018/07/locaStorage-in-Protractor-300x119.jpg 300w, /wp-content/uploads/2018/07/locaStorage-in-Protractor-400x159.jpg 400w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-13066" class="wp-caption-text">locaStorage in Protractor</p></div>
<h2><span id="conclusion_1"><span id="conclusion">Conclusion</span></span></h2>
<p>Thanks a lot for reading. I will come back with another post on the same topic very soon. Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<h2><span id="your-turn-what-do-you-think">Your turn. What do you think?</span></h2>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/end-to-end-e2e-tests-in-angular-application-using-protractor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Your current settings do not allow file to be downloaded</title>
		<link>https://mail.sibeeshpassion.com/your-current-settings-do-not-allow-file-to-be-downloaded/</link>
					<comments>https://mail.sibeeshpassion.com/your-current-settings-do-not-allow-file-to-be-downloaded/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Mon, 15 Aug 2016 05:56:23 +0000</pubDate>
				<category><![CDATA[Microsoft Windows Server]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Download error in Windows Server]]></category>
		<category><![CDATA[How To]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11885</guid>

					<description><![CDATA[In this post we will see how we can get rid of error &#8220;Your current settings do not allow file to be downloaded&#8221; in Windows server 2012. You will get this error whenever you try downloading a file in your server. For me it was one of the Azure Virtual Machine. Here I am going to share you a quick fix that you can do when you are facing this issue. I hope you will like this. Background As I said, I wanted to install Web Matrix in my virtual Machine so that I can install WordPress and MySQL for [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this post we will see how we can get rid of error &#8220;Your current settings do not allow file to be downloaded&#8221; in Windows server 2012. You will get this error whenever you try downloading a file in your server. For me it was one of the <a href="http://sibeeshpassion.com/category/Azure/" target="_blank">Azure </a><a href="http://sibeeshpassion.com/category/virtual-machine/" target="_blank">Virtual Machine</a>. Here I am going to share you a quick fix that you can do when you are facing this issue. I hope you will like this. </p>
<p><strong>Background</strong></p>
<p>As I said, I wanted to install Web Matrix in my virtual Machine so that I can install <a href="http://sibeeshpassion.com/category/WordPress" target="_blank">WordPress </a>and <a href="http://sibeeshpassion.com/category/MySQL/" target="_blank">MySQL </a> for one of my website.</p>
<div id="attachment_11886" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer.png"><img decoding="async" aria-describedby="caption-attachment-11886" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer-1024x661.png" alt="Download Microsoft Web Platform Installer" width="634" height="409" class="size-large wp-image-11886" srcset="/wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer-1024x661.png 1024w, /wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer-300x194.png 300w, /wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer-768x496.png 768w, /wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer-400x258.png 400w, /wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer-929x600.png 929w, /wp-content/uploads/2016/08/Download-Microsoft-Web-Platform-Installer.png 553w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-11886" class="wp-caption-text">Download Microsoft Web Platform Installer</p></div>
<p>When I try that, I got an error as follows.</p>
<div id="attachment_11887" style="width: 520px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/Alert-Your-current-settings-do-not-allow-this-file-to-be-downloaded.png"><img decoding="async" aria-describedby="caption-attachment-11887" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/Alert-Your-current-settings-do-not-allow-this-file-to-be-downloaded.png" alt="Alert - Your current settings do not allow this file to be downloaded" width="510" height="222" class="size-full wp-image-11887" srcset="/wp-content/uploads/2016/08/Alert-Your-current-settings-do-not-allow-this-file-to-be-downloaded.png 510w, /wp-content/uploads/2016/08/Alert-Your-current-settings-do-not-allow-this-file-to-be-downloaded-300x131.png 300w, /wp-content/uploads/2016/08/Alert-Your-current-settings-do-not-allow-this-file-to-be-downloaded-400x174.png 400w" sizes="(max-width: 510px) 100vw, 510px" /></a><p id="caption-attachment-11887" class="wp-caption-text">Alert &#8211; Your current settings do not allow this file to be downloaded</p></div>
<p><strong>Steps to fix your current settings do not allow file to be downloaded</strong></p>
<p><strong>Step 1: Go to your Internet Options of your Internet Explorer</strong></p>
<div id="attachment_11888" style="width: 371px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/Internet_Options.png"><img decoding="async" aria-describedby="caption-attachment-11888" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/Internet_Options.png" alt="Internet_Options" width="361" height="395" class="size-full wp-image-11888" srcset="/wp-content/uploads/2016/08/Internet_Options.png 361w, /wp-content/uploads/2016/08/Internet_Options-274x300.png 274w" sizes="(max-width: 361px) 100vw, 361px" /></a><p id="caption-attachment-11888" class="wp-caption-text">Internet_Options</p></div>
<p><strong>Step 2: Go to your Security tab -> Internet -> Custom level</strong></p>
<div id="attachment_11889" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/Security_Tab.png"><img decoding="async" aria-describedby="caption-attachment-11889" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/Security_Tab-1024x576.png" alt="Security_Tab" width="634" height="357" class="size-large wp-image-11889" srcset="/wp-content/uploads/2016/08/Security_Tab-1024x576.png 1024w, /wp-content/uploads/2016/08/Security_Tab-300x169.png 300w, /wp-content/uploads/2016/08/Security_Tab-768x432.png 768w, /wp-content/uploads/2016/08/Security_Tab-400x225.png 400w, /wp-content/uploads/2016/08/Security_Tab-1066x600.png 1066w, /wp-content/uploads/2016/08/Security_Tab.png 634w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-11889" class="wp-caption-text">Security_Tab</p></div>
<p><strong>Step 3: Go to Downloads and Enable it</strong></p>
<div id="attachment_11890" style="width: 504px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/Enable_Downloads.png"><img decoding="async" aria-describedby="caption-attachment-11890" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/Enable_Downloads.png" alt="Enable_Downloads" width="494" height="598" class="size-full wp-image-11890" srcset="/wp-content/uploads/2016/08/Enable_Downloads.png 494w, /wp-content/uploads/2016/08/Enable_Downloads-248x300.png 248w, /wp-content/uploads/2016/08/Enable_Downloads-400x484.png 400w" sizes="(max-width: 494px) 100vw, 494px" /></a><p id="caption-attachment-11890" class="wp-caption-text">Enable_Downloads</p></div>
<p><strong>Step 4: Click Yes and OK</strong></p>
<div id="attachment_11891" style="width: 463px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/Warning_for_setting_change.png"><img decoding="async" aria-describedby="caption-attachment-11891" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/Warning_for_setting_change.png" alt="Warning_for_setting_change" width="453" height="155" class="size-full wp-image-11891" srcset="/wp-content/uploads/2016/08/Warning_for_setting_change.png 453w, /wp-content/uploads/2016/08/Warning_for_setting_change-300x103.png 300w, /wp-content/uploads/2016/08/Warning_for_setting_change-400x137.png 400w" sizes="(max-width: 453px) 100vw, 453px" /></a><p id="caption-attachment-11891" class="wp-caption-text">Warning_for_setting_change</p></div>
<p>Now if you try downloading again, you won&#8217;t get the error. Hope it helps.</p>
<div id="attachment_11892" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/08/After_setting_change.png"><img decoding="async" aria-describedby="caption-attachment-11892" src="http://sibeeshpassion.com/wp-content/uploads/2016/08/After_setting_change-1024x60.png" alt="After_setting_change" width="634" height="37" class="size-large wp-image-11892" srcset="/wp-content/uploads/2016/08/After_setting_change-1024x60.png 1024w, /wp-content/uploads/2016/08/After_setting_change-300x18.png 300w, /wp-content/uploads/2016/08/After_setting_change-768x45.png 768w, /wp-content/uploads/2016/08/After_setting_change-400x24.png 400w, /wp-content/uploads/2016/08/After_setting_change.png 1207w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-11892" class="wp-caption-text">After_setting_change</p></div>
<p><strong>Conclusion</strong></p>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<p><strong>Your turn. What do you think?</strong></p>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/your-current-settings-do-not-allow-file-to-be-downloaded/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Briefly unavailable for scheduled maintenance Check back in a minute</title>
		<link>https://mail.sibeeshpassion.com/briefly-unavailable-for-scheduled-maintenance-check-back-in-a-minute/</link>
					<comments>https://mail.sibeeshpassion.com/briefly-unavailable-for-scheduled-maintenance-check-back-in-a-minute/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Fri, 01 Jul 2016 05:59:07 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[WordPress Errors]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11758</guid>

					<description><![CDATA[In this post we will see how we can get rid of error &#8220;Briefly unavailable for scheduled maintenance Check back in a minute&#8221; in WordPress. If you are working with WordPress or if your blog or website is in WordPress, you may face this issue whenever you are updating any plugins or updating the WordPress core.But sometime what happens is, even if the update process is finished, your site will be under maintenance mode. Here I am going to share you a quick fix that you can do when you are facing this issue. I hope you will like this. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this post we will see how we can get rid of error &#8220;Briefly unavailable for scheduled maintenance Check back in a minute&#8221; in <a href="http://sibeeshpassion.com/category/wordpress" target="_blank">WordPress</a>. If you are working with WordPress or if your blog or website is in WordPress, you may face this issue whenever you are updating any <a href="http://sibeeshpassion.com/tag/wordpress-plugins/" target="_blank">plugins </a>or updating the WordPress core.But sometime what happens is, even if the update process is finished, your site will be under maintenance mode. Here I am going to share you a quick fix that you can do when you are facing this issue. I hope you will like this. </p>
<p><strong>Background</strong></p>
<p>I always used to update my WordPress core and the plugins when ever there is an update. So I faced this issue &#8220;Briefly unavailable for scheduled maintenance Check back in a minute&#8221; so many times. So thought of sharing you a quick for the same. </p>
<div id="attachment_11762" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/07/Briefly-Unavailable-Error-e1467352676598.png"><img decoding="async" aria-describedby="caption-attachment-11762" src="http://sibeeshpassion.com/wp-content/uploads/2016/07/Briefly-Unavailable-Error-e1467352676598.png" alt="Briefly Unavailable Error" width="650" height="81" class="size-full wp-image-11762" srcset="/wp-content/uploads/2016/07/Briefly-Unavailable-Error-e1467352676598.png 650w, /wp-content/uploads/2016/07/Briefly-Unavailable-Error-e1467352676598-300x37.png 300w, /wp-content/uploads/2016/07/Briefly-Unavailable-Error-e1467352676598-400x50.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11762" class="wp-caption-text">Briefly Unavailable Error</p></div>
<p><strong>Steps to remove the error Briefly unavailable for scheduled maintenance Check back in a minute</strong></p>
<p><strong>Step 1: Go to your file explorer</strong></p>
<div id="attachment_11759" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/07/File-Explorer-e1467352402848.png"><img decoding="async" aria-describedby="caption-attachment-11759" src="http://sibeeshpassion.com/wp-content/uploads/2016/07/File-Explorer-e1467352402848.png" alt="File Explorer" width="650" height="90" class="size-full wp-image-11759" srcset="/wp-content/uploads/2016/07/File-Explorer-e1467352402848.png 650w, /wp-content/uploads/2016/07/File-Explorer-e1467352402848-300x42.png 300w, /wp-content/uploads/2016/07/File-Explorer-e1467352402848-400x55.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11759" class="wp-caption-text">File Explorer</p></div>
<p><strong>Step 2: Go to your ftp folder</strong></p>
<p>You can either go to your ftp folder via file explorer or using ftp clients like FileZilla.</p>
<div id="attachment_11760" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/07/Ftp-Folder-e1467352522920.png"><img decoding="async" aria-describedby="caption-attachment-11760" src="http://sibeeshpassion.com/wp-content/uploads/2016/07/Ftp-Folder-e1467352522920.png" alt="Ftp Folder" width="650" height="72" class="size-full wp-image-11760" srcset="/wp-content/uploads/2016/07/Ftp-Folder-e1467352522920.png 650w, /wp-content/uploads/2016/07/Ftp-Folder-e1467352522920-300x33.png 300w, /wp-content/uploads/2016/07/Ftp-Folder-e1467352522920-400x44.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11760" class="wp-caption-text">Ftp Folder</p></div>
<p><strong>Step 3: Find the .maintenance file and delete</strong></p>
<p>Check for .maintenance file in the root folder and delete that.</p>
<div id="attachment_11761" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/07/Maintenence-File-e1467352597979.png"><img decoding="async" aria-describedby="caption-attachment-11761" src="http://sibeeshpassion.com/wp-content/uploads/2016/07/Maintenence-File-e1467352597979.png" alt="Maintenence File" width="650" height="146" class="size-full wp-image-11761" srcset="/wp-content/uploads/2016/07/Maintenence-File-e1467352597979.png 650w, /wp-content/uploads/2016/07/Maintenence-File-e1467352597979-300x67.png 300w, /wp-content/uploads/2016/07/Maintenence-File-e1467352597979-400x90.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11761" class="wp-caption-text">Maintenence File</p></div>
<p>Now if you refresh your WordPress site, it will be running fine. Hope it helps.</p>
<p><strong>Conclusion</strong></p>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<p><strong>Your turn. What do you think?</strong></p>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/briefly-unavailable-for-scheduled-maintenance-check-back-in-a-minute/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Time Zone Calculator</title>
		<link>https://mail.sibeeshpassion.com/time-zone-calculator/</link>
					<comments>https://mail.sibeeshpassion.com/time-zone-calculator/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 30 Jun 2016 00:00:16 +0000</pubDate>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Find TimeZone using jQuery]]></category>
		<category><![CDATA[Google Map]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Timezone in clientside]]></category>
		<category><![CDATA[Using Google Map]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11726</guid>

					<description><![CDATA[In this post we will try to create a time zone calculator. We will be calculating the timezone in two ways. Using normal jQuery functions Using Google API We will be using Visual Studio as our IDE. For jQuery implementation we will be creating some prototypes. hope you will like this. Download Source Code You can always download the source code from here: Time Zone Calculator Background In one of my project, we were saving some date values in UTC format in the server. And when we return the data we were not doing any calculation like converting the same [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this post we will try to create a time zone calculator. We will be calculating the timezone in two ways.</p>
<li>Using normal <a href="http://sibeeshpassion.com/category/jQuery/" target="_blank">jQuery</a> functions</li>
<li>Using Google API</li>
<p>We will be using <a href="http://sibeeshpassion.com/category/tools/visual-studio/" target="_blank">Visual Studio</a> as our IDE. For jQuery implementation we will be creating some prototypes. hope you will like this. </p>
<p><strong>Download Source Code</strong></p>
<p>You can always download the source code from here: <a href="https://code.msdn.microsoft.com/Time-Zone-Calculator-1f8f618e" target="_blank">Time Zone Calculator</a></p>
<p><strong>Background</strong></p>
<p>In one of my project, we were saving some date values in UTC format in the server. And when we return the data we were not doing any calculation like converting the same date values to users location time, if it is India (UTC &#8211; IST), therefore I was asked to get the time zone values from client side and pass the same value to the server in each request. I had done this, and here I will show you how. As I explained above, we can do this in two ways. </p>
<li>Using normal <a href="http://sibeeshpassion.com/category/jQuery/" target="_blank">jQuery</a> functions</li>
<li>Using Google API</li>
<p>We will be explaining these two methods one by one. </p>
<p><strong>Using the code</strong></p>
<p>First of all, create a new project in visual studio and install jQuery and bootstrap from NuGet package manager. Once your project is ready, we will start implementing our first method. </p>
<p><strong>Using jQuery functions</strong></p>
<p>The first thing you need to do here is adding the needed elements to UI.</p>
<p>[html]<br />
   &lt;div class=&quot;col-sm-6&quot;&gt;<br />
                &lt;h3&gt;Using jQuery prototype function&lt;/h3&gt;<br />
                &lt;p&gt;Here we are going to use prototype functions we created&lt;/p&gt;<br />
                &lt;div class=&quot;form-group&quot;&gt;<br />
                    &lt;label class=&quot;label label-primary&quot;&gt;Please select date:&lt;/label&gt;<br />
                    &lt;br /&gt;<br />
                    &lt;br /&gt;<br />
                    &lt;input class=&quot;form-control&quot; type=&quot;text&quot; id=&quot;txtTimeZone&quot; /&gt;<br />
                    &lt;br /&gt;<br />
                    &lt;br /&gt;<br />
                    &lt;input type=&quot;button&quot; value=&quot;Submit&quot; id=&quot;btnSubmit&quot; class=&quot;btn btn-primary btn-block&quot;/&gt;<br />
                    &lt;br /&gt;<br />
                    &lt;div class=&quot;panel panel-default&quot;&gt;<br />
                        &lt;div id=&quot;placeholder&quot; class=&quot;panel-body&quot;&gt;&lt;/div&gt;<br />
                    &lt;/div&gt;<br />
                &lt;/div&gt;<br />
            &lt;/div&gt;<br />
[/html]</p>
<p>Please add the needed references to your page.</p>
<p>[html]<br />
 &lt;link href=&quot;Content/themes/base/all.css&quot; rel=&quot;stylesheet&quot; /&gt;<br />
&lt;link href=&quot;Content/bootstrap.min.css&quot; rel=&quot;stylesheet&quot; /&gt;<br />
    &lt;link href=&quot;Content/Index.css&quot; rel=&quot;stylesheet&quot; /&gt;<br />
    &lt;script src=&quot;Scripts/jquery-2.2.3.min.js&quot;&gt;&lt;/script&gt;<br />
    &lt;script src=&quot;Scripts/jquery-ui-1.11.4.min.js&quot;&gt;&lt;/script&gt;<br />
[/html]</p>
<p>Now, we are going to create some date prototypes to a js file <em>TimeZone.js</em> so that we can use it with any date objects. </p>
<p>[js]<br />
Date.prototype.dst = function () {<br />
    return this.getTimezoneOffset() &lt; this.stdTimezoneOffset();<br />
}<br />
[/js]</p>
<p>The above code is for finding whether the daylight time is ON or OFF, if it returns true means, the daylight time is OFF.</p>
<p>[js]<br />
Date.prototype.stdTimezoneOffset = function () {<br />
    var jan = new Date(this.getFullYear(), 0, 1);<br />
    var jul = new Date(this.getFullYear(), 6, 1);<br />
    return (Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()) * -1);<br />
}<br />
[/js]</p>
<p>The above prototype can be called when the daylight time is OFF.</p>
<p>[js]<br />
Date.prototype.stdTimezoneOnset = function () {<br />
    var jan = new Date(this.getFullYear(), 0, 1);<br />
    var jul = new Date(this.getFullYear(), 6, 1);<br />
    return (Math.min(jan.getTimezoneOffset(), jul.getTimezoneOffset()) * -1);<br />
}<br />
[/js]</p>
<p>The above prototype can be called when the daylight time is ON.</p>
<p>Now we have created all the prototypes needed, shall we go and call use these now?</p>
<p>[js]<br />
 $(document).ready(function () {<br />
    $(&quot;#txtTimeZone&quot;).datepicker();<br />
    $(&#8216;#btnSubmit&#8217;).click(function () {<br />
        var dayLight = new Date();<br />
        dayLight = new Date($(&#8216;#txtTimeZone&#8217;).val());<br />
        if (dayLight.dst()) {<br />
            timeZoneValue = dayLight.stdTimezoneOffset();// Day light time is OFF<br />
        } else {<br />
            timeZoneValue = dayLight.stdTimezoneOnset();// Day light time is ON<br />
        }<br />
        $(&quot;#placeholder&quot;).text(&#8216;The time zone value for &#8216; + dayLight + &#8216; is &#8216; + timeZoneValue);<br />
    });<br />
});<br />
[/js]</p>
<p>Please run your page now to check the output. </p>
<div id="attachment_11727" style="width: 597px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery.png"><img decoding="async" aria-describedby="caption-attachment-11727" src="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery.png" alt="Time zone calculation using jQuery" width="587" height="354" class="size-full wp-image-11727" srcset="/wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery.png 587w, /wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-300x181.png 300w, /wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-400x241.png 400w" sizes="(max-width: 587px) 100vw, 587px" /></a><p id="caption-attachment-11727" class="wp-caption-text">Time zone calculation using jQuery</p></div>
<div id="attachment_11728" style="width: 598px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-output.png"><img decoding="async" aria-describedby="caption-attachment-11728" src="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-output.png" alt="Time zone calculation using jQuery output" width="588" height="361" class="size-full wp-image-11728" srcset="/wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-output.png 588w, /wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-output-300x184.png 300w, /wp-content/uploads/2016/06/Time-zone-calculation-using-jQuery-output-400x246.png 400w" sizes="(max-width: 588px) 100vw, 588px" /></a><p id="caption-attachment-11728" class="wp-caption-text">Time zone calculation using jQuery output</p></div>
<p>Now we will implement the second method, is that fine?</p>
<p><strong>Using Google API</strong></p>
<p>Before we start, please get your own map API key from google, you can follow this <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key" target="_blank">link </a>to get a one.</p>
<p>I hope you got your own key now, if yes, you are ready to go. Please add some controls as below to your page. </p>
<p>[html]<br />
&lt;div class=&quot;col-sm-6&quot;&gt;<br />
                &lt;h3&gt;Using Google API&lt;/h3&gt;<br />
                &lt;p&gt;Here we are going to use Google API&lt;/p&gt;<br />
                &lt;div class=&quot;form-group&quot;&gt;<br />
                    &lt;input id=&quot;pac-input&quot; class=&quot;controls&quot; type=&quot;text&quot; placeholder=&quot;Search Box&quot;&gt;<br />
                    &lt;div id=&quot;map&quot;&gt;&lt;/div&gt;<br />
                    &lt;script async defer src=&quot;https://maps.googleapis.com/maps/api/js?key=yourkey&amp;libraries=places&amp;callback=initAutocomplete&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />
                    &lt;div class=&quot;panel panel-default&quot;&gt;<br />
                        &lt;div id=&quot;latlon&quot; class=&quot;panel-body&quot;&gt;&lt;/div&gt;<br />
                    &lt;/div&gt;<br />
                &lt;/div&gt;<br />
            &lt;/div&gt;<br />
[/html]</p>
<p>Here <em>initAutocomplete</em> is the callback function which we are going to write now. </p>
<p>[js]<br />
   function initAutocomplete() {<br />
    var map = new google.maps.Map(document.getElementById(&#8216;map&#8217;), {<br />
        center: { lat: -33.8688, lng: 151.2195 },<br />
        zoom: 13,<br />
        mapTypeId: google.maps.MapTypeId.ROADMAP<br />
    });<br />
    // Create the search box and link it to the UI element.<br />
    var input = document.getElementById(&#8216;pac-input&#8217;);<br />
    var searchBox = new google.maps.places.SearchBox(input);<br />
    map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);<br />
    // Bias the SearchBox results towards current map&#8217;s viewport.<br />
    map.addListener(&#8216;bounds_changed&#8217;, function () {<br />
        searchBox.setBounds(map.getBounds());<br />
    });<br />
    var markers = [];<br />
    // Listen for the event fired when the user selects a prediction and retrieve<br />
    // more details for that place.<br />
    searchBox.addListener(&#8216;places_changed&#8217;, function () {<br />
        var places = searchBox.getPlaces();<br />
        debugger;<br />
        if (places.length == 0) {<br />
            return;<br />
        }</p>
<p>        // Clear out the old markers.<br />
        markers.forEach(function (marker) {<br />
            marker.setMap(null);<br />
        });<br />
        markers = [];</p>
<p>        // For each place, get the icon, name and location.<br />
        var bounds = new google.maps.LatLngBounds();<br />
        places.forEach(function (place) {<br />
            var icon = {<br />
                url: place.icon,<br />
                size: new google.maps.Size(71, 71),<br />
                origin: new google.maps.Point(0, 0),<br />
                anchor: new google.maps.Point(17, 34),<br />
                scaledSize: new google.maps.Size(25, 25)<br />
            };</p>
<p>            // Create a marker for each place.<br />
            markers.push(new google.maps.Marker({<br />
                map: map,<br />
                icon: icon,<br />
                title: place.name,<br />
                position: place.geometry.location<br />
            }));<br />
            $(&#8216;#latlon&#8217;).text(place.geometry.location.lat() + &#8216;,&#8217; + place.geometry.location.lng() + &#8216;, The time zone value is &#8216; + place.utc_offset);<br />
            if (place.geometry.viewport) {<br />
                // Only geocodes have viewport.<br />
                bounds.union(place.geometry.viewport);<br />
            } else {<br />
                bounds.extend(place.geometry.location);<br />
            }<br />
        });<br />
        map.fitBounds(bounds);<br />
    });<br />
}<br />
[/js]</p>
<p>And following is the custom code we have written for showing the timezone values to our text box. </p>
<p>[js]<br />
 $(&#8216;#latlon&#8217;).text(place.geometry.location.lat() + &#8216;,&#8217; + place.geometry.location.lng() + &#8216;, The time zone value is &#8216; + place.utc_offset);<br />
[/js]</p>
<p>Now it is time to add our styles. </p>
<p>[css]<br />
#map {<br />
    width: 100%;<br />
    height: 200px;<br />
    background-color: #CCC;<br />
}</p>
<p>.controls {<br />
    margin-top: 10px;<br />
    border: 1px solid transparent;<br />
    border-radius: 2px 0 0 2px;<br />
    box-sizing: border-box;<br />
    -moz-box-sizing: border-box;<br />
    height: 32px;<br />
    outline: none;<br />
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);<br />
}</p>
<p>#pac-input {<br />
    background-color: #fff;<br />
    font-family: Roboto;<br />
    font-size: 15px;<br />
    font-weight: 300;<br />
    margin-left: 12px;<br />
    padding: 0 11px 0 13px;<br />
    text-overflow: ellipsis;<br />
    width: 300px;<br />
}</p>
<p>    #pac-input:focus {<br />
        border-color: #4d90fe;<br />
    }</p>
<p>.pac-container {<br />
    font-family: Roboto;<br />
}</p>
<p>#type-selector {<br />
    color: #fff;<br />
    background-color: #4d90fe;<br />
    padding: 5px 11px 0px 11px;<br />
}</p>
<p>    #type-selector label {<br />
        font-family: Roboto;<br />
        font-size: 13px;<br />
        font-weight: 300;<br />
    }</p>
<p>#target {<br />
    width: 345px;<br />
}</p>
<p>[/css]</p>
<blockquote><p>Please be noted that if you don&#8217;t set height for the map container div, the map may not get loaded</p></blockquote>
<p>So I have given the CSS for my map container as follows.</p>
<p>[css]<br />
#map {<br />
    width: 100%;<br />
    height: 200px;<br />
    background-color: #CCC;<br />
}<br />
[/css]</p>
<p>Now please run your page, you can see a map in your page. Please search for any location, it will give you the timezone value for the given location. Shall we check?</p>
<div id="attachment_11729" style="width: 620px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-using-Google-API.png"><img decoding="async" aria-describedby="caption-attachment-11729" src="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-using-Google-API.png" alt="Time zone calculation using Google API" width="610" height="375" class="size-full wp-image-11729" srcset="/wp-content/uploads/2016/06/Time-zone-calculation-using-Google-API.png 610w, /wp-content/uploads/2016/06/Time-zone-calculation-using-Google-API-300x184.png 300w, /wp-content/uploads/2016/06/Time-zone-calculation-using-Google-API-400x246.png 400w" sizes="(max-width: 610px) 100vw, 610px" /></a><p id="caption-attachment-11729" class="wp-caption-text">Time zone calculation using Google API</p></div>
<p>Please make sure that the value you get from both ways is same. </p>
<div id="attachment_11730" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation.png"><img decoding="async" aria-describedby="caption-attachment-11730" src="http://sibeeshpassion.com/wp-content/uploads/2016/06/Time-zone-calculation-1024x512.png" alt="Time zone calculation" width="634" height="317" class="size-large wp-image-11730" srcset="/wp-content/uploads/2016/06/Time-zone-calculation-1024x512.png 1024w, /wp-content/uploads/2016/06/Time-zone-calculation-300x150.png 300w, /wp-content/uploads/2016/06/Time-zone-calculation-768x384.png 768w, /wp-content/uploads/2016/06/Time-zone-calculation-400x200.png 400w, /wp-content/uploads/2016/06/Time-zone-calculation.png 634w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-11730" class="wp-caption-text">Time zone calculation</p></div>
<p>That&#8217;s all, have a happy coding!.</p>
<p><strong>Conclusion</strong></p>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<p><strong>Your turn. What do you think?</strong></p>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/time-zone-calculator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Story of a professional</title>
		<link>https://mail.sibeeshpassion.com/story-of-a-professional/</link>
					<comments>https://mail.sibeeshpassion.com/story-of-a-professional/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Mon, 27 Jun 2016 06:48:37 +0000</pubDate>
				<category><![CDATA[Career Advice]]></category>
		<category><![CDATA[Stories]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Motivation]]></category>
		<category><![CDATA[My Story]]></category>
		<category><![CDATA[Professional Growth]]></category>
		<category><![CDATA[quotes]]></category>
		<category><![CDATA[Story]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11697</guid>

					<description><![CDATA[Disclaimer Here, I am going to share with you my story, of being considered an IT professional. I had been thinking about sharing my story with you for a long time. And now I decide that it is time. Please share me your thoughts and feedback. That really matters a lot to me, you have no idea how much I love to hear from you. Podcasts Amazon Google Apple My book Take your Raspberry Pi further with Asp.net and Microsoft Azure. Run .Net Core applications on Raspberry Pi and turn your Pi into an IoT hub or use it for [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Disclaimer</h2>



<p>Here, I am going to share with you my story, of being considered an IT professional. I had been thinking about sharing my story with you for a long time. And now I decide that it is time. Please share me your thoughts and feedback. That really matters a lot to me, you have no idea how much I love to hear from you.</p>



<h2 class="wp-block-heading">Podcasts</h2>



<ul class="wp-block-list"><li><a href="https://www.amazon.com/Network-Continuous-Learner-Relevant-Sibeesh/dp/B08KVCLZKP">Amazon</a></li><li><a href="https://podcasts.google.com/feed/aHR0cHM6Ly9pdGNhcmVlcmVuZXJnaXplci5saWJzeW4uY29tL3Jzcw/episode/ZWM4NjNlM2ZmMDFjNGUwMjk0NGM2OTZmYThmMjM2ZmM?sa=X&amp;ved=2ahUKEwjnjZ3ZicftAhUUH1kKHXjzBzQQkfYCegQIARAG">Google</a></li><li><a href="https://podcasts.apple.com/au/podcast/build-strong-network-become-continuous-learner-to-stay/id1231387865?i=1000441443155">Apple</a></li></ul>



<h2 class="wp-block-heading">My book</h2>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Take your Raspberry Pi further with Asp.net and Microsoft Azure. Run .Net Core applications on Raspberry Pi and turn your Pi into an IoT hub or use it for Edge and Central computing.</p><p>Get your copy <a href="https://www.amazon.com/Asp-Net-Core-Azure-Raspberry-Applications/dp/1484264428/ref=tmm_pap_swatch_0?_encoding=UTF8&amp;qid=1618766427&amp;sr=8-1">here</a>.</p></blockquote>



<h2 class="wp-block-heading">Let me introduce myself</h2>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2016/06/Sibeesh-Venu-Microsoft-MVP.png"><img decoding="async" width="535" height="357" src="https://sibeeshpassion.com/wp-content/uploads/2016/06/Sibeesh-Venu-Microsoft-MVP.png" alt="Sibeesh Venu Microsoft MVP" class="wp-image-12953" srcset="/wp-content/uploads/2016/06/Sibeesh-Venu-Microsoft-MVP.png 535w, /wp-content/uploads/2016/06/Sibeesh-Venu-Microsoft-MVP-300x200.png 300w, /wp-content/uploads/2016/06/Sibeesh-Venu-Microsoft-MVP-400x267.png 400w" sizes="(max-width: 535px) 100vw, 535px" /></a><figcaption>Sibeesh Venu Microsoft MVP (2016 &#8211; 2022)</figcaption></figure></div>



<p>In short, An engineer by profession and writer by passion. I have written close to 500 blogs on my&nbsp;<a rel="noreferrer noopener" href="https://sibeeshpassion.com/" target="_blank">blog</a>. And I upload videos on my YouTube channels&nbsp;<a rel="noreferrer noopener" href="https://www.youtube.com/njanorumalayali" target="_blank">Njan Oru Malayali</a>&nbsp;and&nbsp;<a rel="noreferrer noopener" href="https://www.youtube.com/SibeeshPassion" target="_blank">Sibeesh Passion</a>. I like photography and usually <a href="https://unsplash.com/@sibeeshvenu">upload pictures on Unsplash</a>. You can find my achievements <a rel="noopener" href="https://sibeeshpassion.com/awards/" target="_blank">here.</a> You can always see my online resume <a href="https://sibeeshvenu.com">here.</a></p>



<h2 class="wp-block-heading">The professional cycle</h2>



<p>Here I am going to say about each cycle that I have gone through in my life.</p>



<h3 class="wp-block-heading">Childhood</h3>



<p>There is a place called Trichur, a district of the state of Kerala in India (which is also known as “God&#8217;s own country”). That is where I was born. My childhood was not that good, as we didn’t have enough money for living. My mom struggled a lot to make each day liveable. But we were happy together. In our childhood, we played so many things, games which are unknown to the new generation. </p>



<p>In the year 2007, I passed my HSC from GHSS. My favorite subjects were Computer Science and Chemistry, yeah there is a reason behind it. The teachers of those two subjects were amazing, we were good friends in fact. Those two years (2005 to 2007) were beautiful.</p>



<p>Coming back to life. I have two elder sisters, as we were belonging to a poor class family, my parents were not able to make us graduate. Eventually, that chance came to me as I was born a boy. Yeah, that&#8217;s true, in India we had this comparison of boys and girls in that decade. So it was I chosen as a warrior, warrior to solve all of our financial crises and other problem, a wall, which acts as a barrier to the problems.</p>



<p>I usually go to work during my vacation time. Here in India, we get 2 months of leave every year. So, I utilize these two months for going to work and earn a bit amount of money so that I can help my family. Most of the time the daily payment was about 100 -150 INR (That&#8217;s 2 or 3 $). The time of the work was 8.00 am &#8211; 6.00 pm. The feeling of getting hard-earned money each day was amazing.</p>



<p>I bought my first favorite branded Jean with the amount I earned in my 10th class (SSLC) vacation. And I bought my first mobile (Nokia 111oi) with my 12th class vacation salary.</p>



<p>Finally, I joined Engineering with my friend Ajay, he is the one who boosted me to select engineering. Trust me, I would have chosen some <strong>coolie work</strong>, where we get paid around 200 &#8211; 300 INR (Now it is 8$) daily. Thank you, Ajay, you have put the first light on my career.</p>



<h3 class="wp-block-heading">Engineering College</h3>



<p>I was a backbencher (second last, most of the time). I still don&#8217;t know why I was not studying enough there, in every exam somehow managed only to get a pass mark, not less, not more. Please be noted that this is my story, there were students who were scoring 100 out of 100.</p>



<p>I must say that, apart from teaching, the college was fantastic, we had full freedom. What are all the things you will do when you get full freedom at that age? As a result, studies were postponed to just a day before the exam. I have got many friends there, we enjoyed ourselves a lot even if no one had money in our hands. How many of you wish to go back to your college life, where you don&#8217;t have as much money as you have now? I am sure, you still wish to go back. Again I must say thanks to all my friends to make those days wonderful. I wasn&#8217;t a dreamer in those days, I was not even having an aim, the only goal I set in mind was to get a job as soon as possible.</p>



<p>Finally, I got my engineering degree in the year 2011 (luckily with no arrears).</p>



<h3 class="wp-block-heading">Internship at HCL CDC, a step towards a job</h3>



<p>In a wink, four years passed. Finally, I was an Engineer (<span style="text-decoration: underline;">with no job</span>). There was not even one campus recruitment in my college. How does it sound? After all, it doesn’t matter where your life takes you, what matters is how you are facing it.</p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/06/How-you-see-yourself-e1467010408680.jpg"><img decoding="async" src="http://sibeeshpassion.com/wp-content/uploads/2016/06/How-you-see-yourself-804x1024.jpg" alt="How you see yourself" class="wp-image-11702"/></a><figcaption>How you see yourself</figcaption></figure></div>



<p><em>What matters most is, how you see yourself.</em></p>



<p>Few days after I managed to get a job in <strong>a hotel as a receptionist</strong>, where the employees were forced to spend almost 15 hours a day. Even though it was not related to my degree, I continued to do that job, I hardly needed a job. The only thing I wanted was money, no matter how little it is.</p>



<p>Usually, the wok timing was 8.00 AM to 11 PM, in between we were allowed for a tea break and lunch break. E<span style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">very night I was saying to my mind that this is not something that I need, but again in the morning I woke up and go to the hotel.&nbsp; A few days later I decided to quit that job.&nbsp;</span>I could do that job only for two months. That was the moment I got such a huge amount of money in my hand (6200 Indian Rupees). My two months’ salary, felt really good.</p>



<p>I was almost running to catch my bus to go home, as it was hectic two months without seeing my parents. I bought an umbrella for myself before going home (a 3 fold one, that was the trend at that time), and I gave all the remaining money to my mom. Can you guess how would that moment be?</p>



<p>After a few days, back to coding, in my 12th class, I took Computer science, I must thank my computer science teacher Jisha here. She is the one who taught me coding. In my Engineering classes, coding was a rare thing. I joined a Dot Net course at HCL CDC Trichur, Kerala. We were a group of 5 people from college (Me, Ajay, Ansary, Murali, Aghil), who decided to join this course. And yeah, we were doing very well there, it was not the same as in college life, we become mature, we were paying attention to each class, we were doing demos. The best part is, we joined a mentorship program there and could teach a few students there while we were studying, my first mentoring program.</p>



<p>Yeah, I was continuing the internship program there in HCL CDC till my course ends (6 months). Thanks to all HCL CDC members for giving me that opportunity. I started my professional career there.</p>



<p>I got my first reward Certificate of excellence, my first professional award.</p>



<h3 class="wp-block-heading">Moving to Chennai</h3>



<p>Later in my career, I got a job in a small company as a software trainee. I still remember the day, how I went for the interview there, if I am right, I was ill with a high fever. But I had to make a move and attend the interview, so I and my friend Ansary boarded a local train to Chennai, Tamilnadu.</p>



<p>We passed the interview, and we joined that company, the salary was 5000 INR per month, living in Chennai with 5000 rupees was indeed a tough task. But luckily, we were able to sustain that. After a year, I got a salary increment of 12,000 rupees per month, which was a great relief. Finally, I was starting to have a relaxed life.</p>



<h3 class="wp-block-heading">Joining in C# corner</h3>



<p>In the year 2012, I came to know about the communities and how people are helping each other in our professional world. I joined C# corner, which was my first step toward community contribution. As you all know starting things are pretty much easy, continuing is not. There was no participation&#8217;s from my end for another two years, I got buried in my office work.</p>



<p>In the year 2014, I logged in to C# corner again and started contributing to the community. There I received a warm welcome from all the C# corner family members. I really appreciate that. Many thanks to C# corner. And from 2014, I was on the monthly winner&#8217;s list of C# corner several times, and my articles were selected in Asp.Net as the article of the day page. These things really motivated me to contribute more.</p>



<p>In Jan 2015, I was awarded as C# corner MVP, my first C# Corner MVP award. I was really happy that I was given a chance to be a part of the C# Corner annual conference as a result. That was the place where I got to know about the Microsoft MVP program. I had set my goal of becoming a Microsoft MVP there.</p>



<p>In the year 2015, I started my own blog and joined DZone, where I have been awarded MVB (Most Valuable Blogger).</p>



<p>In Jan 2016, I was awarded C# Corner MVP for the second time. I was super excited to see my contributions were recognized. Thanks much to all of my readers. I kept contributing to communities like C# corner, Code Project, DZone, MSDN, Asp.Net, Stack Overflow, Tech-Net, etc.</p>



<p>2016, April 1st was the day that I can never forget in my life. There is a saying “Patience pays off”. It is true, I got rewarded for my patience and hard work. I would treat this as one of the great achievements in my life. Feeling proud to be a part of such a great community. I was supercharged to read a mail received in my mailbox, saying that I had been selected as Microsoft MVP. I was screaming like anything, for a few minutes I forgot that I was in the office.</p>



<h3 class="wp-block-heading">Effect of being a Microsoft MVP</h3>



<p>After my first Microsoft MVP award, the following days were fantastic, each day my inbox was filled with appreciation emails and congratulations from my colleagues and friends. Many thanks to my Employer Customer Analytics India, the motivations you have shown were much appreciable. My image was published on my company website. I felt proud when I saw that. That was cool, right?</p>



<div class="wp-block-image"><figure class="aligncenter"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/06/MVP_CA.png"><img decoding="async" width="309" height="240" src="http://sibeeshpassion.com/wp-content/uploads/2016/06/MVP_CA.png" alt="Sibeesh Venu CA Employee" class="wp-image-11698" srcset="/wp-content/uploads/2016/06/MVP_CA.png 309w, /wp-content/uploads/2016/06/MVP_CA-300x233.png 300w" sizes="(max-width: 309px) 100vw, 309px" /></a><figcaption>Sibeesh Venu CA Employee</figcaption></figure></div>



<p>As an MVP, I was given the chance to be a part of Product Group Interaction (PGI) events organized by Microsoft. I met a lot of wonderful techie professionals, I learned a lot from them. I was recognized in the crowd, which was really new to me. And I enjoyed it, still enjoying it. It is a great feeling when people ask you for some suggestions or help, I really improved myself when giving suggestions or help. You will learn in that way a lot.</p>



<h3 class="wp-block-heading">Back to Kerala</h3>



<p>Though I had worked with many companies in my life, the one which I liked working with until this moment was, CA(Customer Analytics), which is where I started my community activities. The management was very friendly and supportive of my activities. But I had to leave that company as I thought of moving to my hometown, so I joined Cognizant Technology Solutions and applied for a transfer to Cochin. And it took over a year of a time span to get the transfer, and finally, I am back in Kerala in the year 2017.</p>



<p>It all went well, and now I am in a position to solve all of my financial crisis and other problems. I am doing that for almost 7 years now. The best part is, I started living with my own family, my world. Life is smooth now, and I could say that I have gained the capacity to make it straight and smooth no matter what the barrier is. Thanks a lot to my parents, for making me who I am today.</p>



<h3 class="wp-block-heading">Moving to Germany</h3>



<p>In September 2018 I moved to Germany as I had got a wonderful opportunity to work with medialesson GmbH, Germany. Life has its own Artificial Intelligence or Magic to surprise you in many ways, trust me, it does to me, so it will do to you the same. All you need is the patience to wait for your turn, always remember that the construction of a palace takes more time than an ordinary building.</p>



<p>I have this hobby of capturing the places I visit and always try to see the place through my camera. I have to admit that, I am not a great photographer, but it is something I love to do. I usually create a Facebook page for the cities I live. I did create one for Pforzheim, Germany, you can find it <a href="https://www.facebook.com/CityPforzheim/">here</a>. I would really appreciate your feedback on my Unsplash page <a href="https://unsplash.com/@sibeeshvenu">here</a>.</p>



<h3 class="wp-block-heading">Joining LiveTiles and Move to Sligo, Ireland</h3>



<p>It was one of the tough decisions in my career to move both from medialesson GmbH and Germany, and relocate to Sligo, Ireland. I joined LiveTiles as a Full Stack Developer Lead on March 8, 2021. I will be seeing Sligo through my camera and will be uploading the pictures here on the <a href="https://facebook.com/sligocounty">Facebook page</a>.</p>



<h3 class="wp-block-heading">Relieving from LiveTiles, Ireland</h3>



<p>25/02/2022 was my last day at LiveTiles, was an incredible journey. I learned a lot from my time at LiveTiles. Below are some of the achievements.</p>



<ol class="wp-block-list"><li>Chosen as one of the top 3 managers</li><li>Promoted as a Product Director from Full Stack Developer Lead</li><li>Received Get Shit Done award</li><li>Selected as best beard once (laugh)</li></ol>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh.jpg"><img decoding="async" width="1024" height="726" src="/wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh-1024x726.jpg" alt="" class="wp-image-14564" srcset="/wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh-1024x726.jpg 1024w, /wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh-300x213.jpg 300w, /wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh-768x545.jpg 768w, /wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh-1536x1090.jpg 1536w, /wp-content/uploads/2022/03/get-shit-done-award-livetiles-sibeesh.jpg 1748w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Get Shit Done Award</figcaption></figure></div>



<p>Thanks, LiveTiles for the opportunity.</p>



<h3 class="wp-block-heading">Joining Microsoft &#8211; Dublin, Ireland</h3>



<p>In April 2022, I joined Microsoft as a Software Engineer at the Dublin, Ireland location. It wasn&#8217;t easy to leave my previous employer, LiveTiles. I can&#8217;t wait to learn and explore more with Microsoft. I will keep you posted about my achievements. </p>



<h2 class="wp-block-heading">Video version of this Post (Malayalam)</h2>


<p><iframe loading="lazy" title="Malayalam Motivational Video | മലയാളം മീഡിയം, ദാരിദ്ര്യം, നിരവധി അവാർഡ്‌സ്, ജർമനിയിലെ എഞ്ചിനീയർ" width="1200" height="675" src="https://www.youtube.com/embed/AIXLTe4JdRw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>



<h2 class="wp-block-heading">Career advice</h2>



<p>I’m neither an expert nor a guru, but still, I would like to point out some do’s and don’ts which is a drop I learned from an ocean.</p>



<h3 class="wp-block-heading">Do’s</h3>



<ul class="wp-block-list"><li>Try to be a master in at least one technology you love. Talk, write an answer about that technology<br>you love.</li><li>Always get to know what is happening in the industry, try to be aware of the technologies released<br>each month.</li><li>Be passionate about the technologies.</li><li>Always participate in all the local user groups (Facebook, Linked In, Google Plus&#8230;)</li><li>Whenever you are given an opportunity to work or experience, never miss that chance. It can be in your office or in any crowd. Be confident and take that chance, it will do magic.</li><li>Last but not least always love your family and take care of their needs. This will give you the strength to move on.</li><li>Adjust your time/calendar for your career and family, work-life balance is very important. Isn’t it?</li></ul>



<h3 class="wp-block-heading">Don’ts</h3>



<ul class="wp-block-list"><li>Never run behind awards or titles, those will automatically come to you but it may take little time. There is a quote “Never worry about the delay of your success compared to others. Because construction of a palace takes more time than an ordinary building”.</li><li>Never do anything disrespectful to others, There are three things you cannot recover in life, the moment after it’s missed, the word after it’s said and the moment after it’s wasted.</li><li>Be you, and maintain it. Never pilfer what others have done.</li><li>We live in a society, and each people are different, so never criticize anyone, they have their own character like you do.</li><li>And do not show off, I am not saying showing off is a bad thing. But if you do it every time, everywhere, then there are high chances, that people will judge your character in the wrong way. There is a saying &#8221; The better you feel about yourself, the less you need to show off&#8221;</li><li>Never miss the best of your life, FAMILY.</li></ul>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Did I miss anything that you may think is needed? I hope you liked this article. Without your help and feedback, I would haven’t reached where I am today. Thanks much. Please share with me your valuable suggestions and feedback.</p>



<p>I always love motivational words, and reading them is one of my hobbies. Trust, sometimes, some words can do miracles in your life. I would like to conclude this post with some of the quotes which I like most.</p>



<ul class="wp-block-list"><li>Be yourself everyone else is already taken</li><li>Today is the tomorrow of yesterday</li><li>If opportunity doesn&#8217;t knock, build a door</li><li>To begin, Begin!</li><li>If you expect the world to be fair with you because you are fair,&nbsp; you&#8217;re fooling yourself. That&#8217;s like expecting the lion not to eat you because you didn&#8217;t eat him</li><li>Never worry about the delay of your success compared to others. Because construction of a palace takes more time than an ordinary building</li><li>I never lose. Either I win or I learn</li><li>The journey of a thousand miles begins with one step!</li><li>Being positive in a negative situation is a sign of wisdom and character!</li><li>No matter how good a person you are, there will always be someone criticizing you</li><li>Talk to yourself once a day, otherwise, you may miss meeting an excellent person in this world</li><li>If you’re going through hell, keep going</li><li>There are two ways of spreading light: be the candle or the mirror that reflects it</li><li>Believe you can and you’re halfway there</li><li>Anyone who has never made a mistake has never tried anything new</li><li>Less me, more we</li><li>You only live once, but if you do it right, once is enough</li><li>“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young.”</li></ul>



<h2 class="wp-block-heading">Your turn. What do you think?</h2>



<p>Thanks a lot for giving me the most important thing in your life, your time, and for reading my story. I would really appreciate your feedback on anything I have shared here. I wish you all the very best. Below are the places I am active, let&#8217;s connect there.</p>



<p><a href="https://medium.com/@sibeeshvenu">Medium</a></p>



<p><a href="https://github.com/SibeeshVenu">GitHub</a></p>



<p><a href="http://stackoverflow.com/users/5550507/sibeesh-venu">StackOverflow</a></p>



<p><a href="https://www.linkedin.com/in/sibeeshvenu/">LinkedIn</a></p>



<p><a href="https://www.facebook.com/SibeeshVenu/">Facebook</a></p>



<p><a href="https://twitter.com/sibeeshvenu">Twitter</a></p>



<p><a href="https://www.instagram.com/sibeeshvenu/">Instagram</a></p>



<p><a href="https://unsplash.com/@sibeeshvenu">Unsplash</a></p>



<p><a href="https://www.youtube.com/njanorumalayali">YouTube</a></p>



<p>Kindest Regards<br>Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/story-of-a-professional/feed/</wfw:commentRss>
			<slash:comments>25</slash:comments>
		
		
			</item>
		<item>
		<title>How To Write Good Articles</title>
		<link>https://mail.sibeeshpassion.com/how-to-write-good-articles/</link>
					<comments>https://mail.sibeeshpassion.com/how-to-write-good-articles/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Tue, 17 May 2016 12:26:29 +0000</pubDate>
				<category><![CDATA[Career Advice]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[How To]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11613</guid>

					<description><![CDATA[[toc] Introduction In this post, we are going to see a few points which may need to consider while you write an article. I am neither an expert nor a guru. But still, I guess I have improved myself in writing articles for the past two years. I still remember my first article, there were so many mistakes. Remember one thing &#8220;Mistakes are the key to success&#8221;. Here I will point out a few things, which I used to follow while writing articles. Please feel free to add your own points to this article. I hope you will like this. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h2>Introduction</h2>
<p>In this post, we are going to see a few points which may need to consider while you write an article. I am neither an expert nor a guru. But still, I guess I have improved myself in writing articles for the past two years. I still remember my first article, there were so many mistakes. Remember one thing &#8220;Mistakes are the key to success&#8221;. Here I will point out a few things, which I used to follow while writing articles. Please feel free to add your own points to this article. I hope you will like this.</p>
<h2>Background</h2>
<p>Last week one of my friends asked this question &#8216;How to write good articles?&#8217;. Here I am dedicating this article to him. I hope he will like this.</p>
<h2><strong>How to write a good article?</strong></h2>
<p>First of all let me ask you a question, what is a good article? As per my concern, a good article is the one which covers the needed points or solution about a problem/scenarios/technologies etc The important fact is when he/she read your article, they must be cleared what you had written, or else your article quality may fail. You are always welcomed to include some external links if you think that will cherish your article contents. Now we will list down the points. Most important thing is, you must search for an article with the same content as you have in your article, if you found any, you should start writing an article only if you have something more relevant to say more than those article. You can also explain how your article is differ from the other and why someone use yours. These points can also be included in the Introduction part which we are going to list down as our first point.</p>
<h3><strong>Point 1: Introduction</strong></h3>
<p>An Introduction is very important when you write an article, a good introduction can make your article viewer to read further. Trust me, it is very useful too. In this part, you can describe what exactly you are going to say/do in this article. It must be brief. And please never use any code blocks in your introduction part, it is never meant to be so. This is the part which lets your readers understand where/what exactly you are indent to do.</p>
<p><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Introduction-Where-exactly-you-are-making-your-readers-go-e1463466204966.jpg"><img decoding="async" class="size-full wp-image-11614 aligncenter" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Introduction-Where-exactly-you-are-making-your-readers-go-e1463466204966.jpg" alt="Introduction - Where exactly you are making your readers go" width="650" height="455" srcset="/wp-content/uploads/2016/05/Introduction-Where-exactly-you-are-making-your-readers-go-e1463466204966.jpg 510w, /wp-content/uploads/2016/05/Introduction-Where-exactly-you-are-making-your-readers-go-e1463466204966-300x210.jpg 300w, /wp-content/uploads/2016/05/Introduction-Where-exactly-you-are-making-your-readers-go-e1463466204966-400x280.jpg 400w" sizes="(max-width: 650px) 100vw, 650px" /></a> Introduction &#8211; Where exactly you are making your readers go</p>
<p>Image Courtesy: squarespace</p>
<h2><strong>Point 2: Background</strong></h2>
<p>In this part, you can explain what made you to write this article. You can explain the problems you faced here, or when you get this problem. This should be brief too, here you can include source code too. Please do remember that this is just the background, so it is not advisable to include full source code and explain it here.</p>
<h2><strong>Point 3: What you are going to do?</strong></h2>
<p>Here you can explain the things which you are going to do in this article. You can list down the things for better readability. You can explain these points one by one. You can also add some code snippets too. But whenever you add any code, please try to explain even if it is basics. That will help some beginners to understand the things easily. You may feel that this basic explanation is not necessary as you have got so many experience and you may be good in it. But what about the beginners? I always believe they are the real beneficiaries of your articles. We must concentrate on both kind of users (Beginners/Experienced).</p>
<p><div id="attachment_11617" style="width: 433px" class="wp-caption aligncenter"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/What-you-are-going-to-do.jpg"><img decoding="async" aria-describedby="caption-attachment-11617" class="size-full wp-image-11617" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/What-you-are-going-to-do.jpg" alt="What you are going to do" width="423" height="259" srcset="/wp-content/uploads/2016/05/What-you-are-going-to-do.jpg 423w, /wp-content/uploads/2016/05/What-you-are-going-to-do-300x184.jpg 300w, /wp-content/uploads/2016/05/What-you-are-going-to-do-400x245.jpg 400w" sizes="(max-width: 423px) 100vw, 423px" /></a><p id="caption-attachment-11617" class="wp-caption-text">What you are going to do</p></div></p>
<p>Image Courtesy: introvertadvantages</p>
<h2><strong>Point 4: How you are going to do?</strong></h2>
<p>This can be the continuation part of the point 3, or you can club each other. This is where you can explain the possible ways that you can fix your problem, Or the possible ways to achieve the same tasks. Any tasks can be achieved in different ways right? So when you write any article, you must think in all the perspective.</p>
<p><div id="attachment_11618" style="width: 386px" class="wp-caption aligncenter"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/How-to-do.gif"><img decoding="async" aria-describedby="caption-attachment-11618" class="size-full wp-image-11618" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/How-to-do.gif" alt="How to do" width="376" height="382" /></a><p id="caption-attachment-11618" class="wp-caption-text">How to do. Image Courtesy: oneidacity</p></div></p>
<p>This will make your article rich in good contents. And this is where you must concentrate more on the coding part. When you write codes in your article, it must be formatted well. If you use WordPress as CMS(Content Management System) for your blog, you can go for any syntax highlighter plugins, or you can custom your own. If you post the article in any of the social communities, please use their formatting options.</p>
<p>If you have any images which explains the workflow or any tasks, it is always advisable to include those. An image is more understandable than reading the content, but always strict yourself to not include more than 10 images per article. When you include the images, please try to convert them to a particular size (Example: Width: 650 PX), this will make your article looks good. But no worries, if you have a low resolution image, and if you think enlarging that will cause any clarity issues, you can always use the same without conversion.</p>
<p>One thing you must remember is, you can always include what are all the things you have tried and what was the output you got from that. If you do so, your reader will get to know if he/she does that, they would get the same output. So it is not only about the the scenario which works fine but also the errors/problems.</p>
<h2><strong>Point 4: Always include output</strong></h2>
<p>An output is the outcome of what we tried right? So what if you didn&#8217;t include that? Isn&#8217;t it bad? You can include the output as an image or any content. It can be any result set too.</p>
<p><div id="attachment_11619" style="width: 644px" class="wp-caption aligncenter"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Output-Image-e1463485884138.jpg"><img decoding="async" aria-describedby="caption-attachment-11619" class="size-large wp-image-11619" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Output-Image-1024x748.jpg" alt="Output Image" width="634" height="463" /></a><p id="caption-attachment-11619" class="wp-caption-text">Output Image</p></div></p>
<p>Image Courtesy: dreamstime</p>
<h2><strong>Point 5: Include the source code as a downloadable format</strong></h2>
<p>Please add source code as a downloadable format when ever it is possible. This will definitely help your reader, so that he/she doesn&#8217;t need to worry about the initial set up. We all are community guys, and we love helping each other. Am I right?</p>
<h2><strong>Point 6: Format the entire content</strong></h2>
<p>There are so many things you must concentrate when it comes to formatting. I am listing down a few of them here.</p>
<ul>
<li>Use the same font for the entire article</li>
<li>Use bold for the headings</li>
<li>Highlight the lines, if it is very important (Example: Notes)</li>
<li>Use code formatter when you write codes</li>
<li>Resize and align images properly</li>
<li>Make sure that that headings starts with Capital letter (CamelCasing 🙂</li>
</ul>
<h2><strong>Point 7: Give credits</strong></h2>
<p>This is very important. When ever you take some stuffs from any site, please try to give some credits to the content owner by providing the links/name. For example, if you are taking an image from any site, you can include the site name just below the image. Trust me, this will make you genuine. At last, it is all about genuine right?</p>
<h2><strong>Point 8: Write a conclusion</strong></h2>
<p>The conclusion is the last part of your article, you can summarize the things you have written here. And also if you want, you can always ask some questions to your readers. So that the bond between you and your readers will be in multi bind format (Yes, like we have in Angular JS. LOL). You can always ask for feedback, feedback is something that we all are looking for. Each and every feedback is valuable either it is negative or positive. If you get any negative feedback, be happy and try to improve on the things you are being suggested.</p>
<blockquote><p>In a speech in South Africa in 1890 Mahatma Gandhi said this:</p>
<p>“A customer is the most important visitor on our premises. He is not dependent on us. We are dependent on him. He is not an interruption of our work. He is the purpose of it. He is not an outsider of our business. He is part of it. We are not doing him a favour by serving him. He is doing us a favour by giving us the opportunity to do so.”</p></blockquote>
<p>The quotes are taken from <a href="http://service-ability.com/?p=881" target="_blank" rel="noopener">Service-Ability</a></p>
<p>In our case it is our it is our readers. Isn&#8217;t it?</p>
<h2><strong>Point 9: Keep a history of your article</strong></h2>
<p>This point is optional, but you can always include this too. This is where you can keep a history of your article. You can include the dates, the caption of each versions and something about future updates.</p>
<h2><strong>Point 10: Impact of communities</strong></h2>
<p>This point is completely depends on you. If you want you can always join some on-line technical communities like C# Corner, Asp.Net, CodeProject etc. I always recommend you to join in this communities, because that is where you can learn a lot and improve yourself to a great level. Most of the communities have some moderators who has so much experience in content moderating. They will moderate your article content and improve it in all the possible way. So whenever there is an edit done by a moderator, you can put a note on it and try not to do the same mistakes when you write next article. &#8216;Experience makes a man perfect&#8217;, isn&#8217;t it?</p>
<p>Another important fact about the communities is, you will get a good number of visitors and feedback, thus increase in growth.</p>
<p><div id="attachment_11620" style="width: 644px" class="wp-caption aligncenter"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Growth-e1463487696149.jpg"><img decoding="async" aria-describedby="caption-attachment-11620" class="size-large wp-image-11620" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Growth-1024x768.jpg" alt="Growth" width="634" height="476" /></a><p id="caption-attachment-11620" class="wp-caption-text">Growth</p></div></p>
<p>Image Courtesy: rafichowdhury</p>
<blockquote><p>I may not be following these points in my articles, but I will definitely try to follow this in my next articles. Cheers</p></blockquote>
<h2><strong>Conclusion</strong></h2>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<h2><strong>Your turn. What do you think?</strong></h2>
<p>A blog isn&#8217;t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/how-to-write-good-articles/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Encrypt And Decrypt ConnectionString In Web.Config File</title>
		<link>https://mail.sibeeshpassion.com/encrypt-and-decrypt-connectionstring-in-web-config-file/</link>
					<comments>https://mail.sibeeshpassion.com/encrypt-and-decrypt-connectionstring-in-web-config-file/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Mon, 16 May 2016 10:33:46 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Command Prompt]]></category>
		<category><![CDATA[Decrypt ConnectionString]]></category>
		<category><![CDATA[Encrypt ConnectionString]]></category>
		<category><![CDATA[How To]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11565</guid>

					<description><![CDATA[In this article we are going to see how we can encrypt and secure our connection string in our web config file. As you all know the connection string is the pillar of our data. I mean, without a connection string you just can&#8217;t create an application which does some database actions like retrieving the data, creating the data. We all know that the connection string is placed in the file called web config, so others too. If anyone needs to get the database information of your application, the first place he/she may look at will be the web config [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this article we are going to see how we can encrypt and secure our connection string in our web config file. As you all know the connection string is the pillar of our data. I mean, without a connection string you just can&#8217;t create an application which does some database actions like retrieving the data, creating the data. We all know that the connection string is placed in the file called web config, so others too. If anyone needs to get the database information of your application, the first place he/she may look at will be the web config file. Am I right? It is always recommend to encrypt the connection string of your application because the data we have there is highly sensitive. It must be secured. Here I am going to show you a demo of how we can do that, You can do the same thing in your Web API project, MVC project, Asp.Net 5 project, or any kind of templates you works with. I hope you will like this.</p>
<p><strong>Background</strong></p>
<p>I used to secure my config file if I am the who starts the project. Here you will get to know how easy the procedure is to encrypt the connection string. There is only a few steps to be followed. I will explain those. </p>
<p><strong>Agenda</strong></p>
<p>The following is the agenda we are going to follow. </p>
<li>Create an empty project, it can be any template(Asp.Net 5, Web API, MVC&#8230;)</li>
<li>Add a connection string</li>
<li>Encrypt the connection string</li>
<li>Decrypt the connection string</li>
<p><strong>Perquisites </strong></p>
<li>Visual Studio</li>
<li>SQL Server</li>
<p><strong>Create an empty project</strong></p>
<p>To create an empty project, go to File->New->New Project->Name the project->Select Empty->Click OK. Hope you get a solution as follows.</p>
<p><div id="attachment_11566" style="width: 384px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Empty-Solution.png"><img decoding="async" aria-describedby="caption-attachment-11566" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Empty-Solution.png" alt="Empty Solution" width="374" height="285" class="size-full wp-image-11566" srcset="/wp-content/uploads/2016/05/Empty-Solution.png 374w, /wp-content/uploads/2016/05/Empty-Solution-300x229.png 300w" sizes="(max-width: 374px) 100vw, 374px" /></a><p id="caption-attachment-11566" class="wp-caption-text">Empty Solution</p></div></p>
<p>Now We will connect to a database. To connect, please click on the connect icon in your server explorer window and connect you Local/Server database.</p>
<p><div id="attachment_11567" style="width: 515px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Connect-to-Database.png"><img decoding="async" aria-describedby="caption-attachment-11567" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Connect-to-Database.png" alt="Connect to Database" width="505" height="873" class="size-full wp-image-11567" srcset="/wp-content/uploads/2016/05/Connect-to-Database.png 505w, /wp-content/uploads/2016/05/Connect-to-Database-174x300.png 174w, /wp-content/uploads/2016/05/Connect-to-Database-400x691.png 400w, /wp-content/uploads/2016/05/Connect-to-Database-347x600.png 347w" sizes="(max-width: 505px) 100vw, 505px" /></a><p id="caption-attachment-11567" class="wp-caption-text">Connect to Database</p></div></p>
<p><strong>Add a connection string</strong></p>
<p>Now it is time to add our connection string, hope you got your data source of the database we already connected. The connection string property must be placed under configuration tag in your web config file. Here is mine.</p>
<p>[xml]<br />
&lt;connectionStrings&gt;<br />
    &lt;add name=&quot;myConnection&quot; connectionString=&quot;Data Source=SIBEESHVENU\SQLEXPRESS;Initial Catalog=ReportServer$SQLEXPRESS;Integrated Security=True&quot; /&gt;<br />
  &lt;/connectionStrings&gt;<br />
[/xml]</p>
<p>Now we will create a web page and in the page load event we will fetch this connection string and write it as a response. </p>
<p>[csharp]<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;</p>
<p>namespace EncryptConnectionString<br />
{<br />
    public partial class Default : System.Web.UI.Page<br />
    {<br />
        protected void Page_Load(object sender, EventArgs e)<br />
        {<br />
            if (!IsPostBack)<br />
            {<br />
                try<br />
                {<br />
                    string myCon = System.Configuration.ConfigurationManager.ConnectionStrings[&quot;myConnection&quot;].ConnectionString;<br />
                    if (myCon != null)<br />
                    {<br />
                        Response.Write(&quot;My connection string is :&quot; + myCon);<br />
                    }<br />
                }<br />
                catch (Exception)<br />
                {</p>
<p>                    throw;<br />
                }<br />
            }<br />
        }<br />
    }<br />
}<br />
[/csharp]</p>
<p>Please run your page, you will see your connection string in your page.</p>
<p><div id="attachment_11568" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Connection-string-response-e1463302112567.png"><img decoding="async" aria-describedby="caption-attachment-11568" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Connection-string-response-1024x47.png" alt="Connection string response" width="634" height="29" class="size-large wp-image-11568" /></a><p id="caption-attachment-11568" class="wp-caption-text">Connection string response</p></div></p>
<p><strong>Encrypt connection string</strong></p>
<p>To start the process, you must open your command window with the admin privilege. Then type the following command.</p>
<p>[csharp]<br />
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319<br />
[/csharp]</p>
<p>This command will narrate you to the framework version folder given. Now right click on your project and click open folder in file explorer and then copy the location. For me it is <em>F:\Visual Studio\EncryptConnectionString\EncryptConnectionString</em>. Now please go back to your command prompt and type the command as follows.</p>
<p>[csharp]<br />
ASPNET_REGIIS -PEF &quot;connectionStrings&quot; &quot;F:\Visual Studio\EncryptConnectionString\EncryptConnectionString&quot;<br />
[/csharp]</p>
<p>Once you click the enter. You will get the output as follows.</p>
<p><div id="attachment_11569" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Encrypt-ConnectionString-Output-e1463303289891.png"><img decoding="async" aria-describedby="caption-attachment-11569" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Encrypt-ConnectionString-Output-e1463303289891.png" alt="Encrypt ConnectionString Output" width="650" height="422" class="size-full wp-image-11569" srcset="/wp-content/uploads/2016/05/Encrypt-ConnectionString-Output-e1463303289891.png 650w, /wp-content/uploads/2016/05/Encrypt-ConnectionString-Output-e1463303289891-300x195.png 300w, /wp-content/uploads/2016/05/Encrypt-ConnectionString-Output-e1463303289891-400x260.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11569" class="wp-caption-text">Encrypt ConnectionString Output</p></div></p>
<p>Please be noted that the text <em>connectionStrings</em> is case sensitive. If you don&#8217;t give it as it is, you will get an error as follows.</p>
<p>[csharp]<br />
C:\Windows\Microsoft.NET\Framework\v4.0.30319&gt;ASPNET_REGIIS -PEF &quot;connectionstrings&quot; &quot;F:\Visual Studio\EncryptConnectionString\EncryptConnectionString&quot;<br />
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0<br />
Administration utility to install and uninstall ASP.NET on the local machine.<br />
Copyright (C) Microsoft Corporation.  All rights reserved.<br />
Encrypting configuration section&#8230;<br />
The configuration section &#8216;connectionstrings&#8217; was not found.<br />
Failed!<br />
[/csharp]</p>
<p>So please be careful while you type the commands. Now I am going back to our application and see the config file. Shall we? You can see the connection string is encrypted as follows.</p>
<p>[xml]<br />
&lt;connectionStrings configProtectionProvider=&quot;RsaProtectedConfigurationProvider&quot;&gt;<br />
    &lt;EncryptedData Type=&quot;http://www.w3.org/2001/04/xmlenc#Element&quot;<br />
      xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot;&gt;<br />
      &lt;EncryptionMethod Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&quot; /&gt;<br />
      &lt;KeyInfo xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br />
        &lt;EncryptedKey xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot;&gt;<br />
          &lt;EncryptionMethod Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#rsa-1_5&quot; /&gt;<br />
          &lt;KeyInfo xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br />
            &lt;KeyName&gt;Rsa Key&lt;/KeyName&gt;<br />
          &lt;/KeyInfo&gt;<br />
          &lt;CipherData&gt;<br />
            &lt;CipherValue&gt;B4B3oZrbpQsYM7Eaq5smukqDj9XUYUCwygBYRG1iasN4ll5W4wAKVCIFCRfvOJGoIXzgqpyjAI30IKf5pnZ/xWqmo3p/wGfOKdMrzd041dt9llLGbxFpLJs0Nkm583PJ1FppXLAy7FOD0YoBVhG/PBtBgLjTQqcXRNbVcgufzuArlv/EH+7lzSNRclXSTMOPMtISF65hPI9ICj9qLx7RBGhVZ6uFZVFteyyuRd2i3D2r7wJfr6KflFkakdxp1OWE2JK4Ldb8kZSwAy3bNaI/qaV9EgIWt9wM6RZO/IrI3kI/bX8JuvirPw3j/+TLDB3MoIgKjSbLpR3GYTm9csPu8g==&lt;/CipherValue&gt;<br />
          &lt;/CipherData&gt;<br />
        &lt;/EncryptedKey&gt;<br />
      &lt;/KeyInfo&gt;<br />
      &lt;CipherData&gt;<br />
        &lt;CipherValue&gt;0n1Y6ScSNZDR4x1sXfK05w9h+pp2OrAEQFQsoAUP5Y/hPsfpJS/7jv21PbPlkYmdCzycM4PGGb0+fuffR3RuL1x0tn7rfyUdA9llTfkyRQKwS9xOmkMsVFXgQDr8P4aXGef1fZPE2gjhcjm/JQToLwsfQZK1gNr4d6cIPFNqKD6wt24F7fuySJPX3OgLb8wXfQMd7ij+JcZzNlnyNHbq/DIjxSpPOnMrC52t06Jj8F8+MsSud9GcijcFB2UhvLVXQwyZ51nEj6Tf36Zbca8bgw==&lt;/CipherValue&gt;<br />
      &lt;/CipherData&gt;<br />
    &lt;/EncryptedData&gt;<br />
  &lt;/connectionStrings&gt;<br />
[/xml]</p>
<p><strong>Decrypt connection string</strong></p>
<p>You can always decrypt the connection string if you want, to decrypt you just need follows the commands as follows in the command prompt.</p>
<p>[csharp]<br />
cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319<br />
[/csharp]</p>
<p>Once after you did you the above command you can execute the preceding one.</p>
<p>[csharp]<br />
ASPNET_REGIIS -PDF &quot;connectionStrings&quot; &quot;F:\Visual Studio\EncryptConnectionString\EncryptConnectionString&quot;<br />
[/csharp]</p>
<blockquote><p>The text &#8216;connectionString&#8217; is case sensitive as mentioned above</p></blockquote>
<p>If the command is correct, you can get an output as follows.</p>
<p><div id="attachment_11573" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466.png"><img decoding="async" aria-describedby="caption-attachment-11573" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466.png" alt="Decrypting connectionString" width="650" height="440" class="size-full wp-image-11573" srcset="/wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466.png 650w, /wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466-300x203.png 300w, /wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466-320x218.png 320w, /wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466-620x420.png 620w, /wp-content/uploads/2016/05/Decrypting-connectionString-e1463394161466-400x271.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11573" class="wp-caption-text">Decrypting connectionString</p></div> </p>
<p>Now if you check your Web config again, you can see the connection string has got encrypted. Have a happy coding!.</p>
<p><strong>Conclusion</strong></p>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<p><strong>Your turn. What do you think?</strong></p>
<p>A blog isn&#8217;t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/encrypt-and-decrypt-connectionstring-in-web-config-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Working with API help page controller action description in Web API</title>
		<link>https://mail.sibeeshpassion.com/working-with-api-help-page-controller-action-description-in-web-api/</link>
					<comments>https://mail.sibeeshpassion.com/working-with-api-help-page-controller-action-description-in-web-api/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 12 May 2016 00:00:24 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[API Help Page Description]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Enable Region Summary Of Actions]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11555</guid>

					<description><![CDATA[In this article we are going to see how we can enable the API descriptions for the better understanding of how our API controller works and what exactly it is supposed to do. It is recommended that to give the summary and parameter lists and a bit introduction to the service whenever you write any API services. Here I am going to use create a Web API in Visual Studio 2015. I hope you will like this. Download the source code You can always download the source code here: API Help Page Documentation Background Few months back I have hosted [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this article we are going to see how we can enable the API descriptions for the better understanding of how our API controller works and what exactly it is supposed to do. It is recommended that to give the summary and parameter lists and a bit introduction to the service whenever you write any API services. Here I am going to use create a <a href="http://sibeeshpassion.com/category/web-api" target="_blank" rel="noopener">Web API</a> in <a href="http://sibeeshpassion.com/category/tools/visual-studio/" target="_blank" rel="noopener">Visual Studio</a> 2015. I hope you will like this.</p>
<p><strong>Download the source code</strong></p>
<p>You can always download the source code here: <a href="https://code.msdn.microsoft.com/Working-with-API-help-page-23eddf9e" target="_blank" rel="noopener">API Help Page Documentation</a></p>
<p><strong>Background</strong></p>
<p>Few months back I have hosted one of my API application to <a href="http://sibeeshpassion.com/category/azure" target="_blank" rel="noopener">Azure</a>. I thought of implementing the document summary for the services(controllers actions) now. And I did, now any one can understand what exactly my service will do by going to the help page of the API application. I will show you a demo of the same. Here we will create a Web API with entity framework. Lets us start then.</p>
<p><strong>Setting up database</strong></p>
<p>Here I am going to create a database which I created for my demo purposes, you can always create this database by running the queries mentioned here.</p>
<p><strong>Create database</strong></p>
<p>[sql]<br />
USE [master]<br />
GO</p>
<p>/****** Object:  Database [TrialsDB]    Script Date: 5/12/2016 10:56:41 AM ******/<br />
CREATE DATABASE [TrialsDB]<br />
 CONTAINMENT = NONE<br />
 ON  PRIMARY<br />
( NAME = N&#8217;TrialsDB&#8217;, FILENAME = N&#8217;C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\TrialsDB.mdf&#8217; , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )<br />
 LOG ON<br />
( NAME = N&#8217;TrialsDB_log&#8217;, FILENAME = N&#8217;C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\TrialsDB_log.ldf&#8217; , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET COMPATIBILITY_LEVEL = 110<br />
GO</p>
<p>IF (1 = FULLTEXTSERVICEPROPERTY(&#8216;IsFullTextInstalled&#8217;))<br />
begin<br />
EXEC [TrialsDB].[dbo].[sp_fulltext_database] @action = &#8216;enable&#8217;<br />
end<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET ANSI_NULL_DEFAULT OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET ANSI_NULLS OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET ANSI_PADDING OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET ANSI_WARNINGS OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET ARITHABORT OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET AUTO_CLOSE OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET AUTO_CREATE_STATISTICS ON<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET AUTO_SHRINK OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET AUTO_UPDATE_STATISTICS ON<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET CURSOR_CLOSE_ON_COMMIT OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET CURSOR_DEFAULT  GLOBAL<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET CONCAT_NULL_YIELDS_NULL OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET NUMERIC_ROUNDABORT OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET QUOTED_IDENTIFIER OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET RECURSIVE_TRIGGERS OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET  DISABLE_BROKER<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET AUTO_UPDATE_STATISTICS_ASYNC OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET DATE_CORRELATION_OPTIMIZATION OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET TRUSTWORTHY OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET ALLOW_SNAPSHOT_ISOLATION OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET PARAMETERIZATION SIMPLE<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET READ_COMMITTED_SNAPSHOT OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET HONOR_BROKER_PRIORITY OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET RECOVERY FULL<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET  MULTI_USER<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET PAGE_VERIFY CHECKSUM<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET DB_CHAINING OFF<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET TARGET_RECOVERY_TIME = 0 SECONDS<br />
GO</p>
<p>ALTER DATABASE [TrialsDB] SET  READ_WRITE<br />
GO<br />
[/sql]</p>
<p><strong>Create table with data</strong></p>
<p>[sql]<br />
USE [TrialsDB]<br />
GO<br />
/****** Object:  Table [dbo].[Product]    Script Date: 5/12/2016 10:54:48 AM ******/<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
CREATE TABLE [dbo].[Product](<br />
	[ProductID] [int] NOT NULL,<br />
	[Name] [nvarchar](max) NOT NULL,<br />
	[ProductNumber] [nvarchar](25) NOT NULL,<br />
	[MakeFlag] [bit] NOT NULL,<br />
	[FinishedGoodsFlag] [bit] NOT NULL,<br />
	[Color] [nvarchar](15) NULL,<br />
	[SafetyStockLevel] [smallint] NOT NULL,<br />
	[ReorderPoint] [smallint] NOT NULL,<br />
	[StandardCost] [money] NOT NULL,<br />
	[ListPrice] [money] NOT NULL,<br />
	[Size] [nvarchar](5) NULL,<br />
	[SizeUnitMeasureCode] [nchar](3) NULL,<br />
	[WeightUnitMeasureCode] [nchar](3) NULL,<br />
	[Weight] [decimal](8, 2) NULL,<br />
	[DaysToManufacture] [int] NOT NULL,<br />
	[ProductLine] [nchar](2) NULL,<br />
	[Class] [nchar](2) NULL,<br />
	[Style] [nchar](2) NULL,<br />
	[ProductSubcategoryID] [int] NULL,<br />
	[ProductModelID] [int] NULL,<br />
	[SellStartDate] [datetime] NOT NULL,<br />
	[SellEndDate] [datetime] NULL,<br />
	[DiscontinuedDate] [datetime] NULL,<br />
	[rowguid] [uniqueidentifier] ROWGUIDCOL  NOT NULL,<br />
	[ModifiedDate] [datetime] NOT NULL<br />
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]<br />
GO<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (1, N&#8217;Adjustable Race&#8217;, N&#8217;AR-5381&#8242;, 0, 0, NULL, 1000, 750, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;694215b7-08f7-4c0d-acb1-d734ba44c0c8&#8242;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (2, N&#8217;Bearing Ball&#8217;, N&#8217;BA-8327&#8242;, 0, 0, NULL, 1000, 750, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;58ae3c20-4f3a-4749-a7d4-d568806cc537&#8242;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (3, N&#8217;BB Ball Bearing&#8217;, N&#8217;BE-2349&#8242;, 1, 0, NULL, 800, 600, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;9c21aed2-5bfa-4f18-bcb8-f11638dc2e4e&#8217;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (4, N&#8217;Headset Ball Bearings&#8217;, N&#8217;BE-2908&#8242;, 0, 0, NULL, 800, 600, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;ecfed6cb-51ff-49b5-b06c-7d8ac834db8b&#8217;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (316, N&#8217;Blade&#8217;, N&#8217;BL-2036&#8242;, 1, 0, NULL, 800, 600, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;e73e9750-603b-4131-89f5-3dd15ed5ff80&#8242;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (317, N&#8217;LL Crankarm&#8217;, N&#8217;CA-5965&#8242;, 0, 0, N&#8217;Black&#8217;, 500, 375, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 0, NULL, N&#8217;L &#8216;, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;3c9d10b7-a6b2-4774-9963-c19dcee72fea&#8217;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
INSERT [dbo].[Product] ([ProductID], [Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (318, N&#8217;ML Crankarm&#8217;, N&#8217;CA-6738&#8242;, 0, 0, N&#8217;Black&#8217;, 500, 375, 0.0000, 0.0000, NULL, NULL, NULL, NULL, 0, NULL, N&#8217;M &#8216;, NULL, NULL, NULL, CAST(0x0000921E00000000 AS DateTime), NULL, NULL, N&#8217;eabb9a92-fa07-4eab-8955-f0517b4a4ca7&#8217;, CAST(0x00009A5C00A53CF8 AS DateTime))<br />
[/sql]</p>
<p>Our database is ready, now create a Web API application in visual studio and then entity with the above mentioned database. </p>
<p><div id="attachment_11556" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Creating-Entity-e1463031313825.png"><img decoding="async" aria-describedby="caption-attachment-11556" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Creating-Entity-1024x542.png" alt="Creating Entity" width="634" height="336" class="size-large wp-image-11556" /></a><p id="caption-attachment-11556" class="wp-caption-text">Creating Entity</p></div></p>
<p>If you don&#8217;t know how to create an entity in your solution, please read that <a href="http://sibeeshpassion.com/web-api-with-angular-js/" target="_blank" rel="noopener">here</a>. I have mentioned the steps to be followed in that article. Once you have created the entity, you are good to go and create a API controller with the entity created. If you do so, The CRUD actions will be created automatically for you. You may need to edit those actions according to your needs. </p>
<p><div id="attachment_11557" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/Web-API-2-Controller-with-actions-using-Entity-Framework-e1463031653319.png"><img decoding="async" aria-describedby="caption-attachment-11557" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/Web-API-2-Controller-with-actions-using-Entity-Framework-e1463031653319.png" alt="Web API 2 Controller with actions, using Entity Framework" width="650" height="457" class="size-full wp-image-11557" srcset="/wp-content/uploads/2016/05/Web-API-2-Controller-with-actions-using-Entity-Framework-e1463031653319.png 650w, /wp-content/uploads/2016/05/Web-API-2-Controller-with-actions-using-Entity-Framework-e1463031653319-300x211.png 300w, /wp-content/uploads/2016/05/Web-API-2-Controller-with-actions-using-Entity-Framework-e1463031653319-400x281.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11557" class="wp-caption-text">Web API 2 Controller with actions, using Entity Framework</p></div></p>
<p>Select the Model Class, DBContext then name your controller and click OK. I hope a controller with the CRUD actions like preceding has been generated for you.</p>
<p>[csharp]<br />
 public class ProductsController : ApiController<br />
    {<br />
        private TrialsDBEntities db = new TrialsDBEntities();</p>
<p>        // GET: api/Products<br />
        public IQueryable&lt;Product&gt; GetProducts()<br />
        {<br />
            return db.Products;<br />
        }</p>
<p>        // GET: api/Products/5<br />
        [ResponseType(typeof(Product))]<br />
        public IHttpActionResult GetProduct(int id)<br />
        {<br />
            Product product = db.Products.Find(id);<br />
            if (product == null)<br />
            {<br />
                return NotFound();<br />
            }</p>
<p>            return Ok(product);<br />
        }</p>
<p>        // PUT: api/Products/5<br />
        [ResponseType(typeof(void))]<br />
        public IHttpActionResult PutProduct(int id, Product product)<br />
        {<br />
            if (!ModelState.IsValid)<br />
            {<br />
                return BadRequest(ModelState);<br />
            }</p>
<p>            if (id != product.ProductID)<br />
            {<br />
                return BadRequest();<br />
            }</p>
<p>            db.Entry(product).State = EntityState.Modified;</p>
<p>            try<br />
            {<br />
                db.SaveChanges();<br />
            }<br />
            catch (DbUpdateConcurrencyException)<br />
            {<br />
                if (!ProductExists(id))<br />
                {<br />
                    return NotFound();<br />
                }<br />
                else<br />
                {<br />
                    throw;<br />
                }<br />
            }</p>
<p>            return StatusCode(HttpStatusCode.NoContent);<br />
        }</p>
<p>        // POST: api/Products<br />
        [ResponseType(typeof(Product))]<br />
        public IHttpActionResult PostProduct(Product product)<br />
        {<br />
            if (!ModelState.IsValid)<br />
            {<br />
                return BadRequest(ModelState);<br />
            }</p>
<p>            db.Products.Add(product);</p>
<p>            try<br />
            {<br />
                db.SaveChanges();<br />
            }<br />
            catch (DbUpdateException)<br />
            {<br />
                if (ProductExists(product.ProductID))<br />
                {<br />
                    return Conflict();<br />
                }<br />
                else<br />
                {<br />
                    throw;<br />
                }<br />
            }</p>
<p>            return CreatedAtRoute(&quot;DefaultApi&quot;, new { id = product.ProductID }, product);<br />
        }</p>
<p>        // DELETE: api/Products/5<br />
        [ResponseType(typeof(Product))]<br />
        public IHttpActionResult DeleteProduct(int id)<br />
        {<br />
            Product product = db.Products.Find(id);<br />
            if (product == null)<br />
            {<br />
                return NotFound();<br />
            }</p>
<p>            db.Products.Remove(product);<br />
            db.SaveChanges();</p>
<p>            return Ok(product);<br />
        }</p>
<p>        protected override void Dispose(bool disposing)<br />
        {<br />
            if (disposing)<br />
            {<br />
                db.Dispose();<br />
            }<br />
            base.Dispose(disposing);<br />
        }</p>
<p>        private bool ProductExists(int id)<br />
        {<br />
            return db.Products.Count(e =&gt; e.ProductID == id) &gt; 0;<br />
        }<br />
    }<br />
[/csharp]</p>
<p>Now please run your application and go to the help page. You can see the API help page as follows. </p>
<p><div id="attachment_11558" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/API-Help-Page-e1463032044742.png"><img decoding="async" aria-describedby="caption-attachment-11558" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/API-Help-Page-e1463032044742.png" alt="API Help Page" width="650" height="524" class="size-full wp-image-11558" srcset="/wp-content/uploads/2016/05/API-Help-Page-e1463032044742.png 650w, /wp-content/uploads/2016/05/API-Help-Page-e1463032044742-300x242.png 300w, /wp-content/uploads/2016/05/API-Help-Page-e1463032044742-400x322.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11558" class="wp-caption-text">API Help Page</p></div></p>
<p>As you can see &#8216;No documentation available.&#8217; under description of all the service actions. No worries we will try to add some summary to the actions now. So we will change the code as follows.</p>
<p>[csharp]<br />
 #region GetProducts<br />
        /// &lt;summary&gt;<br />
        /// Get all the products available<br />
        /// GET: api/Products<br />
        /// &lt;/summary&gt;<br />
        public IQueryable&lt;Product&gt; GetProducts()<br />
        {<br />
            return db.Products;<br />
        }<br />
        #endregion</p>
<p>        #region GetProductWithParameter<br />
        /// &lt;summary&gt;<br />
        /// Get a single product<br />
        /// GET: api/Products/5<br />
        /// &lt;param name=&quot;id&quot;&gt;&lt;/param&gt;<br />
        /// &lt;/summary&gt;<br />
        [ResponseType(typeof(Product))]<br />
        public IHttpActionResult GetProduct(int id)<br />
        {<br />
            Product product = db.Products.Find(id);<br />
            if (product == null)<br />
            {<br />
                return NotFound();<br />
            }</p>
<p>            return Ok(product);<br />
        }<br />
        #endregion<br />
[/csharp]</p>
<p>Now run your application and see the help page. Still the same result? Hmm, here comes the things we need to do. I will explain that. </p>
<li>Go to Areas\HelpPage\App_Start and click on the file <em>HelpPageConfig.cs</em>.</li>
<li>Uncomment the following line from the static function Register. </li>
<p>[csharp]<br />
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath(&quot;App_Data/XmlDocument.xml&quot;)));<br />
[/csharp]</p>
<li>Right click on your project and go to properties, then click on Build</li>
<li>Go to Output section and click on XML documentation file and then type <em>~/App_Data/XmlDocument.xml</em> in the given text box. </li>
<li>Save and build your project.</li>
<p>This will create a XML document with the name <em>XmlDocument.xml</em> in App_Data folder. Once it is generated, the summary you have described in your API controller will be listed there. Initially the file will be in excluded state, you may need to include the same to your project when you deploy your API application. For that please follows the below steps. </p>
<li>Click on show all files.</li>
<li>Click on Refresh.</li>
<li>Go to App_Data folder and find XmlDocument.xml.</li>
<li>Right click the file and click Include In Project.</li>
<p>That&#8217;s all. Run your application and see the Help page again. Hope you get the page as follows. </p>
<p><div id="attachment_11559" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/05/API-Help-Page-With-Descriptions-e1463033550891.png"><img decoding="async" aria-describedby="caption-attachment-11559" src="http://sibeeshpassion.com/wp-content/uploads/2016/05/API-Help-Page-With-Descriptions-e1463033550891.png" alt="API Help Page With Descriptions" width="650" height="361" class="size-full wp-image-11559" srcset="/wp-content/uploads/2016/05/API-Help-Page-With-Descriptions-e1463033550891.png 650w, /wp-content/uploads/2016/05/API-Help-Page-With-Descriptions-e1463033550891-300x167.png 300w, /wp-content/uploads/2016/05/API-Help-Page-With-Descriptions-e1463033550891-400x222.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11559" class="wp-caption-text">API Help Page With Descriptions</p></div></p>
<p>Have a happy coding!.</p>
<p><strong>Conclusion</strong></p>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<p><strong>Your turn. What do you think?</strong></p>
<p>A blog isn&#8217;t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/working-with-api-help-page-controller-action-description-in-web-api/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Shuffle Div Contents</title>
		<link>https://mail.sibeeshpassion.com/shuffle-div-contents/</link>
					<comments>https://mail.sibeeshpassion.com/shuffle-div-contents/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Mon, 17 Aug 2015 08:02:51 +0000</pubDate>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Jquery shuffling]]></category>
		<category><![CDATA[shuffle div contents]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=9621</guid>

					<description><![CDATA[In this post, we will see how can we shuffle a div contents using jquery. Here the div contents are another set of divs which contain some values. So what we are going to do is, we will add an href and in the click event we will shuffle the entire contents of our main div. I hope you will like this. Background Recently I was crating a simple on-line game, in which I was in a need of this requirement. I will share about the game in my next article. Using the code The first step you need to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this post, we will see how can we shuffle a div contents using jquery. Here the div contents are another set of divs which contain some values. So what we are going to do is, we will add an href and in the click event we will shuffle the entire contents of our main div. I hope you will like this. </p>
<p><strong>Background</strong></p>
<p>Recently I was crating a simple on-line game, in which I was in a need of this requirement. I will share about the game in my next article. </p>
<p><strong>Using the code</strong></p>
<p>The first step you need to do  is add reference.</p>
<p>[js]<br />
 &lt;script src=&quot;jquery-2.0.2.min.js&quot;&gt;&lt;/script&gt;<br />
[/js]</p>
<p>Next we will add the div and its contents.</p>
<p>[html]<br />
 &lt;div id=&quot;parent&quot;&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;1&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;2&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;3&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;4&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;5&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;6&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;7&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;8&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;9&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;10&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;11&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;12&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;13&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;14&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;15&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;16&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;17&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;18&lt;/div&gt;<br />
				&lt;div  class=&quot;myInnerDiv&quot;&gt;19&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;20&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;21&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;22&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;23&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;24&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;25&lt;/div&gt;<br />
    &lt;/div&gt;<br />
[/html]</p>
<p>Can we style those divs now?</p>
<p>[css]<br />
 &lt;style&gt;<br />
        #parent {<br />
            width: 27%;<br />
            height: auto;<br />
            padding: 10px;<br />
            float: left;<br />
            margin-left: 5px;<br />
            min-height: 265px;<br />
        }<br />
        .myInnerDiv {<br />
            width: 25px;<br />
            height: 28px;<br />
            padding: 15px;<br />
            background-color: green;<br />
            margin: 3px;<br />
            float: left;<br />
            cursor: move;<br />
        }<br />
    &lt;/style&gt;<br />
[/css]</p>
<p>See your page now.</p>
<p><div id="attachment_9641" style="width: 346px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_1.png"><img decoding="async" aria-describedby="caption-attachment-9641" src="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_1.png" alt="Shuffle div contents " width="336" height="356" class="size-full wp-image-9641" srcset="/wp-content/uploads/2015/08/Shuffle_div_contents_1.png 336w, /wp-content/uploads/2015/08/Shuffle_div_contents_1-283x300.png 283w" sizes="(max-width: 336px) 100vw, 336px" /></a><p id="caption-attachment-9641" class="wp-caption-text">Shuffle div contents</p></div></p>
<p>Now we will add a href tag to fire a click event.</p>
<p>[html]<br />
&lt;a href=&quot;#&quot; id=&quot;shuffle&quot;&gt;Shuffle Me&lt;/a&gt;<br />
[/html]</p>
<p>Next is writing the needed scripts.</p>
<p>[js]<br />
&lt;script&gt;<br />
        $(function () {<br />
			$(&quot;#shuffle&quot;).click(function(){<br />
				var maindiv = $(&quot;#parent&quot;);<br />
				var divs = maindiv.children();<br />
				while (divs.length) {<br />
					maindiv.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);<br />
				}<br />
			});<br />
        });<br />
    &lt;/script&gt;<br />
[/js]</p>
<p>In the above code we are getting the contents from the div <em>parent</em> to a variable <em>maindiv</em>, and we find the children of that div and at last in a while loop we will juse select the divs randomly and append to our main div again. </p>
<p>See the output now. </p>
<p><strong>Output</strong></p>
<p><em>When you load first time</em></p>
<p><div id="attachment_9641" style="width: 346px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_1.png"><img decoding="async" aria-describedby="caption-attachment-9641" src="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_1.png" alt="Shuffle div contents " width="336" height="356" class="size-full wp-image-9641" srcset="/wp-content/uploads/2015/08/Shuffle_div_contents_1.png 336w, /wp-content/uploads/2015/08/Shuffle_div_contents_1-283x300.png 283w" sizes="(max-width: 336px) 100vw, 336px" /></a><p id="caption-attachment-9641" class="wp-caption-text">Shuffle div contents</p></div></p>
<p><em>When you load second time</em></p>
<p><div id="attachment_9651" style="width: 347px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_2.png"><img decoding="async" aria-describedby="caption-attachment-9651" src="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_2.png" alt="Shuffle Div Contents " width="337" height="346" class="size-full wp-image-9651" srcset="/wp-content/uploads/2015/08/Shuffle_div_contents_2.png 337w, /wp-content/uploads/2015/08/Shuffle_div_contents_2-292x300.png 292w" sizes="(max-width: 337px) 100vw, 337px" /></a><p id="caption-attachment-9651" class="wp-caption-text">Shuffle Div Contents</p></div></p>
<p><em>When you load third time</em></p>
<p><div id="attachment_9661" style="width: 327px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_3.png"><img decoding="async" aria-describedby="caption-attachment-9661" src="http://sibeeshpassion.com/wp-content/uploads/2015/08/Shuffle_div_contents_3.png" alt="Shuffle Div Contents " width="317" height="346" class="size-full wp-image-9661" srcset="/wp-content/uploads/2015/08/Shuffle_div_contents_3.png 317w, /wp-content/uploads/2015/08/Shuffle_div_contents_3-275x300.png 275w" sizes="(max-width: 317px) 100vw, 317px" /></a><p id="caption-attachment-9661" class="wp-caption-text">Shuffle Div Contents</p></div></p>
<p><strong>Complete Code</strong></p>
<p>[html]<br />
&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
    &lt;title&gt;Shuffle a div contents &#8211; Sibeesh Passion&lt;/title&gt;<br />
    &lt;script src=&quot;jquery-2.0.2.min.js&quot;&gt;&lt;/script&gt;<br />
    &lt;style&gt;<br />
        #parent {<br />
            width: 27%;<br />
            height: auto;<br />
            padding: 10px;<br />
            float: left;<br />
            margin-left: 5px;<br />
            min-height: 265px;<br />
        }<br />
        .myInnerDiv {<br />
            width: 25px;<br />
            height: 28px;<br />
            padding: 15px;<br />
            background-color: green;<br />
            margin: 3px;<br />
            float: left;<br />
            cursor: move;<br />
        }<br />
    &lt;/style&gt;<br />
    &lt;script&gt;<br />
        $(function () {<br />
			$(&quot;#shuffle&quot;).click(function(){<br />
				var maindiv = $(&quot;#parent&quot;);<br />
				var divs = maindiv.children();<br />
				while (divs.length) {<br />
					maindiv.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);<br />
				}<br />
			});<br />
        });<br />
    &lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body id=&quot;body&quot;&gt;<br />
    &lt;div id=&quot;parent&quot;&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;1&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;2&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;3&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;4&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;5&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;6&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;7&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;8&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;9&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;10&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;11&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;12&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;13&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;14&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;15&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;16&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;17&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;18&lt;/div&gt;<br />
				&lt;div  class=&quot;myInnerDiv&quot;&gt;19&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;20&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;21&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;22&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;23&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;24&lt;/div&gt;<br />
                &lt;div  class=&quot;myInnerDiv&quot;&gt;25&lt;/div&gt;<br />
    &lt;/div&gt;<br />
	&lt;a href=&quot;#&quot; id=&quot;shuffle&quot;&gt;Shuffle Me&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p><strong>Conclusion</strong></p>
<p>I hope you liked this article. Please share me your valuable feedback and suggestions. Thanks in advance.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/shuffle-div-contents/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
