This file contains hidden or 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
from m5stack import lcd | |
from m5stack import * | |
import utime | |
lcd.clear() | |
lcd.setCursor(0, 0) | |
lcd.setColor(lcd.WHITE) | |
#画像データ名 | |
imgs=["desert","flower_1","flower_2","flower_3","flower_4"] |
This file contains hidden or 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
// OpCodeがldtokenの段階で初期化子を解決できるのでそこで行います。 | |
var operand = method.Module.ResolveMember(metadataToken, typeArguments, methodArguments); | |
var field = (FieldInfo)operand; | |
var byteSize = Marshal.SizeOf(field.FieldType); | |
var typeSize = ResolvePrimitiveTypeSize(newarrType); // Primitiveな型のサイズを取得する | |
var elementCount = byteSize / typeSize; | |
var array = Array.CreateInstance(newarrType, elementCount); | |
RuntimeHelpers.InitializeArray(array, field.FieldHandle); |
This file contains hidden or 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
.class nested private explicit ansi sealed '__StaticArrayInitTypeSize=12' | |
extends [netstandard]System.ValueType | |
{ | |
.pack 1 | |
.size 12 | |
} // end of class __StaticArrayInitTypeSize=12 |
This file contains hidden or 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
.method private hidebysig | |
instance void Main ( | |
string[] arguments | |
) cil managed | |
{ | |
.custom instance void [Astral.CSharp]Astral.EntryPointAttribute::.ctor() = ( | |
01 00 00 00 | |
) | |
// Method begins at RVA 0x2098 | |
// Code size 20 (0x14) |
This file contains hidden or 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
class Application { | |
void Main(string[] arguments) { | |
var test = new int[] { 1, 2, 3 }; | |
} | |
} |
This file contains hidden or 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
using System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
using System.Reflection; | |
namespace MyApp | |
{ | |
partial class MyApp : Form | |
{ | |
// タスクトレイアイコン |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
namespace TopMostWindow | |
{ | |
// Win32API | |
public class WinAPI |
This file contains hidden or 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
using System; | |
using System.Runtime.InteropServices; | |
namespace MouseUnderScroll | |
{ | |
// Win32API | |
public class WinAPI | |
{ | |
[StructLayout(LayoutKind.Sequential)] | |
public struct POINT |
This file contains hidden or 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
using System; | |
using UnityEngine; | |
public partial class Bitmap | |
{ | |
private const int lanczosDefaultN = 3; | |
private Bitmap resizeLanczos(uint width, uint height, uint range = lanczosDefaultN) | |
{ | |
var bitmap = new Bitmap(width, height); |
This file contains hidden or 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
using System; | |
using System.ComponentModel.Composition; | |
using System.Runtime.InteropServices; | |
using Microsoft.VisualStudio; | |
using Microsoft.VisualStudio.Editor; | |
using Microsoft.VisualStudio.OLE.Interop; | |
using Microsoft.VisualStudio.Text.Editor; | |
using Microsoft.VisualStudio.TextManager.Interop; | |
using Microsoft.VisualStudio.Utilities; |