array_merge (PHP 4, PHP 5, PHP 7) array_merge — 合并一个或多个数组 说明 array array_merge ( array $array1 [, array $... ] ) array_merge() 将一个或多个数组的单元合并起来，一个数组中的值附加在前一个数组的 后面。返回作为结果的数组。 如果输入的数组中有相同的字符串键名，则该键名后面的值将覆盖前一个值。然而，如果 数组包含数字键名，后面的值将不会覆盖原来的值，而是附加到后面。 如果只给了一个数组并且该数组是数字索引的，则键名会以连续方式重新索引。 参数 array1 Initial array to merge. ... Variable list of arrays to merge. 返回值 返回结果数组。 更新日志 版本 说明 Warning array_merge() 的行为在 PHP 5 中被修改了。和 PHP 4 不同，array_merge() 现 在只接受 array 类型的参数。不过可以用强制转换来合并其它类型。请看下面的例 子。 Example #1 array_merge() PHP 5 例子 'bar'); $result = array_merge((array)$beginning, (array)$end); print_r($result); ?> 以上例程会输出： Array ( [0] => foo [1] => bar ) 范例 Example #2 array_merge() 例子 "red", 2, 4); $array2 = array("a", "b", "color" => "green", "shape" => "trapezoid", 4); $result = array_merge($array1, $array2); print_r($result); ?> 以上例程会输出： Array ( [color] => green [0] => 2 [1] => 4 [2] => a [3] => b [shape] => trapezoid [4] => 4 ) Example #3 Simple array_merge() 例子 "data"); $result = array_merge($array1, $array2); ?> 别忘了数字键名将会被重新编号！ Array ( [0] => data ) 如果你想完全保留原有数组并只想新的数组附加到后面，用 + 运算符： 'zero_a', 2 => 'two_a', 3 => 'three_a'); $array2 = array(1 => 'one_b', 3 => 'three_b', 4 => 'four_b'); $result = $array1 + $array2; var_dump($result); ?> The keys from the first array will be preserved. If an array key exists in both arrays, then the element from the first array will be used and the matching key's element from the second array will be ignored. array(5) { [0]=> string(6) "zero_a" [2]=> string(5) "two_a" [3]=> string(7) "three_a" [1]=> string(5) "one_b" [4]=> string(6) "four_b" } 参见 • array_merge_recursive() - 递归地合并一个或多个数组 • array_combine() - 创建一个数组，用一个数组的值作为其键名，另一个数组的值作 为其值 • array operators User Contributed Notes 59 notes =============================================================================== In some situations, the union operator ( + ) might be more useful to you than array_merge. The array_merge function does not preserve numeric key values. If you need to preserve the numeric keys, then using + will do that. ie: "zero", 1=>"one", 2=>"two", 3=>"three"); ?> Note the implicit "array_unique" that gets applied as well. In some situations where your numeric keys matter, this behaviour could be useful, and better than array_merge. --Julian =============================================================================== to get unique value from multi dimensional array use this instead of array_unique(), because array_unique() does not work on multidimensional: array_map("unserialize", array_unique(array_map("serialize", $array))); Hope this will help someone; Example $a=array(array('1'),array('2'),array('3'),array('4)); $b=array(array('2'),array('4'),array('6'),array('8)); $c=array_merge($a,$b); then write this line to get unique values $c=array_map("unserialize", array_unique(array_map("serialize", $c))); print_r($c); =============================================================================== if you generate form select from an array, you probably want to keep your array keys and order intact, if so you can use ArrayMergeKeepKeys(), works just like array_merge : array ArrayMergeKeepKeys ( array array1 [, array array2 [, array ...]]) but keeps the keys even if of numeric kind. enjoy $Default[0]='Select Something please'; $Data[147]='potato'; $Data[258]='banana'; $Data[54]='tomato'; $A=array_merge($Default,$Data); $B=ArrayMergeKeepKeys($Default,$Data); echo '
'; print_r($A); print_r($B); echo ''; Function ArrayMergeKeepKeys() { $arg_list = func_get_args(); foreach((array)$arg_list as $arg){ foreach((array)$arg as $K => $V){ $Zoo[$K]=$V; } } return $Zoo; } //will output : Array ( [0] => Select Something please [1] => potato [2] => banana [3] => tomato ) Array ( [0] => Select Something please [147] => potato [258] => banana [54] => tomato ) ?> =============================================================================== Reiterating the notes about casting to arrays, be sure to cast if one of the arrays might be null: Produces: 1 ============== Array ( [0] => zzzz [1] => xxxx [2] => mmmm [3] => nnnn ) 2 ============== Array ( [0] => zzzz [1] => xxxx ) 3 ============== 4 ============== Array ( [0] => zzzz [1] => xxxx ) 5 ============== Result is null =============================================================================== We noticed array_merge is relatively slower than manually extending an array: given: $arr_one[ 'x' => 1, 'y' => 2 ]; $arr_two[ 'a' => 10, 'b' => 20 ]; the statement: $arr_three = array_merge( $arr_one, $arr_two ); is routinely 200usec slower than: $arr_three = $arr_one; foreach( $arr_two as $k => $v ) { $arr_three[ $k ] = $v; } 200usec didn't matter...until we started combining huge arrays. PHP 5.6.x =============================================================================== I needed a function similar to ian at fuzzygroove's array_interlace, but I need to pass more than two arrays. Here's my version, You can pass any number of arrays and it will interlace and key them properly. Example usage: result: Array ( [0] => a [1] => e [2] => h [3] => k [4] => b [5] => f [6] => i [7] => l [8] => c [9] => g [10] => j [11] => m [12] => d [13] => n [14] => o ) Let me know if you improve on it. =============================================================================== An addition to what Julian Egelstaff above wrote - the array union operation (+) is not doing an array_unique - it will just not use the keys that are already defined in the left array. The difference between union and merge can be seen in an example like this: 'one', 'two' => 'two', 'zero' => 'zero', ) $arr4 = array_merge( $arr1, $arr2 ); var_export( $arr4 ); # array ( 'one' => 'three', 'two' => 'four', 'zero' => 'zero', ) ?> =============================================================================== to merge arrays and preserve the key i found the following working with php 4.3.1: "Test1", 2 => "Test2"); $array2 = array(3 => "Test3", 4 => "Test4"); $array1 += $array2; ?> dont know if this is working with other php versions but it is a simple and fast way to solve that problem. =============================================================================== I keep seeing posts for people looking for a function to replace numeric keys. No function is required for this, it is default behavior if the + operator: "one", "two"=>2); $b=array(1=>"two", "two"=>1, 3=>"three", "four"=>4); print_r($a+$b); ?> Array ( [1] => one [two] => 2 [3] => three [four] => 4 ) How this works: The + operator only adds unique keys to the resulting array. By making the replacements the first argument, they naturally always replace the keys from the second argument, numeric or not! =) =============================================================================== More about the union operator (+)... The "array_unique" that gets applied, is actually based on the keys, not the values. So if you have multiple values with the same key, only the last one will be preserved. 0, 1=>1) // ie: beware of the latter keys overwriting the former keys ?> =============================================================================== For those who are getting duplicate entries when using this function, there is a very easy solution: wrap array_unique() around array_merge() cheers, k. =============================================================================== WARNING: numeric subindexes are lost when merging arrays. Check this example: $a=array('abc'=>'abc','def'=>'def','123'=>'123','xyz'=>'xyz'); echo "a=";print_r($a); $b=array('xxx'=>'xxx'); echo "b=";print_r($b); $c=array_merge($a,$b); echo "c=";print_r($c); The result is this: c=Array ( [abc] => abc [def] => def [0] => 123 [xyz] => xyz [xxx] => xxx ) =============================================================================== The function behaves differently with numbers more than PHP_INT_MAX 'dd'); $arr2 = array('123456789876543212345678' => 'ddd', '35' => 'xxx'); var_dump(array_merge($arr1, $arr2)); // $arr1 = array('1234' => 'dd'); $arr2 = array('12345' => 'ddd', '35' => 'xxx'); var_dump(array_merge($arr1, $arr2)); ?> result: array(3) { ["1234567898765432123456789"]=> string(2) "dd" ["123456789876543212345678"]=> string(3) "ddd" [0]=> string(3) "xxx" } array(3) { [0]=> string(2) "dd" [1]=> string(3) "ddd" [2]=> string(3) "xxx" } =============================================================================== To combine several results (arrays): The above example will output: Array ( [0] => Array ( [0] => foo1 ) [1] => Array ( [0] => foo2 ) [2] => Array ( [0] => bar1 ) [3] => Array ( [0] => bar2 ) ) However, example below helps to preserve numeric keys: array('foo1'), 456 => array('foo2'), ), array( 321 => array('bar1'), 654 => array('bar2'), ), ); $rows = array(); foreach ($results as &$result) { $rows = $rows + $result; // preserves keys } print_r($rows); ?> The above example will output: Array ( [123] => Array ( [0] => foo1 ) [456] => Array ( [0] => foo2 ) [321] => Array ( [0] => bar1 ) [654] => Array ( [0] => bar2 ) ) =============================================================================== Similar to Jo I had a problem merging arrays (thanks for that Jo you kicked me out of my debugging slumber) - array_merge does NOT act like array_push, as I had anticipated hope this helps someone =============================================================================== PHP is wonderfully decides if an array key could be a number, it is a number! And thus wipes out the key when you array merge. Just a warning. $array1['4000'] = 'Grade 1 Widgets'; $array1['4000a'] = 'Grade A Widgets'; $array2['5830'] = 'Grade 1 Thing-a-jigs'; $array2['HW39393'] = 'Some other widget'; var_dump($array1); var_dump($array2); //results in... array(2) { [4000]=> string(15) "Grade 1 Widgets" ["4000a"]=> string(15) "Grade A Widgets" } array(2) { [5830]=> string(20) "Grade 1 Thing-a-jigs" ["HW39393"]=> string(17) "Some other widget" } var_dump(array_merge($array1,$array2)); //results in... array(4) { [0]=> string(15) "Grade 1 Widgets" ["4000a"]=> string(15) "Grade A Widgets" [1]=> string(20) "Grade 1 Thing-a-jigs" ["HW39393"]=> string(17) "Some other widget" } =============================================================================== I found the "simple" method of adding arrays behaves differently as described in the documentation in PHP v5.2.0-10. $array1 + $array2 will only combine entries for keys that don't already exist. Take the following example: $ar1 = array('a', 'b'); $ar2 = array('c', 'd'); $ar3 = ($ar1 + $ar2); print_r($ar3); Result: Array ( [0] => a [1] => b ) Where as: $ar1 = array('a', 'b'); $ar2 = array('c', 'd'); $ar3 = array_merge($ar1, $ar2); print_r($ar3); Result: Array ( [0] => a [1] => b [2] => c [3] => d ) Hope this helps someone. =============================================================================== array_merge will merge numeric keys in array iteration order, not in increasing numeric order. For example: 10, 1=>20); // same as array(10, 20); $b = array(0=>30, 2=>50, 1=>40); ?> array_merge($a, $b) will be array(10, 20, 30, 50, 40) and not array(10, 20, 30, 40, 50). =============================================================================== Note that if you use + to merge array in order to preserve keys, that in case of duplicates the values from the left array in the addition is used. =============================================================================== In both PHP 4 and 5, array_merge preserves references in array values. For example: &$foo); $merged_array = array_merge($array, array("bar" => "baz")); $merged_array["foo"] = 24; assert($foo === 24); // works just fine ?> =============================================================================== More on the union (+) operator: the order of arrays is important and does not agree in my test below with the other posts. The 'unique' operation preserves the initial key-value and discards later duplicates. PHP 5.2.6-2ubuntu4.2 'a', '23456'=>'b', '34567'=>'c', '45678'=>'d'); $a2=array('34567'=>'X'); $a3=$a1 + $a2; $a4=$a2 + $a1; print('a1:'); print_r($a1); print('a2:'); print_r($a2); print('a3:'); print_r($a3); print('a4:'); print_r($a4); ?> a1:Array ( [12345] => a [23456] => b [34567] => c [45678] => d ) a2:Array ( [34567] => X ) a3:Array ( [12345] => a [23456] => b [34567] => c [45678] => d ) a4:Array ( [34567] => X [12345] => a [23456] => b [45678] => d ) =============================================================================== I don't think that the comment on + operator for array in array_merge page, was understandable, this is just a little test to know exactly what's happend. '1a', 'b' => '1b'); $a2 = array( '20', '21' , '22' , 'a' => '2a', 'c' => '2c'); $a = $a1 + $a2; print_r( $a ); //result: Array ( [0] => 10 // [1] => 11 // [2] => 12 // [a] => 1a // [b] => 1b // [c] => 2c ) $a = $a2 + $a1; print_r( $a ); //result: Array ( [0] => 20 // [1] => 21 // [2] => 22 // [a] => 2a // [c] => 2c // [b] => 1b ) ?> =============================================================================== It would seem that array_merge doesn't do anything when one array is empty (unset): "x"); $a = array_merge($a, $b}); //$a is still unset. ?> to fix this omit $a if it is unset:- I don't know if there's a better way. =============================================================================== 123, 'integer456_merge_with_integer444' => 456, 'integer789_merge_with_array777' => 789, 'array' => array( "string1", "string2" ), 'array45_merge_with_array6789' => array( "string4", "string5" ), 'arraykeyabc_merge_with_arraykeycd' => array( 'a' => "a", 'b' => "b", 'c' => "c" ), 'array0_merge_with_integer3' => array( 0 ), 'multiple_merge' => array( 1 ), ); $b = array( 'integer456_merge_with_integer444' => 444, 'integer789_merge_with_array777' => array( 7,7,7 ), 'array45_merge_with_array6789' => array( "string6", "string7", "string8", "string9" ), 'arraykeyabc_merge_with_arraykeycd' => array( 'c' => "ccc", 'd' => "ddd" ), 'array0_merge_with_integer3' => 3, 'multiple_merge' => array( 2 ), ); $c = array( 'multiple_merge' => array( 3 ), ); echo "
".htmlentities(print_r( array_deep_merge( $a, $b, $c ), true))." pre>"; ?> =============================================================================== Usage of operand '+' for merging arrays: 'a1', 'b'=>'a2', 'a3', 'a4', 'a5'); $b=array('b1', 'b2', 'a'=>'b3', 'b4'); $a+=$b; print_r($a); ?> output: Array ( [a] => a1 [b] => a2 [0] => a3 [1] => a4 [2] => a5 [3] => b5 ) numeric keys of elements of array B what not presented in array A was added. 'a1','b'=>'a2','a3','a4','a5'); $b=array(100=>'b1','b2','a'=>'b3','b4'); $a+=$b; print_r($a); ?> output: [a] => a1 [b] => a2 [0] => a3 [1] => a4 [2] => a5 [100] => b1 [101] => b2 [102] => b4 autoindex for array B started from 100, these keys not present in array A, so this elements was added to array A =============================================================================== i did a small benchmark (on PHP 5.3.3) comparing: * using array_merge on numerically indexed arrays * using a basic double loop to merge multiple arrays the performance difference is huge: displayTimer(); $t=new Timer(); method2($mat); $t->displayTimer(); /* output: Script runtime: 2.36782 secs. Script runtime: 0.02137 sec. */ } tryme(); ?> So that's more than a factor 100!!!!! =============================================================================== Old behavior of array_merge can be restored by simple variable type casting like this array_merge((array)$foo,(array)$bar); works good in php 5.1.0 Beta 1, not tested in other versions seems that empty or not set variables are casted to empty arrays =============================================================================== I have been searching for an in-place merge function, but couldn't find one. This function merges two arrays, but leaves the order untouched. Here it is for all others that want it: function inplacemerge($a, $b) { $result = array(); $i = $j = 0; if (count($a)==0) { return $b; } if (count($b)==0) { return $a; } while($i < count($a) && $j < count($b)){ if ($a[$i] <= $b[$j]) { $result[] = $a[$i]; if ($a[$i]==$b[$j]) { $j++; } $i++; } else { $result[] = $b[$j]; $j++; } } while ($i=============================================================================== It is not officially documented but it is summarily important information for everyone to know: neither array_merge or array_merge_recursive functions will function correctly if non-array objects are used as parameters. You would probably expect these functions to ignore non-array elements, right? However, if one parameter is null it PHP will not only return null for the entire function but will also (not always) raise an error, such as : [ Warning: array_merge(): Argument #x is not an array... ] This error message won't appear if the defective variable is an empty array (an empty array is still an array), but it will result in an undesirable incomplete Array. There are several solutions for this problem by validating the Arrays before use them in these functions, but the most efficient way is to enforce the element as an array directly in the function itself. I.e.: $merged = array_merge( (array)$first_array, (array)$second_array ); =============================================================================== I constantly forget the direction of array_merge so this is partially for me and partially for people like me. array_merge is a non-referential non-inplace right-reduction. For different ctrl-f typers, it's reduce-right, side-effect free, idempotent, and non in-place. ex: $a = array_merge(['k' => 'a'], ['k' => 'b']) => ['k' => 'b'] array_merge(['z' => 1], $a) => does not modify $a but returns ['k' => 'b', 'z' => 1]; Hopefully this helps people that constant look this up such as myself. =============================================================================== Sometimes you need to modify an array with another one here is my approach to replace an array's content recursively with delete opiton. Here i used "::delete::" as reserved word to delete items. "Metehan", "surname"=>"Arslan", "age"=>27, "mail"=>"hidden", "favs" => array( "language"=>"php", "planet"=>"mercury", "city"=>"istanbul") ); $newdata = array( "age"=>28, "mail"=>"::delete::", "favs" => array( "language"=>"js", "planet"=>"mercury", "city"=>"shanghai") ); print_r(array_overlay($person,$newdata)); // result: Array ( [name] => Metehan [surname] => Arslan [age] => 28 [favs] => Array ( [language] => js [planet] => mercury [city] => shanghai ) ) function array_overlay($a1,$a2) { foreach($a1 as $k => $v) { if ($a2[$k]=="::delete::"){ unset($a1[$k]); continue; }; if(!array_key_exists($k,$a2)) continue; if(is_array($v) && is_array($a2[$k])){ $a1[$k] = array_overlay($v,$a2[$k]); }else{ $a1[$k] = $a2[$k]; } } return $a1; } ?> =============================================================================== public function mergeArrays($arrays, $field) { //take array in arrays for retrive structure after merging $clean_array = current($arrays); foreach ($clean_array as $i => $value) { $clean_array[$i]=''; } $merged_array = []; $name = ''; foreach ($arrays as $array){ $array = array_filter($array); //clean array from empty values if ($name == $array[$field]) { $merged_array[$name] = array_merge($merged_array[$name], $array); $name = $array[$field]; } else { $name = $array[$field]; $merged_array[$name] = $array; } } //have to be cleaned from array 'field' signs to return original structure of arrays foreach ($merged_array as $array){ $ready_array[] = array_merge($clean_array, $array); } return $ready_array; } =============================================================================== As PHP 5.6 you can use array_merge + "splat" operator to reduce a bidimensonal array to a simple array: =============================================================================== be aware there is a slight difference: 'js','method'=>'GET'); $array2 = array('lang'=>'php','browser'=>'opera','method'=>'POST'); ?> BETWEEN: outputs: Array ( [lang] => js [browser] => opera [method] => GET ) notice that the repeated keys will be overwritten by the ones of $array1, maintaining those, because it is the array that is being merged AND outputs: Array ( [lang] => php [method] => POST [browser] => opera ) here the oposite takes place: array1 will have its elements replaced by those of array2. =============================================================================== Uniques values merge for array_merge function: Doesn't work on objects. Smarter way for uniques values merge array: Example 1: $a = array(1,2); $b = array(2,3,4); array_unique_merge($a,$b); Return: array(1,2,3,4); Example 2: $a = array(1,2); $b = array(2,3,4); $c = array(2,3,4,5); array_unique_merge($a,$b); Return: array(1,2,3,4,5); Doesn't work on objects. =============================================================================== I had a hard time using array_merge with large datasets. By the time my web framework was in memory there wasn't enough space to have multiple copies of my dataset. To fix this I had to remove any functions which operated on the data set and made a copy in memory (pass by value). I realize the available memory to an application instance is modifiable, but I didn't think I should have to set it below the default 16mb for a web app! Unfortunately, a number of php functions pass by value internally, so I had to write my own merge function. This passes by reference, utilizes a fast while loop (thus doesn't need to call count() to get an upper boundary, also a php pass by value culprit), and unsets the copy array (freeing memory as it goes). This fixed the problem. I would love to know if there is an even faster, more efficient way. Simply adding the two arrays won't work since there is an overlap of index. =============================================================================== Be ready to surprise like this one. array_merge renumbers numeric keys even if key is as string. keys '1' & '2' will be updated to 0 & 1, but '1.1' & '1.2' remain the same, but they are numeric too (is_numeric('1.1') -> true) It's better to use '+' operator or to have your own implementation for array_merge. 'Value 1', '1.1' => 'Value 1.1', ); $x2 = array ( '2' => 'Value 2', '2.1' => 'Value 2.1', ); $x3 = array_merge( $x1, $x2 ); echo ' NOT as expected: '. print_r( $x3, true ) .''; $x3 = $x1 + $x2; echo 'As expected: '. print_r( $x3, true ) .''; ?> NOT as expected: Array ( [0] => Value 1 [1.1] => Value 1.1 [1] => Value 2 [2.1] => Value 2.1 ) As expected: Array ( [1] => Value 1 [1.1] => Value 1.1 [2] => Value 2 [2.1] => Value 2.1 ) =============================================================================== As has already been noted before, reindexing arrays is most cleanly performed by the array_values() function. =============================================================================== To avoid REINDEXING issues, use + operator : array_merge( array("truc" => "salut"), array("machin" => "coucou") ) returns array(2) { [0] => string() "salut" [1] => string() "coucou" } whereas array("truc" => "salut") + array("machin" => "coucou") returns array(2) { ["truc"] => string() "salut" ["machin"] => string() "coucou" } =============================================================================== The documentation is a touch misleading when it says: "If only one array is given and the array is numerically indexed, the keys get reindexed in a continuous way." Even with two arrays, the resulting array is re-indexed: [bishop@predator staging]$ cat array_merge.php 'Hello', '42' => 'World'); $a = array_merge(array (0 => 'I say, '), $a); var_dump($a); ?> [bishop@predator staging]$ php-5.2.5 array_merge.php array(3) { [0]=> string(7) "I say, " [1]=> string(5) "Hello" [2]=> string(5) "World" } [bishop@predator staging]$ php-4.4.7 array_merge.php array(3) { [0]=> string(7) "I say, " [1]=> string(5) "Hello" [2]=> string(5) "World" } =============================================================================== Needed an quick array_merge clone that preserves the keys: $value) $a[$key]=$value; foreach($a2 as $key=>$value) $a[$key]=$value; if (is_array($a3)) $a=array_join($a,$a3,$a4,$a5,$a6,$a7,$a8,$a9,$a10); return $a; } ?> =============================================================================== array_merge() overwrites ALL numerical indexes. No matter if you have non-numerical indexes or more than just one array. It reindexes them all. Period. (Only tried in 4.3.10) =============================================================================== For asteddy at tin dot it and others who are trying to merge arrays and keep the keys, don't forget the simple + operator. Using the array_merge_keys() function (with a small mod to deal with multiple arguments), provides no difference in output as compared to +. 'minus 1'); $b = array(0 => 'nought'); $c = array(0 => 'nought'); var_export(array_merge_keys($a,$b)); var_export($a + $b); var_export(array_merge_keys($a,$b,$c)); var_export($a + $b + $c); ?> results in ... array ( -1 => 'minus 1', 0 => 'nought',) array ( -1 => 'minus 1', 0 => 'nought',) array ( -1 => 'minus 1', 0 => 'nought',) array ( -1 => 'minus 1', 0 => 'nought',) =============================================================================== The same result as produced by snookiex_at_gmail_dot_com's function can be achieved with the 'one-liner' (see documentation of array_map). The difference here is, that the shorter array gets filled with empty values. =============================================================================== An earlier comment mentioned that array_splice is faster than array_merge for inserting values. This may be the case, but if your goal is instead to reindex a numeric array, array_values() is the function of choice. Performing the following functions in a 100,000-iteration loop gave me the following times: ($b is a 3-element array) array_splice($b, count($b)) => 0.410652 $b = array_splice($b, 0) => 0.272513 array_splice($b, 3) => 0.26529 $b = array_merge($b) => 0.233582 $b = array_values($b) => 0.151298 =============================================================================== A more efficient array_merge that preserves keys, truly accepts an arbitrary number of arguments, and saves space on the stack (non recursive): &$value){ $result[$key] = $value; } } return $result; } ?> =============================================================================== You can use array_slice() in combination with array_merge() to insert values into an array like this: =============================================================================== Note that if you put a number as a key in an array, it is eventually converted to an int even if you cast it to a string or put it in quotes. That is: $arr["0"] = "Test"; var_dump( key($arr) ); will output int(0). This is important to note when merging because array_merge will append values with a clashing int-based index instead of replacing them. This kept me tied up for hours. =============================================================================== Someone posted a function with the note: "if u need to overlay a array that holds defaultvalues with another that keeps the relevant data" //about twice as fast but the result is the same. //note: the sorting will be messed up! function array_overlay($skel, $arr) { return $arr+$skel; } //example: $a = array("zero","one","two"); $a = array_overlay($a,array(1=>"alpha",2=>NULL)); var_dump($a); /* NULL is ignored so the output is: array(3) { [1]=> string(5) "alpha" [0]=> string(4) "zero" [2]=> string(3) "two" } */ ?> =============================================================================== I got tripped up for a few days when I tried to merge a (previously serialized) array into a object. If it doesn't make sense, think about it... To someone fairly new, it could... Anyway, here is what I did: (It's obviously not recursive, but easy to make that way) $value) $object->{$key} = $value; } ?> Simple problem, but concevibly easy to get stuck on. =============================================================================== This function merges any number of arrays and maintains the keys: 0) { $k[$tmp['key']] = array_keys($tmp['value']); $v[$tmp['key']] = array_values($tmp['value']); } } while($tmp = each($k)) { for ($i = $start; $i < $start+count($tmp['value']); $i ++)$r[$tmp['value'][$i -$start]] = $v[$tmp['key']][$i-$start]; $start = count($tmp['value']); } return $r; } ?> =============================================================================== The problem that the array keys are reindexed, and further not working on array values of type object or other mixed types. Simply, I did this: $v) { $old[$k] = $v; } // This will overwrite all values in OLD with any existing // matching value in NEW // And keep all non matching values from OLD intact. // No reindexing, and complete overwrite /// Working with all kind of data ?> =============================================================================== I noticed the lack of a function that will safely merge two arrays without losing data due to duplicate keys but different values. So I wrote a quicky that would offset duplicate keys and thus preserve their data. of course, this does somewhat mess up association... 'Murder the beasties!', 'ninjas'=>'Use Ninjas to murder cats!'); $array2=array('cats'=>'Cats are fluffy! Hooray for Cats!', 'ninjas'=>'Ninas are mean cat brutalizers!!!'); $array3=safe_array_merge($array1, $array2); print_r($array3) /* Array { cats => Murder the beasties!, ninjas => Use ninjas to murder cats!, ?> cats_0 => Cats are fluffy! Hooray for Cats!, ninjas_0 => Ninjas are mean cat brutalizers!!! } function safe_array_merge () { $args = func_get_args(); $result=array(); foreach($args as &$array) { foreach($array as $key=>&$value) { if(isset($result[$key])) { $continue=TRUE; $fake_key=0; while($continue==TRUE) { if(!isset($result[$key.'_'.$fake_key])) { $result[$key.'_'.$fake_key]=$value; $continue=FALSE; } $fake_key++; } } else { $result[$key]=$value; } } } return $result; } ?> =============================================================================== Do not use this to set the $_SESSION variable. $_SESSION = array_merge( $_SESSION, $another_array ); will break your $_SESSION until the end of the execution of that page. =============================================================================== While searching for a function that would renumber the keys in a array, I found out that array_merge() does this if the second parameter is null: Starting with array $a like: 5 [4] => 4 [2] => 2 [9] => 9 ) ?> Then use array_merge() like this: Now the $a array has bee renumbered, but maintaining the order: 5 [1] => 4 [2] => 2 [3] => 9 ) ?> Hope this helps someone :-) =============================================================================== Apparently there is a shorthand that works very much like array_merge. I figured I would leave a comment here, sense I saw it used in code but found nothing about it from google searches. 'John Doe' ); $array += array( 'address' => 'someplace somestreet' ); echo $array['address']; // Outputs 'someplace somestreet' ?> A difference from merge_array, it does NOT overwrite existing keys, regardless of key type. =============================================================================== There was a previous note that alluded to this, but at least in version 5.2.4 array_merge will return NULL if any of the arguments are NULL. This bit me with $_POST when none of the controls were successful. =============================================================================== Please note that -1 is a numeric key and will be reindexed. Less obvious numeric keys are also '-1' (becomes -1) and -1.5 (becomes -1). '-1a', however, is not a numeric key and you could exploit the fact that '-1a' == -1 evaluates to true in php (just a hint). But as this is not very efficient, operator + may be a better option. "-1", '-2'=> "'-2'", -3.5=> "-3.5", '-4a'=> "'-4a'"); print_r(array( $arr, array_merge($arr,array()), '-1a' == -1, )); ?> Result: Array ( [0] => Array ( [-1] => -1 [-2] => '-2' [-3] => -3.5 [-4a] => '-4a' ) [1] => Array ( [0] => -1 [1] => '-2' [2] => -3.5 [-4a] => '-4a' ) [2] => 1 )


