Half an hour’s meditation each day is essential, except when you are busy. Then a full hour is needed.
St Francis de Sales (1567–1622) Swiss Bishop
Process Over Product
How did the ‘process over product’ concept affect the way you tackled the site redesign and rebuild?
In the past, I’ve been guilty of focusing all my attention on the finished product. This has meant working inefficiently and throwing time at the product until it’s as I want. This time I have stopped having gone through the redesign process, but with a product that still needs more work. However, I know that when or if I do something similar again, it will be much faster, and I’ll be more productive because I have that experience. When you’re learning as you go, things seem to take a lot longer, however.
Meditation
What did you think about meditation before reading chapter 2?
After the previous chapter on emotional intelligence, one of the resources I’ve embraced has been the Headspace app on my iPad. It changed my thoughts about meditation: I’m discovering the benefits of just taking time to step back and let everything go for a few minutes each day.
What new things have you learnt about meditation?
Meditation is just mental training
Meta-attention is the secret to concentration
Happiness is a default state of mind
Meditation is exercise for the mind
There is no such thing as bad meditation
Mindfulness meditation: Breathing as if your life depends on it.
Did any of the suggested meditation techniques stand out to you?
Not particularly as I feel I’m already doing much of this.
Any other musings?
The reason why I’m enjoying the Headspace app is that it’s good to have a guide.


The ofTrueTypeFont class provides an interface to load fonts into openframeworks. The fonts are converted to textures, and can be drawn on screen. There are some options when you load the font - what size the font is rendered at, wether or not it is anti-aliased, and wether the font object will be the full character set or a subset (ie, extended ascii, which can include accents, umlauts, or normal ascii). The default is anti-aliased, non-full character set. The library uses freetype, which has certain patent problems in regards to true type hinting, especially at small sizes, so non-anti-aliased type doesn't always render beautifully. But we find it quite adequate, and at larger sizes it seems to works well.
- bind()
- drawString(...)
- drawStringAsShapes(...)
- getLetterSpacing()
- getLineHeight()
- getNumCharacters()
- getSize()
- getSpaceSize()
- getStringAsPoints(...)
- getStringBoundingBox(...)
- hasFullCharacterSet()
- isAntiAliased()
- isLoaded()
- loadFont(...)
- setGlobalDpi(...)
- setLetterSpacing(...)
- setLineHeight(...)
- setSpaceSize(...)
- stringHeight(...)
- stringWidth(...)
- unbind()
ofTrueTypeFont methods
drawString(...)
void ofTrueTypeFont::drawString(string s, float x, float y)
Draws a string with that typeface, on screen, at point(x,y). For example, you can write some text on screen like this:
// in the h file:
ofTrueTypeFont myfont;
.....
// in setup:
myfont.loadFont("arial.ttf", 32);
// in draw:
myfont.drawString("hi!!", 100,100);
Your strings can even be multiline:
myfont.drawString("a test of multiline text", 300,300);
you can also using dynamically generated strings. For example, to print the frame rate:
char fpsStr[255]; // an array of chars
sprintf(fpsStr, "frame rate: %f", ofGetFrameRate());
myfont.drawString(fpsStr, 100,100);
drawStringAsShapes(...)
void ofTrueTypeFont::drawStringAsShapes(string s, float x, float y)
drawStringAsShapes function draws the s string as if it was a geometrical shapes using the information contained in ofTTFContour and ofTTFCharacter. Parameters x and y sets the position of the shape.
getLineHeight()
float ofTrueTypeFont::getLineHeight()
The line height is computed, based on the font size, and can be adjusted. Useful if you are print multi-line text.
getStringBoundingBox(...)
ofRectangle ofTrueTypeFont::getStringBoundingBox(string s, float x, float y)
e.g:
//in setup()
franklinBook.loadFont("frabk.ttf", 32);
//in update()
char tempString[255];
ofRectangle rect = franklinBook.getStringBoundingBox(tempString, 0,0);
//in draw
ofSetColor(0xcccccc);
ofRect(rect.x, rect.y, rect.width, rect.height);
loadFont(...)
void ofTrueTypeFont::loadFont(string filename, int fontsize)
Loads a fonts of a given filename in, and renders it to a texture at a given size (fontsize). It will look for the font file in the data/ folder. For example, to load the font arial at type size 32:
// int the h file:
ofTrueTypeFont myFont;
...
myFont.loadFont("arial.ttf", 32);
loadFont(...)
void ofTrueTypeFont::loadFont(string filename, int fontsize, bool _bAntiAliased, bool _bFullCharacterSet, bool makeContours)
This loads a font, but in addition to setting the font name and size, you can also pass in two flags: is this font antiAliased, and does it include the full character set?
loadFont(...)
bool ofTrueTypeFont::loadFont(string filename, int fontsize, bool _bAntiAliased=true, bool _bFullCharacterSet=false, bool makeContours=false, float simplifyAmt=0.3, int dpi=0)
setLineHeight(...)
void ofTrueTypeFont::setLineHeight(float height)
Sets the line height for text that is drawn on screen.
ofTrueTypeFont variables
bool bAntiAlised
bool ofTrueTypeFont::bAntiAlised
A variable which tells you if the font is antiAliased.
bool bFullCharacterSet
bool ofTrueTypeFont::bFullCharacterSet
A variable which tells you if the font contains the full character set, or a subset.
bool bLoadedOk
bool ofTrueTypeFont::bLoadedOk
bLoadedOk is a boolean variable containing true if the font was successfully loaded.
int nCharacters
int ofTrueTypeFont::nCharacters
nCharacters contains the number of characters that our font has.


Biden Holds On to Commanding Lead in South Carolina
by ERIKA WILLIAMS(CN) – Former Vice President Joe Biden has retained his 20-point lead in South Carolina among likely Democratic primary voters, according to a new poll released Monday.
Because South Carolina is the first state in the South to hold a presidential primary in 2020, it has received a considerable amount of attention Democratic presidential candidates since the beginning of the election cycle.
The Palmetto State’s Feb. 29 primary will be the fourth such contest in the nation, after caucuses in Iowa and Nevada and a primary in New Hampshire.
Biden continues to enjoy far more support than any of his Democratic primary rivals in South Carolina, according to a Quinnipiac University poll released Monday that shows he maintains a 20-point lead in the race.
The former vice president has the support of 33% of likely voters, the poll shows, as his closest competitor Massachusetts Senator Elizabeth Warren came in a distant second place at 13%.
Vermont Senator Bernie Sanders has the support of 11% of Democratic voters in South Carolina in the latest poll, while South Bend, Indiana Mayor Pete Buttigieg came in fourth with 6%.
The latest survey shows that Biden’s favorability has not faded in South Carolina since a Winthrop University poll last month showed him with the same 20-point lead.
Warren, meanwhile, fell 4 percentage points from 17% in the Oct. 1 Winthrop poll.
During an environmental justice forum in South Carolina on Nov. 8, Warren tried to distance herself from Sanders by voicing support for a controlled form of capitalism, as opposed to a Democratic socialist system. New Jersey Senator Cory Booker, billionaire activist Tom Steyer, author Marianne Williamson, and former U.S. Representatives John Delaney and Joe Sestak also spoke during the event.
Biden has a huge lead among African-Americans in South Carolina, which is significant due to the large number of black voters who have told pollsters they are not certain who they will vote for.
The former vice president has the support of 44% of black voters in the state, according the poll, compared to 10% for Sanders, 8% for Warren and less than 1% for Buttigieg.
After the top four candidates, Monday’s survey shows Steyer polling at 5% among all likely Democratic voters in South Carolina. Businessman Andrew Yang came in at 4%, followed by California Senator Kamala Harris at 3% and Booker at 2%.
The Quinnipiac University poll was conducted from Nov. 13 to 17 and included 768 respondents. It has a margin of error of 4.8%.
Monday’s poll comes amid public hearings in the House impeachment inquiry over President Donald Trump’s July 25 phone call with Ukrainian President Volodymyr Zelensky, in which Trump pushed for investigations into the 2016 U.S. presidential election as well as Biden and his son, Hunter. The younger Biden sat on the board of the Ukrainian energy company Burisma Holdings.
Multiple witnesses have said they understood the release of a $400 million military aid package and a meeting at the White House were conditioned on Zelensky’s public announcement of the investigations.
Copyright © 2019 courthousenews.com


Now that we have an annotated genome, we can create an initial metabolic model using
genome_to_fbamodel < annotated.genome > initial.model
After a minute or two we will have a metabolic model object stored in initial.model.


