Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Win the world

Il Kadyrov MrCrambo

💭
Win the world
View GitHub Profile
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)
View pan_gesture.java
class GestureListener implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener
{
@Override
public boolean onSingleTapConfirmed(MotionEvent e)
{
// Do smth with single tap
}
@Override
public boolean onDoubleTapEvent(MotionEvent e)
View top_sheet_behavior.java
package com.navigine.navigine;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
View top_sheet_state.java
int top;
if (state == STATE_COLLAPSED)
top = mMinOffset;
else if (state == STATE_EXPANDED
top = mMaxOffset;
else if (mHideable && state == STATE_HIDDEN)
top = -child.getHeight();
You can’t perform that action at this time.