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
| //For reason: https://stackoverflow.com/questions/76766396/typescript-does-not-expand-generic-and-complains-about-type-arguments-being-not | |
| interface Foo<T extends {}> { | |
| k: T[keyof T]; | |
| } | |
| type Bar<T extends {}> = { | |
| k: T[keyof T]; | |
| }; |
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
| /*: | |
| * @plugindesc v.1.0.0 Dual Language Display (English) | |
| * @author Junie | |
| * @help | |
| * This plugin shows English translation alongside the current language in messages. | |
| * Requires DKTools_Localization plugin. | |
| * | |
| * @param Enabled | |
| * @desc Enable dual language display by default? | |
| * @type boolean |
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
| // luajittest.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
| // | |
| #include <iostream> | |
| #include <string> | |
| #include "lua.hpp" | |
| #include "LuaJIT/src/lj_obj.h" | |
| #include "LuaJIT/src/lj_ctype.h" |
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
| import org.mockito.exceptions.base.MockitoException; | |
| import org.mockito.internal.verification.VerificationModeFactory; | |
| import org.mockito.internal.verification.api.VerificationData; | |
| import org.mockito.internal.verification.api.VerificationDataInOrder; | |
| import org.mockito.internal.verification.api.VerificationInOrderMode; | |
| import org.mockito.invocation.Invocation; | |
| import org.mockito.invocation.MatchableInvocation; | |
| import org.mockito.verification.VerificationMode; | |
| import java.util.ArrayList; |
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
| require 'socket' | |
| PORT = 12321 | |
| def process_message(message,packet_info) | |
| message = Marshal.load(message) | |
| case message[:type] | |
| when :broadcast | |
| return reply_broadcast(message,packet_info) | |
| when :reply | |
| return deal_reply(message,packet_info) |
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
| #TODO 应该将每个点数组抽象成图形,然后实现normalize!以及rot方法 | |
| #fuck it, it works. | |
| class Point | |
| attr :x,true | |
| attr :y,true | |
| attr :z,true | |
| def hash | |
| x<<16|y<<8|z | |
| end | |
| def ==(o) |
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
| //Inspired by http://www.zhihu.com/question/20125963/answer/18158192 (chinese) | |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #define MAXN 5 | |
| typedef void* (*loop_func)(void* params); | |
| typedef void (*branch)(loop_func,void*); | |
| void conditionFalse(loop_func loopfunc,void* params){ | |
| (*loopfunc)(params); | |
| } | |
| void conditionTrue(loop_func loopfunc,void* params){ |