Exercise 3: Dynamically update resources
The goal of this exercise is to have the UI of our Tip Calculator application update automatically when the Resource values change. Specifically, we'll be updating colors used within the UI.
To complete the exercise, you will need Visual Studio for Windows or macOS with the Xamarin development tools installed. You will also need either an emulator/simulator or a device to run the exercise on. Please see the setup page if you need help installing the Xamarin development environment.
Open the starter solution
This exercise is a continuation of the previous exercise. You can use your existing solution or begin from the prior Exercise 2 > Completed solution in your copy of the cloned or downloaded course materials.
Update resources from code
Here you will write code that updates a few resources stored in a page's Resource Dictionary.
- Open the TipCalculator project.
- Open StandardTipPage.xaml.cs.
-
Locate the
OnLight
method and remove all the existing code inside it. Add two new lines of code so the method sets thefgColor
Resource in the page's Resources dictionary to #606060 and thebgColor
resource to #C0C0C0. The staticColor.FromHex
method makes it easy to convert a hex string into a Color.
Resources["fgColor"] = Color.FromHex("#606060");
Resources["bgColor"] = Color.FromHex("#C0C0C0");
- Repeat the previous step for the
OnDark
method but reverse the colors (i.e. setfgColor
to #C0C0C0 andbgColor
to #606060). - Run the app on a platform of your choice. Click on the "Dark" and "Light" buttons. The UI will not update.
The code is changing the Resource value in the dictionary; however, the new value is not being propagated to the UI controls.
void OnDark(object sender, EventArgs e)
{
Resources["fgColor"] = Color.FromHex("#C0C0C0");
Resources["bgColor"] = Color.FromHex("#606060");
}
Update the UI dynamically
Here, you will modify your XAML so updated Resource values are loaded into your UI.
- Open StandardTipPage.xaml.
- Locate all of the places that you assign colors from Resource values. Replace the use of the
StaticResource
markup extension withDynamicResource
.
…
<Label x:Name="billLabel" Text="Bill" TextColor="{DynamicResource fgColor}" … />
<Label x:Name="tipLabel" Text="Tip" TextColor="{DynamicResource fgColor}" … />
<Label x:Name="totalLabel" Text="Total" TextColor="{DynamicResource fgColor}" … />
…
Run the application
Run the app on a platform of your choice. Click on the "Dark" and "Light" buttons. The UI will now update correctly.
Exercise summary
In this exercise, you have used dynamic resources and updated the UI at runtime.
You can view the completed solution in the Exercise 3 > Completed folder of your copy of the cloned or downloaded course materials.


|
adjacent_find
Syntax:
#include <algorithm> iterator adjacent_find( iterator start, iterator end ); iterator adjacent_find( iterator start, iterator end, BinPred pr ); The adjacent_find() function searches between start and end for two consecutive identical elements. If the binary predicate pr is specified, then it is used to test whether two elements are the same or not. The return value is an iterator that points to the first of the two elements that are found. If no matching elements are found, the returned iterator points to end. For example, the following code creates a vector containing the integers between 0 and 10 with 7 appearing twice in a row. adjacent_find() is then used to find the location of the pair of 7's: vector<int> v1; for( int i = 0; i < 10; i++ ) { v1.push_back(i); // add a duplicate 7 into v1 if( i == 7 ) { v1.push_back(i); } } vector<int>::iterator result; result = adjacent_find( v1.begin(), v1.end() ); if( result == v1.end() ) { cout << "Did not find adjacent elements in v1" << endl; } else { cout << "Found matching adjacent elements starting at " << *result << endl; } |


The three main cores are listed below:
Options always determined by available whitespace:
Where would you like the detailed summary, if at all?
How would you like the transactions broken down?


What Am I Eating Today?
Search by Dish Name
search
Random Cocktail?
search
Meal Schedule
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday


Filtering SuperUser Accounts by Unauthorized Status
How to filter SuperUser accounts to display only unauthorized SuperUser using the SuperUser Accounts module. Unauthorized SuperUser accounts display the Unchecked icon in the Authorized column.
- Navigate to Host > Advanced Settings > SuperUser Accounts.
- Click the Unauthorized link. By default, the first ten ( 10 ) unauthorized SuperUser accounts are listed in alphabetical order by username. Use the Pager Control to navigate to further records. See "About the Pager"


--- layout: home title: Paris/Texas - About ---
One more thing! ;)
More than a framework, Paris-Texas is a city in Northeast Texas and a beautiful movie directed by Win Wenders.
Paris-Texas is available for use under the following license, commonly known as the 3-clause (or "modified") BSD license:
Copyright ©2014 Gregoire Lejeune<EMAIL_ADDRESS>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.


