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
| using Org.BouncyCastle.Crypto; | |
| using Org.BouncyCastle.Crypto.Parameters; | |
| using Org.BouncyCastle.OpenSsl; | |
| using Org.BouncyCastle.Security; | |
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| namespace MyProject.Data.Encryption | |
| { |
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
| use glium::{DisplayBuild, Surface, VertexBuffer, Program}; | |
| use glium::backend::glutin_backend::GlutinFacade; | |
| use glium::{glutin, index, uniforms}; | |
| extern crate glium; | |
| /// A trait for graphical frontends. | |
| /// Normally, the only thing that the cpu does is send the framebuffer data. | |
| pub trait GpuFrontend { | |
| /// Displays one frame of data from the raw framebuffer. |
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
| vector<int> spiralOrder(const vector<vector<int>> &A) { | |
| vector<int> result; | |
| int i = 0, j = 0; | |
| int startI = 0, startJ = 1; | |
| int rows = A.size(); | |
| int cols = A[0].size(); | |
| int total = rows*cols; | |
| while (result.size() < total) { | |
| // over a row |
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
| fn main() { | |
| let n = 10000000; | |
| println!("Let's print prime numbers up to {}", n); | |
| let primes = sieve(n); | |
| for i in primes { | |
| print!("{} ", i); | |
| } | |
| } |