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 array_left_rotation(a, n, k): | |
# Creta Empty List | |
b = [] | |
# Loop through a | |
for i in range(n): | |
# Append new position value to b | |
b.append(a[(i + k) % n]) | |
return b | |
n, k = 5, 4 # map(int, input().strip().split(' ')) |
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
# For databases that each item might have more than one tags like genres. | |
# It is not an optimal solution to append appropriate genres to each items seperately. For example; when we search for adventure novels, | |
# the database nelow will firts loop through each book and then each genre it contains which will give a O(N^2). | |
{ | |
"novels" : { | |
"The Lord of The Rings" : { | |
"author" : "JRR Tolkien", | |
"genre" : ["Fantasy", "Adventure"] | |
}, |
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
from Crypto.PublicKey import RSA | |
# Ross created a public-private key pair himself | |
ross_key = RSA.generate(2048) | |
# He seperated his public key from the pair | |
ross_pubkey = ross_key.publickey() | |
# A key pair for Rachel, NORMALY THIS MUST BE CREATED BY HER! | |
rachel_key = RSA.generate(2048) | |
# Rachel's public key |
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
from Crypto.PublicKey import RSA | |
from Crypto.Hash import SHA256 | |
ross_key = RSA.generate(2048) | |
ross_pubkey = ross_key.publickey() | |
# NORMALY THIS MUST BE CREATED ON THE RECIPIENT SIDE! | |
# Because it involves PRIVATE KEY INFORMATION! | |
rachel_key = RSA.generate(2048) |
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
<html> | |
<head> | |
<title>Doughnuts Recipe</title> | |
</head> | |
<body> | |
<h1>How to make Doughnuts</h1> | |
<p>Homemade doughnuts are a bit of a project, but they’re less work than you might think, and the result is a truly great, hot, crisp doughnut. | |
Once you’ve mastered <br /> this basic recipe for a fluffy, yeasted doughnut, you can do pretty much anything you like in terms of glazes, toppings and fillings.</p> | |
<img src="https://static01.nyt.com/images/2014/12/14/magazine/14eat1/14mag-14eat.t_CA0-articleLarge.jpg" /> | |
<h2>Ingridients</h2> |
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
<meta name="theme-color" content="#000"> <!-- Chrome, Firefox OS, Opera and Vivaldi --> | |
<meta name="msapplication-navbutton-color" content="#000"> <!-- Windows Phone --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="#000"> <!-- iOS Safari --> |
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 outputEmployeeHTML(no, name, title, email) { | |
// If encoding(second parameter) is not specified, readFile outputs Buffer | |
fs.readFile('./email-template.html', "utf8", (err, html) => { | |
if(err) console.log(err); | |
let employeeHTML = html; | |
const employeeData = { | |
'{NAME}': name, | |
'{TITLE}': title, | |
'{EMAIL}': email |
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
using UnityEngine; | |
public class CubeMovement : MonoBehaviour { | |
public float speed = 10f; | |
// Update is called once per frame | |
void Update () { | |
float horizontalMovement = Input.GetAxis("Horizontal") * Time.deltaTime * speed; | |
float verticalMovement = Input.GetAxis("Vertical") * Time.deltaTime * speed; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CameraControl : MonoBehaviour { | |
[SerializeField] | |
private GameObject player; | |
[SerializeField] |
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
Feature: login | |
In order to use the site | |
As a user | |
I want to login | |
Background: | |
Given a user exists with username "denizsimsek93" and password "123456789" | |
And I am on the "login" page | |
Scenario: Login (with username) |
OlderNewer