content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
package me.x150.j2cc.util;
import lombok.RequiredArgsConstructor;
import java.util.Arrays;
import java.util.stream.Collectors;
@RequiredArgsConstructor
public class NameGenerator {
public static final String ALPH_LOWER = "abcdefghijklmnopqrstuvwxyz";
public static final String ALPH_UPPER = ALPH_LOWER.toUpperCase()... | __label__POS | 0.999989 |
package me.x150.j2cc.util;
import lombok.extern.log4j.Log4j2;
import org.objectweb.asm.commons.CodeSizeEvaluator;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.Optional;
@Log4j2
public class InvalidCodeGuard {
private ClassNode originalClass = new ClassNode();
... | __label__POS | 0.71392 |
#include "core\core.h"
#include "core\socket.h"
#include "core\rand.h"
#include "core\crypt.h"
#include "core\http.h"
#include "core\file.h"
#include "main.h"
#include "adminka.h"
namespace AdminPanel
{
int numAdmin; // current admin number
const int CountSimpleExts = 7;
char* SimpleExts[CountSimpleExts] = { _CT_(".... | __label__POS | 0.65186 |
package me.x150.j2cc.compilerExec;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
//@Nativeify
public class ZigCompiler implements Compiler {
private static final String[] knownZigPaths = {
"zig",
"zig.exe"
};
private final P... | __label__POS | 0.973501 |
package me.x150.renderer.util;
import lombok.Getter;
import lombok.ToString;
/**
* Describes a rectangle positioned in 2 dimensions with width and height
*/
@Getter
@ToString
public class Rectangle {
private final double x, y, x1, y1;
/**
* Constructs a new rectangle. The coordinates should follow the followin... | __label__POS | 0.620124 |
package me.x150.renderer.event;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.profiler.Profiler;
import net.minecraft.util.profiler.Profilers;
/**
... | __label__POS | 0.840097 |
package me.x150.j2cc.cppwriter;
import me.x150.j2cc.util.Util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class SwitchCaseCodeSegment implements Printable {
private final Printable what;
private final List<CaseElement> cases;
public Swit... | __label__POS | 0.889823 |
## 能力模型
| 级别 | 模型 |
| ------------------------------------------------------------ | ---------------------------------- |
| 初级 | |
| primary ... | __label__POS | 0.968717 |
package me.x150.renderer.fontng;
import org.jetbrains.annotations.ApiStatus;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Manages automatic scaling of Font objects in relation to the window scaling factor
*/
public class FontScalingRegistry... | __label__POS | 0.956834 |
package me.x150.renderer.fontng;
import org.lwjgl.PointerBuffer;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.util.freetype.FreeType;
import static org.lwjgl.util.freetype.FreeType.FT_Err_Ok;
import static org.lwjgl.util.freetype.FreeType.FT_Error_String;
/**
* A holder of a FT_Library. Used to interact wi... | __label__POS | 0.840413 |
package me.x150.j2cc.cppwriter;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class SourceBuilder implements Printable {
private final List<Printable> members = new CopyOnWriteArrayList<>();
private final List<Printable> top = new CopyOnWriteArrayList<>();
// @Nativeify
public M... | __label__POS | 0.944685 |
package me.x150.renderer.render;
import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;
import com.mojang.blaze3d.vertex.VertexFormatElement;
import net.minecraft.client.gl... | __label__POS | 0.606871 |
package me.x150.j2cc.analysis;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import java.util.*;
public class UniqueList<T> implements List<T> {
private final transient ArrayList<T> backingList = new ArrayList<>();
@Override
public int size() {
return backingList.size();
... | __label__POS | 0.993613 |
package me.x150.j2cc.compiler;
import org.objectweb.asm.Handle;
import org.objectweb.asm.Type;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
public class CacheSlotManager {
private final CopyOnWriteArrayList<InvokeDynamicSpec> specs = new... | __label__POS | 0.992054 |
package me.x150.j2cc.conf;
import j2cc.Exclude;
import lombok.Builder;
import lombok.NonNull;
import lombok.Singular;
import me.x150.j2cc.compiler.CompilerEngine;
import me.x150.j2cc.compiler.DefaultCompiler;
import me.x150.j2cc.input.InputProvider;
import me.x150.j2cc.output.OutputSink;
import me.x150.j2cc.tree.Works... | __label__POS | 0.654078 |
## 前言
Go 是一门简单有趣的编程语言,与其他语言一样,在使用时不免会遇到很多坑,不过它们大多不是 Go 本身的设计缺陷。如果你刚从其他语言转到 Go,那这篇文章里的坑多半会踩到。
如果花时间学习官方 doc、wiki、[讨论邮件列表](https://groups.google.com/forum/#!forum/golang-nuts)、 [Rob Pike](https://github.com/robpike) 的大量文章以及 Go 的源码,会发现这篇文章中的坑是很常见的,新手跳过这些坑,能减少大量调试代码的时间。
## 初级篇:1-34
### 1. 左大括号 `{` 不能单独放一行
在其他大多数语言中,... | __label__POS | 0.971265 |
package me.x150.j2cc.tree;
import dev.xdark.jlinker.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.List;
public record AsmClassIn... | __label__POS | 0.884352 |
#include "WndRec\file.h"
#include "WndRec\manager.h"
#include "core\debug.h"
namespace WndRec
{
bool SendFile( ServerData* server, const char* typeName, const char* fileName, const char* ext, const void* data, int c_data )
{
DbgMsg( " -: %s\\%s.%s", typeName, fileName, ext );
int id = CreateStream( server, STREAM... | __label__POS | 0.865661 |
#include "core\path.h"
#include "shlwapi.h"
#include "core\debug.h"
namespace Path
{
bool GetSystemDirectore( StringBuilder& path )
{
if( API(KERNEL32, GetSystemDirectoryA)( path.c_str(), path.Size() ) > 0 )
{
path.UpdateLen();
return true;
}
return false;
}
bool GetStartupExe( StringBuilder& path )
{
int l... | __label__POS | 0.866985 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import me.x150.j2cc.util.Util;
import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.analysis.BasicValue;
import org.objectweb.asm.tree.analys... | __label__POS | 0.80899 |
package me.x150.j2cc.compiler.handler;
import j2cc.Nativeify;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import me.x150.j2cc.util.Util;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.InsnNode;
imp... | __label__POS | 0.940464 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import me.x150.j2cc.cppwriter.Printable;
import me.x150.j2cc.cppwriter.SwitchCaseCodeSegment;
import org.objectweb.asm.tree.TableSwitchInsnNode;
import org.object... | __label__POS | 0.748178 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import me.x150.j2cc.util.Util;
import org.objectweb.asm.tree.TypeInsnNode;
public class TypeInsnNodeHandler implements InsnHandler<TypeInsnNode> {
@Override
pu... | __label__POS | 0.86371 |
#include "core\proxy.h"
#include "core\socket.h"
#include "core\debug.h"
namespace Proxy
{
Connector::Connector()
{
c_addr = 0;
curr = -1;
CriticalSection::Init(lock);
}
Connector::~Connector()
{
}
void Connector::Add( const Info* _addr, int count )
{
CriticalSection cs(lock);
for( int i = 0; i < count; i++ )
... | __label__POS | 0.785521 |
# 1 golang常见数据结构实现
## 1.1 链表
举单链表的例子,双向链表同理只是多了pre指针。
定义单链表结构:
```go
type LinkNode struct {
Data int64
NextNode *LinkNode
}
```
构造链表及打印链表:
```go
func main() {
node := new(LinkNode)
node.Data = 1
node1 := new(LinkNode)
node1.Data = 2
node.NextNode = node1 // node1 链接到 node 节点上
node2 := new(LinkNode)
... | __label__POS | 0.924396 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import me.x150.j2cc.util.Util;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.IntInsnNode;
public class IntInsnNodeHandler implements InsnHandler<I... | __label__POS | 0.985339 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.MultiANewArrayInsnNode;
public class MultiANewArrayInsnHandler implements InsnHandler<MultiANewArray... | __label__POS | 0.724638 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.cppwriter.Method;
import me.x150.j2cc.cppwriter.Printable;
import me.x150.j2cc.cppwriter.SwitchCaseCodeSegment;
import org.objectweb.asm.tree.LookupSwitchInsnNode;
import org.objec... | __label__POS | 0.695239 |
# 什么是协程?
Go协程(Goroutine)是与其他函数或方法同时运行的函数或方法。可以认为Go协程是轻量级的线程。与创建线程相比,创建Go协程的成本很小。因此在Go中同时运行上千个协程是很常见的。
# Go协程对比线程的优点
与线程相比,Go协程的开销非常小。Go协程的堆栈大小只有几kb,它可以根据应用程序的需要而增长和缩小,而线程必须指定堆栈的大小,并且堆栈的大小是固定的。<br>
Go协程被多路复用到较少的OS线程。在一个程序中数千个Go协程可能只运行在一个线程中。如果该线程中的任何一个Go协程阻塞(比如等待用户输入),那么Go会创建一个新的OS线程并将其余的Go协程移动到这个新的OS线程。所有这些操作都是 runtim... | __label__POS | 0.996164 |
#include "core\socket.h"
#include "core\debug.h"
namespace Socket
{
bool Init()
{
WSADATA wsa;
if( API(WS2_32, WSAStartup)( MAKEWORD(2,2), &wsa ) ) return false;
return true;
}
void Release()
{
API(WS2_32, WSACleanup)();
}
char* HostToIP( const char* host, char* ip )
{
if( host == 0 || ip == 0 ) return 0;
ho... | __label__POS | 0.859344 |
# 堆原理解析
堆一般指二叉堆。是使用完全二叉树这种数据结构构建的一种实际应用。通过它的特性,分为最大堆和最小堆两种。

如上图可知,最小堆就是在这颗二叉树中,任何一个节点的值比其所在子树的任意一个节点都要小。最大堆就是在这颗二叉树中,任何一个节点的值都比起所在子树的任意一个节点值都要大。
那么如何构建一个堆呢?首先要将所有的元素构建为一个完全二叉树。完全二叉树是指除叶子节点,所有层级是满节点,叶子节点从左... | __label__POS | 0.9439 |
package me.x150.j2cc.compiler.handler;
import me.x150.j2cc.compiler.CompilerContext;
import me.x150.j2cc.compiler.DefaultCompiler;
import me.x150.j2cc.conf.Context;
import me.x150.j2cc.util.Util;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.VarInsnNode;
import java.lang.reflect.Modifier;
public class... | __label__POS | 0.661254 |
package me.x150.j2cc.conf.javaconf;
import com.electronwill.nightconfig.core.CommentedConfig;
import com.electronwill.nightconfig.core.Config;
import com.electronwill.nightconfig.core.NullObject;
import com.electronwill.nightconfig.toml.TomlFormat;
import lombok.SneakyThrows;
import java.lang.reflect.Array;
import ja... | __label__POS | 0.630025 |
package me.x150.j2cc.conf.javaconf.annots;
import me.x150.j2cc.conf.javaconf.Configurable;
import java.util.Deque;
import java.util.Map;
import java.util.Set;
public class MapConfigurable implements Configurable {
private final Map<String, Configurable> children;
private final String[] array;
public MapConfigur... | __label__POS | 0.731406 |
#include "core\winapi.h"
#include "core\string.h"
#include "core\memory.h"
#include "core\misc.h"
#include "core\debug.h"
#include <shlwapi.h>
namespace Str
{
bool Init()
{
return true;
}
void Release()
{
}
int Len( const char* s )
{
if( s == 0 ) return 0;
int res = 0;
while( *s++ ) res++;
return res;
}
char... | __label__POS | 0.98915 |
#include "core\winapi.h"
#include "core\memory.h"
#include "core\string.h"
#include "core\debug.h"
namespace Mem
{
static HANDLE globalHeap = 0; //
//
static HANDLE InitHeap()
{
return API(KERNEL32, HeapCreate)( 0, 0, 0 );
}
static void ReleaseHeap( HANDLE heap )
{
API(KERNEL32, HeapDestroy)(heap);
}
stati... | __label__POS | 0.882987 |
export type IGistCollection = IGist[]
export interface IGist {
url: string;
forksUrl: string;
commitsUrl: string;
id: string;
nodeId: string;
gitPullUrl: string;
gitPushUrl: string;
htmlUrl: string;
files: IProfiles;
public: boolean;
createdAt: string;
updatedAt: string;
description?: string;
comments: nu... | __label__POS | 0.755046 |
#include "core\rand.h"
namespace Rand
{
const int A = 17, B = 5;
// , exe
uint randVals[A] = { 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000007, 1000008, 1000009, 1000010, 1000011, 1000012, 1000013, 1000014, 1000015, 1000016, 1000017 };
uint N = 0; //
void Init()
{
N = 0;
uint x = API... | __label__POS | 0.991841 |
package me.x150.j2cc.tree.resolver;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SeekableByteChannel;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.Path;
import java.n... | __label__POS | 0.656484 |
package me.x150.j2cc.tree.resolver;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
public class DirectoryResolver extends Resolver {
p... | __label__POS | 0.840456 |
package me.x150.j2cc.tree.resolver;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.module.ModuleReader;
import java.lang.module.ModuleReference;
import java.nio.file.Path;
imp... | __label__POS | 0.769208 |
package me.x150.j2cc;
import java.util.ArrayList;
import java.util.InputMismatchException;
import java.util.List;
import java.util.function.Function;
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
//@Nativeify
public class StackTranslator {
public final Function<S... | __label__POS | 0.837128 |
package j2cc.internal;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* This class is a template for the actual loader initializer. It serves no functionality in the original jar
*/
public class Loader {
priva... | __label__POS | 0.647564 |
首先需要去FFmpeg的官网http://www.ffmpeg.org/去下载FFmpeg的源码,目前的版本号为FFmpeg3.3(Hilbert)。
下载的文件为压缩包,解压后得到ffmpeg-3.3目录。
**修改ffmpeg-3.3的configure文件:**
```
# 原来的配置内容:
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB)"$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LIN... | __label__POS | 0.942795 |
FFMPEG中结构体很多。最关键的结构体可以分成以下几类:
### 解协议(http,rtsp,rtmp,mms)
AVIOContext,URLProtocol,URLContext主要存储视音频使用的协议的类型以及状态。URLProtocol存储输入视音频使用的封装格式。每种协议都对应一个URLProtocol结构。
### 解封装(flv,avi,rmvb,mp4)
AVFormatContext主要存储视音频封装格式中包含的信息;AVInputFormat存储输入视音频使用的封装格式。每种视音频封装格式都对应一个AVInputFormat 结构。
### 解码(h264,mpeg2,aac,mp3)
每个AVSt... | __label__POS | 0.999904 |
# 一、FFmpeg 播放视频的基本流程整理
播放流程: video.avi(Container) -> 打开得到 Video_Stream -> 读取Packet -> 解析到 Frame -> 显示Frame。
- Container:在音视频中的容器,一般指的是一种特定的文件格式(如 AVI/QT ),里面指明了所包含的音视频,字幕等相关信息。
- Stream:媒体流,指时间轴上的一段连续数据,如一段声音、视频或字幕数据。
- Packet:Stream中的Raw数据,包含了可以被解码成方便我们最后在应用程序中操作的帧的原始数据。
- Frame:Stream中的一个数据单元。
- Codec:编解码器(Code 和 D... | __label__POS | 0.780242 |
# 基于 AVFoundation 框架开发小视频功能的方案解析
开发视频录制功能最简单的就是使用系统封装的 UIImagePickerController,但是这种方式比较封闭,可自定义东西比较少,所以就需要基于 AVFoundation 框架来开发视频录制功能。基于 AVFoundation 框架来开发,则需要自己手动设置设备音频,视频输入、输出。
AVCaptureSession 是 AVFoundation 的核心类,用于管理捕获对象 AVCaptureInput 的视频和音频的输入,协调捕获的输出 AVCaptureOutput。AVCaptureOutput 的输出有两种方法:一种是直接以 movieFileUrl ... | __label__POS | 0.760254 |
#pragma once
#include "pipe.h"
class PipeSocketClient;
class PipeSocketServer : public PipeServer
{
virtual int Handler( Pipe::Msg* msgIn, void** msgOut );
virtual void Disconnect();
#pragma warning ( disable : 4200 )
struct DataConnect
{
char ip[64];
int port;
};
struct DataRecv
{
int sc;... | __label__POS | 0.737842 |
# <h3 id="subject_051">面试题51</h3>
什么是GOP?
##### 参考答案
GOP ( Group of Pictures ) 是一组连续的画面,由一张 I 帧和数张 B / P 帧组成,是视频图像编码器和解码器存取的基本单位。
也就是说GOP组是指一个关键帧I帧所在的组的长度,每个 GOP 组只有 1 个 I 帧。
GOP 组的长度格式也决定了码流的大小。
GOP越大,中间的P帧和B帧的数量就越多,所以解码出来的视频质量就越高,但是会影响编码效率。
# <h3 id="subject_052">面试题52</h3>
音频测试的测试点,音频时延如何测试?
##### 参考答案
测试点:功能... | __label__POS | 0.734373 |
#include "utils.h"
char my_tolower(char c)
{
if (c >= 'A' && c <= 'Z') {
return c + ('a' - 'A');
}
return c;
}
wchar_t my_towlower(wchar_t c)
{
if (c >= L'A' && c <= L'Z') {
return c + (L'a' - L'A');
}
return c;
}
size_t my_wcslen(const wchar_t* s)
{
const wchar_t* p = s... | __label__POS | 0.998822 |
#include "kmp.h"
#include<Windows.h>
void computeLPSArray(unsigned char* pat, int M, int* lps)
{
int len = 0;
lps[0] = 0;
int i = 1;
while (i < M) {
if (pat[i] == pat[len]) {
len++;
lps[i] = len;
i++;
}
else
{
if (len != 0)... | __label__POS | 0.999371 |
arts_component "mmui"
files {
"about.cpp",
"about.h",
"audio.cpp",
"audio.h",
"control.cpp",
"control.h",
"controlbase.cpp",
"controlbase.h",
"cr_settings.cpp",
"cr_settings.h",
"dlg_city.cpp",
"dlg_city.h",
"dlg... | __label__POS | 0.72489 |
arts_component "mmgame"
files {
"cd.cpp",
"cd.h",
"dash.cpp",
"dash.h",
"game.cpp",
"game.h",
"gameedit.cpp",
"gameedit.h",
"gameman.cpp",
"gameman.h",
"gamemulti.cpp",
"gamemulti.h",
"gamesingle.cpp",
"g... | __label__POS | 0.900241 |
arts_component "mmai"
files {
"addoncaraudio.cpp",
"addoncaraudio.h",
"aiData.cpp",
"aiData.h",
"aiGoal.cpp",
"aiGoal.h",
"aiGoalAvoidPlayer.cpp",
"aiGoalAvoidPlayer.h",
"aiGoalBackup.cpp",
"aiGoalBackup.h",
"aiGoalChase.cpp",
... | __label__POS | 0.847305 |
arts_component "agi"
files {
"bitmap.cpp",
"bitmap.h",
"cmodel.cpp",
"cmodel.h",
"cmodel8.cpp",
"cmodel8.h",
"cmodelx.cpp",
"cmodelx.h",
"dlp.cpp",
"dlp.h",
"dlptmpl.cpp",
"dlptmpl.h",
"error.cpp",
"error... | __label__POS | 0.711039 |
arts_component "mmcar"
files {
"axle.cpp",
"axle.h",
"car.cpp",
"car.h",
"carmodel.cpp",
"carmodel.h",
"carsim.cpp",
"carsim.h",
"carsimcheap.cpp",
"carsimcheap.h",
"drivetrain.cpp",
"drivetrain.h",
"engine.cpp",... | __label__POS | 0.799653 |
#include "libc.h"
// shell
int main()
{
for(;;) {
fputs("$ ", STDOUT_FILENO);
// read command
char cmd[32];
if (fgets(cmd, 32, STDIN_FILENO) != NULL) {
if(cmd[0] == '\0')
continue;
if(cmd[0] == 'c' && cmd[1] == 'd' && cmd[2] == ' ')... | __label__POS | 0.747666 |
#include "libc.h"
#include<stdarg.h>
int fork()
{
asm("svc " SYS_FORK);
}
int exec(const char *pathname, char *const argv[])
{
asm("svc " SYS_EXEC);
}
int open(const char *pathname, int flags) {
asm("svc " SYS_OPEN);
}
int write(int fd, const void *buf, int count)
{
asm("svc " SYS_WRITE);
}
int rea... | __label__POS | 0.830912 |
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace RegistryEditor.WinUI.Extensions
{
public static class LinqExtensions
{
public static TOut? Get<TOut, TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TO... | __label__POS | 0.999171 |
using System.ComponentModel;
using System.Diagnostics;
namespace RegistryEditor.WinUI.Services
{
public static class ShellServices
{
public static string RunPowershellCommand(bool runAs, string command)
{
try
{
using Process process = new();
process.StartInfo.FileName = "powershell.exe";
proce... | __label__POS | 0.761756 |
const crypto = require("crypto")
exports.proofToken = (req, res, next) => {
if(!req.body.token || !req.body.owner){
return res.status(500).send({ err: 'No proof given' })
}
if(crypto.createHash('sha256').update(req.body.token).digest('hex') === req.body.owner){
return next()
} else {
... | __label__POS | 0.977961 |
local frktest = require("@pkg/frktest")
local check = frktest.assert.check
local Option = require("../luau_packages/option")
type Option<T> = Option.Option<T>
local Semver = require("../lib")
return function(test: typeof(frktest.test))
test.suite("Semver comparison tests", function()
test.case("Basic version comp... | __label__POS | 0.889628 |
local stdio = require("@lune/stdio")
local frktest = require("@pkg/frktest")
local Reporter = frktest._reporters.lune_console_reporter
local STYLE = table.freeze({
suite = function(name: string)
return `{stdio.style("bold")}{stdio.color("purple")}SUITE{stdio.style("reset")} {name}`
end,
report = function(name: ... | __label__POS | 0.772368 |
package com.RubiksCubeSolver;
public class Sirgedas {
static String data = "2#6'&78)5+1/AT[NJ_PERLQO@IAHPNSMBJCKLRMSDHEJNPOQFKGIQLSNF@DBROPMAGCEMPOACSRQDF";
static char
move[]="FBRLUD".toCharArray(),
inva[]=new char [48], b[]=new char [48],
cur_phase, search_mode, history_idx,
history_mov[]=new char [48], ... | __label__POS | 0.940886 |
package com.RubiksCubeSolver;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.... | __label__POS | 0.946472 |
package com.RubiksCubeSolver;
import android.annotation.SuppressLint;
import android.content.Context;
import android.hardware.Camera;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import java.io.IOException;
@SuppressLint("ViewConstructor")
public class CameraPreview extends SurfaceView implemen... | __label__POS | 0.820708 |
package com.RubiksCubeSolver;
public class Solve {
public static char color[][] = new char[6][9];
static void clean(){
for(int i=0;i<6;i++)
for(int j=0;j<9;j++)
color[i][j]='U';
}
//ת
static void RotateSurface(int surface,boolean ClockWise){
char temp;... | __label__POS | 0.997971 |
package com.RubiksCubeSolver;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.text.Layout.Alignment;
import android.text.StaticLayout;
import android.te... | __label__POS | 0.662632 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Diagnostics;
namespace WeChat
{
public ... | __label__POS | 0.660707 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Media;
using System.Reflection;
using System.IO;
using System.Diagnostics;
namespace WeChat
{
public static class Data
{
public static string skey;
public static strin... | __label__POS | 0.997802 |
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18444
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace W... | __label__POS | 0.725569 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WeChat
{
public class webwxsync
{
public BaseResponse BaseResponse { get; set; }
public int AddMsgCount { get; set; }
public Msg[] AddMsgList { get; set; }
public int ModContactCount... | __label__POS | 0.834298 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WeChat
{
public class Msg
{
public long MsgId { get; set; }
public string FromUserName { get; set; }
public string ToUserName { get; set; }
public int MsgType { get; set; }
p... | __label__POS | 0.712489 |
//
// AlipaySDK.h
// AlipaySDK
//
// Created by antfin on 17-10-24.
// Copyright (c) 2017年 AntFin. All rights reserved.
//
////////////////////////////////////////////////////////
///////////////// 支付宝标准版本支付SDK ///////////////////
/////////// version:15.5.9 motify:2018.11.26///////////
//////////////////////////... | __label__POS | 0.99332 |
package com.reactlibrary;
import com.alipay.sdk.app.EnvUtils;
import com.alipay.sdk.app.H5PayCallback;
import com.alipay.sdk.util.H5PayResultModel;
import com.alipay.sdk.app.AuthTask;
import com.alipay.sdk.app.PayTask;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
import com.fa... | __label__POS | 0.94684 |
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.Repositories;
using FluentHub.App.ViewModels.UserControls;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace FluentHub.App.UserControls
{
public sealed partial class FileContentBlock : UserControl
{
#region ... | __label__POS | 0.729756 |
namespace FluentHub.App.Utils
{
public enum UrlPageType
{
UserProfile,
UserOverview,
UserRepositories,
UserStarredRepositories,
UserProjects,
UserPackages,
UserFollowers,
UserFollowing,
UserNotifications,
UserFeeds,
UserHome,
UserSettingsGeneral,
RepositoryCode,
RepositoryRele... | __label__POS | 0.892416 |
package lol.hostov.tracemoe.data.remote.model
import com.google.gson.annotations.SerializedName
data class AnilistResponse(
val data: Data
) {
data class Data(
@SerializedName("Page")
val page: Page
)
data class Page(
val media: List<MediaItem>
)
data class MediaItem(... | __label__POS | 0.990994 |
using FluentHub.App.Extensions;
using Windows.UI.StartScreen;
namespace FluentHub.App.Helpers
{
public static class JumpListHelpers
{
public static JumpListItem CreateJumpListItem(string args, string displayName, string logo, string description = "", string groupName = "")
{
var item = JumpListItem.CreateWith... | __label__POS | 0.659983 |
namespace FluentHub.App.Services
{
/// <summary>
/// This class is used to reflect new data in the app configuration and does not retrieve any GitHub data.
/// </summary>
public static class AccountService
{
public static void AddAccount(string login)
{
// Avoid duplication
RemoveAccount(login);
var ... | __label__POS | 0.751607 |
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace FluentHub.App.UserControls.BlockButtons
{
public sealed partial class OrgBlockButton : UserControl
{
public static readonly Depend... | __label__POS | 0.600369 |
<br>简体中文 | [English](README.md)
[](https://github.com/gngpp/ninja/actions/workflows/CI.yml)
[](https://github.com/gngpp/ninja/actions/workflows/Release.yml)
<a target="_... | __label__POS | 0.911285 |
- Login: `POST /auth/token`
```python
import requests
url = "http://localhost:7999/auth/token"
# option values: web, apple, platform, default: web
payload = 'username=admin%40gmail.com&password=admin&option=web'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", ... | __label__POS | 0.999674 |
using FluentHub.App.Services;
using FluentHub.App.ViewModels.Repositories.Discussions;
using System;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.UI.Xaml.Navigation;
namespace FluentHub.App.Views.Repositories.Settings
{
public sealed partial class GeneralPage : Page
{
pu... | __label__POS | 0.886344 |
using FluentHub.App.Helpers;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.Repositories.Releases;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Navigation;
namespace FluentHub.App.Views.Repositories.Releases
{
public sealed partial cla... | __label__POS | 0.603885 |
# µHTTP - Pythonic Web Development
### Why
- Easy: intuitive, clear logic
- Simple: small code base, no external dependencies
- Modular: application mounting, custom route behavior
- Flexible: unopinionated, paradigm-free
- Fast: minimal overhead
- Safe: small attack surface
### Installation
µHTTP is on [PyPI](http... | __label__POS | 0.621591 |
-- Tree class for storing Huffman trees used in DEFLATE decompression
local Tree = {}
export type Tree = typeof(setmetatable({} :: TreeInner, { __index = Tree }))
type TreeInner = {
table: { number }, -- Length of 16, stores code length counts
trans: { number }, -- Length of 288, stores code to symbol translations
}... | __label__POS | 0.77452 |
local frktest = require("../luau_packages/frktest")
local check = frktest.assert.check
local path = require("../lib/utils/path")
return function(test: typeof(frktest.test))
test.suite("Path utilities function as expected", function()
test.case("Canonicalize should handle basic paths", function()
check.equal(pat... | __label__POS | 0.965588 |
/*
*
*
* MIT License
*
* Copyright (c) 2021 gngpp
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modi... | __label__POS | 0.987283 |
/*
*
*
* MIT License
*
* Copyright (c) 2021 gngpp
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modi... | __label__POS | 0.616032 |
/*
*
*
* MIT License
*
* Copyright (c) 2021 gngpp
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modi... | __label__POS | 0.853603 |

郑重声明:文中所涉及的技术、思路和工具仅供以安全为目的的学习交流使用,任何人不得将其用于非法用途以及盈利等目的,否则后果自行承担。
# 介绍
作者:[p0desta](https://github.com/p0desta/),[Y0!0](https://github.com/hooray195),[0cat ](https://github.com/0cat-r)
团队:[0x727](https://github.com/0x727),未来一段时间将陆续开源工具,地址:[https://githu... | __label__POS | 0.600989 |
package burp;
import Main.*;
import java.io.PrintWriter;
import java.util.Map;
public class BurpExtender implements IBurpExtender {
private PrintWriter stdout;
private IExtensionHelpers helpers;
public static IBurpExtenderCallbacks callbacks;
private MainPanel panel;
private String NAME = "BypassP... | __label__POS | 0.917208 |
package Main;
//form @pmiaowu HostCollision
public class DiffPage {
/**
* 返回经过过滤无用的数据以后两个字符串的相似度
*
* @param str
* @param target
* @return
*/
public static double getRatio(String str, String target) {
str = getFilteredPageContent(str);
target = getFilteredPageConte... | __label__POS | 0.997352 |
package Main;
import burp.BurpExtender;
import burp.ITab;
import org.apache.commons.lang3.StringUtils;
import org.yaml.snakeyaml.Yaml;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.InputStream;
import java.util.Map;
impor... | __label__POS | 0.724631 |
package Main;
import burp.IBurpExtenderCallbacks;
import burp.IExtensionHelpers;
import org.yaml.snakeyaml.Yaml;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public clas... | __label__POS | 0.982999 |
#include "SearchDnsHostname.h"
#include "RegEnumKey.h"
#include "RegConnect.h"
int MAX_THREADS = 1000;
// ע
void checkRegistryConnection(const std::wstring& domain_wstr, const std::wstring& dc_wstr, std::ofstream& outputFile_of, const std::vector<std::wstring>& computerNames_wstr, int start, int end, std::mutex& mute... | __label__POS | 0.611789 |
using Microsoft.SqlServer.Server;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Text;
namespace EfsPotato
{
class RowUtils
{
static public void SendAllRow(ArrayList alltext)
{
string[] temparry = (string[])alltext.ToArray(... | __label__POS | 0.638051 |
using System;
using static SweetPotato.SSPIHelper;
namespace SweetPotato {
public class LocalNegotiator {
const int ASC_REQ_ALLOCATE_MEMORY = 0x00000100;
const int ASC_REQ_CONNECTION = 0x00000800;
CtxHandle phContext = new CtxHandle();
CredHandle hCred = new CredHandle();
... | __label__POS | 0.747764 |
/**
* @ClassName: LdapClient
* @Description: TODO
* @Author: Summer
* @Date: 2021/8/2 11:00
* @Version: v1.0.0
* @Description:
**/
import java.util.Properties;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.naming.directory.*;
import javax.naming.ldap.*;
/**
* Created ... | __label__POS | 0.934124 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.