Skip to content

Instantly share code, notes, and snippets.

Avatar
🏓
Win the world

mrcrambo MrCrambo

🏓
Win the world
  • Russia
View GitHub Profile
View rssi_algorithm.cpp
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)
View complementary_filter.cpp
/**
* 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>,
View step_calculation.cpp
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;
View a.js
window.onload = function () {
// add eventListener for tizenhwkey
document.addEventListener('tizenhwkey', function(e) {
if(e.keyName == "back")
try {
//tizen.application.getCurrentApplication().exit();
} catch (ignore) { }
});
View farming_zac_audit.md

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

View wifi_throttling_check.java
..
if (!mWifiManager.isScanThrottleEnabled()) {
// scan without any restrictions
}
..
View RotateGestureDetector.java
package com.navigine.navigine;
import android.content.Context;
import android.view.MotionEvent;
public class RotateGestureDetector extends TwoFingerGestureDetector
{
public interface OnRotateGestureListener
{
boolean onRotate(RotateGestureDetector detector);
View TwoFingerGestureDetector.java
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
{
View base_gesture_detector.java
package com.navigine.navigine;
import android.view.MotionEvent;
public abstract class BaseGestureDetector
{
protected boolean inProgress;
protected MotionEvent previousEvent;
protected MotionEvent currentEvent;
View scale_gesture.java
class ScaleGestureListener implements ScaleGestureDetector.OnScaleGestureListener
{
@Override
public boolean onScale(ScaleGestureDetector detector)
{
// do smth with scale
}
@Override
public boolean onScaleBegin(ScaleGestureDetector detector)