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
<?php | |
// create database 'db' and a table 'students' with cols INT 'id' and VARCHAR(2500) 'info' | |
$begin_id = 42332; // first id | |
$end_id = 45408; // last id | |
// 42332 to 45408 are ids of my college students 2nd yr to final yr | |
// mysql database info |
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
#include <stdio.h> | |
int main(void) { | |
int carry,i,j,x,lenArr; | |
int N = 100; // Factorial of 100 | |
int Arr[158] = {0}; // Factorial of 100 is approximately 9 * 10^157 => 157 digits | |
Arr[0] = 1; | |
lenArr = 1; // Number of elements in Arr | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int isprime(int n) | |
{ | |
int i, w; | |
if (n == 2) return 1; | |
if (n == 3) return 1; | |
if (n % 2 == 0) return 0; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define SWAP(X, Y) char T;T=X;X=Y;Y=T; | |
int main() | |
{ | |
printf("###############################\n"); | |
printf("####### Count Technique #######\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
<?php | |
$mysql_hostname = 'localhost'; | |
$mysql_username = 'your_mysql_username'; | |
$mysql_password = 'your_mysql_password'; | |
$database = 'your_mysql_database'; | |
$table = 'your_mysql_table' ; | |
$con = new mysqli($mysql_hostname, $mysql_username, $mysql_password, $database); |
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 re | |
if __name__ == '__main__': | |
regex = re.compile(r'^([asdfgqwertzxcv]*|[hjklyuiopbnm]*)$') | |
with open('words.txt', 'r') as fptr: | |
for word in fptr: | |
if regex.match(word): | |
meat = regex.match(word).group(1) | |
print(meat) | |
# To print words with length greater than 7: |
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
aaron | |
aback | |
abacus | |
abaft | |
abalone | |
abandon | |
abandoned | |
abandonment | |
abandons | |
abase |
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
accede | |
acceded | |
access | |
accessed | |
accesses | |
accra | |
accreted | |
ace | |
aced | |
acers |
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
accessed, accesses, accreted, acetates, actresses, addressed, addressee, addressees, addresses, adverted, affected, aftercare, aftereffect, aftereffects, aftertaste, afterward, afterwards, agaragar, aggravate, aggravated, aggravates, aggregate, aggregated, aggregates, arrested, arrester, artefact, artefacts, asserted, assessed, assesses, attested, attracted, attracts, averaged, averages, cadavers, carcases, carcasses, careered, carefree, caressed, caresses, cascaded, cascades, cassette, cassettes, castrate, castrated, cataract, cataracts, caterers, cratered, crevasse, crevasses, deceased, deceases, decrease, decreased, decreases, defeated, defeater, defecate, defected, deferred, degraded, degrades, degrease, desecrate, desecrated, desecrates, deserted, deserter, deserters, deserved, deserves, desserts, detected, deterred, detested, detester, detesters, detracted, detracts, devastate, devastated, draftees, drafters, dressage, dressers, eastward, eastwards, effected, etcetera, exaggerate, exaggerated, exaggerat |
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 re | |
if __name__ == '__main__': | |
regex = re.compile(r'^([qwertyuiop]*|[asdfghjkl]*|[zxcvbnm]*)$') | |
with open('words.txt', 'r') as fptr: | |
for word in fptr: | |
if regex.match(word): | |
meat = regex.match(word).group(1) | |
# Print words with length greater than 7: | |
if len(meat) > 7: |
OlderNewer