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
- Modify -> Center Pivot. Make world pivots go to the center of the mesh. | |
- Modify -> Freeze Transformations. Reset translation and rotation axes. |
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
## http://dragly.org/2012/01/13/deploy-qt-applications-for-mac-os-x/ | |
## http://bleepsandpops.com/post/8447919182/adding-the-fmod-api-to-an-xcode-4-project | |
$ qmake -spec macx-xcode yourprojectname.pro | |
$ macdeployqt yourappname.app -dmg | |
## $ otool -L yourappname.app/Contents/MacOS/yourappname | |
## $ install_name_tool -change /app_dir/lib.dylib @executable_path/../Frameworks/Versions/lib.dylib yourappname |
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
#version 120 | |
uniform sampler2D uSampler; | |
varying vec2 vUv; | |
void main() | |
{ | |
// if ( !gl_FrontFacing ) { | |
// discard; |
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
I = checkerboard(400,4,6) > 0.5; | |
imwrite(I, 'check.png'); |
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
/* Sleep Demo Serial | |
* ----------------- | |
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up | |
* when new data is received in the serial port USART | |
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode | |
* | |
* Copyright (C) 2006 MacSimski 2006-12-30 | |
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF | |
* | |
* With modifications from Ruben Laguna 2008-10-15 |
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
filename = 'irregular.bmp'; | |
RGB = imread(filename); | |
grayscale = rgb2gray(RGB); | |
numTotalPixel = size(grayscale,1) * size(grayscale, 2); | |
numBlackPixel = sum(grayscale(:)==0); | |
numWhitePixel = sum(grayscale(:)==255); | |
percentBlackPixel = numBlackPixel / numTotalPixel * 100; | |
percentWhitePixel = numWhitePixel / numTotalPixel * 100; |
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
// See http://forum.arduino.cc/index.php?topic=158312.0 | |
// NewLiquidCrystal library | |
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads | |
#include <Wire.h> | |
#include <LCD.h> | |
#include <LiquidCrystal_I2C.h> | |
#define I2C_ADDR 0x27 // Define I2C Address for the PCF8574T |
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
void loop() | |
{ | |
if ( connected ) | |
{ | |
int packetSize = Udp.parsePacket(); | |
if ( packetSize != 0 ) { | |
Udp.read( data, numPins ); | |
Serial.println( "Data received" ); | |
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%% Example: | |
%%% | |
%%% Create a 3000Hz triangel wave data for 3 seconds, and | |
%%% play the wave data at 44100Hz (default) sample rate, also | |
%%% save to .wav file. | |
%%% | |
%%% | |
%%% wave = OSCILLATOR('Triangle', 3, 3000); | |
%%% soundsc(wave, 44100); |
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
% | |
% Draw random dots within black filled circle | |
% Dots number from 89 to 299 | |
% | |
for n = 89:299 | |
% Draw filled circle | |
f = figure; | |
filledCircle([0,0], 1,1000, 'k'); |