tag:blogger.com,1999:blog-9922877424924747972024-03-08T22:29:38.808+06:00Eg Net SolutionHere in this sites web and software developer can get some essential information.Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.comBlogger63125tag:blogger.com,1999:blog-992287742492474797.post-67374805596566854892021-06-21T22:43:00.000+06:002021-06-21T22:43:05.388+06:002020 12 05 গ্রাম বাংলার খেজুর গাছের শরফার বাজি<iframe width="480" height="270" src="https://www.youtube.com/embed/Ee7SI8reQhE" frameborder="0"></iframe>Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-71433776375371688562020-07-08T14:02:00.001+06:002022-04-01T06:40:28.222+06:00Microsoft Excel , Google Spread Sheet Snippet<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
Exel: Check if a column value exists in another column or not =NOT(ISERROR(MATCH(E2,$D$2:$D$1000,0)))<br />
Here we are checking if column E2 exist between Column D2 to Column D1000; if yes then output "True", if not then false. =NOT(ISERROR(MATCH(E2,$D$2:$D$1000,0)))</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-23206965932081867562020-06-21T15:49:00.019+06:002022-04-01T06:41:51.905+06:00আসল জাফরান কোথায় পাবো?<div data-block="true" data-editor="e7ibf" data-offset-key="7822l-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="7822l-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="7822l-0-0" style="font-family: inherit;"><b>বাংলাদেশে আসল জাফরান কোথায় পাবো?</b></span></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="34cks-0-0"><div class="_1mf _1mj" data-offset-key="34cks-0-0" style="background-color: white; direction: ltr; position: relative;"><span data-offset-key="34cks-0-0" style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"><span face=""Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif">সচারচার মশলা/বেনেটির দোকানগুলোতে জাফরান পাওয়া যায়। তাছাড়া সারা দেশে লাজ ফার্মার দোকানগুলোতে ও জাফরান পাওয়া যায়। সারা দেশের যেকোন প্রান্ত থেকেই ই-কমার্স ব্যবসায়ী Hamdoon Product (01533-218898) কাছে পাবেন জাফরান।</span> </span><span style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;">ইরান, কাশ্মীর, স্পেন, আফগানস্থানের</span><span data-offset-key="34cks-0-0" style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"> আসল </span><span style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;">জাফরান পাইকারি/খুচরা হিসেবে পাওয়া যায়।এই ই-কমার্স ব্যবসায়ী</span><span style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"> </span><b style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;">Hamdoon Product (</b><b style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;">01533-218898)</b><span style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"> এর কাছে ।প্রতি</span><span style="color: #050505; font-family: inherit;"><span style="font-size: 15px; white-space: pre-wrap;"> ১ গ্রামের মূল্য ন্যূনতম ২৫০ টাকা থেকে শুরু করে মানের/প্রকারের উপর নির্ভর করে ৭০০ টাকার ভিতরে। </span></span></div><div class="_1mf _1mj" data-offset-key="34cks-0-0" style="background-color: white; direction: ltr; position: relative;"><span style="color: #050505; font-family: inherit;"><span style="font-size: 15px; white-space: pre-wrap;"><br /></span></span></div>আসল জাফরান চেনার উপায় <a href="https://submitmysites.blogspot.com/search?q=%E0%A6%9C%E0%A6%BE%E0%A6%AB%E0%A6%B0%E0%A6%BE%E0%A6%A8&m=1" target="_blank">https://submitmysites.blogspot.com/search?q=%E0%A6%9C%E0%A6%BE%E0%A6%AB%E0%A6%B0%E0%A6%BE%E0%A6%A8&m=1</a></div><div data-block="true" data-editor="e7ibf" data-offset-key="34cks-0-0"><br /><a href="https://www.blogger.com/#"></a><div class="_1mf _1mj" data-offset-key="34cks-0-0" style="background-color: white; direction: ltr; position: relative;"><span><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="color: #050505; direction: ltr; font-family: inherit; font-size: 15px; position: relative; white-space: pre-wrap;"><span data-offset-key="a2cio-0-0" style="font-family: inherit;"><b>জাফরানের ব্যবহার উপকারিতাঃ </b></span></div><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; position: relative;"><span data-offset-key="a2cio-0-0"><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>১। <span style="font-family: inherit;">খাবারের রং ও </span></b><span style="font-family: inherit;"><b>স্বাদঃ</b> </span><span style="font-family: inherit;">এটিকে খাবারের সাথে মিশিয়ে</span><span style="font-family: inherit;"> খাবারের রং সুন্দর করা হয় এবং </span><span style="font-family: inherit;">স্বাদ বাড়ায়</span><span style="font-family: inherit;">। সেই সাথে </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; font-weight: bold; white-space: pre-wrap;"><span style="font-family: inherit; font-weight: 400;"> খাবারকে সুগন্ধিও </span><span style="font-family: inherit; font-weight: 400;">করে।</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><span style="font-family: inherit;"><b>২। </b></span><span style="font-family: inherit;"><b>মুখ ও ত্বকের </b></span><span style="font-family: inherit;">যত্নেঃ </span><span style="font-family: inherit;">এটি খেলে বা তরলে মিশিয়ে</span><span style="font-family: inherit;"> মুখে মাখালে সৌন্দর্য বৃদ্ধি পায়। </span><span style="font-family: inherit;">চেহারার ও </span><span style="font-family: inherit;">ত্বকের</span><span style="font-family: inherit;"> উজ্জ্বলতা
বৃদ্ধি করে, </span><span style="font-family: inherit;">ত্বকের রঙ ফর্সা </span><span style="font-family: inherit;">করে</span><span style="font-family: inherit;"> এবং </span><span style="font-family: inherit;">ত্বককে</span><span style="font-family: inherit;"> </span><span style="font-family: inherit;">কোমল করে। </span><span style="font-family: inherit;">চেহারায় বয়সের ছাপ কমায়। </span><span style="font-family: inherit;">মুখের বলিরেখা দূর
করতে সাহায্য করে। </span><span style="color: #222222; font-family: SolaimanLipi, "Siyam Rupali", Vrinda; font-size: 18px; text-align: justify; white-space: normal;"><b>অনেকেই বলে থাকেন যে গর্ভাবস্থায় দুধে জাফরান মিশিয়ে গরম করার পরে ঠান্ডা করে কুসুম গরম <br /> অবস্হায় পান করলে গর্ভস্থ সন্তানের গায়ের রঙ ফর্সা হয়</b> [যদিও এ বিষয়ে তেমন কোন প্রমাণ নাই।</span><span style="color: #222222; font-family: SolaimanLipi, "Siyam Rupali", Vrinda; font-size: 18px; text-align: justify; white-space: normal;"> </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>৩। </b><span style="font-family: inherit;"><b>চুলের যত্নেঃ</b> </span><span style="font-family: inherit;">এটিকে পানি বা তেলের সাথে মিশিয়ে</span><span style="font-family: inherit;"> </span><span style="font-family: inherit;">চুলের গোড়ায় দিলে </span><span style="font-family: inherit;">চুলের গোড়া </span><span style="font-family: inherit;">মজবুত করে। </span><span style="font-family: inherit;">মাথায় চুল </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><span style="font-family: inherit;"> গজাতে সাহায্য করে। </span><span style="font-family: inherit;"> চুলকে ঝলমলে </span><span style="font-family: inherit;">করে।</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>৪। </b><span style="font-family: inherit;"><b>হজমঃ</b> </span><span style="font-family: inherit;">হজম শক্তি বৃদ্ধি করে</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>৫। <span style="font-family: inherit;">রক্ত ও কোষঃ</span></b><span style="font-family: inherit;"> </span><span style="font-family: inherit;">উচ্চ রক্তচাপ নিয়ন্ত্রনে সহায়তা করে, </span><span style="font-family: inherit;">হৃদপিন্ডের সমস্যা জনিত রোগ দূর করে। </span><span style="font-family: inherit;">কোলেস্টেরল </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><span style="font-family: inherit;"> নিয়ন্ত্রণে</span><span style="font-family: inherit;"> রাখে। </span><span style="font-family: inherit;">জাফরান টিউমারের বৃদ্ধি রোধ করতে সাহায্য করে।</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><span style="font-family: inherit;">৬।</span><span style="font-family: inherit;"> মস্তিস্কঃ </span></b><span style="font-family: inherit;">স্মৃতি ও </span><span style="font-family: inherit;">চিন্তাশক্তি </span><span style="font-family: inherit;">বাড়ায় এবং </span><span style="font-family: inherit;">মানসিক চাপ ও </span><span style="font-family: inherit;">বিষন্নতা দূর করে। </span><span style="font-family: inherit;">মস্তিষ্কের গঠন উন্নত করে এবং </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><span style="font-family: inherit;"> মেধা</span><span style="font-family: inherit;">শক্তি</span><span style="font-family: inherit;"> বাড়ায়</span><span style="font-family: inherit;">। পারকিনসন এবং স্মৃতিশক্তি হারিয়ে যাওয়ার বিভিন্ন অসুখে জাফরান ব্যবহার করা হয়</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><span style="font-family: inherit;">৭</span><span style="font-family: inherit;">। </span></b><span style="font-family: inherit;"><b>অনিদ্রাঃ</b> </span><span style="font-family: inherit;">অনিদ্রা সমস্যা দূর করে, প্রশান্তিদায়ক ঘুম হয়</span><span style="font-family: inherit;">। </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><span style="font-family: inherit;">৮। </span><span style="font-family: inherit;">দাঁতের যত্নেঃ</span></b><span style="font-family: inherit;"> </span><span style="font-family: inherit;">দাঁতের বিভিন্ন ধরনের রোগ থেকে মুক্তি দেয়।</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><span style="font-family: inherit;">৯। </span><span style="font-family: inherit;">শরীরের </span><span style="font-family: inherit;"> </span><span style="font-family: inherit;">যত্নেঃ</span></b><span style="font-family: inherit;"> </span><span style="font-family: inherit;">শরীরের বিভিন্ন ধরনের ব্যথা দূর করে,</span><span style="font-family: inherit;"> দুর্বলতা কমায়,</span><span style="font-family: inherit;"> অসাধারণভাবে শক্তি বাড়ায় এবং </span><span style="font-family: inherit;">শরীরের
রোগ </span><span style="font-family: inherit;">প্রতিরোধ ক্ষমতা বাড়ায়।</span><span style="font-family: inherit;">।</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>১০। চোখের যত্নেঃ </b><span style="font-family: inherit;">দৃষ্টিশক্তি বাড়ায় ও </span><span style="font-family: inherit;">ছানি পড়ার সমস্যা প্রতিরোধ করে</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b style="font-family: inherit;">১১। বিভিন্ন অঙ্গ-প্রত্যঙ্গের যত্নেঃ </b><span style="font-family: inherit;">কিডনি রোগ থেকে মুক্তি দেয়। </span><span style="font-family: inherit;">যকৃতের সমস্যা দূর করে করে। </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>১২। মেয়েদের হরমোন সমস্যার ক্ষেত্রে:</b> <span style="font-family: inherit;">শারীরিক দিক থেকে অনুন্নত মেয়েদেরকে প্রত্যেকদিন এক চিমটে
জাফরান কুসুম গরম দুধের </span><span style="font-family: inherit;">সঙ্গে </span><span style="font-family: inherit;">মিশিয়ে খেলে হরমোন উদ্দীপিত হয়। [Link: <a href="https://www.kalerkantho.com/online/lifestyle/2016/07/31/387703" target="_blank">KalerKantha</a>]</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"> </div><div dir="auto"><span style="color: #050505;"><span style="white-space: pre-wrap;"><b><span style="font-size: medium;">জাফরান খাবার নিয়ম:</span></b><span style="font-size: 14px;">
<b>১।</b> ফুটানো পাতলা দুধের মাঝে জাফরান দিয়ে ২-৩ মিনিট পুনরায় ফুটানোর পরে সেটির মধ্যে </span></span></span><span style="color: #050505; font-size: 14px; white-space: pre-wrap;">কিসমিস অথবা মধু
দিয়ে</span><span style="color: #050505; font-size: 14px; white-space: pre-wrap;"> কুসুম গরম অবস্থায় আসা </span><span style="color: #050505; font-size: 14px; white-space: pre-wrap;">পর্যন্ত অপেক্ষা করুন। এরপর </span><span style="color: #050505; font-size: 14px; white-space: pre-wrap;">কুসুম গরম হলে সেই দুধকে পান করুন। পরবর্তীতে
গরম অনুভূত হলে </span><span style="color: #050505; font-size: 14px; white-space: pre-wrap;">বেশি </span><span style="color: #050505; font-size: 14px; white-space: pre-wrap;">বেশি পানি পান করুন।</span></div><div dir="auto"><b style="color: #050505; font-size: 14px; white-space: pre-wrap;">২।</b><span style="color: #050505; font-size: 14px; white-space: pre-wrap;"> বিভিন্ন খাবারের সাথে মশলা ও রঞ্জক হিসেবেও জাফরান খাওয়া যেতে পারে।</span></div><div dir="auto"><span style="color: #050505; font-size: 14px; white-space: pre-wrap;"> </span></div></span></div></span></div><div class="_1mf _1mj" data-offset-key="34cks-0-0" style="background-color: white; color: #050505; direction: ltr; font-family: inherit; font-size: 15px; position: relative; white-space: pre-wrap;"><br /></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="727vn-0-0" style="background-color: white;"><div class="_1mf _1mj" data-offset-key="727vn-0-0" style="color: #050505; direction: ltr; font-family: inherit; font-size: 15px; position: relative; white-space: pre-wrap;"><span data-offset-key="727vn-0-0" style="font-family: inherit;"><b>আসল জাফরান চেনার উপায়ঃ </b>জাফরান হল saffron crocus ফুলের গর্ভকেশর। যেটির রঙ লাল/খয়েরী বর্ণের। আসল জাফরান পানিতে ভিজিয়ে রাখলে ঐ পানি ধীরে ধীরে হলুদাভ বর্ণের হতে থাকে এবং প্রায় ৮-১০ ঘণ্টা পরে গর্ভকেশরটি হালকা হলুদাভ বা হলুদাভ সাদা বর্ণের হয়ে যায়। আসল জাফরান অনেকক্ষণ পানিতে ভিজিয়ে রাখার ফলে সেটির রং পানিতে মিশে গেলেও আসল আসল জাফরান দণ্ডটি পানিতে গলে না। কয়েকটি জাফরান গর্ভকেশর দণ্ড একই সময়ে খেলে শরীরের উত্তাপ এবং যৌন উত্তেজনা বেড়ে যায়। সুস্থ সবল মানুষের স্ত্রী সহবাসের স্থায়িত্ব বেড়ে যায়। </span></div><div class="_1mf _1mj" data-offset-key="727vn-0-0" style="color: #050505; direction: ltr; font-family: inherit; font-size: 15px; position: relative; white-space: pre-wrap;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSXFdWxDlY-mY_ctB6eQSqLCNehJkxuILJzZswbUba0KczAdTkFVlcLEgLQ7WbHvC7T5oCEHksglk672Mt10G2qbG78x_atEcb3bzdFPDPpmj1d4ZsgPrEiSDG12XUkETDlBovO_H9kfdB_iMvnhcgXnSldrS-bRDmE5aw6VTgV3iN-w1FBy-Mv4EoA/s572/Saffron%20Type.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="399" data-original-width="572" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSXFdWxDlY-mY_ctB6eQSqLCNehJkxuILJzZswbUba0KczAdTkFVlcLEgLQ7WbHvC7T5oCEHksglk672Mt10G2qbG78x_atEcb3bzdFPDPpmj1d4ZsgPrEiSDG12XUkETDlBovO_H9kfdB_iMvnhcgXnSldrS-bRDmE5aw6VTgV3iN-w1FBy-Mv4EoA/w310-h216/Saffron%20Type.png" width="310" /></a></div></div><div class="_1mf _1mj" data-offset-key="727vn-0-0" style="direction: ltr; position: relative;"><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><br /></b></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><br /></b></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b>জাফরানের প্রকারভেদঃ </b></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><b><br /></b></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;">কর্তনের স্থানেএর উপর ভিত্তি করে জাফরান ৪ প্রকার।</div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;">১। S<span style="font-family: inherit;">argol(লাল জাফরান) </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;">২। <span style="font-family: inherit;"> Super Negin</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><span style="font-family: inherit;">৩। </span><span style="font-family: inherit;">Negin </span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><span style="font-family: inherit;">৪। শ্বেত/সাদা জাফরান [ছবি সংযুক্ত]</span></div><div dir="auto" style="color: #050505; font-family: inherit; font-size: 14px; white-space: pre-wrap;"><br /></div><div dir="auto"><div data-block="true" data-editor="e7ibf" data-offset-key="4n3v0-0-0" style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="4n3v0-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="4n3v0-0-0" style="font-family: inherit;"><b style="font-family: inherit;">জাফরানের মূল্য:</b></span></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="7ia8d-0-0"><div class="_1mf _1mj" data-offset-key="7ia8d-0-0" style="color: black; direction: ltr; font-family: "Times New Roman"; font-size: medium; position: relative; white-space: normal;"><span data-offset-key="7ia8d-0-0" style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"><b>Hamdoon Product ( </b></span><span style="color: #050505;"><span style="font-size: 15px; white-space: pre-wrap;"><b>01533-218898</b></span></span><span data-offset-key="7ia8d-0-0" style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"><b> </b></span><b style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;">)</b><span style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"> থেকে কিনলে সর্ব নিম্ন ০.৫( হাফ/আধা গ্রাম) গ্রাম মুল্য ন্যূনতম ১৬০ টাকা থেকে শুরু করে জাফরানের প্রকারের উপর নির্ভর করে ২০০ টাকা পর্যন্ত। আর প্রতি ১ গ্রামের মূল্য ন্যূনতম ২৫০ টাকা থেকে শুরু করে মানের/প্রকারের উপর নির্ভর করে ৪০০ টাকা পর্যন্ত।</span></div><div class="_1mf _1mj" data-offset-key="7ia8d-0-0" style="color: black; direction: ltr; font-family: "Times New Roman"; font-size: medium; position: relative; white-space: normal;"><span style="color: #050505; font-family: inherit; font-size: 15px; white-space: pre-wrap;"><br /></span></div><div class="_1mf _1mj" data-offset-key="7ia8d-0-0" style="direction: ltr; position: relative;"><div style="text-align: center;"><b style="color: #050505; font-size: 15px; white-space: pre-wrap;">Pushal Type প্রতিগ্রাম ৩৫০ টাকা </b></div><span style="color: #050505; font-size: 15px; white-space: pre-wrap;"><div style="text-align: center;"><b>Negin Type প্রতিগ্রাম ৪৫০ টাকা </b></div><b><div style="text-align: center;"><b>Sargol Type প্রতিগ্রাম ৬০০ টাকা</b></div></b></span></div></div></div></div><div class="_1mf _1mj" data-offset-key="727vn-0-0" style="color: #050505; direction: ltr; font-family: inherit; font-size: 15px; position: relative; white-space: pre-wrap;"><span data-offset-key="727vn-0-0" style="font-family: inherit;"><br /></span></div><div class="_1mf _1mj" data-offset-key="727vn-0-0" style="color: #050505; direction: ltr; font-family: inherit; font-size: 15px; position: relative; white-space: pre-wrap;"><b>আসল ও </b><b>নকল জাফরান </b><b style="font-family: inherit;"> সম্পর্কে কিছু কথাঃ </b></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="a2cio-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="a2cio-0-0" style="font-family: inherit;">অনেক সময় আমাদের দেশে জাফরানের পরিবর্তে কুসুম (Safflower) ফুল ব্যবহার করা হয়। এটাকে জাফরান নামে বিক্রি করে ক্রেতাদের ঠকানো হয়। ১ কেজি প্রকৃত জাফরানের মূল্য ২.৫-৭ লক্ষ টাকা। মসলা হিসাবে নকল জাফরানের কোন মূল্য নাই কিন্তু রং করার ক্ষমতার কারণে অনেক সময় অনেকে এটা আসল জাফরান মনে করে ধোঁকা খায়, আর বিক্রেতারা অনেক অর্থমূল্য হাতিয়ে নেয়। নকল জাফরান পানিতে মিশালে সেটি লাল রঙের হতে থাকে আর নকল জাফরান দণ্ডটি পানিতে গলে যেতে থাকে। </span></div><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="a2cio-0-0" style="font-family: inherit;"><br /></span></div><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-V1LwPn4mOZY/YNBgE5JQTII/AAAAAAAACuQ/8viByOjdrDYWAXzwoP70CgrE5ItHrzneACPcBGAYYCw/s400/%25E0%25A6%259C%25E0%25A6%25BE%25E0%25A6%25AB%25E0%25A6%25B0%25E0%25A6%25BE%25E0%25A6%25A8.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="266" data-original-width="400" height="276" src="https://1.bp.blogspot.com/-V1LwPn4mOZY/YNBgE5JQTII/AAAAAAAACuQ/8viByOjdrDYWAXzwoP70CgrE5ItHrzneACPcBGAYYCw/w417-h276/%25E0%25A6%259C%25E0%25A6%25BE%25E0%25A6%25AB%25E0%25A6%25B0%25E0%25A6%25BE%25E0%25A6%25A8.jpg" width="417" /></a></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-riPqgTuLVhU/YREZ0QSJ0iI/AAAAAAAACwA/GMQUNY1CjQcA0H4gV4eq__skrcoodRJiwCLcBGAsYHQ/s466/Saffron.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="466" height="307" src="https://1.bp.blogspot.com/-riPqgTuLVhU/YREZ0QSJ0iI/AAAAAAAACwA/GMQUNY1CjQcA0H4gV4eq__skrcoodRJiwCLcBGAsYHQ/w377-h307/Saffron.jpg" width="377" /></a></div></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-JKELPha50A8/YNAukBGaGaI/AAAAAAAACuE/sU3t1w3oDzcdO8LJ8nJf_jVRXC9uqHcigCPcBGAYYCw/s600/%25E0%25A6%25A8%25E0%25A6%2595%25E0%25A6%25B2%2B%25E0%25A6%259C%25E0%25A6%25BE%25E0%25A6%25AB%25E0%25A6%25B0%25E0%25A6%25BE%25E0%25A6%25A8.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="450" height="402" src="https://1.bp.blogspot.com/-JKELPha50A8/YNAukBGaGaI/AAAAAAAACuE/sU3t1w3oDzcdO8LJ8nJf_jVRXC9uqHcigCPcBGAYYCw/w432-h402/%25E0%25A6%25A8%25E0%25A6%2595%25E0%25A6%25B2%2B%25E0%25A6%259C%25E0%25A6%25BE%25E0%25A6%25AB%25E0%25A6%25B0%25E0%25A6%25BE%25E0%25A6%25A8.jpg" width="432" /></a></div><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="a2cio-0-0" style="font-family: inherit;"><b><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><div class="separator" style="clear: both; text-align: center;"><br /></div></div></b></span></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="a2cio-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="a2cio-0-0" style="font-family: inherit;"><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span style="font-family: inherit;"><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; font-weight: 400; position: relative;"><br /></div><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="a2cio-0-0" style="font-family: inherit;"><div dir="auto" style="font-size: 14px; font-weight: 400;"><br /></div><div dir="auto" style="font-size: 14px; font-weight: 400;"> </div><div dir="auto" style="font-size: 14px; font-weight: 400;"><br /></div></span></div></span></div><div class="_1mf _1mj" data-offset-key="a2cio-0-0" style="direction: ltr; font-family: inherit; font-weight: bold; position: relative;"><b style="font-family: inherit;">জাফরান আমদানিঃ </b></div></span></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="74e5f-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="74e5f-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="74e5f-0-0" style="font-family: inherit;">বাংলাদেশে ব্যবসার উদ্দেশ্যে জাফরান ইরান, কাশ্মীর, স্পেন, আফগানস্থান থেকে আমদানি করা হয়। ইরান থেকে যে জাফরান আমদানি করা হয় সেটি সচারচর ২৫ গ্রামের একটি প্যাকেট; প্রক্রিয়াজাতকরণ প্রতিষ্ঠানের নাম (Baidee Saffron) </span><span class="py34i1dx" color="var(--blue-link)" style="font-family: inherit;">http://www.badieesaffron.com/</span><span data-offset-key="74e5f-2-0" style="font-family: inherit;"> ও (Persa Trading) </span><span class="py34i1dx" color="var(--blue-link)" style="font-family: inherit;">https://persatrading</span><span data-offset-key="74e5f-4-0" style="font-family: inherit;">. </span></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="9q8g0-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="9q8g0-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span style="font-family: inherit;"><br /></span></div><div class="_1mf _1mj" data-offset-key="9q8g0-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span style="font-family: inherit;"><b style="font-family: inherit;">জাফরান ক্রয়:</b></span></div><div class="_1mf _1mj" data-offset-key="9q8g0-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span style="font-family: inherit;">কুরিয়ারের মাধ্যমে পণ্য ক্রয়ের জন্য আপনারা "হামদুন প্রোডাক্ট" Hamdoon Product (01533-218898) কে কল করতে পারেন। এই ই-কমার্স স্টোরটি কুরিয়ার সার্ভিসের মাধ্যমে </span> বিভিন্ন দেশ থেকে আমদানিকৃত <span style="font-family: inherit;">আসল জাফরান, কাজু বাদাম, কাঠবাদাম, আখরোট, কিসমিস সারা দেশে পাইকারি ও খুচরা বিক্রয় করে থাকে।</span></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="coffi-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="coffi-0-0" style="direction: ltr; font-family: inherit; position: relative;"><div dir="auto"><br /></div></div></div><div data-block="true" data-editor="e7ibf" data-offset-key="3ro5q-0-0" style="background-color: white; color: #050505; font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; white-space: pre-wrap;"><div class="_1mf _1mj" data-offset-key="3ro5q-0-0" style="direction: ltr; font-family: inherit; position: relative;"><span data-offset-key="3ro5q-0-0" style="font-family: inherit;">আমাদের কাছে থাকা জাফরান গুলো নিজেদের অর্জিত জ্ঞান দিয়ে যথাসম্ভব পরীক্ষা করে যাচাই করেছি এ গুলো আসল জাফরান। এইটা কুসুম ফুলের নকল জাফরানের সাথে মিলে না।</span></div></div>Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0Dhaka, Bangladesh23.810332 90.4125181-4.4999018361788465 55.2562681 52.120565836178841 125.5687681tag:blogger.com,1999:blog-992287742492474797.post-38688795914279513382020-05-18T01:56:00.000+06:002020-05-18T01:56:14.498+06:00Github create a new repository or add a project to a repository on the command line<div dir="ltr" style="text-align: left;" trbidi="on">
echo "# BANGLA-TEXT-TO-SPEECH-CONVER-KAKATUATER" >> README.md<br />
git init<br />
git add README.md<br />
git commit -m "first commit"<br />
git remote add origin https://github.com/ashikcse20/BANGLA-TEXT-TO-SPEECH-CONVER-KAKATUATER.git<br />
git push -u origin master<br />
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-68522687992064330512020-05-11T00:36:00.001+06:002020-05-11T00:36:47.328+06:00Best Amazing Quran Recitation you have ever heard Surah Al Ghashiyah 88<br /><br />
<br /><br />
Regards<br />
---Muhammad AshikuzzamanMuhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-7460094578545701272020-05-07T05:38:00.001+06:002020-05-07T05:38:29.976+06:00Surah Al A'la Beautiful Recitation - সুরা আল আ'লা<iframe allowfullscreen="" frameborder="0" height="300" src="https://www.youtube.com/embed/zrAboMy5Dno" width="580"></iframe><br />
<br /><br />
<br /><br />
Regards<br />
---Muhammad AshikuzzamanMuhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-35179204507955591392020-05-03T19:03:00.001+06:002020-05-03T19:03:04.010+06:00Corona Song - করোনা নিয়ে প্রাঞ্জল ভাষায় সাদামাটা পুঁথি গান<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/xKfv5_4uXNI" width="630"></iframe><br />
<br />
<br /><br />
Regards<br />
---Muhammad AshikuzzamanMuhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-27355589135542173012019-08-19T16:57:00.002+06:002019-08-19T16:57:39.126+06:00বাঁকানাজ ঘাঁটকুল <div dir="ltr" style="text-align: left;" trbidi="on">
বাঁকানাজ প্রায় কচুর মত দেখতে এক প্রকার গাছ<br />
<br />
<br />
ঘাঁটকুল প্রায় কচুর মত দেখতে এক প্রকার গাছ </div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-58039296786672034602019-07-20T10:35:00.003+06:002022-03-17T20:37:10.039+06:00Windows & .Net Snippet<div dir="ltr" style="text-align: left;" trbidi="on">MSSQL SERVER LOCAL DB: </div><div dir="ltr" style="text-align: left;" trbidi="on"><span style="font-size: 15pt;">(LocalDb)\MSSQLLocalDB</span></div><div dir="ltr" style="text-align: left;" trbidi="on">Run Snippet:</div><div dir="ltr" style="text-align: left;" trbidi="on">
sqlplus<br />
SQLSERVERMANAGER12.msc</div><div dir="ltr" style="text-align: left;" trbidi="on">SQLServerManager15.msc<br />
services.msc<br />
inetmgr<br />
eventvwr<br />
mmc.exe<br />
appdata<br />
wf.msc Windows Firewall With Advanced Security<br />
To Install IIS Server<br />
Microsoft Web Platform Installer windows server 2012r2</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-20146277307145828002019-04-16T17:55:00.000+06:002019-09-12T15:03:59.725+06:00Solved Problem :: Scenario While Hosting ASP MVC4 Application in IIS 6.1 at Windows Server 2012 R2<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="https://www.youtube.com/watch?v=mPwlxP5Nxcg&t=146s"><span style="color: blue;">How To Install IIS on Server 2012 r2</span></a><br />
<span style="color: blue;"><br /></span>
<h4 style="text-align: left;">
<a href="https://www.youtube.com/watch?v=mPwlxP5Nxcg&t=146s"><span style="color: blue;">https://www.youtube.com/watch?v=mPwlxP5Nxcg&t=146s</span></a></h4>
<span style="color: blue;">Install .Net Framework 4.5.2 from Microsoft Web Platform Installer</span><br />
<span style="color: blue;"><br /></span>
<a href="https://stackoverflow.com/questions/37557199/how-to-troubleshoot-a-503-error-in-iis"><span style="color: blue;">https://stackoverflow.com/questions/37557199/how-to-troubleshoot-a-503-error-in-iis</span></a><br />
<a href="https://stackoverflow.com/questions/8232922/asp-pages-in-iis-using-localhost-401-3-error-do-not-have-permission"><span style="color: blue;">https://stackoverflow.com/questions/8232922/asp-pages-in-iis-using-localhost-401-3-error-do-not-have-permission</span></a><br />
<a href="https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con"><span style="color: blue;">https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con</span></a><br />
<a href="https://stackoverflow.com/a/4794716/2014745"><span style="color: blue;">https://stackoverflow.com/a/4794716/2014745</span></a><br />
<a href="https://stackoverflow.com/questions/34199976/iis-config-error-this-configuration-section-cannot-be-used-at-this-path"><span style="color: blue;">https://stackoverflow.com/questions/34199976/iis-config-error-this-configuration-section-cannot-be-used-at-this-path</span></a><br />
<a href="https://stackoverflow.com/a/35332431/2014745"><span style="color: blue;">https://stackoverflow.com/a/35332431/2014745</span></a><br />
<a href="https://stackoverflow.com/questions/9794985/config-error-this-configuration-section-cannot-be-used-at-this-path"><span style="color: blue;">https://stackoverflow.com/questions/9794985/config-error-this-configuration-section-cannot-be-used-at-this-path</span></a><br />
<a href="https://stackoverflow.com/a/25698312/2014745"><span style="color: blue;">https://stackoverflow.com/a/25698312/2014745</span></a><br />
<a href="https://stackoverflow.com/questions/2659544/cant-run-asp-net-mvc-2-web-app-on-iis-7-5"><span style="color: blue;">https://stackoverflow.com/questions/2659544/cant-run-asp-net-mvc-2-web-app-on-iis-7-5</span></a><br />
<a href="https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con/50863817"><span style="color: blue;">https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con/50863817</span></a><br />
<a href="https://www.codeproject.com/Questions/1076591/A-default-document-is-not-configured-for-the-reque"><span style="color: blue;">https://www.codeproject.com/Questions/1076591/A-default-document-is-not-configured-for-the-reque</span></a><br />
<a href="https://stackoverflow.com/a/12867753/2014745"><span style="color: blue;">https://stackoverflow.com/a/12867753/2014745</span></a><br />
<a href="https://stackoverflow.com/questions/19162553/iis-401-3-unauthorized"><span style="color: blue;">https://stackoverflow.com/questions/19162553/iis-401-3-unauthorized</span></a><br />
<a href="https://stackoverflow.com/questions/32014912/how-do-i-tell-iis-to-serve-static-files-from-the-web-root-with-an-underlying-cat/32526842"><span style="color: blue;">https://stackoverflow.com/questions/32014912/how-do-i-tell-iis-to-serve-static-files-from-the-web-root-with-an-underlying-cat/32526842</span></a><br />
<a href="https://stackoverflow.com/questions/8723763/iis-6-0-suddenly-shows-directory-listing-instead-of-mvc-3-app"><span style="color: blue;">https://stackoverflow.com/questions/8723763/iis-6-0-suddenly-shows-directory-listing-instead-of-mvc-3-app</span></a><br />
<a href="https://stackoverflow.com/questions/13162545/handler-extensionlessurlhandler-integrated-4-0-has-a-bad-module-managedpipeli?rq=1"><span style="color: blue;">https://stackoverflow.com/questions/13162545/handler-extensionlessurlhandler-integrated-4-0-has-a-bad-module-managedpipeli?rq=1</span></a><br />
<a href="https://stackoverflow.com/questions/4654547/a-default-document-is-not-configured-for-the-requested-url-and-directory-browsi"><span style="color: blue;">https://stackoverflow.com/questions/4654547/a-default-document-is-not-configured-for-the-requested-url-and-directory-browsi</span></a><br />
<a href="https://stackoverflow.com/q/40428074/2014745"><span style="color: blue;">https://stackoverflow.com/q/40428074/2014745</span></a><br />
<a href="https://stackoverflow.com/questions/45207154/could-not-load-file-or-assembly-microsoft-reportviewer-processingobjectmodel-v#"><span style="color: blue;">https://stackoverflow.com/questions/45207154/could-not-load-file-or-assembly-microsoft-reportviewer-processingobjectmodel-v#</span></a><br />
<a href="https://stackoverflow.com/questions/33412042/configuration-error-related-to-targetframework-in-web-config/33412841#33412841"><span style="color: blue;">https://stackoverflow.com/questions/33412042/configuration-error-related-to-targetframework-in-web-config/33412841#33412841</span></a><br />
<a href="https://stackoverflow.com/questions/40428074/iis-7-5-only-shows-directory-list-or-403-instead-of-asp-net-application"><span style="color: blue;">https://stackoverflow.com/questions/40428074/iis-7-5-only-shows-directory-list-or-403-instead-of-asp-net-application</span></a><br />
<a href="https://stackoverflow.com/questions/1376717/unable-to-make-the-session-state-request-to-the-session-state-server"><span style="color: blue;">https://stackoverflow.com/questions/1376717/unable-to-make-the-session-state-request-to-the-session-state-server</span></a><br />
<a href="https://stackoverflow.com/questions/9216158/the-requested-page-cannot-be-accessed-because-the-related-configuration-data-for"><span style="color: blue;">https://stackoverflow.com/questions/9216158/the-requested-page-cannot-be-accessed-because-the-related-configuration-data-for</span></a><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">Regards
---Muhammad Ashikuzzaman</span></div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-58891652749673723092019-03-13T12:24:00.000+06:002019-03-14T08:37:21.062+06:00My Favorite Attar/ Fragrant list<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: center;">
<div style="text-align: left;">
<b> Attar name Company Name </b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Al-Fares Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Sultan Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Dalal Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Sad Safa Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Shadha Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Choko Mask Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Soft Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Lord Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>White Wood Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Black Wood Al-Rehab</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Cute Blue bottle Tibbet</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Fawakih Opened</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Orange Alif</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Lemon Opened</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>kachi Beli Opened</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Magnet Opened</b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Marjan Opened/Company </b></div>
</div>
<div style="text-align: center;">
<div style="text-align: left;">
<b> </b><b>Jannatul Fedaus Opened/Company </b></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<br />
<br />
Regards
---Muhammad Ashikuzzaman</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-43976025853507863832018-12-27T14:39:00.002+06:002018-12-27T14:39:55.802+06:00SQL TRICKS<div dir="ltr" style="text-align: left;" trbidi="on">
1. Student Table have:ID, STUDENT_ID, STUDENT_NAME, YEAR, CLASS, ROLL<br />
Find each student name, the last year in database, class name<br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;">ID, STUDENT_ID STUDENT_NAME YEAR CLASS ROLL</span></li>
<li><span style="background-color: #f3f3f3;">1 2 A 2010 I 5</span></li>
<li><span style="background-color: #f3f3f3;">2 2 A 2012 III 5</span></li>
<li><span style="background-color: #f3f3f3;">3 5 C 2010 IX 5</span></li>
<li><span style="background-color: #f3f3f3;">4 2 A 2014 V 5</span></li>
<li><span style="background-color: #f3f3f3;">5 7 E 2018 IX 5</span></li>
<li><span style="background-color: #f3f3f3;">6 2 A 2016 VII 5</span></li>
</ol>
<div>
Query: </div>
<div style="text-align: left;">
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;"> Select ST1.ID, ST1.STUDENT_ID, ST1.STUDENT_NAME, ST1.YEAR, ST1.CLASS, ROLL from STUDENT ST1 INNER JOIN</span></li>
<li><span style="background-color: #f3f3f3;"> (</span></li>
<li><span style="background-color: #f3f3f3;"> SELECT STUDENT_ID , MAX(YEAR) MAXYEAR from STUDENT GROUP BY STUDENT_ID </span></li>
<li><span style="background-color: #f3f3f3;"> )</span></li>
<li><span style="background-color: #f3f3f3;"> ST2 on ST1.STUDENT_ID = ST2.STUDENT_ID AND ST1.ID = ST2.ID</span></li>
</ol>
</div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-68059269282434384182018-12-24T12:53:00.000+06:002019-03-09T10:03:32.420+06:00RDLC Report Definition Language Client Site Snippet<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: #d9ead3;"><span style="color: #6aa84f;">1. </span><b>FormatDateTime to required Format</b></span><br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;">=FormatDateTime(Fields!OrderDate.Value, DateFormat.ShortDate)</span></li>
<li><span style="background-color: #cccccc;">=Format(now( ),"dd-MMM-yyyy HH:mm:ss tt")</span></li>
<li><span style="background-color: #cccccc;">=Format( Fields!CreateDate.Value, "dd-MMM-yyyy")</span></li>
<li><span style="background-color: #cccccc;">=FormatNumber(Sum(Fields!FinishQty.Value),0)</span></li>
<li><span style="background-color: #cccccc;">=FormatDateTime(Fields!DeliveryDate.Value, DateFormat.ShortDate) </span></li>
</ol>
<div>
<br /></div>
<div>
<b> <span style="background-color: #b6d7a8;"> For Printing Serial In RDLC</span></b></div>
<ol style="text-align: left;">
<li>=RowNumber(Nothing)</li>
</ol>
<div>
<b> <span style="background-color: #b6d7a8;">If Condition in RDLC</span></b></div>
<div>
=IIf(Parameters!UnitListId.Value = "6", "Color City Ltd.", <br />
IIf(Parameters!UnitListId.Value = "1", "Mymun Textile Ltd.", <br />
IIf(Parameters!UnitListId.Value = "2", "Hamza Textile Ltd",<br />
"Mymun Complex")))<br />
<span style="background-color: white;"> </span><span style="background-color: #b6d7a8;"><b>Switch case in RDLC</b></span><br />
= Switch( Fields!FlagGroup.Value = 0, "00-60 days",<br />
Fields!FlagGroup.Value = 1, "61-120 Days",<br />
Fields!FlagGroup.Value = 2, "121-180 Days",<br />
Fields!FlagGroup.Value = 3, "181-270 Days",<br />
Fields!FlagGroup.Value = 4, "271-365 Days",<br />
Fields!FlagGroup.Value = 5, "More than 365 Days" ,<br />
<span style="background-color: #b6d7a8;"></span><br />
<span style="white-space: pre;"> </span> 1 = 1, "default value" )<br />
<span style="background-color: #b6d7a8;"><b>Formatting number to Desired Decimal Points:</b></span></div>
<div>
=FormatNumber(Sum(Fields!FinishQty.Value), 0)<br />
<br /></div>
<div>
<span style="background-color: white;"> </span><span style="background-color: #d9ead3;"><b>Iff condition in Function: </b></span></div>
<div>
=FormatNumber( Sum(IIf(Fields!FlagColumn = 0, Fields!FinishQty.Value ,0 ) ),0)<br />
=IIf(Fields!FlagColumn = 0, FormatNumber( Sum(Fields!FinishQty), 0),0 )<br />
<br />
<br />
<br /></div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-23145760622028040812018-11-27T10:13:00.000+06:002018-12-13T11:41:46.231+06:00Programming language & library Exceptions that occurred while developing in C#, JavaScript, Jquery, SQL, Entity framework <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: red;">C#-SQL: <span style="background-color: #f3f3f3;">Procedure or function SPROC_GET_DBTEXQuality_SearchBatchCardDetails has too many arguments specified. </span></span><br />
<span style="background-color: #f3f3f3;">It occurs when </span>System.Data.SqlClient SqlCommand command.Parameters have more parameter rather than declared in the Stored procedure<br />
<br />
Parse String to Date Time: Worked For ME:<br />
string CreatedDateStr = "2018-12-13 11:05:45.313";<br />
DateTime CreateDate = DateTime.Parse( CreatedDateStr );</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-75201758070327372022018-11-01T13:22:00.001+06:002018-12-13T11:53:06.904+06:00Using SqlClient connect to sql server and CRUD in Databse thorough Stored Procedure<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> </span><span style="background-color: #f3f3f3;"> public List<LDNo> LDNoList(Int64? LDNo)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> ResultModel result = new Models.ViewModel.CommonViewModel.ResultModel();</span></li>
<li><span style="background-color: #f3f3f3;"> string error = String.Empty;</span></li>
<li><span style="background-color: #f3f3f3;"> QUERY2 query = new QUERY2();</span></li>
<li><span style="background-color: #f3f3f3;"> Dictionary<string, object> dict = new Dictionary<string, object>();//= new Dictionary<string, string> </span></li>
<li><span style="background-color: #f3f3f3;"> List<LDNo> ldnoList = new List<LDNo>();</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> dict.Add("@LDNO", LDNo);</span></li>
<li><span style="background-color: #f3f3f3;"> dict.Add("@Result", 1.ToString());</span></li>
<li><span style="background-color: #f3f3f3;"> dict.Add("@Message", "Message".ToString());</span></li>
<li><span style="background-color: #f3f3f3;"> query.SQL = @"SPROC_GET_tblDyesForecastingHead_LDNO";</span></li>
<li><span style="background-color: #f3f3f3;"> query.PARAMETER = dict;</span></li>
<li><span style="background-color: #f3f3f3;"> clsDataprocess cls = new clsDataprocess();</span></li>
<li><span style="background-color: #f3f3f3;"> result = cls.ExecuteSqlStoredProcedureSaveEdit(query, "get", out error);</span></li>
<li><span style="background-color: #f3f3f3;"> if (result.Result && result.DtTable != null && result.DtTable.Rows.Count > 0)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> Int64 tempi = 0;</span></li>
<li><span style="background-color: #f3f3f3;"> for (int i = 0; i < result.DtTable.Rows.Count; i++)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> LDNo lDNo = new LDNo();</span></li>
<li><span style="background-color: #f3f3f3;"> Int64.TryParse(result.DtTable.Rows[i]["LDNO"].ToString(), out tempi);</span></li>
<li><span style="background-color: #f3f3f3;"> lDNo.LdNo = tempi;</span></li>
<li><span style="background-color: #f3f3f3;"> ldnoList.Add(lDNo);</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> string Message = result.Message;</span></li>
<li><span style="background-color: #f3f3f3;"> string Result = result.Result.ToString();</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else if (!result.Result)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> throw new Exception(result.Message);</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> return ldnoList;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
</ol>
<div>
<br />
<a name='more'></a><br /></div>
<br />
<div>
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> </span><span style="background-color: #f3f3f3;">public class clsDataprocess</span></li>
<li><span style="background-color: #f3f3f3;">{</span></li>
<li><span style="background-color: #f3f3f3;"> public ResultModel ExecuteSqlStoredProcedureSaveEdit(QUERY2 query, string getOrSaveEdit, out string ERROR)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> ResultModel result = new ResultModel();</span></li>
<li><span style="background-color: #f3f3f3;"> SqlConnection con = getConnection253_Mymun();</span></li>
<li><span style="background-color: #f3f3f3;"> con.Open();</span></li>
<li><span style="background-color: #f3f3f3;"> try</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> SqlCommand command = new SqlCommand();</span></li>
<li><span style="background-color: #f3f3f3;"> command.Connection = con;</span></li>
<li><span style="background-color: #f3f3f3;"> command.CommandType = CommandType.StoredProcedure;</span></li>
<li><span style="background-color: #f3f3f3;"> command.CommandText = query.SQL;</span></li>
<li><span style="background-color: #f3f3f3;"> SqlParameter param = new SqlParameter();</span></li>
<li><span style="background-color: #f3f3f3;"> //param = command.Parameters.Add("@country", SqlDbType.VarChar, 50);</span></li>
<li><span style="background-color: #f3f3f3;"> param.Direction = ParameterDirection.InputOutput;</span></li>
<li><span style="background-color: #f3f3f3;"> //param.Value = "UK";</span></li>
<li><span style="background-color: #f3f3f3;"> if (query.PARAMETER != null)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> foreach (KeyValuePair<string, object> data in query.PARAMETER)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> if (data.Key == "@Message")</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> command.Parameters.Add(data.Key, SqlDbType.NVarChar, 200).Direction = ParameterDirection.Output;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else if (data.Key == "@Result")</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> command.Parameters.Add(data.Key, SqlDbType.Bit, 1).Direction = ParameterDirection.Output;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else if (data.Key == "@ID")</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> command.Parameters.Add(data.Key, SqlDbType.BigInt, 1).Direction = ParameterDirection.Output;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> if (data.Value != null)</span></li>
<li><span style="background-color: #f3f3f3;"> command.Parameters.AddWithValue(data.Key, data.Value);</span></li>
<li><span style="background-color: #f3f3f3;"> else</span></li>
<li><span style="background-color: #f3f3f3;"> command.Parameters.AddWithValue(data.Key, DBNull.Value);</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> if (getOrSaveEdit == "saveedit")</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> result.returnedValueFromQuery = command.ExecuteNonQuery();</span></li>
<li><span style="background-color: #f3f3f3;"> if (command.Parameters.Contains("@ID"))</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> string s = command.Parameters["@ID"].Value.ToString();</span></li>
<li><span style="background-color: #f3f3f3;"> int ID = 0;</span></li>
<li><span style="background-color: #f3f3f3;"> int.TryParse(command.Parameters["@ID"].Value.ToString(), out ID);</span></li>
<li><span style="background-color: #f3f3f3;"> result.Id = ID;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> result.Message = command.Parameters["@Message"].Value.ToString();</span></li>
<li><span style="background-color: #f3f3f3;"> result.Result = Convert.ToBoolean(command.Parameters["@Result"].Value.ToString());</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else if (getOrSaveEdit == "get")</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> SqlDataReader dr = command.ExecuteReader();</span></li>
<li><span style="background-color: #f3f3f3;"> ERROR = String.Empty;</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> ArrayList myArryList = new ArrayList();</span></li>
<li><span style="background-color: #f3f3f3;"> //dr.Read(); </span></li>
<li><span style="background-color: #f3f3f3;"> var dt = new DataTable();</span></li>
<li><span style="background-color: #f3f3f3;"> bool FlagDataRead = false;</span></li>
<li><span style="background-color: #f3f3f3;"> while (dr.Read())</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> FlagDataRead = true;</span></li>
<li><span style="background-color: #f3f3f3;"> dt.Load(dr);</span></li>
<li><span style="background-color: #f3f3f3;"> myArryList.Add(dt);</span></li>
<li><span style="background-color: #f3f3f3;"> result.DtTable = dt;</span></li>
<li><span style="background-color: #f3f3f3;"> result.Result = Convert.ToBoolean(command.Parameters["@Result"].Value.ToString());</span></li>
<li><span style="background-color: #f3f3f3;"> result.Message = command.Parameters["@Message"].Value.ToString();</span></li>
<li><span style="background-color: #f3f3f3;"> if (!dr.IsClosed)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> continue;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> break;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> if (!FlagDataRead)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> </span></li>
<li><span style="background-color: #f3f3f3;"> dr.NextResult();</span></li>
<li><span style="background-color: #f3f3f3;"> result.Result = Convert.ToBoolean(command.Parameters["@Result"].Value.ToString());</span></li>
<li><span style="background-color: #f3f3f3;"> result.Message = command.Parameters["@Message"].Value.ToString(); </span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> ERROR = String.Empty;</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> catch (SqlException ex)</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> ERROR = ex.Message.ToString();</span></li>
<li><span style="background-color: #f3f3f3;"> result.Message = ex.Message.ToString();</span></li>
<li><span style="background-color: #f3f3f3;"> result.Result = false;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> finally</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> con.Close();</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> return result;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;">// Get Connction</span></li>
<li><span style="background-color: #f3f3f3;">public SqlConnection getConnection253_Mymun()</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> //string connStr = @"data source=(local);database=DBL_Group;uid=sa;password=dblgroup";</span></li>
<li><span style="background-color: #f3f3f3;"> //string connStr = @"data source=(local);database=ProjectInfoDB;Connection Timeout=3000;Integrated Security=True";</span></li>
<li><span style="background-color: #f3f3f3;"> //string connStr = @"data source=192.168.153.208;database=ProjectInfoDB;uid=sa;password=dbl1234";</span></li>
<li><span style="background-color: #f3f3f3;"> //string connStr = @"data source=MISDEVELOPER\SQL14;database=ProjectInfoDB;uid=sa;password=logon";</span></li>
<li><span style="background-color: #f3f3f3;"> string connStr = @"data source=192.168.13.253;database=ProjectInfoDB;uid=sa;password=DbL123"; // live server</span></li>
<li><span style="background-color: #f3f3f3;"> SqlConnection conn = new SqlConnection(connStr);</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> return conn;</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> </span></li>
<li><span style="background-color: #f3f3f3;">}</span></li>
</ol>
<div>
<br /></div>
</div>
<div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;">public class QUERY2</span></li>
<li><span style="background-color: #f3f3f3;">{</span></li>
<li><span style="background-color: #f3f3f3;"> public string SQL { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public Dictionary<string, object> PARAMETER { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public Dictionary<string, byte[]> BYTEPARAMETER { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;">}</span></li>
</ol>
</div>
</div>
<div>
<br />
<br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;">public class ResultModel</span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> public int Id { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public int returnedValueFromQuery { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public string Message { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public bool Result { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public DataTable DtTable { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> public ArrayList MyDataList { get; set; }</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
</ol>
<br />
<br />
<br />
<ol style="text-align: left;">
<li> <span style="background-color: #f3f3f3;"> public class LDNo </span></li>
<li><span style="background-color: #f3f3f3;"> {</span></li>
<li><span style="background-color: #f3f3f3;"> public Int64 LdNo { get; set; } </span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
</ol>
<br />
<div>
<br /></div>
In Database server</div>
<div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;">USE [ProjectInfoDB]</span></li>
<li><span style="background-color: #f3f3f3;">GO</span></li>
<li><span style="background-color: #f3f3f3;">/****** Object: StoredProcedure [dbo].[SPROC_GET_tblDyesForecastingHead_LDNO] Script Date: 11/1/2018 1:08:11 PM ******/</span></li>
<li><span style="background-color: #f3f3f3;">SET ANSI_NULLS ON</span></li>
<li><span style="background-color: #f3f3f3;">GO</span></li>
<li><span style="background-color: #f3f3f3;">SET QUOTED_IDENTIFIER ON</span></li>
<li><span style="background-color: #f3f3f3;">GO</span></li>
<li><span style="background-color: #f3f3f3;">-- =============================================</span></li>
<li><span style="background-color: #f3f3f3;">-- Author:<span style="white-space: pre;"> </span><Muhammad Ashikuzzaman,,Name></span></li>
<li><span style="background-color: #f3f3f3;">-- Create date: <14-08-2018,,></span></li>
<li><span style="background-color: #f3f3f3;">-- Edit date: < ,,></span></li>
<li><span style="background-color: #f3f3f3;">-- Description:<span style="white-space: pre;"> </span><Initial server: 192.168.153.208 ,,></span></li>
<li><span style="background-color: #f3f3f3;">-- =============================================</span></li>
<li><span style="background-color: #f3f3f3;"> ALTER PROCEDURE [dbo].[SPROC_GET_tblDyesForecastingHead_LDNO] </span></li>
<li><span style="background-color: #f3f3f3;"> @LDNO bigint = null, </span></li>
<li><span style="background-color: #f3f3f3;"> @Result bit =1 out ,</span></li>
<li><span style="background-color: #f3f3f3;"> @Message nvarchar(200) = 'ok' out </span></li>
<li><span style="background-color: #f3f3f3;"> </span></li>
<li><span style="background-color: #f3f3f3;"> AS</span></li>
<li><span style="background-color: #f3f3f3;">BEGIN</span></li>
<li><span style="background-color: #f3f3f3;"> </span></li>
<li><span style="background-color: #f3f3f3;">SET NOCOUNT ON;</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;">--select top 50 CommonId_For_ForeCastingDetails, DyeingPart, DyesID from dbo.tblDyesForecastingDetail</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> select DISTINCT LDNO from dbo.tblDyesForecastingHead </span></li>
<li><span style="background-color: #f3f3f3;"> where Convert(nvarchar(50), LDNO) like '%'+ Convert(nvarchar(50), ISNULL(@LDNO, LDNO) ) +'%'</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> --select top 50 CommonId_For_ForeCastingDetails, DyeingPart, DyesID from dbo.tblDyesForecastingDetail</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> If (@@ERROR<>0)</span></li>
<li><span style="background-color: #f3f3f3;">Begin</span></li>
<li><span style="background-color: #f3f3f3;">set @Result = 0</span></li>
<li><span style="background-color: #f3f3f3;">set @Message = 'Failed to Retrieve, Try Again'</span></li>
<li><span style="background-color: #f3f3f3;">End</span></li>
<li><span style="background-color: #f3f3f3;">Else</span></li>
<li><span style="background-color: #f3f3f3;">BEGIN</span></li>
<li><span style="background-color: #f3f3f3;"> <span style="white-space: pre;"> </span>set @Result = 1</span></li>
<li><span style="background-color: #f3f3f3;"> <span style="white-space: pre;"> </span>set @Message = 'Data was Retrieved successfully'</span></li>
<li><span style="background-color: #f3f3f3;">END</span></li>
<li><span style="background-color: #f3f3f3;">END</span></li>
</ol>
</div>
<div>
<br /></div>
</div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-27902500235632397552018-10-18T14:42:00.002+06:002018-11-03T11:11:14.533+06:00Programming Or Algorithms Snippet<div dir="ltr" style="text-align: left;" trbidi="on">
<b>1. Swap value of 2 variable with out using any third variable.</b><br />
Suppose<br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #eeeeee;"> a= 5</span></li>
<li><span style="background-color: #eeeeee;"> b = 7</span></li>
<li><span style="background-color: #eeeeee;"> a = a + b; = 12;</span></li>
<li><span style="background-color: #eeeeee;"> b = a - b ; = 5;</span></li>
<li><span style="background-color: #eeeeee;"> a = a -b; = 7</span></li>
</ol>
<br />
You can also swap two equal length array with out using any temporary third variable by looping and traversing the arrays. </div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-76392853880433495172018-10-09T15:42:00.002+06:002018-12-27T09:44:04.849+06:00C# Snippet<div dir="ltr" style="text-align: left;" trbidi="on">
<b><br /></b>
<b>1. Formatting Date-time: </b>string.Format("{0:dd/MM/yy}", DateTime.Today)<br />
<b>2. Storing List Data in ViewBag and retrieve the List Data in View Or Getting List Data From ViewBag :</b><br />
<div style="text-align: left;">
<br />
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;"><b>3. If you want to pass multiple different list in a View from ASP .Net MVC Controller Action How can you pass it?</b></span></span></div>
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">Answer: </span></span></div>
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">In Action: </span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;"> </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">ViewBag.MyClassList </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">= new </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">List<MyClass>()</span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;"> ;</span></div>
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;"> List<MyClass> </span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">MyClassList </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">= ViewBag.</span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">MyClassList </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">as List<</span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px; white-space: normal;">MyClass</span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">>;</span></span></div>
<i><br /></i><i>Returning JSON Data From Server To Client :: </i></div>
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;"> var data = obj_dal.LoadAllProductCode(TKTCode, "1", allMenu.User.USER_ID.ToString()); </span></li>
<li><span style="background-color: #f3f3f3;"> var MaxJson = Json(new { ListProductCode = data});</span></li>
<li><span style="background-color: #f3f3f3;"> MaxJson.MaxJsonLength = 999999999;</span></li>
<li><span style="background-color: #f3f3f3;"> return MaxJson;</span></li>
</ol>
<i>Or</i><br />
<ol style="text-align: left;">
<li><i style="background-color: #f3f3f3;">var MaxJson = Json(new { ListOrderBooking = obj_dal.LoadOrderBookingDL(OrderNo, allMenu.User.EMPLOYEE_ID.ToString()) });</i></li>
<li><i style="background-color: #f3f3f3;">MaxJson.MaxJsonLength = 999999999;</i></li>
<li><i style="background-color: #f3f3f3;">return MaxJson;</i></li>
</ol>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-11964775342514670172018-10-09T12:01:00.000+06:002019-04-30T12:16:15.256+06:00SQL Snippet<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
</div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"></span><br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;">Select multiple columns from a subquery in Select Statement with SQL Server Or Use OF Outer Apply</span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<ol style="text-align: left;"><span style="font-family: "georgia" , "times new roman" , serif;">
<li><span style="background-color: #cccccc;">SELECT t1.ID, t1.fck, t1.f1, t3.f2, t3.f3</span></li>
<li><span style="background-color: #cccccc;">FROM tbl1 AS t1</span></li>
<li><span style="background-color: #cccccc;">OUTER APPLY (</span></li>
<li><span style="background-color: #cccccc;">SELECT f2, f3 </span></li>
<li><span style="background-color: #cccccc;">FROM tbl2 AS t2 </span></li>
<li><span style="background-color: #cccccc;">WHERE t2.ID = t1.fck) AS t3</span></li>
</span></ol>
</div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;"><br /></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;">Decaaring table as Variable And Inserting In it:</span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<ol style="text-align: left;"><span style="font-family: "georgia" , "times new roman" , serif;">
<li><span style="background-color: #cccccc;">declare @listOfTablesArrangementIDs table (id int); </span></li>
<li><span style="background-color: #cccccc;">insert @listOfTablesArrangementIDs(id) values(1),(2),(3) </span></li>
<li><span style="background-color: #cccccc;">insert @listOfTablesArrangementIDs(id) values(2027),(20258),(7) </span></li>
<li><span style="background-color: #cccccc;">select * from TablesArrangement where ID NOT IN (select * from @listOfTablesArrangementIDs ) AND AreaCode = 'tst1'</span></li>
</span></ol>
</div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;">Create Trigger</span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<ol style="text-align: left;"><span style="font-family: "georgia" , "times new roman" , serif;">
<li><span style="background-color: #cccccc;"> -- ============================================= </span></li>
<li><span style="background-color: #cccccc;"> -- Author: <Muhammad Ashikuzzaman,,Name> </span></li>
<li><span style="background-color: #cccccc;"> -- Create date: <24-10-2018,,> </span></li>
<li><span style="background-color: #cccccc;"> -- Edit date: <14-08-2018, > </span></li>
<li><span style="background-color: #cccccc;"> -- Description: <Initial server: 192.168.153.208 > </span></li>
<li><span style="background-color: #cccccc;"> -- ============================================= </span></li>
<li><span style="background-color: #cccccc;"> CREATE TRIGGER [ccl2].[TRG_TBL_PriceSetup] </span></li>
<li><span style="background-color: #cccccc;"> ON [ccl2].[TBL_PriceSetup] </span></li>
<li><span style="background-color: #cccccc;"> AFTER UPDATE </span></li>
<li><span style="background-color: #cccccc;"> AS </span></li>
<li><span style="background-color: #cccccc;"> BEGIN </span></li>
<li><span style="background-color: #cccccc;"> -- SET NOCOUNT ON added to prevent extra result sets from </span></li>
<li><span style="background-color: #cccccc;"> -- interfering with SELECT statements. </span></li>
<li><span style="background-color: #cccccc;"> SET NOCOUNT ON; </span></li>
<li><span style="background-color: #cccccc;"> --Declare @PriceID bigint </span></li>
<li><span style="background-color: #cccccc;"> --Select @PriceID = PriceID From deleted </span></li>
<li><span style="background-color: #cccccc;"> </span></li>
<li><span style="background-color: #cccccc;"> insert into ccl2.ARC_PriceSetup (PriceID,Price) </span></li>
<li><span style="background-color: #cccccc;"> select PriceID,Price from deleted </span></li>
<li><span style="background-color: #cccccc;"> END</span></li>
</span></ol>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;">Create A Stored Procedure</span></span></div>
</div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"></span><br />
<div>
<ol style="text-align: left;"><span style="font-family: "georgia" , "times new roman" , serif;">
<li><span style="background-color: #cccccc;">USE [ProjectInfoDB]</span></li>
<li><span style="background-color: #cccccc;">GO</span></li>
<li><span style="background-color: #cccccc;">/****** Object: StoredProcedure [dbo].[SPROC_GET_tblDyesForecastingHead_LDNO] Script Date: 11/1/2018 12:44:51 PM ******/</span></li>
<li><span style="background-color: #cccccc;">SET ANSI_NULLS ON</span></li>
<li><span style="background-color: #cccccc;">GO</span></li>
<li><span style="background-color: #cccccc;">SET QUOTED_IDENTIFIER ON</span></li>
<li><span style="background-color: #cccccc;">GO</span></li>
<li><span style="background-color: #cccccc;">-- =============================================</span></li>
<li><span style="background-color: #cccccc;">-- Author:<span style="white-space: pre;"> </span><Muhammad Ashikuzzaman,,Name></span></li>
<li><span style="background-color: #cccccc;">-- Create date: <14-08-2018,,></span></li>
<li><span style="background-color: #cccccc;">-- Edit date: < ,,></span></li>
<li><span style="background-color: #cccccc;">-- Description:<span style="white-space: pre;"> </span><Initial server: 192.168.153.208 ,,></span></li>
<li><span style="background-color: #cccccc;">-- =============================================</span></li>
<li><span style="background-color: #cccccc;"> ALTER PROCEDURE [dbo].[SPROC_GET_tblDyesForecastingHead_LDNO] </span></li>
<li><span style="background-color: #cccccc;"> @LDNO bigint = null, </span></li>
<li><span style="background-color: #cccccc;"> @Result bit =1 out ,</span></li>
<li><span style="background-color: #cccccc;"> @Message nvarchar(200) = 'ok' out </span></li>
<li><span style="background-color: #cccccc;"> </span></li>
<li><span style="background-color: #cccccc;"> AS</span></li>
<li><span style="background-color: #cccccc;">BEGIN</span></li>
<li><span style="background-color: #cccccc;"> </span></li>
<li><span style="background-color: #cccccc;">SET NOCOUNT ON;</span></li>
<li><span style="background-color: #cccccc;"><br /></span></li>
<li><span style="background-color: #cccccc;">--select top 50 CommonId_For_ForeCastingDetails, DyeingPart, DyesID from dbo.tblDyesForecastingDetail</span></li>
<li><span style="background-color: #cccccc;"><br /></span></li>
<li><span style="background-color: #cccccc;"> select DISTINCT LDNO from dbo.tblDyesForecastingHead </span></li>
<li><span style="background-color: #cccccc;"> where Convert(nvarchar(50), LDNO) like '%'+ Convert(nvarchar(50), ISNULL(@LDNO, LDNO) ) +'%'</span></li>
<li><span style="background-color: #cccccc;"><br /></span></li>
<li><span style="background-color: #cccccc;"> --select top 50 CommonId_For_ForeCastingDetails, DyeingPart, DyesID from dbo.tblDyesForecastingDetail</span></li>
<li><span style="background-color: #cccccc;"><br /></span></li>
<li><span style="background-color: #cccccc;"> If (@@ERROR<>0)</span></li>
<li><span style="background-color: #cccccc;">Begin</span></li>
<li><span style="background-color: #cccccc;">set @Result = 0</span></li>
<li><span style="background-color: #cccccc;">set @Message = 'Failed to Retrieve, Try Again'</span></li>
<li><span style="background-color: #cccccc;">End</span></li>
<li><span style="background-color: #cccccc;">Else</span></li>
<li><span style="background-color: #cccccc;">BEGIN</span></li>
<li><span style="background-color: #cccccc;"> <span style="white-space: pre;"> </span>set @Result = 1</span></li>
<li><span style="background-color: #cccccc;"> <span style="white-space: pre;"> </span>set @Message = 'Data was Retrieved successfully'</span></li>
<li><span style="background-color: #cccccc;">END</span></li>
<li><span style="background-color: #cccccc;">END</span></li>
</span></ol>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="background-color: #38761d;">Create a Cursor and traverse selected row through this cursor</b></span><br />
<br />
<div style="text-align: left;">
</div>
<ol>
<li><span style="background-color: #eeeeee;">declare @Test table (Id int, Col1 int, Col2 int, Col3 int)</span></li>
<li><span style="background-color: #eeeeee;">insert into @Test (Id , Col1 , Col2 , Col3 )</span></li>
<li><span style="background-color: #eeeeee;">values (1 , 1 , 1 , 40 ),</span></li>
<li><span style="background-color: #eeeeee;"> (2 , 1 , 1 , 41 ), </span></li>
<li><span style="background-color: #eeeeee;"> (3 , 1 , 1 , 41 ),</span></li>
<li><span style="background-color: #eeeeee;"> (4 , 1 , 1 , 42 ),</span></li>
<li><span style="background-color: #eeeeee;"> (5 , 1 , 2 , 40 ),</span></li>
<li><span style="background-color: #eeeeee;"> (6 , 1 , 3 , 41 ) </span></li>
<li><span style="background-color: #eeeeee;"> </span></li>
<li><span style="background-color: #eeeeee;"> declare @Id bigint </span></li>
<li><span style="background-color: #eeeeee;"> declare @col1 int </span></li>
<li><span style="background-color: #eeeeee;"> declare @col2 int </span></li>
<li><span style="background-color: #eeeeee;"> declare @col3 int </span></li>
<li><span style="background-color: #eeeeee;"> declare @CtnInfo cursor </span></li>
<li><span style="background-color: #eeeeee;"> set @CtnInfo = CURSOR FOR </span></li>
<li><span style="background-color: #eeeeee;"> SELECT Id, COL1, COL2, COL3 FROM @Test </span></li>
<li><span style="background-color: #eeeeee;"> declare @tblBody nvarchar(max) </span></li>
<li><span style="background-color: #eeeeee;"> set @tblBody= 'Start : ' </span></li>
<li><span style="background-color: #eeeeee;"> OPEN @CtnInfo </span></li>
<li><span style="background-color: #eeeeee;"> SELECT @@FETCH_STATUS as FETCH_STATUS1 </span></li>
<li><span style="background-color: #eeeeee;"> WHILE 1 = 1 </span></li>
<li><span style="background-color: #eeeeee;"> BEGIN </span></li>
<li><span style="background-color: #eeeeee;"> FETCH NEXT FROM @CtnInfo INTO</span></li>
<li><span style="background-color: #eeeeee;"> @id, @col1, @col2, @col3 </span></li>
<li><span style="background-color: #eeeeee;"><br /></span></li>
<li><span style="background-color: #eeeeee;"> IF @@FETCH_STATUS = -1 </span></li>
<li><span style="background-color: #eeeeee;"> Break </span></li>
<li><span style="background-color: #eeeeee;"> Else </span></li>
<li><span style="background-color: #eeeeee;"> SET @tblBody=@tblBody+ ', ' + convert(nvarchar(20), @Id) </span></li>
<li><span style="background-color: #eeeeee;"> END </span></li>
<li><span style="background-color: #eeeeee;"> CLOSE @CtnInfo </span></li>
<li><span style="background-color: #eeeeee;"> DEALLOCATE @CtnInfo </span></li>
<li><span style="background-color: #eeeeee;"> SELECT @@FETCH_STATUS as FETCH_STATUS2 </span></li>
<li><span style="background-color: #eeeeee;"> select @tblBody as TotalSelecteddata</span></li>
</ol>
</div>
<div>
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="white-space: pre;"> </span> </span></div>
<div>
<br /></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="background-color: #38761d;"><br /></b></span></div>
</div>
<div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="background-color: #93c47d;">Understanding partition by </b><span style="background-color: #93c47d; white-space: pre;"> </span></span></div>
</div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #d9ead3;">-- My understanding partition by will count seqs increasingly until partition by column value remain unchanged</span></li>
<li><span style="background-color: #f3f3f3;"> declare @Test table (id int, Col1 int, Col2 int, Col3 int)</span></li>
<li><span style="background-color: #f3f3f3;"> insert into @Test (id , Col1 , Col2 , Col3 )</span></li>
<li><span style="background-color: #f3f3f3;"> values (1 , 1 , 1 , 40 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (1 , 1 , 1 , 41 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (1 , 1 , 1 , 41 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (1 , 1 , 1 , 42 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (1 , 1 , 2 , 40 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (1 , 1 , 3 , 41 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (1 , 1 , 3 , 41 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (2 , 1 , 4 , 43 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (2 , 2 , 1 , 43 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (2 , 2 , 1 , 44 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (2 , 2 , 2 , 44 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (2 , 2 , 3 , 44 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (2 , 2 , 4 , 45 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (3 , 3 , 1 , 46 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (4 , 3 , 2 , 46 ),</span></li>
<li><span style="background-color: #f3f3f3;"> (5 , 3 , 2 , 47 )</span></li>
<li><span style="background-color: #d9ead3;"> -- Normal Group BY</span></li>
<li><span style="background-color: #f3f3f3;"> select col1, col2 , count(Col1) Col1Count, count(Col2) Col2Count</span></li>
<li><span style="background-color: #f3f3f3;"> from @Test</span></li>
<li><span style="background-color: #f3f3f3;"> group by col1, col2 order by Col1</span></li>
<li><br /></li>
<li><span style="background-color: #d9ead3;"> --partition BY With Group BY </span></li>
<li><span style="background-color: #d9ead3;"> -- My understanding partition by will count seqs increasingly untill partition by column value remain unchanged </span></li>
<li><span style="background-color: #f3f3f3;"> select col1, col2, col3, count(col3)Col3Count, row_number()</span></li>
<li><span style="background-color: #f3f3f3;"> over (Partition BY col1 , col2</span></li>
<li><span style="background-color: #f3f3f3;"> order By col1 ) seqs </span></li>
<li><span style="background-color: #f3f3f3;"> from @Test</span></li>
<li><span style="background-color: #f3f3f3;"> group by col1, col2, col3</span></li>
<li><span style="background-color: #f3f3f3;"> order by col1, col2</span></li>
</ol>
</div>
<span style="font-family: "georgia" , "times new roman" , serif;"></span><br />
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;"><b>Remove Time portion from a date time</b></span></span><br />
<span style="font-family: "georgia" , "times new roman" , serif;">select DATEADD(DD, DATEDIFF(dd, 0, '2018-12-25 12:25:00' ), 0)-- will remove time portion from the date</span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: #6aa84f;"></span><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"> select DATEDIFF(dd, 0, '2018-12-25 12:25:00' ) here 2nd parameter 0 means '<span style="background-color: white; color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">1900-01-01'</span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span>
<br />
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="background-color: #6aa84f;">Send Mail By sp_send_dbmail stored procedure</b></span><br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> </span><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> declare @tblBody nvarchar(max) </span></span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> set @tblBody='<style type="text/css"> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> #detail_table {</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> border: 2px solid gray; </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> border-collapse: collapse; </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> } </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> #one td<span style="white-space: pre;"> </span>{ border: 1px solid #00000; } </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> #detail_table td , #detail_table th {</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>text-align: center;</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> border: 1px solid gray; </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>} </style>'</span></li>
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> set @tblBody=@tblBody+'<div align="center" style=" border:0px solid #000000; width: 98%;height: 95%;padding: 8px;padding-top:0px; margin: 5px;"> </span><div align="center" style="font-weight: bold;font-size: 22px;"> HamdoonSoft Complex </div> <div style="clear:both;padding: 7px;"></div> <div align="center" style="font-weight: bold;font-size: 16px; width:230px; border-bottom: 1px solid #222;position:absolute; left:42%"> Hamdoon Soft Notification </div> <div style="clear:both;"></div> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span><div align="left" style="font-size:12px;border:0px solid #000000; width: 99%;height: 100%;padding: 20px;padding-top:0px;"> </span></li>
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small; white-space: pre;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"><div align="left" style="margin-top:35px;"><b> Date: </b> '+ convert( nvarchar(30) , GETDATE() )+'</div> </span></span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span><div align="left" style="margin-top:8px;">To, </div> </span></li>
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span><div align="left" style="margin-top:10px; margin-left:20px;">DGM/ AGM/ Sr. Manager</div> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small; white-space: pre;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"><div align="left" style="margin-top:5px; margin-left:20px; height: 30px; "> Department: '+ '@ResponsibleDepartment' +'</div> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small; white-space: pre;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"><div align="left" style="margin-top:5px; margin-left:22px;">Subject: Problematic fabric information from off line Inspection to problamatic department.</div> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small; white-space: pre;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"><div align="left" style="margin-top:18px;">Dear Sir</div> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small; white-space: pre;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"><div align="left" style="margin-top:15px; margin-left:20px;">This is to inform you that, we found below batch problematic during 100% inspection in off line quality zone.</div> </span></span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> <div align="left" style="margin-top:8px;">Details :- </div> </span></li>
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> <span style="white-space: pre;"> </span> <br/></span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"> <table id="detail_table" style="margin-top:20px; margin-right:.5%; width:99.5%; " > </span> <tr id="one"> <th>C1 </th> <th>C2 </th> <th>C3 </th> <th>C4 </th> <th>C5</th> </tr> '</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>DECLARE @c1 <span style="white-space: pre;"> </span> NVARCHAR(40)</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>DECLARE @c2<span style="white-space: pre;"> </span> <span style="white-space: pre;"> </span> NVARCHAR(40)</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>DECLARE @c3<span style="white-space: pre;"> </span> NVARCHAR(40)</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>DECLARE @c4 <span style="white-space: pre;"> </span> NVARCHAR(40)</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>DECLARE @c5<span style="white-space: pre;"> </span> NVARCHAR(40) </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> declare @CtnInfo cursor </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> set @CtnInfo = CURSOR FOR </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> SELECT * from (values (1, 2, 3, 4, 5) , (1, 2, 3, 4, 5) ) </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> t21 (c1, c2, c3, c4, c5)</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> OPEN @CtnInfo </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> WHILE 1 = 1 </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> BEGIN </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> FETCH NEXT FROM @CtnInfo INTO</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> @c1, @c2, @c3, @c4, @c5 <span style="white-space: pre;"> </span></span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> IF @@FETCH_STATUS = -1 </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> Break </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> Else </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> <span style="white-space: pre;"> </span>set @tblBody=@tblBody+' <tr > </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> <span style="white-space: pre;"> </span> <span style="white-space: pre;"> </span> <span style="white-space: pre;"> </span> <td align="center" > '+@c1+' </td> <td align="center" > '+@c2 +' </td> <td align="center" > '+@c3 +' </td> <td align="center" > '+@c4+' </td><td align="center" > '+@c5+'</td> </tr> '</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> END </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> CLOSE @CtnInfo </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> DEALLOCATE @CtnInfo </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> SELECT @@FETCH_STATUS as FETCH_STATUS2 </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> select @tblBody as TotalSelecteddata</span></li>
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> set @tblBody=@tblBody+' </table> <br/> </span><div style="position: relative!important;left: -530px!important; top: 10px!important; font-weight:bold; font-family:Verdana, Arial, Helvetica, sans-serif;"> </div> </div> </div>'</span></li>
<li><span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> Set @tblBody=@tblBody+'<div style="Font-weight:bold; margin-top:30px;font-family:Verdana, Arial, Helvetica, sans-serif; "> Best Regards </div> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small; white-space: pre;"> </span><span style="font-family: georgia, "times new roman", serif; font-size: x-small;"><div style=" Font-weight:bold; margin-top:10px;font-family:Verdana, Arial, Helvetica, sans-serif; "> MIS Department </div>'</span></span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>declare @recipient nvarchar(max) = 'ashikcse20@gmail.com;'</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>declare @copy_recipient nvarchar(max) = ' ashikcse20@gmail.com;'</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>EXEC msdb.dbo.sp_send_dbmail </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span> </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>@profile_name = 'MIS-MTL', </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>@recipients = @recipient, </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>@copy_recipients= @copy_recipient , </span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>@body = @tblBody ,</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>@subject = 'Automatic Mail Sending',</span></li>
<li><span style="background-color: #f3f3f3; font-family: "georgia" , "times new roman" , serif; font-size: x-small;"><span style="white-space: pre;"> </span>@body_format = 'HTML' </span></li>
</ol>
<br />
<span style="background-color: #f3f3f3;"><span style="font-family: "georgia" , "times new roman" , serif;"></span></span><br /></div>
<span style="font-family: "georgia" , "times new roman" , serif;">
</span></div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-90006015020935877792018-09-11T14:50:00.001+06:002020-05-13T08:01:42.255+06:00ASP .NET MVC 5 Multi Tenant Example With New Project (Single Different Database For Per Tenant Using Entity Framework)<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="background-color: white; box-sizing: border-box; color: forestgreen; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 500; line-height: 1.1; margin-bottom: 10px; margin-top: 10px;">
In the name of Allah, Most Gracious, Most Merciful بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم</h4>
<h5 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 21px; line-height: 38px; margin-bottom: 10px; margin-top: 10px;">
<span style="font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-weight: 500;">
Welcome to Hamdoon Soft Fun: </span><br style="box-sizing: border-box;" /><span style="font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-weight: 500;">Here I just use this ASP .Net MVC5 application as Multitenant application with single database per tenant </span><br style="box-sizing: border-box;" /><span style="font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-weight: 500;">I am doing it from Windows 10 .</span></h5>
<h3 style="text-align: center;">
<span style="font-family: "verdana" , sans-serif;">All code and supports can achieved from here <a href="https://github.com/ashikcse20/ASP-MVC5-MULTI-TENANT-REPOSITORY">https://github.com/ashikcse20</a> </span></h3>
<h5 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 21px; font-weight: 500; line-height: 38px; margin-bottom: 10px; margin-top: 10px;">
And video is here : </h5>
<div class="separator" style="clear: both; text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="420" src="https://www.youtube.com/embed/eHwyCdB6Dr8" width="560"></iframe></div>
<h5 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 21px; font-weight: 500; line-height: 38px; margin-bottom: 10px; margin-top: 10px;">
</h5>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="background-color: white; box-sizing: border-box; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 14px; line-height: 25px;"><b style="box-sizing: border-box;">A. Technical Steps:</b> <br style="box-sizing: border-box;" />1. Go to C:\Windows\System32\drivers\etc open hosts file with Sublime Text or Notepad with administarator mode. find # 127.0.0.1 localhost and replace it by the following instruction. <i style="box-sizing: border-box;"><br style="box-sizing: border-box;" /># In hosts file a line starting with # is a comment line #The below line is an active line which make many alias of local host (remove the #) 127.0.0.1 localhost hamdoonsoft.com tenant1.hamdoonsoft.com tenant2.hamdoonsoft.com tenant3.hamdoonsoft.com </i></span><br />
<span style="background-color: white; box-sizing: border-box; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 14px; line-height: 25px;"><i></i></span><br />
<a name='more'></a><span style="background-color: white; box-sizing: border-box; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 14px; line-height: 25px;"><i><br style="box-sizing: border-box;" /></i>2. Then install IIS from Turn Windows Features On or Off<br style="box-sizing: border-box;" />3. From IIS Create a site and map your site to the physical publish folder of the project. <br style="box-sizing: border-box;" />4. Add Bindings from IIS for hamdoonsoft.com tenant1.hamdoonsoft.com tenant2.hamdoonsoft.com tenant3.hamdoonsoft.com .</span><br />
<span style="background-color: white; box-sizing: border-box; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 14px; line-height: 25px;"><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><b style="box-sizing: border-box;">B. Coding Steps: </b><br style="box-sizing: border-box;" />1. We need to make change in RouteConfig.Cs of App_Start folder to support multiple tenant. Comment the default routeMap and Change RouteConfig.Cs as shown in the video. I just follow steps from <a href="http://blog.gaxion.com/2017/05/how-to-implement-multi-tenancy-with.html" style="box-sizing: border-box; color: #428bca; text-decoration-line: none;">http://blog.gaxion.com/2017/05/how-to-implement-multi-tenancy-with.html</a> here for configuring route<br style="box-sizing: border-box;" />2. There are some simple tricks for selecting different database for different tenant. To see that download the code or see this tutorial patiently.</span><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 14px;"></span></div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-57318351323042953222018-08-16T15:54:00.001+06:002019-01-07T16:04:20.432+06:00Jquery Code Snippet<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 25px; text-align: left;">
<span style="background-color: #fce5cd;"><b>Use Of :not(), :not, :nth-child()</b></span><br />
<span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;">Note that since JavaScript arrays use </span><em style="background-color: white; box-sizing: border-box; color: #6d6d6d; font-family: "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif; font-size: 15px;">0-based indexing</em><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;">, these selectors reflect that fact. This is why </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">$( ".myclass:eq(1)" )</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> selects the second element in the document with the class myclass, rather than the first. In contrast, </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">:nth-child(n)</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;">uses </span><em style="background-color: white; box-sizing: border-box; color: #6d6d6d; font-family: "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif; font-size: 15px;">1-based indexing</em><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> to conform to the CSS specification.</span><br />
<span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;">ecause jQuery's implementation of </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">:nth-</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> selectors is strictly derived from the CSS specification, the value of </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">n</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> is "1-indexed", meaning that the counting starts at 1. For other selector expressions such as </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">:eq()</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> or </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">:even</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> jQuery follows JavaScript's "0-indexed" counting. Given a single </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;"><ul></code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> containing two </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;"><li></code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;">s, </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">$( "li:nth-child(1)" )</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> selects the first </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;"><li></code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> while </span><code style="background-color: rgba(0, 0, 0, 0.1); border-radius: 3px; box-sizing: border-box; color: #333333; font-family: source-code-pro, Consolas, monospace !important; font-size: 13px; line-height: 16px; padding: 0px 3px; white-space: pre-wrap; word-wrap: break-word;">$( "li:eq(1)" )</code><span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif; font-size: 15px;"> selects the second.</span><br />
<span style="background-color: white; font-size: 15px;"><span style="color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif;"><a href="https://api.jquery.com/nth-child-selector/">https://api.jquery.com/nth-child-selector/</a> </span></span><br />
<span style="background-color: white; font-size: 15px;"><span style="color: #333333; font-family: "helvetica neue" , "helveticaneue" , "helvetica" , "arial" , sans-serif;"><a href="https://api.jquery.com/eq-selector/">https://api.jquery.com/eq-selector/</a> </span></span><br />
<span style="background-color: #fff2cc;">$("#table4 tr:not(:last,:first,#table4-first-tr, :nth-child(2) )").remove(); </span><br />
<span style="background-color: #fff2cc;"></span>
<br />
<h3 class="r" style="color: #222222; font-family: arial, sans-serif; font-size: 18px; font-weight: normal; margin: 0px; overflow: hidden; padding: 0px; text-overflow: ellipsis; white-space: nowrap;">
<span style="background-color: #fff2cc;">Check If A Checkbox Is Checked With jQuery </span></h3>
<div>
</div>
<div>
<span style="background-color: #fff2cc;"><b>// Trigger checkbox click on it's parent click</b></span></div>
<div>
<div>
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;">$("body").on("click", ".checkbox-td", function (event) {</span></li>
<li><span style="background-color: #cccccc;"> debugger;</span></li>
<li><span style="background-color: #cccccc;"> $(':checkbox', this).trigger('click');</span></li>
<li><span style="background-color: #cccccc;"> event.stopPropagation(); </span></li>
<li><span style="background-color: #cccccc;"> }); </span></li>
</ol>
</div>
<div style="background-color: #fff2cc;">
<br /></div>
<div>
<b style="background-color: white;">If checkbox is checked or not</b></div>
<div>
<div>
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;">if (jQuery(this).is(':checked')) { </span>}</li>
<li><span style="background-color: #cccccc;">else if (jQuery(this).is(':not(:checked)')) { </span>}</li>
</ol>
</div>
<div>
<span style="background-color: #93c47d;">When testing local server ajax was working fine. But when put in http://192.168.153.253/ERP/ ajax wasn't working.</span><br />
get that ERP was added and for the shake a base url is needed.<br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"><script type="text/javascript"> </span></li>
<li><span style="background-color: #cccccc;"> var base = '@Url.Content("~/")';</span></li>
<li><span style="background-color: #cccccc;"></script></span></li>
</ol>
<br />
<b>jQuery track when #Mymodal is colosed</b><br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;">$('#myModal').on('hidden.bs.modal', function (e) {</span>})</li>
<li><b style="background-color: #cccccc;">jQuery Delaying While Removing/Adding CSS</b></li>
<li><span style="background-color: #cccccc;">setTimeout(function () {</span></li>
<li><span style="background-color: #cccccc;">ClickedTd.css("border", "0px solid green");</span></li>
<li><span style="background-color: #cccccc;">}, 2000);</span></li>
</ol>
<br />
<span style="background-color: #ffe599;">#<b>Remove checkbox with delay one by one: </b> </span>First one work. If I put check box in setTimeout then it will refer $(this) = wind function and checkbox aren't removed<br />
<div style="text-align: left;">
</div>
<ol style="text-align: left;">
<li> <span style="background-color: #cccccc;"> var i = 0;</span></li>
<li><span style="background-color: #cccccc;"> $(".checkbox-td .ckbox:checkbox:not(:disabled)").each(function () {</span></li>
<li><span style="background-color: #cccccc;"> i++;</span></li>
<li><span style="background-color: #cccccc;"> var chkbox = $(this);</span></li>
<li><span style="background-color: #cccccc;"> setTimeout(function () {</span></li>
<li><span style="background-color: #cccccc;"> chkbox.remove();</span></li>
<li><span style="background-color: #cccccc;"> }, 1000 - 100 * i);</span></li>
<li><span style="background-color: #cccccc;"> });</span></li>
<li><span style="background-color: #cccccc;"> i = 0;</span></li>
<li><span style="background-color: #cccccc;"> $(".checkbox-td .ckbox:checkbox:not(:disabled)").each(function () {</span></li>
<li><span style="background-color: #cccccc;"> i++;</span></li>
<li><span style="background-color: #cccccc;"> setTimeout(function () {</span></li>
<li><span style="background-color: #cccccc;"> $(this).remove();</span></li>
<li><span style="background-color: #cccccc;"> }, 1000 - 100 * i);</span></li>
<li><span style="background-color: #cccccc;"> });</span></li>
</ol>
</div>
</div>
</div>
<div>
<h4 style="text-align: left;">
<b style="background-color: #f9cb9c;"># Juquery $.Ajax Jquery Ajax Method </b><b style="background-color: #f9cb9c;"> with object variable as data</b></h4>
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> //dyes_forecasting.ForecastingHead = dyes_forecasting_head_list;</span></li>
<li><span style="background-color: #cccccc;">//dyes_forecasting.DyesRecipe = dyes_recipe_list;</span></li>
<li><span style="background-color: #cccccc;">//var data = "{'model':" + JSON.stringify(dyes_forecasting) + "}";</span></li>
<li><span style="background-color: #cccccc;">function LoadList() {</span></li>
<li><span style="background-color: #cccccc;"> var jdata = PrepearJasonData('filter-item');</span></li>
<li><span style="background-color: #cccccc;"> //alert(JSON.stringify(jdata));</span></li>
<li><span style="background-color: #cccccc;"> WaitMeStart();</span></li>
<li><span style="background-color: #cccccc;"> $.ajax({</span></li>
<li><span style="background-color: #cccccc;"> type: 'POST',</span></li>
<li><span style="background-color: #cccccc;"> url: '/tablessetup/List',</span></li>
<li><span style="background-color: #cccccc;"> contentType: "application/json; charset=utf-8",</span></li>
<li><span style="background-color: #cccccc;"> data: JSON.stringify(jdata),</span></li>
<li><span style="background-color: #cccccc;"> // data: JSON.stringify({ "Ldno": Ldno }),</span></li>
<li><span style="background-color: #cccccc;"> success: function (data) {</span></li>
<li><span style="background-color: #cccccc;"> $('#content-box').html(data);</span></li>
<li><span style="background-color: #cccccc;"> InitForm();</span></li>
<li><span style="background-color: #cccccc;"> InitSortingHeader("content-box");</span></li>
<li><span style="background-color: #cccccc;"> },</span></li>
<li><span style="background-color: #cccccc;"> error: function (e) {</span></li>
<li><span style="background-color: #cccccc;"> //alert(e.responseText);</span></li>
<li><span style="background-color: #cccccc;"> WaitMeStop();</span></li>
<li><span style="background-color: #cccccc;"> // l.stop();</span></li>
<li><span style="background-color: #cccccc;"> alertify.error("Something technical error occurred");</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }).done(function () {</span></li>
<li><span style="background-color: #cccccc;"> WaitMeStop();</span></li>
<li><span style="background-color: #cccccc;"> // l.stop();</span></li>
<li><span style="background-color: #cccccc;"> });</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> </span></li>
</ol>
<span style="background-color: #38761d; color: white;"> Ajax Call To Load Search Data From Server And Get Title Error </span><br />
<ol style="text-align: left;">
<li style="text-align: left;"><span style="background-color: #cccccc;"> $.ajax({</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> type: 'POST',</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> url: base + "Chemical/SearchOrderDetails",</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> contentType: "application/json; charset=utf-8",</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> //data: JSON.stringify(jdata),</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> //data: JSON.stringify({ "Ldno": Ldno }),</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> success: function (data) {</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> if (data.indexOf("No record was found") >= 0) {</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"><br /></span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> IaoCustomizedMessage(data.toString(), "warning", "dark", true, 2500);</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> $("#grid").append("<tr><td colspan='12'>" + data + "</tr></td>");</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> }</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> else {</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"><br /></span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> $("#grid").append(data);</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> ProcesDyesRecipePercantageTableDivVisibility("show");</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> }</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"><br /></span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> },</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> error: function (error) {</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"><br /></span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> if (typeof error.message == "undefined") {</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> var element = $(error.responseText);</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> var message = element.get(1).innerText;</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> IaoCustomizedMessage(message, "error", "dark", true, 8000);</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> }</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> else IaoCustomizedMessage(e.message, "error", "dark", true, 5500);</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"><br /></span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> }</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> }).done(function () {</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;"> IaoCustomizedMessage("Successfully retrieve data from server", "success", true, 1500);</span></li>
<li style="text-align: left;"><span style="background-color: #cccccc;">});</span></li>
</ol>
<ol style="text-align: left;">
</ol>
<div>
<b style="background-color: #f9cb9c;">Juquery $.Ajax Jquery Ajax Method with variable as data </b>For Php Page</div>
<div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> $("body").on("change", "#buyer", function() {</span></li>
<li><span style="background-color: #cccccc;"> console.log("Allahu Akbor");</span></li>
<li><span style="background-color: #cccccc;"> var buyer = $("#buyer").val().trim();</span></li>
<li><span style="background-color: #cccccc;"> var order = $("#order").val().trim();</span></li>
<li><span style="background-color: #cccccc;"> $.ajax({</span></li>
<li><span style="background-color: #cccccc;"> type: 'GET',</span></li>
<li><span style="background-color: #cccccc;"> url: 'GetOrderList.php',</span></li>
<li><span style="background-color: #cccccc;"> contentType: "application/json; charset=utf-8",</span></li>
<li><span style="background-color: #cccccc;"> data: { buyer : buyer, order : order } ,</span></li>
<li><span style="background-color: #cccccc;"> success: function (data) {</span></li>
<li><span style="background-color: #cccccc;"> $('#message').html(data);</span></li>
<li><span style="background-color: #cccccc;"> </span></li>
<li><span style="background-color: #cccccc;"> },</span></li>
<li><span style="background-color: #cccccc;"> error: function (e) { </span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }).done(function () {</span></li>
<li><span style="background-color: #cccccc;"> <span style="white-space: pre;"> </span>console.log("Alhamdulilla"); </span></li>
<li><span style="background-color: #cccccc;"> });</span></li>
<li><span style="background-color: #cccccc;"> });</span></li>
</ol>
<div>
<span style="background-color: #93c47d;"> <b>Iao Customized Message</b></span></div>
</div>
</div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;">IaoCustomizedMessage(data.toString(), "warning", "dark", true, 2500);</span></li>
<li><span style="background-color: #cccccc;"> <link href="@Url.Content("~/Bootstrap/iao-alert.css?_" + DateTime.Now.Ticks)" rel="Stylesheet" /> </span></li>
<li><span style="background-color: #cccccc;"> <script src="@Url.Content("~/Bootstrap/iao-alert.jquery.js?v=" + 1.1)"></script></span></li>
<li><span style="background-color: #cccccc;"> function IaoCustomizedMessage(msg, type, mode, autoHide, alertTime) { // By Muhammad Ashikuzzaman in 2018.10.06</span></li>
<li><span style="background-color: #cccccc;"> if (typeof type == "undefined" || type === "") {</span></li>
<li><span style="background-color: #cccccc;"> type = "notification";</span></li>
<li><span style="background-color: #cccccc;"> } if (typeof autoHide == "undefined" || autoHide === "") {</span></li>
<li><span style="background-color: #cccccc;"> autoHide = true;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> if (typeof alertTime == "undefined" || alertTime === "") {</span></li>
<li><span style="background-color: #cccccc;"> // alertTime = 3000;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> if (typeof mode == "undefined" || mode === "") {</span></li>
<li><span style="background-color: #cccccc;"> mode = "dark";</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> $.iaoAlert({ </span></li>
<li><span style="background-color: #cccccc;"> // default message</span></li>
<li><span style="background-color: #cccccc;"> msg: msg, </span></li>
<li><span style="background-color: #cccccc;"> // or 'success', 'error', 'warning'</span></li>
<li><span style="background-color: #cccccc;"> type: type, //"notification", </span></li>
<li><span style="background-color: #cccccc;"> // or light dark</span></li>
<li><span style="background-color: #cccccc;"> mode: mode, </span></li>
<li><span style="background-color: #cccccc;"> // auto hide true, false</span></li>
<li><span style="background-color: #cccccc;"> //// autoHide: true,</span></li>
<li><span style="background-color: #cccccc;"> autoHide: autoHide, </span></li>
<li><span style="background-color: #cccccc;"> // fade animation speed</span></li>
<li><span style="background-color: #cccccc;"> fadeTime: "2800",</span></li>
<li><span style="background-color: #cccccc;"> // timeout in milliseconds</span></li>
<li><span style="background-color: #cccccc;"> alertTime: alertTime, </span></li>
<li><span style="background-color: #cccccc;"> // shows close button</span></li>
<li><span style="background-color: #cccccc;"> closeButton: true, </span></li>
<li><span style="background-color: #cccccc;"> // close on click</span></li>
<li><span style="background-color: #cccccc;"> closeOnClick: true, </span></li>
<li><span style="background-color: #cccccc;"> // custom position</span></li>
<li><span style="background-color: #cccccc;"> position: 'bottom-right', </span></li>
<li><span style="background-color: #cccccc;"> // fade on hover</span></li>
<li><span style="background-color: #cccccc;"> fadeOnHover: true, </span></li>
<li><span style="background-color: #cccccc;"> // z-index</span></li>
<li><span style="background-color: #cccccc;"> zIndex: '999', </span></li>
<li><span style="background-color: #cccccc;"> // additional CSS class(es)</span></li>
<li><span style="background-color: #cccccc;"> alertClass: '' </span></li>
<li><span style="background-color: #cccccc;"> });</span></li>
<li><span style="background-color: #cccccc;"> } </span></li>
</ol>
<div>
<b style="background-color: #38761d;"><span style="color: white;"> Data Table Related Code Snippet :</span></b></div>
</div>
<div>
<br /></div>
<div>
<b style="background-color: #b6d7a8;"> Reload Datatable after ajax success</b></div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> $('body #quality_control_table').dataTable().fnDestroy();</span></li>
</ol>
<div>
<b style="background-color: #6aa84f;">Detect Shift + Enter key Press or Ctrl + Enter Key Press Or Any key Press</b></div>
</div>
<div>
<div>
<ol style="text-align: left;">
<li><b style="background-color: #6aa84f;"> </b><span style="background-color: #f3f3f3;">$(document).keydown(function (e) {</span></li>
<li><span style="background-color: #f3f3f3;"> if (e.keyCode == 13 && !e.shiftKey) { // If shiftKey + ENter is hit</span></li>
<li><span style="background-color: #f3f3f3;"> debugger;</span></li>
<li><span style="background-color: #f3f3f3;"> console.log("Only Enter Press");</span></li>
<li><span style="background-color: #f3f3f3;"> e.preventDefault();</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else if (e.keyCode == 13 && e.shiftKey) { // If shiftKey + ENter is hit</span></li>
<li><span style="background-color: #f3f3f3;"> debugger;</span></li>
<li><span style="background-color: #f3f3f3;"> console.log("Shift Entered Pressed");</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> });</span></li>
<li><span style="background-color: #f3f3f3;"> $("body").on("keydown", ".AfterHeatSetInfo", function (e) {</span></li>
<li><span style="background-color: #f3f3f3;"> if (e.keyCode == 13 && !e.shiftKey) { // If shiftKey + ENter is hit</span></li>
<li><span style="background-color: #f3f3f3;"> debugger;</span></li>
<li><span style="background-color: #f3f3f3;"> console.log("Only Enter Press");</span></li>
<li><span style="background-color: #f3f3f3;"> e.preventDefault();</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"> else if (e.keyCode == 13 && e.shiftKey) { // If shiftKey + ENter is hit</span></li>
<li><span style="background-color: #f3f3f3;"> debugger;</span></li>
<li><span style="background-color: #f3f3f3;"> console.log("Shift Entered Pressed");</span></li>
<li><span style="background-color: #f3f3f3;"> }</span></li>
<li><span style="background-color: #f3f3f3;"><br /></span></li>
<li><span style="background-color: #f3f3f3;"> });</span></li>
</ol>
</div>
</div>
<pre class="default prettyprint prettyprinted" style="border: 0px; box-sizing: inherit; font-stretch: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 5px; text-align: left; vertical-align: baseline; width: auto;"></pre>
</div>
</div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-19930003167436750732018-08-15T15:46:00.003+06:002018-11-01T12:46:58.806+06:00Using SqlClient connect to sql server and CRUD in Databse thorough code base Inner Query Query<div dir="ltr" style="text-align: left;" trbidi="on">
<b style="background-color: #f9cb9c;">2. </b><b style="background-color: #f9cb9c;">SqlClient</b><b style="background-color: #f9cb9c;">Code For Calling StoredProcedure for Getting Data</b><br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> public JsonResult </span><span style="background-color: #38761d; color: red;">BuyerList</span><span style="background-color: #cccccc;">()</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> Chemical_DAL obj_dal = new Chemical_DAL();</span></li>
<li><span style="background-color: #cccccc;"> return Json(obj_dal.BuyerList());</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
</ol>
<span style="background-color: #eeeeee;"></span>
<span style="background-color: #eeeeee;"><br /></span>
<span style="background-color: #f9cb9c;"><b>2. Service</b></span><br />
<div style="text-align: left;">
</div>
<ol style="text-align: left;">
<li><span style="background-color: #eeeeee;">public class </span><span style="background-color: #38761d; color: red;">QUERY</span></li>
<li><span style="background-color: #eeeeee;">{</span></li>
<li><span style="background-color: #eeeeee;"> public string SQL { get; set; }</span></li>
<li><span style="background-color: #eeeeee;"> public Dictionary<string, string> PARAMETER { get; set; }</span></li>
<li><span style="background-color: #eeeeee;"> public Dictionary<string, byte[]> BYTEPARAMETER { get; set; }</span></li>
<li><span style="background-color: #eeeeee;">}</span></li>
</ol>
<br />
<br />
<span style="background-color: #eeeeee;"></span>
<br />
<a name='more'></a><br />
<br />
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> </span><span style="background-color: #cccccc;"> public List<Buyer> </span><span style="background-color: #38761d;"><span style="color: red;">BuyerList() </span></span><span style="background-color: #cccccc;">//public List<Buyer></span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> List<Buyer> buyerList = new List<Buyer>();</span></li>
<li><span style="background-color: #cccccc;"> string error = string.Empty;</span></li>
<li><span style="background-color: #cccccc;"> QUERY query = new QUERY();</span></li>
<li><span style="background-color: #cccccc;"> query.SQL = @"SELECT ID, BuyerShortName</span></li>
<li><span style="background-color: #cccccc;">FROM dbo.tblBuyerList order by BuyerShortName asc";</span></li>
<li><span style="background-color: #cccccc;"> DataTable dt = new DataTable ();</span></li>
<li><span style="background-color: #cccccc;"> dt = cls</span><span style="background-color: #cccccc;">.</span><span style="background-color: #38761d; color: red;">GetDataTable253_Mymun</span><span style="background-color: #38761d;">(</span><span style="background-color: #cccccc;">query, out error);</span></li>
<li><span style="background-color: #cccccc;"> if (dt.Rows.Count > 0)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> for (int i = 0; i < dt.Rows.Count; i++)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> Buyer Buyer = new Buyer();</span></li>
<li><span style="background-color: #cccccc;"> int BuyerID;</span></li>
<li><span style="background-color: #cccccc;"> Int32.TryParse(dt.Rows[i]["ID"].ToString().Trim(), out BuyerID);</span></li>
<li><span style="background-color: #cccccc;"> Buyer.ID = BuyerID;</span></li>
<li><span style="background-color: #cccccc;"> Buyer.BuyerShortName = dt.Rows[i]["BuyerShortName"].ToString();</span></li>
<li><span style="background-color: #cccccc;"> buyerList.Add(Buyer);</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> return buyerList;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
</ol>
<br />
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> public DataTable </span><span style="background-color: #38761d; color: red;">GetDataTable253_Mymun</span><span style="background-color: #cccccc;">(QUERY query, out string ERROR)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> SqlConnection con = </span><span style="background-color: #38761d; color: red;">getConnection253_Mymun</span><span style="background-color: #cccccc;">();</span></li>
<li><span style="background-color: #cccccc;"> var dt = new DataTable();</span></li>
<li><span style="background-color: #cccccc;"> try</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> con.Open();</span></li>
<li><span style="background-color: #cccccc;"> SqlCommand command = new SqlCommand();</span></li>
<li><span style="background-color: #cccccc;"> command.Connection = con;</span></li>
<li><span style="background-color: #cccccc;"> command.CommandType = CommandType.Text;</span></li>
<li><span style="background-color: #cccccc;"> command.CommandText = query.SQL;</span></li>
<li><span style="background-color: #cccccc;"> if (query.PARAMETER != null)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> foreach (KeyValuePair<string, string> data in query.PARAMETER)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> if (data.Value != null)</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, data.Value);</span></li>
<li><span style="background-color: #cccccc;"> else</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, DBNull.Value);</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> if (query.BYTEPARAMETER != null)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> foreach (KeyValuePair<string, byte[]> data in query.BYTEPARAMETER)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> if (data.Value != null)</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, data.Value);</span></li>
<li><span style="background-color: #cccccc;"> else</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, DBNull.Value);</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> SqlDataReader dr = command.ExecuteReader();</span></li>
<li><span style="background-color: #cccccc;"> ERROR = String.Empty;</span></li>
<li><span style="background-color: #cccccc;"> dt.Load(dr);</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> catch (SqlException ex)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> ERROR = ex.ToString();</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> finally</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> con.Close();</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> return dt; </span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
</ol>
<br />
<b style="background-color: #93c47d;">Execute Code From Visual Studio For Update And Save</b><br />
<ol style="text-align: left;">
<li><span style="background-color: #eeeeee;"> public JsonResult </span><span style="background-color: #38761d;"><span style="color: red;">SaveData</span></span><span style="background-color: #eeeeee;">(Menu.Models.ChemicalStore.DyesChemical savedobj)</span></li>
<li><span style="background-color: #eeeeee;"> {</span></li>
<li><span style="background-color: #eeeeee;"> ALLMENU allMenu = new ALLMENU();</span></li>
<li><span style="background-color: #eeeeee;"> allMenu = (ALLMENU)Session["Menu"];</span></li>
<li><span style="background-color: #eeeeee;"> Chemical_DAL obj_dal = new Chemical_DAL();</span></li>
<li><span style="background-color: #eeeeee;"> return Json(obj_dal.SaveData(savedobj, allMenu.User.EMPLOYEE_ID));</span></li>
<li><span style="background-color: #eeeeee;"> } </span></li>
</ol>
<div>
<div>
<ol style="text-align: left;">
<li><span style="background-color: #cccccc;"> public string </span><span style="background-color: #38761d; color: red;">SaveData</span><span style="background-color: #cccccc;">(DyesChemical savedobj, string EMPLOYEE_ID)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> string error = String.Empty;</span></li>
<li><span style="background-color: #cccccc;"> QUERY query = new QUERY();</span></li>
<li><span style="background-color: #cccccc;"> Dictionary<string, string> dict = new Dictionary<string, string>();</span></li>
<li><span style="background-color: #cccccc;"> string maxid = savedobj.ItemID;</span></li>
<li><span style="background-color: #cccccc;"> if (maxid == null)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> query.SQL = @"insert into tblDCIMDyesAndChemicalItemList ( Entry_date,ItemTypeID, ItemGroupID, ItemName, ItemTypeListID, ItemStatusID, ItemBehaviourID, ItemDescription)values(@Entry_date,@ItemTypeID,@ItemGroupID,@ItemName,@ItemTypeListID,@ItemStatusID,@ItemBehaviourID,@ItemDescription)";</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@Entry_date", savedobj.Entry_date);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemTypeID", savedobj.ItemTypeID);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemGroupID", savedobj.ItemGroupID);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemName", savedobj.ItemName);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemTypeListID", savedobj.ItemTypeListID);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemStatusID", savedobj.ItemStatusID);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemBehaviourID", savedobj.ItemBehaviourID);</span></li>
<li><span style="background-color: #cccccc;"> dict.Add("@ItemDescription", savedobj.ItemDescription);</span></li>
<li><span style="background-color: #cccccc;"> query.PARAMETER = dict;</span></li>
<li><span style="background-color: #cccccc;"> cls.</span><span style="background-color: #38761d; color: red;">ExecuteSql253_Mymun</span><span style="background-color: #cccccc;">(query, out error);</span></li>
<li><span style="background-color: #cccccc;"> if (error.Length > 0)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> else</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> query.SQL = @"SELECT MAX(ItemID) FROM dbo.tblDCIMDyesAndChemicalItemList";</span></li>
<li><span style="background-color: #cccccc;"> DataTable dt = cls.GetDataTable253_Mymun(query, out error);</span></li>
<li><span style="background-color: #cccccc;"> maxid = dt.Rows[0][0].ToString();</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> return maxid;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
</ol>
</div>
</div>
<div>
</div>
<br />
<span style="background-color: #eeeeee;"></span><br />
<br />
<ol style="text-align: left;">
<li> <span style="background-color: #cccccc;">public int </span><span style="background-color: #38761d;"><span style="color: red;">ExecuteSql253_Mymun</span></span><span style="background-color: #cccccc;">(QUERY query, out string ERROR)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> SqlConnection con = </span><span style="background-color: #38761d;"><span style="color: red;">getConnection253_Mymun</span></span><span style="background-color: #cccccc;">();</span></li>
<li><span style="background-color: #cccccc;"> con.Open();</span></li>
<li><span style="background-color: #cccccc;"> int result = 0;</span></li>
<li><span style="background-color: #cccccc;"> try</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> SqlCommand command = new SqlCommand();</span></li>
<li><span style="background-color: #cccccc;"> command.Connection = con;</span></li>
<li><span style="background-color: #cccccc;"> command.CommandType = CommandType.Text;</span></li>
<li><span style="background-color: #cccccc;"> command.CommandText = query.SQL;</span></li>
<li><span style="background-color: #cccccc;"> if (query.PARAMETER != null)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> foreach (KeyValuePair<string, string> data in query.PARAMETER)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> if (data.Value != null)</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, data.Value);</span></li>
<li><span style="background-color: #cccccc;"> else</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, DBNull.Value);</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> if (query.BYTEPARAMETER != null)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> foreach (KeyValuePair<string, byte[]> data in query.BYTEPARAMETER)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> if (data.Value != null)</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, data.Value);</span></li>
<li><span style="background-color: #cccccc;"> else</span></li>
<li><span style="background-color: #cccccc;"> command.Parameters.AddWithValue(data.Key, DBNull.Value);</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> result = command.ExecuteNonQuery();</span></li>
<li><span style="background-color: #cccccc;"> ERROR = String.Empty;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> catch (SqlException ex)</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> ERROR = ex.Message.ToString();</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> finally</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> con.Close();</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li><span style="background-color: #cccccc;"> return result;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
<li> </li>
</ol>
<span style="background-color: #eeeeee;"><br /></span>
<b style="background-color: #f9cb9c;">3. </b><b style="background-color: #f9cb9c;">SqlClient</b><b style="background-color: #f9cb9c;">Code For Getting Connection String</b><br />
<b>using System.Collections.Generic;</b><br />
<b>using System.Text;</b><br />
<b>using System.Data; </b><br />
<b>using System.Data.SqlClient;</b><br />
<ol>
<li><span style="background-color: #cccccc;">public SqlConnection </span><span style="background-color: #38761d; color: red;"><b>getConnection253_Mymun</b></span><span style="background-color: #cccccc;">()</span></li>
<li><span style="background-color: #cccccc;"> {</span></li>
<li><span style="background-color: #cccccc;"> </span></li>
<li><span style="background-color: #cccccc;"> string connStr = @"data source=192.168.153.208;database=HamdunSoftProject;uid=sa;password=hamdunsoft1234";</span></li>
<li><span style="background-color: #cccccc;"> </span></li>
<li><span style="background-color: #cccccc;"> SqlConnection conn = new SqlConnection(connStr);</span></li>
<li><span style="background-color: #cccccc;"> return conn;</span></li>
<li><span style="background-color: #cccccc;"> }</span></li>
</ol>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-22962868418054792182018-07-11T19:49:00.000+06:002020-05-13T08:17:22.577+06:00MY Favorite .Net Question For Interview <div dir="ltr" style="text-align: left;" trbidi="on">
This are not tidy. Just for rough. In Sha Allah will make it tiddy soon.<br />
<br />
1. DateTime2 Date range<span style="white-space: pre;"> </span>0001-01-01 through 9999-12-31 vs DateTime Date range<span style="white-space: pre;"> </span>January 1, 1753, through December 31, 9999 in SQL Server<br />
Ans: <a href="https://stackoverflow.com/questions/1334143/datetime2-vs-datetime-in-sql-server">https://stackoverflow.com/questions/1334143/datetime2-vs-datetime-in-sql-server</a><br />
<br />
2. Dictionary value different types use object as datatype of the eky value<br />
<br />
3. If one property of a class is list<> of another class then how to deal with it if we want to initialize it in essential place to avoid Null Reference. See question 17 <b>below</b>.<br />
<br />
4. How to create multi valued dictionary rather than one valued dictionary.<br />
<br />
<br />
5. Instance Methods as Delegates<br />
6. Generic: Base Class Constraint<br />
7. Defference btn logical ("AND, OR") vs shortcircuit ("AND, OR")repectively<br />
<br />
8. Use ref and out Parameters<br />
9. Indexer vs Property Difference<br />
10.Variable Number of Arguments function Arguments<br />
<br />
11. How you copy one object to another object . Not reference of the object?<br />
<br />
12. Make a simple character stack by a C# class and push pop public member function<br />
<br />
<b>13. How to use one constructor to invoke another Constructor </b>and which one will execute first<br />
Optional Arguments vs. Overloading: How optional argument become an alternative to Function Overloading<br />
<br />
14. Static class and static method<br />
<br />
<b>15. C# 4.0:
The Complete Reference: 296 PG: </b>When Are Constructors Called?<br />
For multilevel hierarchy inheritance : During creation of child class object which class constructor is executed first? The one in the derived class or the one defined by the base class? Or only one constructor will be called?<br />
<br />
<br />
<b>16. Dynamic method dispatch/ C# runtime polymorphism:</b> (<b>C# 4.0:
The Complete Reference 297 - 305 PG</b>- <b> : </b>Base Class References and Derived Objects and Virtual Methods and Overriding)<br />
For multilevel hierarchy inheritance, because of calling the virtual method with any level base class reference variable referring to a any of the child /base class object.<br />
case 1: When both have the virtual method then Object being referred class method/reference class overridden method will be called?<br />
Case 2: If a derived class does not override a virtual<br />
method, then, while moving up the hierarchy/down the hierarchy, the only first override of the method that is encountered is the one executed or only the last? or All from first to last vice versa?<br />
<br />
<br />
<br />
<div style="text-align: left;">
<b>17.</b> <a class="question-hyperlink" href="https://stackoverflow.com/questions/14439231/a-field-initializer-cannot-reference-the-nonstatic-field-method-or-property" style="border: 0px; box-sizing: inherit; cursor: pointer; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.35; margin: 0px 0px 0.5em; padding: 0px; text-decoration-line: none; vertical-align: baseline;"><b><span style="color: #6fa8dc;">A field initializer cannot reference the nonstatic field, method, or property</span></b></a></div>
<br />
<span style="white-space: pre;"> </span> <span style="background-color: red;"> clsDataprocess cls2 = new clsDataprocess();// Wrong</span><br />
<span style="background-color: red;"><span style="white-space: pre;"> </span>static public SqlConnection Con = <b>cls2</b>.getConnection253_Mymun(); // cls2 showing the errror</span><br />
<br />
<div style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
You cannot use an instance variable to initialize <em style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">another</em> instance variable. Why? Because the compiler can rearrange these - there is no guarantee that <span style="background-color: red; color: black; font-family: "times new roman"; font-size: small;">cls2 </span>will be initialized before <span style="background-color: red; color: black; font-family: "times new roman"; font-size: small;">Con </span>, so the above line <em style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">might</em> throw a <code style="background-color: #eff0f1; border: 0px; box-sizing: inherit; 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-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">NullReferenceException</code>.</div>
<span style="background-color: #6aa84f;"> static clsDataprocess cls2 = new clsDataprocess(); // Correct put static in both variable </span><br />
<br />
<span style="background-color: #f3f3f3;"> </span><span style="background-color: #6aa84f;">static public SqlConnection Con = cls2.getConnection253_Mymun();</span><span style="background-color: #6aa84f;">// Correct</span><br />
<span style="background-color: #6aa84f;"><br /></span>
<br />
<h1 class="grid--cell fs-headline1 fl1" itemprop="name" style="border: 0px; box-sizing: inherit; color: #242729; flex: 1 1 auto !important; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.3; margin: 0px 0px 0.5em; padding: 0px; vertical-align: baseline;">
<span style="background-color: #ffe599; border: 0px; box-sizing: inherit; color: #242729; cursor: pointer; font-size: small; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.35; margin: 0px 0px 0.5em; padding: 0px; vertical-align: baseline;">18.<a class="question-hyperlink" href="https://stackoverflow.com/questions/2068682/why-cant-i-use-alias-in-a-count-column-and-reference-it-in-a-having-clause" style="border: 0px; box-sizing: inherit; color: #242729; cursor: pointer; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.35; margin: 0px 0px 0.5em; padding: 0px; text-decoration-line: none; vertical-align: baseline;">Why can't I use alias in a count(*) “column” and reference it in a having clause?</a></span></h1>
<div>
<div style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
The HAVING clause is evaluated before the SELECT - so the server doesn't yet know about that alias.</div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-stretch: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
Answer: <a href="https://stackoverflow.com/a/2068705/2014745%C2%A0" target="_blank">https://stackoverflow.com/a/2068705/2014745 </a></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<div style="border: 0px; box-sizing: inherit; clear: both; font-stretch: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
</div>
</div>
<br />
<br />
19. <a href="https://stackoverflow.com/questions/38510963/null-reference-exception-for-class-lists">Null Reference Exception for Class Lists</a><br />
<br />
Answer :
<br />
<br />
<br />
<a href="https://stackoverflow.com/a/38511001/2014745">https://stackoverflow.com/a/38511001/2014745</a>
<br />
<br />
When you create BookList, you haven't actually initialized the list that is its member. You can do this by changing your initialization to:
BookList myBookList = new BookList() {bookList = new List<Book>()};<br />
<br />
Or by writing a constructor for the BookList class which initializes the list; which would look like this:
class BookList
{
public List<Book> bookList { get; set; }
public BookList(){ //New constructor
bookList = new List<Book>();
}
} <br />
<br />
<br />
<br />
20. <a href="https://stackoverflow.com/questions/9233000/why-compile-error-use-of-unassigned-local-variable">Why compile error “Use of unassigned local variable”?</a><br />
<br />
Local variables aren't initialized. You have to manually initialize them.<br />
<br />
Members are initialized, for example:public class X
{
private int _tmpCnt; // This WiLL initialize to zero
...
}<br />
<br />
But local variables are not:public static void SomeMethod()
{
int tmpCnt; // This is not initialized and must be assigned before used.
...
}<br />
<div style="background-color: white; font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">21. If you want to pass multiple different list in a View from ASP .Net MVC Controller Action How can you pass it?</span></span></div>
<div style="background-color: white; font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">Answer: </span></span></div>
<div style="background-color: white; font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">In Action: </span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;"> </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">ViewBag.MyClassList </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">= new </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">List<MyClass>()</span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;"> ;</span></div>
<div style="background-color: white;">
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;"> List<MyClass> </span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">MyClassList </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">= ViewBag.</span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px;">MyClassList </span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">as List<</span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; font-size: 15px; white-space: normal;">MyClass</span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;">>;</span></span></div>
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;"><br /></span></span></div>
<div style="font-family: monospace; white-space: pre;">
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px; white-space: normal;"><br /></span></span></div>
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif; white-space: pre;"><span style="font-size: 15px; white-space: normal;">PtideSys </span></span><span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">Vivaa Question: </span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">1. Introduce your selft.</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">They also introduced their selves. While continuing conversation...</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">2. What type of word did you done in previous company?</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">3. Asked me about the working procedure of .Net framework.. MSIL and CLR... mixed it </span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">5. Gave a programe to make the sum and asked it's time and space complexity with various situation. During this session asked me the difference between int type length of ASCII and C# . I said 2 byte and 4 byte, the asked sure, i replied sure..!</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">4. Garbage collection of .Net framework Dispose. type safety and un safety programming language.</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">5. Entity framework tasks, codefirst, database first, design first.. Transaction committing with EF</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">6. Binary search</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">7. Asked about Singleton patterns -- I said it can be done many ways from that I like JonSkeet c# in depths example with a sealed class and static reference of the same class</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">8. Factory patterns-- Implemented this with Interface Inheriting</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">9. Some others question. </span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">10. Asked about My Stack overflow reputation.</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">11. Asked if I have used Dictionary, List, Tuple</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">12. Some other features of OOP </span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">13. Difference between string And String, I said they are same. Asked what is main defference between String and Stringbuilder class. i said object of string is immutable, if you want to change one cjaracter of C# built in string class object you have to copy it in an char array o have to changed by pointer which is not intutively supported by c#, Also if string a ="7" and string b = "7". They will occupy same memery address. It is a special property of c# string. And All string builder contents object are not like this in built in string class. </span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">I have gave most of the answers. </span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;"> But only stucked with the answer of Transaction of Enttity framework with question what will be happened when machine face problem if power goes or network connection goes between program server and database server. I said it can be done manully will complex taskingg... but entity frame work provide easy way to tasking this type of scenario. And made mistake with the name MISL and CLR</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">Oh Aro 3 ta question Bad Porche</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">14. Delegates in c# , keno, ki vabe apply kore</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">15. Dependency injection ki, keno kore subidha</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;">16. Dynamic method dispatching khetre ki vabe ki kore..</span></span><br />
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;"><br /></span></span>
<br />
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:15:16 PM UTC+6" id=":fy.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<span class="tL8wMe EMoHub" dir="ltr" id=":fy.co">Asynchronous method ki..</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:15:56 PM UTC+6" id=":fx.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fx.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fx.co">Interface vs abstract class</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:16:41 PM UTC+6" id=":fw.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fw.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fw.co">Ienumarable vs queryable</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:18:46 PM UTC+6" id=":fv.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;" title="January 29, 2019 at 8:18:46 PM UTC+6">
<div class="xH" id=":fv.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fv.co">Linq ar groupby dicilo</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:19:19 PM UTC+6" id=":fu.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fu.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fu.co">Sql ar 2 query</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:20:19 PM UTC+6" id=":ft.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":ft.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":ft.co">Extendclass ar example</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:23:02 PM UTC+6" id=":fs.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fs.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fs.co">Delegate ki example</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:23:49 PM UTC+6" id=":fr.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fr.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fr.co">JavaScript closure</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:25:50 PM UTC+6" id=":fq.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fq.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fq.co">Javascrip private public , inheritance</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:26:51 PM UTC+6" id=":fp.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fp.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fp.co">Javascrip callback function ar output</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:27:52 PM UTC+6" id=":fo.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fo.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fo.co">Oop ar kisu basic cilo mona portasa na</span></div>
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:28:54 PM UTC+6" id=":fn.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fn.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fn.co">Event vs delegate</span></div>
<span style="color: #242729; font-family: "arial" , "helvetica neue" , "helvetica" , sans-serif;"><span style="font-size: 15px;"></span></span><br />
<div class="Mu SP" data-tooltip="January 29, 2019 at 8:30:19 PM UTC+6" id=":fm.ma" style="color: #263238; font-family: Roboto, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 6px; margin-left: 9px; margin-right: 9px; opacity: 1; overflow-wrap: break-word; transition: opacity 0.218s ease 0s; word-break: break-word;">
<div class="xH" id=":fm.at" style="text-align: center;">
</div>
<span class="tL8wMe EMoHub" dir="ltr" id=":fm.co">"string" ka reverse korta hoba c# dara</span></div>
</div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
<div style="background-color: white; color: #242729; font-family: arial, "helvetica neue", helvetica, sans-serif; font-size: 15px;">
<br /></div>
</div>
</div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-76562515100558116262016-09-05T18:25:00.000+06:002018-12-19T09:29:40.846+06:00Details Of Split String in Sql :: SQL Server 2014 Version(12.0.4100.1) SQL Server 2008 Version(10.50.1617.0) <div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="box-sizing: inherit; line-height: 1.3; margin: -10px 0px 0px; overflow-wrap: break-word; text-align: left;">
<span style="background-color: #b6d7a8;"><span style="font-family: "segoe ui" , "segoeui" , "segoe wp" , "helvetica neue" , "helvetica" , "tahoma" , "arial" , sans-serif; font-size: small;"><a href="https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-2017">STRING_SPLIT (Transact-SQL)</a> is avail able from </span><span style="font-family: "segoe ui" , "segoeui" , "segoe wp" , "helvetica neue" , "helvetica" , "tahoma" , "arial" , sans-serif; font-size: small;">SQL Server 2016 </span></span></h2>
<token style="background-color: #b6d7a8; box-sizing: inherit; font-family: "segoe ui", segoeui, "segoe wp", "helvetica neue", helvetica, tahoma, arial, sans-serif; font-size: 16px;">As there is no built in split string function in sql server 2014, 2010, 2008 I have build the bellow function from getting help from <a href="http://stackloverflow.com/">stackloverflow.com </a>. </token><br />
<span style="background-color: #b6d7a8;"><b><br /></b>
<b>1. This is single paged query to under standing split string.</b></span><br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote class="tr_bq">
<ol style="text-align: left;">
<li><span style="background-color: #b6d7a8;">Declare @products varchar(200) = '1,2,3,4,5,6,7,8,9,10'</span></li>
<li><span style="background-color: #b6d7a8;">-- SET @products = SUBSTRING(@products, LEN('ss' + ',') + 1, LEN(@products))</span></li>
<li><span style="background-color: #b6d7a8;">--select @products</span></li>
<li><span style="background-color: #b6d7a8;">Declare @individual varchar(20) = null</span></li>
<li><span style="background-color: #b6d7a8;">WHILE LEN(@products) > 0</span></li>
<li><span style="background-color: #b6d7a8;">BEGIN</span></li>
<li><span style="background-color: #b6d7a8;">IF PATINDEX('%,%',@products) > 0</span></li>
<li><span style="background-color: #b6d7a8;">BEGIN</span></li>
<li><span style="background-color: #b6d7a8;">SET @individual = SUBSTRING(@products, 0, PATINDEX('%,%',@products))</span></li>
<li><span style="background-color: #b6d7a8;">SELECT @individual</span></li>
<li><span style="background-color: #b6d7a8;">SET @products = SUBSTRING(@products, LEN(@individual + ',') + 1,</span></li>
<li><span style="background-color: #b6d7a8;">LEN(@products)-1)</span></li>
<li><span style="background-color: #b6d7a8;">END</span></li>
<li><span style="background-color: #b6d7a8;">ELSE</span></li>
<li><span style="background-color: #b6d7a8;">BEGIN</span></li>
<li><span style="background-color: #b6d7a8;">SET @individual = @products</span></li>
<li><span style="background-color: #b6d7a8;">SET @products = NULL</span></li>
<li><span style="background-color: #b6d7a8;">SELECT @individual</span></li>
<li><span style="background-color: #b6d7a8;">END</span></li>
<li><span style="background-color: #b6d7a8;">END</span></li>
<li><span style="background-color: #b6d7a8;">select @products</span></li>
</ol>
</blockquote>
<br />
<a name='more'></a><br />
<b style="background-color: #b6d7a8;">2. Here is a Table Valued Function in sql server which will split a string according to a certain delimiter and returns list of integer values. For this shake your strings must need to be consist of numeric values separated by the desired characters.</b><br />
<span style="background-color: #b6d7a8;"><br /></span>
<br />
<blockquote class="tr_bq">
<ol style="text-align: left;">
<li><span style="background-color: #b6d7a8;">USE [Haicang]</span></li>
<li><span style="background-color: #b6d7a8;">GO</span></li>
<li><span style="background-color: #b6d7a8;">/****** Object: UserDefinedFunction [dbo].[SplitString] Script Date: 06-Sep-2016 11:42:43 AM ******/</span></li>
<li><span style="background-color: #b6d7a8;">SET ANSI_NULLS ON</span></li>
<li><span style="background-color: #b6d7a8;">GO</span></li>
<li><span style="background-color: #b6d7a8;">SET QUOTED_IDENTIFIER ON</span></li>
<li><span style="background-color: #b6d7a8;">GO</span></li>
<li><span style="background-color: #b6d7a8;">ALTER FUNCTION [dbo].[SplitString] (@inputString nVARCHAR(500), @delimiter nVARCHAR(1))</span></li>
<li><span style="background-color: #b6d7a8;">RETURNS @listOfTablesArrangementIDs table (id int) </span></li>
<li><span style="background-color: #b6d7a8;">AS BEGIN</span></li>
<li><span style="background-color: #b6d7a8;">/******************************************/ </span></li>
<li><span style="background-color: #b6d7a8;">Declare @individual int </span></li>
<li><span style="background-color: #b6d7a8;">Declare @individualString varchar(10) </span></li>
<li><span style="background-color: #b6d7a8;"> </span></li>
<li><span style="background-color: #b6d7a8;">WHILE LEN(@inputString) > 0</span></li>
<li><span style="background-color: #b6d7a8;">BEGIN</span></li>
<li><span style="background-color: #b6d7a8;"> IF PATINDEX('%'+@delimiter+'%', @inputString) > 0</span></li>
<li><span style="background-color: #b6d7a8;"> BEGIN</span></li>
<li><span style="background-color: #b6d7a8;"><span class="Apple-tab-span" style="white-space: pre;"> </span> set @individualString = SUBSTRING(@inputString, 0, PATINDEX('%'+@delimiter+'%',@inputString)) </span></li>
<li><span style="background-color: #b6d7a8;"> SET @individual =CONVERT(INT, @individualString)</span></li>
<li><span style="background-color: #b6d7a8;"> insert @listOfTablesArrangementIDs(id) values(@individual)</span></li>
<li><span style="background-color: #b6d7a8;"> SET @inputString = SUBSTRING(@inputString, LEN(@individualString + @delimiter) + 1, LEN(@inputString) + 1)</span></li>
<li><span style="background-color: #b6d7a8;"> END</span></li>
<li><span style="background-color: #b6d7a8;"> ELSE</span></li>
<li><span style="background-color: #b6d7a8;"> BEGIN</span></li>
<li><span style="background-color: #b6d7a8;"> SET @individualString = @inputString</span></li>
<li><span style="background-color: #b6d7a8;"><span class="Apple-tab-span" style="white-space: pre;"> </span>SET @individual =CONVERT(INT, @individualString)</span></li>
<li><span style="background-color: #b6d7a8;"> insert @listOfTablesArrangementIDs(id) values(@individual)</span></li>
<li><span style="background-color: #b6d7a8;"> SET @inputString = NULL</span></li>
<li><span style="background-color: #b6d7a8;"> </span></li>
<li><span style="background-color: #b6d7a8;"> END</span></li>
<li><span style="background-color: #b6d7a8;">END </span></li>
<li><span style="background-color: #b6d7a8;"> RETURN </span></li>
<li><span style="background-color: #b6d7a8;">END</span></li>
</ol>
</blockquote>
<span style="background-color: #b6d7a8;">//And Now Here how you have to call the SplitString function. From any query page just run it .</span><br />
<span style="background-color: #b6d7a8;"><br /></span>
<br />
<ol>
<li><span style="background-color: #b6d7a8;">declare @listOfTablesArrangementIDs table (id int) </span></li>
<li><span style="background-color: #b6d7a8;">insert into @listOfTablesArrangementIDs </span></li>
<li><span style="background-color: #b6d7a8;">SELECT * FROM [dbo].[SplitString] ('1,23,4343' ,',')</span></li>
<li><span style="background-color: #b6d7a8;">select * from @listOfTablesArrangementIDs</span></li>
</ol>
<span style="background-color: #b6d7a8;"><br /></span>
<span style="background-color: #b6d7a8;"><br /></span>
<span style="background-color: #b6d7a8;"><br /></span>
<span style="background-color: #b6d7a8;"><br /></span>
<br />
<ol style="text-align: left;">
</ol>
<b style="background-color: #b6d7a8;">3. Here is a Table Valued Function in sql server which will split a string according to a certain delimiter and returns list of strings values. </b><br />
<span style="background-color: #b6d7a8;"><br /></span>
<br />
<ol style="text-align: left;">
<li><span style="background-color: #b6d7a8;">USE [ProjectInfoDB]</span></li>
<li><span style="background-color: #b6d7a8;">GO</span></li>
<li><span style="background-color: #b6d7a8;">/****** Object: UserDefinedFunction [dbo].[SplitString] Script Date: 11/19/2018 6:58:46 PM ******/</span></li>
<li><span style="background-color: #b6d7a8;">SET ANSI_NULLS ON</span></li>
<li><span style="background-color: #b6d7a8;">GO</span></li>
<li><span style="background-color: #b6d7a8;">SET QUOTED_IDENTIFIER ON</span></li>
<li><span style="background-color: #b6d7a8;">GO</span></li>
<li><span style="background-color: #b6d7a8;">-- =============================================</span></li>
<li><span style="background-color: #b6d7a8;">-- Author:<span style="white-space: pre;"> </span><Muhammad Ashikuzzaman,,Name2></span></li>
<li><span style="background-color: #b6d7a8;">-- Create date: <2018-11-19,,></span></li>
<li><span style="background-color: #b6d7a8;">-- Edit date: < ></span></li>
<li><span style="background-color: #b6d7a8;">-- Description:<span style="white-space: pre;"> </span><Initial server: Server: 192.168.13.253 ,,></span></li>
<li><span style="background-color: #b6d7a8;">-- =============================================</span></li>
<li><span style="background-color: #b6d7a8;">ALTER FUNCTION [dbo].[SplitString] (@inputString NVARCHAR(500), @delimiter NVARCHAR(1))</span></li>
<li><span style="background-color: #b6d7a8;">RETURNS @listOfTablesArrangementIDs table (id nvarchar(20)) </span></li>
<li><span style="background-color: #b6d7a8;">AS BEGIN</span></li>
<li><span style="background-color: #b6d7a8;">/******************************************/ </span></li>
<li><span style="background-color: #b6d7a8;">Declare @individual nvarchar(20) </span></li>
<li><span style="background-color: #b6d7a8;">Declare @individualString nvarchar(20) </span></li>
<li><span style="background-color: #b6d7a8;">WHILE LEN(@inputString) > 0</span></li>
<li><span style="background-color: #b6d7a8;">BEGIN</span></li>
<li><span style="background-color: #b6d7a8;"> IF PATINDEX('%'+@delimiter+'%', @inputString) > 0</span></li>
<li><span style="background-color: #b6d7a8;"> BEGIN</span></li>
<li><span style="background-color: #b6d7a8;"> set @individualString = SUBSTRING(@inputString, 0, PATINDEX('%'+@delimiter+'%',@inputString)) </span></li>
<li><span style="background-color: #b6d7a8;"> SET @individual =CONVERT(nvarchar(20), @individualString)</span></li>
<li><span style="background-color: #b6d7a8;"> insert @listOfTablesArrangementIDs(id) values(@individual)</span></li>
<li><span style="background-color: #b6d7a8;"> SET @inputString = SUBSTRING(@inputString, LEN(@individualString + @delimiter) + 1, LEN(@inputString) + 1)</span></li>
<li><span style="background-color: #b6d7a8;"> END</span></li>
<li><span style="background-color: #b6d7a8;"> ELSE</span></li>
<li><span style="background-color: #b6d7a8;"> BEGIN</span></li>
<li><span style="background-color: #b6d7a8;"> SET @individualString = @inputString</span></li>
<li><span style="background-color: #b6d7a8;"> SET @individual =CONVERT(nvarchar(20), @individualString)</span></li>
<li><span style="background-color: #b6d7a8;"> insert @listOfTablesArrangementIDs(id) values(@individual)</span></li>
<li><span style="background-color: #b6d7a8;"> SET @inputString = NULL </span></li>
<li><span style="background-color: #b6d7a8;"> END</span></li>
<li><span style="background-color: #b6d7a8;">END </span></li>
<li><span style="background-color: #b6d7a8;"> RETURN </span></li>
<li><span style="background-color: #b6d7a8;">END</span></li>
</ol>
<span style="background-color: #b6d7a8;"><br /></span>
<span style="background-color: #b6d7a8;">//And Now Here how you have to call the SplitString function. From any query page just run it .</span><br />
<span style="background-color: #b6d7a8;"><br /></span>
<br />
<ol style="text-align: left;">
<li><span style="background-color: #b6d7a8;">declare @listOfTablesArrangementIDs table (id nvarchar(20)) </span></li>
<li><span style="background-color: #b6d7a8;">insert into @listOfTablesArrangementIDs </span></li>
<li><span style="background-color: #b6d7a8;">SELECT * FROM [dbo].[SplitString] ('1,Allah,asdasd' ,',')</span></li>
<li><span style="background-color: #b6d7a8;">select * from @listOfTablesArrangementIDs</span></li>
</ol>
<span style="background-color: #b6d7a8;"><br /></span>
<br />
<div>
<span style="background-color: #b6d7a8;"><br /></span></div>
<a href="https://drive.google.com/open?id=0B-imv_uXN00BTzZNTTcwWGV6WlU" style="background-color: #b6d7a8;" target="_blank">ADmi</a><br />
<br /></div>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-59843535148369918542016-08-13T08:17:00.000+06:002018-11-11T12:16:14.258+06:00C# Linq: Group Joining and Aggregate Function (SUM, COUNT, MAX, MIN)<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="docs-internal-guid-6ce88347-81bf-6073-cafc-2e780ba53506"><span style="color: #1155cc; font-family: "arial"; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://stackoverflow.com/questions/38909608/linq-join-3-tables-with-group-by-and-sum/38914897#38914897" style="text-decoration: none;"><span style="font-size: large;">StackOverFlow</span></a></span></span><br />
<br />
<iframe height="850px" src="https://docs.google.com/document/d/1BdhK2wppmPL1rkDJ_auLkxVHIRlQ9RfUTK-aJwwUiKc/pub?embedded=true" width="705px"></iframe>
</div>
Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0tag:blogger.com,1999:blog-992287742492474797.post-11729818126672112342016-04-11T16:29:00.000+06:002018-09-06T16:10:22.495+06:00Essential Oracle/SQL Query<style type="text/css">
.c9 {
background-color: #CC97B7;
max-width: 555.5pt;
padding: 2pt 2pt 2pt 2pt;
}
</style>
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<iframe src="https://docs.google.com/document/d/1brhH0muwNSqsfrL7cnIbGB3dELygMGv3OvUimVeAVPQ/pub?embedded=true" height="450px" width="705px"></iframe>
</div>Muhammad Ashikuzzamanhttp://www.blogger.com/profile/02349309542596108204noreply@blogger.com0