Skip to content

Instantly share code, notes, and snippets.

View MrCrambo's full-sized avatar
🏓
Win the world

mrcrambo MrCrambo

🏓
Win the world
  • Russia
View GitHub Profile
class ScaleGestureListener implements ScaleGestureDetector.OnScaleGestureListener
{
@Override
public boolean onScale(ScaleGestureDetector detector)
{
// do smth with scale
}
@Override
public boolean onScaleBegin(ScaleGestureDetector detector)
package com.navigine.navigine;
import android.view.MotionEvent;
public abstract class BaseGestureDetector
{
protected boolean inProgress;
protected MotionEvent previousEvent;
protected MotionEvent currentEvent;
package com.navigine.navigine;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import java.lang.Math;
public abstract class TwoFingerGestureDetector extends BaseGestureDetector
{
package com.navigine.navigine;
import android.content.Context;
import android.view.MotionEvent;
public class RotateGestureDetector extends TwoFingerGestureDetector
{
public interface OnRotateGestureListener
{
boolean onRotate(RotateGestureDetector detector);
..
if (!mWifiManager.isScanThrottleEnabled()) {
// scan without any restrictions
}
..

Summary

This is the report from a security audit performed on ZAC Finance Farming contract by MrCrambo.

The audit focused primarily on the security of changes made on ZAC Finance Farming smart contract based on Synthetix smart contract.

The original contract was audited by Sigma Prime.

In scope

window.onload = function () {
// add eventListener for tizenhwkey
document.addEventListener('tizenhwkey', function(e) {
if(e.keyName == "back")
try {
//tizen.application.getCurrentApplication().exit();
} catch (ignore) { }
});
std::vector<SensorMeasurement> parseMeasurements(const std::string& logFile)
{
std::vector<SensorMeasurement> measurements;
std::ifstream is(logFile);
if (!is.is_open())
{
std::cout << "could not open file " << logFile << std::endl;
}
std::string line;
/**
* duration - duration of pendulum motion in seconds
* freq - sampling frequency in Hz
* L - pendulum length
* theta0 - initial angle in radians
*
* Returns:
* the angle, angular velocity and angular acceleration for pendulum motion
*/
std::tuple<std::vector<double>,
struct NavigationPoint
{
NavigationPoint(){}
NavigationPoint(long long _timeMs, double _x, double _y, double _angle, int _sublocation)
: timeMs (_timeMs)
, x (_x)
, y (_y)
, angle (_angle)
, sublocation (_sublocation)