Exploring ways in which the concept fits into an art historical context, this part of TVH provides insight into the sub-text underlying the project. A wide variety of themes, ranging from fertility & agriculture, to totalitarianism & media propaganda, are combined.
'Think of a stretch limo in the potholed streets of New York City, where homeless beggars live. Inside the limo are the air-conditioned post-industrial regions of North America, Europe, the emerging Pacific Rim, and a few other isolated places, with their trade summitry and computer-information highways. Outside is the rest of mankind, going in a completely different direction.' (Thomas F. Homer-Dixon)


Baked Eggs with Swiss Chard and Green Olives
Serves: 3
Cooked in warm cream studded with chard and buttery green castelvetrano olives, this stunning baked egg recipe is an easy and luxurious way to enjoy brunch at home.
- 4: Thick bacon slices, cut into small 1-inch pieces(optional)
- 1 Tbsp: Olive Oil
- 1/2 Cup: Small yellow onion, diced
- 2: Garlic cloves minced
- 4 cups: Swiss chard, stems removed and roughly chopped( about 1 bunch)
- 1/2 cup: castelvetrano olives, pitted, sliced(plus more for garnish)
- 2/3 cup: heavy cream
- 4: Eggs
- 1 Tbsp: Butter or olive oil
- 1/4 cup: Panko
- 1/4 cup: Crumbled Feta
- 1/2 tsp: Flaky salt for finishing
- 2 Tbsp: Chives for garnishing
- 1: Loaf of crusty bread, for serving
- Heat oven to 425°F
- In a medium sized ovenproof skillet sauté the bacon over medium heat until just cooked. Transfer the bacon to a paper towel lined plate. Drain off all but 1/2 tablespoon of the bacon grease.
- Add 1 tablespoon of olive oil to the pan. Add the onions, cooking until transparent, about 5 minutes. Add the garlic and swiss chard and continue cooking until the chard begins to wilt. Return the cooked bacon to the pan and add the castelvetrano olives. Remove from heat.
- Create small wells into the chard mixture where you want to place the eggs. Add each egg to pan the one at a time.  Allow to cook for 8-10 minutes. Just until the white parts of the eggs are no longer transparent.
- In small skillet, melt the 1 tablespoon of butter. Add the panko and toss with butter, continue cooking over medium heat until the panko is toasted.
- Sprinkle the panko over the entire dish along with the feta, extra olives, flaky salt and fresh chives.
- Serve alongside some good bread.


