Find Smaller And Bigger Number In C Language

/*———- C Scanf Sample Program ——-*/ main() { int number; printf(“Enter an integer number\n”); scanf(“%d”, &number;); if( number <100 ){ printf(“Your number is smaller than 100\n\n”); } else { printf(“Your number is greater than 100\n\n””); } } Output Enter an integer number 90 Your number is smaller than 100 Enter an integer number 155 Your […]

Java Script Function To Return Selected Checkbox Value

Get the selected checkbox value from the group of checkbox list in Javascript. I wrote one function to return the selected checkbox value in Javascript. <script type=’text/javascript> // Java Script function to return the selected checkbox value function Checkbox_Selection_Value_From_Group (){ fileid= $(\”input[name=’filegroup[]’]:checked\”).map(function() { return this.value; }).get(); if(fileid==”){ alert(‘Select Minimum One Check Box’); return false; }else{ […]

Randomize an array in javascript

This is the sample post of randomize array concept in javascript; In the below example i will show you to randomize an array using its position in java script. var _arrayOne=[1,2,3,4,5,6,7]; var _arrayTwo=[27,26,24,23,29,28,25]; var _randArrayOne=[]; var _randArrayTwo=[]; function random(){ document.write(“Before Randomize”); document.write(‘\n’); document.write(_arrayOne); document.write(‘\n’); document.write(_arrayTwo); document.write(‘\n’); for(var i=0; i < 7; i++) { var _random […]

Redirect Page In Javascript

ASSIGN REDIRECT URL REDIECT TO GO BACK WINDOW NAVIGATION WINDOW LOCATION REPLACE I added the code to redirect the page using javascript ASSIGN REDIRECT URL <script language=”javascript” type=”text/javascript”> window.location.href=REDIRECTURL; //or window.location=REDIRECTURL; </script> REDIECT TO GO BACK <script language=”javascript”> alert(“Go Back”); window.history.back(-1); </script> WINDOW NAVIGATION <script language=”javascript”> window.navigate(REDIRECTURL); </script> WINDOW LOCATION REPLACE <script language=”javascript”> window.location.replace(REDIRECTURL); </script>

Url Parsing In Jquery

Get Url(domain) parameter using jquery function. In below code, I wrote one function called getUrlVars(). Using this function you can get requesting parameter value. If parameter not found., It will return undefined response It was working for me good. var ID= getUrlVars()[“id”]; if(ID==undefined){ ID=”; } function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, […]

MongoDB Delete Collection

In this post, We will learn How to delete a collection from MongoDB. MongoDB shell command `db.collection.drop()` is used to drop the specified collection from the selected DB. Also, It will remove all the documents and indexes associated with the dropped collection. Syntax: db.collection_name.drop() Drop Query Response: It will return `true` when successfully drops a […]