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
find = lambda number, max: len([n for n in (a/b for a,b in (((a*b),(a+b)) for a in range(1,max) for b in range(1, max)) if a != 0 or b != 0) if n == number]) | |
print(find(7, 1000)) |
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 | |
namespace ForumBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Class LastThread | |
* @package ForumBundle\Entity | |
*/ |
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
(function(){ | |
const canvas = document.getElementById('canvas'); | |
let split = false; | |
let eject = false; | |
function loop() { | |
const width = window.innerWidth; | |
const height = window.innerHeight; |
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
(function(){ | |
let localGsc = 1; | |
function loop() { | |
const gamepad = navigator.getGamepads()[0]; | |
if (!gamepad) { | |
console.log('gamepad not found'); |
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 AWS = require('aws-sdk'); | |
const s3 = new AWS.S3({ | |
endpoint: 'http://s3.us.archive.org', | |
accessKeyId: 'yourkeyid', // set your access key id | |
secretAccessKey: 'youraccesskey', // set your access key | |
signatureVersion: 'v2', | |
s3ForcePathStyle: 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
<?php | |
class Payment | |
{ | |
public $id; | |
public $posId; | |
public $amount; | |
public $currency; | |
public function getOrderId() |
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
package tugrul; | |
import java.nio.charset.Charset; | |
import java.util.Locale; | |
public class TurkishCharacter { | |
public static void main(String[] args) { | |
Locale.setDefault(Locale.ENGLISH); |
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 | |
class MyArrayObject extends \ArrayObject | |
{ | |
public function offsetGet($index) | |
{ | |
if (!parent::offsetExists($index)) { | |
parent::offsetSet($index, new MyArrayObject(array(), \ArrayObject::ARRAY_AS_PROPS)); | |
} | |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
.connect_timeout = 5s; | |
.first_byte_timeout = 30s; | |
.between_bytes_timeout = 60s; | |
} | |
backend nodejs { | |
.host = "127.0.0.1"; |
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 key = 'secretsecretsecretsecretsecretse'; | |
var encrypted = 'msPH3nRKogXTrltyHHbPqQKznV8sk4FMoCAJjACPb6L+k4s0m2Jq1IkiOEH4rbml'; | |
var crypto = require('crypto'); | |
var decipher = crypto.createDecipher('aes-128-ecb', key); | |
var decrypted = decipher.update(encrypted, 'base64', 'utf8'); | |
console.log('decrypted :', decrypted); |