Skip to content

Instantly share code, notes, and snippets.

<Image Name="PngImage" />
var apng = new APNG("a.png");
var bitmaps = apng.ToBitmapSources();
// Save to PNG files
foreach (var (bitmap, index) in bitmaps.Select((item, index) => (item, index)))
{
using (var fileStream = new FileStream($"{index}.png", FileMode.Create))
{
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bitmap));
@jz5
jz5 / manifest.json
Last active September 9, 2018 15:44
{
"name": "Show Asset Widget",
"version": "1.0",
"manifest_version": 2,
"description": "Show Unity asset widget on Unity Affiliate reporting page.",
"content_scripts": [
{
"matches": [
"https://console.partnerize.com/v2/reporting/perform",
"https://console.partnerize.com/v2/reporting/performance"
@jz5
jz5 / script.js
Last active November 11, 2018 14:28
const timer = setInterval(timer_tick, 500);
var prevId;
var div = document.createElement("div");
var body = document.getElementsByTagName("body")[0];
body.appendChild(div);
function timer_tick() {
var result = document.documentElement.innerHTML.match(/assetstore_package_(\d+)/);
if (!result) return;
/**********************************************************
Save as PNGs.jsx
DESCRIPTION
This sample gets files specified by the user from the
selected folder and batch processes them and saves them
as PNGs in the user desired destination with the same
file name.
<?php
$connectstr_dbhost = '';
$connectstr_dbname = '';
$connectstr_dbusername = '';
$connectstr_dbpassword = '';
foreach ($_SERVER as $key => $value) {
if (strpos($key, "MYSQLCONNSTR_") !== 0) {
continue;
}
using System;
using System.Collections.Generic;
using System.Globalization;
public class IrohaComparer : IComparer<string>
{
private string iroha = "ィィぃイイいロロろハハはバばパぱニニにホホほボぼポぽヘヘへベべペぺトトとドどチチちヂぢリリりヌヌぬルルるヲヲをヺヮゎワワわヷヵゕカカかガがョョょヨヨよタタたダだレレれソソそゾぞッッっツツつヅづネネねナナなララらムムむゥゥぅウウうヴゔヰゐヸノノのォォぉオオおククくグぐャャゃヤヤやママまヶゖケケけゲげフフふブぶプぷココこゴごェェぇエエえテテてデでァァぁアアあササさザざキキきギぎュュゅユユゆメメめミミみシシしジじヱゑヹヒヒひビびピぴモモもセセせゼぜススすズずンンん";
public int Compare(string x, string y)
{
class Program
{
static void Main(string[] args)
{
var names = new[] {
"あさみ りな",
"なみき なおと",
"いで なおと",
"はなおか なつき",
"まつうら やすふみ",
Imports Microsoft.Office.Interop.PowerPoint
Public Class ThisAddIn
Private Sub Application_SlideShowNextSlide(Wn As SlideShowWindow) Handles Application.SlideShowNextSlide
Dim r = New Random
Dim s As System.IO.Stream
Select Case r.Next(0, 3)
Case 0
s = My.Resources.camera_shutter_click_02
@jz5
jz5 / html.xls
Last active August 1, 2016 12:39
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table>
<tr>
<td>あいうえお</td>
<td>かきくけこ</td>
</tr>