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
| #!/usr/bin/env python3 | |
| import os, sys, time, argparse, requests | |
| from urllib.parse import urlparse, parse_qs | |
| API = "https://api.github.com" | |
| def gh_headers(token): | |
| return { | |
| "Authorization": f"Bearer {token}", | |
| "Accept": "application/vnd.github+json", |
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
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| type GeomatryFormula interface { | |
| area() float64 | |
| } |
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
| #!/bin/bash | |
| # Update Package | |
| sudo apt update | |
| # Upgrade Package | |
| sudo apt upgrade | |
| # Install Apache2, MySQL, PHP | |
| sudo apt install apache2 |
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
| <html> | |
| <head> | |
| <meta http-equiv='Content-type' content='text/html;charset=UTF-8' > | |
| <script> | |
| function startRead() | |
| { | |
| // obtain input element through DOM | |
| var file = document.getElementById('file').files[0]; | |
| if(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
| <?php | |
| header('Content-Type: application/json'); | |
| $method = $_SERVER['REQUEST_METHOD']; | |
| //GET Request | |
| switch ($method) { | |
| case 'GET': // read data |
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 number2text(value) { | |
| var fraction = Math.round(frac(value)*100); | |
| var f_text = ""; | |
| if(fraction > 0) { | |
| f_text = "AND "+convert_number(fraction)+" POISA"; | |
| } | |
| return convert_number(value)+" TAKA "+f_text+" ONLY"; | |
| } |
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
| /** | |
| * Get the needed authorization credentials from the request. | |
| * | |
| * @param \Illuminate\Http\Request $request | |
| * @return array | |
| */ | |
| protected function credentials(\Illuminate\Http\Request $request) | |
| { | |
| //return $request->only($this->username(), 'password'); | |
| return ['email' => $request->{$this->username()}, 'password' => $request->password, 'status' => 1]; |
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
| // First of all you need to create a Middleware | |
| php artisan make:middleware LastUserActivity | |
| // Add this Middleware in Kernel | |
| protected $middlewareGroups = [ | |
| 'web' => [ | |
| \App\Http\Middleware\EncryptCookies::class, | |
| \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | |
| \Illuminate\Session\Middleware\StartSession::class, | |
| // \Illuminate\Session\Middleware\AuthenticateSession::class, |
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 roman_to_Int(str1) { | |
| if(str1 == null) return -1; | |
| var num = char_to_int(str1.charAt(0)); | |
| var pre, curr; | |
| for(var i = 1; i < str1.length; i++){ | |
| curr = char_to_int(str1.charAt(i)); | |
| pre = char_to_int(str1.charAt(i-1)); | |
| if(curr <= pre){ | |
| num += curr; |