Whenever you want to squash last commits in a single commit:-
first check your log
git log
var params = { | |
a : any.value, | |
b : other.value | |
}; // Add any no. of parameters you want to pass separated using "." | |
function paramsChange(params){ | |
var queryString = $.param(params); | |
var queryString = Object.keys(params).map((key) => { |
function getQueryStringValue (key) { | |
return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); | |
} | |
// Would write the value of the QueryString-variable called name to the console | |
var quer = getQueryStringValue("a"); |
# Save as server.py | |
# Message Receiver | |
import os | |
from socket import * | |
host = "" | |
port = 13000 | |
buf = 1024 | |
addr = (host, port) | |
UDPSock = socket(AF_INET, SOCK_DGRAM) | |
UDPSock.bind(addr) |
# Save as client.py | |
# Message Sender | |
import os | |
from socket import * | |
host = "" # set to IP address of target computer | |
port = 13000 | |
addr = (host, port) | |
UDPSock = socket(AF_INET, SOCK_DGRAM) | |
while True: | |
data = raw_input("Enter message to send or type 'exit': ") |
const cors = require('cors')({origin: true}); | |
exports.sample = functions.https.onRequest((req, res) => { | |
cors(req, res, () => { | |
res.send('Passed.'); | |
}); | |
}); |
function validateEmail(email) { | |
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(String(email).toLowerCase()); | |
} |
#include<iostream> | |
using namespace std; | |
class Singleton | |
{ | |
private: | |
static Singleton obj; | |
Singleton(){ | |
cout<<"Constructor does not get called"; | |
} |
import cv2 | |
import numpy as np | |
import os | |
import matplotlib.pyplot as plt | |
from scipy.spatial import distance | |
folder='cats' | |
f=os.listdir(folder) | |
cats=[] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, user-scalable=no | |
initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" /> | |
<title>Sahayak</title> | |
<script> |