This file contains 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 is_permutation(arr1, arr2): | |
if len(arr1) == 0 or len(arr2) == 0 or len(arr1) != len(arr2): | |
return False | |
else: | |
for i in range(len(arr1)): | |
if arr1[i] != arr2[len(arr2)-1-i]: | |
return False | |
return True | |
This file contains 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 is_unique1(str): | |
str_set = set() | |
for char in str: | |
str_set.add(char.lower()) | |
if(len(str_set) == len(str)): | |
return True | |
else: | |
return False |
This file contains 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
<body class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #FFFFFF;"> | |
<table cellpadding="0" cellspacing="0" class="nl-container" role="presentation" | |
style="table-layout: fixed; vertical-align: top; min-width: 320px; Margin: 0 auto; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #FFFFFF; width: 100%;" | |
valign="top" width="100%"> | |
<tbody> | |
<tr style="vertical-align: top;" valign="top"> | |
<td style="word-break: break-word; vertical-align: top;" valign="top"> | |
<div style="background-color:transparent;"> | |
<div class="block-grid" | |
style="Margin: 0 auto; min-width: 320px; max-width: 500px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: transparent;"> |
This file contains 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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
This file contains 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 'PHPMailer/src/PHPMailer.php'; | |
require 'PHPMailer/src/SMTP.php'; | |
$mail = new PHPMailer\PHPMailer\PHPMailer(); | |
$mail->CharSet = 'UTF-8'; | |
$mail->IsSMTP(); // enable SMTP | |
$mail->SMTPDebug = 0; // debugging: 1 = errors and messages, 2 = messages only | |
$mail->SMTPAuth = true; // authentication enabled | |
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail |
This file contains 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
const express = require('express'); | |
const mongoose = require('mongoose'); | |
const bodyParser = require('body-parser'); | |
const path = require('path'); | |
var multer = require('multer') | |
const items = require('./routes/api/items'); | |
const assert = require('assert'); | |
const mongodb = require('mongodb'); | |
const formidable = require('formidable') | |
// DB Config |