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
#include <stdio.h> | |
#include <assert.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
int main(int argc,char **argv) | |
{ | |
assert(argc==2); | |
int file=open(argv[1],O_RDONLY); | |
assert(file>0); |
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
use std::net::*; | |
use std::io::prelude::*; | |
fn main() | |
{ | |
let mut buf:String; | |
let ip="google.com"; | |
let port=80; | |
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
use std::env; | |
use std::net::*; | |
use std::io::prelude::*; | |
use getopts::Options; | |
extern crate getopts; | |
fn main() | |
{ | |
let mut opts = Options::new(); |
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
#include <linux/module.h> | |
#include <linux/version.h> | |
#include <linux/kernel.h> | |
#include <linux/types.h> | |
#include <linux/kdev_t.h> | |
#include <linux/fs.h> | |
#include <linux/device.h> | |
#include <linux/cdev.h> | |
static dev_t first; |
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
#!/bin/bash | |
set -E | |
trap '[ '$?' -ne 77 ] || exit 77' ERR | |
$(echo '$(exit 11)';exit 11) | |
(echo '(exit 11)';exit 11) | |
$(echo '$(exit 77)';exit 77) |
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
import QtQuick 2.2 | |
import QtQuick.Controls 1.2 | |
import QtQuick.Dialogs 1.0 | |
ApplicationWindow | |
{ | |
visible: true | |
title: "Meow" | |
id: win |
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
import QtQuick 2.0 | |
import QtQuick.Particles 2.0 | |
import QtQuick.Window 2.0 | |
import QtQuick.Controls 1.2 | |
Window | |
{ | |
visible: true | |
Rectangle |
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
fn main() | |
{ | |
for win in (0u32..26*8).collect::<Vec<_>>().windows(80) | |
{ | |
for i in win | |
{ | |
print!("{}",(('a' as u8)+((i%26u32) as u8)) as char); | |
} | |
println!(""); | |
} |
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(core_intrinsics)] | |
struct Something | |
{ | |
data:u32, | |
} | |
impl Something | |
{ | |
pub fn name(&self)->String |
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
@AlisdairO As I already said over | |
[there](https://users.rust-lang.org/t/composed-iterators-compile-slowly/2114/4?u=benaryorg), | |
please format your code with triple backticks so we have some syntax | |
highlighting. | |
It works for rust: | |
``` | |
fn main() | |
{ |