This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Class containing a method to determine the number of days in a month. | |
// I use it sometimes for pedagogical purposes in software testing/engineering courses. | |
public class DaysInMonth { | |
/** | |
* Get number of days in a month. | |
* @param m Month. | |
* @param y Year. | |
* @return Number of days of given month and year. | |
*/ | |
public static int daysInMonth(int m, int y) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package poisson; | |
import java.util.Random; | |
/** | |
* Simple implementation for poisson process random number generation. | |
* Check http://github.com/edrdo/PoissonProcess | |
* | |
* @author Eduardo R. B. Marques | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Output in a typical compiler / architecture will be: | |
sizeof(a) = 24 | |
offset(a.f16) = 0 | |
offset(a.f32) = 4 | |
offset(a.f08) = 8 | |
offset(a.f64) = 16 | |
sizeof(b) = 16 | |
offset(b.f64) = 0 |
NewerOlder