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
//given A[0..(N-1)], compute Q queies of min(A[i..j]) in O(QlgN+NlgN) | |
int A[MAXN], a[MAXL][MAXN]; // MAXL = log(MAXN)+1 | |
void buildTree() | |
{ | |
for(int i = 0; i < N; i++) | |
a[0][i] = A[i]; | |
L = int(log2(N))+1; | |
for(int k = 0; k < L; k++) | |
{ | |
for(int i = 0; i < N; i++) |
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
#nohup bash ./run_worker.sh $1 $2 | |
#$1 = number of workers | |
#$2 = reset? | |
if [ "$2" == "reset" ]; then | |
php reset.php; | |
fi | |
for (( i = 0; i < $1; i++ )); do | |
php worker.php $i & | |
PID[$i]=$!; |
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
list = []; | |
$('.course-item-list-header').each(function(){ | |
$this = $(this); | |
data = {}; | |
data.name = $this.find('h3').text().trim(); | |
data.lectures = []; | |
$this.next().find('li').each(function(){ | |
data.lectures.push({ | |
name: $(this).find('.lecture-link').html().trim(), | |
video: $(this).find('[title="Video (MP4)"]').attr('href'), |
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
<canvas width=220 height=150></canvas> |
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
id | name | |
---|---|---|
-1 | Northern Cyprus | |
-2 | Kosovo | |
-3 | Somaliland | |
4 | Afghanistan | |
8 | Albania | |
10 | Antarctica | |
12 | Algeria | |
16 | American Samoa | |
20 | Andorra |
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
<?XML version="1.1" encoding="UTF-8"?> | |
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<keyboard group="126" id="-14287" name="প্রভাত" maxout="2"> | |
<layouts> | |
<layout first="0" last="17" modifiers="Modifiers" mapSet="ANSI"/> | |
<layout first="18" last="18" modifiers="Modifiers" mapSet="JIS"/> | |
<layout first="21" last="23" modifiers="Modifiers" mapSet="JIS"/> | |
<layout first="30" last="30" modifiers="Modifiers" mapSet="JIS"/> | |
<layout first="33" last="33" modifiers="Modifiers" mapSet="JIS"/> | |
<layout first="36" last="36" modifiers="Modifiers" mapSet="JIS"/> |
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
W, H = None, None | |
R, U, M = None, None, None | |
def marked(x, y): | |
if 0 <= x and x < W and 0 <= y and y < H: | |
return R[x][y] and R[x][y+1] and U[x][y] and U[x+1][y] | |
else: | |
return 0 | |
def mark(A, x, y): |
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
import requests | |
url = "https://amazon-price.p.rapidapi.com/azapi-azSearch" | |
querystring = {"prime":"false","query":"backpack","page":"1"} | |
headers = { | |
'x-rapidapi-host': "amazon-price.p.rapidapi.com", | |
'x-rapidapi-key': <YOUR-RAPIDAPI-KEY> | |
} |
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
ChatSound | |
Me: We have an amazon business prime account and purchase thousands of products worth $200,000-$300,000 each month. For last two days, we've noticed that all of the items we add to cart are showing delivery date AFTER september 9. Why is that? We've checked from a personal prime account which shows correct delivery date (Sept 02/03 etc). | |
You are now connected to chanchal from Amazon.com | |
chanchal: Hello, my name is chanchal. I'm here to help you today. | |
May I know the zipcode ? | |
Me: Any zipcode. | |
We have warehoused across the country. | |
chanchal: Could you please help me with the link of the item? | |
Me: Any item. | |
chanchal: On which you want to deliver the item? |
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
<?XML version="1.1" encoding="UTF-8"?> | |
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!--Last edited by Ukelele version 2.1.5 on 2011-05-17 at 00:50 (GMT+06:00)--> | |
<!----> | |
<!----> | |
<keyboard group="126" id="-14287" name="প্রভাত" maxout="2"> | |
<layouts> | |
<layout first="0" last="17" modifiers="Modifiers" mapSet="ANSI"/> | |
<layout first="18" last="18" modifiers="Modifiers" mapSet="JIS"/> | |
<layout first="21" last="23" modifiers="Modifiers" mapSet="JIS"/> |
OlderNewer