Skip to content

Instantly share code, notes, and snippets.

@wakandan
wakandan / installing_pyaudio.md
Created May 10, 2019 04:04 — forked from jiaaro/installing_pyaudio.md
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
fn rv(head: Option<~Node>) -> Option<~Node>{
let mut return_head = None;
let mut current_head = head;
loop {
match current_head.take() {
Some(node) => {
let mut node = node; //make the node usable
current_head = node.next.take();
node.next = return_head;
return_head = Some(node);
fn reverse_linkedlist(head: Option<~Node>) -> Option<~Node> {
let mut result = head;
loop {
match result.next {
Some(~node) => {
let old_next = node.next;
node.next = result;
result = old_next;
},
None => {
@wakandan
wakandan / linkedlist
Created September 23, 2013 15:51
simple linked list implementation in rust
struct Node {
value: uint,
/*make sure that the list can terminate*/
next: Option<~Node>
}
fn main() {
/*define a vector of numbers*/
let v = [1u,2,3,4];