Invalid password value. It does not comply with the password policy.
Invalid first name, last name or username.
Invalid email address.
Some information are missing or invalid.
Thanks for creating your account. Go back to your application to login
Please go back to your client application and try again, or contact the owner and ask for support


-1
. Used to order results of SQLQuery ascending.
1
. Used to order results of SQLQuery descending.
Inserts a debug log message into the SDK's log database
Destroy the entire contents of SDK's log database.
Inserts an "error" log message into the SDK's log database
Inserts an "info" log message into the SDK's log database
Inserts a "notice" log message into the SDK's log database
Upload the result of getLog to provided url. Provide an optional SQLQuery to contrain results between dates. The file-upload request will attach your configured Config.headers for authentication.
BackgroundGeolocation.logger.uploadLog("https://my.server.com/users/123/logs").then((success) => {
console.log("[uploadLog] success");
}).catch((error) => {
console.log("[uploadLog] FAILURE:", error);
});
// Or constrain results by providing a [SQLQuery]:
BackgroundGeolocation.logger.uploadLog("https://my.server.com/users/123/logs", {
start: Date.parse("2019-10-20 09:00"),
end: Date.parse("2019-10-20 11:59")
}).then((success) => {
console.log("[uploadLog] success");
}).catch((error) => {
console.log("[uploadLog] FAILURE:", error);
});
The SDK will upload the gzipped log-file to your server as a Multi-part file upload, the same log-file as used in emailLog. This is what I see with my Node server at request.files
:
app.post("/log", async function(req, res) {
console.log("[body]: ", req.body);
console.log("[files]: ", req.files);
res.status(200).send();
});
In addition to the log-file, the SDK will upload a form as well, containing the following parameters:
| Key | Value |
|---|---|
state |
JSON-encoded result of SDK's #getState |
model |
Device model |
manufacturer |
Device manufacturer |
platform |
iOS or Android |
version |
OS version |
Inserts a "warning" log message into the SDK's log database
Generated using TypeDoc
Logger API
The Background Geolocation SDK includes powerful logging features for debugging location-tracking problems. The SDK stores log-entries for a period of Config.logMaxDays (default
3
). The volume of logging events inserted into the database is controlled via Config.logLevel.For more information, see the 📘Debugging Guide.
The
Logger
API is accessed via BackgroundGeolocation.logger property:let Logger = BackgroundGeolocation.logger; let log = await Logger.getLog();
Fetching the Logs:
Logs can be fetched from the SDK in three ways:
Inserting your own log messages
You can even insert your own log messages into the SDK's Log database using the following methods:
ERROR
WARNING
DEBUG
INFO
INFO
let Logger = BackgroundGeolocation.logger; BackgroundGeolocation.onLocation((location) => { Logger.debug("Location received in Javascript: " + location.uuid); });
Example Logs
09-19 11:12:18.716 ╔═════════════════════════════════════════════ 09-19 11:12:18.716 ║ BackgroundGeolocation Service started 09-19 11:12:18.716 ╠═════════════════════════════════════════════ 09-19 11:12:18.723 [c.t.l.BackgroundGeolocationService d] 09-19 11:12:18.723 ✅ Started in foreground 09-19 11:12:18.737 [c.t.l.ActivityRecognitionService a] 09-19 11:12:18.737 🎾 Start activity updates: 10000 09-19 11:12:18.761 [c.t.l.BackgroundGeolocationService k] 09-19 11:12:18.761 🔴 Stop heartbeat 09-19 11:12:18.768 [c.t.l.BackgroundGeolocationService a] 09-19 11:12:18.768 🎾 Start heartbeat (60) 09-19 11:12:18.778 [c.t.l.BackgroundGeolocationService a] 09-19 11:12:18.778 🔵 setPace: null → false 09-19 11:12:18.781 [c.t.l.adapter.TSConfig c] ℹ Persist config 09-19 11:12:18.794 [c.t.locationmanager.util.b a] 09-19 11:12:18.794 ℹ LocationAuthorization: Permission granted 09-19 11:12:18.842 [c.t.l.http.HttpService flush] 09-19 11:12:18.842 ╔═════════════════════════════════════════════ 09-19 11:12:18.842 ║ HTTP Service 09-19 11:12:18.842 ╠═════════════════════════════════════════════ 09-19 11:12:19.000 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%) 09-19 11:12:21.314 [c.t.l.l.SingleLocationRequest$2 onLocationResult] 09-19 11:12:21.314 ╔═════════════════════════════════════════════ 09-19 11:12:21.314 ║ SingleLocationRequest: 1 09-19 11:12:21.314 ╠═════════════════════════════════════════════ 09-19 11:12:21.314 ╟─ 📍 Location[fused 45.519239,-73.617058 hAcc=15]999923706055 vAcc=2 sAcc=??? bAcc=??? 09-19 11:12:21.327 [c.t.l.l.TSLocationManager onSingleLocationResult] 09-19 11:12:21.327 🔵 Acquired motionchange position, isMoving: false 09-19 11:12:21.342 [c.t.l.l.TSLocationManager a] 15.243 09-19 11:12:21.405 [c.t.locationmanager.data.a.c persist] 09-19 11:12:21.405 ✅ INSERT: bca5acc8-e358-4d8f-827f-b8c0d556b7bb 09-19 11:12:21.423 [c.t.l.http.HttpService flush] 09-19 11:12:21.423 ╔═════════════════════════════════════════════ 09-19 11:12:21.423 ║ HTTP Service 09-19 11:12:21.423 ╠═════════════════════════════════════════════ 09-19 11:12:21.446 [c.t.locationmanager.data.a.c first] 09-19 11:12:21.446 ✅ Locked 1 records 09-19 11:12:21.454 [c.t.l.http.HttpService a] 09-19 11:12:21.454 🔵 HTTP POST: bca5acc8-e358-4d8f-827f-b8c0d556b7bb 09-19 11:12:22.083 [c.t.l.http.HttpService$a onResponse] 09-19 11:12:22.083 🔵 Response: 200 09-19 11:12:22.100 [c.t.locationmanager.data.a.c destroy] 09-19 11:12:22.100 ✅ DESTROY: bca5acc8-e358-4d8f-827f-b8c0d556b7bb 09-19 11:12:55.226 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)


Press n or j to go to the next uncovered block, b, p or k for the previous block.
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| bearing.ts |
|
90.54% | 67/74 | 68.18% | 15/22 | 100% | 4/4 | 90.54% | 67/74 |
| distance.ts |
|
100% | 41/41 | 100% | 1/1 | 100% | 1/1 | 100% | 41/41 |
| earth_mean_radius.ts |
|
100% | 2/2 | 100% | 0/0 | 100% | 0/0 | 100% | 2/2 |
| trig.ts |
|
100% | 10/10 | 100% | 3/3 | 100% | 3/3 | 100% | 10/10 |


{% extends "layouts/base_dashboard.html" %} {% block content_dashboard %} {% if not report %}
Ensembles Methods
Non Linear Methods
Linear Methods
csv files already in the system:
Models' report
All the models will be displayed below


Feed entry information.
| Fields : |
|
|---|
Feed information.
| Fields : |
|
|---|
Poll new Feed
Group of feeds.
| Fields : |
|
|---|
Options controlling feed reader behavior
| Fields : |
|
|---|
Get feed contents
Count numbers of unread entries
Mark entry as read
Build common context dictionary
Return feed subscriptions in OPML format.
Show most recent feed contents on page
Import feed subscriptions in OPML format
Simple string search.
Display entries with titles and/or descriptions which contain the string searched for.
Load local OPML xml file from browser.
Allow user to enter a string to search the for matching entries.


