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
// | |
// CDNumberDialingTextField.m | |
// Countdown | |
// | |
// Created by Andre Berg on 20.03.10. | |
// Copyright 2010 Berg Media. All rights reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at |
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
if (in <= 0.00304) | |
{ | |
out = in*12.92; | |
} | |
else | |
{ | |
out = (1.055 * pow(in, (1.0/2.4)) - 0.055); | |
} |
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
/* | |
* Create a file TestDependent.java with the contents in this file and substitute the | |
* values as needed... | |
*/ | |
package org.python.pydev.core; | |
public class TestDependent { | |
//NOTE: this should be gotten from some variable to point to the python lib (less system dependence, but still, some). | |
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/local/bin/python2.7 | |
# encoding: utf-8 | |
''' | |
${module} -- ${shortdesc} | |
${module} is a ${description} | |
It defines ${classes_and_methods} | |
@author: ${user_name} |
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 | |
# encoding: utf-8 | |
''' | |
${module} -- ${shortdesc} | |
${module} is a ${description} | |
It defines ${classes_and_methods} | |
@author: ${user_name} |
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
def SetGlobalAxisRotation(obj, rot, depth=0): | |
""" | |
Set the global rotation of the object axis (i.e. keeping points in place). | |
obj object | |
rot vector | |
""" | |
# unfortunately tail recursion and depth guard | |
# seem needed because of the MatrixToHPB(HPBToMatrix(Rad(angle)) | |
# roundtrip round-off error, so we need to improve |
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
class Helpers(object): | |
"""Contains various helper methods.""" | |
def __init__(self, arg): | |
super(Helpers, self).__init__() | |
@staticmethod | |
def readConfig(filepath=None): | |
""" | |
Read settings from a configuration file. |
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
class Plane(object): | |
"""Represents a plane defined by position and normal vector""" | |
def __init__(self, pos, n): | |
super(Plane, self).__init__() | |
self.pos = pos | |
self.n = n.GetNormalized() | |
if DEBUG: print "self.pos = %r, self.n = %r" % (pos, n) | |
def setN(self, newn): | |
self.n = newn.GetNormalized() |
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
class MinMax(object): | |
""" | |
Calculate various area metrics from a list of points, | |
such as min, max, midpoint, radius and size. | |
""" | |
def __init__(self): | |
super(MinMax, self).__init__() | |
FLOATMIN = sys.float_info[3]-1000 # workaround for underflow error | |
FLOATMAX = sys.float_info[0] | |
self.min = c4d.Vector(FLOATMAX, FLOATMAX, FLOATMAX) |
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
/** | |
* Guild Wars 2 Spidy Functions | |
* | |
* for use in Google Docs spreadsheets | |
* via the Script Editor. | |
* | |
* After an idea and first concept of | |
* Valaadus.5012 on Northern Shiverpeaks | |
* | |
* Additional functions by Cauldron.1653 |
OlderNewer