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
### Put this in ~/.config/pulse/default.pa | |
### Include the system-wide configurations | |
.include /etc/pulse/default.pa | |
### Automatically switch to newly-connected devices | |
load-module module-switch-on-connect |
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
#ifndef CVGABOR_H | |
#define CVGABOR_H | |
#include "/usr/local/Cellar/opencv/2.3.1a/include/opencv2/opencv.hpp" | |
class CvGabor | |
{ | |
public: | |
~CvGabor(); | |
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
/*************************************************************************** | |
* Copyright (C) 2006 by Mian Zhou * | |
* M.Zhou@reading.ac.uk * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * | |
* (at your option) any later version. * | |
* * | |
* This program is distributed in the hope that it will be useful, * |
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
uint16_t udp_checksum(struct udphdr *p_udp_header, size_t len, uint32_t src_addr, uint32_t dest_addr) | |
{ | |
const uint16_t *buf = (const uint16_t*)p_udp_header; | |
uint16_t *ip_src = (void*)&src_addr, *ip_dst = (void*)&dest_addr; | |
uint32_t sum; | |
size_t length = len; | |
// Calculate the sum | |
sum = 0; | |
while (len > 1) |
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
uint16_t ip_checksum(struct ip *p_ip_header, size_t len) | |
{ | |
register int sum = 0; | |
uint16_t *ptr = (unsigned short*)p_ip_header; | |
while (len > 1){ | |
sum += *ptr++; | |
len -= 2; | |
} |
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
Guide to prepare your development environment for CP3108B - Mozilla Project | |
1. IRC setup | |
+ IRC is our main communication channel. It's very much similar to chatrooms in other IMs. The easiest way to start is using Mibbit (chat.mibbit.com) - an IRC web client. | |
- Click on "Server" | |
- Type in "irc.mozilla.org:+6697" | |
- Pick a nickname | |
- Type in "#nus" in "Channel" field | |
- Connect | |
+ You can come back later and create an account to save your settings. There are also other native IRC clients. For Windows user, try Pidgin. For Mac user, Adium is your friend. |