Mindset Matters: How To Practice Mindful Spending
by U.S. BankNo matter where you’re at in your financial journey, anyone can benefit from practicing mindful spending habits. Try these eight tips to help you curb impulse buys and unnecessary purchases.
From one-click online shopping to mobile wallets, paying for goods and services has never been easier. Unfortunately, the conveniences we love can also lead to an “out-of-sight, out-of-mind" mentality to money management.
Track your spending
Start by making a budget, if you don’t have one already, then make a habit of reviewing all your transactions on a regular basis (weekly, monthly – whatever works best for you). This will allow you to monitor where you’re overspending so you can make adjustments – $10 a day for lunch delivery adds up! For some assistance with this task, download the new U.S. Bank mobile app, which has a Money Mentorship feature that analyzes spending habits and helps you better understand where your money is going.
Disable one-click buying
Some online retailers implemented one-click buying to combat shopping-cart abandonment. It’s super-convenient when you want to order in a flash, but can also lead to impulse purchases. Remove the temptation to tap by deactivating one-click purchasing in your account settings. And if you’re prone to phone shopping, delete any offending apps altogether.
Use cash
Thanks to credit and debit cards – and digital payment platforms like Apple Pay and Google Pay – cash isn’t always king. In fact, a U.S. Bank Cash Behavior Study found that 50 percent of survey respondents carry cash less than half the time. Buck the trend and stop at an ATM before your next shopping trip. By withdrawing only what you need, you’ll be less likely to overspend. If you can leave your debit and credit cards at home, even better.
Make a list
Before your weekly errands, make a list of everything you need – and stick to it. This will keep you from mindlessly browsing and prevent unnecessary items from finding their way into your cart.
Designate guilt-free spending money
Mindful spending doesn’t mean depriving yourself of all “fun” purchases – you work hard for that money, after all. Set aside a chunk, after bills and other mandatory expenses, that can be used for whatever you’d like. It may be helpful to open a separate checking account to better compartmentalize guilt-free spending money from your savings.
Pause before purchasing
You’ve no doubt heard the phrase “sleep on it” before making a big decision. The same advice can be applied to significant purchases. Rather than handing over your credit card in the heat of the moment, step back for a couple days to really think about the purchase. Ask yourself these questions:
- Can you afford it?
- How many work hours will it take to earn that money back?
- What else could the money be used for?
In the end, maybe the purchase is still worth it, or perhaps you’ll realize you don’t need it after all. Either way, putting some thought into the decision may help you feel better about the outcome.
Find an accountability partner
Whether it’s a spouse, best friend or sibling, identify a person you trust to discuss your financial wellness journey. Simply sharing your goal of practicing mindful spending habits may help keep you on track. It’ll also give you someone to call to dissuade you from unnecessary purchases.
Evaluate what’s important to you
Purchasing that new TV or the latest smartphone may give you an instant dose of gratification, but will it contribute to your happiness in the long run? If the answer is no, that money could probably be spent, or saved, more wisely elsewhere. To curb unnecessary spending, think about what is important to you, such as saving for a house, a bucket-list trip to Europe, or a weekly or monthly self-care routine.


Availability
SmartWinnr is deployed on AWS. S3 Standard is designed for 99.99% availability and Standard - IA is designed for 99.9% availability.
Scalability
The SmartWinnr system scales automatically based on load, thus assuring a highly scalable solution even under high concurrent user load.
Backup Management
We take regular snapshots of data volumes and store in Amazon S3. We periodically restore backups to check the integrity of the backed-up data.
Disaster Recovery
We store the image of the EC2 instances in Amazon S3 as an AMI (Amazon Machine Image). In the unlikely case of an availability zone being down due to any major event, we can create new instances of the EC2 servers from the AMI and we can attach the data from the snapshot to create a fully restored, functional application.
Data Center Security
Data Center Security Amazon employs a robust physical security program with multiple certifications, including an SSAE 16 certification. For more information on Amazon’s physical security processes, please visit aws.amazon.com/security.
Encrypted Transactions - Data at Rest
All application data are stored in encrypted AWS EBS volumes. Data at Rest is encrypted.
Encrypted Transactions - Data in Motion
All communications with the backend servers are encrypted with HTTPS. The connection uses TLS1.2. We support forward secrecy and AES-GCM, and prohibit insecure connections.
Single Sign On
Users can login to our apps through single sign on through your enterprise LDAP/Active Directory.
Authentication
Users can login to the SmartWinnr application only on successful authentication. Enterprise can set their own rules regarding password complexity etc.
Authorization
Users get access to system resources through defined roles. Access to information in the system follow the principle of least privilege.
ERP Integration - Salesforce.com
We provide custom API's for direct access between SmartWinnr and Salesforce.com. Our API provides full access to all of our core datatypes, giving you full flexibility to implement whatever integration makes most sense for your business.
Integration with Other 3rd Party Systems
We provide a robust, secure, modern RESTful web services API, allowing you to easily automate data transfers to other third-party systems.
LDAP/Active Directory Integration
SmartWinnr is fully integrated with LDAP/Active Directory for seamless authentication and authorization.


Pathway enrichment analysis is among the most frequently used types of computational biology analysis, enabling us to better interpret and summarise massive gene regulation datasets into a manageable list of pathways.
While this is truly powerful, most pathway analysis tools are limited to a single comparison, which is a problem if the dataset consists of multiple sample groups, for example if we are working with an multiple disease and treatment groups, as tends to be the case for most omics experiments undertaken these days.
Standard single contrast techniques like DAVID or GSEA can be used multiple times, but this decreases the ability to identify subtle patterns of regulation over multiple contrasts.
Cox and Mann (2012) proposed the use of the MANOVA test for enrichment analysis of multiple contrasts, but there were a few drawbacks; (i) the software was not interoperable with the R/bioconductor workflows used in genomics, and (ii) the analysis was limited to only one or two dimensions.
To address this Dr Antony Kaspi (now based at WEHI) drafted R codes that would enable MANOVA-powered gene set enrichment analysis. Dr Kaspi and the team of Prof Sam El-Osta used the functions extensively in the period 2014-2018 for a variety of omics analysis projects in diabetes, epilepsy and heart development.
As the software was central for the success of a number of projects, Drs Kaspi and Ziemann decided to formalise the code into a Bioconductor package.
The package was accepted into Bioconductor in December 2019, and the journal article appeared in BMC genomics in the following June (Kaspi & Ziemann 2020).
In terms of downloads, the mitch package ranks in the top 900 Bioconductor packages and is still under active development. Our group uses mitch heavily in our collaborative work, and we routinely help other groups develop their mitch-based enrichment analysis workflows.
To learn more about the package, visit the bioconductor site here.
References
Cox, J. and Mann, M. (2012) “1D and 2D annotation enrichment: a statistical method integrating quantitative proteomics with complementary high-throughput data,” BMC bioinformatics, 13 Suppl 16(S16), p. S12.
Kaspi, A. and Ziemann, M. (2020) “Mitch: Multi-contrast pathway enrichment for multi-omics and single-cell profiling data,” BMC genomics, 21(1), p. 447.
Some of the projects that have used mitch
Sim, C. B. et al. (2021) “Sex-specific control of human heart maturation by the progesterone receptor,” Circulation, 143(16), pp. 1614–1628.
Tan, S. M. et al. (2021) “Targeting methylglyoxal in diabetic kidney disease using the mitochondria-targeted compound MitoGamide,” Nutrients, 13(5). doi: 10.3390/nu13051457.
Watt, K. I. et al. (2021) “Yap regulates skeletal muscle fatty acid oxidation and adiposity in metabolic disease,” Nature communications, 12(1), p. 2887.


Interface CashBox
-
public interface CashBox
The classes that will implement
CashBox
will have the responsibility to implement what will later be "money boxes". The purpose of these boxes will be to keep track of the various transactions that can be added to them.The method
getGoal()
is optional. Classes that will implement this interface are not required to implement this functionality. In this case the method will have to throw theUnsupportedOperationException
.- Version:
- 3.5 (06-06-2020)
- Author:
- Damiano Cacchiarelli -<EMAIL_ADDRESS>-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addTransaction(Transaction tr)
This method allows you to add a transaction to the Box.java.util.Collection<Transaction>
getAllTransaction()
double
getBalance()
double
getGoal()
java.lang.String
getName()
TypeCashBox
getType()
boolean
subTransaction(Transaction tr)
This method allows you to remove a transaction to the Box.boolean
updateBalance()
Allows to update the state of the box.
-
-
-
Method Detail
-
getBalance
double getBalance()
- Returns:
- the balance of the box
-
getGoal
double getGoal() throws java.lang.UnsupportedOperationException
- Returns:
- the goal of box, if the box supports it
- Throws:
java.lang.UnsupportedOperationException
- a box may not support this function
-
getName
java.lang.String getName()
- Returns:
- the name of box
-
getType
TypeCashBox getType()
- Returns:
- the type of box
-
getAllTransaction
java.util.Collection<Transaction> getAllTransaction()
- Returns:
- all transactions in the box
-
addTransaction
boolean addTransaction(Transaction tr)
This method allows you to add a transaction to the Box.- Parameters:
tr
- a transaction to add- Returns:
true
if the Transaction has been added;false
otherwise.
-
subTransaction
boolean subTransaction(Transaction tr)
This method allows you to remove a transaction to the Box.- Parameters:
tr
- a transaction to remove- Returns:
true
if the Transaction has been removed;false
otherwise.
-
updateBalance
boolean updateBalance()
Allows to update the state of the box.- Returns:
true
if there were no problems;false
otherwise.
-
-


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X
N
newAlertDialog(int, int)
- Method in interface com.github.droidfu.activities.
BetterActivity
newAlertDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterDefaultActivity
newAlertDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterExpandableListActivity
newAlertDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterListActivity
newAlertDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterPreferenceActivity
newCallNumberIntent(String)
- Static method in class com.github.droidfu.support.
IntentSupport
Creates an intent that will immediately dispatch a call to the given number.
newDialNumberIntent(String)
- Static method in class com.github.droidfu.support.
IntentSupport
Creates an intent that will open the phone app and enter the given number.
newEmailIntent(Context, String, String, String)
- Static method in class com.github.droidfu.support.
IntentSupport
newErrorHandlerDialog(int, Exception)
- Method in interface com.github.droidfu.activities.
BetterActivity
Creates a new error dialog, with the option to either dismiss or -- if an email application is installed -- report the given error.
newErrorHandlerDialog(Exception)
- Method in interface com.github.droidfu.activities.
BetterActivity
Creates a new error dialog, with the option to either dismiss or -- if an email application is installed -- report the given error.
newErrorHandlerDialog(Activity, String, Exception)
- Static method in class com.github.droidfu.activities.
BetterActivityHelper
Displays a error dialog with an exception as its body.
newErrorHandlerDialog(int, Exception)
- Method in class com.github.droidfu.activities.
BetterDefaultActivity
newErrorHandlerDialog(Exception)
- Method in class com.github.droidfu.activities.
BetterDefaultActivity
newErrorHandlerDialog(int, Exception)
- Method in class com.github.droidfu.activities.
BetterExpandableListActivity
newErrorHandlerDialog(Exception)
- Method in class com.github.droidfu.activities.
BetterExpandableListActivity
newErrorHandlerDialog(int, Exception)
- Method in class com.github.droidfu.activities.
BetterListActivity
newErrorHandlerDialog(Exception)
- Method in class com.github.droidfu.activities.
BetterListActivity
newErrorHandlerDialog(int, Exception)
- Method in class com.github.droidfu.activities.
BetterPreferenceActivity
newErrorHandlerDialog(Exception)
- Method in class com.github.droidfu.activities.
BetterPreferenceActivity
newInfoDialog(int, int)
- Method in interface com.github.droidfu.activities.
BetterActivity
newInfoDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterDefaultActivity
newInfoDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterExpandableListActivity
newInfoDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterListActivity
newInfoDialog(int, int)
- Method in class com.github.droidfu.activities.
BetterPreferenceActivity
newListDialog(String, List<T>, DialogClickListener<T>, boolean)
- Method in interface com.github.droidfu.activities.
BetterActivity
Creates a new list style dialog from a list of objects.
newListDialog(Activity, String, List<T>, DialogClickListener<T>, boolean)
- Static method in class com.github.droidfu.activities.
BetterActivityHelper
Creates a AlertDialog that shows a list of elements.
newListDialog(Activity, String, List<T>, DialogClickListener<T>, boolean, int)
- Static method in class com.github.droidfu.activities.
BetterActivityHelper
newListDialog(String, List<T>, DialogClickListener<T>, boolean)
- Method in class com.github.droidfu.activities.
BetterDefaultActivity
newListDialog(String, List<T>, DialogClickListener<T>, boolean)
- Method in class com.github.droidfu.activities.
BetterExpandableListActivity
newListDialog(String, List<T>, DialogClickListener<T>, boolean)
- Method in class com.github.droidfu.activities.
BetterListActivity
newListDialog(String, List<T>, DialogClickListener<T>, boolean)
- Method in class com.github.droidfu.activities.
BetterPreferenceActivity
newMapsIntent(String, String)
- Static method in class com.github.droidfu.support.
IntentSupport
newMessageDialog(Context, String, String, int)
- Static method in class com.github.droidfu.activities.
BetterActivityHelper
Creates a new AlertDialog to display a simple message
newSelectPictureIntent()
- Static method in class com.github.droidfu.support.
IntentSupport
Creates an intent which when fired, will launch the phone's picture gallery to select a picture from it.
newShareIntent(Context, String, String, String)
- Static method in class com.github.droidfu.support.
IntentSupport
newTakePictureIntent(File)
- Static method in class com.github.droidfu.support.
IntentSupport
Creates an intent which when fired, will launch the camera to take a picture that's saved to a temporary file so you can use it directly without going through the gallery.
newYesNoDialog(int, int, DialogInterface.OnClickListener)
- Method in interface com.github.droidfu.activities.
BetterActivity
newYesNoDialog(Context, String, String, int, DialogInterface.OnClickListener)
- Static method in class com.github.droidfu.activities.
BetterActivityHelper
Creates a new Yes/No AlertDialog
newYesNoDialog(int, int, DialogInterface.OnClickListener)
- Method in class com.github.droidfu.activities.
BetterDefaultActivity
newYesNoDialog(int, int, DialogInterface.OnClickListener)
- Method in class com.github.droidfu.activities.
BetterExpandableListActivity
newYesNoDialog(int, int, DialogInterface.OnClickListener)
- Method in class com.github.droidfu.activities.
BetterListActivity
newYesNoDialog(int, int, DialogInterface.OnClickListener)
- Method in class com.github.droidfu.activities.
BetterPreferenceActivity
NO_DRAWABLE
- Static variable in class com.github.droidfu.adapters.
WebGalleryAdapter
notifyImageLoaded(String, Bitmap)
- Method in class com.github.droidfu.imageloader.
ImageLoader
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X


