Skip to content

Instantly share code, notes, and snippets.

Luke Horvat lukehorvat

Block or report user

Report or block lukehorvat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lukehorvat
lukehorvat / ConcurrentImageBrightnessNormalizer.cs
Last active Dec 11, 2015
An example of concurrent image brightness normalization in C#.
View ConcurrentImageBrightnessNormalizer.cs
//determine the brightness range of this thread's image strip
Tuple brightnessRange = GetImagePartBrightnessRange(image, startX, startY, finishX, finishY);
//update the global brightness range of the entire image
lock (_lock)
{
minBrightness = Math.Min(minBrightness, brightnessRange.Item1);
maxBrightness = Math.Max(maxBrightness, brightnessRange.Item2);
}
@lukehorvat
lukehorvat / SeekBarDialogPreference.java
Last active Dec 10, 2015
An Android preference class that provides a user with the means to select an integer from a SeekBar and persist it. (License: MIT License)
View SeekBarDialogPreference.java
package com.lukehorvat;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
import android.os.Parcelable;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.SeekBar;
@lukehorvat
lukehorvat / NumberPickerDialogPreference.java
Last active Jan 4, 2018
An Android preference class that provides a user with the means to select an integer from a NumberPicker and persist it. (License: MIT License)
View NumberPickerDialogPreference.java
package com.lukehorvat;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
import android.os.Parcelable;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.NumberPicker;
You can’t perform that action at this time.