Menu

Showing posts with label Learning. Show all posts
Showing posts with label Learning. Show all posts

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

If you are getting error "No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?" while compiling any java application either using Eclipse, NetBeans and any other IDE, the simple meaning of this error is; you are trying to compile your Java program using JRE which is not possible. To compile any Java program we need JDK.

There could be two reasons which causing this error. Will see both the ways to fix this issue.

How to check installed version of Java in your machine.

1. If you don't have JDK installed in your machine/Computer.

  • To resolve this you need to download the latest version of JDK and install it in your machine. 
  • Then setup environment  variable and path. for more check here.


2. If JDK is already installed in your machine but installed JRE path is not setup to JDK path. 

  • Open eclipse
  • Go to Window > Preferences > Java > Installed JREs > and check your installed JREs.
  • There should be a entry available for JDK in installed JRE. In case there is no JDK entry then you have to add path of installed JDK from your machine.

To do this:
  • Go to C drive of your computer and find the directory of JDK in program files. e. g. C:\Program Files\Java\jdk1.8.0_111 
  • Copy this path and add this path in your installed JREs option in your IDE.
inatalled JRE in eclipse
Inatalled JRE in eclipse
  •  Click on Add button from right side of window. A new window will appear, click on standard VM > Next > In JRE home section put the path of installed JDK from program files and click on finish.
JRE defination window
JRE defination window

  • After doing these all JDK will be appear in your installed JREs window. From there you mark/check JDK and apply.