Spoil your new or existing team - for awesome team results!
Get the team excited about working on a new project or working agile for the first time.
The events are customized to the needs of the team and can include:
This event focuses on training with regards to Scrum and/or Agile behaviour.
The events are customized to the needs of the team and can include:
Inspect and adapt the way the team works and interacts. Help the team to get from good to great - in a truly special environment.
The events are customized to the needs of the team and can include:
We will host your Special Agile Events in the South of Germany. Treat your team close to the famous Chiemsee Lake and right in the Chiemgau-area.


Network name is required when reserving a network.
Network reservations are required for some advanced networking features, like stitching and the filesystem.
It is possible to create a private layer 2 VLAN without a network reservation.
Learn more.
Floating IP addresses are used to connect to an instance over the internet. There is typically
no need to reserve more than one per-project for a given site. If there are no floating IPs available,
try taking an ad-hoc IP (no reservation required).
Learn more.


Now that we have added files and staged it, its time for us to commit(save) the changes.
Try the git status command. You can see that they are requesting you to commit the changes.
Usage:
git commit -m "Your message"
This command is used for small messages for small changes. For example,
git commit -m "Added Text.txt file"
For bigger messages for bigger changes, use this command:
git commit -a
This will open up a text editor(there might be a delay sometimes) where you have to add the message.
After typing your message, save the file and close it.


--- layout: post title: Advertising comp date: '2015-07-08T18:30:44+02:00' categories: - Sketches picture_url: https://film-Storyboards.tumblr.com/post/123590082185 ---


Adrian Marcel Joined By Casey Veggies On "Can't Go For That" Remix
Adrian Marcel follows up.
by Milca P.Can't Go For That
Adrian Marcel
Editor Rating: HOTTTTT
User Rating: hottttt - 67% (6)
Earlier this year, Adrian Marcel shared his 98th album, returning with 15 new tracks to deliver on an update since 2017's GMFU output.
Since then, the crooner went on to flex his acting chops with a starring role in the television biopic The Bobby DeBarge Story, taking on the role of James DeBarge.
Now, after supporting 98th with a visual and launching the second semester of his "Marcel University" masterclass series, the crooner revisits 98th and brings in a little help from his pal Casey Veggies for the assist on the remix for "Can't Go For That." On the cut, the two men set their respective boundaries in love and relationships.
Quotable Lyrics
I think I’m done
Can’t do this forever
I must be done
If I stay it’s whatever
I can take a lot of things baby
But I can’t go for that


