This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SomeZendeskTicketClass { | |
public function getAndSendTestData() { | |
$reallyLongJsonString = "[{\"phone\":\"7202532407\",\"autorespond\":false,\"subject\":\"New Order #S4481058\",\"alert\":false,\"ip\":\"192.168.3.172\",\"message\":\"<link type=\\\"text\\\/css\\\" href=\\\"..\\\/scp\\\/css\\\/bootstrap.css\\\" rel=\\\"stylesheet\\\">\\n<table class=\\\"table table-striped\\\">\\n\\t<tbody>\\n\\t\\t<tr>\\n\\t\\t\\t<td><strong>Website:<\\\/strong> www.craftdirect.com <\\\/td>\\n\\t\\t\\t<td><strong>OrderID:<\\\/strong> CD000016462<\\\/td>\\n\\t\\t\\t<td><strong>Eclipse:<\\\/strong> S4481058<\\\/td>\\n\\t\\t\\t<td><strong>Date:<\\\/strong> 2023-05-26 13:45:32<\\\/td>\\n\\t\\t<\\\/tr>\\n\\t\\t<tr>\\n\\t\\t\\t<td><strong>ORDER DATE:<\\\/strong> <\\\/td>\\n\\t\\t\\t<td><strong>SHIPPING METHOD:<\\\/strong> CDBM<\\\/td>\\n\\t\\t\\t<td><strong>EXT. MERCHANT ID:<\\\/strong><\\\/td>\\n\\t\\t\\t<td><strong>PAYMENT METHOD:<\\\/strong> paypal_express <\\\/td>\\n\\t\\t<\\\/tr>\\n\\t\\t<tr>\\n\\t\\t\\t<td><stro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$synonym_map = [ | |
//CAD | |
'cad' => 'CAD', | |
//Clean and Care | |
'clean and care' => 'Clean and Care', | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
protocol PropertyLoopable { | |
func allProperties() -> [String: Any?] | |
} | |
extension Optional { | |
func unwrappedDebugString() -> String { | |
switch self { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:json_annotation/json_annotation.dart'; | |
import 'package:gogreen_utility_belt/interface_class/JSONSerializable.dart'; | |
part 'Product.g.dart'; //flutter pub run build_runner build | |
@JsonSerializable() | |
class Product extends JSONSerializable { | |
static final Product example = Product(//comment out on build_runner build | |
upc: '10000000000', | |
inventory: 0, | |
categories: ['Rum'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AppManagedDataController.swift | |
// Yah-El | |
// | |
// Created by Austen Strine on 5/20/19. | |
// Copyright © 2019 GoGreen. All rights reserved. | |
// | |
import CoreData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import CoreData | |
class CopyingCodable : Encodable, Decodable, NSCopying | |
{ | |
func copy(with zone: NSZone? = nil) -> Any | |
{ //this is like...the ugliest code I've ever written | |
return try! JSONDecoder().decode( | |
type(of: self), | |
from: try! JSONEncoder().encode(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
infix operator =!& : AssignmentPrecedence | |
func =!&<T:NSCopying>(lhs: inout T, rhs: T) | |
{ | |
lhs = rhs.copy(with: nil) as! T | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct ScopedPrintableStack: CustomStringConvertible | |
{ | |
var items = [String]() | |
var description: String | |
{ | |
var tabbedStackString:String = "" | |
for (index, string) in items.enumerated() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The purpose of the original assignment was to create a program that would | |
//allow teachers to input three test scores, and get the average of | |
//those three. I've altered it quite a bit, and the current version includes | |
//my first attempt at vectors (just taught myself how to use them today.) | |
//Planning on eventually making the averages be stored/retreivable. | |
//Also note that I follow the whitespace convention of indenting | |
//loops and if statements in entirety, and again for the body. | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I got a tiny bit further in the book and realized I was | |
//coding pretty inefficiently in the switch/case area. | |
//These are the updates I made to that. | |
// | |
#include <iostream> | |
#include <iomanip> | |
#include <typeinfo> | |
#include <limits> |
NewerOlder