Below are functions exclusive to Javauto. Many are designed to interact with the mouse, keyboard, or screen instead of just the system.
Note that these functions are all designed to make your life easier, especially with regards to emulating some AutoIt like functions that are verbose to re-write in Java, but this is not an exhaustive list of functions that you may use in your code. For the most part, Java is also acceptable.
For example, instead of this:
msgBox("Hello world");
You could write the java equivalent:
JOptionPane.showMessageDialog(null,"Hello world","",JOptionPane.PLAIN_MESSAGE);
One is just (quite) a bit more verbose.
The exceptions to this are user defined functions and class variables. Instead of writing these in Java you must use native user defined functions and global variables.
Returns a fixed-size list backed by the specified Array.
arrayAsList( String[] array )
Parameters:
array |
This is the Array of strings by which the list will be backed. |
Returns:
List<String> |
This method returns a list view of the specified Array. |
Example:
//Returns a fixed-size list backed by the specified Array. String[] strArr = {"each", "of", "these", "is", "an", "element"}; List<String> theList = arrayAsList(strArr); print(theList.size());
This method searches the specified Array of bytes for the specified value using the binary search algorithm.
arrayBinarySearch( byte[] a, byte key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
byte searchVal = 35; byte arr[] = { 10, 12, 34, searchVal, 5 }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method searches the specified Array of chars for the specified value using the binary search algorithm.
arrayBinarySearch( char[] a, char key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
char searchVal = 'c'; char arr[] = { 'a', 'c', 'b', 'e', 'd' }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method searches the specified Array of doubles for the specified value using the binary search algorithm.
arrayBinarySearch( double[] a, double key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
double searchVal = 4.6; double arr[] = { 5.4, 49.2, 9.2, 35.4, 4.6 }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method searches the specified Array of floats for the specified value using the binary search algorithm.
arrayBinarySearch( float[] a, float key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
float searchVal = 42.9f; float arr[] = { 5.2f, 46.1f, 42.9f, 22.3f }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method searches the specified Array of int for the specified value using the binary search algorithm.
arrayBinarySearch( int[] a, int key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
int searchVal = 5; int arr[] = { 30, 20, 5, 12, 55 }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method searches the specified Array of longs for the specified value using the binary search algorithm.
arrayBinarySearch( long[] a, long key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
long searchVal = 46464; long arr[] = { 56, 46464, 3342, 232, 3445 }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method searches the specified Array of shorts for the specified value using the binary search algorithm.
arrayBinarySearch( short[] a, short key )
Parameters:
a |
This is the Array to be searched. |
key |
This is the value to be searched for. |
Returns:
int |
The index of the search key, if it is contained in the Array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the Array: the index of the first element greater than the key, or a.length if all elements in the Array are less than the specified key. |
Example:
short searchVal = 52; short arr[] = { 5, 2, 15, 52, 10 }; int index = arrayBinarySearch(arr, searchVal); print("The index of the search key is:" + index);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For all indices that are valid in both the original Array and the copy, the two Arrays will contain identical values. For any indices that are valid in the copy but not the original, the copy will contain false. Such indices will exist if and only if the specified length is greater than that of the original Array.
arrayCopyOf( boolean[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
boolean[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
boolean[] a1 = new boolean[] { true, false }; boolean[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For all indices that are valid in both the original Array and the copy, the two Arrays will contain identical values. For any indices that are valid in the copy but not the original, the copy will contain (byte) 0.Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( byte[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
byte[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
byte[] a1 = new byte[] { 5, 62, 15 }; byte[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For all indices that are valid in both the original Array and the copy, the two Arrays will contain identical values. or any indices that are valid in the copy but not the original, the copy will contain '\\u000'. Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( char[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
char[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
char[] a1 = new char[] { 'p', 's', 'r' }; char[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For any indices that are valid in the copy but not the original, the copy will contain 0d .Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( double[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
double[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
double[] a1 = new double[] { 12.5, 3.2, 37.5 }; double[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For any indices that are valid in the copy but not the original, the copy will contain 0f .Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( float[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
float[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
float[] a1 = new float[] { 10f, 32f, 25f }; float[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For any indices that are valid in the copy but not the original, the copy will contain 0 .Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( int[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
int[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
int[] a1 = new int[] { 45, 32, 75 }; int[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For any indices that are valid in the copy but not the original, the copy will contain 0l .Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( long[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
long[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
long[] a1 = new long[] { 15, 10, 45 }; long[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method copies the specified Array, truncating or padding with false (if necessary) so the copy has the specified length. For any indices that are valid in the copy but not the original, the copy will contain (short) 0. Such indices will exist if and only if the specified length is greater than that of the original array.
arrayCopyOf( short[] original, int newLength )
Parameters:
original |
The Array to be copied. |
newLength |
The length of the copy to be returned. |
Returns:
short[] |
A copy of the original array, truncated or padded with false elements to obtain the specified length. |
Example:
short[] a1 = new short[] { 15, 10, 45 }; short[] a2 = arrayCopyOf(a1, 4); print("a2 size is:" + a2.length);
This method sorts the specified array of bytes into ascending numerical order.
arraySort( byte[] a )
Parameters:
a |
The array to be sorted. |
Returns:
byte[] |
The sorted array. |
Example:
byte[] a1 = { 10, 2, 7, 35 }; byte[] a2 = arraySort(a1); print(arrayToString(a2));
This method sorts the specified array of chars into ascending numerical order.
arraySort( char[] a )
Parameters:
a |
The array to be sorted. |
Returns:
char[] |
The sorted array. |
Example:
char[] a1 = { 'r', 'q', 's', 'p' }; char[] a2 = arraySort(a1); print(arrayToString(a2));
This method sorts the specified array of doubles into ascending numerical order.
arraySort( double[] a )
Parameters:
a |
The array to be sorted. |
Returns:
double[] |
The sorted array. |
Example:
double[] a1 = { 3.2, 1.2, 9.7 }; double[] a2 = arraySort(a1); print(arrayToString(a2));
This method sorts the specified array of floats into ascending numerical order.
arraySort( float[] a )
Parameters:
a |
The array to be sorted. |
Returns:
float[] |
The sorted array. |
Example:
float[] a1 = { 3.2f, 1.2f, 9.7f }; float[] a2 = arraySort(a1); print(arrayToString(a2));
This method sorts the specified array of int into ascending numerical order.
arraySort( int[] a )
Parameters:
a |
The array to be sorted. |
Returns:
int[] |
The sorted array. |
Example:
int[] a1 = { 2, 1, 9 }; int[] a2 = arraySort(a1); print(arrayToString(a2));
This method sorts the specified array of longs into ascending numerical order.
arraySort( long[] a )
Parameters:
a |
The array to be sorted. |
Returns:
long[] |
The sorted array. |
Example:
long[] a1 = { 22, 10, 91 }; long[] a2 = arraySort(a1); print(arrayToString(a2));
This method sorts the specified array of shorts into ascending numerical order.
arraySort( short[] a )
Parameters:
a |
The array to be sorted. |
Returns:
short[] |
The sorted array. |
Example:
short[] a1 = { 22, 10, 91 }; short[] a2 = arraySort(a1); print(arrayToString(a2));
This method returns a string representation of the contents of the specified boolean array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(boolean[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
boolean[] a1 = new boolean[] { true, false }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified byte array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(byte[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
byte[] a1 = new byte[] { 5, 62 }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified char array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(char[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
char[] a1 = new char[] { 'p', 's' }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified double array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(double[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
double a1[] = { 5.4, 49.2 }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified float array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(float[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
float a1[] = { 5.2f, 46.1f }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified int array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(int[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
int a1[] = { 5, 4 }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified long array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(long[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
long a1[] = { 56, 46464 }; print(arrayToString(a1));
This method returns a string representation of the contents of the specified short array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space).
arrayToString(short[] a)
Parameters:
a |
The array whose string representation to return. |
Returns:
String |
A string representation of a. |
Example:
short a1[] = { 5, 2 }; print(arrayToString(a1));
This method returns true if the two specified arrays of booleans are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(boolean[] a, boolean[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
boolean[] a1 = new boolean[] { true, false }; boolean[] a2 = new boolean[] { true, false }; boolean[] a3 = new boolean[] { true, true }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of bytes are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(byte[] a, byte[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
byte[] a1 = new byte[] { 5, 62 }; byte[] a2 = new byte[] { 5, 62 }; byte[] a3 = new byte[] { 5 }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of chars are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(char[] a, char[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
char[] a1 = new char[] { 'p', 's' }; char[] a2 = new char[] { 'p', 's' }; char[] a3 = new char[] { 'p', 'p' }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of doubles are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(double[] a, double[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
double[] a1 = { 5.4, 49.2 }; double[] a2 = { 5.4, 49.2 }; double[] a3 = { 5.4, 2.1 }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of floats are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(float[] a, float[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
float[] a1 = { 5.2f, 46.1f }; float[] a2 = { 5.2f, 46.1f }; float[] a3 = { 5.2f, 6.1f }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of int are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(int[] a, int[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
int[] a1 = { 1, 2 }; int[] a2 = { 1, 2 }; int[] a3 = { 0, 2 }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of longs are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(long[] a, long[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
long[] a1 = { 56, 46464 }; long[] a2 = { 56, 46464 }; long[] a3 = { 56, 46 }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of shorts are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(short[] a, short[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
short[] a1 = { 5, 2 }; short[] a2 = { 5, 2 }; short[] a3 = { 5, 5 }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
This method returns true if the two specified arrays of Strings are equal to one another.Two arrays are equal if they contain the same elements in the same order.Two array references are considered equal if both are null.
arrayEquals(String[] a, String[] a2)
Parameters:
a |
The array to be tested for equality. |
a2 |
The other array to be tested for equality. |
Returns:
boolean |
true if the two arrays are equal, otherwise returns false. |
Example:
String[] a1 = { "Pierre", "Fermat" }; String[] a2 = { "Pierre", "Fermat" }; String[] a3 = { "Evariste", "Galois" }; print(arrayEquals(a1, a2)); print(arrayEquals(a2, a3));
Sends the contents of an array of strings to the clipboard.
arrayToClip( String[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
String[] a1 = { "Pierre", "Fermat" }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of bytes to the clipboard.
arrayToClip( byte[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
byte[] a1 = new byte[] { 5, 62 }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of booleans to the clipboard.
arrayToClip( boolean[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
boolean[] a1 = new boolean[] { true, false }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of chars to the clipboard.
arrayToClip( char[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
char[] a1 = new char[] { 'p', 's' }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of doubles to the clipboard.
arrayToClip( double[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
double a1[] = { 5.4, 49.2 }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of floats to the clipboard.
arrayToClip( float[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
float[] a1 = { 5.2f, 46.1f }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of int to the clipboard.
arrayToClip( int[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
int[] a1 = { 5, 4 }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of longs to the clipboard.
arrayToClip( long[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
long[] a1 = { 56, 46464 }; arrayToClip(a1); print(clipboardGet());
Sends the contents of an array of shorts to the clipboard.
arrayToClip( short[] a )
Parameters:
a |
Array to copy to clipboard. |
Returns:
void |
Example:
short[] a1 = { 5, 2 }; arrayToClip(a1); print(clipboardGet());
Get the contents of the clip board (as string).
clipboardGet()
Parameters: none
Returns:
String |
The clip board contents as a string. Returns null if the data inside the clip board cannot be read to a string. |
Example:
//add something to the clipboard String clip = "put me in the clipboard!"; clipboardPut(clip); //retrieve clipboard contents String clipContents = clipboardGet(); msgBox(clipContents);
Put a string in the system clipboard. On Ubuntu Linux the way the clipboard is handled only allows information in the clipboard to be accessible while the application that put it there is running.
clipboardPut(String s)
Parameters:
s |
String data to put in the clip board. |
Returns: void
Example:
//add something to the clipboard String clip = "put me in the clipboard!"; clipboardPut(clip); //retrieve clipboard contents String clipContents = clipboardGet(); msgBox(clipContents);
Get the current position of the mouse cursor in an integer array.
cursorGetPos()
Parameters: none
Returns:
int[] |
Integer array formatted like [x position, y position]. |
Example:
//get the cursor position int[] cursorPos = cursorGetPos(); msgBox("Cursor Position is (" + cursorPos[0] + "," + cursorPos[1] + ")");
Execute a shell command and return the output. This will not display a visible process and it will wait for the command to finish before continuing. On Windows systems (the os can be checked with the {@link OS_SYSTEM} constant) the command string must be of the format "cmd /c command".
exec( String cmd )
Parameters:
cmd |
The command to execute. |
Returns:
String |
The output of the command. |
Example:
//attempt to guess platform and then run the dir or the ls command depending on windows/other if (SYSTEM_OS.toLowerCase().contains("windows")) { String cmdOutPut = exec("cmd /c dir"); print(cmdOutPut); } else { String cmdOutPut = exec("ls"); print(cmdOutPut); }
Terminates the currently running Java Virtual Machine. The argument serves as a status code. This code can be used by Windows or the DOS variable %ERRORLEVEL%. On *nix to check the exit code we can simply print the $? special variable in bash. This variable will print the exit code of the last run command.
exit( int code )
Parameters:
code [optional] |
Integer that sets the script's return code.(The default is 0.)
Exit code is:
|
Returns: void
Example:
//Terminate script if no command-line arguments if(args.length == 0){ exit(1); }
Append data to a file. If the file does not exist it will be created.
fileAppend( String fPath, String data )
Parameters:
fPath |
The path of the file to which we are appending data. |
data |
The data to be appended to the file. |
Returns:
boolean |
If appending to the file failed false will be returned. Otherwise will return true. |
Example:
Example Code
Create a file. Similar to the unix touch command.
fileCreate(String fPath)
Parameters:
fPath |
Path of file to be created. |
Returns: void
Example:
Example Code
Delete a file. This will not work on a directory.
fileDelete(String fPath)
Parameters:
fPath |
Path of the file to delete. |
Returns: void
Example:
Example Code
Check if a file or directory exists.
fileExists(String fPath)
Parameters:
fPath |
Path of the file or directory to check. |
Returns:
boolean |
Will return true if the file or directory exists, otherwise returns false. |
Example:
Example Code
Get the base name of a file, including its extension.
fileGetName(String fPath)
Parameters:
fPath |
Path of the file. |
Returns:
String |
Name of the file (including extension). |
Example:
Example Code
Get the full file path of a specific file or directory.
fileGetPath(String fPath)
Parameters:
fPath |
Path of the file. |
Returns:
String |
The full (absolute) path of the file or directory. |
Example:
Example Code
Get a list of file names in a directory as an array.
fileList( String dir )
Parameters:
dir |
Directory to list files from. |
Returns:
String[] |
String array of file names. |
Example:
// get all the files in the working dir
String[] files = fileList(WORKING_DIR);
// list the files
for (String file : files)
print(file);
Read the contents of a file to a string.
fileRead( String fPath )
Parameters:
fPath |
Path of the file to read. |
Returns:
String |
The contents of the file as a string. |
Example:
// write data to a test file String data = inputBox("Enter some data to write"); boolean success = fileWrite("test.txt", data); if (!success) {
print("There was an error writing to file.");
System.exit(1);
}
// read data from the file String test = fileRead("test.txt"); msgBox(test); // display the data
Write data to a file -- this will overwrite the file. If the file does not exist it will be created.
fileWrite( String fPath, String data )
Parameters:
fPath |
Path of the file to write to. |
data |
Data to write to the file as a string. |
Returns:
boolean |
Returns false if the file write failed. Otherwise returns true. |
Example:
// write data to a test file String data = inputBox("Enter some data to write"); boolean success = fileWrite("test.txt", data); if (!success) {
print("There was an error writing to file.");
System.exit(1);
}
// read data from the file String test = fileRead("test.txt"); msgBox(test); // display the data
Retrieves an environment variable.
getEnv( String var )
Parameters:
var |
Name of the environment variable to get such as "JAVA_HOME" or "PATH". |
Returns:
String |
The value of the environment variable specified by variable, or an empty String if the environment variable is not found. |
Example:
print(getEnv("PATH"));
Retrieve all environment variables along with their values.
getEnv()
Parameters:
Returns:
String |
ll environment variables along with their values. For example: "Var1=Value, Var2=Value" |
Example:
print(getEnv());
Get the system date and time in yyyy/MM/dd HH:mm:ss format.
getDateTime()
Parameters: none
Returns:
String |
The date and time as a string in yyyy/MM/dd HH:mm:ss format. |
Example:
print(getDateTime());
// output: 2015/01/05 15:59:25
Get the value of a flagged argument. So if the program is executed like java program -v --file aFile.txt -o outFile.txt getFlaggedArg(args, "-f|--file") would return aFile.txt.
getFlaggedArg(String[] args, String flag)
Parameters:
args |
The String[] args from the main function. Pass them in by just saying args. |
flag |
The flags to get values from, separated by | like -f|--file. |
Returns:
String |
The argument directly after the detected flag. |
Example:
Example Code
Gets the current time in milliseconds. There are 1000
milliseconds in 1 second, so divide by 1000 to find seconds.
getMilliTime()
Parameters: none
Returns:
long |
This method returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC(coordinated universal time). |
Example:
Example Code
Gets the current value from the most precise system timer on a
computer, in nanoseconds. It returns nanoseconds since some
fixed but arbitrary time. This fixed time could even be in the
future, resulting in a negative value. getNanoTime
should be used to measure the time between events, not as a wall
clock.
There are 1,000,000,000
nanoseconds in a second,
and 1,000,000
nanoseconds in a millisecond.
getNanoTime()
Parameters: none
Returns:
long |
The current value of the system timer, in nanoseconds. |
Example:
Example Code
Get the source of a web page as HTML.
getPage(String url)
Parameters:
url |
The page to fetch. |
Returns:
String |
The page source (HTML) as a string. |
Example:
Example Code
Get the current speed. The speed controls how quickly mouse and keyboard actions happen. The default speed is .95 (95%). A speed of 1.00 (100%) makes mouse and keyboard actions instant.
getSpeed()
Parameters: none
Returns:
double |
The speed as a decimal from 0.00 to 1.00. |
Example:
Example Code
Send a HTTP GET request to a URL.
httpGet(String url)
Parameters:
url |
The URL to query, including the get parameters. |
Returns:
String |
Page response as HTML. |
Example:
Example Code
Send a HTTP POST request to a given URL with the specified parameters.
httpPost(String postUrl, String[][] parameters)
Parameters:
postUrl |
URL to send the post request to. |
parameters |
Post parameters to send to URL. Parameters must be defined in a two dimesional array like [ [key, value], [key, value], [key, value] ]. |
Returns:
String |
Page response as HTML. |
Example:
Example Code
Get user input from the console.
input() input( String prompt )
Parameters:
prompt |
The prompt to display to the user. |
Returns:
String |
The user's response. |
Example:
// get input from command line and print it String userResponse = input("Enter your name: "); // get user input from the console String greeting = "Hello " + userResponse + ", it's nice to meet you."; print(greeting);
Display an input dialog box to the user.
inputBox( String Text ) inputBox( String Text, String Title)
Parameters:
Text |
Text to be displayed in the dialog box. |
Title |
Title of the dialog box. |
Returns:
String |
User's input as a string. |
Example:
//get user input String input = inputBox("Enter something: ", "Input Box"); print("You said: " + input);
Show a dialog allowing the user to choose from a drop-down list of items.
inputList( String Text, String Title, String[] Choices ) inputList( String Text, String Title, String[] Choices, int Default )
Parameters:
Text |
Text to be displayed in the dialog box. |
Title |
Title of the dialog box. |
Choices |
The options in the drop-down as a string array. |
Default |
The index of the default option in the Choices array. |
Returns:
String |
The user's choice as a string. |
Example:
//open a website based on user choice String[] inputListObjects = {"https://www.google.com/", "http://www.yahoo.com/", "http://www.bing.com/", "http://www.defaultChoice.com/"}; String inputListResult = inputList( "Choose a website: ", "Choose one", inputListObjects, inputListObjects[3] ); open(inputListResult);
Get a password from the user. Displays a dialog box where the input is masked.
inputPassword ( String Text ) inputPassword ( String Text, String Title ) inputPassword ( String Text, String Title, String Okay )
Parameters:
Text |
Text to be displayed in the dialog box. |
Title |
Title of the dialog box. |
Okay |
text of the okay button, eg. okay, submit, go, login, etc. |
Returns:
String |
The user's input |
Example:
//get password input String passwordResult = inputPassword("Input a password: "); print("Your password is: " + passwordResult);
Get the RGB values of an integer color value.
intGetRGB(int i)
Parameters:
i |
The integer value of the color. |
Returns:
int[] |
An array with three values: [red, green, blue]. |
Example:
Example Code
Get a random integer between two inclusive values.
intGetRandom( int min, int max )
Parameters:
min |
The minimum integer value to be returned (inclusive). |
max |
The minimum integer value to be returned (inclusive). |
Returns:
int |
A random integer between min and max. |
Example:
//get a random number between 0 and 5 int random = intGetRandom(0,5); // could return 0, 1, 2, 3, 4, or 5 print(random); //move mouse to random coordinates int randX = intGetRandom(0, SCREEN_WIDTH); int randY = intGetRandom(0, SCREEN_HEIGHT); mouseMove(randX, randY);
Check if a path is a directory.
isDirectory(String fPath)
Parameters:
fPath |
Path to evaluate. |
Returns:
boolean |
True if directory, false if not. |
Example:
Example Code
Returns true for a file but not for a directory (or a non-existent file).
isFile(String fPath)
Parameters:
fPath |
Path to evaluate. |
Returns:
boolean |
Returns true if fPath is a file, otherwise returns false. |
Example:
Example Code
Check if a flag is present within the command line arguments.
isFlagged(String[] args, String flag)
Parameters:
args |
The String[] args from the main function. Pass them in by just saying args. |
flag |
The flag(s) to check for, separate possible values with a pipe | For instance -h|--help could match either one. |
Returns:
boolean |
True or false based on whether the flag is present. |
Example:
Example Code
Join a string array into a string with a delimeter.
join(String joinString, String[] strArray)
Parameters:
joinString |
The delimeter with which to join the string array. |
strArray |
The array to join. |
Returns:
String |
The array as a string with the delimeter between each index. |
Example:
// create a string array
String[] pets = {"cat", "dog", "elephant", "fish"};
// join it with various delimeters
print( join(" ", pets) );
print( join(", ", pets) );
print( join("\n", pets) );
Output:
cat dog elephant fish cat, dog, elephant, fish cat dog elephant fish
Send a key combination such as Ctrl + Alt + Delete. The keys must be passed in as a string array.
keyCombo(int... keys) keyCombo(String... keys)
Parameters:
keys |
The key combination to be executed as a String array. The keys in this array must be in order and may contain special keys. The array can be of any size. |
Returns: void
Example:
Example Code
Hold down a key until {@link keyUp} is called on the same key. If keyUp is not called the key will become "stuck." Special keys can also be used here.
keyDown( int i ) keyDown( String str )
Parameters:
str |
The key that will be held down. If there are multiple letters or keys specified only the first will be held down. |
Returns: void
Example:
Example Code
Simulate the press and release of a single key. Special keys can be used here.
keyPress( int i ) keyPress( String s)
Parameters:
s |
The single key to press or release. If more than one key is specified only one key will be pressed. |
Returns: void
Example:
Example Code
Release a key that has been held down. Special keys can also be used here.
keyUp( int i ) keyUp( String str )
Parameters:
str |
The single key that will be released. If more than one key is specified only the first will be released. |
Returns: void
Example:
Example Code
Create a directory.
mkDir(String dirName)
Parameters:
dirName |
The name of the directory to create. If the directory already exists no action will be taken. |
Returns: void
Example:
Example Code
Perform a mouse click.
mouseClick( String button ) mouseClick( String button, int x, int y )
Parameters:
button |
either "left", "right", or "middle" |
x |
The X value of the coordinate that will be clicked on. |
y |
The Y value of the coordinate that willl be clicked on. |
Returns: void
Example:
Example Code
Click and drag the mouse from one coordinate to another.
mouseClickDrag( String button, int x1, int y1, int x2, int y2 )
Parameters:
button |
The mouse button to simulate. This value must be either "left", "right", or "middle". |
x1 |
First coordinate X value. |
y1 |
First coordinate Y value. |
x2 |
Second coordinate X value. |
y2 |
Second coordinate Y value. |
Returns: void
Example:
//click and drag the mouse from one location to another mouseClickDrag("left", 500, 500, 50, 50);
Press down a mouse button. If {@link mouseUp} is not called the mouse will be stuck down.
mouseDown( String button ) mouseDown( String button, int x, int y )
Parameters:
button |
The mouse button to simulate. This value must be either "left", "right", or "middle". |
x |
The X value of the coordinate that will be clicked on. |
y |
The Y value of the coordinate that will be clicked on. |
Returns: void
Example:
//hold down the left mouse button for two seconds mouseDown("left"); //press the button sleep(2000); mouseUp("left"); //release the button
Move the mouse cursor to a certain position. The speed of the mouse movement can be set with {@link setSpeed}. Note that mouse coordinates can be found with the Javauto Helper.
mouseMove( int xFinal, int yFinal)
Parameters:
xFinal |
The X value of the coordinate to move the mouse to. |
yFinal |
The Y value of the coordinate to move the mouse to. |
Returns: void
Example:
//move the mouse to coordinates mouseMove(50, 50);
Scroll the mouse wheel down once.
mouseScrollDown()
Parameters: none
Returns: void
Example:
mouseScrollDown(); //scroll down sleep(1000); //wait one second mouseScrollUp(); //scroll up
Scroll the mouse wheel up once.
mouseScrollUp()
Parameters: none
Returns: void
Example:
mouseScrollDown(); //scroll down sleep(1000); //wait one second mouseScrollUp(); //scroll up
Release a pressed mouse button.
mouseUp( String button )
Parameters:
button |
The mouse button to simulate. This value must be either "left", "right", or "middle". |
Returns: void
Example:
// hold down the left mouse button for two seconds mouseDown("left"); //press the button sleep(2000); mouseUp("left"); //release the button
Display a message dialog box until the user closes it or it times out.
msgBox( String Text ) msgBox( String Text, String Title ) msgBox(String Text, String Title, int Timeout)
Parameters:
Text |
Text to be displayed as the prompt in the dialog box. |
Title |
Title of the dialog window. |
Timeout |
Time (in milliseconds) to wait until until the window times out automatically. |
Returns: void
Example:
msgBox("This window will be active for five seconds.", "Timed msgBox", 5000);
msgBox("This window will be active until it is closed.", "Standard msgBox");
Open a file or URL in the default program. (This will be the default browser if it's a URL.)
open( String path )
Parameters:
path |
The URL or file to open. URLs must begin with http:// or https:// |
Returns:
boolean |
Returns true on success. Returns false on failure. |
Example:
// open google open("https://www.google.com/"); // open a screenshot we take String fileName = "screen.png"; screenShot(fileName); open(fileName);
// delete the screenshot after giving it a few seconds to open
sleep(3000);
fileDelete(fileName);
Display a message box with custom button options.
optionsBox(String Text, String Title, String[] buttons) optionsBox(String Text, String Title, String[] buttons, String defaultButton)
Parameters:
Text |
Text to display as a prompt. |
Title |
Title of the dialog window. |
buttons |
String array of button names to be available. |
defaultButton |
The default button to be selected when "Enter" is pressed. defaultButton should be the text of the desired default button. |
Returns:
int |
The index of selected button within the buttons array. |
Example:
// display a message box with custom buttons
String[] buttons = {"Yes", "No", "Maybe so"};
int i = optionsBox("Allow the mouse to move?", "Response Required", buttons, buttons[0]);
// manage the result
if (i == 0) // if they selected the first button (yes)
mouseMove(50, 50);
else if (i == 1) // if they selected the second button (no)
print("Not moving the mouse.");
else if (i == 2) // if they selected the third button (maybe so)
if ( intGetRandom(0,1) == 0 ) // construct a 50-50 chance that we move the mouse
mouseMove(50, 50);
else
print("Mouse not moved.");
Get the color of a certain pixel as an integer.
pixelGetColor( int x, int y )
Parameters:
x |
X coordinate of pixel. |
y |
Y coordinate of pixel. |
Returns:
int |
The integer representation of the pixel's color. |
Example:
Example Code
Search for the coordinates of a pixel of a certain color within an area. This will return the coordinates of the first pixel found within the area that matches the search color.
pixelSearch ( int colorInt ) pixelSearch ( int colorInt, int x1, int y1, int x2, int y2 ) pixelSearch ( int colorInt, int x1, int y1, int x2, int y2, int speed )
Parameters:
colorInt |
Integer representation of the color to search for. |
x1 |
X value of top left coordinate. |
y1 |
Y value of top left coordinate. |
x2 |
X value of bottom right coordinate. |
y2 |
Y value of bottom right coordinate. |
speed |
A value of 1-5 to describe how fast to search. A speed of 2 searches twice as fast as speed 1 except it only checks every other pixel, which is fine if the color you're trying to find is more than two pixels wide. |
Returns:
int[] |
If the color is found coordinates are returned in an int array formatted like: [x, y]. If the color is not found it will return [-1,-1]. If there is an error executing the search it will return [-3, -3]. |
Example:
Example Code
Print to the terminal.
print( String s ) print( Object obj ) print( long l ) print( int i ) print( float f ) print( double d ) print( char[] s ) print( char c ) print( boolean b )
Parameters:
obj |
Object to print |
Returns: void
Example:
Example Code
Get an integer representation of a color based on R,G,B values.
rgbGetInt(int r, int g, int b)
Parameters:
r |
r value. |
g |
g value. |
b |
b value. |
Returns:
int |
The integer representation of the color. |
Example:
Example Code
Delete a directory and its contents.
rmDir(String filePath)
Parameters: none
Returns: void
Example:
Example Code
Take a screenshot and save to a PNG file.
screenShot( String fileName ) screenShot( String fileName, int x1, int y1, int x2, int y2 )
Parameters:
fileName |
Filename to save the PNG screenshot to. |
x1 |
X value of top left coordinate. |
y1 |
Y value of top left coordinate. |
x2 |
X value of bottom right coordinate. |
y2 |
Y value of bottom right coordinate. |
Returns: void
Example:
// take a screenshot of the whole screen and save to myScreenShot.png screenShot("myScreenShot.png"); // take a partial screenshot from coordinates (0,0) to (100, 100) screenShot("anotherOne.png", 0,0, 100, 100); // open the screenshots
open("myScreenShot.png");
open("anotherOne.png");
Simulate keyboard input by "typing" the contents of str. Special keys can also be typed. The speed at which this typing occurs can be set with {@link setSpeed}.
send(String str)
Parameters:
str |
The string to type, one letter (or special key) at a time. |
Returns: void
Example:
Example Code
Set the current speed. The speed controls how quickly mouse and keyboard actions happen. The default speed is .95 (95%). A speed of 1.00 (100%) makes mouse and keyboard actions instant.
setSpeed(double spd)
Parameters:
spd |
The new speed as a double. This value must be between 0.00 and 1.00, if it isn't no action will be taken. A speed of 1.00 will make mouse and keyboard actions instant. |
Returns: void
Example:
Example Code
Delay execution for an amount of milliseconds (1000 milliseconds = 1 second).
sleep( int milliseconds )
Parameters:
milliseconds |
Time to delay; must be between 0 and 60,000ms. Only takes integer values. |
Returns: void
Example:
print("About to sleep for 1 second...");
sleep(1000);
print("All done.");
Convert to a char.
toChar( char c ) toChar( String s )
Parameters: none
Returns:
char |
none |
Example:
String s = "s";
char c = toChar(s);
Convert to a double.
toDouble( byte b ) toDouble( double d ) toDouble( float f ) toDouble( short s ) toDouble( long l ) toDouble( int i ) toDouble( boolean b ) toDouble( char c ) toDouble( String s )
Parameters: none
Returns:
double |
none |
Example:
int i = 10;
double d = toDouble(i);
float f = toFloat(i);
print( i/3 ); // prints 3
print( d/3 ); // prints 3.3333333333333335
print( f/3 ); // print 3.3333333
Convert to a float.
toFloat( byte b ) toFloat( double d ) toFloat( float f ) toFloat( short s ) toFloat( long l ) toFloat( int i ) toFloat( boolean b ) toFloat( char c ) toFloat( String s )
Parameters: none
Returns:
float |
none |
Example:
int i = 10;
double d = toDouble(i);
float f = toFloat(i);
print( i/3 ); // prints 3
print( d/3 ); // prints 3.3333333333333335
print( f/3 ); // print 3.3333333
Convert to an int.
toInt( byte b ) toInt( double d ) toInt( float f ) toInt( short s ) toInt( long l ) toInt( int i ) toInt( boolean b ) toInt( char c ) toInt( String s )
Parameters: none
Returns:
int |
none |
Example:
String aNumber = "100";
int n = toInt(aNumber);
print( n/2 ); // prints 50
Convert to string.
toString( byte b ) toString( double d ) toString( float f ) toString( short s ) toString( long l ) toString( int i ) toString( boolean b ) toString( char c ) toString( String s )
Parameters: none
Returns:
String |
none |
Example:
int i = 10;
double d = toInt(i);
String result = toString(i/3); // result now contains "3"
result = toString(d/3); // result now contains "3.3333333333333335"


A great way to think of an exploration is as a conversation with the learner. You might start by introducing the topic you want to explain/explore, then try and get the learner to engage with it. Along the way, you can ask questions to help the learner check their understanding, and provide them with appropriate feedback so that they don't get frustrated.
So, what should an exploration be about? Typically, it will revolve around a question -- usually, the more specific, the better. For example:
Note: The exploration doesn't need to cover all aspects of what you're trying to teach. In fact, it's usually better and easier to make something basic (and non-branching) first, and then expand on it once learners start using the exploration. You'll be able to see the answers that learners are giving, and use these to add more detail as needed.
Also, Oppia can respond dynamically to learner's answers, so you'll need to tell it how to handle different answers for each 'card'. When planning your exploration, it's good to control the complexity of this branching so that it isn't overwhelming. Thus, similar to the above, we recommend starting with something linear, in order to reach a 'complete' exploration as soon as possible. Later, you can add more branching and loops as needed.
You might also like to check out our compilation of Design Tips.
Oppia models a teacher-student conversation by breaking it down into cards. Based on the learner's answer, Oppia may move to a new card or stay on the same one.
For example, the initial card of an exploration may ask: "Can you figure out the value of 2 + 2?" Based on the learner's answer, Oppia may do different things:
Note that subsequent cards will also say something, and expect an answer from the learner. This is similar to a teacher asking a question of a student, and waiting for the answer.
When writing an exploration, most of the work involves answering the following question (for different possibilities of X and Y):
If the person I'm talking to says X in response to my question Y, what should I say?
That is, pretend you're having a 1-on-1 conversation with the learner. If the learner gives you a particular answer, how would you respond in a way that's most helpful for them? Use that as the basis for the feedback that Oppia should give.


|
BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Chain of segments defined during the construction of the chain and cannot be modified later. More...
#include <btkChain.h>
Public Types | |
| typedef SharedPtr< const FixedChain > | ConstPointer |
| typedef SharedPtr< FixedChain > | Pointer |
| Public Types inherited from btk::Chain | |
| typedef SharedPtr< const Chain > | ConstPointer |
| typedef SharedPtr< Chain > | Pointer |
| Public Types inherited from btk::DataObjectLabeled | |
| typedef SharedPtr< const DataObjectLabeled > | ConstPointer |
| typedef SharedPtr < DataObjectLabeled > | Pointer |
| Public Types inherited from btk::DataObject | |
| typedef SharedPtr< const DataObject > | ConstPointer |
| typedef SharedPtr< DataObject > | Pointer |
| Public Types inherited from btk::Object | |
| typedef SharedPtr< const Object > | ConstPointer |
| typedef SharedPtr< Object > | Pointer |
Public Member Functions | |
| virtual Chain::Pointer | Clone () |
| virtual SegmentCollection::Pointer | GetSegments () const |
| virtual bool | RemoveSegment (Segment::Pointer seg) |
| Public Member Functions inherited from btk::Chain | |
| virtual | ~Chain () |
| Public Member Functions inherited from btk::DataObjectLabeled | |
| const std::string & | GetDescription () const |
| const std::string & | GetLabel () const |
| virtual void | SetDescription (const std::string &description) |
| virtual void | SetLabel (const std::string &label) |
| Public Member Functions inherited from btk::DataObject | |
| DataObject * | GetParent () const |
| bool | HasParent () const |
| void | Modified () |
| void | SetParent (DataObject *parent) |
| void | Update () |
| Public Member Functions inherited from btk::Object | |
| unsigned long int | GetTimestamp () const |
Static Public Member Functions | |
| static Pointer | New (SegmentCollection::Pointer segments, const std::string &label, const std::string &desc="") |
Protected Member Functions | |
| FixedChain (SegmentCollection::Pointer segments, const std::string &label, const std::string &desc) | |
| FixedChain (const FixedChain &toCopy) | |
| virtual void | UpdateSource (Model *newSource) |
| Protected Member Functions inherited from btk::Chain | |
| Chain (const std::string &label, const std::string &desc) | |
| Chain (const Chain &toCopy) | |
| Protected Member Functions inherited from btk::DataObjectLabeled | |
| DataObjectLabeled (const std::string &label="", const std::string &description="") | |
| DataObjectLabeled (const DataObjectLabeled &toCopy) | |
| Protected Member Functions inherited from btk::DataObject | |
| DataObject () | |
| DataObject (const DataObject &toCopy) | |
| virtual | ~DataObject () |
| Protected Member Functions inherited from btk::Object | |
| Object () | |
| Object (const Object &toCopy) | |
| virtual | ~Object () |
Additional Inherited Members | |
| Protected Attributes inherited from btk::Chain | |
| Model * | mp_Model |
Chain of segments defined during the construction of the chain and cannot be modified later.
Smart pointer associated with a const FixedChain object.
Smart pointer associated with a FixedChain object.
|
protected |
Constructor
|
protected |
Copy constructor.
|
inlinevirtual |
Create a copy of the chain and return it as a shared pointer.
Implements btk::Chain.
|
virtual |
Returns the list of segments set in this chain only if all of them are included in the attached model.
Implements btk::Chain.
|
inlinestatic |
Creates a smart pointer associated with a FixedChain object.
|
virtual |
Remove the segment if in this chain. The method returns true if the chain is then empty, otherwise false.
Implements btk::Chain.
|
protectedvirtual |
Internal method called from the attached model when this one is cloned or deeply copied.
Implements btk::Chain.


Over 400 fun and playful Blob Emoji for Discord
The Official Blob Emoji Servers
Blob Emoji
Join ServerBlob Emoji 2: Google Blobs
Join ServerBlob Emoji 3: Emotions
Join ServerBlob Emoji 4: Actions
Join ServerBlob Emoji 5: Characters
Join ServerBlob Emoji 6: Google / Animals
Join ServerAll blobs that are uploaded to official Blob Emoji servers are licensed under the Apache License 2.0, the same license that Noto Emoji by Google are licensed under.
All blobs from the official servers can be downloaded here. Make sure to follow the license.
Community Blob Servers
To add your Blob Server to our Community Servers section, join the official Blob Emoji server and message our Blob Mail bot.
In order to use custom emoji in other Discord Servers you need an active Discord Nitro subscription.


Map Method
1/10/2016
Today we're going to talk about a specific method that is extremely useful for many of the functions that you will possibly want to do in Ruby. The map method is used to output the results of a block or code you give it and displays it in a new array.
In the example above, I defined an array with the integers 1,2,3, and 4 inside it. I then proceeded to use the array method to pass each element of "array" into the block {|x| x+1}. This block will take each element of "array" as x and for each x it will do the function "x+1". I made the output of array.map {|x| x+1} equal to new_array and if I were to call upton new_array, I would get an array with the elements 2,3,4,and 5. This is an extremely simple use for the map method, but I hope it opens you up the the countless possibilities it can be used in!


Description is Required
Name of Author
enter name
Name of publisher
publisher name is required
Date
Complete Date is Required
Add Quote


Click Here to Hide
Click Here to Show
Click Here to Fade In
Click Here to Fade Out
Click Here to Slide Up
Click Here to Slide Down
Click Here to Set Opacity to 0
Click Here to Set Opacity to 1
Hide & Show Test
Fade In Test
Fade Out Test
Slide Up/Down Test


{{#markdown}}
Start by adding an element with a class of .row
. This will create a horizontal block to contain vertical columns. Then add elements with a .column
class within that row. You can use .column
or .columns
—the only difference is grammar. Specify the widths of each column with the .small-#
, .medium-#
, and .large-#
classes.
For example: The EBI Framework uses a 12 column grid. This page has a 9/12 left column, and 3/12 right column; the structure:

 Main left column

 Right sidebar

Note that by using .medium-
the two columns automatically expand to full width on small screens (mobile devices).
For further background and demonstration, view the Foundation documentation on grids.
In addtion to using the Foundation .no-collapse
option on grid rows, we've found that our layouts benefit from collapsing column padding in some locations.
You can remove right or left padding by giving the div.column
a .no-pad-right
or .no-pad-left


--- layout: default ---
Welcome to the 404 Page!
The requested page could not be found. Sorry about that. You know what else is confusing? The entire Kingdom Hearts storyline. If you want to be less lost on that, watch the video below. If you'd like to feel less lost about where you are now, try hitting the back button on your browser.


Hong Kong police shoot, critically wound protester
by Alex Johnson and Ed FlanaganPolice shot and critically wounded a demonstrator during the increasingly violent anti-government demonstrations across Hong Kong, authorities said Monday.
The protester underwent surgery Monday at Pamela Youde Nethersole Eastern Hospital in the Chan Wai district, the hospital told NBC News. No further information on the man was immediately available.
Hong Kong police confirmed that "one male was shot" when an officer fired his service weapon during one of several demonstrations across the island "due to the rioters' extensive illegal acts."
They didn't say where the shooting occurred, but at least three gunshots were heard in Sai Wan Ho on northeastern Hong Kong Island at about 7:30 a.m. Monday.
Police scheduled a news conference for later in the day.
Anti-government demonstrations have riven Hong Kong for almost six months, having started in June as a series of protests triggered by an extradition bill that was later withdrawn.
Download the NBC News app for breaking news
The protests have since widened to include calls for greater democratic freedoms amid fears of China's increased control over the territory.
A college student became the first person to die in the protests on Friday, four days after he fell in a multi-story parking lot as police used tear gas on demonstrators in the area.


This is wrong but should not crash ] ) } ! # comment config BR2_PACKAGE_GAMMARAY bool "gammaray" depends on BR2_PACKAGE_QT5 help GammaRay Qt introspection probe. second line of help, with correct indentation GammaRay Qt introspection probe. second line of help, with correct indentation third line underindented and thus wrong default 'true' config W1_MASTER_GPIO_CUSTOM tristate "Custom GPIO-based W1 driver" depends on GENERIC_GPIO select W1_GPIOconfig AG71XX tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support" depends on ATH79 imply HAS_TXX9_SERIAL def_bool LD_VERSION >= 225000000 || LD_IS_LLD select PHYLIB ---help--- If you wish to compile a kernel for AR7XXX/91XXX and enable ethernet support, then you should always answer Y to this. comment "module support disabled" depends on !MODULES menu myMenu depends on NET config NETDEVICES bool "Atheros AR71xx built-in ethernet driver debugging" def_bool ds default n help Atheros AR71xx built-in ethernet driver debugging messages. endmenu if TARGET_OX820 config SYS_CPU default "arm1136" endif if AG71XX config AG71XX_DEBUG bool "Atheros AR71xx built-in ethernet driver debugging" default n help Atheros AR71xx built-in ethernet driver debugging messages. endif # comment menu "System setup" choice prompt "Alpha system type" default ALPHA_GENERIC string "bad" ---help--- This is the system type of your hardware. config HZ_32 bool "32 Hz" config HZ_64 bool "64 Hz" config ALPHA_GENERIC bool "Generic" depends on TTY select HAVE_EISA select GENERIC_BUG_RELATIVE_POINTERS if X86_64 bool "64-bit kernel" if "$(SUBARCH)" = "x86" bool "Support the legacy \"mmu-masters\" devicetree bindings" depends on ARM_SMMU=y && OF help A generic kernel will run on all supported Alpha hardware. endchoice config VGA_HOSE bool def_bool y depends on VGA_CONSOLE && (ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL || ALPHA_TSUNAMI) default y default n default 3 bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC default y if ALPHA_QEMU default n if ALPHA_EV5 || ALPHA_EV56 || (ALPHA_EV4 && !ALPHA_LCA) default n if !ALPHA_SRM && !ALPHA_GENERIC default y if SMP default "y" if PPC_POWERNV range 2 32 depends on SMP default "32" if ALPHA_GENERIC || ALPHA_MARVEL default '4' if !ALPHA_GENERIC && !ALPHA_MARVEL help Support VGA on an arbitrary hose; needed for several platforms which always have multiple hoses, and whose consoles support it. endmenu menu "ARC Architecture Configuration" menu "ARC Platform/SoC/Board" #New platform adds here source "arch/arc/plat-eznps/Kconfig" source 'arch/arc/plat-hsdk/Kconfig' endmenu menu "ARC CPU Configuration" choice prompt "ARC Core" default ARC_CPU_HS if ISA_ARCV2 help bla bla if ISA_ARCOMPACT config ARC_CPU_750D bool "ARC750D" select ARC_CANT_LLSC help Support for ARC750 core endif #ISA_ARCOMPACT endchoice if SMP config NR_CPUS int "Maximum number of CPUs (2-4096)" range 2 4096 default "4" endif #SMP config ARC_MMU_V4 bool "MMU v4" depends on ISA_ARCV2 endmenu # "ARC CPU Configuration" menuconfig ARC_PLAT_EZNPS bool "\"EZchip\" ARC dev platform" depends on ISA_ARCOMPACT select CPU_BIG_ENDIAN select CLKSRC_NPS if !PHYS_ADDR_T_64BIT help Support for EZchip development platforms, based on ARC700 cores. We handle few flavors: - Hardware Emulator AKA HE which is FPGA based chassis - Simulator based on MetaWare nSIM - NPS400 chip based on ASIC # SPDX-License-Identifier: GPL-2.0-only config ARM64 def_bool y select HAVE_DYNAMIC_FTRACE_WITH_REGS \ if $(cc-option,-fpatchable-function-entry=2) select HAVE_EFFICIENT_UNALIGNED_ACCESS help ARM 64-bit (AArch64) Linux support. config PHYS_OFFSET hex "Physical address of main memory" if MMU depends on !ARM_PATCH_PHYS_VIRT default DRAM_BASE if !MMU default 0x00000000 if ARCH_EBSA110 || \ ARCH_FOOTBRIDGE || \ ARCH_INTEGRATOR || \ ARCH_REALVIEW default 0x10000000 if ARCH_OMAP1 || ARCH_RPC default 0x20000000 if ARCH_S5PV210 default 0xc0000000 if ARCH_SA1100 help Please provide the physical address corresponding to the location of main memory in your system. comment "S3C2416 Boards" config KERNEL_RAM_BASE_ADDRESS hex "Virtual address of memory base" default 0xe0000000 if SOC_TMS320C6455 default 0xe0000000 if SOC_TMS320C6457 config CC_IS_GCC def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc) endif # error # next line caused hang, see https://phabricator.kde.org/D18509 menu # the next lines should all be fine plain:=plain_value with_whitespace := plain value whitespace value_with_expansion := $(ARCH) plain_expansion_mix := Linux/$(ARCH) $(KERNELVERSION) Kernel Configuration # function definition cc-option-bit = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$(1)) # function call $(cc-option-bit,-m64) # function call and storing the result m32-flag := $(cc-option-bit,-m32) # call to known function name := $(filename) # call to known function with arguments $(warning-if,y,hello world 1) # ... with nested expansions $(error-if,$(success, $(LD) -v | grep -q gold), gold linker '$(LD)' not supported) # expansion in different contexts config FOO_$(BAR$(BAZ)) int "$(filename)" default $(lineno) if $(lineno) >= 5 menu "A MENU" visible if 01 > 00 config A_BOOL def_bool y && m || !!(!(!!n)) || "$(foo)" endmenu # Advanced real world example taken from init/Kconfig in Linux 5.10: # Invoke the system shell /bin/sh with a command to pipe a C program with an # asm goto statement to the C compiler that is set by the environment. If the # exit code is 0 then set the default value of CC_HAS_ASM_GOTO_OUTPUT to y, # otherwise to n. config CC_HAS_ASM_GOTO_OUTPUT depends on CC_HAS_ASM_GOTO def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null) # Real world example with irregular indentation config W1_MASTER_DS2490 tristate "DS2490 USB <-> W1 transport layer for 1-wire" depends on USB help Say Y here if you want to have a driver for DS2490 based USB <-> W1 bridges, for example DS9490*. This support is also available as a module. If so, the module will be called ds2490. # synthetic example to_upper=$(shell,echo $(1) | tr [:lower:] [:upper:]) config ARGS_$(to_upper,$(CC)) string "Arguments for the current compiler \"$(CC)\"" help This is a bad idea. See <file:Documentation/completely/made-up.rst> # binary operator in expression of an if statement if CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER source "drivers/cpufreq/Kconfig" endif # alert on characters (here a colon) that are ignored (taken from axTLS 2.1.5) config CONFIG_LUA_CORE string "Location of Lua CORE" default "/usr/local" help: If the Lua exists on another directory then this needs to be changed comment "Comment texts know expansions, too: $(CC), and the depends property:" depends on A_BOOL # "boolean" is now a free variable name ... boolean=foo # ... but it looks like a bad idea. This may be disputed. menuconfig MODULES bool "Enable loadable module support" modules # the three modern options config OPTIONS option allnoconfig_y option modules option defconfig_list # old option "env" and obsolete custom options config OPTIONS option env=ARCH option custom-without-argument option custom-with-argument=ABC # old syntax menu OLD_STYLE_PROMPT visible if CPU_SUPPORTS_CPUFREQ # busybox 1.31.1 source libbb/Config.in # uClibc-ng-1.0.37 config DESIRED_TARGET_ARCH string option env="ARCH" config OLD_HELP hex ---help--- old help property default 0x1CEC0FEE endmenu # a few errors allnoconfig_y bool def_bool def_tristate default defconfig_list depends endchoice endif help hex imply int mainmenu modules on option optional prompt range select string tristate visible config OK bool "still OK" help still OK now=fail andNow=OK


An object that debounces a single GPIO.
More...
#include <Bounce3.h>
An object that debounces a single GPIO.
◆ Bounce3() [1/3]
| Bounce3::Bounce3 |
( |
uint8_t |
pin, |
|
|
uint8_t |
mode, |
|
|
uint8_t |
pin_mode |
|
) |
| |
◆ Bounce3() [2/3]
| Bounce3::Bounce3 |
( |
uint8_t |
pin, |
|
|
uint8_t |
mode |
|
) |
| |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ Bounce3() [3/3]
| Bounce3::Bounce3 |
( |
uint8_t |
pin | ) |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ poll() [1/2]
| bool Bounce3::poll |
( |
uint32_t |
ts, |
|
|
uint8_t |
val |
|
) |
| |
Update the button state.
- Parameters
-
| ts | The timestamp to use. (default: millis()) |
| val | The pin reading. (default: digitalRead(pin)) |
- Returns
- true, if the button state changes
◆ poll() [2/2]
| bool Bounce3::poll |
( |
void |
| ) |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ pressed()
| uint8_t Bounce3::pressed |
( |
void |
| ) |
|
Check if the button was pressed this loop.
If the button was not pressed, the function returns zero. A non-zero value indicates the button was pressed, so you can evaluate it as a boolean.
If the instance is configured in one-shot mode, it will only return B3_PRESS once per debounced button press.
If the instance is configured in repeat mode, it will return B3_REPEAT_SLOW or B3_REPEAT_FAST to allow the code to differentiate between the first press and repeat presses (if desired).
- Returns
- 0 - Not pressed
-
B3_PRESS - Was just pressed
-
B3_REPEAT_SLOW - A virtual "press" on slow repeat
-
B3_REPEAT_FAST - A virtual "press" on fast repeat
◆ held()
| bool Bounce3::held |
( |
void |
| ) |
|
- Returns
- true if the button is currently held down.
◆ heldFor() [1/2]
| uint32_t Bounce3::heldFor |
( |
uint32_t |
millis | ) |
|
- Parameters
-
- Returns
- How long the button has been held down in ms
-
0, if the button is not currently presesd
◆ heldFor() [2/2]
| uint32_t Bounce3::heldFor |
( |
void |
| ) |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ released()
| uint32_t Bounce3::released |
( |
void |
| ) |
|
- Returns
- The number of milliseconds the button was held down
-
or 0 if the button was not just released.
◆ changed()
| bool Bounce3::changed |
( |
void |
| ) |
|
- Returns
- true if the button was just pressed or released
The documentation for this class was generated from the following files:


|
C++ Actor Framework 0.19
|
Represents pre- and postconditions for receive loops. More...
#include <blocking_actor.hpp>
Public Member Functions | |
| virtual bool | pre () |
| Returns whether a precondition for receiving a message still holds. | |
| virtual bool | post () |
| Returns whether a postcondition for receiving a message still holds. | |
Represents pre- and postconditions for receive loops.
|
virtual |
Returns whether a postcondition for receiving a message still holds.
Reimplemented in caf::blocking_actor::accept_one_cond.


In case you're not all up to speed on the theory, here's a quick recap of the most important bits.
3D visual objects are transformed with 4x4 matrices. The most important ones for translations, scalings and rotations are constructed as follows:
Translation with offset t:
Scaling with scale s:
Rotation around one of the axes x, y or z with angle φ:
To combine transformations, matrix multiplication is used. The left-most transformation is applied first.


Request form for call between source and destination phone
Source phone number:
Destination phone number:


Skeletal skinning is a technique that is massively used in computer graphics to animate meshes in real-time. The main methods (LBS & DQS) are known to produce artifacts, but in a SIGGRAPH 2016 paper, Le et al. proposed a method almost free of any artifacts. We implemented these 3 methods in a single, multi-view application that can be used to compare them. You can access it here. We also propose (modest) improvements on the original paper.
I implemented in javascript the basic ideas presented in 3-Sweep: Extracting Editable Objects from a Single Photo. You can see the prototype here, only the extraction of objects with a straight axis is possible right now. You may need to reload the page if images don't appear.


f
A python module for python developers. Use: pip install codexpy
pip install codexpy
A Personal assistant like jarvis. Made with: Python
Python
This bot retweets the tweets made using #100DaysOfCode.
#100DaysOfCode
My Personal webapp collection. Made during : #100DaysOfCode
CS50: Introduction to Computer Science from Harvard University
Google Certification in Fundamentals Of Digital Marketing.
Certification in Problem Solving(Basic) from HackerRank
Golden Python 5-star badge from HackerRank


Subject: Zoom Availability
Dear Colleagues,
I am pleased to inform you that Zoom is now available. CUNY is currently working on documentation, which I will provide as soon as it is available. In the interim, the following instructions will provide access.
Simply go to https://cuny.zoom.us and choose Sign in. You should be taken to the familiar CUNY login prompt where you enter your<EMAIL_ADDRESS>login credentials.
Information Technology will also be offering Zoom workshops. Please visit our training calendar to register.
Patty
Patricia Kahn, Ph.D. CIO and Assist. VP for Information Technology Services The College of Staten Island, CUNY 2A-303A<PHONE_NUMBER>


Note: Sample text only. With up to 40 hours of battery life, Beats Solo3 Wireless is your perfect everyday headphone. With Fast Fuel, a 5-minute charge gives you 3 hours of playback. Enjoy award-winning Beats sound with Class 1 Bluetooth® wireless
listening freedom. The on-ear, cushioned ear cups are adjustable so you can customize your fit for all-day comfort.
Beats Solo3 Wireless is ready to go when you are. They instantly set up – just power on and
hold near your iPhone – and then simultaneously connect to your Apple Watch, iPad and Mac*
We help music artists to promote their albums in the music industry. Give them opportunity to sell their album in our store . A SocialMedia broadcast where we can offer services;AOB( Announcers-OnBoard) Plugging Ads,Playable Ads, Song Sponsors, BusinesS Owner AOB Sponsors, and many more.


Bitcoin vs DeFi: Which Was Most Profitable This Year?
by Martin YoungDecentralized finance, or DeFi, has come a long way this year. Bitcoin has also made a remarkable recovery from the depths of crypto winter this time a year ago. But which one would be better for long term gains?
BITCOIN vs DEFI
For the uninitiated DeFi is the system of staking crypto collateral in a decentralized smart contract governed lending network. It is a completely new way of approaching finance in a world where the current banking system is clearly crumbling.
A number of platforms have emerged and 2019 has seen explosive growth in the amount staked and the returns rewarded. Ethereum is the platform of choice for DeFi and Maker has the market cornered with over half of all assets locked in.
TokenAnalyst has taken a look at gains so far this year for both bitcoin and DeFi platforms. With $1,000 invested on January 1st, BTC would have yielded gains of 133% while hodling ETH would have made just 36%. DeFi platforms have offered considerably less.
RISK vs REWARD
The thing to note here is that bitcoin is highly speculative and extremely volatile. Therefore the investment risk is substantially higher, but so is the reward. DeFi platforms are not designed to be high risk investment vehicles, they are designed to replace banks offering greater returns, and for that they have succeeded.
Bitcoin has been around for a decade while DeFi is still in its first real year of growth. Since the beginning of the year the amount invested in DeFi has grown by 140% according to defipulse.com. So taking those figures the decentralized finance ecosystem has grown more than bitcoin has this year.
There is currently $660 million locked in DeFi platforms and a record volume of ETH at 3.5 million. As the world plunges deeper into debt and interest rates fall into negative territory, people are going to be looking for alternative forms of investment.
Locking digital assets up in a secure DeFi smart contract typically yields between 5 and 20 percent. Considering that Ethereum is the backbone for the entire ecosystem at the moment, further growth will also result in greater demand for ETH so earnings could be twofold.
Bitcoin will always be viewed as the store of value, or digital gold, while Ethereum and DeFi appear to be shaping up as the future of decentralized internet money. The world is on the cusp of a massive paradigm shift when it comes to financial systems and the future clearly needs to be decentralized, as the current system is clearly flawed.
Will DeFi continue to grow as the banking system collapses? Add your thoughts below.
Images via Shutterstock, Twitter @thetokenanalyst, chart by Defi Pulse
The Rundown


Beyond classical search
Table of contents
- Optimization Problem
- Hill Climbing Search
- Simulated Annealing
- Genetic Algorithm
- Searching with non-deterministic actions
- The erratic vacuum world
- Searching with Partial Observations
- Vacuum World with no observation
- And-Or-Graph-Search
- Online DFS Agent
- LRTA*-Agent
Optimization Problem
In many optimization problems, the path to the solution is irrelevant. In pure optimization problems, the best state is defined by the objective function. To represent such problems, a state-space landscape is used. It has a location (state) represented by x-axis and elevation(objective function value) represented by y-axis. The best state is hence the state with the highest objective value
The given diagram is a state-space representation of an objective function. You can click anywhere inside the box to reveal the elevation there. You are allowed 25 moves to find the highest peak before the hill is revealed.
represents found global maximas and represents unfound global maximas
Try to come up with a strategy that can be used for all kinds of hills.
Hill Climbing Search
In hill climbing search, the current node is replaced by the best neighbor. In this case, the objective function is represented by elevation, neighbors of a state are the states to the left and right of it and the best neigbor is the neigbor state with the highest elevation.
The represents global maximas and represents the states from where the hill climbing search can reach a global maxima.
Click on different states to start Hill Climbing Search from there and see which direction it prefers and when does it stop.
Use the restart button to try it on different kinds of hills.
Simulated Annealing
Simulated Annealing is a combination of Hill Climbing and Random Walk to gain more efficiency and completeness. In this procedure, instead of always moving to the best neighbor, a random neighbor is chosen. If the new state has better objective value than the current state, it is always chosen. If not, the algorithm accept the new state with a probability less than one. The probability of choosing a bad state depends on :
- The difference in objective value of the new state and the current state
- The temperature
The represents global maximas and represents current state.
Notice how the algorithm shakes violently between states when the temperature is high and then stabilizes to higher states as the temperature decreases.
Try to set the temperature from the slider to different values and notice how the algorithm behaves.
Genetic Algorithm
Little critters change the color of their fur to match the background to camouflage themselves from predators.
Click on the canvas to generate next generation. Keep clicking to generate another progeny.
Note: Single point crossover might not be suitable for all applications
Searching with non-deterministic actions
In a world with non-deterministic actions, the result of an action is not known with complete certainty.
The erratic vacuum world
The erratic vacuum world is an extension of vacuum world from Chapter 2. In this world, the behavior of the cleaner is non-deterministic.

Given below is a 5 tile erratic vacuum world. You can record a sequence of actions which you believe will clean up all the dirt. Use the play the button to execute that sequence. Play the sequence multiple times to see how they can result in different end state sometimes. Use restart button to generate a new initial state. Use clear button to clear the recorded sequence and record a new one.
Moves
Searching with Partial Observations
Now we come back to a world where the actions of the robot are deterministic again (no erratic behavior like before) but, the robot no longer has complete sense of its current state or its environment.
Vacuum World with no observation
In this world, the vacuum cleaner has no idea initially about its own location and the location of dirt in the world. Since the robot has no percept, it should be able to figure out a sequence of actions that will work despite its current state.
Given below are 8 random initial states. You can record a sequence of actions and see it in action just like before. Assume that illegal moves (like moving right in the right-most tile) have no effect on the world.
Try to find a sequence of actions that will lead to a final state (Clean all the dirt), no matter what the initial state of the world.
Moves
And-Or-Graph-Search
Online DFS Agent
Click to reset. Green tile is destination.


modelChecker
Reliable production ready sanity checker for Autodesk Maya
Sanity check polygon models in Autodesk Maya, and prepare your digital assets for a smooth sailing through the production pipeline.
The modelChecker is free and always will be.
Get started DownloadInstallation
Place the modelChecker.py file in your maya scripts directory and create a python shell button with the following code:
import modelChecker
try:
md_win.close()
except:
pass
md_win = modelChecker.modelChecker(parent=modelChecker.getMainWindow())
md_win.show()
md_win.raise_()
try:
md_win.close()
except:
pass
md_win = modelChecker.modelChecker(parent=modelChecker.getMainWindow())
md_win.show()
md_win.raise_()


Hi,
I'm currently using the emonTxV3_continuous_kwhtotals_noeeprom sketch. I've looked in to adding Voltage to the RF data but can't seem to find the voltage variable. What is it called? The complexities of the sketch are beyond my level of understanding.
typedef struct {
unsigned long msgNumber;
int realPower_CT1;
int realPower_CT2;
int realPower_CT3;
int realPower_CT4;
long wh_CT1;
long wh_CT2;
long wh_CT3;
long wh_CT4;
} Tx_struct; // revised data for RF comms
Tx_struct tx_data;
Thanks!
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
This sketch appears to be based on one that I have supplied for use with the emonTx V3. I say this because my name appears at the top! Although voltage samples are "continuously" taken, they are only used for the purpose of calculating Real Power.
To display Vrms would require additional processing of the voltage samples which is not included in this code.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
Thanks very much for your reply. Voltage was a nice to have reading.
I'll put this in the way to hard basket at the moment seeing as it's not readily available in the code!
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
What values would you like to be transmitted, along with the RMS voltage? Specifying exactly what data needs to be transmitted, and how often, seems to be every bit as elusive as writing the code for it.
Although this sketch is monitoring continuously, much of the data that it collects is not being used. If data is only to be transmitted every 10 seconds, then each measurement window should be 10 seconds too. Otherwise data will be overwritten before being sent.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
I'd like RMS voltage and temp from DS18B20, basically the functionality the non watt hour sketch had.
I can probably handle adding the code for the temperature sensor back in. I changed the RF send to every 5 seconds in an attempt to display power changes quicker in emonCMS & my local display.
Actually how about power factor and frequency? could be interesting.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
If you're looking for the full range of measurements, Martin Roberts' PLL sketch might be worth considering (with the diverter logic removed if you wish - or just ignore it). (You're OK with that, there's a 60 Hz version elsewhere for those that need it.)
The logic is somewhat complicated as Martin didn't use the library calls due to the overhead they carry, but I've explained most of it in the 'Guide' article about energy diverters.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
I can probably handle adding the code for the temperature sensor back in.
As this sketch is based on my code for taking continuous measurements, temperature sensing has never been included.
Taking temperature measurements when nothing else is happening is straightforward enough. But in a "continuous monitoring" sketch, such as the one we're discussing here, the situation is rather different. If the standard library routines for measuring temperature are used, the flow of V and I data ceases to be continuous. Gaps are caused while the OneWire routines run their course.
Martin's PLL-based code does appear able to perform both continuous measurements of its V and I sensors, and also provide temperature measurements - but not using the standard library routines. If anyone can explain to me how this mechanism actually works, I would be most grateful.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
"If anyone can explain to me how this mechanism actually works, I would be most grateful."
Deviously!
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
Thanks for the information. You've convinced me to not got tampering with the continuous sketch :) I'll have a look at Martin's PLL sketch.
Regards
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
Martin's PLL sketch was designed for energy diversion, which means it has two current inputs only. It should be possible to extend it if you need to use all 4 current inputs. Dan Woodie certainly extended it to 3 at 60 Hz (http://openenergymonitor.org/emon/node/2624 and http://openenergymonitor.org/emon/node/2679).
Expanding on my "deviously" answer above: The library routines for measuring the temperature cannot make any assumptions about the state of the sensor, and they must therefore set it up completely each time assuming nothing, and wait for the measurement to be done and only then they return with the value, while that is happening the processor must wait. Martin was able to sidestep all the reconfiguration that the library does because he knew nothing had changed between readings, and he was able to split the reading process into two and sidestep the wait while the sensor does the measurement. First he requests a reading and then the sketch does other things while the sensor gets the temperature, converts it and stores it in its buffer memory. He then comes back and gets the answer from the buffer. This makes not the slightest difference in practice as the temperature changes only slowly compared to the time to execute the main loop in the sketch.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
Thanks for the explanation, impressive stuff! I'm using 3 current inputs at the moment.
I'll hold off on trying to extend the sketch till my skills are up to the task.
I've certainly learnt a lot since embarking on my house monitoring project. I find it very rewarding. The support available on OEM makes anything seem possible, some very bright cookies are involved with this project.
I now understand why developers love Linux. It's awesome what you can do with a few shell commands. I'm in the process of configuring emonCMS on the Raspberry Pi purchased last week with help from the OEM forums of course :)
Thanks again.
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
Thanks, Robert, for your comprehensive explanation about temperature sensing.
I look forward to trying this out in my own code ...
Re: Voltage reading from emonTxV3 continuous kwhtotals noeeprom
So, there no way for get voltage from this sketch?


HAVE A GREAT IDEA TO HELP IMPROVE KNOWLEDGE.BIO ?
EMAIL RICHARD TO SUGGEST YOUR OPINIONS
VISIT THE NCATS CONTACT PAGE
The Translator Knowledge.bio web resource is an
open source collaboration of the
Translator Project at The National Center for Advancing Translational Sciences
This resource is intended purely for research, education, and entertainment purposes. It should not be used for medical or professional advice.
Unless stated otherwise, all non-personally identifiable data entered into this site will be publicly accessible.


WELCOME TO PASSION, GRILLS AND BBQ
Life is meant to be lived; cherish the exciting moments, and relish in those all too brief moments of relaxation.  Passion, Grills and barbecue serves as a vessel to project my passions, and clue to my loyal readers as to what inspires me in this crazy world. So, sit back, relax, and read on.


In this program there are two codecs implemented. One is Huffman codec, which is based on the Huffman coding (more) , which codes streams of data by creating appropriate Huffman trees for them. The other codec is None codec, which does not code or decode data at all, it just works with streams of raw data, so it is a codec representation of not using a coder/decoder.
Although these are the only implemented codecs, this application provides an easy way to add new codecs. New codec just has to extend the abstract class Codec. Providing access to their Coder / Decoder classes that describe the coding / decoding process. The new codec should alse be registered in Codecs class that keeps track of all known codecs. Once the new codec is added to the known codecs, it can be used in the GUI application to encode files in archive.