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
autocomplete="nope" | |
autocomplete="new-password" | |
input:-webkit-autofill, | |
textarea:-webkit-autofill, | |
select:-webkit-autofill { | |
appearance: menulist-button; | |
background-color: rgb(232, 240, 254) !important; /* Light theme background color */ | |
-webkit-text-fill-color: #ffffff !important; | |
-webkit-caret-color: white !important; |
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
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.setData(Uri.parse(uri)); | |
if (packageName != null && !packageName.equals("")) { | |
intent.setPackage(packageName); | |
} | |
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // add this line to lanuch in parallel or comment if launch inside your app. | |
// intent.putExtras(extras); | |
startActivity(intent); |
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
function getPlatform() { | |
const userAgent = navigator.userAgent || navigator.vendor || window.opera; | |
// Check for iOS | |
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { | |
return 'iOS'; | |
} | |
// Check for Android | |
if (/android/i.test(userAgent)) { |
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
/* 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 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
{ | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-line-clamp: 1; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
color: #63b5ff; | |
} |
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
.required : after{ | |
content:'*'; | |
color:red; | |
padding-left: 2px; | |
} |
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
preg_match('~\{(?:[^{}]|(?R))*\}~', $message, $res); | |
$response = json_decode($res[0], true); |
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
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 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
<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 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
# 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) | |
NewerOlder