Skip to content

Instantly share code, notes, and snippets.

View eyalcohen4's full-sized avatar
🏠
Working from home

Eyal Cohen eyalcohen4

🏠
Working from home
View GitHub Profile
<ul>
<li class='picture' ng-repeat='picture in home.pictures track by $index'>
<a ui-sref='picture({ url: {{picture.url}} })'> {{picture.type}} </a>
</li>
</ul>
@eyalcohen4
eyalcohen4 / Point.java
Created April 13, 2017 13:51
Point Class For MMN12
/**
* Class Point represent 2 dimensional points.
*
* @author Eyal Cohen
* @version 1.0.0
*/
public class Point {
private double _radius;
private double _alpha;
@eyalcohen4
eyalcohen4 / cloudSettings
Last active October 21, 2021 09:42
Visual Studio Code Sync Settings Gist
{"lastUpload":"2021-10-21T09:42:26.417Z","extensionVersion":"v3.4.3"}
public double overlap(Segment1 other) {
return _poRight.getX() - other.getPoLeft().getX();
}
$handshakeParams = [
'sum' => $DEFAULT_SUM, // (currently is 10)
'TranzilaPW' => test2387,
'supplier' => F4BJ75,
'op' => 1,
];
// The request url for handsake: https://secure5.tranzila.com/cgi-bin/tranzila71dt.cgi?sum=10&TranzilaPW=F4BJ75&supplier=test2387&op=1
$iframeParam = [
public boolean pointOnSegment(Point p) {
if (p.isRight(_poLeft) && p.isLeft(_poRight)) {
return true;
}
return false;
}
public void move(double dx, double dy) {
double x = getX();
double y = getY();
x = x + dx;
y = y + dy;
if (x > DEFAULT_VALUE && y > DEFAULT_VALUE) {
_alpha = calcAlpha(x, y);
_radius = calcRadius(x, y);
@eyalcohen4
eyalcohen4 / PointTester1.java
Last active April 29, 2017 20:03
MMN12-Testers
public class PointTester2 {
public static void main(String[] args) {
System.out.println("********** Test Q1 Point - Start **********");
System.out.println("testing first constructor and getters:");
Point p0 = new Point(-2,-3);
if (p0.getX() != 0 || p0.getY() != 0){
System.out.println("\t ERROR - default constructor and getters,expected (0.0, 0.0) actual= (" + p0.getX() + ", " + p0.getY() +")");
} else
/**
* Segment2 represents a line (parallel to the x-axis) using a center point and length.
*
* @author Eyal Cohen
* @version 1.0.0
*/
public class Segment2 {
private Point _poCenter;
private double _length;
public function getPaymentUrl($orderId) {
$DEFAULT_SUM = 10;
$this->load->library('Tranzila');
$tranzila = new Tranzila();
$tranzilaHost = 'secure5.tranzila.com';
$tranzilaPath = '/cgi-bin/tranzila71dt.cgi';
$tranzilaParams = [
'sum' => $DEFAULT_SUM,