inatalled JRE in eclipse
Inatalled JRE in eclipse

    Concept of ordered set

    Any set S with a relation, say less than equal(<=) to is said to be ordered if for any two elements X and Y of S, either X<= Y or Y <= X is true. Then we may also say (S, <=) is an ordered set.

    We know given two integer, say N1 and N2, we can always say whether N1<=N2 and N2 <=N1. Similarly if you are given two rational numbers or the real numbers, say N1 and N2, then it is always possible to tell whether N1 <= N2 or N2 <= N1.

    Pattern of ordered set: An ordered set of numbers or objects; the order helps you predict what will come next, because this order follow a pattern unit to generate a set/list. 

    Pattern unit: The part of a pattern that repeats.

    How to show related posts in blogger with thumbnail view

    In this post we are going to show you people hot to show related or relevant posts in your blog (Google blogger) with thumbnail view. I tried my best to make it simple and easy so you can easily add make this changes in your blogger and show related posts to your users.

    First we will see how this will appear on your blog. below is the screen shot of its appearance.

    Related content thumbnail view

    Now lets start to achieve this and without and delay show the relevant posts to your users so they can easily find the relevant content and also it will make your site more visible in terms of impression.

    Step 1: login into Blogger account and select the TEMPLATE option from the left side of menu.

    Step 2: On right panel a preview of your blog will appear showing the CUSTOMIZE and EDIT HTML option. Go with EDIT HTML option.

    Step 3: A new coding snippet window will appear. Click inside the code window and then go to find option by press Ctrl+F

    Step 4: Search for the text </head>.

    Step 5: Copy paste the below code above the tag </head>.
    <!--Show related posts in blogger START--><style type='text/css'>
    #related-posts{float:left;width:auto;}
    #related-posts a{border-right: 1px dotted #eaeaea;}
    #related-posts h4{margin-top: 10px;background:none;font:18px Oswald;padding:3px;color:#999999; text-transform:uppercase;}
    #related-posts .related_img {margin:5px;border:2px solid #f2f2f2;object-fit: cover;width:110px;height:100px;-webkit-border-radius: 5px;-moz-border-radius: 5px; border-radius: 5px; }
    #related-title {color:#333;text-align:center;text-transform:capitalize;padding: 0px 5px 10px;font-size:12px;width:110px; height: 40px;}
    </style>
    <script type='text/javascript'>
    var relatedTitles=new Array();var relatedTitlesNum=0;var relatedUrls=new Array();var thumburl=new Array();function related_results_labels_thumbs(json){for(var i=0;i<json.feed.entry.length;i++){var entry=json.feed.entry[i];relatedTitles[relatedTitlesNum]=entry.title.$t;try{thumburl[relatedTitlesNum]=entry.gform_foot.url}catch(error){s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){thumburl[relatedTitlesNum]=d}else thumburl[relatedTitlesNum]='http://2.bp.blogspot.com/-ex3V86fj4dQ/UrCQQa4cLsI/AAAAAAAAFdA/j2FCTmGOrog/s1600/no-thumbnail.png'}if(relatedTitles[relatedTitlesNum].length>35)relatedTitles[relatedTitlesNum]=relatedTitles[relatedTitlesNum].substring(0,35)+"...";for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){relatedUrls[relatedTitlesNum]=entry.link[k].href;relatedTitlesNum++}}}}function removeRelatedDuplicates_thumbs(){var tmp=new Array(0);var tmp2=new Array(0);var tmp3=new Array(0);for(var i=0;i<relatedUrls.length;i++){if(!contains_thumbs(tmp,relatedUrls[i])){tmp.length+=1;tmp[tmp.length-1]=relatedUrls[i];tmp2.length+=1;tmp3.length+=1;tmp2[tmp2.length-1]=relatedTitles[i];tmp3[tmp3.length-1]=thumburl[i]}}relatedTitles=tmp2;relatedUrls=tmp;thumburl=tmp3}function contains_thumbs(a,e){for(var j=0;j<a.length;j++)if(a[j]==e)return true;return false}function printRelatedLabels_thumbs(){for(var i=0;i<relatedUrls.length;i++){if((relatedUrls[i]==currentposturl)||(!(relatedTitles[i]))){relatedUrls.splice(i,1);relatedTitles.splice(i,1);thumburl.splice(i,1);i--}}var r=Math.floor((relatedTitles.length-1)*Math.random());var i=0;if(relatedTitles.length>0)document.write('<h4>'+relatedpoststitle+'</h4>');document.write('<div style="clear: both;"/>');while(i<relatedTitles.length&&i<20&&i<maxresults){document.write('<a style="text-decoration:none;margin:0 4px 10px 0;float:left;');if(i!=0)document.write('"');else document.write('"');document.write(' href="'+relatedUrls[r]+'"><img class="related_img" src="'+thumburl[r]+'"/><br/><div id="related-title">'+relatedTitles[r]+'</div></a>');if(r<relatedTitles.length-1){r++}else{r=0}i++}document.write('</div>');relatedUrls.splice(0,relatedUrls.length);thumburl.splice(0,thumburl.length);relatedTitles.splice(0,relatedTitles.length)}
    </script>
    <!--Show related posts in blogger END-->
    Step 6: Again search for the text <div class='post-footer'> and add the below mentioned code before this tag.

    <!--Show related posts in blogger START-->
    <div id='related-posts'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:label.isLast != &quot;true&quot;'>
    </b:if>
    <script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=5&quot;' type='text/javascript'/></b:loop>
    <script type='text/javascript'>
    var currentposturl=&quot;<data:post.url/>&quot;;
    var maxresults=5;
    var relatedpoststitle=&quot;<b>Related Posts:</b>&quot;;
    removeRelatedDuplicates_thumbs();
    printRelatedLabels_thumbs();
    </script>
    </div><div class='clear'/><div style="font-size: 9px;float: right; margin: 5px;">
    <a  style="font-size: 9px; text-decoration: none;" href="http://rashidjorvee.blogspot.in/2017/11/how-to-show-related-posts-in-your.html" rel="nofollow" >Grab this Widget</a></div>
    <!--Show related posts in blogger END-->
    Step 7: Code changes has been completed now you save your template from above SAVE TEMPLATE button.

    Note: Go for your site and verify the changes and see how many related posts are appearing in your blog.
    If you would like to change the number of related posts and its thumbnail view then go to step 6 and change the value for maxresults=5 to number which you wants.

    If you face any issue while implementing this change in your blog, please comment your queries, we will definitely help you.

    Can a human become God?

    Very complicated question for all humans, but very simple and easy as all well to a person who knows; what are the features of a God? Which makes him God? 
    Yes, there is definitely something which compel to human to accept the existence of God. What are those? Did you ever think? I don’t think most of the people think on this topic, that’s why philosopher used to say that religion is a blind faith, and sometimes blindness in religion goes to infinite without limit which became profitable to false saints. Actually we should study and investigate to find our real creator as we do before buying any product or while opting subjects in our study.
    Every religion taught us some different aspect to pray our creator, some people consider a magician as a creator, when they saw some magic by that magician, some people are praying to Trees, Sun, Moon, Stars, Animal, Stone, River and Mountain.

    But one more interesting thing is that we (human) are the smartest, best and most noble creation of God, do you ever think why human beings are called the best creation of God? I will tell you few features which makes us (human) best in compare to other creation from God.
    1. Only human have an intelligent and powerful brain and also have will power.
    2. A human can have dreams to makes his/her life better.
    3. Only human have skills to survive in any situation.
    4. Only human have ability to perceive what is right and what is wrong.
    5. Without taking help from others we (human) can do anything. Nothing is impossible for a human.


    Conclusion: Then why human not use his/er intelligent mind to identify the creator instead of pray and following blindly to anyone or anything.


    We need your view as well on this. Please let us know your thought in our comment section.

    Cannot make a static reference to the non-static method

    Cannot make a static reference to the non-static method display(String) from the type RunAndTest.
    We cannot access or call a non static method or variable from a static method or main method(which is also a static method) of a class. Since non-static method and variables belongs to the instance of the class and we call them instance variable and method, but static method and variable are directly belongs to class which we called member variable and method.
    We can access a non-static variable and method in static method only using the instance of the class. But if you want to access any non-static variable and method in non-static method of the same class then we can access them without instance of the class.


    Why we can not access? 

    As soon as our program loaded into memory at the same time all static variable, method and block get loaded in the memory as well, and JVM will maintain only single copy of those static thing through all over the class. And all non-static components will get loaded into the memory when we create instance of that class that why we called them instance variable/method, and when you create another instance of that class then a new and separate memory will be get allocated for all those variables and methods for that instance.

    In case if you will write a code to access a non-static member in static method without instance of that class then compiler will through the error "Cannot make a static reference to the non-static method".

    Below is a code sample which you could just copy and paste in your IDE and understand the concept of this static and non-static.

    Compilation fail while accessing a non-static method in static method.


    package coreJava;
    public class RunAndTest {
    public static void main(String[] args) {
    display("string"); //This line of code will through compile time error "cannot make a static reference to the non-static method display(String) from the type RunAndTest"
    }
    void display(RunAndTest rt){
    System.out.println("Test");
    display("sdj");
    }
    void display(String string){
    System.out.println("String method");
    }
    }

    Access a non-static method in static method, with the help of object of the class.


    package coreJava;public class RunAndTest { public static void main(String[] args) { RunAndTest rt=new RunAndTest(); rt.display("string"); 
    } void display(RunAndTest rt){ System.out.println("Test"); display("sdj"); } void display(String string){ System.out.println("String method"); }} 

    What is Sling and why have multiple scripts/renderers for a Component?


    Apache Sling is one of the technology stack of AEM/CQ5 CMS on which AEM is built on. Sling is a Web application framework based on REST principles that provides easy development of content-oriented applications. In general terms we can say Sling is used to resolve the resources or URI in our application. Sling uses a JCR repository, such as Apache Jackrabbit or Day's CRX, as its data  store.
    Sling maps HTTP request URLs to content resources based on the request's path, extension and selectors.

    The Resource is one of the central parts of Sling. Extending from JCR, Everything is Content, and Sling assumes that Everything is a Resource.

    Apache Sling is included in the installation of CQ5. Sling has since been contributed to the Apache Software Foundation - further information can be found at Apache Sling.
    Using Apache Sling, the type of content to be rendered is not the first processing consideration. Instead the main consideration is whether the URL resolves to a content object for which a script can then be found to perform the rendering. This provides excellent support for Web content authors to build
    Pages which are easily customized to their requirements.
    The advantages of this flexibility are apparent in applications with a wide range of different content elements, or when you need Pages that can be easily customized/viewed differently.


    How sling used to resolve a URL (Resource) in AEM? and How sling works internally?

    The following diagram explains the Sling script resolution. It shows how to get from HTTP request to content node, from content node to resource type, from resource type to script and what scripting variables are available.

    how sling resolve a resource in AEM. Adobe CQ, AEM sling resource resolver, how sling works.
    Sling Resource resolver


    The following diagram explains all the hidden, but powerful request parameters you can use when dealing with the SlingPostServlet, the default handler for all POST requests that gives you endless options for creating, modifying, deleting, copying and moving nodes in the repository.

    We will now see how sling resolve a URL by using the above resolution diagram.

    1. Actual URL get divided into the following chunks. e.g. we have a URL " www.rashidjorvee.blogspot.com/blog/post/aboutrashid.print.html/printable?height=400,width=200" and now we will see how sling will resolve my URL.
    • Request Method: This information comes in request header.
    • Content Path: [/blog/post/aboutrashid] 
    • Seletor: [print]
    • Extension: [html]
    • Suffix:
    • Query parameter : [height=400,width=200]
    2. Sling will go to the requested content path.

    3. Then it will check whether that content path or component has property sling:resourceSuperType or sling:resourceType. If request found any of these property in that node then sling request move to that path which is present in the sling:resourceType or sling:resourceSuperType.


    sling:resourceType is used to render to script files.

    sling:resourceSuperType is used to overload or inherit a existing component.



    4. Then render to the path given in resourceType and resourceSuperType property to load the script or inherit the functionality. To resolve this first sling will find the path under apps directory, in case that content path is not available in apps then request will move under libs directory. 


    5.  In this step sling will look for script name and try to match with the exact request URL with requested selector and extension. There is a set of rules which sling follow to match the selector and extension. Following are the rules:

    • Folders (i.e. nodes of type nt:folder) take precedence over jsp file names when resolving using selectors, at least for the first selector.
    • Only one selector in a file name has any effect - any files with names containing two selectors don't ever get selected, but names of folders can be used to match the selectors in the request.
    • Scripts with HTTP method names (e.g.,GET.jsp) is selected as a last resort, (after the default script: jobs.jsp, in this case).
    • Scripts with names that include HTTP methods in addition to another selector or extension in a .jsp file name are never selected.



    علم

    علم


    ﺍﯾﮏ ﺍﺳﺘﺎﺩ ﺗﮭﺎ ﻭﮦ ﺍﮐﺜﺮ ﺍﭘﻨﮯ ﺷﺎﮔﺮﺩﻭﮞ ﺳﮯ ﮐﮩﺎ ﮐﺮﺗﺎ ﺗﮭﺎ ﮐﮧ ﯾﮧ ﺩﯾﻦ ﺑﮍﺍ ﻗﯿﻤﺘﯽ ﮨﮯ۔ ﺍﯾﮏ ﺭﻭﺯ ﺍﯾﮏ ﻃﺎﻟﺐ ﻋﻠﻢ ﮐﺎ ﺟﻮﺗﺎ ﭘﮭﭧ ﮔﯿﺎ۔ ﻭﮦ ﻣﻮﭼﯽ ﮐﮯ ﭘﺎﺱ ﮔﯿﺎ ﺍﻭﺭ ﮐﮩﺎ :  ﻣﯿﺮﺍ ﺟﻮﺗﺎ ﻣﺮﻣﺖ ﮐﺮﺩﻭ۔ ﺍﺱ ﮐﮯ ﺑﺪﻟﮧ ﻣﯿﮟ ، ﻣﯿﮟ ﺗﻤﮩﯿﮟ ﺩﯾﻦ ﮐﺎ ﺍﯾﮏ ﻣﺴﺌﻠﮧ ﺑﺘﺎﺅﮞ ﮔﺎ۔
    ﻣﻮﭼﯽ ﻧﮯ ﮐﮩﺎ : ﺍﭘﻨﺎ ﻣﺴﺌﻠﮧ ﺭﮐﮫ ﺍﭘﻨﮯ ﭘﺎﺱ۔ ﻣﺠﮭﮯ ﭘﯿﺴﮯ ﺩﮮ۔
    ﻃﺎﻟﺐِ ﻋﻠﻢ ﻧﮯ ﮐﮩﺎ : ﻣﯿﺮﮮ ﭘﺎﺱ ﭘﯿﺴﮯ ﺗﻮﻧﮩﯿﮟ ﮨﯿﮟ۔
    ﻣﻮﭼﯽ ﮐﺴﯽ ﺻﻮﺭﺕ ﻧﮧ ﻣﺎﻧﺎ۔ ﺍﻭﺭ ﺑﻐﯿﺮ ﭘﯿﺴﮯ ﮐﮯ ﺟﻮﺗﺎ ﻣﺮﻣﺖ ﻧﮧ ﮐﯿﺎ۔ﻃﺎﻟﺐِ ﻋﻠﻢ ﺍﭘﻨﮯ ﺍﺳﺘﺎﺩ ﮐﮯ ﭘﺎﺱ ﮔﯿﺎ ﺍﻭﺭ ﺳﺎﺭﺍ ﻭﺍﻗﻌﮧ ﺳُﻨﺎ ﮐﺮ ﮐﮩﺎ 
    ﻟﻮﮔﻮﮞ ﮐﮯ ﻧﺰﺩﯾﮏ ﺩﯾﻦ ﮐﯽ ﻗﯿﻤﺖ ﮐﭽﮫ ﺑﮭﯽ ﻧﮩﯿﮟ۔ ﺍﺳﺘﺎﺩ ﻋﻘﻞ ﻣﻨﺪ ﺗﮭﮯ : ﻃﺎﻟﺐِ ﻋﻠﻢ ﺳﮯ ﮐﮩﺎ 
    ﺍﭼﮭﺎ ﺗﻢ ﺍﯾﺴﺎ ﮐﺮﻭ : ﻣﯿﮟ ﺗﻤﮩﯿﮟ ﺍﯾﮏ ﻣﻮﺗﯽ ﺩﯾﺘﺎ ﮨﻮﮞ ﺗﻢ ﺳﺒﺰﯼ ﻣﻨﮉﯼ ﺟﺎ ﮐﺮ ﺍﺱ ﮐﯽ ﻗﯿﻤﺖ ﻣﻌﻠﻮﻡ ﮐﺮﻭ۔
    ﻭﮦ ﻃﺎﻟﺐِ ﻋﻠﻢ ﻣﻮﺗﯽ ﻟﮯ ﮐﺮ ﺳﺒﺰﯼ ﻣﻨﮉﯼ ﭘﮩﻨﭽﺎ ﺍﻭﺭ ﺍﯾﮏ ﺳﺒﺰﯼ ﻓﺮﻭﺵ ﺳﮯ ﮐﮩﺎ 
    ﺍﺱ ﻣﻮﺗﯽ ﮐﯽ ﻗﯿﻤﺖ ﻟﮕﺎﺅ۔ﺍﺱ ﻧﮯ ﮐﮩﺎ ﮐﮧ ﺗﻢ ﺍﺱ ﮐﮯ ﺑﺪﻟﮯﯾﮩﺎﮞ ﺳﮯ ﺩﻭ ﺗﯿﻦ ﻟﯿﻤﻮﮞ ﺍُﭨﮭﺎ ﻟﻮ۔ﺍﺱ ﻣﻮﺗﯽ ﺳﮯ ﻣﯿﺮﮮ ﺑﭽﮯ ﮐﮭﯿﻠﯿﮟ ﮔﮯ۔ ﻭﮦ ﺑﭽﮧ ﺍﺳﺘﺎﺩ ﮐﮯ ﭘﺎﺱ ﺁﯾﺎ ﺍﻭﺭ ﮐﮩﺎ : ﺍﺱ ﻣﻮﺗﯽ ﮐﯽ ﻗﯿﻤﺖ ﺩﻭ ﯾﺎ ﺗﯿﻦ ﻟﯿﻤﻮﮞ ﮨﮯ۔
    ﺍﺳﺘﺎﺩ ﻧﮯ ﮐﮩﺎ 
    ﺍﭼﮭﺎ ﺍﺏ ﺗﻢ ﺍﺱ ﮐﯽ ﻗﯿﻤﺖ ﺳُﻨﺎﺭ ﺳﮯ ﻣﻌﻠﻮﻡ ﮐﺮﻭ۔ﻭﮦ ﮔﯿﺎ ﺍﻭﺭ ﭘﮩﻠﯽ ﮨﯽ ﺩﮐﺎﻥ ﭘﺮ ﺟﺐ ﺍﺱ ﻧﮯ ﻣﻮﺗﯽ ﺩﮐﮭﺎﯾﺎ ﺗﻮ ﺩﮐﺎﻥ ﺩﺍﺭ ﺣﯿﺮﺍﻥ ﺭﮦ ﮔﯿﺎ۔
    ﺍﺱ ﻧﮯ ﮐﮩﺎ ﺍﮔﺮ ﺗﻢ ﻣﯿﺮﯼ ﭘﻮﺭﯼ ﺩﮐﺎﻥ ﺑﮭﯽ ﻟﮯ ﻟﻮ ﺗﻮ ﺑﮭﯽ ﺍﺱ ﻣﻮﺗﯽ ﮐﯽ ﻗﯿﻤﺖ ﭘﻮﺭﯼ ﻧﮧ ﮨﻮﮔﯽ۔ ﻃﺎﻟﺐِ ﻋﻠﻢ ﻧﮯ ﺍﭘﻨﮯ ﺍﺳﺘﺎﺩ ﮐﮯ ﭘﺎﺱ ﺁﮐﺮ ﻣﺎﺟﺮﺍ ﺳُﻨﺎﯾﺎ۔ ﺍﺳﺘﺎﺩ ﻧﮯ ﮐﮩﺎ 
    ﺑﭽﮯ ! ﮨﺮ ﭼﯿﺰ ﮐﯽ ﻗﯿﻤﺖ ﺍﺱ ﮐﯽ ﻣﻨﮉﯼ ﻣﯿﮟ ﻟﮕﺘﯽ ﮨﮯ۔ ﺩﯾﻦ ﮐﯽ ﻗﯿﻤﺖ ﺍﻟﻠﮧ ﮐﯽ ﻣﻨﮉﯼ ﻣﯿﮟ ﻟﮕﺘﯽ ﮨﮯ۔ﺍﺱ ﻗﯿﻤﺖ ﮐﻮ ﺍﮨﻞِ ﻋﻠﻢ ﮨﯽ ﺳﻤﺠﮭﺘﮯ ﮨﯿﮟ۔ ﺟﺎﮨﻞ ﮐﯿﺎ ﺟﺎﻧﮯ ﺩﯾﻦ ﮐﯽ ﻗﯿﻤﺖ ﮐﯿﺎ ﮨﮯ ۔

    Difference between hear and listen

    Do you know what's the difference between "hear" and "listen"? 
    What's the difference between saying "I can't hear you" and "I can't listen to you"?

    Hear


    Hear = to receive sounds using your ears. 
    This is a passive action, meaning you don't necessarily make a special effort to notice the sounds. 
    Examples:
    • She can't hear very well.
    • He heard strange noise coming from the kitchen.
    • I could hear him snoring in the other room.
       

    Listen


    Listen = to give attention to something or someone because you want to hear them.
    Examples:
    • The kids were listening to the story with great interest.
    • She is listening to music on her iPod.
    • Listen to me, you have to do exactly as I say. 
    In conclusion, when you listen to something, it means you intend to receive the sounds. You are trying to hear it. 
    So if you say, "I can't hear you," it means there is noise, or something else, that doesn't let the sounds reach you.
    But when you say, "I can't listen to you," it means you don't want to put your attention on what the other person says. You don't want the sounds to reach you.

    Reference: 
    1.http://really-learn-english.us6.list-manage.com/
    2. http://us6.campaign-archive2.com/?u=b578236440&id=eb739c2bb2&e=27e48a3c12

    Auto email sender in ASP.NET with C#

    In this blog we will learn: How to trigger email notification in ASP.NET with C# or automatically send email notification using gmail SMTP.
    In this electronic era everyone wants a contact us page in their website and on that page people want a adaptive form where their users fill that form with required details and submit. Which may later use those details by admin of that website to contact that user. To create a adaptive form and on click on submit button admin will receive an email. 

    first we will design our adaptive form in html, below is the sample.
    <html>
    <head>
        <title>Adaptive Form/Contact Us</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <table style="width: 247px; height: 105px">
                <tr>
                    <td>
                        Name:</td>
                    <td>
                        <asp:TextBox ID="txtname" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        Email:</td>
                    <td>
                        <asp:TextBox ID="txtemail" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        Message</td>
                    <td>
                        <asp:TextBox ID="txtmes" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnsend" runat="server" Text="Submit" Width="89px" OnClick="btnsend_Click" /></td>
                </tr>
            </table>
       
        </div>
        </form>
    </body>
    </html>

    Now on the click event of submit button we will write the following C# code.
    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Net.Mail;
    using System.Net;
    using System.Text;
    using System.Collections.Generic;

    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void btnsend_Click(object sender, EventArgs e)
        {
           
            SmtpClient smtpClient = new SmtpClient();
            MailMessage message = new MailMessage();
            try
            {
                // Gmail Address from where you send the mail
                string fromAddress = "from@gmail.com";
                // any address where the email will be sending
                string toAddress = "to@admin.com";
                //Password of your gmail address
                const string fromPassword = "Put your password here";
                // Passing the values and make a email formate to display
                string subject = "Request";
                string body = "From: " + txtname.Text + "\n";
                body += "Email: " + txtemail.Text + "\n";
                body += "Subject: " + txtmes.Text + "\n";
                            // smtp settings
                SmtpClient smtp = new System.Net.Mail.SmtpClient();
                {
                    smtp.Host = "smtp.gmail.com";
                    smtp.Port = 587;
                    smtp.EnableSsl = true;
                    smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
                    smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
                    smtp.Timeout = 20000;
                }
                // Passing values to smtp object
                smtp.Send(fromAddress, toAddress, subject, body);
                Label1.Text = "Email successfully sent.";
            }
            catch (Exception ex)
            {
                Label1.Text = "Send Email Failed." + ex.Message;
            }
        }
    }

    Now debug the code and test the functionality 

    politics policy and plan

    If you didn't understand the plan of your opposition, that means it is politics.

    Or if you understood the plan of your opposition, that means it is a policy.
    - @Rashid Jorvee

    #politics #plan #policy #Jorvee

    Sachin Tendulkar and his way of living

    Mere papa hamesha mujhse kahte the.... tumne Zindagi me Cricket ko chuna hai, woh ek baat hai, lekin AKHIR tak jo baat aapke sath hogi woh ye hogi ke aap Insaan honge. 
    - Sachin Tendulkar


    Translation: My father always used to told me, you have chosen to play Cricket, that is just only one chapter in your life, but somthing that will stay permanently with you; is a Human you are.

    Note: whatever profession you have chosen in your life, you are always a Human. So show your humanity everywhere. Go back for a moment and look where our ancestors are, where those people are who were king and made world largest emperor. Don't be greedy this world is not going to be always with you.

    #Sachin #GodofCricket #SachinTendulkar #India #cricket #jorvee

    Simple Spring project example

    Create a implementation class ImplCode.java

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    import org.springframework.context.ApplicationContext;
    
    import org.springframework.context.support.FileSystemXmlApplicationContext;
    
    public class ImplCode {
    
     public static void main(String[] args) {
    
      ApplicationContext appContext=new FileSystemXmlApplicationContext("AppContextBeanFile.xml");
    
      Fruit fruit=appContext.getBean("fruit", Fruit.class);
    
      Vegetable veg=(Vegetable) appContext.getBean("veg");
    
      System.out.println(fruit.whoareyou());
    
      System.out.println(veg.whoareyou());
    
     }
    
    }
    

    Create a bean class Vegetable.java

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    package rashiddemo;
    
    public class Vegetable {
    
     public String whoareyou() {
    
      String intro="I am vegetable!!";
    
      return intro;
    
     }
    
    }
    

    Create another bean class Fruit.java

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    package rashiddemo;
    
    public class Fruit {
    
     public String whoareyou() {
    
      String intro="I am fruit!";
    
      return intro;
    
     }
    
    }
    

    Create a AppContextBeanFile.xml and add your bean classes using bean tag.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans"
    
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    
      <bean id="fruit" class="rashiddemo.Fruit"></bean>
    
     <bean id="veg" class="rashiddemo.Vegitable"></bean>
    
    </beans>
    

    Puzzles

    Four people need to cross a bridge in 17 minutes in the middle of the night. The bridge can only hold two or less people at any time and they only have one flashlight so they must travel together (or alone). The flashlight can only travel with a person so every time it crosses the bridge it must be carried back. Tom can cross in 1 minute, John can cross in 2 minutes, Sally can cross in 5 minutes, and Connor can cross in 10 minutes. If two people cross together they go as fast as the slower person.

    How can they cross the bridge in 17 minutes or less?


    Answer: First Tom and John will cross (2 minutes). Then Tom will bring the flashlight back (1 minute). Next Sally and Connor will cross (10 minutes). Then John will bring the flashlight back (2 minutes). Finally John and Tom will cross (2 minutes). 2 + 1 + 10 + 2 + 2 = 17 minutes.

    SAP ABAP TCODE with Description


    Tcode
    Description
    Tcode
    Description
    AL11
    SAP Directories
    SE93
    Maintain Transaction
    BAPI
    BAPI Explorer
    SHD0
    Transaction & Screen Variants
    CMOD
    Project Management of SAP Enhancements
    SHDB
    Transaction Recorder
    OAOR
    Business Document Navigator
    SLIN
    ABAP program extended syntax check
    SA38
    ABAP : Execute Program
    SM04
    User List
    SALE
    IDoc and ALE Development
    SM12
    Lock Entries
    SCDO
    Change Document Objects
    SM13
    Update Requests
    SCI
    Code Inspector
    SM30
    Maintain Table Views
    SCOT
    SAPConnect : Administration
    SM35
    Batch Input : Session Overview
    SE01
    Transport Organizer (extended view)
    SM36
    Define Background Job
    SE03
    Transport Organizer Tools
    SM37
    Simple Job Selection
    SE09
    Transport Organizer
    SM49
    External Operating System Commands
    SE11
    ABAP Dictionary
    SM50
    Process Overview
    SE14
    Database Utility
    SM59
    RFC Destinations
    SE16
    Data Browser
    SMARTFORMS
    SAP Smart Forms
    SE18
    Business Add-ins(BADI’s): Definition
    SMARTSTYLES
    Smart Styles
    SE19
    Business Add-ins(BADI’s): Implementation
    SMOD
    SAP Enhancements
    SE24
    Class Builder
    SNOTE
    SAP Note Assistant
    SE30
    ABAP Runtime Analysis
    SO10
    Standard Text
    SE36
    Logical Database Builder
    SP01
    Spool List
    SE37
    Function Builder
    SPAD
    Spool Administration
    SE38
    ABAP Editor
    SPRO
    SAP Customizing
    SE39
    ABAP Splitscreen Editor
    SQ01
    SAP Query
    SE41
    Menu Painter
    ST05
    SQL Trace
    SE43N
    Area Menus
    STMS
    Transport Management System
    SE51
    Screen Painter
    ST22
    Dump Analysis
    SE71
    Form painter
    SU21
    Authorization Objects
    SE75
    SAPScript Settings
    SU01
    User Maintenance
    SE80
    Object Navigator
    SU53
    Display Authorization Data
    SE91
    Message Maintenance