Skip to content

Instantly share code, notes, and snippets.

View maildrop's full-sized avatar

Mikito TOGURO maildrop

View GitHub Profile
#include <iostream>
#include <cstdint>
#include <cassert>
namespace riff{
inline uint32_t fourcc( char a = '\0', char b = '\0', char c = '\0', char d = '\0');
template<size_t I>
inline uint32_t fourcc( char (&a)[I] );
inline uint32_t fourcc( char a , char b , char c , char d )
this file is obsolute SEE https://github.com/maildrop/GNUEmacsBug11732
Index: src/w32fns.c
===================================================================
--- src.orig/w32fns.c
+++ src/w32fns.c
@@ -351,6 +351,10 @@ static void unwind_create_tip_frame (Lis
static void my_create_window (struct frame *);
static void my_create_tip_window (struct frame *);
+static void
#include <iostream>
template<size_t i> struct int2type{ enum{ value = i }; };
struct fizz{};
struct buzz{};
struct fizzbuzz{};
template<size_t fizz, size_t buzz, size_t i>struct fizz_buzz{ typedef int2type<i> type;};
template<size_t fizz, size_t i> struct fizz_buzz<fizz,0,i>{ typedef buzz type;};
template<size_t buzz, size_t i> struct fizz_buzz<0, buzz,i>{ typedef fizz type;};
template<size_t i> struct fizz_buzz<0,0,i>{ typedef fizzbuzz type;};
template<size_t value> struct fizzbuzz_t{ typedef fizz_buzz<value % 3 , value % 5,value> type;};
/* テストが不十分なので取り扱い注意 */
/*
思うに logAssertion_templateの中で、createFileWithoutCheckingPath
するのは、意味が無いんじゃ無いかな
なぜならば、これはカレントワーキングディレクトリからの相対パスで表
示されるので、実行時のディレクトリがソースコードツリー上に無いと、
正しくパスがとれない。
これが呼ばれる時はエラーが起きるときだからあんまり複雑なことをするのはいけてない原因になる。
include <pthread.h>
#include <iostream>
int main(int,char*[])
{
pthread_t pthread = {0};
struct argument_t{
const int parameter;
問題は二段階ある。
一つは、表示用のテキストバッファ
ImGui::InputText() の第三引数 がバッファサイズ
imgui_demo.cpp の struct ExampleAppConsole :: InputBuf
つまり、バッファのメモリアローケーションに ImGui::InputText() は、関知しない。
メモリの割り当ては、呼び出し側の責任。サイズはInputBuf の第三引数にあってこれを超えないように処置がされる。
長さの制限はコレ
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<textarea id="urn:uuid:9fd7d865-a945-49ec-9d48-8b96513a7e77">
onmessage = function(e){
postMessage( e.data[0] );
};
</textarea>
@maildrop
maildrop / App.java
Created December 24, 2019 03:19
ffmpeg encoder process
package com.example;
import java.lang.*;
import java.io.*;
import java.util.ArrayList;
import java.nio.ByteBuffer;
public class App
{
public static final void main( String[] args ){
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.exeample</groupId>
<artifactId>enc</artifactId>
<version>1.0-SNAPSHOT</version>
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<groupId>com.example</groupId>
<artifactId>test</artifactId>