This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Programmed by www.fb.com/sameer18051998*/ | |
#include<iostream.h> | |
#include<conio.h> | |
void BubbleSort(int[],int); | |
void main() | |
{clrscr(); | |
int AR[50],elem,n,index; | |
cout<<"\nWith How Many Elements Do You Want To Create An Array ?\n"; | |
cin>>n; | |
cout<<"\nEnter The Array Elements\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Programmed by www.fb.com/sameer18051998*/ | |
#include<iostream.h> | |
#include<conio.h> | |
void main() | |
{ | |
int i,j,n,loc,temp,min,a[30]; | |
cout<<"Enter the number of elements:"; | |
cin>>n; | |
cout<<"\nEnter the elements\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Programmed by www.fb.com/sameer18051998*/ | |
#include<iostream.h> | |
#include<conio.h> | |
void func(int[] , int); | |
void main() | |
{ clrscr(); | |
int m,a1[20]; | |
cout<<"\nEnter The Size Of The Array (Max. 20) \n"; | |
cin>>m; | |
cout<<"\nEnter The Array \n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "uri" | |
require "net/http" | |
require "nokogiri" | |
require "logger" | |
name_final = Array.new | |
uri = URI.parse("http://resultsarchives.nic.in/cbseresults/cbseresults2004/class12/cbse12.asp") | |
req = Net::HTTP::Post.new(uri.path, { | |
'Referer' => "http://resultsarchives.nic.in/cbseresults/cbseresults2004/class12/cbse12.htm", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ran_col() { //function name | |
var color = '#'; // hexadecimal starting symbol | |
var letters = ['7550FB','ff0000','66ff66','669900','9999ff','3366ff','990099','C0C0C0']; //Set your colors here | |
color += letters[Math.floor(Math.random() * letters.length)]; | |
document.getElementById('ENTER ELEMENT NAME').style.background = color; // Setting the random color on your div element. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RECAPTCHA_PUBLIC_KEY = '<public key>' | |
RECAPTCHA_PRIVATE_KEY = '<private key>' | |
def checkRecaptcha(response, secretkey): | |
url = 'https://www.google.com/recaptcha/api/siteverify?' | |
url = url + 'secret=' + str(secretkey) | |
url = url + '&response=' +str(response) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def validate_webhook(request): | |
data = dict(request.POST.lists()) | |
print(data) | |
mac_provided = data.pop('mac')[0] | |
print("mac provided is =") | |
print(mac_provided) | |
message = "|".join(v[0] for k, v in sorted(data.items(), key=lambda x: x[0].lower())) | |
# Pass the 'salt' without the <>. Found in API Integration dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
To match Date such as "20-21-2018" | |
(\d{2})[/.-](\d{2})[/.-](\d{4})$ | |
To match Mobile number such as "9810284901" | |
^[0][1-9]\d{9}$|^[1-9]\d{9}$ | |
To match a URL | |
^.*http.*$ | |
''' | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For handling Shopify 429 - https://gist.github.com/wowkin2/079844c867a1a06ce15ea1e4ffdee87c | |
def patch_shopify(): | |
connection_func = ShopifyConnection._open | |
decode_func = formats.JSONFormat.decode | |
def patch_decode(resource_string): | |
count_format_error = 0 | |
while count_format_error <= 2: | |
try: |
OlderNewer