<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6394135838508326324</id><updated>2026-01-11T07:50:33.018-08:00</updated><category term="asp.net"/><category term="Sql Server"/><category term="Sql"/><category term="C#"/><category term="MVC"/><category term="jquery"/><category term="Javascript"/><category term="query"/><category term="error"/><category term="AngularJS"/><category term="LINQ"/><category term="ajax"/><category term="oops"/><category term="php"/><category term="validation"/><category term="Datatable"/><category term="Example"/><category term="WCF"/><category term="c#.net"/><category term="html"/><category term="mongodb"/><category term="IIS"/><category term="gridview"/><category term="resolved"/><category term="sql table"/><category term="table"/><category term=".net"/><category term=".net framework"/><category term="Codeigniter"/><category term="OpenXML"/><category term="Primary Key"/><category term="SEO"/><category term="Validations"/><category term="ado.net"/><category term="alter"/><category term="custom filters"/><category term="database"/><category term="dataset"/><category term="decimal"/><category term="design patterns"/><category term="dropdownlist"/><category term="excel"/><category term="exception"/><category term="float"/><category term="html5"/><category term="interview questions"/><category term="java"/><category term="linux"/><category term="mvc 4"/><category term="mysql"/><category term="node"/><category term="nosql"/><category term="npm"/><category term="python"/><category term="razor"/><category term="rest"/><category term="slim"/><category term="ubuntu"/><category term="xml"/><category term="#angularjs #json #api #REST"/><category term=".net 4 features"/><category term=".net 4.0 features"/><category term=".net framework execution process. asp.net framework"/><category term=".slidetoggle jquery"/><category term="2nd highest salary"/><category term="3rd highest salary"/><category term="@@identity"/><category term="AJAX calendar theme"/><category term="Add delete edit update in gridview"/><category term="Adding google maps to website"/><category term="Adding location in webpage via google maps"/><category term="Advantages of View with scheme binding"/><category term="Ajax Calendar CSS"/><category term="Ajax Json Call to WCF using Jquery"/><category term="Ajax ModalPopupExtender"/><category term="Ajax ModalPopupExtender Demo in Asp.net"/><category term="Ajax ModalPopupExtender Example"/><category term="Allow only numbers in a textbox using JavaScript in Asp.net"/><category term="Asp.net GridView Sorting and Paging Example"/><category term="Asp.net Gridview"/><category term="Asp.net WCF"/><category term="Basic login form validation"/><category term="Beginning MVC"/><category term="Bind Dropdown with XML data"/><category term="Bind Excel Data to Gridview in Asp.net"/><category term="Bind XML Data to Dropdown control in asp.net"/><category term="CLR"/><category term="Call Function at specified intervals in Javascript"/><category term="Call a code-behind method from javascript using pagemethods"/><category term="Call codebehind method from javascript using ajaxpro in asp.net"/><category term="Calling a popup window on button click event in Jquery"/><category term="Candidate Key"/><category term="Changing Datatable column Datatype in Asp.net"/><category term="Check AlphaNumeric javascript"/><category term="Class"/><category term="Constructors"/><category term="Constructors c#"/><category term="Creating Views with Scheme Binding in Sql Server"/><category term="Delete Duplicate Rows In SQL"/><category term="Demo Jquery Mouse over and mouse out"/><category term="Dependency Injection"/><category term="Deserialization"/><category term="Difference Between Struct and Class"/><category term="Difference between  correlated and uncorrelated Subqueries with Example"/><category term="Difference between Delete and Truncate"/><category term="Disable Enter button in Jquery"/><category term="Disable Right Click in javascript"/><category term="Dynamically do arithmetic operations in Javascript"/><category term="EndsWidth"/><category term="Example Polymorphism"/><category term="Example of serialization and Deserialization in asp.net"/><category term="Execute all sql scripts from a folder at once"/><category term="Export String to .txt File in asp.net"/><category term="Exporting String Data to text"/><category term="Fibonacci"/><category term="Fibonacci sequence"/><category term="Find/Search keyword or text in all stored procedures in Sql Server Database"/><category term="Foreign Key"/><category term="Google maps"/><category term="GridView TemplateField Sorting"/><category term="Handle Session Timeout in an application and redirect to custom error page"/><category term="Host WCF to console application"/><category term="IDENT_CURRENT(&#39;&#39;)"/><category term="IndexOf example"/><category term="Inheritance example"/><category term="Jquery Mouse Over and Mouse Example"/><category term="Jquery fadeIn"/><category term="Learn MVC"/><category term="Linkbuilding in SEO"/><category term="MVC Example"/><category term="Message Contract Example"/><category term="Message Contract WCF"/><category term="Overview Inheritance in asp.net"/><category term="Partial class Example"/><category term="RSACryptoServiceProvider Class"/><category term="RSACryptoServiceProvider Class codebehind"/><category term="Ranking Function in Sql"/><category term="Redirecting to a internal webpage in Jquery"/><category term="Refresh Page"/><category term="Regular expression"/><category term="RegularExpressionValidator asp.net"/><category term="Repeater"/><category term="Runtime polymorphism and compiletime polymorphism"/><category term="SQL : Get nth highest salary from table"/><category term="SQL Error Msg 4512 Resolved"/><category term="SQL Optimization Techniques"/><category term="SQL Ranking"/><category term="SQL Server correlated and uncorrelated Subqueries Example and Explanation"/><category term="SQL User Defined Functions"/><category term="SQL cursors"/><category term="Save images in Database using Sql Query"/><category term="Search engine optimization"/><category term="Seo Techniques"/><category term="Sql Joins"/><category term="Sql Subqueries"/><category term="Sql View Error"/><category term="Sql Views"/><category term="Sql self join"/><category term="Sql server joins"/><category term="Starting with WCF"/><category term="Stored Procedure optimization"/><category term="String Methods &#39;IndexOf&#39; and &#39;SubString&#39;"/><category term="Struct"/><category term="Substring Example"/><category term="To Remove a column from DataTable or Dataset in Asp.net"/><category term="To check whether column exists or not in DataTable or Dataset in Asp.net"/><category term="Types of Constructors"/><category term="Types of Keys in Sql Server"/><category term="Types of inheritance"/><category term="UDF"/><category term="Unique Key"/><category term="Using &#39;Indexof&#39; and &#39;Substring&#39; keywords in asp.net"/><category term="Using Cursor in SQL"/><category term="Using Partial Class in Asp.net"/><category term="Using serialization and Deserialization in Asp.net"/><category term="Validate Date using RegularExpressionValidator in Asp.net"/><category term="WCF Demo Application"/><category term="WCF and web service"/><category term="WCF example"/><category term="WCF fault contract"/><category term="Wen config connection string error"/><category term="abstract class"/><category term="abstract class c#"/><category term="abstract class example"/><category term="actionlink"/><category term="add column"/><category term="add row"/><category term="adding maps in contact us page of the website"/><category term="adding stylesheet Ajax CalendarExtender"/><category term="advantages of WCF"/><category term="alert"/><category term="allow only alpha numeric characters in textbox using javascript"/><category term="android app"/><category term="apache poi"/><category term="api"/><category term="asp.net 4 features"/><category term="asp.net Constructors"/><category term="asp.net call code behind method from javascript"/><category term="asp.net export data to excel"/><category term="asp.net iis registration tool"/><category term="asp.net label"/><category term="asp.net mvc"/><category term="asp.net wcf exceptions"/><category term="asp.net web api"/><category term="aspnet_regiis.exe"/><category term="aspnet_regiis.exe -iru. .net 4.0"/><category term="audit"/><category term="authentication"/><category term="autocomplete"/><category term="autocomplete extender ajax. ajax tools"/><category term="backup database"/><category term="basic logic"/><category term="bat"/><category term="bind data"/><category term="brackets"/><category term="bundling"/><category term="c# delegate"/><category term="call function from javascript"/><category term="call function timer"/><category term="call method using ajaxpro"/><category term="call wcf service using jquery"/><category term="catch"/><category term="change column datatype datatable"/><category term="changing dataset column datatype"/><category term="check column dataset"/><category term="check column datatable"/><category term="checkbox"/><category term="checkboxlist"/><category term="classic"/><category term="clear session"/><category term="clone method jquery"/><category term="coalesce"/><category term="coloumn exists datatable or dataset"/><category term="command"/><category term="configProtectionProvider is not allowed"/><category term="connectionStrings"/><category term="consuming WCF"/><category term="consuming wcf service using jquery"/><category term="convert datetime to various date formats in sql"/><category term="cors"/><category term="cross apply"/><category term="css3"/><category term="custom error handling in wcf using fault contract"/><category term="data Contract. asp.net"/><category term="data table"/><category term="dataannotations"/><category term="database backup query"/><category term="datalength"/><category term="datatype"/><category term="date"/><category term="date control"/><category term="datediff"/><category term="datetime picker"/><category term="datevalidation"/><category term="days"/><category term="dba"/><category term="ddl"/><category term="debug"/><category term="declare table variable"/><category term="delegates"/><category term="delete duplicate data in Sql server"/><category term="demo self join"/><category term="design pattern"/><category term="detailsview"/><category term="difference between WCF and web services"/><category term="difference between temp and table variable"/><category term="difference date"/><category term="difference interface and abstract class"/><category term="disable Enter Keyboard Button using Javascript"/><category term="disable enter in javascript"/><category term="div"/><category term="dotnet framework"/><category term="download"/><category term="dropdownlist items"/><category term="duplicate records"/><category term="dynamically add update edit record in gridview asp.net"/><category term="early binding"/><category term="eclipse"/><category term="encrypt decrypt webconfig"/><category term="encrypt decrypt webconfig connectionStrings"/><category term="entity data model"/><category term="entity framework"/><category term="error Sys.WebForms.PageRequestManagerParserErrorException"/><category term="event log"/><category term="example of delegates"/><category term="example self join"/><category term="excel to datatable"/><category term="exception handling"/><category term="execute scripts from bat file"/><category term="export gridview data to Excel"/><category term="extension methods c#"/><category term="factory design pattern"/><category term="factory pattern"/><category term="fadeOut"/><category term="fadeToggle and fadeTo Example"/><category term="features of .net framework 4"/><category term="finally"/><category term="find text in sql sp"/><category term="forms"/><category term="from"/><category term="fromdate"/><category term="ftp"/><category term="ftp example"/><category term="function"/><category term="generics"/><category term="git"/><category term="github"/><category term="gridview sorting"/><category term="gridview sqldatareader"/><category term="handle exception in wcf"/><category term="handleerror"/><category term="hidden variable"/><category term="hide templatefield column on runtime in gridview"/><category term="hover Example"/><category term="hover method"/><category term="how to call method in aspx page from a usercontrol button click event"/><category term="how to enable iis on windows 7 or 8"/><category term="how to read a csv file to return a string in asp.net"/><category term="html datetime picker"/><category term="html to android"/><category term="http Modules"/><category term="http handlers"/><category term="http services"/><category term="httpget"/><category term="httppost"/><category term="httpruntime"/><category term="index"/><category term="index fragmentation"/><category term="instead of trigger"/><category term="integer"/><category term="integrated mode"/><category term="interface"/><category term="interface c#"/><category term="interface example"/><category term="interfaces"/><category term="itextsharp"/><category term="jQuery autocomplete plugin"/><category term="jar"/><category term="joins"/><category term="jquery .hover"/><category term="jquery clone"/><category term="jquery clone example"/><category term="json"/><category term="keys"/><category term="keyword analysis"/><category term="keyword research"/><category term="keywords research using google keywords tool"/><category term="late binding"/><category term="layouts"/><category term="learn slidetoggle"/><category term="listitem"/><category term="logic"/><category term="logic to reverse"/><category term="lowest salary sql"/><category term="masterpages"/><category term="maxrequestlength"/><category term="meta description"/><category term="meta keywords"/><category term="meta tag"/><category term="meta tags"/><category term="method overloading"/><category term="mongo"/><category term="month"/><category term="ms sql"/><category term="multidimensional cube"/><category term="multilevel inheritance"/><category term="netbeans"/><category term="ngrepeat"/><category term="node.js"/><category term="off page seo"/><category term="olap"/><category term="oops c#"/><category term="oops inheritance"/><category term="openrowset query"/><category term="optimization"/><category term="oracle"/><category term="output parameter"/><category term="overview of .net framework"/><category term="paging"/><category term="partial classes c#"/><category term="pdf"/><category term="polymorphism in asp.net"/><category term="portal"/><category term="print"/><category term="programmer tips"/><category term="ql constraint"/><category term="rebuild"/><category term="refresh page timer"/><category term="remove column dataset"/><category term="remove column datatable"/><category term="renderpage"/><category term="rendersection"/><category term="reorganize"/><category term="repository"/><category term="resolved Sys.WebForms.PageRequestManagerParserErrorException"/><category term="responsive website"/><category term="restore database"/><category term="reverse"/><category term="reverse word"/><category term="routing"/><category term="run all sql scripts from a folder"/><category term="save file html file control"/><category term="save file using html file control in asp.net"/><category term="save images in sql server"/><category term="scope_identity()"/><category term="search window"/><category term="search word in sp"/><category term="secure connectionStrings through code"/><category term="securing web.config connection strings"/><category term="security"/><category term="seo html tags"/><category term="serialization"/><category term="server side state management"/><category term="session variables in asp.net"/><category term="sharepoint"/><category term="singleton"/><category term="sp_xml_preparedocument"/><category term="sq"/><category term="sql 2012"/><category term="sql coloumn"/><category term="sql error"/><category term="sql join examples"/><category term="sql server triggers"/><category term="sql sql server"/><category term="sqldatareader"/><category term="sqldatareader example"/><category term="sqlite3"/><category term="sqlserver"/><category term="ssas"/><category term="ssas deploy"/><category term="startsWith"/><category term="state management"/><category term="state management type"/><category term="string"/><category term="string and stringbuilder in .net"/><category term="switch coloumn and rows"/><category term="syntax cursor"/><category term="table variable"/><category term="temp table"/><category term="text autocomplete"/><category term="textbox numeric javascript"/><category term="timespan"/><category term="title tags"/><category term="todate"/><category term="track database"/><category term="trigger"/><category term="trigger examples"/><category term="triggers"/><category term="try"/><category term="type of SEO"/><category term="types of User defined functions"/><category term="types of sql joins"/><category term="types of triggers"/><category term="update"/><category term="use of abstract class"/><category term="use of interface"/><category term="uses of table variable and temp table."/><category term="using Fadding jquery"/><category term="using Fade in"/><category term="using ajax autocomplete extender in asp.net"/><category term="using batch file to execute sql scripts"/><category term="using fadeout"/><category term="using jquery .slideToggle in asp.net"/><category term="using pagemethods to call a codebehind method in asp.net"/><category term="using self join"/><category term="using wsHttpBinding in WCF Service in asp.net"/><category term="validate email id and password in javascript"/><category term="validation date"/><category term="validation number text box javascript"/><category term="versioning"/><category term="view scheme binding error"/><category term="view to controller"/><category term="visual command prompt to secure connection strings"/><category term="wamp"/><category term="web api"/><category term="web.config"/><category term="webapi"/><category term="webservice"/><category term="websites for KEYWORD Research Analysis"/><category term="what is search engine optimization"/><category term="what is seo"/><category term="where linq"/><category term="wsHttpbinding"/><category term="xdebug"/><category term="year"/><title type='text'>Web and Mobile Apps Codeware</title><subtitle type='html'>asp.net, mvc, sql server, android, JavaScript, Jquery, AngularJS, php</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>191</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-5356734747839523794</id><published>2017-03-07T12:23:00.001-08:00</published><updated>2017-03-07T12:23:39.246-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Python MySQL Database Connection using ODBC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;I&#39;m posting a sample python to Sql Server connection code. Here i will be using Python 2.7.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
1.&amp;nbsp;pip install&amp;nbsp;&lt;a href=&quot;https://github.com/mkleehammer/pyodbc&quot; style=&quot;color: #436590; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;pyodbc&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
2. Install the MySQL ODBC Connector from &lt;a href=&quot;https://dev.mysql.com/downloads/connector/odbc/3.51.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
3. &amp;nbsp;Setup ODBC connection details in Control Panel --&amp;gt; Admin Tools --&amp;gt; System DSN&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj57wGK6ZPlNGQ5AVlV12JYhu1MrzCiLdRpv5iqJShMwYuGup7Urs3ztynRx_B_-tIsJIzR-SKrNllhTS5za6f4IuzUv5O_HBNExJapMv_24vKIgdkOkCQzxifEV6bHcz21LNndSpkeSf29/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj57wGK6ZPlNGQ5AVlV12JYhu1MrzCiLdRpv5iqJShMwYuGup7Urs3ztynRx_B_-tIsJIzR-SKrNllhTS5za6f4IuzUv5O_HBNExJapMv_24vKIgdkOkCQzxifEV6bHcz21LNndSpkeSf29/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
4. Code :&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;from os import getenv&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;import pyodbc&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;conn = pyodbc.connect(r&#39;Driver={MySQL ODBC 5.3 ANSI Driver};Server=127.0.0.1;Database=test;Trusted_Connection=yes;&#39;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;cur = conn.cursor()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;string = &quot;CREATE TABLE IF NOT EXISTS TestTable(empname varchar(15), sal double)&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;cur.execute(string)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;sqlStatement = &quot;INSERT INTO TestTable(empname,sal) &amp;nbsp;VALUES (?, ?)&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;cur.execute(sqlStatement, (&#39;chandan&#39;, &#39;1000&#39;))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;conn.commit()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;4.Run python code.py in CMD&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6C6VoliuQ3ONt1Zy4lQIMg6eYkkOBsnDg0EPAK6Famm2oKFDMDn30E_rPkPqgkR9jfNvxLcQjdV9-Dqmf7zeHOO4x1zvVGu09uC7rm1h-WAZfDgK_1XY9DJC_gXloTDkXJH-X6LwrRPy/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6C6VoliuQ3ONt1Zy4lQIMg6eYkkOBsnDg0EPAK6Famm2oKFDMDn30E_rPkPqgkR9jfNvxLcQjdV9-Dqmf7zeHOO4x1zvVGu09uC7rm1h-WAZfDgK_1XY9DJC_gXloTDkXJH-X6LwrRPy/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/5356734747839523794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2017/03/python-mysql-database-connection-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5356734747839523794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5356734747839523794'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2017/03/python-mysql-database-connection-using.html' title='Python MySQL Database Connection using ODBC'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj57wGK6ZPlNGQ5AVlV12JYhu1MrzCiLdRpv5iqJShMwYuGup7Urs3ztynRx_B_-tIsJIzR-SKrNllhTS5za6f4IuzUv5O_HBNExJapMv_24vKIgdkOkCQzxifEV6bHcz21LNndSpkeSf29/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-5558951977923816576</id><published>2017-03-06T19:39:00.001-08:00</published><updated>2017-03-07T12:17:05.762-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlserver"/><title type='text'>Python MSSQL Database Connection using ODBC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I&#39;m posting a sample python to Sql Server connection code. Here i will be using Python 2.7.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1.&amp;nbsp;pip install &lt;a href=&quot;https://github.com/mkleehammer/pyodbc&quot; target=&quot;_blank&quot;&gt;pyodbc&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. Code :&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;from os import getenv&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import pyodbc&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;conn = pyodbc.connect(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; r&#39;DRIVER={ODBC Driver 11 for SQL Server};&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; r&#39;SERVER=TEST;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; r&#39;DATABASE=SampleDB;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; r&#39;UID=sa;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; r&#39;PWD=***&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cursor = conn.cursor()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cursor.execute(&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;IF OBJECT_ID(&#39;persons&#39;, &#39;U&#39;) IS NOT NULL&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; DROP TABLE persons&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;CREATE TABLE persons (&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; id INT NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; name VARCHAR(100),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; salesrep VARCHAR(100),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; PRIMARY KEY(id)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&quot;&quot;&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cursor.executemany(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;INSERT INTO persons VALUES (?, ?, ?)&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; [(1, &#39;John Smith&#39;, &#39;John Doe&#39;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2, &#39;Jane Doe&#39;, &#39;Joe Dog&#39;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(3, &#39;Mike h&#39;, &#39;Sarah H&#39;)])&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# you must call commit() to persist your data if you don&#39;t set autocommit to True&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;conn.commit()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cursor.execute(&#39;SELECT * FROM persons WHERE salesrep=?&#39;, &#39;John Doe&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;row = cursor.fetchone()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;while row:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print(&quot;ID=%d, Name=%s&quot; % (row[0], row[1]))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; row = cursor.fetchone()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;k&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;conn.close()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;3.Run python code.py in CMD&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBEQ95WUltxiQnvQDzYSbIz4Zmn7EgY21z10Qd43fYREIwKnIdt25dnE5QtdyAC17QZT7TkGSOt58kmoDVbBeqx4hdn_sYepT1JYYIytJvDozR9bSQwGn9A8-Z0LAQ6aH0nnFFXtqQ4H7N/s1600/3-7-2017+9-06-42+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;273&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBEQ95WUltxiQnvQDzYSbIz4Zmn7EgY21z10Qd43fYREIwKnIdt25dnE5QtdyAC17QZT7TkGSOt58kmoDVbBeqx4hdn_sYepT1JYYIytJvDozR9bSQwGn9A8-Z0LAQ6aH0nnFFXtqQ4H7N/s320/3-7-2017+9-06-42+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/5558951977923816576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2017/03/python-mssql-database-connection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5558951977923816576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5558951977923816576'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2017/03/python-mssql-database-connection.html' title='Python MSSQL Database Connection using ODBC'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBEQ95WUltxiQnvQDzYSbIz4Zmn7EgY21z10Qd43fYREIwKnIdt25dnE5QtdyAC17QZT7TkGSOt58kmoDVbBeqx4hdn_sYepT1JYYIytJvDozR9bSQwGn9A8-Z0LAQ6aH0nnFFXtqQ4H7N/s72-c/3-7-2017+9-06-42+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-5276550984380974313</id><published>2016-01-13T10:42:00.002-08:00</published><updated>2016-01-13T10:42:15.029-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mongodb"/><category scheme="http://www.blogger.com/atom/ns#" term="nosql"/><category scheme="http://www.blogger.com/atom/ns#" term="query"/><title type='text'>MongoDB Query to find record using greater $gt or less than $lt operators and then sort</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;MongoDB Query to find record using greater $gt or less than $lt operators and then sort&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;u&gt;&lt;b&gt;Query&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;db.grades.find({&quot;score&quot;:{$gt:65}},{&quot;score&quot;:1,student_id:2,}).sort({&quot;score:1})&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
grades is the collection.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/5276550984380974313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2016/01/mongodb-query-to-find-record-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5276550984380974313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5276550984380974313'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2016/01/mongodb-query-to-find-record-using.html' title='MongoDB Query to find record using greater $gt or less than $lt operators and then sort'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-569752392425235261</id><published>2015-09-22T07:49:00.000-07:00</published><updated>2015-09-22T07:49:17.704-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mongodb"/><category scheme="http://www.blogger.com/atom/ns#" term="node.js"/><title type='text'>sample interface for inserting data into mongodb using node.js </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;1. Below is the npm module(mongodb) link which i used to create a basic interface for inserting&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;documents into mongodb collections using node.js&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;https://www.npmjs.com/package/mongodb&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;https://www.npmjs.com/package/mongodb&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;2. I have been using RoboMongo GUI for viewing into MongoDB Database.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Steps:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;1. install node.js and mongodb&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;2. create a new folder and access it thru terminal/Cmd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;3. Now type npm init, it will ask you certain things and will create a package.json based on your input values.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;4. mention the required dependencies for mongodb in package.json file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;5. Create a new file called index.js , and paste this below code&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
6. final step to run the node.js interface from the terminal type --&amp;gt; node index.js&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;package.json&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;name&quot;: &quot;mongoapp&quot;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;version&quot;: &quot;1.0.0&quot;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;description&quot;: &quot;new mongo&quot;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;main&quot;: &quot;index.js&quot;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;scripts&quot;: {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;amp;&amp;amp; exit 1&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; },&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;keywords&quot;: [&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;mongo&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; ],&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;author&quot;: &quot;chandan&quot;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &quot;license&quot;: &quot;ISC&quot;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&quot;dependencies&quot;: {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;mongodb&quot;: &quot;~2.0&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; },&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;index.js&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
var MongoClient = require(&#39;mongodb&#39;).MongoClient&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; , assert = require(&#39;assert&#39;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
// Connection URL&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
var url = &#39;mongodb://localhost:27017/mydb&#39;;&lt;/div&gt;
&lt;div&gt;
// Use connect method to connect to the Server&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
MongoClient.connect(url, function(err, db) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; assert.equal(null, err);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; console.log(&quot;Connected correctly to server&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; insertDocuments(db,logStuff);&lt;/div&gt;
&lt;div&gt;
});&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
function logStuff(result)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;console.log(result);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
var insertDocuments = function(db, callback) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; // Get the documents collection&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; var collection = db.collection(&#39;documents&#39;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; // Insert some documents&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; collection.insert([&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {a : 1}, {a : 2}, {a : 3}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; ], function(err, result) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; assert.equal(err, null);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; assert.equal(3, result.result.n);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; assert.equal(3, result.ops.length);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; console.log(&quot;Inserted 3 documents into the document collection&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; callback(result);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/569752392425235261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/09/sample-interface-for-inserting-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/569752392425235261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/569752392425235261'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/09/sample-interface-for-inserting-data.html' title='sample interface for inserting data into mongodb using node.js '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-6810989753596680926</id><published>2015-08-15T02:22:00.001-07:00</published><updated>2015-08-15T02:22:38.435-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bat"/><category scheme="http://www.blogger.com/atom/ns#" term="jar"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Executing JAR file using Batch Command(.bat)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Below is the script to run a JAR file using a .bat command, copy and paste it into the notepad and then save as batch_file_name.bat&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;@echo OFF&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;cd C:\upload&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;java -jar compareRun.jar&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;pause&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
line 2 is the folder path for jar file, please change as per your requirements.&lt;br /&gt;
line 3 is the actual execution of the jar file&lt;br /&gt;
line 4 would avoid closing of console, so you can view the output.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/6810989753596680926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/08/executing-jar-file-using-batch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/6810989753596680926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/6810989753596680926'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/08/executing-jar-file-using-batch.html' title='Executing JAR file using Batch Command(.bat)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-5750424905173383889</id><published>2015-08-14T22:26:00.000-07:00</published><updated>2015-08-14T22:26:32.936-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache poi"/><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlite3"/><title type='text'>Excel data to Sqlite3 Database table using Java </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Below is the code for inserting data from excel sheet to sqlite3 database using Java code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;1.Open new eclipse Java Project and reference to the latest Java jdbc-sqlite jar file from &amp;nbsp; &amp;nbsp;below url&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;u&gt;&lt;a href=&quot;https://bitbucket.org/xerial/sqlite-jdbc/downloads&quot;&gt;https://bitbucket.org/xerial/sqlite-jdbc/downloads&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;2. Also reference to the&amp;nbsp;Apache POI - the Java API for Microsoft Documents, which we require for reading through the excel file&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.12-20150511.tar.gz&quot;&gt;http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.12-20150511.tar.gz&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;3. Below is the code for the same&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import java.io.FileInputStream;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import java.io.IOException;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import java.sql.*;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import org.apache.poi.hssf.usermodel.HSSFSheet;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import org.apache.poi.hssf.usermodel.HSSFWorkbook;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import org.apache.poi.poifs.filesystem.POIFSFileSystem;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import org.apache.poi.ss.usermodel.Row;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;import org.sqlite.core.DB;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;public class run {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String args[]) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Class.forName(&quot;org.sqlite.JDBC&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Connection con = DriverManager.getConnection(&quot;jdbc:sqlite:test.db&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;PreparedStatement pstm = null; Statement stmt = null;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;con.setAutoCommit(false);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;pstm = (PreparedStatement) con.prepareStatement(&quot;DROP TABLE IF&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;EXISTS table_name&quot;); pstm.execute();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;stmt = con.createStatement();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String sql = &quot;CREATE TABLE table_name &quot; + &quot;(ID INTEGER PRIMARY KEY&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;AUTOINCREMENT,&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;+ &quot; NAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TEXT)&quot;;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;stmt.executeUpdate(sql);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;stmt.close();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;FileInputStream input = new FileInputStream(&quot;C:\\Emp.xls&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;POIFSFileSystem fs = new POIFSFileSystem(input);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;HSSFWorkbook wb = new HSSFWorkbook(fs);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;HSSFSheet sheet = wb.getSheetAt(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Row row;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for (int i = 1; i &amp;lt;= sheet.getLastRowNum(); i++) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;row = sheet.getRow(i);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;String col2 = row.getCell(1).getStringCellValue();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;String sqlcommand = &quot;INSERT INTO table_name(NAME) Values(&#39;&quot; + col2 + &quot;&#39;)&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;pstm = (PreparedStatement) con.prepareStatement(sqlcommand);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;pstm.execute();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;System.out.println(&quot;Import rows &quot; + i);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;con.commit();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;pstm.close();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;con.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;input.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;Success import excel to sqlite Database&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;} catch (ClassNotFoundException e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(e);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (SQLException ex) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(ex);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (IOException ioe) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(ioe);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7aogTrprg5L-uEYMKjMv_aCYi5SvGX1WIiWVdDd0XmnVMnfPb0qCtoHfI6Ud761CPpv9qkxyucM10mEKCG-EDcr8DrePKxQSRVfOSL1U-5V4IemC_lOpzWULqsTN0M1t_wSjCxCMD1Vgk/s1600/excel.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7aogTrprg5L-uEYMKjMv_aCYi5SvGX1WIiWVdDd0XmnVMnfPb0qCtoHfI6Ud761CPpv9qkxyucM10mEKCG-EDcr8DrePKxQSRVfOSL1U-5V4IemC_lOpzWULqsTN0M1t_wSjCxCMD1Vgk/s1600/excel.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/5750424905173383889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/08/excel-data-to-sqlite3-database-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5750424905173383889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5750424905173383889'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/08/excel-data-to-sqlite3-database-table.html' title='Excel data to Sqlite3 Database table using Java '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7aogTrprg5L-uEYMKjMv_aCYi5SvGX1WIiWVdDd0XmnVMnfPb0qCtoHfI6Ud761CPpv9qkxyucM10mEKCG-EDcr8DrePKxQSRVfOSL1U-5V4IemC_lOpzWULqsTN0M1t_wSjCxCMD1Vgk/s72-c/excel.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-3709313971250290175</id><published>2015-07-06T21:35:00.000-07:00</published><updated>2015-07-06T21:35:40.447-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="slim"/><title type='text'>Basic setup of PHP slim framework for creating REST API</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;# php-slim-basic-setup

1. Im using Netbeans for my PHP Development

2. This project is a basic setup of PHP slim framework for creating REST Api.&lt;/pre&gt;
&lt;pre&gt;   Github : https://github.com/chandan2588/php-slim-basic-setup

3. Download &amp;amp; Copy project in your system and host it under apache

4. To test this use cURL or you can use this google chrome extension 
Check out &quot;Postman - REST Client&quot;: https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm

5. Url Examples :
   http://localhost/Location/vendor/slim/slim/index.php/
   http://localhost/Location/vendor/slim/slim/index.php/post
   http://localhost/Location/vendor/slim/slim/index.php/getdata/16
   
   My Project Folder Structure :
   
   Location (Root Folder)
   |__Vendor
      |__slim
         |__slim---&amp;gt; Index.php
            |__Slim (slim lib files)&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/3709313971250290175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/07/basic-setup-of-php-slim-framework-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/3709313971250290175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/3709313971250290175'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/07/basic-setup-of-php-slim-framework-for.html' title='Basic setup of PHP slim framework for creating REST API'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-4549108547052051341</id><published>2015-05-03T11:28:00.001-07:00</published><updated>2015-05-03T11:28:21.479-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="brackets"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Installing Brackets On Ubuntu Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Please follow this link for installing Brackets Web Code Editor on Ubuntu Linux&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://ubuntualive.blogspot.in/2014/06/how-to-install-brackets-041-on-ubuntu.html&quot;&gt;http://ubuntualive.blogspot.in/2014/06/how-to-install-brackets-041-on-ubuntu.html&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/4549108547052051341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/05/installing-brackets-on-ubuntu-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/4549108547052051341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/4549108547052051341'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/05/installing-brackets-on-ubuntu-linux.html' title='Installing Brackets On Ubuntu Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-692645446058851830</id><published>2015-05-03T07:56:00.000-07:00</published><updated>2015-05-03T07:56:16.812-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="node"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu Linux Commands to Install Node, NPM and Packages </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
1. Installing Node js and NPM on Ubuntu Linux, Follow below link&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=tbgBN2y5_wI&quot;&gt;https://www.youtube.com/watch?v=tbgBN2y5_wI&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Check node and npm version in terminal :&lt;br /&gt;
node -v&lt;br /&gt;
npm -v&lt;br /&gt;
&lt;br /&gt;
2. Then in terminal use this below command to install node packages&lt;br /&gt;
&lt;br /&gt;
eg: sudo npm install -g bower express grunt&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/692645446058851830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/05/ubuntu-linux-commands-to-install-node.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/692645446058851830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/692645446058851830'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/05/ubuntu-linux-commands-to-install-node.html' title='Ubuntu Linux Commands to Install Node, NPM and Packages '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-7772677373625191602</id><published>2015-03-29T04:14:00.001-07:00</published><updated>2015-03-29T04:14:56.133-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="mongodb"/><category scheme="http://www.blogger.com/atom/ns#" term="nosql"/><title type='text'>c#.net with Mongodb tutorial </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Follow this below link :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.codeproject.com/Articles/273145/Using-MongoDB-with-the-Official-Csharp-Driver&quot;&gt;http://www.codeproject.com/Articles/273145/Using-MongoDB-with-the-Official-Csharp-Driver&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;About MongoDB :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
It&#39;s a Document Oriented Database. The data structure stored here is in similar to JSON. It is also classified as one of the popular NoSQL Database.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/7772677373625191602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/cnet-with-mongodb-tutorial.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7772677373625191602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7772677373625191602'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/cnet-with-mongodb-tutorial.html' title='c#.net with Mongodb tutorial '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-7867217371725495968</id><published>2015-03-24T21:54:00.002-07:00</published><updated>2015-03-24T21:54:50.060-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="mongo"/><category scheme="http://www.blogger.com/atom/ns#" term="mongodb"/><title type='text'>Excellent post on how to install and get started with mongodb Database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
http://stackoverflow.com/questions/2404742/how-to-install-mongodb-on-windows&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/7867217371725495968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/excellent-post-on-how-to-install-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7867217371725495968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7867217371725495968'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/excellent-post-on-how-to-install-and.html' title='Excellent post on how to install and get started with mongodb Database'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-740216195033132816</id><published>2015-03-20T13:49:00.001-07:00</published><updated>2015-03-20T13:49:29.401-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="github"/><category scheme="http://www.blogger.com/atom/ns#" term="repository"/><category scheme="http://www.blogger.com/atom/ns#" term="versioning"/><title type='text'>Pushing code to GIT || How to add files into Github repository ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
1. First create a repository at github.com&lt;br /&gt;
&lt;br /&gt;
2. Then install&amp;nbsp;git on your system&lt;br /&gt;
http://git-scm.com/downloads&lt;br /&gt;
&lt;br /&gt;
3. after installing open command prompt as Admin&lt;br /&gt;
&lt;br /&gt;
4. then navigate to ur project folder in cmd&lt;br /&gt;
e:\myproject&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. now we will type the git commands&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;git init&lt;/li&gt;
&lt;li&gt;git add *&lt;/li&gt;
&lt;li&gt;git commit -m &quot;first commit&quot;&lt;/li&gt;
&lt;li&gt;git remote add origin https://github.com/&amp;lt;repository-URL&amp;gt;&lt;/li&gt;
&lt;li&gt;git push origin master --force OR git push origin master OR git push -u origin master&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Eg.: e:\myproject&amp;gt; git init&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
6. Now you should be able to see your files in your github,com repository.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/740216195033132816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/pushing-code-to-git-how-to-add-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/740216195033132816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/740216195033132816'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/pushing-code-to-git-how-to-add-files.html' title='Pushing code to GIT || How to add files into Github repository ?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-2402348982954237975</id><published>2015-03-19T12:54:00.001-07:00</published><updated>2015-03-19T12:54:27.956-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="ngrepeat"/><title type='text'>[Resolved] Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use &#39;track by&#39; expression to specify unique keys. Repeater: playlist in playlists, Duplicate key: string:&quot;, Duplicate value: &quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi today while writing angularjs code using angular directive &#39;ngRepeat&#39; i came across this below error, to resolve this follow below blog link :&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;error:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use &#39;track by&#39; expression to specify unique keys. Repeater: playlist in playlists, Duplicate key: string:&quot;, Duplicate value: &quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;solution :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.anujgakhar.com/2013/06/15/duplicates-in-a-repeater-are-not-allowed-in-angularjs/&quot;&gt;http://www.anujgakhar.com/2013/06/15/duplicates-in-a-repeater-are-not-allowed-in-angularjs/&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/2402348982954237975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/resolved-error-ngrepeatdupes-duplicates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/2402348982954237975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/2402348982954237975'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/resolved-error-ngrepeatdupes-duplicates.html' title='[Resolved] Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use &#39;track by&#39; expression to specify unique keys. Repeater: playlist in playlists, Duplicate key: string:&quot;, Duplicate value: &quot;'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-1124780195344908878</id><published>2015-03-19T11:13:00.000-07:00</published><updated>2015-03-19T11:13:08.398-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net mvc"/><category scheme="http://www.blogger.com/atom/ns#" term="cors"/><title type='text'>Allow CORS in ASP.Net MVC </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://stackoverflow.com/a/6290385&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://stackoverflow.com/a/6290385&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/1124780195344908878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/allow-cors-in-aspnet-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/1124780195344908878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/1124780195344908878'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/allow-cors-in-aspnet-mvc.html' title='Allow CORS in ASP.Net MVC '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-7863380826993246557</id><published>2015-03-11T21:58:00.000-07:00</published><updated>2015-03-11T21:58:42.281-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="command"/><category scheme="http://www.blogger.com/atom/ns#" term="node"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><title type='text'>Command to list all the globally installed npm pacakages with version </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
hi, &amp;nbsp;to list all the globally installed npm packages type this below command&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;npm list -g --depth=0&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qXwNVEWf5ULiYQLRlptwwehQs-KFysuCZpx3MC41T8NYoL5p1A8yXaiSCWHyEJpKkRdlNyYp2yS16_RuEW5OCHKKaafsXvXlhKbWtlfGSM-0ZIxUt6Ios1tcRG2LbWp4RH1Bp3KpPcQO/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qXwNVEWf5ULiYQLRlptwwehQs-KFysuCZpx3MC41T8NYoL5p1A8yXaiSCWHyEJpKkRdlNyYp2yS16_RuEW5OCHKKaafsXvXlhKbWtlfGSM-0ZIxUt6Ios1tcRG2LbWp4RH1Bp3KpPcQO/s1600/1.png&quot; height=&quot;126&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/7863380826993246557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/command-to-list-all-globally-installed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7863380826993246557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7863380826993246557'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/03/command-to-list-all-globally-installed.html' title='Command to list all the globally installed npm pacakages with version '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qXwNVEWf5ULiYQLRlptwwehQs-KFysuCZpx3MC41T8NYoL5p1A8yXaiSCWHyEJpKkRdlNyYp2yS16_RuEW5OCHKKaafsXvXlhKbWtlfGSM-0ZIxUt6Ios1tcRG2LbWp4RH1Bp3KpPcQO/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-8712935426997176103</id><published>2015-01-18T01:05:00.001-08:00</published><updated>2015-01-18T01:05:56.116-08:00</updated><title type='text'>Uploading a File (Or Files) With ASP.NET MVC </title><content type='html'>&lt;a href=&quot;http://haacked.com/archive/2010/07/16/uploading-files-with-aspnetmvc.aspx/#.VLt0jG3scic.blogger&quot;&gt;Uploading a File (Or Files) With ASP.NET MVC -&amp;nbsp;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/8712935426997176103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/uploading-file-or-files-with-aspnet-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/8712935426997176103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/8712935426997176103'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/uploading-file-or-files-with-aspnet-mvc.html' title='Uploading a File (Or Files) With ASP.NET MVC '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-7795556894557316259</id><published>2015-01-16T12:02:00.001-08:00</published><updated>2015-01-16T12:02:54.466-08:00</updated><title type='text'>AngularJS Dependency Injection - Demystified · Anand Mani Sankar</title><content type='html'>&lt;a href=&quot;http://anandmanisankar.com/posts/angularjs-dependency-injection-demystified/#.VLluYl7sGzM.blogger&quot;&gt;AngularJS Dependency Injection - Demystified · Anand Mani Sankar&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/7795556894557316259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/angularjs-dependency-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7795556894557316259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7795556894557316259'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/angularjs-dependency-injection.html' title='AngularJS Dependency Injection - Demystified · Anand Mani Sankar'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-3177384421175664934</id><published>2015-01-16T11:33:00.000-08:00</published><updated>2015-01-16T11:34:32.926-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dependency Injection"/><category scheme="http://www.blogger.com/atom/ns#" term="design patterns"/><title type='text'>Learning Dependency Injection with Examples</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
1. Definition&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/a/14301816&quot; target=&quot;_blank&quot;&gt;Simple Example Dependency Injection &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. Types of Dependency Injection&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.dotnet-tricks.com/Tutorial/dependencyinjection/67LX120413-Implementation-of-Dependency-Injection-Pattern-in-C&quot; target=&quot;_blank&quot;&gt;Types of DI&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/3177384421175664934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/learning-dependency-injection-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/3177384421175664934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/3177384421175664934'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/learning-dependency-injection-with.html' title='Learning Dependency Injection with Examples'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-2869950673740996871</id><published>2015-01-01T09:13:00.001-08:00</published><updated>2015-01-01T09:13:32.313-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="routing"/><title type='text'>[Resolved- AngularJS Routing] Uncaught Error : [$injector:Modulerr] </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
hi recently while using angularjs routing i came up with this below issue.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcaGSl8uFMHh3GAenwvbEl7UR8Cfq-FDq6xQkJLMiguOregCafuUuscobcG4MUXJc78gBtVeBhEc3Juetsww6lljdpEFe90SS589h34M8hnb0yFo-x3VnZi3HOci2gbj2Ys3w4sHmdG5QU/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcaGSl8uFMHh3GAenwvbEl7UR8Cfq-FDq6xQkJLMiguOregCafuUuscobcG4MUXJc78gBtVeBhEc3Juetsww6lljdpEFe90SS589h34M8hnb0yFo-x3VnZi3HOci2gbj2Ys3w4sHmdG5QU/s1600/1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
to resolve this go to your angularjs code and change this below code&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;var homeMainApp = angular.module(&#39;homeMainA&#39;, []);&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;var homeMainApp = angular.module(&#39;homeMainA&#39;, [&#39;ngRoute&#39;]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
hope that resolves your issue as well.thanks&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/2869950673740996871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/resolved-angularjs-routing-uncaught.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/2869950673740996871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/2869950673740996871'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2015/01/resolved-angularjs-routing-uncaught.html' title='[Resolved- AngularJS Routing] Uncaught Error : [$injector:Modulerr] '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcaGSl8uFMHh3GAenwvbEl7UR8Cfq-FDq6xQkJLMiguOregCafuUuscobcG4MUXJc78gBtVeBhEc3Juetsww6lljdpEFe90SS589h34M8hnb0yFo-x3VnZi3HOci2gbj2Ys3w4sHmdG5QU/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-9056616398187108721</id><published>2014-12-23T21:49:00.000-08:00</published><updated>2014-12-23T21:49:28.662-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="portal"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>[Resolved] The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to &#39;C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files&#39;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
hi i was accessing a SharePoint portal when i got this below error&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; color: maroon; font-family: Verdana; font-size: 14pt; font-weight: normal;&quot;&gt;
&lt;i&gt;The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to &#39;C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files&#39;&lt;/i&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg09JEuasTzsGplKt4crEz3hTGIaDGLVbH_x_PrOoIwR97GzR5jSrpnXm8uSNy1n22M0tTh1N1Mvx8j-J4wzEygs3wz2iDAIPca2HSsMhjPMa84dvKNsuvCvp9NX1JGNkh9GhcseD7AQP3m/s1600/2M.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg09JEuasTzsGplKt4crEz3hTGIaDGLVbH_x_PrOoIwR97GzR5jSrpnXm8uSNy1n22M0tTh1N1Mvx8j-J4wzEygs3wz2iDAIPca2HSsMhjPMa84dvKNsuvCvp9NX1JGNkh9GhcseD7AQP3m/s1600/2M.jpg&quot; height=&quot;138&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;u&gt;lets see how to resolve this :&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
now run cmd as admin and go to this below path and type&amp;nbsp;&lt;i&gt;aspnet_regiis -i&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;path&lt;/b&gt; :&amp;nbsp;C:\Windows\Microsoft.NET\Framework64\v2.0.50727&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPD2Thdf0dJHaWcCME_PLJvelNIfBM72QjQ8Kgsq1bPrgeFptmK4k3YCVq2zNN_hf6zcBv5F4lmEK45vZzbUVhRLUGxs1EF7Azj6NnRxJdaqkENaJ_LPxj3dmvKNMD4uMySfHytCMD9kC/s1600/3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPD2Thdf0dJHaWcCME_PLJvelNIfBM72QjQ8Kgsq1bPrgeFptmK4k3YCVq2zNN_hf6zcBv5F4lmEK45vZzbUVhRLUGxs1EF7Azj6NnRxJdaqkENaJ_LPxj3dmvKNMD4uMySfHytCMD9kC/s1600/3.jpg&quot; height=&quot;66&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Next type&amp;nbsp;&lt;i&gt;aspnet_regiis -ga &quot;NT AUTHORITY\NETWORK SERVICE&quot;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS8cyuYQyQQjnv6sjOgpEIvDh5oIdqaGX_DqHksf3iON9WqBovwJyZg4gQ-hg2Bknfm7qsmcvTV-UFHvHyWTD3h80NoknSO9AjXvVnGz1IYjqPHWYQQJxxKfH-oLIpTXUGphRK2-Sw6EEj/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS8cyuYQyQQjnv6sjOgpEIvDh5oIdqaGX_DqHksf3iON9WqBovwJyZg4gQ-hg2Bknfm7qsmcvTV-UFHvHyWTD3h80NoknSO9AjXvVnGz1IYjqPHWYQQJxxKfH-oLIpTXUGphRK2-Sw6EEj/s1600/2.jpg&quot; height=&quot;108&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you should be able to browse your websites.&lt;br /&gt;
Thanks.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS8cyuYQyQQjnv6sjOgpEIvDh5oIdqaGX_DqHksf3iON9WqBovwJyZg4gQ-hg2Bknfm7qsmcvTV-UFHvHyWTD3h80NoknSO9AjXvVnGz1IYjqPHWYQQJxxKfH-oLIpTXUGphRK2-Sw6EEj/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/9056616398187108721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/resolved-current-identity-nt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/9056616398187108721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/9056616398187108721'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/resolved-current-identity-nt.html' title='[Resolved] The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to &#39;C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files&#39;'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg09JEuasTzsGplKt4crEz3hTGIaDGLVbH_x_PrOoIwR97GzR5jSrpnXm8uSNy1n22M0tTh1N1Mvx8j-J4wzEygs3wz2iDAIPca2HSsMhjPMa84dvKNsuvCvp9NX1JGNkh9GhcseD7AQP3m/s72-c/2M.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-5611940728143462167</id><published>2014-12-23T12:57:00.001-08:00</published><updated>2014-12-23T12:57:41.028-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="#angularjs #json #api #REST"/><title type='text'>Calling a json rest api from angularJS || using AngularJS XMLHttpRequest to call service</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
hi lets see how to call a http rest api from &lt;i&gt;angularjs&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
1. create the rest api which returns JSON data&lt;br /&gt;
&lt;br /&gt;
2. Host the Http rest api ( in my case im hosting it on localhost )&lt;br /&gt;
&lt;br /&gt;
3. Now we will see how to call this http api from &lt;i&gt;angularjs&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Code:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div ng-app=&quot;&quot; ng-controller=&quot;EmpData&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div ng-repeat=&quot;x in Emp&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h1&amp;gt; {{ &#39;Employee ID:&#39; + x.EID &amp;nbsp;}} &amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p&amp;gt;{{ &#39;Name: &#39; + x.EName}}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p&amp;gt;{{ &#39;Salary: &#39; + x.ESalary}}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function EmpData($scope, $http) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $http.get(&quot;http://localhost/api/Home&quot;).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success(function (data) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $scope.Emp = data;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;b&gt;4. Output&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijIjJzosP9uULIhVxj4oh6qu_LMtpxa0lxh7L4dqmONIn7E67nJ3J6qMBKl4GZx0Jli5FdOC5gwVXyRQL64CGHWKNl5jJ_i3Kh6ntxF60hzyqejkPd5GXwx29zm774Y9ugTlfG-cidIQUU/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijIjJzosP9uULIhVxj4oh6qu_LMtpxa0lxh7L4dqmONIn7E67nJ3J6qMBKl4GZx0Jli5FdOC5gwVXyRQL64CGHWKNl5jJ_i3Kh6ntxF60hzyqejkPd5GXwx29zm774Y9ugTlfG-cidIQUU/s1600/1.jpg&quot; height=&quot;320&quot; width=&quot;210&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/5611940728143462167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/calling-json-rest-api-from-angularjs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5611940728143462167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/5611940728143462167'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/calling-json-rest-api-from-angularjs.html' title='Calling a json rest api from angularJS || using AngularJS XMLHttpRequest to call service'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijIjJzosP9uULIhVxj4oh6qu_LMtpxa0lxh7L4dqmONIn7E67nJ3J6qMBKl4GZx0Jli5FdOC5gwVXyRQL64CGHWKNl5jJ_i3Kh6ntxF60hzyqejkPd5GXwx29zm774Y9ugTlfG-cidIQUU/s72-c/1.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-1670785345025739461</id><published>2014-12-23T12:15:00.003-08:00</published><updated>2014-12-23T12:15:48.973-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="rest"/><category scheme="http://www.blogger.com/atom/ns#" term="webapi"/><title type='text'>[Resolved] WEBAPI ERROR using Json: The &#39;ObjectContent`1&#39; type failed to serialize the response body for content type &#39;application/xml; charset=utf-8&#39;.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
hi lets see &amp;nbsp;how to resolve below error occurred while accessing web api for Json datatype :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The &#39;ObjectContent`1&#39; type failed to serialize the response body for content type &#39;application/xml; charset=utf-8&#39;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP8f2bGFRkMXZQ8eQLZLBFjQuL2ACbDTeaLFzjc0MBFHPDR7zB7_wy2m0synbaUOHKFsd6CCcXzJLyP_izM4rDoHBQueHSFTmr4Dw34PSUK2CgQz96y6bagh07WP5YUNUTAWkiO6jshM9o/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP8f2bGFRkMXZQ8eQLZLBFjQuL2ACbDTeaLFzjc0MBFHPDR7zB7_wy2m0synbaUOHKFsd6CCcXzJLyP_izM4rDoHBQueHSFTmr4Dw34PSUK2CgQz96y6bagh07WP5YUNUTAWkiO6jshM9o/s1600/1.jpg&quot; height=&quot;124&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Solution:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
go to global.asax file and in Application_Start() event add this below line.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcXZZKGnzjd7vvzN7EtcPGIRhUh4or35dhUSSMyI-0a3ykOgg7Q6vFgKqVuaxl9n_0hhogzv9evQ5-IA0anYmqH4AcWsh5-hGlvHgVXKBzjj58FuqhXIrb4xCoievNteC15H3cEP2hyOgb/s1600/2M.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcXZZKGnzjd7vvzN7EtcPGIRhUh4or35dhUSSMyI-0a3ykOgg7Q6vFgKqVuaxl9n_0hhogzv9evQ5-IA0anYmqH4AcWsh5-hGlvHgVXKBzjj58FuqhXIrb4xCoievNteC15H3cEP2hyOgb/s1600/2M.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;After this u shud b able to run the webapi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisk__VCxRDFGxVMM6s3PBAIE9K8ZHOHffDLJtlBQ9MyX7w7lRmpI3nXGKWW9XYJgPssZO53Txw3MkbH54BBansjQw828nMdxOfdsmBRnOd4OgT1Js4klNLHVkaB_WXpsYF3ihPTQ6zQ2MO/s1600/2M.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisk__VCxRDFGxVMM6s3PBAIE9K8ZHOHffDLJtlBQ9MyX7w7lRmpI3nXGKWW9XYJgPssZO53Txw3MkbH54BBansjQw828nMdxOfdsmBRnOd4OgT1Js4klNLHVkaB_WXpsYF3ihPTQ6zQ2MO/s1600/2M.jpg&quot; height=&quot;70&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/1670785345025739461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/resolved-webapi-error-using-json.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/1670785345025739461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/1670785345025739461'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/resolved-webapi-error-using-json.html' title='[Resolved] WEBAPI ERROR using Json: The &#39;ObjectContent`1&#39; type failed to serialize the response body for content type &#39;application/xml; charset=utf-8&#39;.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP8f2bGFRkMXZQ8eQLZLBFjQuL2ACbDTeaLFzjc0MBFHPDR7zB7_wy2m0synbaUOHKFsd6CCcXzJLyP_izM4rDoHBQueHSFTmr4Dw34PSUK2CgQz96y6bagh07WP5YUNUTAWkiO6jshM9o/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-7020221344311925987</id><published>2014-12-05T10:22:00.002-08:00</published><updated>2014-12-05T10:22:10.583-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>Tutorial for Selecting nth last element using jquery || using nth-last-child in jquery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
hi let see how to select a nth last element like the &amp;lt;div&amp;gt;, &amp;lt;p&amp;gt;, &amp;lt;h1&amp;gt; etc. using jquery.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Now in below example just to check if we have selected the correct element we will change its color&lt;br /&gt;&lt;span id=&quot;more-690&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;example for selecting a 2nd last &amp;lt;h1&amp;gt;&amp;nbsp;element which is inside a &amp;lt;div&amp;gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=”&lt;a href=&quot;http://www.w3.org/1999/xhtml%E2%80%9D&amp;amp;gt&quot; rel=&quot;nofollow&quot; style=&quot;-webkit-transition: all 0.3s linear; border: 0px; color: #ff8f85; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; transition: all 0.3s linear; vertical-align: baseline;&quot;&gt;http://www.w3.org/1999/xhtml”&amp;amp;gt&lt;/a&gt;;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script src=”//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=”text/javascript”&amp;gt;&lt;br /&gt;$(document).ready(function () {&lt;br /&gt;$(“button”).click(function () {&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
$(“h1:nth-last-child(2)”).css(“background-color”, “yellow”);&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
});&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;im 1st h1&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;im 2nd h1&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;im 3rd h1&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;im 4th h1&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;im 5th h1&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;button&amp;gt;Change color of 4th element ( as it is 2nd last )&amp;lt;/button&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;output:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;https://chandanprogramming.files.wordpress.com/2014/11/11.jpg&quot; style=&quot;-webkit-transition: all 0.3s linear; border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: dotted thin; padding: 0px; text-decoration: none; transition: all 0.3s linear; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;1&quot; class=&quot;alignnone size-full wp-image-691&quot; src=&quot;https://chandanprogramming.files.wordpress.com/2014/11/11.jpg?w=640&quot; style=&quot;border: 0px; height: auto; margin-top: 0.5em; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/7020221344311925987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/tutorial-for-selecting-nth-last-element.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7020221344311925987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/7020221344311925987'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/tutorial-for-selecting-nth-last-element.html' title='Tutorial for Selecting nth last element using jquery || using nth-last-child in jquery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-1253327172325815406</id><published>2014-12-05T10:20:00.001-08:00</published><updated>2014-12-05T10:20:59.809-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><title type='text'>AngularJS alert message box using $window</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
hi in this post i will show how to show an alert box in&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;angularJS&lt;/em&gt;&amp;nbsp;using&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$window&lt;/em&gt;&amp;nbsp;element&lt;br /&gt;&lt;span id=&quot;more-686&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Code :&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;html xmlns=”&lt;a href=&quot;http://www.w3.org/1999/xhtml%E2%80%9D&amp;amp;gt&quot; rel=&quot;nofollow&quot; style=&quot;-webkit-transition: all 0.3s linear; border: 0px; color: #ff8f85; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; transition: all 0.3s linear; vertical-align: baseline;&quot;&gt;http://www.w3.org/1999/xhtml”&amp;amp;gt&lt;/a&gt;;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;head&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;script src=”//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js”&amp;gt;&amp;lt;/script&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;script type=”text/javascript”&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function homeController($scope, $window)&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$scope.showalert = function ()&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$window.alert($scope.name);&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;body&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;div ng-app=”” ng-controller=”homeController”&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;input type=”text” ng-model=”name” /&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;button type=”submit” ng-click=”showalert()”&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;output:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;https://chandanprogramming.files.wordpress.com/2014/11/1.jpg&quot; style=&quot;-webkit-transition: all 0.3s linear; border: 0px; color: #ff8f85; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; transition: all 0.3s linear; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;1&quot; class=&quot;alignnone size-full wp-image-687&quot; height=&quot;92&quot; src=&quot;https://chandanprogramming.files.wordpress.com/2014/11/1.jpg?w=640&amp;amp;h=92&quot; style=&quot;border: 0px; height: auto; margin-top: 0.5em; max-width: 100%;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/1253327172325815406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/angularjs-alert-message-box-using-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/1253327172325815406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/1253327172325815406'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/angularjs-alert-message-box-using-window.html' title='AngularJS alert message box using $window'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6394135838508326324.post-921601370144825403</id><published>2014-12-05T10:19:00.002-08:00</published><updated>2014-12-05T10:19:54.373-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="exception handling"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><title type='text'>Exception Handling in asp.net mvc using global.asax application_error() Method</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
hi now lets see how to catch exception&amp;nbsp;in asp.net mvc using global.asax application_error() Method.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span id=&quot;more-683&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;br /&gt;1. set Custom Error to Off in the web.config file&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
2. go to global.asax file and add this below code.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;protected void Application_Error(object sender, EventArgs e)&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Exception exception = Server.GetLastError();&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Response.Clear();&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;HttpException httpException = exception as HttpException;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if (httpException != null)&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;string action;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;switch (httpException.GetHttpCode())&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;case 404:&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// page not found&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;action = “HttpError404″; // create action method named HttpError404 &amp;nbsp;in controller&amp;nbsp;and also add the appropriate view&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;break;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;case 500:&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// server error&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;action = “HttpError500″;&amp;nbsp;// create action method named HttpError500 in controller&amp;nbsp;and also add the appropriate view&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;break;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;default:&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;action = “HttpOtherErrors”;&amp;nbsp;// create action method named HttpOtherErrors in controller&amp;nbsp;and also add the appropriate view&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;break;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// clear error on server&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Server.ClearError();&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Response.Redirect(String.Format(“~/ErrorHandle/{0}/?message={1}”, action, exception.Message)); // ErrorHandle is the controller Name&amp;nbsp;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;else&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Response.Redirect(String.Format(“~/ErrorHandle/{0}/?message={1}”, “HttpOtherErrors”, exception.Message));&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
3. in controller catch the exception message and show it in the view&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #666666; font-family: Muli, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Grande&#39;, Verdana, Tahoma, Arial, sans-serif; font-size: 13px; line-height: 23.9980010986328px; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public ActionResult HttpOtherErrors(string message)&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ViewBag.ExceptionMessg = message;&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;return View();&lt;/em&gt;&lt;br /&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chandanprogramming.blogspot.com/feeds/921601370144825403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/exception-handling-in-aspnet-mvc-using_5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/921601370144825403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6394135838508326324/posts/default/921601370144825403'/><link rel='alternate' type='text/html' href='http://chandanprogramming.blogspot.com/2014/12/exception-handling-in-aspnet-mvc-using_5.html' title='Exception Handling in asp.net mvc using global.asax application_error() Method'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>