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
// ========================================================================== | |
// Project: CamUi - mainPage | |
// Copyright: ©2010 My Company, Inc. | |
// ========================================================================== | |
/*globals CamUi */ | |
ControlPanelView = SC.StackedView.extend({ | |
childViews: 'axialCmdButtons axisSelectionLabel axisSelectionRadio momementModeLabel movementModeRadio feedrateLabel feedrateSlider'.w(), | |
useStaticLayout: YES, | |
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
const int N_OF_COILS = 3; | |
struct BrushlessDCMotor | |
{ | |
int hal_pins[N_OF_COILS]; | |
//positive and negative coil pins | |
int pos_coil_pins[N_OF_COILS]; | |
int neg_coil_pins[N_OF_COILS]; | |
// The current value of each hal sensor and coil output |
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 the library code: | |
#include <LiquidCrystal.h> | |
int ammeter_pin = 0; | |
int amps_per_volt = 1; //amps per volt measured on the ammeter pin | |
int voltmeter_pin = 1; | |
int volts_per_volt = 1; //volts per volt measured on the voltmeter pin | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 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
#! /usr/bin/env python | |
''' | |
Copyright (C) 2007 Aaron Spike (aaron @ ekips.org) | |
Copyright (C) 2007 Tavmjong Bah (tavmjong @ free.fr) | |
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 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
// Mouse Picking (transforming mouse coordinates to world coordinates) | |
if ((op = this.mouse.ops["movement"]).enabled == true) | |
{ | |
// Scaling the mouse position to -1 < x,y < 1 eye coordinates (z=near/far) | |
var eye_coord = [] | |
for (var i=0; i<2; i++) | |
{ | |
var scale = 2/size[i]; | |
eye_coord[i] = (xy[i] - op.init_mouse_position[i])*scale | |
} |
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
{ | |
[javac] ^ | |
[javac] /home/rob/Documents/replicators/replicatorg-5d/src/replicatorg/drivers/DriverBaseImplementation.java:255: cannot find symbol | |
[javac] symbol : class Point5d | |
[javac] location: class replicatorg.drivers.DriverBaseImplementation | |
[javac] protected Point5d reconcilePosition() { | |
[javac] ^ | |
[javac] /home/rob/Documents/replicators/replicatorg-5d/src/replicatorg/drivers/DriverBaseImplementation.java:259: cannot find symbol | |
[javac] symbol : class Point5d | |
[javac] location: class replicatorg.drivers.DriverBaseImplementation |
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
<div id="relative-nav"> | |
<? $bottom_links = $page->prev_next(); ?> | |
<? if ($bottom_links[0]) { ?><a href="<? echo $bottom_links[0] ?>">< <span>Previous</span></a><? }; ?> | |
<? if ($bottom_links[1]) { ?><a href="<? echo $bottom_links[1] ?>"><span>Next</span> ></a><? }; ?> | |
</div> |
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
require 'etc' | |
def as_user(user, &block) | |
# Find the user in the password database. | |
u = (user.is_a? Integer) ? Etc.getpwuid(user) : Etc.getpwnam(user) | |
# Fork the child process. Process.fork will run a given block of code | |
# in the child process. | |
Process.fork do | |
# We're in the child. Set the process's user ID. |
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
fs = require 'fs-extra' | |
{print} = require 'util' | |
which = require 'which' | |
{spawn, exec} = require 'child_process' | |
assets = require 'connect-assets' | |
buildAssets = (options = {}, callback) -> | |
cleanAssets options, -> | |
_buildAssetsAfterCleaning options, callback |
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
module ActiveModel | |
module SecurePassword | |
module ClassMethods | |
# Stolen from rails 4 | |
def has_secure_password(options = {}) | |
# Load bcrypt-ruby only when has_secure_password is used. | |
# This is to avoid ActiveModel (and by extension the entire framework) | |
# being dependent on a binary library. | |
begin | |
gem 'bcrypt-ruby', '~> 3.0.0' |
OlderNewer