Skip to content

Instantly share code, notes, and snippets.

@DeepSky8
DeepSky8 / app.js
Created September 7, 2016 18:17
The run method defined on my AngularJS module. I'm learning how to accommodate multiple functions in one run method in javascript
site.run(function (editableOptions) {
editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
},
['$rootScope', '$location', '$cookieStore', '$http',
function ($rootScope, $location, $cookieStore, $http) {
// keep user logged in after page refresh
$rootScope.globals = $cookieStore.get('globals') || {};
if ($rootScope.globals.currentUser) {
$http.defaults.headers.common['Authorization'] = 'Basic ' + $rootScope.globals.currentUser.authdata; // jshint ignore:line
var site = angular.module('RSVP', ['ngResource','ngRoute']);
site.factory('EventsApi', ['$resource', function ($resource) { return $resource('/api/Events/', {}, {}); }]);
site.config(['$routeProvider',
function ($routeProvider) {
$routeProvider.
when('/CreateNewEvent', {
templateUrl: 'events/create_event.html',
controller: 'EventsController'
}).
when('/ShowEvents', {
@DeepSky8
DeepSky8 / FizzBuzz.cs
Last active April 21, 2016 17:41
FizzBuzz Practice
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FizzBuzz
{
class Program
{
@DeepSky8
DeepSky8 / Splitter.cs
Created March 30, 2016 17:09
Supposedly inserts a tab after each csv item in the source document, or a new line every _Columns_ number of items. The text documents currently appear to have new lines after each item. The relevant code starts on line 138.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSV_Split
{
class Program
{
@DeepSky8
DeepSky8 / SelectSoMany.cs
Created March 24, 2016 18:10
This compiles, and it makes perfect sense from a technical standpoint. But I don't know how I figured it out. And that bothers me.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SelectSoMany
{
public static class Program
{
@DeepSky8
DeepSky8 / Jacket.cs
Created March 21, 2016 20:16
Not sure how to populate the IEnumerable 'result'
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Jacket
{
static class Program
{
@DeepSky8
DeepSky8 / QueueStack.cs
Created March 1, 2016 20:33
Learning about Stacks and Queues, simultaneously. Please forgive the way that I call this a Stack, and then use all Queue terms for the methods.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Stack
{
class Program
{
@DeepSky8
DeepSky8 / BinarySearchTree.cs
Last active February 25, 2016 19:47
BreadthTraverse gets stuck somewhere. When I use the debug feature, Visual Studio hits an error and closes after line 173.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BinaryTree
{
class Program
{
@DeepSky8
DeepSky8 / ArrayList.cs
Last active February 2, 2016 21:32
Each of the methods appear to work as intended.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ArrayList
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractRobots
{
class Program
{