Skip to content

Instantly share code, notes, and snippets.

View IrisClasson's full-sized avatar
👀
Reading code

Iris Classon IrisClasson

👀
Reading code
View GitHub Profile
@IrisClasson
IrisClasson / accelerometer
Created November 10, 2014 00:26
CVS files with motion tracking data
x,z,y
-0.512959122657776,-0.765274167060852,0.0158241484314203
-0.541565537452698,-0.845370471477509,0.0565546043217182
-0.542794704437256,-0.833370923995972,0.0641243681311607
-0.568359196186066,-0.805352687835693,0.109916366636753
-0.504087030887604,-0.656051754951477,0.081193283200264
-0.456098020076752,-0.58470618724823,0.165669649839401
-0.535461485385895,-0.460652321577072,0.26782488822937
-0.63933140039444,-0.472751468420029,0.45855176448822
-0.722131967544556,-0.434757977724075,0.711878180503845
@IrisClasson
IrisClasson / ECMA 5
Last active August 29, 2015 14:07
Interview questions
Context: Questions asked to verify how proficient I was in JavaScript
What was added in ecmascript 5?
My reply:
I cannot remember exactly what was added or when, and probaly would struggle answering for older versions for other languages or platforms as well. I can however share a few things about ecmascript 6 as I'm keeping an eye on that.
No follow up question
@IrisClasson
IrisClasson / WP SL
Created August 28, 2014 11:25
Windows phone StatusBar/SystemTray code
<phone:PhoneApplicationPage x:Class="Temp2SL.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
SupportedOrientations="Portrait"
Orientation="Portrait"
@IrisClasson
IrisClasson / gist:9597938
Created March 17, 2014 11:50
How long should you obsess for the perfect solution before moving on?
Its minor part of a feature, but I’ve been obsessing about the best way to solve this for a while.
To the point where I’m starting to wonder if I’ll ever get this done. It’s not a big problem, not life or death. Might be the tiniest little performance effect (I’m debating with myself the best way to handle references and communication between two viewmodels, and whether or not to use a strong or a weak reference, eager or lazy loading of objects, and whether or not to cache), and of course architectural effect.
I certainly don’t want to mess things up and add a tiny clog, but honestly I’m probably more worried about checking in code that isn’t fantastic as I want to show that I can do a good job. I’ve coded up 5 ways to solve achieve the desired result, and I’ve had two code reviews and three discussions with in total five developers.
At what point do I move on? And how do you know when to move and just pick something?
I feel like I’m analyzing this thing to death.
Would love some advice on this :)
@IrisClasson
IrisClasson / gist:7570684
Created November 20, 2013 20:45
Callstack
> combase.dll!RoFailFastWithErrorContextInternal(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V1 * * aStowedExceptionPointers) Line 955 C++
Windows.UI.Xaml.dll!DirectUI::ErrorHelper::ReportUnhandledError(HRESULT hrError) Line 586 C++
Windows.UI.Xaml.dll!CTypefaceCollection::AddRef(void) C++
Windows.UI.Xaml.dll!AgCoreCallbacks::FireEvent(CDependencyObject * pListener, unsigned int eventId, CDependencyObject * pSender, CDependencyObject * pArgs, int argsTypeIndex, int actualArgsTypeIndex, unsigned int flags) C++
Windows.UI.Xaml.dll!CCoreServices::CLR_FireEvent(IDependencyObject * pListener, CDependencyProperty * pEvent, IDependencyObject * pSender, IDependencyObject * pArgs, unsigned int flags) Line 4738 C++
Windows.UI.Xaml.dll!CommonBrowserHost::CLR_FireEvent(IDependencyObject * pListener, CDependencyProperty * pEvent, IDependencyObject * pSender, IDependencyObject * pArgs, unsigned int flags) Line 861 C++
Windows.UI.Xaml.dll!CControlBase::ScriptCallback(void * pC
@IrisClasson
IrisClasson / Leap code
Last active October 20, 2020 16:57
Dispatcher.BeginInvoke versus Dispatcher.InvokeAsync
private void SetCanvas(UIElement image, Point point, bool allowkill)
{
Dispatcher.BeginInvoke(
new Action(
delegate
{
Canvas.SetTop(image, point.Y - (finger.ActualHeight/2));
Canvas.SetLeft(image, point.X - (finger.ActualWidth/2));
if (allowkill)
@IrisClasson
IrisClasson / gist:7009282
Created October 16, 2013 15:11
How do I query a SQL Server DB using PowerShell, and how do I filter, format and output to a file? (Stupid Question 251-255)
$dataSource = “.\SQLEXPRESS”
$user = “user”
$pwd = “1234″
$database = “Test”
$connectionString = “Server=$dataSource;uid=$user; pwd=$pwd;Database=$database;Integrated Security=False;”
$query = “SELECT * FROM Person”