content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
package com.feihong.ldap.utils;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
public class MyURLClassLoader {
private URLClassLoader classLoader;
public MyUR... | __label__POS | 0.971633 |
package com.feihong.ldap.gadgets;
import com.feihong.ldap.enumtypes.PayloadType;
import com.feihong.ldap.gadgets.utils.Gadgets;
import com.feihong.ldap.gadgets.utils.Reflections;
import org.apache.commons.collections.functors.InvokerTransformer;
import org.apache.commons.collections.keyvalue.TiedMapEntry;
import org.a... | __label__POS | 0.864483 |
package com.feihong.ldap.gadgets;
import com.feihong.ldap.enumtypes.PayloadType;
import com.feihong.ldap.gadgets.utils.Gadgets;
import com.feihong.ldap.gadgets.utils.Reflections;
import org.apache.commons.collections4.functors.InvokerTransformer;
import org.apache.commons.collections4.keyvalue.TiedMapEntry;
import org... | __label__POS | 0.861336 |
package com.feihong.ldap.gadgets;
import com.feihong.ldap.enumtypes.PayloadType;
import com.feihong.ldap.gadgets.utils.Gadgets;
import com.feihong.ldap.gadgets.utils.Reflections;
import com.feihong.ldap.utils.MyURLClassLoader;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.Object... | __label__POS | 0.881889 |
package com.feihong.ldap.gadgets;
import com.feihong.ldap.enumtypes.PayloadType;
import com.feihong.ldap.gadgets.utils.Gadgets;
import com.feihong.ldap.gadgets.utils.Reflections;
import com.feihong.ldap.utils.Util;
import javax.xml.transform.Templates;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutput... | __label__POS | 0.803384 |
package com.feihong.ldap.gadgets;
import com.feihong.ldap.enumtypes.PayloadType;
import com.feihong.ldap.gadgets.utils.Gadgets;
import com.feihong.ldap.gadgets.utils.Reflections;
import com.feihong.ldap.utils.MyURLClassLoader;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.Object... | __label__POS | 0.881599 |
package com.feihong.ldap.template;
import com.sun.org.apache.xalan.internal.xsltc.DOM;
import com.sun.org.apache.xalan.internal.xsltc.TransletException;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
import com.sun.org.apache.xml.int... | __label__POS | 0.913762 |
package com.feihong.ldap.template;
import com.sun.org.apache.xalan.internal.xsltc.DOM;
import com.sun.org.apache.xalan.internal.xsltc.TransletException;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
import com.sun.org.apache.xml.int... | __label__POS | 0.889739 |
package com.feihong.ldap.template;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import sun.misc.BASE64Decoder;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.ServletRequest;
import javax.servlet.Ser... | __label__POS | 0.697717 |
package com.feihong.ldap.gadgets.utils;
public class Util {
public static byte[] deleteAt(byte[] bs, int index) {
int length = bs.length - 1;
byte[] ret = new byte[length];
if(index == bs.length - 1) {
System.arraycopy(bs, 0, ret, 0, length);
} else if(index < bs.length... | __label__POS | 0.99997 |
package com.feihong.ldap.gadgets.utils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class ClassFiles {
public static String classAsFile(final Class<?> clazz) {
return classAsFile(clazz, true);
}
public static String classAsFile(final Class<... | __label__POS | 0.994489 |
# T1218.011-Win-使用url.dll执行Payload(白名单)
## 描述
攻击者可能利用**rundll32.exe**调用受信任的动态链接库(DLL)如`url.dll`,代理执行恶意代码,规避安全工具的检测(MITRE ATT&CK T1218.011)。`rundll32.exe`是Windows内置工具,用于加载DLL并调用指定函数,常用于正常系统操作,因此常被白名单或误报。`url.dll`是Internet快捷方式壳扩展相关API的系统文件,包含函数如`OpenURL`、`OpenURLA`和`FileProtocolHandler`,可被攻击者利用执行本地或远程的恶意文件(如HTA、SCT脚本),... | __label__POS | 0.703817 |
# T1016-Win-系统网络配置发现
## 描述
攻击者通过系统网络配置发现(T1016)收集目标系统或远程系统的网络配置和设置详细信息,以了解网络环境、识别关键设备(如网关、DNS 服务器或域控制器)或为后续攻击(如横向移动、数据泄露)做准备。在 Windows 系统中,攻击者可能使用原生工具如 `ipconfig`、`arp`、`nbtstat`、`route` 和 `netsh`,以及 PowerShell 命令(如 `Get-NetAdapter`、`Get-NetIPAddress`)或 WMI 查询(如 `Win32_NetworkAdapterConfiguration`)。在 Linux 或 macOS 系统... | __label__POS | 0.97513 |
ccopy_reg
_reconstructor
p0
(cbuilding_map
Building
p1
c__builtin__
object
p2
Ntp3
Rp4
(dp5
S'floor_receivers'
p6
(dp7
S'conference'
p8
(lp9
sS'test-grid'
p10
(lp11
ssS'floors'
p12
(lp13
g0
(cbuilding_map
Floor
p14
g2
Ntp15
Rp16
(dp17
S'file_name'
p18
S'test-grid.gif'
p19
sS'raw_image'
p20
S'GIF87a\x90\x01\x90\x01\x87\... | __label__POS | 0.656872 |
# T1190-CVE-2021-21402-Jellyfin任意文件读取漏洞
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
对于网站和... | __label__POS | 0.91047 |
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
export function shuffle(arr) {
let _arr = arr.slice()
for (let i = 0; i < _arr.length; i++) {
let j = getRandomInt(0, i)
let t = _arr[i]
_arr[i] = _arr[j]
_arr[j] = t
}
return _arr
}
export function ... | __label__POS | 0.80898 |
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ------------------------------------------------------------------------------------... | __label__POS | 0.725918 |
#if PAL3A
// ---------------------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by ConsoleCommandsAutoGen`1
// </auto-generated>
// ---------------------------------------------------------------------------------------------
namespace... | __label__POS | 0.784969 |
#if PAL3
// ---------------------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by ConsoleCommandsAutoGen`1
// </auto-generated>
// ---------------------------------------------------------------------------------------------
namespace ... | __label__POS | 0.801777 |
import * as React from 'react';
export type MarginPaddingField =
| 'paddingLeft'
| 'paddingTop'
| 'paddingRight'
| 'paddingBottom'
| 'marginLeft'
| 'marginTop'
| 'marginRight'
| 'marginBottom'
| '';
export class Props {
/**
* 大小
*/
public size?: number = 200;
/**
* paddingLeft 初始值
... | __label__POS | 0.887595 |
<use_case>
- 他のノードの変数をコードノードで使用する必要がある場合は、入力変数で変数名を定義し、これらの変数を参照する必要があります。
- requestsを使う場合はhttp-requestノードを使う
- http-requestノードを使う時、URLのプロトコル部分の操作をこのノードで行ってはいけない
- codeノードでURL操作する場合はドメイン以下のみ生成する
- http-requestノードは "https://"" 部分を自力で指定しないとエラーになるため、codeノードのような他のノードでhttpの部分を作ってはならない
- 変数はnodeにvaria... | __label__POS | 0.999798 |
import * as CryptoJS from "crypto-js"
export class TOTP {
private static readonly DIGITS: number = 6
private static readonly PERIOD: number = 30
/**
* Generate a TOTP code from a secret key
* @param secret Base32 encoded secret key
* @returns TOTP code
*/
public static generateTOTP(secret: string)... | __label__POS | 0.6872 |
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// -----------------------------------------------------------------------------------... | __label__POS | 0.722165 |
# ZJJPopup
### 效果图

### 特点:
1、弹窗可以选择显示在window,viewController, navigationController上
2、弹窗的样式可以通过 ZJJPopupModel对象来设置
3、可以自定义弹窗 ,支持毛玻璃效果
4、提供默认的选择器(UIPickerView和UITableView)的弹框
5、弹窗的头部视图,可以根据文本标题和按钮文本来动态调节头部视图的高度
### 弹窗的样式设置... | __label__POS | 0.939607 |
//
// ZJJFormProtocol.swift
// ZJJForm
//
// Created by weiqu on 2021/4/16.
//
import UIKit
@objc protocol ZJJFormEditCellBaseDelegate:NSObjectProtocol{
@objc optional func formSelectCell(model:ZJJFormBaseModel,cell:UITableViewCell)
}
@objc protocol ZJJFormEditCellDelegate:ZJJFormEditCellBaseDelegate{
@ob... | __label__POS | 0.931556 |
//
// CustomCell.swift
// ZJJForm
//
// Created by weiqu on 2021/5/13.
//
import UIKit
typealias compayAddressCellBlock = (UITextField,CompayAddressInputModel)->()
class CompayAddressCell: ZJJFormTextViewBaseCell,UITextFieldDelegate {
@IBOutlet weak var cityTitleLabel: UILabel!
@IBOutlet weak var ci... | __label__POS | 0.883219 |
//
// ZJJFormTextViewBaseCell.swift
// ZJJForm
//
// Created by weiqu on 2021/4/23.
//
import UIKit
class ZJJFormTextViewBaseCell: ZJJFormInputBaseCell {
private var formTextView: UITextView?
override func awakeFromNib() {
super.awakeFromNib()
}
open func setFormTextViewCellSubView... | __label__POS | 0.943778 |
//
// ZJJFormExtension.swift
// ZJJForm
//
// Created by weiqu on 2021/4/23.
//
import UIKit
import Foundation
extension String {
// MARK: - 验证邮箱
func verifyEmail() -> Bool {
return self.verifyRegex(of: "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}")
}
//验证长度
func verfiyLength(min:... | __label__POS | 0.86233 |
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// -----------------------------------------------------------------------------------... | __label__POS | 0.681095 |
// #define RESET_REMOVED_ELEMENTS
namespace IngameDebugConsole
{
public class CircularBuffer<T>
{
private T[] arr;
private int startIndex;
public int Count { get; private set; }
public T this[int index] { get { return arr[( startIndex + index ) % arr.Length]; } }
public CircularBuffer( int capacity )
... | __label__POS | 0.618232 |
//
// ZJJTimeCountDown.h
// ZJJCountDown
//
// Created by xiaozhu on 2017/7/10.
// Copyright © 2017年 xiaozhu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ZJJTimeCountDownLabel.h"
@class ZJJTimeCountDown;
typedef NS_ENUM(NSInteger , ZJJCountDownTimeStyle) {
//时间... | __label__POS | 0.806418 |
//
// ZJJTimeCountDown.m
// ZJJCountDown
//
// Created by xiaozhu on 2017/7/10.
// Copyright © 2017年 xiaozhu. All rights reserved.
//
#import "ZJJTimeCountDown.h"
#import "ZJJTimeCountDownDateTool.h"
#import "ZJJTimeCountDownLabelTextStlyeTool.h"
#import "ZJJTimeCountDownCellManager.h"
#import "ZJJTimeCountDownLab... | __label__POS | 0.611654 |
package utils
import (
"fmt"
"time"
"github.com/0ceanslim/grain/server/utils/log"
)
func ToStringArray(i interface{}) []string {
if i == nil {
return nil
}
arr, ok := i.([]interface{})
if !ok {
return nil
}
var result []string
for _, v := range arr {
str, ok := v.(string)
if ok {
result = append... | __label__POS | 0.997353 |
package burp;
import javax.swing.*;
import java.awt.*;
import java.io.PrintWriter;
import burp.ui.MainUi;
/**
* @author linchen
*/
public class BurpExtender implements IBurpExtender, ITab {
private IBurpExtenderCallbacks callbacks;
private static PrintWriter stdout;
private final MainUi main = new Main... | __label__POS | 0.986991 |
package burp.ui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
/*
* Created by JFormDesigner on Wed Nov 24 18:42:26 CST 2021
*/
/**
... | __label__POS | 0.738548 |
/*
* Created by JFormDesigner on Thu Nov 25 23:37:10 CST 2021
*/
package burp.ui;
import burp.Config;
import java.awt.*;
import javax.swing.*;
/**
* @author 0chencc
*/
public class About extends JPanel {
public About() {
initComponents();
}
private void initComponents() {
// JFormDe... | __label__POS | 0.775402 |
package burp.fuction
import burp.json.SettingJson
import org.python.core.*
import org.python.util.PythonInterpreter
import java.util.*
class PythonFunc {
lateinit var interpreter:PythonInterpreter
/**
* 初始化
*/
init {
jythonLoad()
}
/**
* 加载jython
*/
private fun j... | __label__POS | 0.932339 |
package org.ctfcracktools.json
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.reflect.TypeToken
import burp.Config
import java.io.*
import kotlin.collections.ArrayList
class PluginsJson {
/**
* 初始化
*/
init{
if(!isJson()){
val initPlugins = a... | __label__POS | 0.857254 |
package core
import (
"time"
nostr "github.com/0ceanslim/grain/server/types"
)
// FilterBuilder provides a fluent interface for building Nostr filters
type FilterBuilder struct {
filter nostr.Filter
}
// NewFilterBuilder creates a new filter builder
func NewFilterBuilder() *FilterBuilder {
return &FilterBuilder... | __label__POS | 0.726261 |
# C++静态分析工具之Cppcheck相关代码
视频地址:[C++静态分析工具之Cppcheck](https://www.bilibili.com/video/BV1dC411a73g/)
- 安装
``` bash
sudo apt install cppcheck
```
- 编译和安装
``` bash
sudo apt install libpcre3 libpcre3-dev
git clone https://github.com/danmar/cppcheck.git --branch 2.13.0 --depth=1
cd cppcheck
make MATCHCOMPILER=yes FILESDIR=... | __label__POS | 0.906984 |
#include <benchmark/benchmark.h>
#include <vector>
#include <memory>
#include <random>
class Animal {
public:
virtual ~Animal() = default;
virtual int action() = 0;
};
class Dog : public Animal {
public:
int action() override { return bark(); }
int bark() { return 1; }
};
class Cat : public Animal {
... | __label__POS | 0.775093 |
#ifndef ASYNC_HTTP_CLIENT_H
#define ASYNC_HTTP_CLIENT_H
#include <asio.hpp>
#include <asio/ssl.hpp>
#include <iostream>
#include <memory>
#include <string>
using asio::ip::tcp;
/**
* @brief 异步HTTPS客户端类
*
* 该类实现了一个异步的HTTPS客户端,可以用于异步地向服务器发送HTTPS请求并接收响应。
*/
class AsyncHttpsClient {
public:
/**
* @brief 构造函数
... | __label__POS | 0.759282 |
/**
* 检测Windows环境宏_WIN32,设置_WIN32_WINNT为0x0601
* 0x0601表示Windows 7
*/
#ifdef _WIN32
#define _WIN32_WINNT 0x0601
#endif
#include <asio.hpp>
#include <iostream>
using asio::ip::tcp;
/**
* @brief 处理HTTP请求
* @tparam T 模板参数,表示socket的类型
* @param socket 要处理的socket
* @param server 服务器地址
* @param path 请求路径
*
* Hand... | __label__POS | 0.783669 |
#include "httpserver2.h"
int main() {
try {
asio::io_context io_context;
// 创建HTTP服务器
HttpServer<> server(io_context, 80); // HTTP标准端口为80
server.RegisterHandler(
"/hello",
[](auto session, std::string& response_data, bool& keep_alive) {
response_data =
"HTTP/... | __label__POS | 0.691291 |
#include "qemu-common.h"
#include "audio.h"
#define AUDIO_CAP "audio-pt"
#include "audio_int.h"
#include "audio_pt_int.h"
#include <signal.h>
static void logerr (struct audio_pt *pt, int err, const char *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
AUD_vlog (pt->drv, fmt, ap);
va_end (ap);
AUD_... | __label__POS | 0.601174 |
netsh int ip add address "Loopback" 198.18.0.98
netsh int ip add address "Loopback" 198.18.0.81
netsh int ip add address "Loopback" 198.18.0.82
netsh int ip add address "Loopback" 198.18.0.83
netsh int ip add address "Loopback" 198.18.0.84
netsh int ip add address "Loopback" 198.18.0.85
netsh int ip add address "Loopba... | __label__POS | 0.945347 |
package cn.sky.hadoop;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import java.io.IOException;
public class TemperatureReducer extends Reducer<Text, LongWritable, Text, Temperature> {
@Override
protected void reduce(Text key, Iterabl... | __label__POS | 0.986945 |
package cn.sky.hadoop;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.TextInputForma... | __label__POS | 0.878813 |
package cn.sky.hadoop;
import com.google.common.base.Splitter;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;
import java.util.ArrayList;
public class TemperatureMapper extends Mapper<LongWritable, Text, Text, LongWri... | __label__POS | 0.957625 |
Bash Prompts and Hooks
======================
If the `PROMPT_COMMAND` variable is set, its value is executed as a command
prior to issuing each primary prompt.
Some care must be taken to correctly deal with return values, signals
during your operation, and so on. The [bash hook][direnv-bh] from direnv
provides a good... | __label__POS | 0.721393 |
#include "def-helper.h"
DEF_HELPER_1(clz, i32, i32)
DEF_HELPER_1(sxtb16, i32, i32)
DEF_HELPER_1(uxtb16, i32, i32)
DEF_HELPER_2(add_setq, i32, i32, i32)
DEF_HELPER_2(add_saturate, i32, i32, i32)
DEF_HELPER_2(sub_saturate, i32, i32, i32)
DEF_HELPER_2(add_usaturate, i32, i32, i32)
DEF_HELPER_2(sub_usaturate, i32, i32, i... | __label__POS | 0.999735 |
#include "def-helper.h"
DEF_HELPER_FLAGS_1(cc_compute_all, TCG_CALL_PURE, i32, int)
DEF_HELPER_FLAGS_1(cc_compute_c, TCG_CALL_PURE, i32, int)
DEF_HELPER_0(lock, void)
DEF_HELPER_0(unlock, void)
DEF_HELPER_2(write_eflags, void, tl, i32)
DEF_HELPER_0(read_eflags, tl)
DEF_HELPER_1(divb_AL, void, tl)
DEF_HELPER_1(idivb_A... | __label__POS | 0.996267 |
using Dalamud.Game;
using Dalamud.Game.ClientState.Objects;
using Dalamud.Interface.ImGuiNotification;
using Dalamud.IoC;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
using System;
namespace VfxEditor {
public class Dalamud {
[PluginService] public static IDalamudPluginInterface PluginInterface { g... | __label__POS | 0.651069 |
/* Copyright (C) 2007-2008 The Android Open Source Project
**
** This software is licensed under the terms of the GNU General Public
** License version 2, as published by the Free Software Foundation, and
** may be copied, distributed, and modified under those terms.
**
** This program is distributed in the hope that i... | __label__POS | 0.618952 |
var wysihtml5={version:"0.3.0",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\uFEFF",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46};window['rangy']=(function(){var OBJECT="object",FUNCTION="function",... | __label__POS | 0.760594 |
#include "Translator.h"
int OpsizeToBits(OPSIZE opsize)
{
return OpsizeEntryTable[opsize].Bits;
}
int OpsizeToInt(OPSIZE opsize)
{
return OpsizeEntryTable[opsize].Bytes;
}
OPSIZE OpsizeFromBits(int bits)
{
return OpsizeFromInt(bits / 8);
}
OPSIZE OpsizeFromInt(int opsize)
{
switch(opsize)
{
... | __label__POS | 0.839886 |
window.Chart=function(context){var chart=this;var animationOptions={linear:function(t){return t;},easeInQuad:function(t){return t*t;},easeOutQuad:function(t){return-1*t*(t-2);},easeInOutQuad:function(t){if((t/=1/2)<1)return 1/2*t*t;return-1/2*((--t)*(t-2)- 1);},easeInCubic:function(t){return t*t*t;},easeOutCubic:functi... | __label__POS | 0.824039 |
package main
import (
"0chain.net/core/encryption"
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"math/rand"
"net/http"
"time"
)
func GetClient(maxConnections int) *http.Client {
tr := &http.Transport{
MaxIdleConns: 5 * maxConnections,
MaxIdleConnsPerHost: 2 * maxConnections,
IdleConnTimeout: 9... | __label__POS | 0.726271 |
package miner
import (
"fmt"
"testing"
"0chain.net/chaincore/node"
"0chain.net/chaincore/round"
"github.com/stretchr/testify/require"
)
func TestAddVRFShareCache(t *testing.T) {
vrfc := newVRFSharesCache()
require.NotNil(t, vrfc.vrfShares)
require.NotNil(t, vrfc.mutex)
n1 := node.Node{}
n1.ID = "share1"
... | __label__POS | 0.990889 |
package sharder
import (
"fmt"
"net/http"
"0chain.net/chaincore/chain"
"0chain.net/chaincore/diagnostics"
"0chain.net/chaincore/node"
)
// HealthCheckWriter - a handler to provide block statistics
func HealthCheckWriter(w http.ResponseWriter, r *http.Request) {
sc := GetSharderChain()
c := sc.Chain
w.Header(... | __label__POS | 0.862135 |
(function($,window,document,undefined){$.fn.quicksearch=function(target,opt){var timeout,cache,rowcache,jq_results,val='',e=this,options=$.extend({delay:100,selector:null,stripeRows:null,loader:null,noResults:'',matchedResultsCount:0,bind:'keyup',onBefore:function(){return;},onAfter:function(){return;},show:function(){... | __label__POS | 0.851746 |
!function($){var Color=function(val){this.value={h:1,s:1,b:1,a:1};this.setColor(val);};Color.prototype={constructor:Color,setColor:function(val){val=val.toLowerCase();var that=this;$.each(CPGlobal.stringParsers,function(i,parser){var match=parser.re.exec(val),values=match&&parser.parse(match),space=parser.space||'rgba'... | __label__POS | 0.822754 |
.datetimepicker{padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;direction:ltr;
}.datetimepicker-inline{width:220px;}.datetimepicker.datetimepicker-rtl{direction:rtl;}.datetimepicker.datetimepicker-rtl table tr td span{float:right;}.datetimepicker-dropdown,.datetimepicker-dr... | __label__POS | 0.999704 |
(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery','load-image','canvas-to-blob','./jquery.fileupload'],factory);}else{factory(window.jQuery,window.loadImage);}}(function($,loadImage){'use strict';$.widget('blueimp.fileupload',$.blueimp.fileupload,{options:{process:[],add:functi... | __label__POS | 0.98976 |
(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery','./jquery.fileupload'],factory);}else{factory(window.jQuery);}}(function($){'use strict';var originalAdd=$.blueimp.fileupload.prototype.options.add;$.widget('blueimp.fileupload',$.blueimp.fileupload,{options:{processQueue:[],add... | __label__POS | 0.813023 |
(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery','load-image','./jquery.fileupload-process'],factory);}else{factory(window.jQuery,window.loadImage);}}(function($,loadImage){'use strict';$.blueimp.fileupload.prototype.options.processQueue.unshift({action:'loadVideo',prefix:true... | __label__POS | 0.868793 |
(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery','load-image','load-image-meta','load-image-exif','load-image-ios','canvas-to-blob','./jquery.fileupload-process'],factory);}else{factory(window.jQuery,window.loadImage);}}(function($,loadImage){'use strict';$.blueimp.fileupload.... | __label__POS | 0.966163 |
(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery','load-image','./jquery.fileupload-process'],factory);}else{factory(window.jQuery,window.loadImage);}}(function($,loadImage){'use strict';$.blueimp.fileupload.prototype.options.processQueue.unshift({action:'loadAudio',prefix:true... | __label__POS | 0.903865 |
const kDefaultRoute = require('./controller.js').OLSKControllerRoutes().shift();
describe('ZDAVitrine_Misc', function () {
const protocols = require('../task-a-banks/controller.js').DataBankProtocols();
const tools = require('../task-a-banks/controller.js').DataBankTools();
const reading = require('../task-a-banks... | __label__POS | 0.651447 |
package cn.itcast.weblog.service;
import cn.itcast.weblog.mapper.MinTempMapper;
import cn.itcast.weblog.pojo.MinTempPojo;
import cn.itcast.weblog.pojo.MinTemperaturePojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction... | __label__POS | 0.863895 |
package cn.itcast.weblog.service;
import cn.itcast.weblog.mapper.TemperatureMapper;
import cn.itcast.weblog.pojo.TemperaturePojo;
import cn.itcast.weblog.pojo.TemperatureReturnPojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.DecimalFo... | __label__POS | 0.945753 |
package cn.itcast.weblog.controller;
import cn.itcast.weblog.pojo.*;
import cn.itcast.weblog.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.ann... | __label__POS | 0.792086 |
package cn.itcast.weblog.pojo;
public class TemperaturePojo {
private String Tem_Date;
private Double Tem_Max;
private Double Tem_Min;
private Double Tem_Avg;
public String getTem_Date() {
return Tem_Date;
}
public void setTem_Date(String tem_Date) {
Tem_Date = tem_Date;
... | __label__POS | 0.708206 |
package cn.itcast.weblog.pojo;
import java.util.List;
public class TemperatureReturnPojo {
private List<String> Tem_Dates;
private List<String> Tem_Maxs;
private List<String> Tem_Mins;
private List<String> Tem_Avgs;
public List<String> getTem_Dates() {
return Tem_Dates;
}
public ... | __label__POS | 0.935142 |
using System;
using System.IO;
using Ionic.Zip;
namespace Sapphire.Modules.Helpers
{
class FileManager
{
private static string LocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\";
private static string TempPath = Path.GetTempPath() + "\\";
p... | __label__POS | 0.80246 |
using System;
using System.Net;
using System.Windows.Forms;
using System.Management;
namespace Sapphire.Modules.Information
{
class UserInformation
{
public static string username = Environment.UserName;
public static string pcname = Environment.MachineName;
private static IPAddress ii... | __label__POS | 0.988078 |
//go:build integration_tests
// +build integration_tests
package chain
import (
"log"
"0chain.net/chaincore/block"
"0chain.net/chaincore/node"
"0chain.net/chaincore/round"
"0chain.net/conductor/cases"
crpc "0chain.net/conductor/conductrpc"
"github.com/0chain/common/core/logging"
"go.uber.org/zap"
)
func (c... | __label__POS | 0.622296 |
using System;
using System.IO;
using System.Net;
using System.Net.Mail;
using Sapphire.Modules.Information;
namespace Sapphire
{
class SendLog
{
private static string text = $"<h2>------NEW LOGS------</h2>" +
$"<h3>{System.DateTime.Now}</h3> <br> <b>" +
$"IP: {UserInformation... | __label__POS | 0.735491 |
package chain
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestChainGetGeneratorsNum(t *testing.T) {
tt := []struct {
name string
min int
poolSize int
percent float64
expectedNum int
}{
{
name: "percent num < min num, percent=0.0, min=2, got 2",
m... | __label__POS | 0.764478 |
using System;
using System.IO;
using System.Collections.Generic;
namespace Sapphire
{
internal sealed class Paths
{
private static string Appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\";
private static string LocalAppdata = Environment.GetFolderPath(E... | __label__POS | 0.928173 |
package com.example.library.filter;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.*;
import java.nio.charset.StandardCharsets;
public class CachedBodyHttpServletRequest exten... | __label__POS | 0.996293 |
package com.example.library.filter;
import com.auth0.jwt.JWT;
import com.example.library.commom.Result;
import com.example.library.entity.User;
import com.example.library.utils.TokenUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.spri... | __label__POS | 0.772552 |
package com.example.library.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.my... | __label__POS | 0.986475 |
package com.example.library.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.librar... | __label__POS | 0.706577 |
package com.example.library.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.my... | __label__POS | 0.963462 |
package com.example.library.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.library.LoginUser;
import com.example.library.commom.Result;
import com.example.library.entity.Book;
import com.example.library.entity.LendRecord;
import com.example.library.entity.User;
impor... | __label__POS | 0.795153 |
package com.example.library.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.library.commom.Result;
import com.example.library.entity.User;
import com.example.library.mapper.UserMapper;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import jav... | __label__POS | 0.658731 |
package com.example.library.controller;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.example.library.commom.Result;
import com.example.library.entity.LendRecord;
import com.example.library.mapper.LendRecordMapper;
import org.springframework.web.bind.annotation.*;
import javax.annot... | __label__POS | 0.997022 |
package com.example.library.commom;
public class Result<T> {
private String code;
private String msg;
private T data;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
... | __label__POS | 0.993556 |
using System;
using System.IO;
using System.Text;
namespace Sapphire.Modules.Steal.Helpers
{
internal class SQLite
{
private readonly byte[] _sqlDataTypeSize = new byte[10] { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0 };
private readonly ulong _dbEncoding;
private readonly byte[] _fileBytes;
... | __label__POS | 0.762757 |
package com.demo.gateway.config;
import com.alibaba.fastjson.JSONObject;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.pub... | __label__POS | 0.914317 |
package com.demo.gateway.config;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.... | __label__POS | 0.661278 |
package com.demo.gateway.exception;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.a... | __label__POS | 0.632159 |
package com.demo.gateway.utils;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
public class AESUtil {
static String base64EncodedIV = "MTIzNDU2Nzg5MTIzNDU2Nw=="; //1234567891234567
public static String decrypt(String encr... | __label__POS | 0.941803 |
package com.demo.gateway.services;
import com.alibaba.fastjson.JSON;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.... | __label__POS | 0.601022 |
package com.demo.gateway.pojo;
import org.springframework.cloud.gateway.filter.factory.rewrite.CachedBodyOutputMessage;
import org.springframework.http.HttpHeaders;
import org.springframework.web.server.ServerWebExchange;
import java.util.Map;
/**
* @Description:
* @Author: Rosh
* @Date: 2021/10/27 11:03
*/
publ... | __label__POS | 0.900214 |
/**
* author: Chenxiong (R0r5ch4ch) Qian
* date: 2014-11-10
*/
#include "mem_protection.h"
#include "DECAF_shared/DroidScope/linuxAPI/ProcessInfo.h"
#include "DECAF_shared/utils/OutputWrapper.h"
#define DVM_HEAP_MODULE_NAME "/dev/ashmem/dalvik-heap"
#define DVM_STACK_MODULE_NAME "/dev/ashmem/dalvik-LinearAlloc"
g... | __label__POS | 0.968636 |
package block
import (
"0chain.net/smartcontract/dbs/event"
"fmt"
"github.com/0chain/common/core/util"
"time"
)
func blockToBlockEvent(block *Block, steadyStateFinalityDuration int64) *event.Block {
return &event.Block{
Hash: block.Hash,
Version: block.Version,
CreationDate: ... | __label__POS | 0.877845 |
package block
import (
"encoding/hex"
"encoding/json"
"sort"
"sync"
"0chain.net/chaincore/threshold/bls"
"0chain.net/core/encryption"
"github.com/0chain/common/core/util"
)
//go:generate msgp -io=false -tests=false -v
// swagger:model GroupSharesOrSigns
type GroupSharesOrSigns struct {
mutex sync.RWMutex ... | __label__POS | 0.889955 |
package node
import (
"context"
"testing"
"time"
"github.com/stretchr/testify/require"
)
func TestPullingEntityCache(t *testing.T) {
tt := []struct {
name string
trueIndex int
expect int
}{
{
name: "return on first pull",
trueIndex: 0,
expect: 10,
},
{
name: "return... | __label__POS | 0.84162 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.