Skip to content

Instantly share code, notes, and snippets.

@xzoky
xzoky / MoraView.swift
Created November 22, 2020 17:27
MoraView
import SwiftUI
extension String {
var hiraganaMorae: [String] {
let diphthongSmallKana = Set(["ゃ", "ゅ", "ょ"].map({ Character($0) }))
var output: [String] = []
self.forEach() { character in
if (diphthongSmallKana.contains(character)) {
output.append((output.popLast() ?? "").appending(String(character)))
@xzoky
xzoky / training-plan-material.md
Last active August 29, 2015 14:07
Camille's training plan

Training plan

Phase 1

Brief description of the intern's role

The intern will be instructed on gathering software requirements from key stake holders, implementing requirements with guidance from the Product team, and delivering finished products. The intern will participate in the development of the EasyShift application.

Specific goals and objectives

  • Function as part of a rapidly growing engineering team.
  • Perform debugging and refactoring of the existing codebase.
@xzoky
xzoky / titanium_blog_post.md
Last active August 29, 2015 14:03
Titanium blog post

Titanium

We wrote Titanium in order to respond to the following user story:

As an EasyShift user, I want all images inside of a job / survey to be tappable, zoomable, etc., so that I can get a better look at them.

Strictly speaking, we could have dealt with this problem by using a good old UIScrollView and a standard modal transition. However, we felt like this deserved a little bit more love.

Custom transition

@xzoky
xzoky / NSManagedObject+DeepCopying.m
Created August 29, 2012 13:17 — forked from javagg/NSManagedObject+DeepCopying.m
Copy and deep copy for NSManagedObject graphs.
/*
This makes some assumptions about your code, for example that you’ve got ownership rules set up properly. If a relationship to another entity uses the cascade deletion rule, it’s considered to be owned by the receiver, and thus will be copied by -deepCopyWithZone:.
*/
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface NSManagedObject (RXCopying) <NSCopying>
-(void)setRelationshipsToObjectsByIDs:(id)objects;
@xzoky
xzoky / InsertSomeProductServlet.java
Created November 28, 2011 14:56 — forked from lukaspili/AuthenticateFilter.java
Supinfo Clermont Ferrand SupCommerce
package com.supinfo.supcommerce.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.supinfo.sun.supcommerce.bo.SupProduct;