tag:blogger.com,1999:blog-3541107046929063992024-03-13T06:04:21.089-07:00Asma QureshiProject Manager
Software Developer
Dubai UAEAsma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.comBlogger642125tag:blogger.com,1999:blog-354110704692906399.post-68277676925175745712021-06-08T04:01:00.000-07:002021-06-08T04:01:01.011-07:00C#: create mural WS SOAP Request Example <p> <span class="pln" style="box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; white-space: pre-wrap;">using </span><span class="typ" style="box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; white-space: pre-wrap;">System</span><span class="pun" style="box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; white-space: pre-wrap;">.</span><span class="typ" style="box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; white-space: pre-wrap;">Xml</span><span class="pun" style="box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; white-space: pre-wrap;">;</span></p><pre class="lang-cs prettyprint prettyprinted" style="background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.42857; margin-bottom: 10px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 9.5px; word-break: break-all;"><code style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;"><span class="pln" style="box-sizing: border-box;">using </span><span class="typ" style="box-sizing: border-box;">System</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Net</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
using </span><span class="typ" style="box-sizing: border-box;">System</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">IO</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">public</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">static</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">void</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">CallWebService</span><span class="pun" style="box-sizing: border-box;">()</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">var</span><span class="pln" style="box-sizing: border-box;"> _url </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="str" style="box-sizing: border-box;">"http://xxxxxxxxx/Service1.asmx"</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">var</span><span class="pln" style="box-sizing: border-box;"> _action </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="str" style="box-sizing: border-box;">"http://xxxxxxxx/Service1.asmx?op=HelloWorld"</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">XmlDocument</span><span class="pln" style="box-sizing: border-box;"> soapEnvelopeXml </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">CreateSoapEnvelope</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">HttpWebRequest</span><span class="pln" style="box-sizing: border-box;"> webRequest </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">CreateWebRequest</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">_url</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> _action</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">InsertSoapEnvelopeIntoWebRequest</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">soapEnvelopeXml</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> webRequest</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
</span><span class="com" style="box-sizing: border-box;">// begin async call to web request.</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">IAsyncResult</span><span class="pln" style="box-sizing: border-box;"> asyncResult </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">BeginGetResponse</span><span class="pun" style="box-sizing: border-box;">(</span><span class="kwd" style="box-sizing: border-box;">null</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">null</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
</span><span class="com" style="box-sizing: border-box;">// suspend this thread until call is complete. You might want to</span><span class="pln" style="box-sizing: border-box;">
</span><span class="com" style="box-sizing: border-box;">// do something usefull here like update your UI.</span><span class="pln" style="box-sizing: border-box;">
asyncResult</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">AsyncWaitHandle</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">WaitOne</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pln" style="box-sizing: border-box;">
</span><span class="com" style="box-sizing: border-box;">// get the response from the completed web request.</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">string</span><span class="pln" style="box-sizing: border-box;"> soapResult</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
using </span><span class="pun" style="box-sizing: border-box;">(</span><span class="typ" style="box-sizing: border-box;">WebResponse</span><span class="pln" style="box-sizing: border-box;"> webResponse </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">EndGetResponse</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">asyncResult</span><span class="pun" style="box-sizing: border-box;">))</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
using </span><span class="pun" style="box-sizing: border-box;">(</span><span class="typ" style="box-sizing: border-box;">StreamReader</span><span class="pln" style="box-sizing: border-box;"> rd </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">new</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">StreamReader</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">webResponse</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">GetResponseStream</span><span class="pun" style="box-sizing: border-box;">()))</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
soapResult </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> rd</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">ReadToEnd</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">Console</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Write</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">soapResult</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">private</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">static</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">HttpWebRequest</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">CreateWebRequest</span><span class="pun" style="box-sizing: border-box;">(</span><span class="kwd" style="box-sizing: border-box;">string</span><span class="pln" style="box-sizing: border-box;"> url</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">string</span><span class="pln" style="box-sizing: border-box;"> action</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">HttpWebRequest</span><span class="pln" style="box-sizing: border-box;"> webRequest </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="pun" style="box-sizing: border-box;">(</span><span class="typ" style="box-sizing: border-box;">HttpWebRequest</span><span class="pun" style="box-sizing: border-box;">)</span><span class="typ" style="box-sizing: border-box;">WebRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Create</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">url</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Headers</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Add</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">"SOAPAction"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> action</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">ContentType</span><span class="pln" style="box-sizing: border-box;"> </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="str" style="box-sizing: border-box;">"text/xml;charset=\"utf-8\""</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Accept</span><span class="pln" style="box-sizing: border-box;"> </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="str" style="box-sizing: border-box;">"text/xml"</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Method</span><span class="pln" style="box-sizing: border-box;"> </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="str" style="box-sizing: border-box;">"POST"</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">return</span><span class="pln" style="box-sizing: border-box;"> webRequest</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">private</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">static</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">XmlDocument</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">CreateSoapEnvelope</span><span class="pun" style="box-sizing: border-box;">()</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
</span><span class="typ" style="box-sizing: border-box;">XmlDocument</span><span class="pln" style="box-sizing: border-box;"> soapEnvelopeDocument </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">new</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">XmlDocument</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pln" style="box-sizing: border-box;">
soapEnvelopeDocument</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">LoadXml</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">@"<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/1999/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/1999/XMLSchema""><SOAP-ENV:Body><HelloWorld xmlns=""http://tempuri.org/"" SOAP-ENV:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/""><int1 xsi:type=""xsd:integer"">12</int1><int2 xsi:type=""xsd:integer"">32</int2></HelloWorld></SOAP-ENV:Body></SOAP-ENV:Envelope>"</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">return</span><span class="pln" style="box-sizing: border-box;"> soapEnvelopeDocument</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
</span><span class="kwd" style="box-sizing: border-box;">private</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">static</span><span class="pln" style="box-sizing: border-box;"> </span><span class="kwd" style="box-sizing: border-box;">void</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">InsertSoapEnvelopeIntoWebRequest</span><span class="pun" style="box-sizing: border-box;">(</span><span class="typ" style="box-sizing: border-box;">XmlDocument</span><span class="pln" style="box-sizing: border-box;"> soapEnvelopeXml</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> </span><span class="typ" style="box-sizing: border-box;">HttpWebRequest</span><span class="pln" style="box-sizing: border-box;"> webRequest</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
using </span><span class="pun" style="box-sizing: border-box;">(</span><span class="typ" style="box-sizing: border-box;">Stream</span><span class="pln" style="box-sizing: border-box;"> stream </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> webRequest</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">GetRequestStream</span><span class="pun" style="box-sizing: border-box;">())</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
soapEnvelopeXml</span><span class="pun" style="box-sizing: border-box;">.</span><span class="typ" style="box-sizing: border-box;">Save</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">stream</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
</span><span class="pun" style="box-sizing: border-box;">}</span></code></pre>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-72770964260264608052021-05-27T04:45:00.006-07:002021-05-27T04:45:40.647-07:00Calculate the difference between two dates - Javascript<p> </p><h1 id="display--heading" style="background-color: white; border-bottom: 1px solid transparent; box-sizing: border-box; color: #2d3138; font-family: Lato, sans-serif; font-size: 20px; line-height: 1.2; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px !important;">Calculate the difference between two dates</h1><div class="article__content color--texthead u-mbottombig" id="display--description" style="background-color: white; box-sizing: border-box; color: #2d3138; font-family: Lato, sans-serif; font-size: 16px; margin-bottom: 24px !important; overflow-x: auto;"><p style="box-sizing: border-box; margin: 0px 0px 1em;">There are multiple options to calculate the difference between dates.</p><h3 style="box-sizing: border-box; font-size: 18px; line-height: 1.1; margin: 1.4em 0px 0.2em;">1. getDateDiff</h3><p style="box-sizing: border-box; margin: 0px 0px 1em;">The easiest approach is to use getDateDiff. See this calculation:</p><pre style="background: rgb(247, 248, 249); border-radius: 2px; border: 1px solid rgb(235, 238, 240); box-sizing: border-box; color: #505357; font-family: monospace, monospace; font-size: 15px; margin-bottom: 0.8em; margin-top: 0.7em; overflow-wrap: initial; overflow: auto; padding: 0.4em 0.7em;">getDateDiff('{date2}','{date1}','y')</pre><p style="box-sizing: border-box; margin: 0px 0px 1em;">In this calculation:</p><ul style="box-sizing: border-box; margin: 0.5em 0px 1em 1.5em; padding: 0px;"><li style="box-sizing: border-box;">'{date2}' = the variable name of the date field that contains the most recent date </li><li style="box-sizing: border-box;">'{date1}' = the variable name of the date field with the older date</li><li style="box-sizing: border-box;">'y' = the unit in which the difference is returned, i.e. 'years' in this case</li></ul><p style="box-sizing: border-box; margin: 0px 0px 1em;">Replace date1 and date2 with your own variable names. Make sure to keep the '{ }' (curly brackets surrounding the variables and the quotation marks). You can change 'y' to any unit you want to use:</p><ul style="box-sizing: border-box; margin: 0.5em 0px 1em 1.5em; padding: 0px;"><li style="box-sizing: border-box;">Year: 'y'</li><li style="box-sizing: border-box;">Day: 'd'</li><li style="box-sizing: border-box;">Hour: 'h'</li><li style="box-sizing: border-box;">Minutes: 'm'</li></ul><p style="box-sizing: border-box; margin: 0px 0px 1em;"><br style="box-sizing: border-box;" /></p><h3 style="box-sizing: border-box; font-size: 18px; line-height: 1.1; margin: 1.4em 0px 0.2em;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;">2. Date difference with Moment objects</span></span> </span> </span></h3><p style="box-sizing: border-box; margin: 0px 0px 1em;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;">You can also create Moment objects and then calculate the difference:</span></span> </span> </span></p><pre style="background: rgb(247, 248, 249); border-radius: 2px; border: 1px solid rgb(235, 238, 240); box-sizing: border-box; color: #505357; font-family: monospace, monospace; font-size: 15px; margin-bottom: 0.8em; margin-top: 0.7em; overflow-wrap: initial; overflow: auto; padding: 0.4em 0.7em;"><span style="box-sizing: border-box;">var admission = moment('{date1}', 'DD-MM-YYYY');
var discharge = moment('{date2}', 'DD-MM-YYYY');
discharge.diff(admission, 'days');</span></pre><p style="box-sizing: border-box; margin: 0px 0px 1em;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;"><span style="box-sizing: border-box;">Instead of days you can also use: 'months' or 'years', or 'weeks' depending on what you want to measure. Check this template in the <a href="https://www.castoredc.com/tools/calculation-helper/?varnames=date1%20%3D%20%2202-04-2017%22%3B%0Adate2%20%3D%20%2220-05-2017%22%3B&input=var%20admission%20%3D%20moment(%27%7Bdate1%7D%27%2C%20%27DD-MM-YYYY%27)%3B%C2%A0%0D%0Avar%20discharge%20%3D%20moment(%27%7Bdate2%7D%27%2C%20%27DD-MM-YYYY%27)%3B%0D%0Adischarge.diff(admission%2C%20%27days%27)%3B" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #3779ed; text-decoration-line: none; touch-action: manipulation; transition: color 0.12s ease 0s;">calculation helper</a>.</span></span> </span> </span></p><p style="box-sizing: border-box; margin: 0px 0px 1em;"><br style="box-sizing: border-box;" /></p><h3 style="box-sizing: border-box; font-size: 18px; line-height: 1.1; margin: 1.4em 0px 0.2em;">3. Date difference with today</h3><p style="box-sizing: border-box; margin: 0px 0px 1em;">You can also calculate the difference between now (today) and a date of choice, e.g. if you want to know how many days passed between today and the date the patient had their last visit:</p><pre style="background: rgb(247, 248, 249); border-radius: 2px; border: 1px solid rgb(235, 238, 240); box-sizing: border-box; color: #505357; font-family: monospace, monospace; font-size: 15px; margin-bottom: 0.8em; margin-top: 0.7em; overflow-wrap: initial; overflow: auto; padding: 0.4em 0.7em;">var dateofvisit = moment('{visit}', 'DD-MM-YYYY');
var today = moment();
today.diff(dateofvisit, 'days');<span style="box-sizing: border-box; font-weight: 600;">
</span></pre><p style="box-sizing: border-box; margin: 0px 0px 1em;">In this calculation '{visit}' is the variable name of the date of the visit. Replace this variable with your own variable. Check this template in the <a href="https://www.castoredc.com/tools/calculation-helper/?varnames=visit%20%3D%20%2202-04-2017%22%3B%0Adate2%20%3D%20%2220-05-2017%22%3B&input=var%20dateofvisit%20%3D%20moment(%27%7Bvisit%7D%27%2C%20%27DD-MM-YYYY%27)%3B%0D%0Avar%20today%20%3D%20moment()%3B%0D%0Atoday.diff(dateofvisit%2C%20%27days%27)%3B" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #3779ed; text-decoration-line: none; touch-action: manipulation; transition: color 0.12s ease 0s;">calculation helper</a>.</p><p style="box-sizing: border-box; margin: 0px 0px 1em;"><span style="box-sizing: border-box; font-weight: 600;">Note</span>:<em style="box-sizing: border-box;"> </em>This calculation will always update when you open the step where it is located in a record, since it calculates the actual moment at the time you are in that step.</p><p style="box-sizing: border-box; margin: 0px 0px 1em;"><br style="box-sizing: border-box;" /></p><h3 style="box-sizing: border-box; font-size: 18px; line-height: 1.1; margin: 1.4em 0px 0.2em;">4. Converting number of days to number of weeks and days</h3><p style="box-sizing: border-box; margin: 0px 0px 1em;">If the number of days is known, it is possible to easily convert the number of days to the number of the weeks with the following template:</p><pre style="background: rgb(247, 248, 249); border-radius: 2px; border: 1px solid rgb(235, 238, 240); box-sizing: border-box; color: #505357; font-family: monospace, monospace; font-size: 15px; margin-bottom: 0.8em; margin-top: 0.7em; overflow-wrap: initial; overflow: auto; padding: 0.4em 0.7em;">var amountWeeks = {amountDays}/7
var remainingDays = {amountDays}%7;
remainingDays = remainingDays.toFixed(0)
Math.floor(amountWeeks) + " weeks, " + (remainingDays) + " days"</pre><p style="box-sizing: border-box; margin: 0px 0px 1em;">In this calculation {amountDays} is the variable in which the number of days is collected. Test this template using <a href="https://www.castoredc.com/tools/calculation-helper/?varnames=amountDays%20%3D%20365%3B%0A&input=var%20amountWeeks%20%3D%20%7BamountDays%7D%2F7%0D%0Avar%20remainingDays%20%3D%20%7BamountDays%7D%257%3B%0D%0AremainingDays%20%3D%20remainingDays.toFixed(0)%0D%0AMath.floor(amountWeeks)%20%2B%20%22%20weeks%2C%20%22%20%2B%20(remainingDays)%20%2B%20%22%20days%22%0D%0A" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #3779ed; text-decoration-line: none; touch-action: manipulation; transition: color 0.12s ease 0s;">calculation helper.</a></p><p style="box-sizing: border-box; margin: 0px 0px 1em;"><br style="box-sizing: border-box;" /></p><h3 style="box-sizing: border-box; font-size: 18px; line-height: 1.1; margin: 1.4em 0px 0.2em;">5. Calculating the difference between two dates using date and time field</h3><p style="box-sizing: border-box; margin: 0px 0px 1em;">If you are using a date and time field and would like to output the difference between the two dates in days, hours and minutes, use the following template:</p><pre style="background: rgb(247, 248, 249); border-radius: 2px; border: 1px solid rgb(235, 238, 240); box-sizing: border-box; color: #505357; font-family: monospace, monospace; font-size: 15px; margin-bottom: 0.8em; margin-top: 0.7em; overflow-wrap: initial; overflow: auto; padding: 0.4em 0.7em;">var m1 = moment('{admission}', 'DD-MM-YYYY HH:mm');
var m2 = moment('{discharge}', 'DD-MM-YYYY HH:mm');
var m3 = m2.diff(m1,'minutes');
var m4 = m2.diff(m1,'h');
var numdays = Math.floor(m3 / 1440);
var numhours = Math.floor((m3 % 1440) / 60);
var numminutes = Math.floor((m3 % 1440) % 60);
numdays + " day(s) " + numhours +"h " + numminutes +"m";</pre></div>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-28409273026910958842021-04-12T21:22:00.007-07:002021-04-12T21:24:36.106-07:00How to open Package manager Visual Studio .Net<p> How to open Package manager Visual Studio .Net</p><p>Tools >>NuGet Package manager >> Package manager console </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-gMtwe3j87uU/YHUcM12w81I/AAAAAAAAiAM/TcumOoWrN1wq4xVsvxhJ5eu-SbtOvB5QwCLcBGAsYHQ/s1002/packageManager.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="690" data-original-width="1002" height="440" src="https://1.bp.blogspot.com/-gMtwe3j87uU/YHUcM12w81I/AAAAAAAAiAM/TcumOoWrN1wq4xVsvxhJ5eu-SbtOvB5QwCLcBGAsYHQ/w640-h440/packageManager.PNG" width="640" /></a></div><br /><p><br /></p>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-72074690432416506312021-02-22T20:24:00.002-08:002021-02-22T20:24:19.394-08:00How to Backup a table in SQL Server with SELECT INTO statement<p> The first method involves using a SELECT INTO statement to create a copy of the table. The basic format of this statement is as follows:</p><p><br /></p><p><span style="background-color: white; box-sizing: border-box; color: #333399; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;"><strong style="box-sizing: border-box;">SELECT *</strong></span><br style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;" /><span style="background-color: white; box-sizing: border-box; color: #333399; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;"><strong style="box-sizing: border-box;">INTO tableCopy</strong></span><br style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;" /><span style="background-color: white; box-sizing: border-box; color: #333399; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;"><strong style="box-sizing: border-box;">FROM originalTable</strong></span></p><p><span style="background-color: white; box-sizing: border-box; color: #333399; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;"><strong style="box-sizing: border-box;"><br /></strong></span></p><p style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; margin: 0px 0px 24px; padding-left: 60px; text-align: justify;">This statement <strong style="box-sizing: border-box;">WILL CREATE</strong> the table called tableCopy, thus you do not have to previously create it. Due to the fact that the statement is a SELECT statement, you can have WHERE clauses if you want to filter your data, or you can add specific columns into your table copy, if not the entire table should be backed up.</p><p style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; margin: 0px 0px 24px; padding-left: 60px; text-align: justify;">This form of backing up a table is not as the traditional method of backing up a database to a file, as it is just a simple way to create a copy of a table, in the same database, which you can later use in the form of a backup.</p><p style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; margin: 0px 0px 24px; padding-left: 60px; text-align: justify;"><em style="box-sizing: border-box;"><span style="box-sizing: border-box; font-size: 17px;"><strong style="box-sizing: border-box;">Advantages</strong>:</span></em></p><ul style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; list-style-type: square; margin: 16px 0px; padding: 0px 0px 0px 40px; text-align: justify;"><li style="box-sizing: border-box; list-style-type: none;"><ul style="box-sizing: border-box; list-style-type: square; margin: 0px; padding: 0px 0px 0px 40px;"><li style="box-sizing: border-box; list-style-type: none;"><ul style="box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;"><li style="box-sizing: border-box;">This method is by far the fastest. It can copy a very large number of rows very quickly.</li></ul></li></ul></li></ul><p style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; margin: 0px 0px 24px; padding-left: 60px; text-align: justify;"><em style="box-sizing: border-box;"><span style="box-sizing: border-box; font-size: 17px;"><strong style="box-sizing: border-box;"><em style="box-sizing: border-box;">Disadvantages</em></strong>:</span></em></p><p><span style="background-color: white; box-sizing: border-box; color: #333399; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; text-align: justify;"><strong style="box-sizing: border-box;"></strong></span></p><ul style="background-color: white; box-sizing: border-box; color: #141412; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 16px; list-style-type: square; margin: 16px 0px; padding: 0px 0px 0px 60px; text-align: justify;"><li style="box-sizing: border-box; list-style-type: none;"><ul style="box-sizing: border-box; list-style-type: square; margin: 0px; padding: 0px 0px 0px 40px;"><li style="box-sizing: border-box; list-style-type: none;"><ul style="box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;"><li style="box-sizing: border-box;">Unfortunately, by using SELECT INTO, the major downfall is that it does not carry over the Keys, Indexes and Constraints of the table.</li><li style="box-sizing: border-box;">Also, the backup of the table is <strong style="box-sizing: border-box;">still stored in the database</strong></li></ul></li></ul></li></ul>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0Dubai - United Arab Emirates25.2048493 55.270782811.540060732582145 37.6926578 38.86963786741785 72.8489078tag:blogger.com,1999:blog-354110704692906399.post-84816664009744170282020-12-03T14:39:00.005-08:002020-12-03T14:39:46.813-08:00SQL Server CURSOR<p> <span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">DECLARE</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;"> </span></p><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;"> @product_name </span><span class="hljs-built_in" style="color: #0086b3; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">VARCHAR</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">(</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">MAX</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">),
@list_price </span><span class="hljs-built_in" style="color: #0086b3; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">DECIMAL</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">;
</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">DECLARE</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;"> cursor_product </span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">CURSOR</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">
</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">FOR</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;"> </span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">SELECT</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">
product_name,
list_price
</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">FROM</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">
production.products;
OPEN cursor_product;
FETCH NEXT FROM cursor_product INTO
@product_name,
@list_price;
WHILE @@FETCH_STATUS = 0
</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">BEGIN</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">
PRINT @product_name + </span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">CAST</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">(@list_price </span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">AS</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;"> </span><span class="hljs-built_in" style="color: #0086b3; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">varchar</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">);
FETCH NEXT FROM cursor_product INTO
@product_name,
@list_price;
</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">END</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;">;
CLOSE cursor_product;
</span><span class="hljs-keyword" style="color: #333333; font-family: monospace, monospace; font-size: 14.4px; font-weight: 700; white-space: pre;">DEALLOCATE</span><span style="background-color: #f8f8f8; color: #333333; font-family: monospace, monospace; font-size: 14.4px; white-space: pre;"> cursor_product;</span>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-81973637534718208002020-10-08T00:06:00.005-07:002020-10-08T00:06:38.048-07:00 Calling REST API in C# (Read JSON Data) <p> How to post JSON to a server using C#?</p><p>OR</p><p> Calling REST API in C# (Read JSON Data) </p><p><br /></p><p>Sample Code C#:</p><pre class="lang-cs s-code-block hljs csharp" style="border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">var</span> httpWebRequest = (HttpWebRequest)WebRequest.Create(<span class="hljs-string" style="border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"http://url"</span>);
httpWebRequest.ContentType = <span class="hljs-string" style="border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"application/json"</span>;
httpWebRequest.Method = <span class="hljs-string" style="border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"POST"</span>;
<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">using</span> (<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">var</span> streamWriter = <span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">new</span> StreamWriter(httpWebRequest.GetRequestStream()))
{
<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">string</span> json = <span class="hljs-string" style="border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"{\"user\":\"test\","</span> +
<span class="hljs-string" style="border: 0px; box-sizing: inherit; color: var(--highlight-variable); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"\"password\":\"bla\"}"</span>;
streamWriter.Write(json);
}
<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">var</span> httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">using</span> (<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">var</span> streamReader = <span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">new</span> StreamReader(httpResponse.GetResponseStream()))
{
<span class="hljs-keyword" style="border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">var</span> result = streamReader.ReadToEnd();
}</code></pre><pre class="lang-cs s-code-block hljs csharp" style="border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><br /></code></pre><pre class="lang-cs s-code-block hljs csharp" style="border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">//*************************************************************************//</code></pre><pre class="lang-cs s-code-block hljs csharp" style="border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><br /></code></pre><pre class="lang-cs s-code-block hljs csharp" style="border-radius: 5px; border: 0px; box-sizing: inherit; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;"> var httpWebRequest = (HttpWebRequest)WebRequest.Create("YOU API URL");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("APIKey", "111111111111111111");
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = JsonConvert.SerializeObject(new
{
appId = "XXXX",
vehicleRequestChoice = new
{
plateDetails = new
{
plateCategory = "Private",
plateCode = "T",
plateNo = "11111"
}
}
}
);
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
if (httpResponse.StatusCode == HttpStatusCode.OK)
{
var result = streamReader.ReadToEnd();
var testobj = JsonConvert.DeserializeObject(result);
return testobj;
}
}
//***************** END ******************//</span></code></pre>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-83176915920965472372020-09-08T04:29:00.004-07:002020-09-08T04:29:49.311-07:00SQL SERVER – Query to Find Column From All Tables of Database<p> <span style="background-color: white; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; text-align: justify;">One question came up just a day ago while I was writing</span><span style="background-color: white; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; text-align: justify;"> </span><strong style="box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; text-align: justify;"><a href="https://blog.sqlauthority.com/2008/08/03/sql-server-2005-difference-between-intersect-and-inner-join-intersect-vs-inner-join/" style="background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #cc2200; outline: none !important; text-decoration-line: none; transition-duration: 0.3s; transition-property: background, box-shadow, border, color, opacity, transform;" target="_blank">SQL SERVER – 2005 – Difference Between INTERSECT and INNER JOIN – INTERSECT vs. INNER JOIN</a></strong><span style="background-color: white; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; text-align: justify;">.</span></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><em style="box-sizing: border-box;"><strong style="box-sizing: border-box;">How many tables in database AdventureWorks have column name like ‘EmployeeID’?</strong></em></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">It was quite an interesting question and I thought if there are scripts which can do this would be great. I quickly wrote down following script which will go return all the tables containing specific column along with their schema name.</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><code style="background: rgb(250, 246, 225); box-sizing: border-box; color: #333333; display: inline-block; font-family: Consolas, "Lucida Console", monospace; font-size: 12px; padding: 0px 0.4rem; vertical-align: top;"><span style="box-sizing: border-box; color: blue;">USE </span><span style="box-sizing: border-box; color: black;">AdventureWorks<br style="box-sizing: border-box;" />GO<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">SELECT </span><span style="box-sizing: border-box; color: black;">t.name </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">table_name</span><span style="box-sizing: border-box; color: grey;">,<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: black;">SCHEMA_NAME</span><span style="box-sizing: border-box; color: grey;">(</span><span style="box-sizing: border-box; color: black;">schema_id</span><span style="box-sizing: border-box; color: grey;">) </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">schema_name</span><span style="box-sizing: border-box; color: grey;">,<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: black;">c.name </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">column_name<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">FROM </span><span style="box-sizing: border-box; color: black;">sys.tables </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">t<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">INNER JOIN </span><span style="box-sizing: border-box; color: black;">sys.columns c </span><span style="box-sizing: border-box; color: blue;">ON </span><span style="box-sizing: border-box; color: black;">t.</span><span style="box-sizing: border-box; color: magenta;">OBJECT_ID </span><span style="box-sizing: border-box; color: blue;">= </span><span style="box-sizing: border-box; color: black;">c.</span><span style="box-sizing: border-box; color: magenta;">OBJECT_ID<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">WHERE </span><span style="box-sizing: border-box; color: black;">c.name </span><span style="box-sizing: border-box; color: grey;">LIKE </span><span style="box-sizing: border-box; color: red;">'%EmployeeID%'<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">ORDER BY </span><span style="box-sizing: border-box; color: black;">schema_name</span><span style="box-sizing: border-box; color: grey;">, </span><span style="box-sizing: border-box; color: black;">table_name</span><span style="box-sizing: border-box; color: grey;">;</span></code></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><img alt="SQL SERVER - Query to Find Column From All Tables of Database GetColumn " class="alignnone ls-is-cached lazyloaded" data-src="https://blog.sqlauthority.com/i/b/GetColumn.gif" height="401" src="https://blog.sqlauthority.com/i/b/GetColumn.gif" style="box-sizing: border-box; height: auto; max-width: 100%;" title="SQL SERVER - Query to Find Column From All Tables of Database GetColumn " width="507" /></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">In above query replace EmployeeID with any other column name.</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><code style="background: rgb(250, 246, 225); box-sizing: border-box; color: #333333; display: inline-block; font-family: Consolas, "Lucida Console", monospace; font-size: 12px; padding: 0px 0.4rem; vertical-align: top;"><span style="box-sizing: border-box; color: blue;">SELECT </span><span style="box-sizing: border-box; color: black;">t.name </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">table_name</span><span style="box-sizing: border-box; color: grey;">,<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: black;">SCHEMA_NAME</span><span style="box-sizing: border-box; color: grey;">(</span><span style="box-sizing: border-box; color: black;">schema_id</span><span style="box-sizing: border-box; color: grey;">) </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">schema_name</span><span style="box-sizing: border-box; color: grey;">,<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: black;">c.name </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">column_name<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">FROM </span><span style="box-sizing: border-box; color: black;">sys.tables </span><span style="box-sizing: border-box; color: blue;">AS </span><span style="box-sizing: border-box; color: black;">t<br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">INNER JOIN </span><span style="box-sizing: border-box; color: black;">sys.columns c </span><span style="box-sizing: border-box; color: blue;">ON </span><span style="box-sizing: border-box; color: black;">t.</span><span style="box-sizing: border-box; color: magenta;">OBJECT_ID </span><span style="box-sizing: border-box; color: blue;">= </span><span style="box-sizing: border-box; color: black;">c.</span><span style="box-sizing: border-box; color: magenta;">OBJECT_ID</span><span style="box-sizing: border-box; color: red;"><br style="box-sizing: border-box;" /></span><span style="box-sizing: border-box; color: blue;">ORDER BY </span><span style="box-sizing: border-box; color: black;">schema_name</span><span style="box-sizing: border-box; color: grey;">, </span><span style="box-sizing: border-box; color: black;">table_name</span><span style="box-sizing: border-box; color: grey;">;</span></code></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><img alt="SQL SERVER - Query to Find Column From All Tables of Database AllColumns " class="alignnone lazyloaded" data-src="https://blog.sqlauthority.com/i/b/AllColumns.gif" height="395" src="https://blog.sqlauthority.com/i/b/AllColumns.gif" style="box-sizing: border-box; height: auto; max-width: 100%;" title="SQL SERVER - Query to Find Column From All Tables of Database AllColumns " width="500" /></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "Open Sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">If you want to find all the column name from your database run following script. You can down any condition in WHERE clause to get desired result.</p>Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-18725260924826870692020-01-05T20:42:00.005-08:002020-01-05T20:48:34.611-08:00SQL SERVER Clean String function<div dir="ltr" style="text-align: left;" trbidi="on">
SQL SERVER Clean String function<br />
<br />
<br />
<br />
<span style="color: blue;">Create Function </span>[dbo].[CleanString] (@input <span style="color: blue;">nvarchar</span>(max))<br />
<span style="color: blue;">Returns</span> nvarchar(max)<br />
<span style="color: blue;">As</span><br />
<span style="color: blue;">Begin</span><br />
<br />
<span style="white-space: pre;"> </span><br />
<span style="white-space: pre;"> </span><span style="font-size: x-small;"><span style="color: blue;">declare </span>@a nvarchar(max)</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span><span style="color: blue;">declare </span>@b nvarchar(max)</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @a=@input</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @b = Replace(REPLACE(@a, SUBSTRING(@a, PATINDEX( '%[,~,@,#,/,\,(,),$,%,&,*,(,),+,.,]%', @a), 1 ),''),'-','')</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @a=@b</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @b = Replace(REPLACE(@a, SUBSTRING(@a, PATINDEX( '%[,~,@,#,/,\,(,),$,%,&,*,(,),+,.,]%', @a), 1 ),''),'-','')</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @a=@b</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @b = Replace(REPLACE(@a, SUBSTRING(@a, PATINDEX( '%[,~,@,#,/,\,(,),$,%,&,*,(,),+,.,]%', @a), 1 ),''),'-','')</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @a=@b</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span>Set @b = Replace(REPLACE(@a, SUBSTRING(@a, PATINDEX( '%[,~,@,#,/,\,(,),$,%,&,*,(,),+,.,]%', @a), 1 ),''),'-','')</span><br />
<span style="font-size: x-small;"><span style="white-space: pre;"> </span><span style="color: blue;">return </span>@b</span><br />
<br />
<span style="color: blue;">End</span><br />
<br />
<br />
<b>Call Function on Select statement :</b><br />
<b><br /></b>
<span style="color: blue;">Select top </span>1 DataEntryDate , dbo.CleanString('A-SMN~dfs&d-fdsh/adsfdsf/sdfsdf\sdf') <span style="color: blue;">from </span>TableName<br />
<b><br /></b>
<br />
<b><span style="white-space: pre;"> </span> </b></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-91318787704822579032019-10-24T03:06:00.000-07:002019-10-24T03:06:04.055-07:00Post data and get jason C#<div dir="ltr" style="text-align: left;" trbidi="on">
string url = "www.YOURL_URL.com";<br />
string soapResult = "";<br />
WebClient cl = new WebClient(); // create web client<br />
var data = cl.DownloadString(url); // Sending request to find web api REST service resource using HttpClient <br />
JObject currencies = JObject.Parse(data);<br />
var currency = currencies.SelectToken("TradeLicense.trade_name_en");<br />
soapResult = currency.ToString();</div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-64472595637189080202019-08-20T21:28:00.001-07:002019-08-20T21:28:16.944-07:00Describe table structure with MS SQL Server<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
This is the second in a series of three posts about using the sp_tables, sp_columns and sp_stored_procedures stored procedures with Microsoft SQL Server databases. This post is about sp_columns which is used to describe the table structure of a SQL Server table.
<br />
<br />
The simplest way to use sp_columns to show the columns and related information about a SQL Server table is to execute the stored proecedure passing it the table name like so:<br />
<br />
<pre style="background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); color: #333333; font-size: 16px; overflow: auto hidden; padding: 10px;">exec sp_columns MyTable</pre>
</div>
<br />
<br />
You can read more information about what each column returned means in the MSDN documentation about this stored procedure.
The sp_columns stored procedure can take additional arguments to the table name. You can also pass the table owner, table qualifier (i.e. the database name), column name and the ODBC version used. The table owner and column name parameters support wildcard pattern matching, so you can use % and _
For example, if you only wanted to query the "foo" column from the above example, you would do this:<br />
<br />
<pre style="background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); color: #333333; font-size: 16px; overflow: auto hidden; padding: 10px;">exec sp_columns MyTable, @column_name = 'foo'
</pre>
<div style="color: #333333; font-family: "open sans", sans-serif; font-size: 16px;">
If you wanted to query all columns which started with the letter "a" you could do the following:</div>
<pre style="background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); color: #333333; font-size: 16px; overflow: auto hidden; padding: 10px;">exec sp_columns MyTable, @column_name = 'a%'
</pre>
<div style="color: #333333; font-family: "open sans", sans-serif; font-size: 16px;">
That's a basic overview of the sp_columns stored procedure for describing a table structure in Microsoft SQL Server. The final post in this series (in a week's time) will look at <a href="https://www.electrictoolbox.com/list-stored-procedures-sql-server/" style="color: #2a5db0;">sp_stored_procedures</a> to get a list of stored procedures available.<span class="ezoic-adpicker-ad" id="ezoic-pub-ad-placeholder-118"></span></div>
<div>
<br /></div>
</div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-34740881691367623912019-07-21T21:33:00.002-07:002019-07-21T21:33:32.855-07:00Class for User Register - MVC<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">UserRegisterModel</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [DisplayName(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">"User Name"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [Required(ErrorMessage=</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">"Name can not be blank"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> Name { </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">get</span><span style="font-family: Consolas; font-size: 9.5pt;">; </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">set</span><span style="font-family: Consolas; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [Required(ErrorMessage = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">"Password can not be blank"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [StringLength(6,ErrorMessage=</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">"Password should be equal or less than 6 character"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> Password
{ </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">get</span><span style="font-family: Consolas; font-size: 9.5pt;">; </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">set</span><span style="font-family: Consolas; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [Required(ErrorMessage = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">"Email can not be blank"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [RegularExpression(</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"</span><span style="font-family: Consolas; font-size: 9.5pt;">,ErrorMessage=</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">"Email is not
Valid"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> Email { </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">get</span><span style="font-family: Consolas; font-size: 9.5pt;">; </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">set</span><span style="font-family: Consolas; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal">
<o:p></o:p></div>
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="font-family: Consolas; font-size: 9.5pt;">}</span> </div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-55699515711882902612019-04-29T23:15:00.003-07:002019-04-29T23:16:56.331-07:00Windows 10 How to send a command line message to another PC on the network? <div dir="ltr" style="text-align: left;" trbidi="on">
How to send a command line message to another PC on the network?<br />
1. Start command prompt (cmd) – type cmd in the searchbox and run the app<br />
<br />
2. Type the command as follows:<br />
<br />
<span style="color: blue;">msg /SERVER:DestinationPC * /TIME:60 “This is the message to be sent to a PC named DestinationPC.”</span><br />
<br />
– Replace DestinationPC with your destination PC name (see your computer network for the list of computers in that network if you don’t know the name pf the PC you are trying to send the message to.<br />
<br />
<br />
<br />
– Replace the value of TIME with desired seconds before the message closes<br />
<br />
– Replace the text between quotation marks with the message text you want to be displayed.<br />
<br />
3. Hit enter and voila, the message is sent.<br />
<br />
This is the relapse commend on XP Windows <span style="color: blue;">net send </span></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-36820873145629846752019-02-04T01:42:00.000-08:002019-02-04T01:42:00.675-08:00How to add HTML codes in Blogger Posts <div dir="ltr" style="text-align: left;" trbidi="on">
If you wants to show HTML code without any customization in your blog then just use this site: <a href="http://www.simplebits.com/cgi-bin/simplecode.pl">SimpleCode</a>. This method is too easy to use and it shows code in a very simple way.<br /><br /><br />
Use the below<br />
<a href="http://vault.simplebits.com/cgi-bin/simplecode.pl?mode=process">http://vault.simplebits.com/cgi-bin/simplecode.pl?mode=process</a><br />
<br />
<br />
<br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-79157656230259474262019-02-04T01:34:00.001-08:002019-02-04T01:40:08.337-08:00Jquery Start count and Brack timer clearTimeout()<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
The below JQuery Jquery Start count and Brack timer clearTimeout()<br />
<br />
<br />
<br />
<code></code><br />
<!DOCTYPE html><br />
<html><br />
<body><br />
<br />
<button onclick="startCount()">Start count!</button><br />
<input type="text" id="txt"><br />
<button onclick="stopCount()">Stop count!</button><br />
<br />
<p><br />
Click on the "Start count!" button above to start the timer. The input field will count forever, starting at 0. Click on the "Stop count!" button to stop the counting. Click on the "Start count!" button to start the timer again.<br />
</p><br />
<br />
<script><br />
var c = 0;<br />
var t;<br />
var timer_is_on = 0;<br />
var myCounter = 0;<br />
<br />
function timedCount() {<br />
document.getElementById("txt").value = c;<br />
c = c + 1; <br />
<br />
t = setTimeout(timedCount, 1000);<br />
myCounter = myCounter + 1<br />
if(myCounter == 4)<br />
{<br />
c = 0;<br />
t;<br />
timer_is_on = 0;<br />
myCounter = 0;<br />
clearTimeout(t);<br />
<span style="white-space: pre;"> </span> timer_is_on = 0;<br />
}<br />
<br />
}<br />
<br />
function startCount() {<br />
if (!timer_is_on) {<br />
timer_is_on = 1;<br />
timedCount();<br />
<br />
<br />
}<br />
}<br />
<br />
function stopCount() {<br />
c = 0;<br />
t;<br />
timer_is_on = 0;<br />
myCounter = 0;<br />
clearTimeout(t);<br />
timer_is_on = 0;<br />
}<br />
</script><br />
<br />
</body><br />
</html><br />
<br />
</div>
<div>
<br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-85906512922084628172019-01-20T20:14:00.001-08:002019-01-20T20:40:12.232-08:00SQL server find search for Database , Find all stored procedures related tables <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;"><b>Find SP </b></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">sp_helptext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> <span style="color: red;">'spname'</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<b><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p>Find all stored </o:p></span><span style="font-family: "consolas";"><span style="font-size: 12.6667px;">procedures related </span></span><span style="font-family: "consolas"; font-size: 9.5pt;">tables </span></b></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">SELECT</span><span style="font-family: "consolas"; font-size: 9.5pt;"> <span style="color: grey;">*</span><span style="mso-spacerun: yes;"> </span><span style="color: blue;">FROM</span> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">procedures</span> <span style="color: blue;">WHERE</span> <span style="color: magenta;">OBJECT_DEFINITION</span><span style="color: grey;">(</span><span style="color: magenta;">OBJECT_ID</span><span style="color: grey;">)</span> <span style="color: grey;">LIKE</span> <span style="color: red;">'%table_name%'</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<b><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p>Find all stored </o:p></span><span style="font-family: "consolas";"><span style="font-size: 12.6667px;">procedures newly created</span></span></b></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">SELECT</span><span style="font-family: "consolas"; font-size: 9.5pt;"> <span style="color: grey;">*</span><span style="mso-spacerun: yes;"> </span><span style="color: blue;">FROM</span> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">procedures</span> <span style="color: blue;">order</span> <span style="color: blue;">by</span> create_date <span style="color: blue;">desc</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<b><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p>Find all stored </o:p></span><span style="font-family: "consolas";"><span style="font-size: 12.6667px;">procedures newly modify</span></span></b></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">SELECT</span><span style="font-family: "consolas"; font-size: 9.5pt;"> <span style="color: grey;">*</span><span style="mso-spacerun: yes;"> </span><span style="color: blue;">FROM</span> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">procedures</span> <span style="color: blue;">order</span> <span style="color: blue;">by</span> modify_date <span style="color: blue;">desc</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<b><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p>Find all tables </o:p></span></b></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">SELECT</span><span style="font-family: "consolas"; font-size: 9.5pt;"> <span style="color: grey;">*</span> <span style="color: blue;">FROM</span> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">tables</span> <o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<b><span style="font-family: "consolas"; font-size: 9.5pt;">Find table with like</span></b></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">Select</span><span style="font-family: "consolas"; font-size: 9.5pt;"> <span style="color: grey;">*</span> <span style="color: blue;">from</span> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">tables</span><span style="mso-spacerun: yes;"> </span><span style="color: blue;">where</span> name <span style="color: grey;">like</span> <span style="color: red;">'%tablename%'<o:p></o:p></span></span></div>
<div class="MsoNormal">
<br /></div>
<br />
<br />
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">SELECT</span><span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"><span style="mso-spacerun: yes;"> </span>o<span style="color: grey;">.</span>name <span style="color: blue;">AS</span> ReferencingObject<span style="color: grey;">,</span><span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"><span style="mso-spacerun: yes;"> </span>sd<span style="color: grey;">.</span>referenced_entity_name
<span style="color: blue;">AS</span> ReferencedObject<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">FROM</span><span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">sql_expression_dependencies</span><span style="mso-spacerun: yes;"> </span><span style="color: blue;">AS</span> sd<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">INNER</span><span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: grey;">JOIN</span> <span style="color: green;">sys</span><span style="color: grey;">.</span><span style="color: green;">objects</span> <span style="color: blue;">AS</span> o<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">ON</span> o<span style="color: grey;">.</span><span style="color: magenta;">object_id</span> <span style="color: grey;">=</span> sd<span style="color: grey;">.</span>referencing_id<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;">WHERE</span><span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> sd<span style="color: grey;">.</span>referenced_entity_name
<span style="color: grey;">=</span> <span style="color: red;">'Tabel_Name'</span><span style="color: grey;">;</span><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">SELECT</span><span style="font-family: Consolas; font-size: 9.5pt;"> name<span style="color: grey;">,</span> <span style="color: blue;">type</span> <span style="color: blue;">FROM</span> dbo<span style="color: grey;">.</span><span style="color: green;">sysobjects</span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">WHERE </span><span style="color: grey;">(</span><span style="color: blue;">type</span> <span style="color: grey;">=</span> <span style="color: red;">'P'</span><span style="color: grey;">)<o:p></o:p></span></span></div>
<div class="MsoNormal">
<br /></div>
<br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-44188871166863081402018-03-04T05:58:00.000-08:002018-03-04T05:58:00.274-08:00"The Devoted Friend" by P. Craig Russsell.<div dir="ltr" style="text-align: left;" trbidi="on">
"The Devoted Friend" by P. Craig Russsell.<br /><br />"The Devoted Friend" is a darkly comic short story for children by the Irish author Oscar Wilde. It was first published in 1888 in the anthology The Happy Prince and Other Tales, which in addition to its title story also includes "The Nightingale and the Rose", "The Selfish Giant" and "The Remarkable Rocket".<br /><br />The two main characters in "The Devoted Friend" are a poor man known as little Hans and a rich Miller. The Miller claims to be a devoted friend of little Hans. In truth, he selfishly takes advantage of little Hans at every opportunity. Little Hans always does everything that the Miller asks him to do because he does not want to lose the Miller's friendship or offend him. Little Hans' desire to remain the Miller's friend ultimately proves fatal for him.<br /><br /><b>Plot</b><br /><br />"The Devoted Friend" takes the form of a "story-within-a-story". The main narrative is told to a Water-rat by a Linnet. The Water-rat chastises a Duck for allowing her children to misbehave. When the Duck responds that she is a good parent, the Water-rat says that he knows nothing about family life because he is single. He goes on to say that he is not interested in love but thinks that, "there is nothing in the world either nobler or rarer than a devoted friendship". When the Linnet asks the Water-rat what he would expect of a devoted friend, he replies, "I would expect my devoted friend to be devoted to me". In an attempt to show the Water-rat the foolishness of what he has said, the Linnet tells him the story of little Hans and the Miller.<br /><br />During the spring, summer and autumn, little Hans makes a living by selling the flowers and fruit from his beautiful garden. During the winter, he struggles to survive. Hugh the wealthy Miller, who owns several cows and sheep in addition to his profitable mill, claims to be a good friend of little Hans. He often goes to see him from spring to autumn, always helping himself to a lot of little Hans' flowers or fruit when he visits him. The Miller never goes to see little Hans during the winter, claiming that he is certain that little Hans would not like to be bothered during that difficult time of year.<br /><br /> the Miller visits little Hans. He finds out that, in order to have any money for food during the winter, little Hans was forced to sell several of his possessions, including his wheelbarrow. The Miller tells Hans that he will give him his old wheelbarrow, which is in very bad condition with one side completely missing. Hans replies that he can repair the wheelbarrow because he has a plank of wood in his house. The Miller says that the plank is exactly what he needs to fix the hole in the roof of his barn. The Miller goes on to ask Hans to fill a large basket with flowers. The Miller tells Hans that it would be unfriendly to refuse him the flowers or the plank since he has promised him his wheelbarrow.<br /><br />The following day, the Miller tells little Hans to take a sack of flour to market for him. The next day, he tells Hans to fix his barn roof. The day after that, he tells Hans to drive his sheep to the mountain. Each day, the Miller has another task for little Hans which takes Hans all day to perform. The Miller always tells Hans that it would be unfriendly of him to refuse and reminds him that he has promised to give him his wheelbarrow. Little Hans has no time to tend to the garden which he depends on to make a living.<br /><br />On a stormy night, the Miller comes to little Hans' house. He says that his son is injured and tells little Hans to fetch the doctor. He refuses to lend Hans his lantern because it is a new one. Again, he reminds little hans that he has promised to give him his wheelbarrow and that it would be unfriendly to refuse to help him. Little Hans follows the doctor back to the Miller's house. However, since Hans does not have a lantern and it is raining so heavily that it is difficult to see, Hans gets lost. He wanders onto the moor and drowns in a pool.<br /><br />The Miller concludes that little Hans died because he promised to give him his wheelbarrow for free. He says, "I will certainly take care not to give anything away again. One always suffers for being generous".<br /><br />After having heard the story, the Water-rat says that he feels sorry for the sensitive Miller. The Linnet points out that there is a moral to the story which the Water-rat has failed to understand. The Water-rat is horrified when he finds out that the story was supposed to have a moral and leaves in disgust. <br /><br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-23181691137696852812017-11-08T23:03:00.000-08:002018-01-29T04:19:20.508-08:00 Visual Studio 2015 Keyboard shortcuts Ctrl+Shift+R Find relapse <div dir="ltr" style="text-align: left;" trbidi="on">
T to access the Find/Replace in Files dialog box, choose Find and Replace on the Edit menu (or CTRL+SHIFT+F). When you choose Find All, a Find Results window opens and lists the matches for your search.<br />
<br />
Keyboard shortcuts Ctrl+Shift+R and Ctrl+Shift+P are assigned to the <b>Record Macro</b> and <b>Run Macro</b> commands if they are not used in your Visual Studio keyboard scheme. If they are used, but you want to reassign them to Visual Commander, you can manually assign them in Visual Studio keyboard options for the <b>VCmd.RecordMacro</b> and <b>VCmd.RunMacro</b> commands.
<br />
There is only one macro - recording the new macro overwrites the previous one. If you want to save the macro for future regular use, you can manually copy its code to a new command or use the explicit <b>Save Macro as Command</b> menu item.<br />
You can record <b>Find Next</b> and <b>Find Previous</b> commands from the <b>Find and Replace</b> dialog:
<img alt="Find and Replace dialog in Visual Studio 2013" src="https://vlasovstudio.com/visual-commander/find_and_replace_dialog_in_visual_studio_2013.png" style="background-color: white; font-family: "Open Sans", Verdana, sans-serif; font-size: 32px;" />
</div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-26629149227497285132017-02-26T22:27:00.002-08:002017-02-26T22:27:47.182-08:00Packaging InDesign Files (detailed instructions)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://files.softicons.com/download/application-icons/ics5-icons-by-bart-kowalski/png/512x512/InDesign.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://files.softicons.com/download/application-icons/ics5-icons-by-bart-kowalski/png/512x512/InDesign.png" height="200" width="200" /></a></div>
Many new InDesign users have discovered “the hard way” that simply
e-mailing their InDesign file to someone will not allow that person to
properly use their file. Their InDesign file depends on fonts and linked
graphics that must be sent along with it in order for it to work
properly.Fortunately, InDesign has a built-in <strong>Package</strong>
utility that creates a folder with a name of your choice, puts a copy of
your document into the folder, and then copies all necessary fonts and
images into the folder as well. Generally you will create a package, zip
it up, and then send it to whoever needs it. Simple, right?<br />
Here are detailed instructions:<br />
<ol>
<li>Open your INDD file in InDesign.</li>
<li>If possible, resolve any errors concerning missing links or fonts.</li>
<li>Go to File: Package.</li>
<li>Click the Package button at the bottom of the Summary window (This window was called the preflight window in older versions).</li>
<li>Click continue on the “Printing Instructions” window (most people ignore these instructions).</li>
<li>Browse to where you’d like to create the package folder (desktop would be fine) and enter the name of the folder.</li>
<li>Make sure that the “Copy Fonts,” “Copy Linked Graphics,” “Update
Graphic Links in Package,” and “Include Fonts and Links from Hidden….”
are all checked. Other boxes should be unchecked.</li>
<li>Click the package button.</li>
<li>Find the new folder that InDesign created and verify that it contains copies of all required files.</li>
<li>Right-click the folder and choose “Compress” (Mac) or “Send to ZIP”
(Windows, might be something different but similar depending on what
software you have installed). This will zip it up.</li>
<li>If the file size is less than 10MB, you can probably safely e-mail
it. If it’s more, then you should use some other method (DropBox, FTP,
YouSendIt, web server, etc.) to share the file.</li>
</ol>
</div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-70427120691763237622017-02-19T22:17:00.001-08:002017-02-19T22:18:56.232-08:00recover memory card data<div dir="ltr" style="text-align: left;" trbidi="on">
فری ہیں اور انٹرنیٹ سے باآسانی ڈاﺅن لوڈ کئے جا سکتے ہیں۔ "CG
Security" کمپنی کا "PhotoRec" سافٹ وئیر بہترین آپشن ہے جو ونڈوز اور میک
دونوں کیلئے دستیاب ہے لیکن اس کا انٹرفیس تھوڑا سا مشکل ہے تاہم ایک اور
کمپنی "piriform" کا سافٹ وئیر "Recuva" اس کے متبادل کے طور پر استعمال
کیا جا سکتا ہے جس کا انٹرفیس انتہائی آسان ہے لیکن یہ سافٹ وئی صرف ونڈوز
آپریٹنگ سسٹم کیلئے دستیاب ہے۔ <br />پہلا سٹیپ:۔ اپنا میموری کارڈ کمپیوٹر کے ساتھ کنیکٹ کریں اور "PhotoRec" سافٹ وئیر کو لانچ کریں۔ دوسرا
سٹیپ:۔ اپنے کی بورڈ پر موجود ”ایرو کیز“ کو استعمال کرتے ہوئے فراہم کی
گئی لسٹ میں سے اپنا میموری کارڈ سلیکٹ کریں۔( اگر آپ کو میموری کارڈ
ڈھونڈنے میں پریشانی ہو رہی ہے تو آپ اس کے سائز کا اندازہ لگا سکتے ہیں)۔
صحیح ڈرائیو لیٹر ڈھونے کے بعد ”اینٹر“ پریس کریں ۔ آپ کے سامنے ایک نئی
سکرین آ جائے گی۔<br />
<img src="http://dailypakistan.com.pk/digital_images/large/2015-01-23/news-1422022743-1250.jpg" /><br />
<br />تیسرا سٹیپ:۔ اب آپ اس سکرین پر موجود آپش "FAT32" کو سلیکٹ کریں ۔<br />
چوتھا
سٹیپ:۔ آپ کے سامنے اسی ونڈو پر مزید دو آپشنز "Free" اور "Whole" آ جائیں
گی۔ اگر آپ ڈیلیٹ شدہ مواد واپس لانا چاہتے ہیں تو "Free" آپشن پر کلک
کریں اور اگر آپ کا میموری کارڈ کرپٹ ہے تو "Whole" آپشن کو سلیکٹ کریں۔<br />
<img src="http://dailypakistan.com.pk/digital_images/large/2015-01-23/news-1422022743-1470.jpg" /><br />
<br />پانچواں
سٹیپ:۔ اب یہ سافٹ وئیر میموری کارڈ کی سے ملنے والی فائلز کو سیو کرنے کی
جگہ منتخب کرنے کو کہے گا۔ لہٰذا آپ کی بورڈ پر موجود ایرو کیز کے استعمال
سے مطلوبہ جگہ کا انتخاب کریں اور پھر کنفرمیشن کیلئے "C" کا بٹن دبائیں۔
یہ سافٹ وئیر ریکوری پراسیس شروع کر دے گا اور زیادہ سے زیادہ 30 منٹ میں
یہ عمل مکمل ہو جائے گا تاہم سکیننگ کا وقت میموری کارڈ کے سائز پر منحصر
ہے۔ امید ہے کہ اس آپشن کے استعمال سے آپ کا اہم ڈیٹا، تصاویر یا ویڈیوز
واپس مل جائیں گے۔<br />
<img src="http://dailypakistan.com.pk/digital_images/large/2015-01-23/news-1422022743-6083.jpg" /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-41473287077400832502016-07-13T04:06:00.003-07:002016-07-13T04:06:38.800-07:00Drawing of famous buildings <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-k5Tyut9Kcgc/V4YgnTWm_FI/AAAAAAAAX1A/5MZclQ6WxIkZ0JZn0deEKAAh8YRLcjXMwCLcB/s1600/drawing-of-famous-buildings-vector-19524.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-k5Tyut9Kcgc/V4YgnTWm_FI/AAAAAAAAX1A/5MZclQ6WxIkZ0JZn0deEKAAh8YRLcjXMwCLcB/s1600/drawing-of-famous-buildings-vector-19524.jpg" /></a></div>
<br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-17856787525130246012016-07-11T00:37:00.001-07:002016-07-11T00:37:29.773-07:00آپ کے بارے میں وہ اہم ترین بات جو آپ کی چھوٹی انگلی کی لمبائی سے پتہ لگایا جاسکتاہے <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-_SFZ_0-lhAA/V4NMk6AS6mI/AAAAAAAAX0I/XB6VTiAwyJ0NZ1wQP2amyNnhxIMxRZqLQCLcB/s1600/news-1468165275-4899_large.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://4.bp.blogspot.com/-_SFZ_0-lhAA/V4NMk6AS6mI/AAAAAAAAX0I/XB6VTiAwyJ0NZ1wQP2amyNnhxIMxRZqLQCLcB/s320/news-1468165275-4899_large.jpg" width="320" /></a></div>
<div dir="rtl" style="text-align: right;">
<br /></div>
<div dir="rtl" style="text-align: right;">
لندن (مانیٹرنگ ڈیسک) اگر آپ کو خود ک سمجھنا چاہتے ہیں یا کسی اور کی شخصیت کے بارے میں جاننا چاہتے ہیں تو اس کیلئے کسی دست شناس یا نجومی کے پاس جانے کی ضرورت نہیں بلکہ اپنا ہاتھ پھیلائیے اور اپنی چھوٹی انگلی پر ایک نظر ڈالیے ، آپ کو بہت کچھ معلوم ہو جائے گا ویب سائٹ ویب سائٹ راکٹ نیوز کی رپورٹ کے مطابق کوریا میں کیے گئے شخصیات کے تجزیات میں معلوم ہوا کہ چھوٹی انگلی اور اس کے ساتھ والی انگلی (جسے انگوٹھی والی انگلی بھی کہا جاتا ہے ) کی لمبائی کا تناسب انسانی شخصیت کے بارے میں حیران کن معلومات دیتا ہے دونوں انگلیوں کی لمبائی کاتناسب کچھ یوں ہوسکتا ہے ۔<br />پہلی صورت :<br />تصویر Aمیں دکھائے گئے ہاتھ کی چھوٹی انگلی کی لمبائی انگوٹھی والی انگلی کے پہلے جوڑ کے بالکل برابر ہے اس لمبارئی کی چھوٹی انگلی رکھنے والے ذہین اور حصے مزاح سے بھرپور شخصیت کے مالک ہوتے ہیں اور اکثر محفل کو زعفران بنائے رکھتے ہیں یہ لوگ اپنا معافی الزمیر بیان کرنے میں بھی قدرت رکھتے ہیں اور اپنے خیالات اور جذبات دیانتداری کے ساتھ کھل کر بیان کرتے ہیں یہ لوگ اکثر تنہائی سے خوفزدہ ہوتے ہیں اور ان کی کوشش ہوتی ہے کہ دوستوں عزیزوں کے ساتھ زندگی کا لطف اٹھائیں ۔<br /><br /><br />دوسری صورت:<br />اگر آپ کا ہاتھ تصویر B میں دکھائے گئے ہاتھ جیسا نظر آتا ہے یعنی چھوٹی انگلی کی لمبائی انگوٹھی والی کے پہلے جوڑ سے زیادہ ہے تو آپ ایک شفیق اور سخی دل کے مالک ہیں اور عموماً آپ کو بھی دوسروں سے محبت اور شفقت ملتی ہے آپ اپنے جذبات کو خوب اچھی طرح سمجھتے ہیں اور بوقت ضرورت باآسانی بیان بھی کر سکتے ہیں آپ لڑائی جھگڑے سے دور بھاگتے ہیں اور ہمیشہ ہم آہنگی کیلئے کوشاں رہتے ہیں آپ پر تنقید کرنے والے غالباً آپ کی نرم مزاجی اور امن پسندی کی کوششوں کو سمجھ نہیں پاتے ۔<br /><br /><br />تیسری صورت:<br />اگر آپ کی چھوٹی انگلی کی لمبائی انگوٹھی والی انگلی کے پہلے جوڑ سے کم ہے جیسا کہ تصویر C میں دکھایا گیا ہے ، تو آپ اپنے راز اپنے دل میں رکھنے والے شخص اور اکثر اپنے من کی بات کہنا مشکل کرتے ہیں آپ جنہیں پسند کرتے ہیں ان سے بھی اپنے دل کی بات کہنے میں مشکل محسوس کرتے ہیں دوسروں سے آپ کی توقعات بہت زیادہ ہوتی ہیں لیکن اکثر بعض اوقات مایوسی کا سامنا کرنا پڑتا ہے آپ دوستوں کا خیال رکھنے والے ہیں اور ان کی مدد کی ہر ممکن کوشش کرتے ہیں آپ کو دوسروں کے ساتھ تعلقات بنانے میں بہت زیادہ سوچ بچار نہیں کرنی چاہیے اور زندگی کو بھرپور اور پرجوش بنانے کیلئے کوشاں رہنا چاہیے۔<br /><br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://media.dailypakistan.com.pk/assets/dailypakistan/uploads_cdn/digital_news/2016-07-10/news-1468165275-4899_large.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-41176926623669894822016-05-18T02:52:00.003-07:002016-05-18T02:55:04.822-07:00How to show line break from textarea in php mail<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Intorduction:</b><br />
Normally we just get the textarea message filed and put in our Email function, but when Email receive the textarea message filed show as continue without any New Line / line brack / <br />
, so in this atrical i will describe you the simple code to get correct format for the textarea message filed.<br />
<br />
<b>PHP Function:</b> <a href="http://uk3.php.net/nl2br" rel="nofollow" target="_blank">nl2br() </a><br />
full Function we use: nl2br(htmlspecialchars()<br />
<br />
<a name='more'></a><br />
<b>Description:</b><br />
<span class="type">string</span> <span class="methodname"><b>nl2br</b></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$string</code></span>
[, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$is_xhtml</code><span class="initializer"> = true</span></span>
] )<br />
Returns <code class="parameter">string</code> with '<br />
' or
'<br />
' inserted before all newlines (<i>\r\n</i>,
<i>\n\r</i>, <i>\n</i> and <i>\r</i>).<br />
<br />
<b>Parameters </b><br />
string:<br />
The input string.<br />
is_xhtml:<br />
Whether to use XHTML compatible line breaks or not.<br />
<br />
<b>Sample Code:</b><br />
<pre class="lang-php prettyprint prettyprinted"><code><span class="pln"><span style="color: blue;">$name</span> </span><span class="pun">=</span><span class="pln"> <span style="color: blue;">htmlspecialchars</span></span><span class="pun">(</span><span class="pln">$_POST</span><span class="pun">[</span><span class="str">'name'</span><span class="pun">]);</span><span class="pln">
<span style="color: blue;">$message</span> </span><span class="pun">=</span><span class="pln"> <span style="color: blue;">nl2br</span></span><span class="pun">(</span><span style="color: blue;"><span class="pln">htmlspecialchars</span></span><span class="pun">(</span><span class="pln">$_POST</span><span class="pun">[</span><span class="str">'message'</span><span class="pun">]));</span></code></pre>
<pre class="lang-php prettyprint prettyprinted"><code><span class="pun"> </span></code></pre>
<pre class="lang-php prettyprint prettyprinted"><code><span class="pun">
</span></code></pre>
<b>Example:</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-6fO8MPPQ7Lc/Vzw6-04TB-I/AAAAAAAAXZk/pOGIv17mLMMrPC13S8WUtNN4jfk8PtaEACLcB/s1600/abc.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-6fO8MPPQ7Lc/Vzw6-04TB-I/AAAAAAAAXZk/pOGIv17mLMMrPC13S8WUtNN4jfk8PtaEACLcB/s1600/abc.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b> Output :</b><br />
The output will be same as you Enter in the textarea filed.<br />
<br />
<span style="color: blue;">Dear Team,<br />Kindly let us know the book if its in stock.<br />Regards<br />ABC<br />+9221122</span></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-16426468484362140942016-04-27T04:53:00.002-07:002016-04-27T06:36:45.303-07:00MS Access connection with ASP.NET C# / Gridview bind with Access / Remove HTML tags <div dir="ltr" style="text-align: left;" trbidi="on">
Introduction: <br />
<br />
Here I will explain the below programming<br />
<br />
<span style="color: blue;">1 )How to make connection with MS Access in ASP.NET</span><br />
<span style="color: blue;">2) Date bind gridview with Dataset from MS Access.</span><br />
<span style="color: blue;">3) Remove HTML tags from the database filed.</span><br />
(It will removed all HTML tags from the database filed and show as text only in Grid.)<br />
<br />
<a name='more'></a><div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-3UE7R0TFXqo/VyCzYKtfUUI/AAAAAAAAXYU/-9EJ4x8OzjgoTF8FNS-UMGCcVDN5teGvACLcB/s1600/load-GW.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;">
<img border="0" height="210" src="https://2.bp.blogspot.com/-3UE7R0TFXqo/VyCzYKtfUUI/AAAAAAAAXYU/-9EJ4x8OzjgoTF8FNS-UMGCcVDN5teGvACLcB/s640/load-GW.jpg" width="500" /></a></div>
<br />
<h4 style="text-align: left;">
Function HTML tags remove </h4>
<span style="font-family: "verdana" , "sans-serif"; font-size: 10.0pt;"><span style="font-family: "verdana" , "sans-serif";"><span style="color: blue;">public string </span>HTMLToText2(<span style="color: blue;">string </span>HTMLCode)<br />{<br /> // Getting Input HTML<br /> <span style="color: blue;">string </span>inputHtml = HTMLCode;<br /><br /> // Removing HTML tags including from the input<br /> <span style="color: blue;">string </span>outputText = StripHtmlTags(inputHtml);<br /> // Assigning plain text output to output textbox<br /> HTMLCode = outputText;<br /> <br /> <span style="color: blue;">return </span>HTMLCode;<br />}</span></span><br />
<br />
<span style="font-family: "verdana" , "sans-serif"; font-size: 10.0pt;"><span style="font-family: "verdana" , "sans-serif";"><span style="color: blue;">public string </span>StripHtmlTags(string source)<br />{<br /> <span style="color: blue;">return </span>Regex.Replace(source, "<.*?>|&.*?;", string.Empty);<br />}</span></span><br />
<br />
<h4 style="text-align: left;">
Function <span style="font-family: "verdana" , "sans-serif";">MS Access DB connection </span></h4>
<h4 style="text-align: left;">
<span style="font-weight: normal;"><span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10.0pt;"><span style="color: black;"><span style="color: blue;">protected void</span> btnExcursionLoad_Click(object sender, EventArgs e)<br />{<br /> string ConnectString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("<b><span style="color: blue;">alfa.mdb</span></b>;");<br /> OleDbConnection objCon;<br /> OleDbCommand objCmd;<br /> DataSet Ds = new DataSet();<br /><br /> string GetSql = string.Empty;<br /> GetSql = "(SELECT * FROM Excursions)";<br /> using (objCon = new OleDbConnection(ConnectString))<br /> {<br /> using (objCmd = new OleDbCommand(GetSql, objCon))<br /> {<br /> OleDbDataAdapter Da = new OleDbDataAdapter(objCmd);<br /> Da.Fill(Ds);<br /> GridView2.DataSource = Ds;<br /> GridView2.DataBind();<br /> }<br /> }<br />}</span></span></span></h4>
<div style="text-align: left;">
<span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10.0pt;"><b><span style="color: black;">The blow code is aspx.cs code behind file. </span></b></span><br />
C# Code</div>
<span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10.0pt;"><span style="color: black;">using System.Web;</span></span><br />
<div style="text-align: left;">
<span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10.0pt;"><span style="color: black;">using System.Web.Security;<br />using System.Web.UI;<br />using System.Web.UI.WebControls;<br />using System.Web.UI.WebControls.WebParts;<br />using System.Web.UI.HtmlControls;<br />using System.Data;<br />using System.Data.OleDb;<br />using System.IO;<br />using System.Configuration;<br />using System.Text.RegularExpressions;<br />using System.Text;</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "verdana" , "sans-serif"; font-size: 10pt;"><span style="font-family: "verdana" , "sans-serif";"><span style="color: blue;">protected void </span>Page_Load(object sender, EventArgs e)<br /> {<br /><br /> }<br /> protected void btnUpload_Click(object sender, EventArgs e)<br /> {<br /> // upload file code Save into Server folder >> Filed //<br /> if (FileUpload1.HasFile)<br /> {<br /> string FileName = Path.GetFileName(FileUpload1.PostedFile.FileName);<br /> string Extension = Path.GetExtension(FileUpload1.PostedFile.FileName);<br /> string FolderPath = ConfigurationManager.AppSettings["FolderPath"];<br /><br /> string FilePath = Server.MapPath(FolderPath + FileName);<br /> FileUpload1.SaveAs(FilePath);<br /> Import_To_Grid(FilePath, Extension, rbHDR.SelectedItem.Text);<br /> }<br /> }<br /> <br /> // -- import Excel connection -- //<br /> <span style="color: cyan;">private void</span> Import_To_Grid(string FilePath, string Extension, string isHDR)<br /> {<br /> string conStr = "";<br /> switch (Extension)<br /> {<br /> case ".xls": //Excel 97-03<br /> conStr = ConfigurationManager.ConnectionStrings["Excel03ConString"].ConnectionString;<br /> break;<br /> case ".xlsx": //Excel 07<br /> conStr = ConfigurationManager.ConnectionStrings["Excel07ConString"].ConnectionString;<br /> break;<br /> }<br /> conStr = String.Format(conStr, FilePath, isHDR);<br /> OleDbConnection connExcel = new OleDbConnection(conStr);<br /> OleDbCommand cmdExcel = new OleDbCommand();<br /> OleDbDataAdapter oda = new OleDbDataAdapter();<br /> DataTable dt = new DataTable();<br /> cmdExcel.Connection = connExcel;<br /><br /> //Get the name of First Sheet<br /> connExcel.Open();<br /> DataTable dtExcelSchema;<br /> dtExcelSchema = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);<br /> string SheetName = dtExcelSchema.Rows[0]["TABLE_NAME"].ToString();<br /> connExcel.Close();<br /><br /> //Read Data from First Sheet<br /> connExcel.Open();<br /> cmdExcel.CommandText = "SELECT * From [" + SheetName + "]";<br /> oda.SelectCommand = cmdExcel;<br /> oda.Fill(dt);<br /> connExcel.Close();<br /><br /> //Bind Data to GridView<br /> GridView1.Caption = Path.GetFileName(FilePath);<br /> GridView1.DataSource = dt;<br /> GridView1.DataBind();<br /> }<br /><br /> <span style="color: blue;">public string</span> StripHtmlTags(string source)<br /> {<br /> return Regex.Replace(source, "<.*?>|&.*?;", string.Empty);<br /> }<br /> <span style="color: blue;"> public string </span>HTMLToText2(string HTMLCode)<br /> {<br /> // Getting Input HTML<br /> string inputHtml = HTMLCode;<br /><br /> // Removing HTML tags including from the input<br /> string outputText = StripHtmlTags(inputHtml);<br /> // Assigning plain text output to output textbox<br /> HTMLCode = outputText;<br /> <br /> return HTMLCode;<br /> }<br /><br /><br /> // --- Data Gried pageing doe ---//<br /> <span style="color: blue;"> protected void</span> PageIndexChanging(object sender, GridViewPageEventArgs e)<br /> {<br /> string FolderPath = ConfigurationManager.AppSettings["FolderPath"];<br /> string FileName = GridView1.Caption;<br /> string Extension = Path.GetExtension(FileName);<br /> string FilePath = Server.MapPath(FolderPath + FileName);<br /><br /> Import_To_Grid(FilePath, Extension, rbHDR.SelectedItem.Text);<br /> GridView1.PageIndex = e.NewPageIndex;<br /> GridView1.DataBind();<br /> }<br /><br /> // --- MS Access DB connection --//<br /> <span style="color: blue;"> protected void</span> btnExcursionLoad_Click(object sender, EventArgs e)<br /> {<br /> string ConnectString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("alfa.mdb;");<br /> OleDbConnection objCon;<br /> OleDbCommand objCmd;<br /> DataSet Ds = new DataSet();<br /><br /> string GetSql = string.Empty;<br /> GetSql = "(SELECT * FROM Excursions)";<br /> using (objCon = new OleDbConnection(ConnectString))<br /> {<br /> using (objCmd = new OleDbCommand(GetSql, objCon))<br /> {<br /> OleDbDataAdapter Da = new OleDbDataAdapter(objCmd);<br /> Da.Fill(Ds);<br /> GridView2.DataSource = Ds;<br /> GridView2.DataBind();<br /> }<br /> }<br /> }</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br />
<span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10pt;"><span style="color: black;"><span style="color: blue;"><span style="color: black;">Download <span style="font-family: "verdana" , "sans-serif";">Code </span></span></span></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10pt;"><span style="color: black;"><span style="color: blue;"><span style="color: black;"><span style="font-family: "verdana" , "sans-serif";">
<a href="https://doc-0k-0k-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/9ferrfnib2a1ph6gdldu021mgksa4a8i/1461751200000/10116046142777427187/*/0B5Aqxd0QER32MnVYdzFfSnhmZzA?e=download" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;">
<img border="0" src="https://2.bp.blogspot.com/-yQ0iT2VLX6E/VHLJxQtQ7WI/AAAAAAAAQDM/5xgLw2g-fI4_xwdzSuIQtmcFSt34k0u3wCKgB/s1600/btn1.jpg" />
</a>
</span></span></span></span></span></div>
<span style="color: blue; font-family: "verdana" , "sans-serif"; font-size: 10pt;"><span style="color: black;"><span style="color: blue;"> </span></span></span></div>
</div>
</div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-10515130506414097612016-04-27T03:13:00.000-07:002016-04-27T03:13:11.481-07:00Neelofar Abbasi (L), Ishrat Hashmi and Haseena Moin<div dir="ltr" style="text-align: left;" trbidi="on">
Neelofar Abbasi (L), Ishrat Hashmi and Haseena Moin<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.dawn.com/primary/2014/10/54401df5e1379.jpg?r=1808636340" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.dawn.com/primary/2014/10/54401df5e1379.jpg?r=1808636340" /></a></div>
<br /></div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0tag:blogger.com,1999:blog-354110704692906399.post-63472615960280672692016-04-18T23:43:00.001-07:002016-04-18T23:43:32.135-07:009 Things That Will Happen When You Eat Black-Spotted Bananas<div dir="ltr" style="text-align: left;" trbidi="on">
1. You’ll Have Added Protection Against Cancer<br />2. You’ll Be Cured Of Heartburn<br />3. Your Blood Pressure Will Be Regulated<br />4. You’ll Be Less Depressed<br />5. You’ll Relieve Constipation<br />6. You’ll Experience An Instant Boost Of Energy<br />7. You’ll Find It Easier To Deal With Ulcers<br />8. You’ll Fight Anemia<br />9. You’ll Find Relief Against Menstrual Pain<br /><br />link<br /><a href="http://www.lifehack.org/374955/9-things-that-will-happen-when-you-eat-black-spotted-bananas">http://www.lifehack.org/374955/9-things-that-will-happen-when-you-eat-black-spotted-bananas</a><br />
<br />
<br />
<h2>
1. You’ll Have Added Protection Against Cancer</h2>
Researchers
have found that spotted bananas contain a compound called Tumor Necrosis
Factor (TNF) that destroys cancerous tumors. Consumption of such
spotted bananas, therefore, can help in the <a class="tracker-binded" href="http://hubpages.com/health/Bananas-for-Cancer-Do-Brown-Spots-on-Bananas-Fight-Cancer" target="_blank">prevention of cancer</a>.<br />
<h2>
2. You’ll Be Cured Of Heartburn</h2>
Bananas
are excellent natural antacids that help to counter indigestion. They
are easily digested, and thus do not contribute to further stomach
distress. Instead, the discomfort dissipates after you eat a banana. So,
instead of popping a pill for your indigestion and heartburn, eat a
banana for instant relief.<br />
<h2>
3. Your Blood Pressure Will Be Regulated</h2>
To
maintain your blood pressure, you must have good potassium levels in
your blood, and that can be supplied to your body by spotty bananas.
They are rich sources of potassium and have a low sodium content, which
can cause spikes in blood pressure levels.<br />
<h2>
4. You’ll Be Less Depressed</h2>
Bananas
contain tryptophan, an amino acid. Your body utilizes this amino acid
in the manufacturing of serotonin, a neurotransmitter that is closely
linked to the state of mind, as well as to sleep. Thus, bananas help you
achieve a sense of calm, as well as help you get sound sleep.<br />
<h2>
5. You’ll Relieve Constipation</h2>
The
fact that bananas can help to relieve constipation is well known.
They add to the bowel bulk and ease the flow of motion due to
their fiber content. So, the next time you are experiencing digestive or
bowel-related problems, just try eating a banana as your go-to <a class="tracker-binded" href="http://www.stylecraze.com/articles/amazing-benefits-and-uses-of-using-banana-for-skin-and-hair" target="_blank">home remedy</a>!<br />
<div>
<span class="lazy-div" style="max-width: 770px;"><span class="lazy-div-placeholder" style="padding-bottom: 55.84%;"><span class="bttrlazyloading-wrapper bttrlazyloading-loaded"><img alt="Ripe-Banana-for-Constipation2" bgcolor="#e4ccbb" class="lazy-img animated fadeIn" data-bttrlazyloading-lg="{"src":"http:\/\/cdn-media-1.lifehack.org\/wp-content\/files\/2016\/03\/17064343\/Ripe-Banana-for-Constipation2.jpg","width":770,"height":430}" data-bttrlazyloading-md="{"src":"http:\/\/cdn-media-1.lifehack.org\/wp-content\/files\/2016\/03\/17064343\/Ripe-Banana-for-Constipation2.jpg","width":770,"height":430}" data-bttrlazyloading-sm="{"src":"http:\/\/cdn-media-2.lifehack.org\/wp-content\/files\/2016\/03\/17064343\/Ripe-Banana-for-Constipation2-380x212.jpg","width":380,"height":212}" data-bttrlazyloading-xs="{"src":"http:\/\/cdn-media-2.lifehack.org\/wp-content\/files\/2016\/03\/17064343\/Ripe-Banana-for-Constipation2-380x212.jpg","width":380,"height":212}" data-lh-image-id="381010" height="357" src="http://cdn-media-1.lifehack.org/wp-content/files/2016/03/17064343/Ripe-Banana-for-Constipation2.jpg" style="display: block;" width="640" /></span></span></span></div>
<h2>
6. You’ll Experience An Instant Boost Of Energy</h2>
Bananas
have high caloric value, making them an excellent source of instant
energy. So, the next time you need a push after a grueling workout
session, have a banana. The potassium present in bananas prevents your
muscles from cramping. Other minerals and nutrients will help you gain
prolonged physical endurance. We aren’t kidding — <a class="tracker-binded" href="http://www.thebridalbox.com/articles/what-the-foods-you-eat-mean-for-your-sexual-performance_0027963/" target="_blank">it’s a proven fact</a>.<br />
<h2>
7. You’ll Find It Easier To Deal With Ulcers</h2>
Ulcers
are synonymous with acute discomfort and strict restrictions on diet.
This is because spices and many other edibles can aggravate your
condition and cause further irritation. However, bananas have a softer
texture that quickly passes through your digestive tract and provides
much-needed nutrition.<br />
<h2>
8. You’ll Fight Anemia</h2>
Bananas are
abundant sources of the mineral iron. Iron is one of the main components
of your red blood cells that are responsible for the transport of
nutrition and oxygen through your body. Bananas supplement your body’s
iron requirement, thus reducing occurrences of anemia, which is marked
by low iron count and diseased red blood cells.<br />
<h2>
9. You’ll Find Relief Against Menstrual Pain</h2>
The
potassium present in spotty bananas helps to ease muscle cramps due to
menstrual cycles. Bananas are also a rich source of vitamin B6 that
reduces the chances of bloating and water retention during your period.<br />
Bananas
are an excellent addition to your diet. Make sure you eat them just as
they begin to spot — don’t wait until they have completely become black.
This state implies a reduced level of beneficial antioxidants and other
nutrients. Perfectly ripened (and slightly spotted) bananas will digest
easily and provide you with plenty of health benefits. So, have a
banana every day for a better and healthier life!</div>
Asma Qureshihttp://www.blogger.com/profile/14762486142134661666noreply@blogger.com0