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
/* Chrome, Safari, Edge, Opera */ | |
input::-webkit-outer-spin-button, | |
input::-webkit-inner-spin-button { | |
-webkit-appearance: none; | |
margin: 0; | |
} | |
/* Firefox */ | |
input[type=number] { | |
-moz-appearance: textfield; |
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
{ | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-line-clamp: 1; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
color: #63b5ff; | |
} |
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
.required : after{ | |
content:'*'; | |
color:red; | |
padding-left: 2px; | |
} |
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
preg_match('~\{(?:[^{}]|(?R))*\}~', $message, $res); | |
$response = json_decode($res[0], 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
var forms = document.querySelectorAll('.needs-validation') | |
// Loop over them and prevent submission | |
Array.prototype.slice.call(forms) | |
.forEach(function (form) { | |
form.addEventListener('submit', function (event) { | |
if (!form.checkValidity()) { | |
event.preventDefault() | |
event.stopPropagation() | |
} |
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
<div class="form-control d-flex justify-content-between align-items-center"> | |
<input hidden type="file" accept=".pdf,.png,.jpeg,.jpg" name="bankFile" id="bankFile" class="form-control" required> | |
<p>{{__('BANK ac proof')}}</p> | |
<label for="bankFile" class="btn btn-light btn-sm">Upload</label> | |
</div> | |
<script> | |
$('input[type="file"]').on('change', function() { | |
$(this).next().html($(this).val().split("\\").splice(-1,1)[0] || "Select file"); | |
}); |
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
# Write data to CSV file using csv lib | |
import csv | |
header = ['Name', 'M1 Score', 'M2 Score'] | |
data = [['Alex', 62, 80], ['Brad', 45, 56], ['Joey', 85, 98]] | |
filename = 'Students_Data.csv' | |
with open(filename, 'w', newline="") as file: | |
csvwriter = csv.writer(file) ## 2. create a csvwriter object | |
csvwriter.writerow(header) ## 4. write the header | |
csvwriter.writerows(data) | |
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
# Open the CSV file using csv lib | |
import csv | |
file = open('Salary_Data.csv') | |
csvreader = csv.reader(file) | |
header = [] | |
header = next(csvreader) | |
header ## print header | |
rows = [] | |
for row in csvreader: | |
rows.append(row) |
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
# pip install PyPDF2 | |
## version 2 | |
import PyPDF2 | |
def add_newline_on_semicolon(pdf_path): | |
# Open the PDF file in binary mode | |
with open(pdf_path, 'rb') as pdf_file: | |
# Create a PDF reader object | |
pdf_reader = PyPDF2.PdfFileReader(pdf_file) | |
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
# pip install python-telegram-bot | |
from telegram.ext import Updater, MessageHandler, Filters | |
from telegram import ParseMode | |
import logging | |
# Set your Telegram bot token | |
TOKEN = 'your_bot_token' | |
# Set the user ID you want to monitor |
NewerOlder