Reaction($bookId: ID, $username: String, $reactionBody: String, $rating: Int) {
    addReaction(bookID: $bookId, username: $username, reactionBody: $reactionBody, rating: $rating) {
      _id
      bookName
      bookAuthor
      reactions {
        reactionId
        reactionBody
        username
        rating
        createdAt
      }
    }
  }
  `const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;

// Middleware
app.use(express.json());

//Routes
app.get('/', (req, res) => {
  res.json({
    message: 'Hello from Docker CI/CD Pipeline!',
    timestamp: new Date().toISOString(),
    version: '1.0.0',
    environment: process.env.NODE_ENV || 'development'
  });
});

app.get('/health', (req, res) => {
  res.status(200).json({
    status: 'OK',
    uptime: process.uptime(),
    timestamp: new Date().toISOString()
  });
});

app.post('/api/calculate', (req, res) => {
  const { operation, a, b } = req.body;

  if (!operation || a === undefined || b === undefined) {
    return res.status(400).json({ error: 'Missing required fields: operation, a, b' });
  }

  let result;
  switch (operation) {
    case 'add':
      result = a + b;
      break;
    case 'subtract':
      result = a - b;
      break;
    case 'multiply':
      result = a * b;
      break;
    case 'divide':
      result = b !== 0 ? a / b : 'Cannot divide by zero';
      break;
    default:
      return res.status(400).json({ error: 'Invalid operation' });
  }

  res.json({ operation, a, b, result });
});

// Start server
if (require.main === module) {
  app.listen(PORT, () => {
    console.log(`🚀 Server running on port ${PORT}`);
    console.log(`📊 Health check: http://localhost:${PORT}/health`);
  });
}

module.exports = app;
const request = require('supertest');
const app = require('./server');

describe('Docker Demo App', () => {
  test('GET / should return welcome message', async () => {
    const response = await request(app).get('/');
    expect(response.status).toBe(200);
    expect(response.body.message).toBe('Hello from Docker CI/CD Pipeline!');
    expect(response.body.version).toBe('1.0.0');
  });

  test('GET /health should return health status', async () => {
    const response = await request(app).get('/health');
    expect(response.status).toBe(200);
    expect(response.body.status).toBe('OK');
    expect(response.body).toHaveProperty('uptime');
  });

  test('POST /api/calculate should perform addition', async () => {
    const response = await request(app)
      .post('/api/calculate')
      .send({ operation: 'add', a: 5, b: 3 });

    expect(response.status).toBe(200);
    expect(response.body.result).toBe(8);
  });

  test('POST /api/calculate should handle division by zero', async () => {
    const response = await request(app)
      .post('/api/calculate')
      .send({ operation: 'divide', a: 10, b: 0 });

    expect(response.status).toBe(200);
    expect(response.body.result).toBe('Cannot divide by zero');
  });

  test('POST /api/calcu


        }

        static void Main(string[] args)
        {
            Socket listen_sock = null;
            try
            {
                // 소켓 생성
                listen_sock = new Socket(AddressFamily.InterNetwork,
                    SocketType.Stream, ProtocolType.Tcp);

                // Bind()
                listen_sock.Bind(new IPEndPoint(IPAddress.Any, SERVERPORT));

                // Listen()
                listen_sock.Listen(Int32.MaxValue);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Environment.Exit(1);
            }

            // 데이터 통신에 사용할 변수
            Socket client_sock = null;
            Thread hThread;

            while (true)
            {
                try
                {
                    // accept()
                    client_sock = listen_sock.Accept();

                    // 접속한 클라이언트 정보 출력
                    IPEndPoint clientaddr = (IPEndPoint)client_sock.RemoteEndPoint;
                    Console.WriteLine(
                        "\n[TCP 서버] 클라이언트 접속: IP 주소={0}, 포트 번호={1}",
                        clientaddr.Address, clientaddr.Port);

                    // 스레드 생성
                    hThread = new Thread(ProcessClient);
                    hThread.Start(client_sock);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    break;
                }
            }

            // 소켓 닫기
            listen_sock.Close();
        }
    }
}


root.t_dark .t_light .t_dark .t_light .t_orange_active_Progress, :root .t_sub_theme .t_light .t_orange_active_Progress, :root.t_light .t_sub_theme .t_light .t_orange_active_Progress, :root .t_sub_theme .t_light .t_sub_theme .t_light .t_orange_active_Progress, :root.t_light .t_orange_active_TooltipArrow, :root.t_dark .t_light .t_orange_active_TooltipArrow, :root.t_light .t_dark .t_light .t_orange_active_TooltipArrow, :root.t_dark .t_light .t_dark .t_light .t_orange_active_TooltipArrow, :root .t_sub_theme .t_light .t_orange_active_TooltipArrow, :root.t_light .t_sub_theme .t_light .t_orange_active_TooltipArrow, :root .t_sub_theme .t_light .t_sub_theme .t_light .t_orange_active_TooltipArrow {--background:hsl(25, 100%, 82.8%);--backgroundHover:hsl(24, 94.5%, 64.3%);--backgroundPress:hsl(24, 94.0%, 50.0%);--backgroundFocus:hsl(25, 100%, 82.8%);--backgroundStrong:hsl(25, 100%, 88.2%);--backgroundTransparent:hsl(25, 100%, 92.2%);--colorHover:hsl(24, 94.0%, 50.0%);--colorPress:hsl(24, 100%, 46.5%);--colorFocus:hsl(24, 94.0%, 50.0%);--colorTransparent:hsl(24, 100%, 46.5%);--borderColor:hsl(24, 94.0%, 50.0%);--borderColorHover:hsl(24, 100%, 46.5%);--borderColorPress:hsl(24, 94.0%, 50.0%);--borderColorFocus:hsl(24, 94.0%, 50.0%);--placeholderColor:hsl(25, 100%, 88.2%);}
@media(prefers-color-scheme:light){
  body{background:var(--background);}
  .t_light_orange_active_Card, .t_light_orange_active_DrawerFrame, .t_light_orange_active_Progress, .t_light_orange_active_TooltipArrow, .t_orange_active_Card, .t_dark .t_light .t_orange_active_Card, .t_sub_theme .t_light .t_orange_active_Card, .t_sub_theme .t_light .t_orange_active_Card, .t_sub_theme .t_light .t_sub_theme .t_light .t_orange_active_Card, .t_orange_active_DrawerFrame, .t_dark .t_light .t_orange_active_DrawerFrame, .t_sub_theme .t_light .t_orange_active_DrawerFrame, .t_sub_theme .t_light .t_orange_active_DrawerFrame, .t_sub_theme .t_light .t_sub_theme .t_light .t_orange_active_DrawerFrame, .t_orange_active_Progress, .t_dark .t_light .t_orange_active_Progress, .t_sub_theme .t_light .t_orange_active_Progress, .t_sub_theme .t_light .t_orange_active_Progress, .t_sub_theme .t_light .t_sub_theme .t_light .t_orange_active_Progress, .t_orange_active_TooltipArrow, .t_dark .t_light .t_orange_active_TooltipArrow, .t_sub_theme .t_light .t_orange_active_TooltipArrow, .t_sub_theme .t_light .t_orange_active_TooltipArrow, .t_sub_theme .t_light .t_sub_theme .t_light .t_orange_activ


ate.Snapped)
            {
                MainPage.Current.OnHandwritingSettings();
            }
        }

        private async void ExportDictionaryButtonClick(object sender, RoutedEventArgs e)
        {
            var fileSavePicker = new FileSavePicker();
            fileSavePicker.FileTypeChoices.Add(".txt", new List<string> { ".txt" });
            fileSavePicker.SettingsIdentifier = "picker1";

            var fileToSave = await fileSavePicker.PickSaveFileAsync();
            if (fileToSave == null) return;
            WritePadAPI.exportUserDictionary(fileToSave.Path);
        }

        private async void ImportDictionaryButtonClick(object sender, RoutedEventArgs e)
        {
            var filePicker = new FileOpenPicker();
            filePicker.FileTypeFilter.Add(".txt");
            filePicker.ViewMode = PickerViewMode.Thumbnail;
            filePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
            filePicker.SettingsIdentifier = "picker1";
            filePicker.CommitButtonText = "Import user dictionary";

            var files = await filePicker.PickSingleFileAsync();
            if (files == null) return;
            WritePadAPI.importUserDictionary(files.Path);
        }

        private async void ExportWordLisButtonClick(object sender, RoutedEventArgs e)
        {
            var fileSavePicker = new FileSavePicker();
            fileSavePicker.FileTypeChoices.Add(".csv", new List<string> { ".csv" });
            fileSavePicker.SettingsIdentifier = "picker1";

            var fileToSave = await fileSavePicker.PickSaveFileAsync();
            if (fileToSave == null) return;
            WritePadAPI.exportAutocorrectorDictionary(fileToSave.Path);
        }

        private async void ImportWordListButtonClick(object sender, RoutedEventArgs e)
        {
            var filePicker = new FileOpenPicker();
            filePicker.FileTypeFilter.Add(".csv");
            filePicker.ViewMode = PickerViewMode.Thumbnail;
            filePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
            filePicker.SettingsIdentifier = "picker1";
            filePicker.CommitButtonText = "Import autocorrector";

            var file = await filePicker.PickSingleFileAsync();
            if (file == null) return;
            WritePadAPI.importUserDictionary(file.Path);
        }

        private void ResetUserDictionaryButtonClick(object sender, RoutedEventArgs e)
        {
            WritePadAPI.resetRecognizerDataOfType(WritePadAPI.USERDATA_DICTIONARY);
        }

        private void ResetAutocorrectorListButtonClick(object sender, RoutedEventArgs e)
        {
            WritePadAPI.resetRecognizerDataOfType(WritePadAPI.USERDATA_AUTOCORRECTOR);
        }
    }
}


alytics.com/glossary/mean-average-precision-map) of YOLOv5s-seg on the COCO dataset:

```bash
# Download COCO validation segments split (780MB, 5000 images)
bash data/scripts/get_coco.sh --val --segments

# Validate the model
python segment/val.py --weights yolov5s-seg.pt --data coco.yaml --img 640
```

### Predict

Use the pretrained YOLOv5m-seg.pt model to perform segmentation on `bus.jpg`:

```bash
# Run prediction
python segment/predict.py --weights yolov5m-seg.pt --source data/images/bus.jpg
```

```python
# Load model from PyTorch Hub (Note: Inference support might vary)
model = torch.hub.load("ultralytics/yolov5", "custom", "yolov5m-seg.pt")
```

