Skip to content

Instantly share code, notes, and snippets.

var bookingTargetClickCheck = this.state.bookingTargetBlockCheck;
if (bookingTargetClickCheck.length !== 0) {
let targetCells = document.getElementsByClassName('desplay-booking-row');
while (targetCells[0]) {
targetCells[0].parentNode.removeChild(targetCells[0]);
}
}
function pushToFaciltyAndSportsArray(arr, obj) {
const index = arr.findIndex((e) => e.value === obj.value);
if (index === -1) {
arr.push(obj);
} else {
arr[index] = obj;
}
}
https://jsbin.com/qikegofepa/edit?html,css,output
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#ffffff" width="100" style="width: 100%;padding: 5% 3%;">
<tr>
<td width="50%" style="width: 50%">
<div>
<div style="display: inline-block;">
<img src="#" style="width: 80px;height: 80px;">
</div>
<div style="display: inline-block;vertical-align: top;padding-left: 1px;">
@Sunil-ghodela
Sunil-ghodela / stockMaxProfit.py
Created August 29, 2019 15:59
Stock Buy Sell to Maximize Profit
minVal = 0
maxVal = 10
stockArray = [100, 180, 260, 310, 40, 535, 695]
def maxProfitAaja(stockList):
start = 0
stockProfitList = []
stockBuy = None
a = [[1, 2, 3, 4], [5, 6], [7, 8, 9]]
for i in range(len(a)):
for j in range(len(a[i])):
print(a[i][j], end=' ')
print()
@Sunil-ghodela
Sunil-ghodela / PythonListScore.py
Created August 21, 2019 18:56
Frequency of list item in a list
we = ['a', 'w', 'a', 'i']
temp_dict = {}
for w in we:
no_count = temp_dict.get(w, '')
if no_count == '':
temp_dict[w] = 1
else:
temp_dict[w] = no_count+1
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.findInternal = function(g, l, v) {
g instanceof String && (g = String(g));
for (var A = g.length, G = 0; G < A; G++) {
var L = g[G];
if (l.call(v, L, G, g))
return {
i: G,
v: L
// data[['type']] = payloads['room'];
// data[payloads['data']] = {};
// data[payloads['data']][payloads['type']] = payloads['create'];
// data[payloads['data']][payloads['room']] = {};
// data[payloads['data']][payloads['room']][
// payloads['started_by']
// ] = chat_starter_username;
// data[payloads['data']][payloads['room']][
// payloads['chat_invite']
// ] = false;
JSON.parse("["+document.querySelector("input[name='specialty']").value+"]");