week 1: HTML/CSS Demo
(51-100)
week X 2:Github Repository Published Site
https://designsofpurpose.github.io/MirandaWhite-WebDes2-SMC/In%20Class/Week02_GithubRepo/index.html
week 3:Layout w/ flex
week 4: Layout w/ CSS Grid (fix menu links)
https://designsofpurpose.github.io/MirandaWhite-WebDes2-SMC/In%20Class/Week4%20_Layout_Grid/index.html
week 5: Basic Design System (fix menu links)
https://designsofpurpose.github.io/MirandaWhite-WebDes2-SMC/In%20Class/Week5/MAIN_week5.html
week X 6: Midterm Brief (doesn't work)
https://designsofpurpose.github.io/MirandaWhite-WebDes2-SMC/In%20Class/Final%20Project/MidTerm%20Project/index.html#
week 7: Midterm Final (doesn't work)
https://designsofpurpose.github.io/MirandaWhite-WebDes2-SMC/In%20Class/Final%20Project/MidTerm%20Project/index.html#
week 8: SPRING BREAK
week X 9: Make Buttons do Stuff
https://designsofpurpose.github.io/MirandaWhite-WebDes2-SMC/In%20Class/Week09/
week 10:


Komodo
talk-trading
A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
Hollowman9000
23-Jul-18 05:49 PM
N00bs probably suicided already
Or pulled a hollowman 2014 and wrote it all off and walked away
Jazzy
23-Jul-18 05:51 PM
Pretty sure that A&E was invalidated
@Hollowman9000
https://www.tradingview.com/x/b4nurJh8/
granted that's a different time frame
Hollowman9000
23-Jul-18 05:57 PM
Two Adams and a triple-pounded eve
Bow chicka wow wow
12k sell wall on trex
There we go
Shaking some faith
snowdamn
23-Jul-18 06:45 PM
n00bs selling alts at worst time possible
Hollowman9000
23-Jul-18 07:06 PM
One man’s capitulation dump is another man’s buy of a lifetime
jl777c
23-Jul-18 07:12 PM
someone left the $1.50 fiat pegbot going
Hollowman9000
23-Jul-18 07:54 PM
Water level was $3, James
Everyone is dead
It’s just you, me, and some busted market maker bots
Send me a few hundred thousand KMD would ya?
If it’s just the two of us let’s even the playing field a little
Sharing is caring
passcombo.com 🏴☠🏴
23-Jul-18 08:06 PM
BTC just tried to drop on finex, but price is still supported at 7.7k so we may see a small increase tmrw maybe ?
jl777c
23-Jul-18 08:15 PM
sent
Deleted User
23-Jul-18 08:33 PM
Last time we felt a fiat pegbot was at 2$ it just was insane when it was released
[TPUX] Djith Wattignies
23-Jul-18 08:34 PM
What is a pegbot?
Deleted User
23-Jul-18 08:35 PM
I don t even know if that exists but basically it buys / sell at a magnitude that stabilize at the end the price to a specific target.
[TPUX] Djith Wattignies
23-Jul-18 08:35 PM
Automated trading scripts.. okay..
Deleted User
23-Jul-18 08:36 PM
With low volume it seems it is rasily manageable. But if for any reason the volume spikes it could just end up badly
jl777c
23-Jul-18 08:36 PM
yes, some whale uses it to keep the price down while btc is going up
then when the whale is full, the pegbot is stopped
[TPUX] Djith Wattignies
23-Jul-18 08:36 PM
Anything for profits and money ... how low and dark
Deleted User
23-Jul-18 08:36 PM
Releasing it is key not to be rekt
Desperate people sell at this price or at least it s my pov
For kmd side
People expect btc to fly or crash so alts gets lower volume.
Hollowman9000
23-Jul-18 11:04 PM
I’ve been 100% alts forever
Don’t look to me for price support
bishop
23-Jul-18 11:25 PM
I bought some more KMD today. Anything to bring down my initial $4.85 avg. lmfao
Hollowman9000
24-Jul-18 12:57 AM
KMD mafia all over that coindesk DEX tweet
bishop
24-Jul-18 01:02 AM
link?
https://www.coindesk.com/decentralized-exchange-crypto-dex/
?
Decentralized Exchanges Aren't Living Up to Their Name – And Da...

Hollowman9000
24-Jul-18 02:09 AM
Because KMD is worth 0 sats
Infinite tech in an unknown galaxy serves no one
Time to join popularcoin
JimD
24-Jul-18 02:14 AM
The shakeout is coming, those who survive will be very rich
Hollowman9000
24-Jul-18 02:17 AM
Hard to imagine shaking out lower
Outside of the superwhales there’s no one left
FundazuSafu
24-Jul-18 02:18 AM
im still here
i saw you begging for table scraps earlier, hollow
2
Hollowman9000
24-Jul-18 02:21 AM
Just a few hundred k
(edited)
Chump change
FundazuSafu
24-Jul-18 02:22 AM
maybe for tommyorcawhale86
1
Hollowman9000
24-Jul-18 02:23 AM
I think that dump was our 12k sell order raging out
I don’t see him anymore
FundazuSafu
24-Jul-18 02:24 AM
yeah. a real shame him and leo have been gone for a while.
Hollowman9000
24-Jul-18 02:24 AM
Leo?
FundazuSafu
24-Jul-18 02:24 AM
Leo DiCaprio
you were supposed to make a funeral pyre for him
Hollowman9000
24-Jul-18 02:24 AM
Vaguely remember
FundazuSafu
24-Jul-18 02:25 AM
him and orca came screaming in after the brown sheet
Hollowman9000
24-Jul-18 02:25 AM
I’m sure I set something on fire and danced naked around it with a whiskey bottle in hand
3
RAE
24-Jul-18 02:25 AM
The KMD / BTC is massively oversold at 23!
FundazuSafu
24-Jul-18 02:25 AM
yeah, we got nothing to worry about
just give me another nice christmas present and ill be happy lizard king
RAE
24-Jul-18 02:27 AM
We're in nearly the exact same set up as 12/12/17 just before the skyrocket pump.
Just need interest in KMD
FundazuSafu
24-Jul-18 02:28 AM
kmd has always needed senpei to notice
RAE
24-Jul-18 02:29 AM
What's senpei?
FundazuSafu
24-Jul-18 02:29 AM
senpai*
https://knowyourmeme.com/memes/i-hope-senpai-will-notice-me
Hollowman9000
24-Jul-18 02:29 AM
I liked the 6000kmd to secure your chain
For the 300kmd per year to secure assetchains
(5% interest)
Just need some high level ERC defections
FundazuSafu
24-Jul-18 02:31 AM
has anyone made the switch?
Hollowman9000
24-Jul-18 02:32 AM
Not that I know of
(edited)
They have no usage that would be affected by ETH network congestion
2
FundazuSafu
24-Jul-18 02:33 AM
no signs or symptoms yet (crypto kitties...)


{{season.starts_at | carbonToMMM }} - {{season.ends_at | carbonToMMM }} {{season.ends_at | carbonToyyyy }}
Players - {{ leagueSubtitle }}
Player
#
Team
Payment Status
{{ player.name }}
{{ player.player_info.jersey }}
-
{{ player.current_team.name }}
-
{{ player.email }}
Unpaid
({{count(selected)}}) PlayersPlayersPlayer Selected


| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
| 3 | * contributor license agreements. See the NOTICE file distributed with | |
| 4 | * this work for additional information regarding copyright ownership. | |
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| 6 | * (the "License"); you may not use this file except in compliance with | |
| 7 | * the License. You may obtain a copy of the License at | |
| 8 | * | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 | * | |
| 11 | * Unless required by applicable law or agreed to in writing, software | |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 | * See the License for the specific language governing permissions and | |
| 15 | * limitations under the License. | |
| 16 | */ | |
| 17 | package org.apache.commons.math3.geometry.euclidean.twod; | |
| 18 | ||
| 19 | import java.util.ArrayList; | |
| 20 | import java.util.Iterator; | |
| 21 | ||
| 22 | import org.apache.commons.math3.exception.MathIllegalArgumentException; | |
| 23 | import org.apache.commons.math3.exception.util.LocalizedFormats; | |
| 24 | import org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet; | |
| 25 | import org.apache.commons.math3.geometry.partitioning.Region; | |
| 26 | import org.apache.commons.math3.geometry.partitioning.RegionFactory; | |
| 27 | import org.apache.commons.math3.geometry.partitioning.SubHyperplane; | |
| 28 | ||
| 29 | /** This class represent a tree of nested 2D boundary loops. | |
| 30 | ||
| 31 | *
This class is used for piecewise polygons construction. | |
| 32 | * Polygons are built using the outline edges as | |
| 33 | * representative of boundaries, the orientation of these lines are | |
| 34 | * meaningful. However, we want to allow the user to specify its | |
| 35 | * outline loops without having to take care of this orientation. This | |
| 36 | * class is devoted to correct mis-oriented loops.
 | |
| 37 | ||
| 38 | *
Orientation is computed assuming the piecewise polygon is finite, | |
| 39 | * i.e. the outermost loops have their exterior side facing points at | |
| 40 | * infinity, and hence are oriented counter-clockwise. The orientation of | |
| 41 | * internal loops is computed as the reverse of the orientation of | |
| 42 | * their immediate surrounding loop.
 | |
| 43 | ||
| 44 | * @version $Id: NestedLoops.java 1416643 2012-12-03 19:37:14Z tn $ | |
| 45 | * @since 3.0 | |
| 46 | */ | |
| 47 | class NestedLoops { | |
| 48 | ||
| 49 | /** Boundary loop. */ | |
| 50 | private Vector2D[] loop; | |
| 51 | ||
| 52 | /** Surrounded loops. */ | |
| 53 | private ArrayList<NestedLoops> surrounded; | |
| 54 | ||
| 55 | /** Polygon enclosing a finite region. */ | |
| 56 | private Region<Euclidean2D> polygon; | |
| 57 | ||
| 58 | /** Indicator for original loop orientation. */ | |
| 59 | private boolean originalIsClockwise; | |
| 60 | ||
| 61 | /** Simple Constructor. | |
| 62 | *
Build an empty tree of nested loops. This instance will become | |
| 63 | * the root node of a complete tree, it is not associated with any | |
| 64 | * loop by itself, the outermost loops are in the root tree child | |
| 65 | * nodes.
 | |
| 66 | */ | |
| 67 | public NestedLoops() { | |
| 68 | surrounded = new ArrayList<NestedLoops>(); | |
| 69 | } | |
| 70 | ||
| 71 | /** Constructor. | |
| 72 | *
Build a tree node with neither parent nor children
 | |
| 73 | * @param loop boundary loop (will be reversed in place if needed) | |
| 74 | * @exception MathIllegalArgumentException if an outline has an open boundary loop | |
| 75 | */ | |
| 76 | private NestedLoops(final Vector2D[] loop) throws MathIllegalArgumentException { | |
| 77 | ||
| 78 | 1 | if (loop[0] == null) { |
| 79 | throw new MathIllegalArgumentException(LocalizedFormats.OUTLINE_BOUNDARY_LOOP_OPEN); | |
| 80 | } | |
| 81 | ||
| 82 | this.loop = loop; | |
| 83 | surrounded = new ArrayList<NestedLoops>(); | |
| 84 | ||
| 85 | // build the polygon defined by the loop | |
| 86 | final ArrayList<SubHyperplane<Euclidean2D>> edges = new ArrayList<SubHyperplane<Euclidean2D>>(); | |
| 87 | 1 | Vector2D current = loop[loop.length - 1]; |
| 88 | 3 | for (int i = 0; i < loop.length; ++i) { |
| 89 | final Vector2D previous = current; | |
| 90 | current = loop[i]; | |
| 91 | final Line line = new Line(previous, current); | |
| 92 | final IntervalsSet region = | |
| 93 | new IntervalsSet(line.toSubSpace(previous).getX(), line.toSubSpace(current).getX()); | |
| 94 | edges.add(new SubLine(line, region)); | |
| 95 | } | |
| 96 | polygon = new PolygonsSet(edges); | |
| 97 | ||
| 98 | // ensure the polygon encloses a finite region of the plane | |
| 99 | 1 | if (Double.isInfinite(polygon.getSize())) { |
| 100 | polygon = new RegionFactory<Euclidean2D>().getComplement(polygon); | |
| 101 | originalIsClockwise = false; | |
| 102 | } else { | |
| 103 | originalIsClockwise = true; | |
| 104 | } | |
| 105 | ||
| 106 | } | |
| 107 | ||
| 108 | /** Add a loop in a tree. | |
| 109 | * @param bLoop boundary loop (will be reversed in place if needed) | |
| 110 | * @exception MathIllegalArgumentException if an outline has crossing | |
| 111 | * boundary loops or open boundary loops | |
| 112 | */ | |
| 113 | public void add(final Vector2D[] bLoop) throws MathIllegalArgumentException { | |
| 114 | 1 | add(new NestedLoops(bLoop)); |
| 115 | } | |
| 116 | ||
| 117 | /** Add a loop in a tree. | |
| 118 | * @param node boundary loop (will be reversed in place if needed) | |
| 119 | * @exception MathIllegalArgumentException if an outline has boundary | |
| 120 | * loops that cross each other | |
| 121 | */ | |
| 122 | private void add(final NestedLoops node) throws MathIllegalArgumentException { | |
| 123 | ||
| 124 | // check if we can go deeper in the tree | |
| 125 | 1 | for (final NestedLoops child : surrounded) { |
| 126 | 1 | if (child.polygon.contains(node.polygon)) { |
| 127 | 1 | child.add(node); |
| 128 | return; | |
| 129 | } | |
| 130 | } | |
| 131 | ||
| 132 | // check if we can absorb some of the instance children | |
| 133 | 1 | for (final Iterator<NestedLoops> iterator = surrounded.iterator(); iterator.hasNext();) { |
| 134 | final NestedLoops child = iterator.next(); | |
| 135 | 1 | if (node.polygon.contains(child.polygon)) { |
| 136 | node.surrounded.add(child); | |
| 137 | 1 | iterator.remove(); |
| 138 | } | |
| 139 | } | |
| 140 | ||
| 141 | // we should be separate from the remaining children | |
| 142 | RegionFactory<Euclidean2D> factory = new RegionFactory<Euclidean2D>(); | |
| 143 | 1 | for (final NestedLoops child : surrounded) { |
| 144 | 1 | if (!factory.intersection(node.polygon, child.polygon).isEmpty()) { |
| 145 | throw new MathIllegalArgumentException(LocalizedFormats.CROSSING_BOUNDARY_LOOPS); | |
| 146 | } | |
| 147 | } | |
| 148 | ||
| 149 | surrounded.add(node); | |
| 150 | ||
| 151 | } | |
| 152 | ||
| 153 | /** Correct the orientation of the loops contained in the tree. | |
| 154 | *
This is this method that really inverts the loops that where | |
| 155 | * provided through the {@link #add(Vector2D[]) add} method if | |
| 156 | * they are mis-oriented
 | |
| 157 | */ | |
| 158 | public void correctOrientation() { | |
| 159 | 1 | for (NestedLoops child : surrounded) { |
| 160 | 1 | child.setClockWise(true); |
| 161 | } | |
| 162 | } | |
| 163 | ||
| 164 | /** Set the loop orientation. | |
| 165 | * @param clockwise if true, the loop should be set to clockwise | |
| 166 | * orientation | |
| 167 | */ | |
| 168 | private void setClockWise(final boolean clockwise) { | |
| 169 | ||
| 170 | 2 | if (originalIsClockwise ^ clockwise) { |
| 171 | // we need to inverse the original loop | |
| 172 | int min = -1; | |
| 173 | int max = loop.length; | |
| 174 | 4 | while (++min < --max) { |
| 175 | final Vector2D tmp = loop[min]; | |
| 176 | loop[min] = loop[max]; | |
| 177 | loop[max] = tmp; | |
| 178 | } | |
| 179 | } | |
| 180 | ||
| 181 | // go deeper in the tree | |
| 182 | 1 | for (final NestedLoops child : surrounded) { |
| 183 | 2 | child.setClockWise(!clockwise); |
| 184 | } | |
| 185 | ||
| 186 | } | |
| 187 | ||
| 188 | } | |
Mutations | ||
| 78 |
negated conditional : NO_COVERAGE |
|
| 87 |
Replaced integer subtraction with addition : NO_COVERAGE |
|
| 88 |
Changed increment from 1 to -1 : NO_COVERAGE negated conditional : NO_COVERAGE changed conditional boundary : NO_COVERAGE |
|
| 99 |
negated conditional : NO_COVERAGE |
|
| 114 |
removed call to org/apache/commons/math3/geometry/euclidean/twod/NestedLoops::add : NO_COVERAGE |
|
| 125 |
negated conditional : NO_COVERAGE |
|
| 126 |
negated conditional : NO_COVERAGE |
|
| 127 |
removed call to org/apache/commons/math3/geometry/euclidean/twod/NestedLoops::add : NO_COVERAGE |
|
| 133 |
negated conditional : NO_COVERAGE |
|
| 135 |
negated conditional : NO_COVERAGE |
|
| 137 |
removed call to java/util/Iterator::remove : NO_COVERAGE |
|
| 143 |
negated conditional : NO_COVERAGE |
|
| 144 |
negated conditional : NO_COVERAGE |
|
| 159 |
negated conditional : NO_COVERAGE |
|
| 160 |
removed call to org/apache/commons/math3/geometry/euclidean/twod/NestedLoops::setClockWise : NO_COVERAGE |
|
| 170 |
Replaced XOR with AND : NO_COVERAGE negated conditional : NO_COVERAGE |
|
| 174 |
changed conditional boundary : NO_COVERAGE Changed increment from 1 to -1 : NO_COVERAGE Changed increment from -1 to 1 : NO_COVERAGE negated conditional : NO_COVERAGE |
|
| 182 |
negated conditional : NO_COVERAGE |
|
| 183 |
negated conditional : NO_COVERAGE removed call to org/apache/commons/math3/geometry/euclidean/twod/NestedLoops::setClockWise : NO_COVERAGE |


I started my career journey in Film/Video. I've enjoyed producing content for screens, big and small. I'm a storyteller. Web development is my next, new, exciting frontier to continue engaging people with stories.
The full stack interests me, but front-end user experience is my focus. An intuitive interface is everything to the user.
I'm a natural leader, and I play well with others. I have no problem taking the reigns when needed or relinquishing the spotlight when a teammate is shining.
Investment Dashboard


-
Go to the source code of this file.
Variables | |
| long & | uncWidth = os.iword(uncWidthIndex) |
| long & | oldUncWidth = os.iword(oldUncWidthIndex) |
| long & | uncFlags = os.iword(uncFlagsIndex) |
| long & | Width = os.iword(widthIndex) |
| long & | oldWidth = os.iword(oldWidthIndex) |
| long & | setSigDigits = os.iword(setSigDigitsIndex) |
| long & | setStdDevSigDigits = os.iword(stdDevSigDigitsIndex) |
| bool | isNoisyDigit |
| bool | isPlusMinus |
| bool | isSetScale |
| bool | isAutoScale |
| bool | isUppercase |
| bool | isExpFormat |
| bool | isShowPoint |
| bool | isShowPos |
| bool | isFixed |
| bool | isLeftJustify |
| bool | isRightJustify |
| bool | isInternalJustify |
| bool | isExactValue |
| bool | isIntegerValue |
| bool | isUncKnown |
| bool | isValueNaN |
| bool | isStdDevNaN |
| bool | isValueInfinite |
| bool | isNegativeValue = false |
| bool | isZeroValue |
| bool | isCenter |
| bool | isFirmFormat |
| bool isAutoScale |
Definition at line 13 of file uncbools.hpp.
| bool isCenter |
Definition at line 31 of file uncbools.hpp.
| bool isExactValue |
Definition at line 23 of file uncbools.hpp.
| bool isExpFormat |
Definition at line 15 of file uncbools.hpp.
| bool isFirmFormat |
Definition at line 32 of file uncbools.hpp.
| bool isFixed |
Definition at line 18 of file uncbools.hpp.
| bool isIntegerValue |
Definition at line 24 of file uncbools.hpp.
| bool isInternalJustify |
Definition at line 21 of file uncbools.hpp.
| bool isLeftJustify |
Definition at line 19 of file uncbools.hpp.
| bool isNegativeValue = false |
Definition at line 29 of file uncbools.hpp.
| bool isNoisyDigit |
Definition at line 10 of file uncbools.hpp.
| bool isPlusMinus |
Definition at line 11 of file uncbools.hpp.
| bool isRightJustify |
Definition at line 20 of file uncbools.hpp.
| bool isSetScale |
Definition at line 12 of file uncbools.hpp.
| bool isShowPoint |
Definition at line 16 of file uncbools.hpp.
| bool isShowPos |
Definition at line 17 of file uncbools.hpp.
| bool isStdDevNaN |
Definition at line 27 of file uncbools.hpp.
| bool isUncKnown |
Definition at line 25 of file uncbools.hpp.
| bool isUppercase |
Definition at line 14 of file uncbools.hpp.
| bool isValueInfinite |
Definition at line 28 of file uncbools.hpp.
| bool isValueNaN |
Definition at line 26 of file uncbools.hpp.
| bool isZeroValue |
Definition at line 30 of file uncbools.hpp.
| long& oldUncWidth = os.iword(oldUncWidthIndex) |
Definition at line 2 of file uncbools.hpp.
| long& oldWidth = os.iword(oldWidthIndex) |
Definition at line 5 of file uncbools.hpp.
| long& setSigDigits = os.iword(setSigDigitsIndex) |
Definition at line 6 of file uncbools.hpp.
| long& setStdDevSigDigits = os.iword(stdDevSigDigitsIndex) |
Definition at line 7 of file uncbools.hpp.
| long& uncFlags = os.iword(uncFlagsIndex) |
Definition at line 3 of file uncbools.hpp.
| long& uncWidth = os.iword(uncWidthIndex) |
Definition at line 1 of file uncbools.hpp.
| long& Width = os.iword(widthIndex) |
Definition at line 4 of file uncbools.hpp.


To obtain an entry-level position in my field of study that builds upon and utilizes my collegiate, internship and community experiences and activities.
| Primary | Loacan Elementary School | SY 1992-1998 |
| Secondary | Pines City National High School | SY 1998-2002 |
| College | University of the Cordilleras | Present |
| Student Assistant | Librarian Personal Secretary | University of the Cordilleras | 2010-2011 |
| Service Crew | McDonald Sunchine | Abanao Street, Baguio City | 2012-2013 |


Efia Odo Confirms She’s Pregnant, Says Shatta Wale Could Be Responsible
by BB JonesKwese TV presenter, Andrea Owusu, aka Efia Odo has somewhat confirmed the belief we all hold that there is a secret relationship she has with Shatta Wale.
After years of evading the question as to whether she sleeps with the multiple award winning artist, the TV personality now says she’s even pregnant for the SM boss in a new post.
Efia said she has missed her period and if that becomes concrete, then it simply means she’s pregnant with Shatta Wale’s child.
Even more recently, Efia Odo told Pulse Ghana in an interview she sleeps with Shatta Wale in her mind and can’t deny the fact that she has a thing for him.
She shared this:
I did not see my menses, I think I’m pregnant for Shatta Wale.
See a screenshot of her post below and tell us what you think.


I could not sleep the night i got the invitation mail from Mozilla to attend Mozilla Summit 2013.  I was really very excited as this was be my first international travel.
Finally the month of October came. rtnpro and I left for bangalore airport early (all due to exitement). At airport, we met with other mozillians who were on the same flight. After the checkin and the security check (i was really scared during the security check, i kept on thinking “What will happen if they cancel my trip”), we boarded the flight to Dubai from where we had the connecting flight to San Francisco.
After a long trip of 20 hours we finally reached San Francisco where we were greeted by other Mozillians and we took a shuttle to our hotel, Santa Clara Mariott. After reaching hotel, we took our keys from the Hotel Reception. The NFC cards we really unique, they had Mozilla Summit 2013 printed on them (I brought a card home as a life-long memory). We then went off to collect the most awaited Summit Welcome Pack. The welcome pack full of swags, 3 t-shirts and more.
After taking in some rest, we went downstairs to the lobby and met with some awesome Mozillians whom i had known via IRC. The Summit was yet to begin, but the enthusiasm was already visible. Everybody were excited to get be the part of Mozilla Summit 2013.
In the morning of Day 1, we went around for a Photo walk took and took some group pictures.
Day 1 started with the inspirational talk by Mitchell Baker, I really loved the video Virtual Choir. Later in the afternoon, i went around roaming in the World Fair, getting to know about the culure of different countries. Later in the evening, i went off to electronics stores in Santa Clara to grab a Das Keyboard for myself, but was really unlucky on that.
The demos of Day 2 were awesome which was followed by the Innovation Fair where I saw some Mozillians doing some really crazy stuffs. Being an avid gamer, i really loved the demos, I also got a chance to play on a Razer laptop (It was my dream). In the evening we went to Great America, the Carousel Columbia looked amazing(I haven’t seen a carousel this big, ever). Waiting in the long Qs somehow i took the thrill rides out there.
- Gold Striker
- Tiki Twirl
- Drop Tower
Day 3, I kept roaming around meeting mozillians, exchanging ideas with them. In the evening, we took a ride to Mozilla HQ. Thanks to Pascal Finette for being such a nice guide. The day ended with Karoke/DJ (I grabbed some bottles of beer and danced like anything). It was real fun
Finally the day came to depart, I checked out of the hotel and still two hours in hand, I rented a bicycle from the hotel and went to visit the nearby Intel HQ.
Moments of Mozilla Summit 2013
- My face when somebody in the Bangalore airport told that we might miss the flight to San Francisco (The network at the Bangalore Airport was down and the flight took off 1:30 hours late).
- Aerial View of San Francisco and the Aerial view of Dubai at Night.
- I watched 7 movies back-to-back on the flight to San Francisco.
- Getting to meet some cool Mozillians like Brendan Eich, Erik Rose(I learnt testing from one of his talk), Erickt, Benjamin Kerensa, Matjaž Horvat…..the list is really endless.
Things I learnt at Mozilla Summit 2013
- I got encouraged to contribute more and help building a better web.
- Interacting with the other Mozillians, I got to know some technologies i never knew of.
- Finally, I learnt to use chop-sticks. Yay!
After a month of Mozilla Summit 2013
Earlier, I used to evangelize Mozilla Webmaker among my college mates, friends and LUG members etc. I also actively participated in Hindi l10n. But, after Mozilla Summit 2013 i thought being a Python/Django developer “Why not contribute to Mozilla projects”. After some googling i came across Bugs Ahoy! made by jdm. I found out some bugs and started contributing. Now, I got more ways to contribute :). Now somebody ask me one how to contribute to mozilla, i also describe the how they can start with the easy or the mentored bugs. I submitted three patches lately.
http://git.io/spl8JQ
http://git.io/rlm0dA
http://git.io/Q8W9HA
I feel the pride in saying “I am a Mozillian”.


μProse - blogging simplified.
Get Started
μProse Builder
Compile Blog
Blog Title:
Tagline:
Copyright:
Entries
+
Post Title:
Save Post


[gecode-users] Floating point example?
Guido Tack
tack at gecode.org
Wed Mar 27 00:25:16 CET 2013
There's a whole chapter on floating point constraints in the tutorial documentation "Modelling and Programming with Gecode" (see chapter 6 and 7.1.4) as well as several examples. The system you describe can be solved with Gecode given suitable initial bounds for A,B,C.
Cheers,
Guido
On 27/03/2013, at 8:40 AM, Clifford Yapp <cliffyapp at gmail.com> wrote:
> I noted with considerable interest that Gecode 4.0 lists support for floats in its Changelog.
>
> Does there exist a tutorial demonstrating this ability? In particular, is it possible to add
> constraints along the lines of "A * B = 12.2", "B + C < 4.1", "A * C = 4" and have Gecode solve the system for A, B and C? (Or is that a different type of constraint system than Gecode is intended for?)
>
> Thanks,
> CY
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list