Skip to content

Instantly share code, notes, and snippets.

View sample.xaml
<Image Name="PngImage" />
View sample.cs
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();
View manifest.json
"name": "Show Asset Widget",
"version": "1.0",
"manifest_version": 2,
"description": "Show Unity asset widget on Unity Affiliate reporting page.",
"content_scripts": [
"matches": [
View script.js
const timer = setInterval(timer_tick, 500);
var prevId;
var div = document.createElement("div");
var body = document.getElementsByTagName("body")[0];
function timer_tick() {
var result = document.documentElement.innerHTML.match(/assetstore_package_(\d+)/);
if (!result) return;
View Save as PNGs.jsx
Save as PNGs.jsx
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.
View wp-config.php
$connectstr_dbhost = '';
$connectstr_dbname = '';
$connectstr_dbusername = '';
$connectstr_dbpassword = '';
foreach ($_SERVER as $key => $value) {
if (strpos($key, "MYSQLCONNSTR_") !== 0) {
View IrohaComparer.cs
using System;
using System.Collections.Generic;
using System.Globalization;
public class IrohaComparer : IComparer<string>
private string iroha = "ィィぃイイいロロろハハはバばパぱニニにホホほボぼポぽヘヘへベべペぺトトとドどチチちヂぢリリりヌヌぬルルるヲヲをヺヮゎワワわヷヵゕカカかガがョョょヨヨよタタたダだレレれソソそゾぞッッっツツつヅづネネねナナなララらムムむゥゥぅウウうヴゔヰゐヸノノのォォぉオオおククくグぐャャゃヤヤやママまヶゖケケけゲげフフふブぶプぷココこゴごェェぇエエえテテてデでァァぁアアあササさザざキキきギぎュュゅユユゆメメめミミみシシしジじヱゑヹヒヒひビびピぴモモもセセせゼぜススすズずンンん";
public int Compare(string x, string y)
View Program.cs
class Program
static void Main(string[] args)
var names = new[] {
"あさみ りな",
"なみき なおと",
"いで なおと",
"はなおか なつき",
"まつうら やすふみ",
View ThisAddIn.vb
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
View html.xls
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">