Skip to content

Instantly share code, notes, and snippets.

public void CombineResults(string groupCol, string targetCol, string differingCol)
{
var groupedResults = new Dictionary<string, IList<Dictionary<string, string>>>();
foreach(var dbRow in QueryResults)
{
if (!groupedResults.ContainsKey(dbRow[groupCol]))
{
groupedResults.Add(dbRow[groupCol], new List<Dictionary<string, string>>());
}
input <- scan("day1Input.txt") # each line is an integer.
sum <- 0
results <- c()
flag <- FALSE
while(flag == FALSE){
for(line in input){
sum = sum + line
if(sum %in% results){ # If we find a duplicate sum print it.
print(sum)
flag <- TRUE
using System;
using System.Collections.Generic;
// Intructions are formatted as "b inc 5 if a > 1"
namespace AoC8
{
public class Instruction
{
public string VariableToModify { get; private set; }
public string PlusOrMinus { get; private set; }
def sbStringBuilder(matchObjects,flag=False):
'''
:param list/object matchObjects: List or single object of soulbreak type returned by searchObject.
:param bool flag: True to print detailed strings, False for summary.
:return: list of embed objects for bot to send
Use: Pass a list of matched soul breaks to the string builder and it will return a list
of created embeds with details for the soulbreak/each soulbreak.
'''
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1> Keelin Hollywood </h1>
<p> This website will show my occupational experience. </p>
<table border="1">
var elementExists = document.getElementById("changed");
elementExists.addEventListener("touchend", touchSidebar, false);
function touchSidebar(e){
if($(e.target).hasClass('sku')) // Here we determine our target is infact a sku
{
$.ajax({
type:"POST",
url:'sidebar.php',
data:{"sku": $(e.target).html()},//Here we ajax that sku value so php can give us the info.
success: function(data){
<?php
function li_build($li_fill_1, $li_fill_2,$li_choice){
if($li_choice == 1)
{
echo "<li class=" . "'sidebar-list-items'" . ">" .'<a href="'. get_term_link($li_fill_1, 'product_cat') .'">'. $li_fill_2 .'</a>'. "</li>";
}
elseif($li_choice == 2)
{
echo "<li class=" . "'sidebar-list-items'" . ">". '<a href="'. get_term_link($li_fill_1, 'product_cat') .'">'. $li_fill_2 .'</a>' . "</li>";
<div class="main-pandora">
<div class="pandora-grid">
<div class="banner">
<img src="//cdn.shopify.com/s/files/1/2985/2180/files/Banner_Blue-01.jpg?v=1522260442" alt="Pandora Banner" />
</div>
<div class="item-medium item-flex">
test
</div>
<div class="item-small item-flex">
test2