| ![Zidane Segmentation Example](https://user-images.githubusercontent.com/26833433/203113421-decef4c4-183d-4a0a-a6c2-6435b33bc5d3.jpg) | ![Bus Segmentation Example](https://user-images.githubusercontent.com/26833433/203113416-11fe0025-69f7-4874-a0a6-65d0bfe2999a.jpg) |
| :-----------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: |

### Export

Export the YOLOv5s-seg model to ONNX and TensorRT formats:

```bash
# Export model
python export.py --weights yolov5s-seg.pt --include onnx engine --img 640 --device 0
```

## 🏷 Classification

YOLOv5 [release v6.2](https://github.com/ultralytics/yolov5/releases/v6.2) introduced support for [image classification](https://docs.ultralytics.com/tasks/classify/) model training, validation, and deployment. Check the [Release Notes](https://github.com/ultralytics/yolov5/releases/v6.2) for details and the [YOLOv5 Classification Colab Notebook](https://github.com/ultralytics/yolov5/blob/master/classify/tutorial.ipynb) for quickstart guides.

  Classification Checkpoints

YOLOv5-cls classification models were trained on [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/) for 90 epochs using a 4xA100 instance. [ResNet](https://arxiv.org/abs/1512.03385) and [EfficientNet](https://arxiv.org/abs/1905.11946) models were trained alongside under identical settings for comparison. Models were exported to [ONNX](https://onnx.ai/) FP32 (CPU speed tests) and [TensorRT](https://developer.nvidia.com/tensorrt) FP16 (GPU speed tests). All speed tests were run on Google [Colab Pro](https://colab.research.google.com/signup) for reproducibility.

| Model                                                                                | Size
(pixels) | Acc
top1 | Acc
top5 | Training
90 epochs
4xA100 (hours) | Speed
ONNX CPU
(ms) | Speed
TensorRT V100
(ms) | Params
(M) | FLOPs
@224 (B) |
| -------------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | -------------------------------------------- | ------------------------------ | ----------------------------------- | ------------------ | ---------------------- |
| [YOLOv5n-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n-cls.pt)         | 224                   | 64.6             | 85.4             | 7:59


type:int;not null;default:0;comment:Discount Amount"`
	Coupon         string    `gorm:"type:varchar(255);default:null;comment:Coupon"`
	CouponDiscount int64     `gorm:"type:int;not null;default:0;comment:Coupon Discount Amount"`
	Commission     int64     `gorm:"type:int;not null;default:0;comment:Order Commission"`
	PaymentId      int64     `gorm:"type:bigint;not null;default:0;comment:Payment Method Id"`
	Method         string    `gorm:"type:varchar(255);not null;default:'';comment:Payment Method"`
	FeeAmount      int64     `gorm:"type:int;not null;default:0;comment:Fee Amount"`
	TradeNo        string    `gorm:"type:varchar(255);default:null;comment:Trade No"`
	Status         uint8     `gorm:"type:tinyint(1);not null;default:1;comment:Order Status: 1: Pending, 2: Paid, 3:Close, 4: Failed, 5:Finished;"`
	SubscribeId    int64     `gorm:"type:bigint;not null;default:0;comment:Subscribe Id"`
	SubscribeToken string    `gorm:"type:varchar(255);default:null;comment:Renewal Subscribe Token"`
	IsNew          bool      `gorm:"type:tinyint(1);not null;default:0;comment:Is New Order"`
	CreatedAt      time.Time `gorm:"<-:create;comment:Create Time"`
	UpdatedAt      time.Time `gorm:"comment:Update Time"`
}

type OrdersTotal struct {
	AmountTotal        int64
	NewOrderAmount     int64
	RenewalOrderAmount int64
}

func (Order) TableName() string {
	return "order"
}
package ads

import (
	"context"
	"errors"
	"fmt"

	"github.com/perfect-panel/server/pkg/cache"
	"github.com/redis/go-redis/v9"
	"gorm.io/gorm"
)

var _ Model = (*customAdsModel)(nil)
var (
	cacheAdsIdPrefix = "cache:ads:id:"
)

type (
	Model interface {
		adsModel
		customAdsLogicModel
	}
	adsModel interface {
		Insert(ctx context.Context, data *Ads) error
		FindOne(ctx context.Context, id int64) (*Ads, error)
		Update(ctx context.Context, data *Ads) error
		Delete(ctx context.Context, id int64) error
		Transaction(ctx context.Context, fn func(db *gorm.DB) error) error
	}

	customAdsModel struct {
		*defaultAdsModel
	}
	defaultAdsModel struct {
		cache.CachedConn
		table string
	}
)

func newAdsModel(db *gorm.DB, c *redis.Client) *defaultAdsModel {
	return &defaultAdsModel{
		CachedConn: cache.NewConn(db, c),
		table:      "`ads`",
	}
}

//nolint:unused
func (m *defaultAdsModel) batchGetCacheKeys(ads ...*Ads) []string {
	var keys []string
	for _, ad := range ads {
		keys = append(keys, m.getCacheKeys(ad)...)
	}
	return keys

}
func (m *defaultAdsModel) getCacheKeys(data *Ads) []string {
	if data == nil {
		return []string{}
	}
	adsIdKey := fmt.Sprintf("%s%v", cacheAdsIdPrefix, data.Id)
	cacheKeys := []string{
		adsIdKey,
	}
	return cacheKeys
}

func (m *defaultAdsModel) Insert(ctx context.Context, data *Ads) error {
	err := m.ExecCtx(ctx, func(conn *gorm.DB) error {
		return conn.Create(&data).Error
	}, m.getCacheKeys(


init(context, attrs)
    }

    private fun init(context: Context, attrs: AttributeSet?) {
        gravity = Gravity.CENTER
        mTouchSlop = ViewConfiguration.get(context).scaledTouchSlop
        mScreenHeight = context.getScreenHeight()
        mScreenWidth = context.getScreenHeight()
        mRootView = createRootView(context)

        attrs?.let {
            val layoutInflater = LayoutInflater.from(context)
            val typeArray = context.obtainStyledAttributes(attrs, R.styleable.PullToZoomBase)
            val zoomViewResId = typeArray.getResourceId(R.styleable.PullToZoomBase_zoomView, 0)
            val headViewResId = typeArray.getResourceId(R.styleable.PullToZoomBase_headView, 0)
            isParallax = typeArray.getBoolean(R.styleable.PullToZoomBase_isHeaderParallax, true)
            if (zoomViewResId > 0) {
                mZoomView = layoutInflater.inflate(zoomViewResId, null, false)
            }
            if (headViewResId > 0) {
                mHeadView = layoutInflater.inflate(headViewResId, null, false)
            }
            handleStyledAttributes(typeArray)
            typeArray.recycle()
        }
        addView(mRootView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
    }

    /**
     * 处理竖直拖动滑动监听,并记录当前拖动的状态
     */
    override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
        if (isPullToZoomEnabled() && !isHideHeader) {
            val action = event.action
            //如果是取消或者手指抬起不拦截
            if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP) {
                mIsBeingDragged = false
                return false
            }
            //如果正在拖拽，拦截
            if (action != MotionEvent.ACTION_DOWN && mIsBeingDragged) {
                return true
            }
            when (action) {

                MotionEvent.ACTION_DOWN -> {
                    if (isReadyForPullStart()) {
                        mInterceptPressedX = event.x
                        mInterceptPressedY = event.y
                        mIsBeingDragged = false
                        mTouchPressedY = event.y
                        mTouchPressedX = event.x
                    }
                }

                MotionEvent.ACTION_MOVE -> {
                    val dy: Float
                    val dx: Float
                    val currentX = event.x
                    val currentY = event.y
                    dy = currentY - mInterceptPressedY
                    dx = currentX - mInterceptPressedX
                    if (dy > mTouchSlop && (abs(dy) > abs(dx)) && isReadyForPullStart()) {
                        mInterceptPressedX = currentX
                        mInterceptPressedY = currentY
                        mIsBeingDragged = true
                    }

                }
            }
        }

        return mIsBeingDragged
    }

    override fun onTouchEvent(event: MotionEvent): Boolean {
        if (isPullToZoomEnabled() && !isHideHeader()) {
            //如果是在边缘也不拦截
            if (event.action == MotionEvent.ACTION_DOWN && event.edgeFlags != 0) {
                return false
            }
            when (event.action) {
                MotionEvent.ACTION_MOVE -> {
                    if (mIsBeingDragged) {
                        mInterceptPressedY = event.y
                        mInterceptPressedX = event.x
                        dispatchPullEvent()
                        isZooming = true
                        return true
                    }
                }


56.json)
 * [Grilled Open Faced Vegetable Pesto And Mozzarella Sandwiches](../../index/g/grilled-open-faced-vegetable-pesto-and-mozzarella-sandwiches-12486.json)
 * [Grilled Pizza With Tomato Mozzarella And Basil](../../index/g/grilled-pizza-with-tomato-mozzarella-and-basil-108292.json)
 * [Grilled Pizza With Yellow Squash Mozzarella And Lemon Thyme](../../index/g/grilled-pizza-with-yellow-squash-mozzarella-and-lemon-thyme-12649.json)
 * [Heirloom Tomato Salad With Mozzarella And Basil](../../index/h/heirloom-tomato-salad-with-mozzarella-and-basil-235735.json)
 * [Hot Slow Roasted Pork Onion And Mozzarella Sandwiches](../../index/h/hot-slow-roasted-pork-onion-and-mozzarella-sandwiches-233921.json)
 * [Marinated Mozzarella Roasted Bell Pepper And Olive Brochettes](../../index/m/marinated-mozzarella-roasted-bell-pepper-and-olive-brochettes-12362.json)
 * [Mozzarella And Prosciutto Pizza With Balsamic Onions](../../index/m/mozzarella-and-prosciutto-pizza-with-balsamic-onions-107084.json)
 * [Mozzarella And Prosciutto Sandwiches With Tapenade](../../index/m/mozzarella-and-prosciutto-sandwiches-with-tapenade-234141.json)
 * [Mozzarella Arugula And Marinated Tomatoes On Focaccia](../../index/m/mozzarella-arugula-and-marinated-tomatoes-on-focaccia-12395.json)
 * [Mozzarella Greens And Garlic Bruschetta](../../index/m/mozzarella-greens-and-garlic-bruschetta-12501.json)
 * [Mozzarella Stuffed Grilled Portobellos With Balsamic Marinade](../../index/m/mozzarella-stuffed-grilled-portobellos-with-balsamic-marinade-235325.json)
 * [Mozzarella Stuffed Pork Chops With Polenta And Tomatoes](../../index/m/mozzarella-stuffed-pork-chops-with-polenta-and-tomatoes-51261030.json)
 * [Mozzarella Tomato And Ham Layered Sandwiches](../../index/m/mozzarella-tomato-and-ham-layered-sandwiches-240046.json)
 * [Mozzarella Topped Peppers With Tomatoes And Garlic](../../index/m/mozzarella-topped-peppers-with-tomatoes-and-garlic-15564.json)
 * [Mushroom Radicchio And Smoked Mozzarella Lasagne](../../index/m/mushroom-radicchio-and-smoked-mozzarella-lasagne-13477.json)
 * [Olive And Mozzarella Orzo](../../index/o/olive-and-mozzarella-orzo-13569.json)
 * [Orecchiette With Fresh Mozzarella Grape Tomatoes And Garlic Chives](../../index/o/orecchiette-with-fresh-mozzarella-grape-tomatoes-and-garlic-chives-354335.json)
 * [Pasta Rustica With Smoked Mozzarella](../../index/p/pasta-rustica-with-smoked-mozzarella-109162.json)
 * [Pasta Salad With Mozzarella Sun Dried Tomatoes And Olives](../../index/p/pasta-salad-with-mozzarella-sun-dried-tomatoes-and-olives-103773.json)
 * [Pasta With Tomatoes And Mozzarella](../../index/p


须在 webpack 配置中，向 plugins 属性传入 new 实例

配置
webpack.config.js

const HtmlWebpackPlugin = require('html-webpack-plugin'); //通过 npm 安装
const webpack = require('webpack'); //访问内置的插件
const path = require('path');

const config = {
    entry: './path/to/my/entry/file.js',
    output: {
        filename: 'my-first-webpack.bundle.js',
        path: path.resolve(__dirname, 'dist')
    },
    module: {
        rules: [
            {
                test: /\.(js|jsx)$/,
                use: 'babel-loader'
            }
        ]
    },
    plugins: [
        new webpack.optimize.UglifyJsPlugin(),
        new HtmlWebpackPlugin({template: './src/index.html'})
    ]
};

module.exports = config;

Node API

应该在配置中传入 plugins 属性。compiler.apply 并不是推荐的使用方式

some-node-script.js

const webpack = require('webpack'); //访问 webpack 运行时(runtime)
    const configuration = require('./webpack.config.js');

    let compiler = webpack(configuration);
    compiler.apply(new webpack.ProgressPlugin());

    compiler.run(function(err, stats) {
        // ...
});

wepback 源码中隐藏有大量使用示例

            `)
        },
        {
            active: false,
            name: '6 配置(configuration)',
            content: this.sanitizer.bypassSecurityTrustHtml(`

 webpack 的配置文件，是导出一个对象的 JavaScript 文件

webpack 配置是标准的 Node.js CommonJS 模块

通过 require(...) 导入其他文件

通过 require(...) 使用 npm 的工具函数

使用 JavaScript 控制流表达式，例如 ?: 操作符

对常用值使用常量或变量

编写并执行函数来生成部分配置

不恰当的使用

在使用 webpack 命令行接口(CLI)（应该编写自己的命令行接口(CLI)，或使用 --env）时，访问命令行接口(CLI)参数

导出不确定的值（调用 webpack 两次应该产生同样的输出文件）

编写很长的配置（应该将配置拆分为多个文件）

基本配置

webpack.config.js

var path = require('path');

module.exports = {
    mode: 'development',
    entry: './foo.js',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'foo.bundle.js'
    }
};

多个 Target

多种配置类型(configuration types)

导出为一个函数

从 webpack 配置文件中导出一个函数。该函数在调用时，可传入两个参数

环境对象(environment)作为第一个参数
一个选项 map 对象（argv）作为


the same as toolchange
    if (m_config.single_extruder_multi_material) {
        m_writer.reset_e();
    }

    // We inform the writer about what is happening, but we may not use the resulting gcode.
    std::string toolchange_command = m_writer.toolchange(extruder_id);
    if (! custom_gcode_changes_tool(toolchange_gcode_parsed, m_writer.toolchange_prefix(), extruder_id))
        gcode += toolchange_command;
    else {
        // user provided his own toolchange gcode, no need to do anything
    }

    // Set the temperature if the wipe tower didn't (not needed for non-single extruder MM)
    if (m_config.single_extruder_multi_material && !m_config.enable_prime_tower) {
        int temp = (m_layer_index <= 0 ? m_config.nozzle_temperature_initial_layer.get_at(extruder_id) :
                                         m_config.nozzle_temperature.get_at(extruder_id));

        gcode += m_writer.set_temperature(temp, false);
    }

    this->placeholder_parser().set("current_extruder", extruder_id);
    this->placeholder_parser().set("retraction_distance_when_cut", m_config.retraction_distances_when_cut.get_at(extruder_id));
    this->placeholder_parser().set("long_retraction_when_cut", m_config.long_retractions_when_cut.get_at(extruder_id));

    // Append the filament start G-code.
    const std::string &filament_start_gcode = m_config.filament_start_gcode.get_at(extruder_id);
    if (! filament_start_gcode.empty()) {
        // Process the filament_start_gcode for the new filament.
        DynamicConfig config;
        config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index));
        config.set_key_value("layer_z", new ConfigOptionFloat(this->writer().get_position().z() - m_config.z_offset.value));
        config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
        config.set_key_value("filament_extruder_id", new ConfigOptionInt(int(extruder_id)));
        gcode += this->placeholder_parser_process("filament_start_gcode", filament_start_gcode, extruder_id, &config);
        check_add_eol(gcode);
    }
    // Set the new extruder to the operating temperature.
    if (m_ooze_prevention.enable)
        gcode += m_ooze_prevention.post_toolchange(*this);

    if (m_config.enable_pressure_advance.get_at(extruder_id)) {
        gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
    }

    return gcode;
}

inline std::string polygon_to_string(const Polygon &polygon, Print *print, bool is_print_space = false) {
    std::ostringstream gcode;
    gcode << "[";
    for (const Point &p : polygon.points) {
        const auto v = is_print_space ? Vec2d(p.x(), p.y()) : print->translate_to_print_space(p);
        gcode << "[" << v.x() << "," << v.y() << "],";
    }
    const auto first_v = is_print_space ? Vec2d(polygon.points.front().x(), polygon.points.front().y())
                                        : print->translate_to_print_space(polygon.points.front());
    gcode << "[" << first_v.x() << "," << first_v.y() << "]";
    gcode << "]";
    return gcode.str();
}


*
  The event list is styled in a way that:

  * when the table content would not fill the whole table width, the last column is stretched to
    fill the remaining space:

      | foo foo | bar bar                 |
      |---------|-------------------------|
      | foo foo | bar bar                 |

  * when the table content would fill the table width, all columns are sized according to their
    content, letting the text wrap:

      | foo foo foo foo | bar bar bar bar |
      | foo foo foo     | bar bar bar     |
      |-----------------|-----------------|
      | foo foo         | bar bar         |

  To achieve this, first we bound the container width so it is either:

  * 100% of the scrolling area when the content doesn't fill the whole table
  * 100% + 1px of the scrolling area otherwise.

  In the latter case, the scrolling container can theoretically scroll horizontally (in practice it
  doesn't because the horizontal overflow is hidden).

  We can detect this state by using a Scroll Driven Animation as described in
  https://www.bram.us/2023/09/16/solved-by-css-scroll-driven-animations-detect-if-an-element-can-scroll-or-not/

  Finally, we use a container query to stretch the last column to fill the remaining space only when
  the table content doesn't fill the whole table.
*/

.root {
  padding: 0 var(--mantine-spacing-md) var(--mantine-spacing-md) var(--mantine-spacing-md);

  width: max-content;
  min-width: 100%;
  max-width: calc(100% + 1px);

  --content-fills-the-table: no;
  animation: detect-scroll;
  animation-timeline: --dd-tab-scroll-x-timeline;
}

@keyframes detect-scroll {
  from,
  to {
    --content-fills-the-table: yes;
  }
}

@container style(--content-fills-the-table: no) {
  .root table {
    text-wrap: nowrap;
  }

  .root col[data-growable] {
    width: 100%;
  }
}
/* CodeMirror, copyright (c) by Marijn Haverbeke and others */
/* Distributed under an MIT license: http://codemirror.net/LICENSE */

/* BASICS */

.CodeMirror {
  /* Set height, width, borders, and global font properties here */
  font-family: monospace;
  color: black;
  direction: ltr;
  height: 100%;
  width: 100%;
  background-color: inherit;
}

/* PADDING */

.CodeMirror-lines {
  padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
  padding: 0 4px; /* Horizontal padding of content */
}

.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  /*background-color: white; /* The little square between H and V scrollbars */
}

/* GUTTER */

.CodeMirror-gutters {
  border-right: 1px solid #ddd;
  background-color: #f7f7f7;
  white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
  padding: 0 3px 0 5px;
  min-width: 20px;
  text-align: right;
  color: #999;
  white-space: nowrap;
}

.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }

/* CURSOR */

.CodeMirror-cursor {
  border-left: 1px solid black;
  border-right: none;


6b5-1f3fe": "person_mountain_biking_tone4",
"1f6b5-1f3ff": "person_mountain_biking_tone5",
"1f6b5-2640": "woman_mountain_biking",
"1f6b5-1f3fb-2640": "woman_mountain_biking_tone1",
"1f6b5-1f3fc-2640": "woman_mountain_biking_tone2",
"1f6b5-1f3fd-2640": "woman_mountain_biking_tone3",
"1f6b5-1f3fe-2640": "woman_mountain_biking_tone4",
"1f6b5-1f3ff-2640": "woman_mountain_biking_tone5",
"1f6b5-2642": "man_mountain_biking",
"1f6b5-1f3fb-2642": "man_mountain_biking_tone1",
"1f6b5-1f3fc-2642": "man_mountain_biking_tone2",
"1f6b5-1f3fd-2642": "man_mountain_biking_tone3",
"1f6b5-1f3fe-2642": "man_mountain_biking_tone4",
"1f6b5-1f3ff-2642": "man_mountain_biking_tone5",
"1f6b4": "person_biking",
"1f6b4-1f3fb": "person_biking_tone1",
"1f6b4-1f3fc": "person_biking_tone2",
"1f6b4-1f3fd": "person_biking_tone3",
"1f6b4-1f3fe": "person_biking_tone4",
"1f6b4-1f3ff": "person_biking_tone5",
"1f6b4-2640": "woman_biking",
"1f6b4-1f3fb-2640": "woman_biking_tone1",
"1f6b4-1f3fc-2640": "woman_biking_tone2",
"1f6b4-1f3fd-2640": "woman_biking_tone3",
"1f6b4-1f3fe-2640": "woman_biking_tone4",
"1f6b4-1f3ff-2640": "woman_biking_tone5",
"1f6b4-2642": "man_biking",
"1f6b4-1f3fb-2642": "man_biking_tone1",
"1f6b4-1f3fc-2642": "man_biking_tone2",
"1f6b4-1f3fd-2642": "man_biking_tone3",
"1f6b4-1f3fe-2642": "man_biking_tone4",
"1f6b4-1f3ff-2642": "man_biking_tone5",
"1f3c6": "trophy",
"1f947": "first_place",
"1f948": "second_place",
"1f949": "third_place",
"1f3c5": "medal",
"1f396": "military_medal",
"1f3f5": "rosette",
"1f397": "reminder_ribbon",
"1f3ab": "ticket",
"1f39f": "tickets",
"1f3aa": "circus_tent",
"1f939": "person_juggling",
"1f939-1f3fb": "person_juggling_tone1",
"1f939-1f3fc": "person_juggling_tone2",
"1f939-1f3fd": "person_juggling_tone3",
"1f939-1f3fe": "person_juggling_tone4",
"1f939-1f3ff": "perso


源代码写得很好，可读性也很强。尤其引人入胜的是其即时会话处理机制。与 PHP 简单的会话存储不同，远程存储在高流量情况下可能会因持续连接而陷入困境。Roundcube 的方法巧妙地最大限度地减少了资源密集型交互，并即时执行快速无缝的会话数据更新、重新计算和规范化。

由于会话文件格式基于标准 PHP 序列化，但有一些小问题，例如使用竖线 (  | ) 作为分隔符，因此 Roundcube 在实现上也遵循相同的方法。每次执行脚本并使用$_SESSION变量时，抽象类rcube_session的子类之一都会勤勉地重新计算、更新并规范化当前会话数据。效率至上！

其中一个辅助方法是rcube_session→unserialize()：

![](https://mmbiz.qpic.cn/sz_mmbiz_jpg/rWGOWg48tad1tDwGSfhIjPWQicIHBdcDKHOibtAdCByKSfeB7JNPhz0ZzpUv9lNiaqJopsDz7ibg7tldXkxoibfAXRg/640?wx_fmt=webp&from=appmsg "")

./program/lib/Roundcube/rcube_session.php

如果您曾经浏览过 PHP 源代码，您就会认出其中的奥妙——序列化数据处理涉及在结构化框架中移动指针，并计算条件、值和名称。如果您也关注 PHP 漏洞，您就会明白这里隐藏着多少陷阱。

自然而然地，我的目光立刻被这句好奇的小句子吸引住了：if ($str[$p] == '!')。感叹号？这是什么意思？🤔 我突然想不起以前见过这个，于是迫不及待地点击了评论里提供的链接，找到了方法……惊喜！惊喜！那里根本没有类似的东西，既没有函数本身，也没有感叹号。这难道不是仔细研究一下这个点的好理由吗？绝对有！💯

为了进行测试，我们以 RC 为每个用户生成的数据集为例。例如，在 MySQL 中，数据存储在会话表的vars列中，并以这种不太常见的格式呈现：

```
dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjtza2luX2NvbmZpZ3xhOjc6e3M6MTc6InN1cHBvcnRlZF9sYXlvdXRzIjthOjE6e2k6MDtzOjEwOiJ3aWRlc2NyZWVuIjt9czoyMjoianF1ZXJ5X3VpX2NvbG9yc190aGVtZSI7czo5OiJib290c3RyYXAiO3M6MTg6ImVtYmVkX2Nzc19sb2NhdGlvbiI7czoxNzoiL3N0eWxlcy9lbWJlZC5jc3MiO3M6MTk6ImVkaXRvcl9jc3NfbG9jYXRpb24iO3M6MTc6Ii9zdHlsZXMvZmVhcnNvZmYub3JnIjtzOjE3OiJkYXJrX21vZGVfc3VwcG9ydCI7YjoxO3M6


lStretch ());
}

namespace gsi
{

static gsi::Methods methods_QSizePolicy () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSizePolicy::QSizePolicy()\nThis method creates an object of class QSizePolicy.", &_init_ctor_QSizePolicy_0, &_call_ctor_QSizePolicy_0);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSizePolicy::QSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)\nThis method creates an object of class QSizePolicy.", &_init_ctor_QSizePolicy_4476, &_call_ctor_QSizePolicy_4476);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSizePolicy::QSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical, QSizePolicy::ControlType type)\nThis method creates an object of class QSizePolicy.", &_init_ctor_QSizePolicy_7191, &_call_ctor_QSizePolicy_7191);
  methods += new qt_gsi::GenericMethod (":controlType", "@brief Method QSizePolicy::ControlType QSizePolicy::controlType()\n", true, &_init_f_controlType_c0, &_call_f_controlType_c0);
  methods += new qt_gsi::GenericMethod ("expandingDirections", "@brief Method QFlags<Qt::Orientation> QSizePolicy::expandingDirections()\n", true, &_init_f_expandingDirections_c0, &_call_f_expandingDirections_c0);
  methods += new qt_gsi::GenericMethod ("hasHeightForWidth|:heightForWidth", "@brief Method bool QSizePolicy::hasHeightForWidth()\n", true, &_init_f_hasHeightForWidth_c0, &_call_f_hasHeightForWidth_c0);
  methods += new qt_gsi::GenericMethod (":horizontalPolicy", "@brief Method QSizePolicy::Policy QSizePolicy::horizontalPolicy()\n", true, &_init_f_horizontalPolicy_c0, &_call_f_horizontalPolicy_c0);
  methods += new qt_gsi::GenericMethod ("horizontalStretch", "@brief Method int QSizePolicy::horizontalStretch()\n", true, &_init_f_horizontalStretch_c0, &_call_f_horizontalStretch_c0);
  methods += new qt_gsi::GenericMethod ("!=", "@brief Method bool QSizePolicy::operator!=(const QSizePolicy &s)\n", true, &_init_f_operator_excl__eq__c2429, &_call_f_operator_excl__eq__c2429);
  methods += new qt_gsi::GenericMethod ("==", "@brief Method bool QSizePolicy::operator==(const QSizePolicy &s)\n", true, &_init_f_operator_eq__eq__c2429, &_call_f_operator_eq__eq__c2429);
  methods += new qt_gsi::GenericMethod ("setControlType|controlType=", "@brief Method void QSizePolicy::setControlType(QSizePolicy::ControlType type)\n", false, &_init_f_setControlType_2823, &_call_f_setControlType_2823);
  methods += new qt_gsi::GenericMethod ("setHeightForWidth|heightForWidth=", "@brief Method void QSizePolicy::setHeightForWidth(bool b)\n", false, &_init_f_setHeightForWidth_864, &_call_f_setHeightForWidth_864);
  methods += new qt_gsi::GenericMethod ("setHorizontalPolicy|horizontalPolicy=", "@brief Method void QSizePolicy::setHorizontalPolicy(QSizePolicy::Policy d)\n", false, &_init_f_setHorizontalPolicy_2292, &


;
use fots::types::GroupId;
use rand::prelude::*;
use std::collections::{HashMap, HashSet};

#[allow(clippy::type_complexity)]
const MUTATE_METHOD: [fn(&Prog, &Target, &RTable, &HashSet<Prog>, &Config) -> Prog; 2] =
    [seq_reuse, merge_seq /*remove_call*/];

pub fn mutate(
    corpus: &HashSet<Prog>,
    t: &Target,
    rt: &HashMap<GroupId, RTable>,
    conf: &Config,
) -> Prog {
    let mut rng = thread_rng();
    let p = corpus.iter().choose(&mut rng).unwrap();
    let rt = &rt[&p.gid];
    let method = MUTATE_METHOD.choose(&mut rng).unwrap();
    method(p, t, rt, corpus, conf)
}

fn seq_reuse(p: &Prog, t: &Target, _rt: &RTable, _corpus: &HashSet<Prog>, conf: &Config) -> Prog {
    let seq = extract_seq(p, t);
    gen_seq(&seq, p.gid, t, conf)
}

fn extract_seq(p: &Prog, t: &Target) -> Vec<usize> {
    let g = &t.groups[&p.gid];
    let mut seq = Vec::new();
    for c in &p.calls {
        seq.push(g.fns.iter().position(|f| f.id == c.fid).unwrap())
    }
    seq
}

fn merge_seq(p0: &Prog, t: &Target, _rt: &RTable, corpus: &HashSet<Prog>, conf: &Config) -> Prog {
    let mut rng = thread_rng();
    let merge_point = rng.gen_range(0, p0.len());
    let mut s0 = extract_seq(p0, t);
    let p1 = corpus.iter().filter(|p1| p1.gid == p0.gid).choose(&mut rng);
    if let Some(p1) = p1 {
        let s1 = extract_seq(p1, t);
        let left = s0.split_off(merge_point + 1);
        s0.extend(s1);
        s0.extend(left);
    }
    gen_seq(&s0, p0.gid, t, conf)
}

// fn insert_call(p: &Prog, t: &Target, rt: &RTable, corpus: &[Prog], conf: &Config) -> Prog {
//     let seq = ex
//     todo!()
// }

// fn remove_call(p: &Prog, t: &Target, rt: &RTable, corpus: &HashSet<Prog>, conf: &Config) -> Prog {
//     let mut rng = thread_rng();
//     if p.len() <= 3 {
//         let (_, methods) = MUTATE_METHOD.split_last().unwrap();
//         let method = methods.choose(&mut rng).unwrap();
//         return method(&p, t, rt, corpus, conf);
//     }
//
//     let mut p = p.clone();
//     let mut retry = 0;
//     loop {
//         let c = rng.gen_range(0, p.len());
//         if remove(&mut p, c) {
//             return p;
//         } else if retry != p.len() {
//             retry += 1;
//             continue;
//         } else {
//             let (_, methods) = MUTATE_METHOD.split_last().unwrap();
//             let method = methods.choose(&mut rng).unwrap();
//             return method(&p, t, rt, corpus, conf);
//         }
//     }
// }
#![no_std]

use core::fmt::Write;
use libtock::result::TockResult;
use libtock::sensors::Sensor;
use libtock::timer::Duration;

#[libtock::main]
async fn main() -> TockResult<()> {
    let mut drivers = libtock::retrieve_drivers()?;

    let mut timer_driver = drivers.timer.create_timer_driver();
    let timer_driver = timer_driver.activate()?;
    let mut conso


: BB(17522093256097792),
        outer_mask: BB(4665518383679160384),
        base_offset: 84096,
    },
    Offset {
        inner_mask: BB(35607136465616896),
        outer_mask: BB(9259260648297103488),
        base_offset: 85120,
    },
    Offset {
        inner_mask: BB(9079539427579068672),
        outer_mask: BB(18302911464433844481),
        base_offset: 87168,
    },
    Offset {
        inner_mask: BB(8935706818303361536),
        outer_mask: BB(18231136449196065282),
        base_offset: 91264,
    },
    Offset {
        inner_mask: BB(8792156787827803136),
        outer_mask: BB(18087586418720506884),
        base_offset: 93312,
    },
    Offset {
        inner_mask: BB(8505056726876686336),
        outer_mask: BB(17800486357769390088),
        base_offset: 95360,
    },
    Offset {
        inner_mask: BB(7930856604974452736),
        outer_mask: BB(17226286235867156496),
        base_offset: 97408,
    },
    Offset {
        inner_mask: BB(6782456361169985536),
        outer_mask: BB(16077885992062689312),
        base_offset: 99456,
    },
    Offset {
        inner_mask: BB(4485655873561051136),
        outer_mask: BB(13781085504453754944),
        base_offset: 101504,
    },
    Offset {
        inner_mask: BB(9115426935197958144),
        outer_mask: BB(9187484529235886208),
        base_offset: 103552,
    },
];

pub const SHARED_ATTACK_INDICES: [u16; 107648] = [
    127, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1,
    3, 1, 63, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 31, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1,
    7, 1, 3, 1, 127, 3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3, 7, 3, 63, 3, 7, 3, 15, 3, 7, 3, 31,
    3, 7, 3, 15, 3, 7, 3, 127, 123, 7, 3, 15, 11, 7, 3, 31, 27, 7, 3, 15, 11, 7, 3, 63, 59, 7, 3,
    15, 11, 7, 3, 31, 27, 7, 3, 15, 11, 7, 3, 127, 107, 23, 3, 111, 107, 7, 3, 31, 11, 23, 3, 15,
    11, 7, 3, 63, 43, 23, 3, 47, 43, 7, 3, 31, 11, 23, 3, 15, 11, 7, 3, 127, 43, 87, 3, 47, 43, 7,
    3, 95, 11, 87, 3, 15, 11, 7, 3, 63, 43, 23, 3, 47, 43, 7, 3, 31, 11, 23, 3, 15, 11, 7, 3, 127,


 = mem.ok_or(Error::new(ErrorKind::InvalidData, "No memory inputted"))?;
        mem.read(ptr as *const u8, &mut byte_buf)?;
    }

    // Reinterpret Vec<MaybeUninit<T>> as Vec<T>
    let (ptr, len, cap) = (buf.as_mut_ptr(), buf.len(), buf.capacity());
    let ptr = ptr as *mut T;
    unsafe {
        mem::forget(buf);
        Ok(Vec::<T>::from_raw_parts(ptr, len, cap))
    }
}

pub fn format_call(
    mut mem: Option<&mut Memory>,
    a: usize,
    b: usize,
    c: usize,
    d: usize,
    e: usize,
    f: usize,
) -> String {
    macro_rules! validate_slice {
        ($ptr:expr, $len:expr) => {
            validate_slice(
                match mem {
                    Some(ref mut mem) => Some(&mut *mem),
                    None => None,
                },
                $ptr,
                $len,
            )
        };
    }
    // The below code should preferrably only have the minimal amount
    // of changes diverging from src/syscall/debug.rs. At any point it
    // should not be too much effort to reset this to that code, and
    // patch any *absolutely* necessary changes.
    //
    // Things that need fixing:
    // - s/validate_slice\(_mut\)?(/validate_slice!(/g
    // - SYS_FEXEC str::from_utf8 -> String::from_utf8
    // - generally, any references -> owned values
    match a {
        SYS_OPEN => format!(
            "open({:?}, {:#X})",
            validate_slice!(b as *const u8, c).map(ByteStr),
            d
        ),
        SYS_CHMOD => format!(
            "chmod({:?}, {:#o})",
            validate_slice!(b as *const u8, c).map(ByteStr),
            d
        ),
        SYS_RMDIR => format!(
            "rmdir({:?})",
            validate_slice!(b as *const u8, c).map(ByteStr)
        ),
        SYS_UNLINK => format!(
            "unlink({:?})",
            validate_slice!(b as *const u8, c).map(ByteStr)
        ),
        SYS_CLOSE => format!("close({})", b),
        SYS_DUP => format!(
            "dup({}, {:?})",
            b,
            validate_slice!(c as *const u8, d).map(ByteStr)
        ),
        SYS_DUP2 => format!(
            "dup2({}, {}, {:?})",
            b,
            c,
            validate_slice!(d as *const u8, e).map(ByteStr)
        ),
        SYS_READ => format!("read({}, {:#X}, {})", b, c, d),
        SYS_WRITE => format!("write({}, {:#X}, {})", b, c, d),
        SYS_LSEEK => format!(
            "lseek({}, {}, {} ({}))",
            b,
            c as isize,
            match d {
                SEEK_SET => "SEEK_SET",
                SEEK_CUR => "SEEK_CUR",
                SEEK_END => "SEEK_END",
                _ => "UNKNOWN",
            },
            d
        ),
        SYS_FCHMOD => format!("fchmod({}, {:#o})", b, c),
        SYS_FCHOWN => format!("fchown({}, {}, {})", b, c, d),
        SYS_FCNTL => format!(
            "fcntl({}, {} ({}), {:#X})",
            b,
            match c {
                F_DUPFD => "F_DUPFD",
                F_GETFD => "F_GETFD",
                F_SETFD => "F_SETFD


 This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.elfloader.tables

interface IHashTable
/*
 *
 * This file is part of Kopycat emulator software.
 *
 * Copyright (C) 2023 INFORION, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.elfloader.processors.arm.enums

enum class ArmSegmentType(val id: Int) {
    PT_ARM_ARCHEXT(0x70000000), // Platform architecture compatibility information
    PT_ARM_EXIDX(0x70000001);   // Exception unwind tables

    companion object {
        fun getNameById(id: Int) = values().first{ it.id == id }.name.substring(3)
    }
}/*
 *
 * This file is part of Kopycat emulator software.
 *
 * Copyright (C) 2023 INFORION, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTIC


// h2cHandler is a Handler which implements h2c by hijacking the HTTP/1 traffic
// that should be h2c traffic. There are two ways to begin a h2c connection
// (RFC 7540 Section 3.2 and 3.4): (1) Starting with Prior Knowledge - this
// works by starting an h2c connection with a string of bytes that is valid
// HTTP/1, but unlikely to occur in practice and (2) Upgrading from HTTP/1 to
// h2c - this works by using the HTTP/1 Upgrade header to request an upgrade to
// h2c. When either of those situations occur we hijack the HTTP/1 connection,
// convert it to a HTTP/2 connection and pass the net.Conn to http2.ServeConn.
type h2cHandler struct {
	Handler http.Handler
	s       *http2.Server
}

// NewHandler returns an http.Handler that wraps h, intercepting any h2c
// traffic. If a request is an h2c connection, it's hijacked and redirected to
// s.ServeConn. Otherwise the returned Handler just forwards requests to h. This
// works because h2c is designed to be parseable as valid HTTP/1, but ignored by
// any HTTP server that does not handle h2c. Therefore we leverage the HTTP/1
// compatible parts of the Go http library to parse and recognize h2c requests.
// Once a request is recognized as h2c, we hijack the connection and convert it
// to an HTTP/2 connection which is understandable to s.ServeConn. (s.ServeConn
// understands HTTP/2 except for the h2c part of it.)
func NewHandler(h http.Handler, s *http2.Server) http.Handler {
	return &h2cHandler{
		Handler: h,
		s:       s,
	}
}

// ServeHTTP implement the h2c support that is enabled by h2c.GetH2CHandler.
func (s h2cHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	// Handle h2c with prior knowledge (RFC 7540 Section 3.4)
	if r.Method == "PRI" && len(r.Header) == 0 && r.URL.Path == "*" && r.Proto == "HTTP/2.0" {
		if http2VerboseLogs {
			log.Print("h2c: attempting h2c with prior knowledge.")
		}
		conn, err := initH2CWithPriorKnowledge(w)
		if err != nil {
			if http2VerboseLogs {
				log.Printf("h2c: error h2c with prior knowledge: %v", err)
			}
			return
		}
		defer conn.Close()

		s.s.ServeConn(conn, &http2.ServeConnOpts{Handler: s.Handler})
		return
	}
	// Handle Upgrade to h2c (RFC 7540 Section 3.2)
	if conn, err := h2cUpgrade(w, r); err == nil {
		defer conn.Close()

		s.s.ServeConn(conn, &http2.ServeConnOpts{Handler: s.Handler})
		return
	}

	s.Handler.ServeHTTP(w, r)
	return
}

// initH2CWithPriorKnowledge implements creating a h2c connection with prior
// knowledge (Section 3.4) and creates a net.Conn suitable for http2.ServeConn.
// All we have to do is look for the client preface that is suppose to be part
// of the body, and reforward


matting symbols for locale ne_IN.
 */
goog.i18n.DateTimeSymbols_ne_IN = {
  ZERODIGIT: 0x0966,
  ERAS: ['ईसा पूर्व', 'सन्'],
  ERANAMES: ['ईसा पूर्व', 'सन्'],
  NARROWMONTHS: ['१', '२', '३', '४', '५', '६', '७', '८', '९', '१०', '११', '१२'],
  STANDALONENARROWMONTHS: ['१', '२', '३', '४', '५', '६', '७', '८', '९', '१०', '११', '१२'],
  MONTHS: ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मई', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'],
  STANDALONEMONTHS: ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'],
  SHORTMONTHS: ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'],
  STANDALONESHORTMONTHS: ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'],
  WEEKDAYS: ['आइतबार', 'सोमबार', 'मङ्गलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'],
  STANDALONEWEEKDAYS: ['आइतबार', 'सोमबार', 'मङ्गलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'],
  SHORTWEEKDAYS: ['आइत', 'सोम', 'मङ्गल', 'बुध', 'बिहि', 'शुक्र', 'शनि'],
  STANDALONESHORTWEEKDAYS: ['आइत', 'सोम', 'मङ्गल', 'बुध', 'बिहि', 'शुक्र', 'शनि'],
  NARROWWEEKDAYS: ['आ', 'सो', 'म', 'बु', 'बि', 'शु', 'श'],
  STANDALONENARROWWEEKDAYS: ['आ', 'सो', 'म', 'बु', 'बि', 'शु', 'श'],
  SHORTQUARTERS: ['पहिलो सत्र', 'दोस्रो सत्र', 'तेस्रो सत्र', 'चौथो सत्र'],
  QUARTERS: ['पहिलो सत्र', 'दोस्रो सत्र', 'तेस्रो सत्र', 'चौथो सत्र'],
  AMPMS: ['पूर्वाह्न', 'अपराह्न'],
  DATEFORMATS: ['y M


    }
    })
}

export const getRequestBody = (request: string): {
  content: {
    'application/json': {
      schema: {
        examples: any
        type: string
        items?: any
        properties?: any
      }
    }
  }
} => {
  const requestWithComment = parseJSON(request)
  const type = getType(requestWithComment)
  const data = {
    type,
    items: type === 'array' ? getItems(requestWithComment) : undefined,
    properties: type === 'object' ? getProperties(requestWithComment) : undefined,
    examples: requestWithComment
  }
  return {
    content: {
      'application/json': {
        schema: omitBy(data, isUndefined) as {
          examples: any
          type: string
          items?: any
          properties?: any
        }
      }
    }
  }
}

export const getResponseBody = (response: string, code: string) => {
  const responseWithComment = parseJSON(response)
  const type = getType(responseWithComment)
  const data = {
    type,
    items: type === 'array' ? getItems(responseWithComment) : undefined,
    properties: type === 'object' ? getProperties(responseWithComment) : undefined,
    examples: responseWithComment
  }
  let schema = {}
  const comment = responseWithComment[Symbol.for('before-all')]
  if (comment !== undefined) {
    const ref = comment[0].value.replace('ref:', '').trim()
    schema = {
      allOf: [
        omitBy(data, isUndefined),
        {
          '$ref': ref
        }
      ]
    }
  } else {
    schema = omitBy(data, isUndefined)
  }
  if (code === '204') {
    return {
      [code]: {
        description: "No Content"
      }
    }
  }
  return {
    [code]: {
      description: code === '200' ? 'OK' : undefined,
      content: {
        'application/json': {
          schema
        }
      }
    }
  }
}

export const toYaml = (value: PresentationProps): string => {
  const url = getUrl(value.platform, value.path)
  const parameters = getPathParameters(url).concat(getQueryParameters(value.query) as any)
  const data = {
    summary: url,
    description: `Assignee: ${value.assignee}\n${value.description}`,
    tags: [value.tag],
    security: [{ JWT: [] }],
    operationId: url.replace(/\//gi, '.').slice(1),
    parameters: parameters.length === 0 ? undefined : parameters,
    requestBody: value.request === '' ? undefined : getRequestBody(value.request),
    responses: getResponseBody(value.response, value.responseCode)
  }
  const api = {
    paths: {
      [url]: {
        [value.method.toLowerCase()]: omitBy(data, isUndefined)
      }
    }
  }
  return yaml.stringify(api)
}
import { SortDirections } from "app/models/enums/SortDirections";
import { Injectable } from "@angular/core";
import { _FieldTypes } from "app/models/enums/_FieldTypes";
import * as moment from 'moment/moment';

@Injectable()
export class ConvertService {

	private DATE_TIME_FORMAT: string = 'DD.MM.YYYY HH:mm:ss';

	public deserialize(value: string, fieldTypeId: number): any {
		if (!value) {
			return null;
		}

		switch (fieldTypeId) {
			case _FieldTypes.Integer:
				return parseInt(value);
			case _FieldTypes.Decimal:
				return parseFloat(value);
			case _FieldTypes.String:
				return value;
			case _FieldTypes.DateTime:
				return moment(value, this.


      ("XACT_DENIED_NCBWRDATA_AFTER_NCBWRDATACOMPACK",        0x000B0000 | 34);
            inline constexpr XactDenialEnumBack DENIED_WRITEDATACANCEL_AFTER_NCBWRDATA          ("XACT_DENIED_WRITEDATACANCEL_AFTER_NCBWRDATA",         0x000B0000 | 35);
            inline constexpr XactDenialEnumBack DENIED_WRITEDATACANCEL_AFTER_NCBWRDATACOMPACK   ("XACT_DENIED_WRITEDATACANCEL_AFTER_NCBWRDATACOMPACK",  0x000B0000 | 36);
            inline constexpr XactDenialEnumBack DENIED_NCBWRDATACOMPACK_AFTER_WRITEDATACANCEL   ("XACT_DENIED_NCBWRDATACOMPACK_AFTER_WRITEDATACANCEL",  0x000B0000 | 37);
            inline constexpr XactDenialEnumBack DENIED_NCBWRDATACOMPACK_AFTER_NCBWRDATA         ("XACT_DENIED_NCBWRDATACOMPACK_AFTER_NCBWRDATA",        0x000B0000 | 38);

            inline constexpr XactDenialEnumBack DENIED_NCBWRDATA_AFTER_NCBWRDATA                ("XACT_DENIED_NCBWRDATA_AFTER_NCBWRDATA",               0x000B0000 | 39);
            inline constexpr XactDenialEnumBack DENIED_COMPDATA_AFTER_COMPDATA                  ("XACT_DENIED_COMPDATA_AFTER_COMPDATA",                 0x000B0000 | 40);

            inline constexpr XactDenialEnumBack DENIED_READRECEIPT_AFTER_READRECEIPT            ("XACT_DENIED_READRECEIPT_AFTER_READRECEIPT",           0x000B0000 | 41);

            inline constexpr XactDenialEnumBack DENIED_DUPLICATED_DATAID            ("XACT_DENIED_DUPLICATED_DATAID",           0x000B0000 | 48);

            inline constexpr XactDenialEnumBack DENIED_COMPACK_ON_NON_EXPCOMPACK    ("XACT_DENIED_COMPACK_ON_NON_EXPCOMPACK",   0x000B0000 | 49);

            inline constexpr XactDenialEnumBack DENIED_DWT_ON_EXPCOMPACK            ("XACT_DENIED_DWT_ON_EXPCOMPACK",           0x000B0000 | 50);
            inline constexpr XactDenialEnumBack DENIED_DWT_WITH_DBIDRESPORD         ("XACT_DENIED_DWT_WITH_DBIDRESPORD",        0x000B0000 | 51);

            inline constexpr XactDenialEnumBack DENIED_READRECEIPT_ON_NO_ORDER      ("XACT_DENIED_READRECEIPT_ON_NO_ORDER",     0x000B0000 | 52);

            inline constexpr XactDenialEnumBack DENIED_RETRY_DIFF_XACT_TYPE         ("XACT_DENIED_RETRY_DIFF_XACT_TYPE",        0x000C0000 |  0);
            inline constexpr XactDenialEnumBack DENIED_RETRY_NO_ALLOWRETRY          ("XACT_DENIED_RETRY_NO_ALLOWRETRY",         0x000C0000 |  1);
            inline constexpr XactDenialEnumBack DENIED_NO_MATCHING_RETRY            ("XACT_DENIED_NO_MATCHING_RETRY",           0x000C0000 |  2);
            inline constexpr XactDenialEnumBack DENIED_NO_MATCHING_PCREDIT          ("XACT_DENIED_NO_MATCHING_PCREDIT",         0x000C0000 |  3);
        //  inline constexpr XactDenialEnumBack DENIED_RETRY_DIFF_QOS               ("XACT_DENIED_RETRY_DIFF_QOS",              0x000C0000 | 31);
        //  inline constexpr XactDenialEnumBack DENIED_RETRY_DIFF_TGTID             ("XACT_DENIED_


    const toolRequest = {
      action: 'search',
      keywords: 'climate change,environment',
      sources: 'bbc,npr',
      limit: 3,
    };

    const toolResponse = await fetch(`${BASE_URL}/tools/news-aggregator`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(toolRequest),
    });

    const toolResult = await toolResponse.json();

    console.log(`\nTool action: ${toolResult.action}`);
    console.log(`Results: ${toolResult.result.totalResults} articles found`);

    toolResult.result.articles.forEach((article, index) => {
      console.log(`\n${index + 1}. ${article.title}`);
      console.log(`   Source: ${article.source}`);
    });
  } catch (error) {
    console.error('Error using MCP tool:', error.message);
  }
}

/**
 * Example 7: Health check
 */
async function healthCheckExample() {
  console.log('\n=== Health Check Example ===');

  try {
    const response = await fetch(`${BASE_URL}/news-aggregator/health`);
    const data = await response.json();

    console.log(`Status: ${data.status}`);
    console.log(`Message: ${data.message}`);

    if (data.testArticles !== undefined) {
      console.log(`Test articles fetched: ${data.testArticles}`);
    }
  } catch (error) {
    console.error('Error checking health:', error.message);
  }
}

/**
 * Example 8: Cache management
 */
async function cacheManagementExample() {
  console.log('\n=== Cache Management Example ===');

  try {
    // First, get some news to populate cache
    console.log('Fetching news to populate cache...');
    await fetch(`${BASE_URL}/news-aggregator/rss/hackernews`);

    // Clear the cache
    console.log('Clearing cache...');
    const response = await fetch(`${BASE_URL}/news-aggregator/cache`, {
      method: 'DELETE',
    });

    const data = await response.json();
    console.log(`Result: ${data.message}`);
  } catch (error) {
    console.error('Error managing cache:', error.message);
  }
}

/**
 * Run all examples
 */
async function runAllExamples() {
  console.log('News Aggregator Module - Usage Examples');
  console.log('=====================================');

  await getRSSNewsExample();
  await getScrapedNewsExample();
  await getAggregatedNewsExample();
  await searchNewsExample();
  await getAvailableSourcesExample();
  await mcpToolExample();
  await healthCheckExample();
  await cacheManagementExample();

  console.log('\n=== All examples completed ===');
}

// Run examples if this file is executed directly
if (import.meta.url === `file://${process.argv[1]}`) {
  runAllExamples().catch(console.error);
}

export {
  getRSSNewsExample,
  getScrapedNewsExample,
  getAggregatedNewsExample,
  searchNewsExample,
  getAvailableSourcesExample,
  mcpToolExample,
  healthCheckExample,
  cacheManagementExample,
  runAllExamples,
};
// Crypto Badge Controller Tests (Mocha + Chai)
import { expect } from 'chai';
import {
  generateBadgeHandler,
  generateMarkdownHandler,
  generateHTMLHandler,
  generatePresetHandler,
} from '../src/controller.js';

describe('Crypto Badge Controller', () => {
  describe('generateBadgeHandler', () => {
    it('should handle valid badge generation request', async () => {
      const mockRequest = {
        json: async () => ({
          baseUrl: 'https://paybadge.profullstack.com',
          leftText: 'donate',
          rightText: 'bitcoin',
          rightColor: '#f7931a',
        }),
      };

      const mockC


h.Required: ()Found: appendable">(foo a b c d)</error>
""")

    @Test
    fun `test assigning flex typeclass to rigid var`() = checkByText("""
a : number
a = Debug.todo ""
b : appendable
b = Debug.todo ""
c : comparable
c = Debug.todo ""
d : compappend
d = Debug.todo ""

main : (a -> b -> c -> d -> b) -> b
main foo =
    foo
        <error descr="Type mismatch.Required: aFound: number">a</error>
        <error descr="Type mismatch.Required: bFound: appendable">b</error>
        <error descr="Type mismatch.Required: cFound: comparable">c</error>
        <error descr="Type mismatch.Required: dFound: compappend">d</error>
""")

    @Test
    fun `test infinite type in record base`() = checkByText("""
main x =
    { <error descr="Infinite self-referential type">x</error> | ff = x.ff "" }
""")

    @Test
    fun `test flex arg to rigid param 1`() = checkByText("""
type Foo a = Foo
type Bar b = Bar { f2 : Foo ( (), b ) }
type Baz c d = Baz { f4 : Foo d -> Foo d }

main : Baz (e -> ()) e -> Bar e
main (Baz baz) =
    Bar <error descr="Type mismatch.Required: { f2 : Foo ( (), b ) }Found: { f2 : Foo e }Mismatched fields:   Field f2:    Required: Foo ( (), b )    Found: Foo e">{ f2 = baz.f4 Foo }</error>
""")

    @Test
    fun `test flex arg to rigid param 2`() = checkByText("""
type Foo a = Foo
type Bar b = Bar { f1 : b -> () , f2 : Foo ( (), b ) }
type Baz c d = Baz { f3 : c , f4 : Foo d -> Foo d }

main : Baz (e -> ()) e -> Bar e
main (Baz baz) =
    Bar
        <error descr="Type mismatch.Required: { f1 : e → (), f2 : Foo ( (), e ) }Found: { f1 : e → (), f2 : Foo e }Mismatched fields:   Field f2:    Required: Foo ( (), e )    Found: Foo e">{ f1 = baz.f3
        , f2 = baz.f4 Foo
        }</error>
""")
}
package org.elm.lang.core.psi.elements

import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import com.intellij.psi.stubs.IStubElementType
import org.elm.lang.core.psi.ElmNamedElement
import org.elm.lang.core.psi.ElmStubbedElement
import org.elm.lang.core.psi.stubDirectChildrenOfType
import org.elm.lang.core.resolve.ElmReferenceElement
import org.elm.lang.core.resolve.reference.ElmReferenceCached
import org.elm.lang.core.stubs.ElmPlaceholderStub
import org.elm.lang.core.stubs.index.ElmModulesIndex

/**
 * An import declaration at the top of the module.
 *
 * e.g. 'import Data.User exposing (User, name, age)'
 *
 * Role:
 * - refers to the module from which values and types should be imported
 * - possibly introduces an alias name for the module
 * - expose individual values and types from the module
 */
class ElmImportClause : ElmStubbedElement<ElmPlaceholderStub>, ElmReferenceElement {

    constructor(node: ASTNode) :
            super(node)

    constructor(stub: ElmPlaceholderStub, stubType: IStubElementType<*, *>) :
            super(stub, stubType)

    val moduleQID: ElmUpperCaseQID
        get() = stubDirectChildrenOfType<ElmUpperCaseQID>().single()

    val asClause: ElmAsClause?
        get() = stubDirectChildrenOfType<ElmAsClause>().singleOrNull()


 default class AuthenticationError extends Error {
  /**
   * @constructor
   * @param {object} message
   */
  constructor(message) {
    super();
    this.message = message;
    this.name = 'E_MISSING_OR_INVALID_TOKEN';
  }
}
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
import schedule from "node-schedule";
import moment from "moment";
import "moment/locale/ja";
import MisskeyUtils from "./misskey-utils";
import Weather from "./weather";

const weather = new Weather();

const removeNotFollowed = async (
  misskeyUtils: MisskeyUtils
): Promise<boolean> => {
  const checkFollowJson = JSON.stringify({
    username: "cordreel"
  });
  const response = misskeyUtils.fetchJson(
    "https://misskey.m544.net/api/users/following",
    checkFollowJson
  );
  const followingData = await response;
  followingData.users.forEach(async (user: any) => {
    const checkFollowByIdJson = JSON.stringify({
      userId: user.id
    });
    const response = misskeyUtils.fetchJson(
      "https://misskey.m544.net/api/users/following",
      checkFollowByIdJson
    );
    const followingUserFollowingData = await response;
    if (
      !followingUserFollowingData.users.some(
        (user: any) => user.username === "cordreel"
      )
    ) {
      misskeyUtils.unfollow(user.id);
      return true;
    } else {
      return false;
    }
  });
  return false;
};

const periodicallyJobs = (misskeyUtils: MisskeyUtils): void => {
  const midnightJob = schedule.scheduleJob("00 00 * * *", () => {
    misskeyUtils.noteHome(
      `日付が変わって、**${moment().format("M月D日 dddd")}**だよ！`
    );
    removeNotFollowed(misskeyUtils);
  });
  const noonJob = schedule.scheduleJob("00 12 * * *", () => {
    misskeyUtils.noteHome("12時！お昼ご飯はなーに？");
  });
  const sixOclockJob = schedule.scheduleJob("00 06 * * *", () => {
    const note = async (): Promise<void> => {
      misskeyUtils.note({
        cw: "6時！東京の天気をお知らせだよ！",
        text: "東京\n" + (await weather.get("tokyo")),
        visibility: MisskeyUtils.Visibility.Home
      });
    };
    note();
  });
  const fifteenOclockJob = schedule.scheduleJob("00 15 * * *", () => {
    const note = async (): Promise<void> => {
      misskeyUtils.note({
        cw: "15時！東京の天気をお知らせだよ！",
        text: "東京\n" + (await weather.get("tokyo")),
        visibility: MisskeyUtils.Visibility.Home
      });
    };
    note();
  });
};

export default periodicallyJobs;

/* Example:

> Enter the number:
> 5
******
.*****
..****
...***
....**
.....*

*/

import * as prompts from "prompts";

(async () => {
  const response = await prompts({
    type: "text",
    name: "num",
    message: ">Enter the number!",
  });
   console.log(response.num);

   let  n = response.num;
   let emptyString = "";
   let star = '*';

   console.log(star.repeat(n) + star);

   for (var i = 0; i < n; i++) {

            emptyString += '.'.repeat(i) + star.repeat(n - i)


 + B
    @Override
    public ResponseVO addFriendshipRequest(String fromId, FriendDto dto, Integer appId) {

        ImFriendShipRequestEntity request = imFriendShipRequestMapper.selectOne(
                new LambdaQueryWrapper<ImFriendShipRequestEntity>()
                        .eq(ImFriendShipRequestEntity::getAppId, appId)
                        .eq(ImFriendShipRequestEntity::getFromId, fromId)
                        .eq(ImFriendShipRequestEntity::getToId, dto.getToId()));

        long seq = redisSequence.doGetSeq(appId + ":" +
                Constants.SeqConstants.FriendShipRequestSeq);

        if (request == null) {
            // 第一次添加，插入申请结果
            request = new ImFriendShipRequestEntity();
            request.setAddSource(dto.getAddSource());
            request.setAddWording(dto.getAddWording());
            request.setAppId(appId);
            request.setFromId(fromId);
            request.setToId(dto.getToId());
            request.setReadStatus(0);
            request.setApproveStatus(0);
            request.setSequence(seq);
            request.setRemark(dto.getRemark());
            request.setCreateTime(System.currentTimeMillis());
            imFriendShipRequestMapper.insert(request);
        } else {
            //修改记录内容和更新时间
            if (StringUtils.isNotBlank(dto.getAddSource())) {
                request.setAddWording(dto.getAddWording());
            }
            if (StringUtils.isNotBlank(dto.getRemark())) {
                request.setRemark(dto.getRemark());
            }
            if (StringUtils.isNotBlank(dto.getAddWording())) {
                request.setAddWording(dto.getAddWording());
            }
            request.setSequence(seq);
            request.setApproveStatus(0);
            request.setReadStatus(0);
            imFriendShipRequestMapper.updateById(request);
        }

        userSequenceRepository.writeUserSeq(appId, dto.getToId(), Constants.SeqConstants.FriendShipRequestSeq, seq);

        //发送好友申请的 tcp 给接收方
        messageProducer.sendToUserAllClient(dto.getToId(),
                FriendshipEventCommand.FRIEND_REQUEST, request, appId);

        return ResponseVO.successResponse();
    }

    @Override
    @Transactional
    public ResponseVO approvalFriendRequest(ApprovalFriendRequestReq req) {

        ImFriendShipRequestEntity imFriendShipRequestEntity = imFriendShipRequestMapper.selectOne(
                new LambdaQueryWrapper<ImFriendShipRequestEntity>()
                        .eq(ImFriendShipRequestEntity::getId, req.getId())
                        .eq(ImFriendShipRequestEntity::getApproveStatus, ApproverFriendRequestStatusEnum.NORMAL.getCode()));
        if (imFriendShipRequestEntity == null) {
            throw new ApplicationException(FriendShipErrorCode.FRIEND_REQUEST_IS_NOT_EXIST);
        }

        if (!req.getOperater().equals(imFriendShipRequestEntity.getToId())) {
            //只能审批发给自己的好友请求
            throw new ApplicationException(FriendShipErrorCode.NOT_APPROVER_OTHER_MAN_REQUEST);
        }

        long seq = redisSequence.doGetSeq(req.getAppId() +
                ":" + Constants.SeqConstants.FriendShipRequestSeq);

        ImFriendShipRequestEntity update = new ImFriendShipRequestEntity();
        update.setApproveStatus(req.getStatus());
        update.setSequence(seq);
        update.setUpdateTime(System.currentTimeMillis());
        update.setId(req.getId());
        imFriendShipRequestMapper.updateById(update);


7c-907d, U+9081, U+9083, U+9085, U+9087-908b, U+908f, U+9095, U+9097, U+9099-909b, U+909d, U+90a0-90a1, U+90a8-90a9, U+90ac, U+90b0, U+90b2-90b4, U+90b6, U+90b8, U+90ba, U+90bd-90be, U+90c3-90c5, U+90c7-90c8, U+90cf-90d0, U+90d3, U+90d5, U+90d7, U+90da-90dc, U+90de, U+90e2, U+90e4, U+90e6-90e7, U+90ea-90eb, U+90ef, U+90f4-90f5, U+90f7, U+90fe-9100, U+9104, U+9109, U+910c, U+9112, U+9114-9115, U+9118, U+911c, U+911e, U+9120, U+9122-9123, U+9127, U+912d, U+912f-9132, U+9139-913a, U+9143, U+9146, U+9149-914a
}
/* LXGW WenKai [33] */
@font-face {
  font-family: 'LXGW WenKai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('lxfonts/lxgwwenkai-regular-subset-33.woff2') format('woff2');
  unicode-range: U+8e2d-8e31, U+8e34-8e35, U+8e39-8e3a, U+8e3d, U+8e40-8e42, U+8e47, U+8e49-8e4b, U+8e50-8e53, U+8e59-8e5a, U+8e5f-8e60, U+8e64, U+8e69, U+8e6c, U+8e70, U+8e74, U+8e76, U+8e7a-8e7c, U+8e7f, U+8e84-8e85, U+8e87, U+8e89, U+8e8b, U+8e8d, U+8e8f-8e90, U+8e94, U+8e99, U+8e9c, U+8e9e, U+8eaa, U+8eac, U+8eb0, U+8eb6, U+8ec0, U+8ec6, U+8eca-8ece, U+8ed2, U+8eda, U+8edf, U+8ee2, U+8eeb, U+8ef8, U+8efb-8efe, U+8f03, U+8f09, U+8f0b, U+8f12-8f15, U+8f1b, U+8f1d, U+8f1f, U+8f29-8f2a, U+8f2f, U+8f36, U+8f38, U+8f3b, U+8f3e-8f3f, U+8f44-8f45, U+8f49, U+8f4d-8f4e, U+8f5f, U+8f6b, U+8f6d, U+8f71-8f73, U+8f75-8f76, U+8f78-8f7a, U+8f7c, U+8f7e, U+8f81-8f82, U+8f84, U+8f87, U+8f8a-8f8b, U+8f8d-8f8f, U+8f94-8f95, U+8f97-8f9a, U+8fa6, U+8fad-8faf, U+8fb2, U+8fb5-8fb7, U+8fba-8fbc, U+8fbf, U+8fc2, U+8fcb


84.0] = "BIRUI4",
	[10000.0] = "AKASHI1",
	[190098.0] = "W1127",
	[11815.0] = "HUIHUA5",
	[2484.0] = "MAOZIHUODONG25",
	[10031.0] = "S004",
	[190099.0] = "W1128",
	[2577.0] = "ZHUXIAN040301",
	[11652.0] = "AIDANG2",
	[2930.0] = "POXIAOBINGHUA15",
	[90013.0] = "NG0013",
	[190100.0] = "W2000",
	[2961.0] = "BEILALUOSI1",
	[11714.0] = "FAXI04",
	[2736.0] = "DIEHAIMENGHUA6",
	[11745.0] = "TIERBICI5",
	[190101.0] = "W2003",
	[12444.0] = "DACHAOLIFU4",
	[12226.0] = "U556STORY6",
	[12475.0] = "MENGFEISIWANSHENG5",
	[11551.0] = "KELIFULAN1",
	[12257.0] = "TIEXUEYUYINFU17",
	[190102.0] = "W2004",
	[12032.0] = "XIAOTIANEXINNIAN2",
	[11582.0] = "GUANGRONG2",
	[2992.0] = "FUXINGDEZANMEISHI2",
	[12537.0] = "HOLOGUANQIA17",
	[11613.0] = "YINGHUA3",
	[12312.0] = "JIQI2",
	[11171.0] = "TEATIME1",
	[40053.0] = "LINKPREHEAT5-2",
	[190103.0] = "W2005",
	[3093.0] = "JINGWEILUOXUAN23",
	[12343.0] = "XIANGTINGLIAOFA13",
	[2864.0] = "KENTE4",
	[11202.0] = "SHANCHENG02",
	[12125.0] = "DONGHUANGCHUNJIE5",
	[12374.0] = "SALATUOJIAHAIBAO4",
	[90015.0] = "NG0015",
	[190104.0] = "W2006",
	[11450.0] = "LINGDONG10",
	[2449.0] = "HONGBAORICHANG4",
	[11481.0] = "KAIXUE01",
	[11931.0] = "BEILIWANSHENGJIE1",
	[3023.0] = "FUXINGDEZANMEISHI33",
	[11962.0] = "LONGXIANG2",
	[11993.0] = "DACHAO3",
	[190089.0] = "W1021",
	[2895.0] = "FUXIANGXIANZUOZHAN25",
	[90014.0] = "NG0014",
	[2701.0] = "YONGYEHUANGUANG31",
	[190090.0] = "W1025",
	[2480.0] = "MAOZIHUODONG21",
	[10015.0] = "AKASHI84",
	[3054.0] = "YINSEDANGAN4",
	[2573.0] = "ZHUXIAN040103",
	[90025.0] = "NG0024",
	[190091.0] = "W1031",
	[3155.0] = "OUXIANGDASHIGUANQIA15",
	[11667.0] = "Z467",
	[2926.0] =


go/commit/0776c05133aecd05e9cca04d73874dfbd24934b0))
- Move all the common APIs into go-mod-bootstrap ([9983415…](https://github.com/edgexfoundry/device-sdk-go/commit/9983415449d789263673552186519e6709848005))
- Adjust GetFileType() function for new secret URI format ([#1507](https://github.com/edgexfoundry/device-sdk-go/issues/1507)) ([88f0350…](https://github.com/edgexfoundry/device-sdk-go/commit/88f03503c07c02c451459ab8c2d5aba4061d83b0))
- Use WrapHandler func from go-mod-bootstrap ([ca6e439…](https://github.com/edgexfoundry/device-sdk-go/commit/ca6e439590fd3e0d96364bc20f1a7957a2569ef1))
- Update handler funcs to use Echo signatures ([93fdda3…](https://github.com/edgexfoundry/device-sdk-go/commit/93fdda3beb2e14b4e733fb76d164ead49978cb57))

### 📖 Documentation

- Replace Slack chat with GitHub discussion ([3e8c91c…](https://github.com/edgexfoundry/device-sdk-go/commit/3e8c91cf201308cb239f41d8f9ace2bd21fe3f70))

### 👷 Build

- Upgrade to go-1.21, Linter1.54.2 and Alpine 3.18 ([#1511](https://github.com/edgexfoundry/device-sdk-go/issues/1511)) ([10d83f9…](https://github.com/edgexfoundry/device-sdk-go/commit/10d83f9598abba3559abd072fcd7553d77fa119a))

### 🤖 Continuous Integration

- Add automated release workflow on tag creation ([526596b…](https://github.com/edgexfoundry/device-sdk-go/commit/526596b2a1c7dd5155db82aafa89415c2e504d1d))

### 🧪 Testing

- Add URI test files ([#1481](https://github.com/edgexfoundry/device-sdk-go/issues/1481)) ([d74039b…](https://github.com/edgexfoundry/device-sdk-go/commit/d74039b1e75348ec690936aee1c1bcbaac678fee))

## [v3.0.0] Minnesota - 2023-05-31 (Only compatible with the 3.x releases)

### Features ✨
- Add Start method to the ProtocolDriver interface ([#453fffe](https://github.com/edgexfoundry/device-sdk-go/commit/453fffe39844267b7c3d359e90be35c08d562c07))
  ```text
  BREAKING CHANGE: Added required `Start` method to the ProtocolDriver interface.
                   This method is called after the sdk has been completely initialized.
                   This is where device service should implement post initialization code.
  ```
- Add PatchDevice and DeviceExistsForName and refactor UpdateDeviceOperatingState([#]())
  ```text
  BREAKING CHANGE: SetDeviceOperatingState has been removed, and UpdateDeviceOperatingState has been modified to accept a models.OperatingState value.
  ```
- Using url.PathUnescape for decoding API path ([#cdd8b0f](https://github.com/edgexfoundry/device-sdk-go/commit/cdd8b0f4c44e4c2644a3f6043fa9547e0633c97a))
  ```text
  BREAKING CHANGE: Use PathUnescape for decoding API path to consist with the change from MQTT topic, the MQTT topic path will encode with url.PathEscape.
  ```
-  All ProtocolDriver interface API implementations required ([#d73da92](https://github.com/edgexfoundry/device-sdk-go/commit/d73da920b9fd3a52132699998633ff8aee3aa256))
  ```text
  BREAKING CHANGE: Move Disc


lptr = inb_p(virtual_dma_port+5);
		}

		virtual_dma_count = lcount;
		virtual_dma_addr = lptr;
		st = inb(virtual_dma_port+4);
	}

#ifdef TRACE_FLPY_INT
	calls++;
#endif
	if(st == 0x20)
		return IRQ_HANDLED;
	if(!(st & 0x20)) {
		virtual_dma_residue += virtual_dma_count;
		virtual_dma_count=0;
#ifdef TRACE_FLPY_INT
		printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
		       virtual_dma_count, virtual_dma_residue, calls, bytes,
		       dma_wait);
		calls = 0;
		dma_wait=0;
#endif
		doing_pdma = 0;
		floppy_interrupt(irq, dev_id);
		return IRQ_HANDLED;
	}
#ifdef TRACE_FLPY_INT
	if(!virtual_dma_count)
		dma_wait++;
#endif
	return IRQ_HANDLED;
}

#define EXTRA_FLOPPY_PARAMS


notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 *
 * * Neither the name of 'LWJGL' nor the names of
 *   its contributors may be used to endorse or promote products derived
 *   from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.lwjgl.opengl;

import org.lwjgl.util.generator.*;
import org.lwjgl.util.generator.opengl.GLenum;
import org.lwjgl.util.generator.opengl.GLuint;

import java.nio.*;

public interface ATI_fragment_shader {

	int GL_FRAGMENT_SHADER_ATI = 0x8920;
	int GL_REG_0_ATI = 0x8921;
	int GL_REG_1_ATI = 0x8922;
	int GL_REG_2_ATI = 0x8923;
	int GL_REG_3_ATI = 0x8924;
	int GL_REG_4_ATI = 0x8925;
	int GL_REG_5_ATI = 0x8926;
	int GL_REG_6_ATI = 0x8927;
	int GL_REG_7_ATI = 0x8928;
	int GL_REG_8_ATI = 0x8929;
	int GL_REG_9_ATI = 0x892A;
	int GL_REG_10_ATI = 0x892B;
	int GL_REG_11_ATI = 0x892C;
	int GL_REG_12_ATI = 0x892D;
	int GL_REG_13_ATI = 0x892E;
	int GL_REG_14_ATI = 0x892F;
	int GL_REG_15_ATI = 0x8930;
	int GL_REG_16_ATI = 0x8931;
	int GL_REG_17_ATI = 0x8932;
	int GL_REG_18_ATI = 0x8933;
	int GL_REG_19_ATI = 0x8934;
	int GL_REG_20_ATI = 0x8935;
	int GL_REG_21_ATI = 0x8936;
	int GL_REG_22_ATI = 0x8937;
	int GL_REG_23_ATI = 0x8938;
	int GL_REG_24_ATI = 0x8939;
	int


 > .portlet-title > .actions .btn-default.active {
  border: 1px solid #bfe4de;
  color: #d1ebe7;
}

/* Statistic Block */
.dashboard-stat.green-sharp {
  background-color: #4DB3A2;
}
.dashboard-stat.green-sharp.dashboard-stat-light:hover {
  background-color: #46a595;
}
.dashboard-stat.green-sharp .visual > i {
  color: #FFFFFF;
  opacity: 0.1;
  filter: alpha(opacity=10);
}
.dashboard-stat.green-sharp .details .number {
  color: #FFFFFF;
}
.dashboard-stat.green-sharp .details .desc {
  color: #FFFFFF;
  opacity: 1;
  filter: alpha(opacity=100);
}
.dashboard-stat.green-sharp .more {
  color: #FFFFFF;
  background-color: #46a595;
}

/* General Element */
.bg-green-sharp {
  border-color: #4DB3A2 !important;
  background-image: none !important;
  background-color: #4DB3A2 !important;
  color: #FFFFFF !important;
}

/* General Text & Icon Font Colors */
.font-green-sharp {
  color: #4DB3A2 !important;
}

.progress-bar.green-sharp {
  background: #4DB3A2 !important;
  color: #FFFFFF !important;
}

/***
Green Sharp
***/
/* Button */
.green-soft.btn {
  color: #FFFFFF;
  background-color: #3faba4;
  border-color: "";
}
.green-soft.btn:hover, .green-soft.btn:focus, .green-soft.btn:active, .green-soft.btn.active {
  color: #FFFFFF;
  background-color: #35918b;
}
.open .green-soft.btn.dropdown-toggle {
  color: #FFFFFF;
  background-color: #35918b;
}
.green-soft.btn:active, .green-soft.btn.active {
  background-image: none;
  background-color: #2f7e79;
}
.green-soft.btn:active:hover, .green-soft.btn.active:hover {
  background-color: #318680;
}
.open .green-soft.btn.dropdown-toggle {
  background-image: none;
}
.green-soft.btn.disabled, .green-soft.btn.disabled:hover, .green-soft.btn.disabled:focus, .green-soft.btn.disabled:active, .green-soft.btn.disabled.active, .green-soft.btn[disabled], .green-soft.btn[disabled]:hover, .green-soft.btn[disabled]:focus, .green-soft.btn[disabled]:active, .green-soft.btn[disabled].active, fieldset[disabled] .green-soft.btn, fieldset[disabled] .green-soft.btn:hover, fieldset[disabled] .green-soft.btn:focus, fieldset[disabled] .green-soft.btn:active, fieldset[disabled] .green-soft.btn.active {
  background-color: #3faba4;
}
.green-soft.btn .badge {
  color: #3faba4;
  background-color: #FFFFFF;
}

/* Button Strip */
.btn.green-soft-stripe {
  border-right: 3px solid #3faba4;
}

/* Portlet */
.portlet > .portlet-body.green-soft,
.portlet.green-soft {
  background-color: #3faba4;
}

.portlet.solid.green-soft > .portlet-title,
.portlet.solid.green-soft > .portlet-body {
  border: 0;
  color: #FFFFFF;
}
.portlet.solid.green-soft > .portlet-title > .caption > i {
  color: #


 => {
      assert.rejects(async () => {
        await attempt.run(controls.Example, controls.throwsOtherOnce());
      });
    });

    it("retries on error by type list", () => {
      assert.doesNotReject(async () => {
        await attempt.run([controls.Example], controls.throwsOnce());
      });
    });

    it("doesn't retry on error when type not in list", () => {
      assert.rejects(async () => {
        await attempt.run([controls.Example], controls.throwsOtherOnce());
      });
    });
  });
});
export class Link {
    rel: LinkRel;
    href: string;
    constructor(rel: LinkRel, href: string) {
        this.rel = rel;
        this.href = href;
    }
}

export enum LinkRel {
    page = 'page',
    first = 'first',
    last = 'last',
    next = 'next'
 }namespace anemone{
    export class MessageHandler{
        private nodes:Tentacle[] = [];
        private readonly frequency = 868e6;
        private readonly c = 299792458;
        private readonly antennaGain:number = 0;
        public register(tentacle:Tentacle){
            this.nodes.push(tentacle);
        }
        public send(tentacle:Tentacle,message:string,transmitPower:number){
            this.nodes.forEach(n=>{
                n.receive(message,this.calculateRssi(tentacle,n,transmitPower));
            });
        }

        private calculateRssi(from:Tentacle,to:Tentacle,transmitPower:number):number{
            let fromPos:Point = from.getPosition();
            let toPos:Point = to.getPosition();
            let distance:number = Math.sqrt(Math.pow(fromPos.x-toPos.x,2)+Math.pow(fromPos.y-toPos.y,2));
            let fspl:number = Math.pow(4*Math.PI*distance*this.frequency/this.c,2);
            let dbFSPL:number = 20*Math.log10(distance) + 20*Math.log10(this.frequency)+32.44 - from.getAntennaGain()-to.getAntennaGain();
            return transmitPower - dbFSPL;
        }

    }
}const cookie: TypeCookie = {
  get(key: string): any {
    if (0 < document.cookie.length) {
      let start = document.cookie.indexOf(key + '=');
      if (-1 < start) {
        start = start + key.length + 1;
        let end = document.cookie.indexOf(';', start);
        if (-1 === end) {
          end = document.cookie.length;
        }
        return unescape(document.cookie.substring(start, end));
      }
    }
    return '';
  },
  set(key: string, value: any, ttl: number, path?: string): void {
    if (!path) {
      path = '/';
    }
    const expireTime = new Date();
    expireTime.setTime(expireTime.getTime() + ttl * 1000);
    document.cookie = key + '=' + escape(value) + ';path=' + path +
      ((ttl === undefined) ? '' : ';expires=' + expireTime.toUTCString());
  },
  remove(key: string) {
    this.set(key, '随便什么值，反正都要被删除了', -1);
  },
};
export default cookie;
import { Meta, StoryFn } from '@storybook/angular';

interface TableBasicStory {
	clickable: boolean;
	zebra: boolean;
	alignTop: boolean;
	horizontalAlign: string;
	s: boolean;
	borderless: boolean;
	noOffset: boolean;
	parentChild: boolean;
	collapsable: boolean;
}

export default {
	title: 'Documentation/Listings/Table/Basic',
	argTypes: {
		click


s the fees module's exported genesis state as raw JSON bytes.
func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage {
	gs := am.keeper.ExportGenesis(ctx)
	return cdc.MustMarshalJSON(gs)
}

// ___________________________________________________________________________

// AppModuleSimulation functions

// GenerateGenesisState creates a randomized GenState of the fees module.
func (am AppModule) GenerateGenesisState(_ *module.SimulationState) {
}

// ProposalContents returns content functions for governance proposals.
func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg {
	return []simtypes.WeightedProposalMsg{}
}

// RegisterStoreDecoder registers a decoder for fees module's types.
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {
}

// WeightedOperations returns fees module weighted operations
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
	return []simtypes.WeightedOperation{}
}
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: juno/feeshare/v1/events.proto

package types

import (
	fmt "fmt"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// FeeShareEvent defines an instance that organizes fee distribution conditions for
// the owner of a given smart contract
type FeePayoutEvent struct {
	// Address of the account that will receive the payout
	WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"`
	// Amount of the payout
	FeesPaid []types.Coin `protobuf:"bytes,2,rep,name=fees_paid,json=feesPaid,proto3" json:"fees_paid"`
}

func (m *FeePayoutEvent) Reset()         { *m = FeePayoutEvent{} }
func (m *FeePayoutEvent) String() string { return proto.CompactTextString(m) }
func (*FeePayoutEvent) ProtoMessage()    {}
func (*FeePayoutEvent) Descriptor() ([]byte, []int) {
	return fileDescriptor_19637fb89a9eac93, []int{0}
}
func (m *FeePayoutEvent) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *FeePayoutEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_FeePayoutEvent.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *FeePayoutEvent) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FeePayoutEvent.Merge(m, src)
}
func (m *FeePayoutEvent) XXX_Size() int {
	return m.Size()
}
func (m *FeePayoutEvent) XXX_DiscardUnknown() {
	xxx_messageInfo_FeePayoutEvent.DiscardUnknown(m)
}

var xxx_messageInfo_FeePayoutEvent proto.InternalMessageInfo


82fd-82fe, U+8300-8301, U+8303, U+8306-8308, U+830a-830c, U+8316-8318, U+831b, U+831d-831f, U+8321-8323, U+832b-8335, U+8337, U+833a, U+833c-833d, U+8340, U+8342-8347, U+834a, U+834d-8351, U+8353-8357, U+835a, U+8362-8363, U+8370, U+8373, U+8375, U+8378, U+837c-837d, U+837f-8380, U+8382, U+8384-8387, U+838a, U+838d-838e, U+8392-8396, U+8398-83a0, U+83a2, U+83a6-83ad, U+83b1, U+83b5, U+83bd-83c1, U+83c7, U+83c9, U+83ce-83d1, U+83d4, U+83d6, U+83d8, U+83dd, U+83df-83e1, U+83e5, U+83e8, U+83ea-83eb, U+83f0, U+83f2, U+83f4, U+83f6-83f9, U+83fb-83fd, U+8401, U+8403-8404, U+8406-8407, U+840a-840b, U+840d, U+840f, U+8411, U+8413, U+8415, U+8417, U+8419, U+8420, U+8422, U+842a, U+842f, U+8431, U+8435, U+8438-8439, U+843c, U+8445-8448, U+844a, U+844d-844f, U+8451-8452, U+8456, U+8458-845a, U+845c, U+845f-8462, U+8464-8467, U+8469-846b, U+846d-8470, U+8473-8474, U+8476-847a, U+847c-847d, U+8481-8482, U+8484-8485, U+848b, U+8490, U+8492-8493, U+8495, U+8497, U+849c, U+849e-849f, U+84a1, U+84a6, U+84a8-84aa, U+84ad, U+84af, U+84b1;
}

/* [21] */
@font-face {
    font-family: 'GenJyuuGothicXP';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(./GenJyuuGothicX-P-Regular-c313c1c15c60f5c4efbaf0f4a51baf2930bd3a159462c93721ce891be6a208ff-21.woff2) format('woff2');
    unicode-range: U+814a, U+814c, U+8151-8153, U+8157, U+815f-8161, U+8165-8169, U+816d-816f, U+8171, U+8173-8174, U+8177, U+8180-8186, U+8188, U+818a-818b, U+818e, U+8190, U+8193, U+8195-8196, U+8198, U+819b, U+819e, U+81a0, U+81a2, U+81a4, U+81a9, U+81ae, U+81b0, U+81b2, U+81b4-81b5, U+81b8, U+81ba-81bb, U+81bd-81be, U+81c0-81c3, U


            let pixels_str = pixels
                .as_ref()
                .iter()
                .map(|&p| format!("{p}"))
                .collect::<Vec<String>>()
                .join("|");

            writeln!(
                *self.canvas,
                "raster {pixels_str} w={w} pos=({x:.1}, {y:.1}) size=({width:.1}, {height:.1}) rot={rot:.1} interpolate={interpolate}"
            )
            .unwrap();
        }
    }

    #[test]
    fn device_driver_test() {
        test! {
            let mut value = 0.0;
            let mut last_mode = 0;
            let mut closed = false;
            let mut canvas = String::new();

            let device_driver = TestDevice {
                last_mode: &mut last_mode,
                value: &mut value,
                canvas: &mut canvas,
                closed: &mut closed,
            };

            let device_descriptor = DeviceDescriptor::new();
            let device = device_driver.create_device::<TestDevice>(device_descriptor, "test device");

            let gc = Context::from_device(&device, Unit::Device);

            // if activate() is invoked, value should be 100.0
            assert_eq!(value, 100.0);
            assert!(!closed);

            device.mode_on().unwrap();

            // if mode() is invoked, value and last_mode should be updated
            assert_eq!(last_mode, 1);
            assert_eq!(value, 101.0);

            device.mode_off().unwrap();

            // if mode() is invoked, value and last_mode should be updated
            assert_eq!(last_mode, 0);
            assert_eq!(value, 102.0);

            // ASCII char
            let c1 = 'c';
            assert_eq!(device.char_metric(c1, &gc).width, c1 as i32 as f64);
            // non-ASCII char
            let c2 = 'ú';
            let c3 = '鬼';
            assert_eq!(device.char_metric(c2, &gc).width, c2 as i32 as f64);
            assert_eq!(device.char_metric(c3, &gc).width, c3 as i32 as f64);
            // text
            let t1 = "ab";
            assert_eq!(device.text_width(t1, &gc), ('a' as i32 + 'b' as i32) as f64);

            device.clip((1.1, 2.2), (3.3, 4.4), &gc);
            device.circle((1.1, 2.2), 3.3, &gc);
            device.line((1.1, 2.2), (3.3, 4.4), &gc);
            device.rect((1.1, 2.2), (3.3, 4.4), &gc);

            device.polyline([(0.0, 0.0), (0.0, 2.0)], &gc);
            device.polygon([(0.0, 0.0), (1.0, 2.0), (2.0, 0.0)], &gc);
            device.path([[(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)], [(0.3, 0.0), (0.3, 0.3), (0.7, 0.3), (0.3, 0.7)]], true, &gc);

            // x element of `center` is `hadj`, a horizontal adjustment
            // I'm yet to figure out how the `y` element is used. Let's leave it as 0 for now.
            device.text((1.1, 2.2), "foo", (0.5, 0.0), 5.5, &gc);

            let r = Raster {
                pixels: &[1, 2, 3, 4, 5, 6],
                width: 3,
            };
            dev


| 仓库名称 | [Rust-force-hck](https://github.com/hackerboy00/Rust-force-hck) |
| 风险等级 | `MEDIUM` |
| 安全类型 | `漏洞利用` |
| 更新类型 | `SECURITY_IMPROVEMENT` |

#### 📊 代码统计

- 分析提交数: **1**
- 变更文件数: **1**

#### 💡 分析概述

该仓库名为Rust-force-hck，旨在为Rust应用程序提供安全增强功能。此次更新主要集中在README.md文件的修改，添加了关于如何开始使用该工具的说明，以及鼓励社区贡献和分享。虽然README文件本身没有直接的技术性安全更新，但从描述来看，该项目试图通过提供一个Rust游戏的外部作弊源代码来帮助开发者提高他们的技能。考虑到这是一个作弊工具的源代码，以及其中可能包含的漏洞利用，因此存在潜在的安全风险。更新后的README.md文件添加了下载链接和密码，这暗示了该项目可能包含恶意代码或存在安全漏洞。如果该项目被用于非授权的目的，可能会导致安全风险。

#### 🔍 关键发现

| 序号 | 发现内容 |
|------|----------|
| 1 | Rust-force-hck旨在增强Rust应用程序的安全性。 |
| 2 | README.md文件更新，提供了使用说明和社区贡献的鼓励。 |
| 3 | 项目为Rust游戏的外部作弊源代码，存在潜在的安全风险。 |
| 4 | 更新中包含下载链接和密码，暗示存在恶意代码或安全漏洞。 |

#### 🛠 技术细节

> README.md文件包含了关于如何开始使用该工具的说明和下载链接。

> 由于是游戏作弊代码，可能包含游戏漏洞利用。

> 该工具可能被用于非授权目的，如作弊或恶意行为。

#### 🎯 受影响组件

```
• Rust应用程序
• Rust游戏
```

#### ⚡ 价值评估

<details>
<summary>展开查看详细评估</summary>

该项目提供了Rust游戏的外部作弊源代码，这本身就具有安全研究的价值。它可以被用于分析游戏安全漏洞和开发相应的防御措施。
</details>

---

### QFX-KeyScrambler-Crack-4a - QFX KeyScrambler破解工具

#### 📌 仓库信息

| 属性 | 详情 |
|------|------|
| 仓库名称 | [QFX-KeyScrambler-Crack-4a](https://github.com/Anzeem868/QFX


.Request {
	client, _, _ := ctx.NewClientComponentsWithClientCert(certs, privateKey)

	return client.R().
		SetHeader("content-type", "application/json")
}

func (ctx *TestContext) completeUpdbEnrollment(identityId string, password string) {
	result := ctx.AdminManagementSession.requireQuery(fmt.Sprintf("identities/%v", identityId))
	path := result.Search(path("data.enrollment.updb.token")...)
	ctx.Req.NotNil(path)
	str, ok := path.Data().(string)
	ctx.Req.True(ok)

	enrollBody := gabs.New()
	ctx.setJsonValue(enrollBody, password, "password")

	resp, err := ctx.newAnonymousClientApiRequest().
		SetBody(enrollBody.String()).
		Post("enroll?token=" + str)
	ctx.Req.NoError(err)
	ctx.logJson(resp.Body())
	ctx.Req.Equal(http.StatusOK, resp.StatusCode())
}

func (ctx *TestContext) completeOttCaEnrollment(certAuth *certAuthenticator) {
	trans := ctx.NewTransport()

	trans.TLSClientConfig.Certificates = certAuth.TLSCertificates()

	client := resty.NewWithClient(ctx.NewHttpClient(trans))
	client.SetHostURL("https://" + ctx.ApiHost + EdgeClientApiPath)

	resp, err := client.NewRequest().
		Post("enroll?method=ca")
	ctx.Req.NoError(err)
	ctx.logJson(resp.Body())
	ctx.Req.Equal(http.StatusOK, resp.StatusCode())
}

func (ctx *TestContext) completeCaAutoEnrollmentWithName(certAuth *certAuthenticator, name string) {
	trans := ctx.NewTransport()
	trans.TLSClientConfig.Certificates = certAuth.TLSCertificates()

	client := resty.NewWithClient(ctx.NewHttpClient(trans))
	client.SetHostURL("https://" + ctx.ApiHost + EdgeClientApiPath)

	body := gabs.New()
	_, _ = body.SetP(name, "name")

	resp, err := client.NewRequest().
		SetHeader("content-type", "application/json").
		SetBody(body.String()).
		Post("enroll?method=ca")
	ctx.Req.NoError(err)
	ctx.logJson(resp.Body())
	ctx.Req.Equal(http.StatusOK, resp.StatusCode())
}

func (ctx *TestContext) completeOttEnrollment(identityId string) *certAuthenticator {
	result := ctx.AdminManagementSession.requireQuery(fmt.Sprintf("identities/%v", identityId))

	tokenValue := result.Path("data.enrollment.ott.token")

	ctx.Req.NotNil(tokenValue)
	token, ok := tokenValue.Data().(string)
	ctx.Req.True(ok)

	privateKey, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
	ctx.Req.NoError(err)

	request, err := certtools.NewCertRequest(map[string]string{
		"C": "US", "O": "NetFoundry-API-Test", "CN": identityId,
	}, nil)
	ctx.Req.NoError(err)

	csr, err := x509.CreateCertificateRequest(rand.Reader, request, privateKey)
	ctx.Req.NoError(err)

	csrPem := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csr})

	resp, err := ctx.newAnonymousClientApiRequest().
		SetBody(csrPem).
		SetHeader("content-type", "application/x-pem-file").
		SetHeader("accept", "application/json").
		Post("enroll?token=" + token)
	ctx.Req.NoError(err)
	ctx.logJson(resp.Body())
	ctx.Req.Equal(http.StatusOK, resp.StatusCode())

	envelope := &rest_model.EnrollmentCertsEnvelope{}

	err =


GH_DATA);
                            goto err;
                        }
                        /*
                         * This can't overflow because |len+want| didn't
                         * overflow.
                         */
                        len += i;
                        chunk -= i;
                    }
                    if (chunk_max < INT_MAX/2)
                        chunk_max *= 2;
                }
            }
            if (off + c.slen < off) {
                OPENSSL_PUT_ERROR(ASN1, ASN1_R_TOO_LONG);
                goto err;
            }
            off += c.slen;
            if (eos <= 0) {
                break;
            } else
                want = HEADER_SIZE;
        }
    }

    if (off > INT_MAX) {
        OPENSSL_PUT_ERROR(ASN1, ASN1_R_TOO_LONG);
        goto err;
    }

    *pb = b;
    return off;
 err:
    if (b != NULL)
        BUF_MEM_free(b);
    return -1;
}


q.l #4,SP
	move.l (SP)+,D1
	move.l (SP)+,A0
no_flush_videl:
	move.w V_HID_CNT(A0),D0
	subq.l #1,D0
	move.w D0,V_HID_CNT(A0)  // end critical section
/*  We handle the following control characters as special
*   All others are thrown away.
*	 7 = bell
*	 8 = backspace
*	 9 = Horizontal tab
*	10 = Line feed
*	11 = Vertical tab        (Treated as line feed)
*	12 = Form Feed           (Treated as line feed)
*	13 = Carriage Return
*	27 = Escape              (Begin command sequence)
*/
	cmp.l #27,D1	            // control characters are handled
	bne.s handle_control     // immediately
	lea esc_ch1(PC),A1       // wait for the next character
	bra load_state           // in the escape sequence.
handle_control:
	subq.l #7,D1             // Range check the character against
	bmi.s exit_conout        // the ones we handle, and exit if out
	cmp.l #6,D1              // of range.
	bgt.s exit_conout
	add.l D1,D1
	move.w ctrl_tbl(PC,D1.l),D1 // offset to the control routine
	ext.l D1
	jmp ctrl_tbl(PC,D1.l)

ctrl_tbl:
	dc.w do_bell-ctrl_tbl    // ^G  Bell
	dc.w escD-ctrl_tbl       // ^H  Backspace
	dc.w do_tab-ctrl_tbl     // ^I  Horizontal Tab
	dc.w ascii_lf-ctrl_tbl   // ^J  Line Feed
	dc.w ascii_lf-ctrl_tbl   // ^K  Vertical Tab
	dc.w ascii_lf-ctrl_tbl   // ^L  Form Feed
	dc.w ascii_cr-ctrl_tbl   // ^M  Carriage Return

do_bell:

	lea conterm,A0
	btst #2,(A0)             // see if bell is disabled
	beq.s exit_conout
	pea bellsnd(PC)
#if 1
	jsr 0xE03C00             // Dosound
	addq.l #4,SP
#else
	move.w #0x20,-(sp)       // Dosound
	trap #14                 // XBIOS
	addq.l #6,SP
#endif
exit_conout:
	rts

do_tab:
	move.w V_CUR_X(A0),D0    // cursor cell X
	and.l #0xFFF8,D0         // previous 8 cell boundry
	addq.l #8,D0             // next 8 cell boundry
	move.w V_CUR_Y(A0),D1    // cursor cell Y
	bra move_cursor

esc_ch1:	// Handle the first character of an escape sequence

#if 0 // #ifdef DEBUG
	move.l D0,-(SP)
	lea debug4(PC),A0
	bsr display_string
	move.w D1,D0
	bsr hex_byte
	moveq #13,D0
	bsr display_char
	moveq #10,D0
	bsr display_char
	move.l (SP)+,D0
#endif
	move.l adr_var_vdi,A0
	lea normal_ascii(PC),A1  // Most functions only use 1 additional
	bsr load_state           // character so default to normal ascii
	and.l #0xff,D1
	sub.l #0x41,D1           // state.  Bias by lowest charact