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
# Parse input | |
n = gets.strip.to_i | |
a = Array.new(n) | |
(0...n).each { |a_i| | |
a_t = gets.strip | |
a[a_i] = a_t.split(' ').map(&:to_i) | |
arr = a[a_i] | |
} | |
# Initialize variables |
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
Hey guys! | |
I am a little stuck on Title Case checkpoint on Ruby Arrays. | |
“We will need to use conditional logic --if and else statements -- to make this work. Read the test specification carefully so you understand the conditional logic to be implemented. | |
Some helpful methods to use are: | |
String#downcase | |
String#capitalize |
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
b=$(basename "$1") | |
echo -n "http://example.com/uploads/$b" | pbcopy | |
for i | |
do | |
b=$(basename "$1") | |
mv "$i" "/path/to/Uploads/$b" | |
done |
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 os | |
from threading import Thread | |
from time import sleep | |
import asyncio | |
FIFO_PATH = "/path/to/crash-log" | |
class FifoReader(Thread): | |
def __init__(self, path, crash): | |
super().__init__() |
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
- (NSData *)build | |
{ | |
uint32_t type = _type; // 0 | |
uint32_t command = _command; // 3 | |
NSString *data = _data; // @"" | |
unsigned char byte = 0x00; // 0 | |
unsigned long size = sizeof(command) + sizeof(type) + data.length + sizeof(byte); // 9 | |
unsigned long totalSize = sizeof(uint32_t) + size; // 10 (including size uint32) | |
unsigned char bytes[totalSize]; |
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::any::Any; | |
use std::collections::HashMap; | |
use std::fmt; | |
pub struct GStore | |
{ | |
map: HashMap<String, Box<Any>> | |
} | |
impl GStore |
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 async = require('async'); | |
var _ = require('lodash'); | |
var SerialPort = require('serialport'); | |
// SerialPort.list(function (err, ports) { | |
// ports.forEach(function(port) { | |
// console.log(port.comName); | |
// console.log(port.pnpId); | |
// console.log(port.manufacturer); | |
// }); |
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
// | |
// RangeStreamer.h | |
// iOS Player | |
// | |
// Created by Ryan Layne on 4/2/15. | |
// | |
#import <Foundation/Foundation.h> | |
#import <AVFoundation/AVFoundation.h> |
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
NSDictionary *cases = @{ | |
@"name": ^{ | |
return field.name; | |
}, | |
@"type": ^{ | |
return field.typeString.lowercaseString; | |
} | |
} | |
void (^block)() = cases[ident]; |
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
BMW 2002 Checks | |
Rust | |
shock towers | |
floor pans / The driver and passenger floors | |
spare tire well in the trunk | |
The lower rocker panels on each side of the car | |
The gas tank area | |
mainly look in those spots as those the hard places to fix it |
NewerOlder