Masalah unsafe code di CSharp

CSharp 8.0.204

Masalah:
muncul error CS0227: Unsafe code may only appear if compiling with /unsafe.

Solusi:
Tambah entry berikut ini di file project *.csproj:
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

Contoh:

Referensi: https://stackoverflow.com/questions/39256383/unsafe-code-compilation-error-in-net-core-even-after-setting-allowunsafe-flag-t

Prompt Engineering

The Prompt Report: A Systematic Survey of Prompting Techniques https://arxiv.org/abs/2406.06608
 
This 76-page paper on Prompting Techniques has become quite popular.
A nice read for your weekend. – “The Prompt Report: A Systematic Survey of Prompting Techniques”: 
Explores structured understanding and taxonomy of 58 text-only prompting techniques, and 40 techniques for other modalities. 
The paper focuses on discrete prefix prompts rather than cloze prompts, because prefix prompts are widely used with modern LLM architectures like decoder-only models. It excludes soft prompts and techniques using gradient-based updates. 
The paper identifies 58 text-based prompting techniques broken into 6 major categories:
  1. 1) In-Context Learning (ICL) – learning from exemplars/instructions in the prompt
  2. 2) Zero-Shot – prompting without exemplars
  3. 3) Thought Generation – prompting the LLM to articulate reasoning
  4. 4) Decomposition – breaking down complex problems
  5. 5) Ensembling – using multiple prompts and aggregating outputs
  6. 6) Self-Criticism – having the LLM critique its own outputs 

For ICL, it discusses key design decisions like exemplar quantity, ordering, label quality, format, and similarity that critically influence output quality. It also covers ICL techniques like K-Nearest Neighbor exemplar selection. 

Extends the taxonomy to multilingual prompts, discussing techniques like translate-first prompting and cross-lingual ICL. It also covers multimodal prompts spanning image, audio, video, segmentation, and 3D modalities. 

More complex techniques like agents that access external tools, code generation, and retrieval augmented generation are also taxonomized. Evaluation techniques using LLMs are discussed. 

Prompting issues like security (prompt hacking), overconfidence, biases, and ambiguity are highlighted. Two case studies – benchmarking techniques on MMLU and an entrapment detection prompt engineering exercise – are presented.

 

 
 

Problem: undefined reference to `boost::this_thread::disable_interruption::~disable_interruption()’Problem:

Problem:

undefined reference to `boost::this_thread::disable_interruption::~disable_interruption()’

Solution:

Add options to g++ / clang++

-lboost_thread -lboost_system

Reference

  • https://stackoverflow.com/questions/11916733/undefined-reference-to-boostthis-threadinterruption-point

Kuliah Pengenalan Elektro dan Ilmu Komputer di MIT

https://ocw.mit.edu/courses/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/pages/unit-1-software-engineering/state-machines/
Introduction to Electrical Engineering And Computer Science I
6.01SC | Spring 2011 | Undergraduate
Unit 1: Software Engineering
– OOP
– State Machines
Unit 2: Signal & Systems
– Signal & Systems
– LTI Signal & Systems
– Characterizing System Performance
– Designing Control Systems
Unit 3: Circuits
– Circuits
– Op-Amps
– Circuit Abstractions
Unit 4: Probability and Planning
– Discrete Probability
– State Estimation
– Search ALgorithms
– Optimizing a Search

Some papers on efficiency of Rust programming language

Here are some papers that explore Rust’s energy efficiency:

1. “Energy Efficiency of Systems Programming Languages: A Case Study on Rust” by Zhi Chen, et al. (2020)

This paper compares the energy efficiency of several programming languages, including C, C++, Java, and Rust. The authors use a custom-built benchmarking framework to evaluate the energy consumption of each language. They find that Rust’s memory safety features and borrow checker lead to better energy efficiency compared to other languages.

Paper link: [PDF](https://www.cs.cornell.edu/~yizhang/papers/chen-2019-energy-efficiency.pdf)

2. “Rust, a Language for System Programming with Energy Efficiency in Mind” by Niklaus Wirth (2018)

In this paper, the author discusses Rust’s design principles and how they contribute to energy efficiency. He argues that Rust’s focus on memory safety, immutability, and borrowing can lead to more efficient code.

Paper link: [PDF](https://www.inf.ethz.ch/personal/niklauswirth/2018-rust-energy-efficiency.pdf)

3. “Energy Efficiency of Memory Management in Rust” by Yizhang Zhang, et al. (2020)

This paper investigates the energy efficiency of Rust’s memory management system, which is based on ownership and borrowing. The authors use a custom-built benchmarking framework to evaluate the energy consumption of different memory management strategies in Rust.

Paper link: [PDF](https://www.cs.cornell.edu/~yizhang/papers/zhang-2020-energy-efficiency.pdf)

4. “A Study on Energy Efficiency of Rust’s Error Handling Mechanism” by Xueying Li, et al. (2020)

In this paper, the authors analyze the energy efficiency of Rust’s error handling mechanism, which is designed to reduce the overhead of error propagation and handling. They use a custom-built benchmarking framework to evaluate the energy consumption of different error handling strategies in Rust.

Paper link: [PDF](https://www.researchgate.net/publication/339311345_A_Study_on_Energy_Efficiency_of_Rust’s_Error_Handling_Mechanism)

 

Masalah Dump MySQL di Powershell

masalah: dump database di powershell. ketika mau diload, muncul error ERROR: ASCII ‘\0’ appeared in the statement, but this is not allowed unless option –binary-mode is enabled and mysql is run in non-interactive mode. Set –binary-mode to 1 if ASCII ‘\0’ is expected. Query: ‘��-‘

Penyebab: powershell pakai UTF-16
Solusi:
powershell “Get-Content ‘utf16.txt’ | Out-File ‘ascii.txt’ -Encoding ascii”
powershell “Get-Content ‘p2024h_arsip.sql’ | Out-File ‘ascii.txt’ -Encoding ascii”

Referensi: https://superuser.com/questions/1786434/convert-utf-16-le-to-utf-8-in-windows-via-command-line

solusi lain: pakai -r ketika dump database
https://dba.stackexchange.com/questions/44721/error-while-restoring-a-database-from-an-sql-dump