並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 117件

新着順 人気順

bitwiseの検索結果1 - 40 件 / 117件

  • テストの説明に安易に「正しく」とか書かない - Object.create(null)

    みなさんテストは書いていますよね. 書いていなければふりだしに戻る. 例えば関数 add に対して, 以下のようなテストコードがあるとします. describe("add", () => { it("正しく計算できる", () => { expect(add(1, 2)).toBe(3); }); }); よさそうですね? もしよくないと思うのであればここから下は読まなくても大丈夫なくらい理解している方だと思います. 続いて関数名を変えただけのこちらをどうぞ. describe("sub", () => { it("正しく計算できる", () => { expect(sub(1, 2)).toBe(3); }); }); なんだか明らかに間違っている気がします. もしこのテストが通過してしまったとき我々はどうすればよいのでしょうか. 考えられるパターンは 2 つあります. 実装もテストも正

      テストの説明に安易に「正しく」とか書かない - Object.create(null)
    • iptablesの後に来るものは何か?: nftables - 赤帽エンジニアブログ

      この記事はRed Hat DeveloperのWhat comes after ‘iptables’? Its successor, of course: nftablesを、許可をうけて翻訳したものです。 ::: By Florian Westphal October 28, 2016 ::: パフォーマンス: ユーザビリティ: nftablesとは何ですか? 何が置き換えられますか? なぜiptablesを置き換えるのか? nftablesでの高水準な機能 判断マップ(ジャンプテーブル) flow文 inetファミリー はじめる チェーンの追加 NAT 既知の制限 関連記事 nftablesは、既存のiptables、ip6tables、arptables、ebtablesを置き換えることを目指した、新たなパケット分類フレームワークです。これは、長く使われてきた ip/ip6table

        iptablesの後に来るものは何か?: nftables - 赤帽エンジニアブログ
      • JavaScript で学ぶビット演算の基礎

        唐突にビット演算の話です。今回は本当に基礎的な事しか書きませんので、ある程度のレベルの方には常識レベルの話になることをご承知ください。 近年のプログラミング環境で、ビットを意識する機会はほとんど無くなりました。プログラミングの抽象化が進んだおかげで良いことだと思います。今や知らないのが普通なのかもしれません。しかし、もしちょっと低レイヤーな処理を書く機会があった時に、今までの私達にとっては常識レベルであった知識であっても、重要度が下がり学ぶ機会も無くなってしまったが故に、知らない人はそこで躓いてしまう可能性が高いことに気が付きました。この記事は、普段のプログラミングにはあまり必要のないビット演算を、とりあえずこれだけ知っておけばその先は自力でなんとかなるかな、というレベルまで解説したいと思います。 解説は JavaScript を使って行いますが、基本は他の言語でも同じです。 JavaSc

        • Everything you need to know from ES2016 to ES2019

          JavaScript is a language in constant evolution and in the past few years many new features have been added to the ECMAScript specification. This article is an extract of my book Complete Guide to Modern JavaScript and it covers the new additions of ES2016, ES2017, ES2018, ES2019. At the end of the article you will find a link to download a cheatsheet that summarizes everything. Everything new in E

            Everything you need to know from ES2016 to ES2019
          • 50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs

            50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs 50 Shades of Go in Other Languages Chinese Translation: blog post, segmentfault (by wuYin) - needs updates Another Chinese Translation: blog post (by Shadowwind LEY) - needs updates Russian Translation: blog post (by Ilia Ozhereliev, Mail.Ru Group Blog) - needs updates Overview Go is a simple and fun language, but, like any o

            • The Development of the C Language

              The Development of the C Language* Dennis M. Ritchie Bell Labs/Lucent Technologies Murray Hill, NJ 07974 USA dmr@bell-labs.com ABSTRACT The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the typeless language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager progr

              • Prettier 3.0: Hello, ECMAScript Modules! · Prettier

                We are excited to announce the release of the new version of Prettier! We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. This update comes with several breaking changes. One notabl

                  Prettier 3.0: Hello, ECMAScript Modules! · Prettier
                • Hypervisor Development in Rust Part 1

                  Intel VT-x Hypervisor Development in RustThis article will cover the development of a minimalistic Intel VT-x research hypervisor in Rust. We will use the x86 crate and documentation, which help simplify the code. Credit and acknowledgments are given to the following individuals and their respective blogs or repositories for their invaluable contributions and references: @daax_rynd, @Intel80x86, @

                  • オプショナルチェーン (?.) - JavaScript | MDN

                    JavaScript チュートリアル: 初級編 JavaScript の基礎 JavaScript の第一歩 JavaScript の構成要素 JavaScript オブジェクト入門 JavaScript ガイド 入門編 文法とデータ型 制御フローとエラー処理 ループとイテレーター 関数 式と演算子 数と日付 テキスト処理 正規表現 インデックス付きコレクション キー付きコレクション オブジェクトを利用する Using classes プロミスの使用 イテレーターとジェネレーター メタプログラミング JavaScript モジュール 中級編 クライアントサイド JavaScript フレームワーク クライアントサイド Web API Language overview JavaScript のデータ構造 等値比較と同一性 プロパティの列挙可能性と所有権 クロージャ 上級編 継承とプロトタイ

                      オプショナルチェーン (?.) - JavaScript | MDN
                    • Cassette

                      Cassette is a small, Lisp-like programming language. It looks like this: import List import Math import Canvas import System let width = 800, height = 480, canvas = Canvas.new(width, height) canvas.text("Lines!", {200, 2}) System.seed(System.time()) def rand-line(i) do let x0 = Math.floor(i * width / 100), y0 = Math.rand-int(20, height / 10), x1 = Math.rand-int(0, width), y1 = Math.rand-int(20, he

                      • Dive Deep Redis ~ 入門から実装の確認まで - hayashier Tech Blogs

                        ——————————————————————————————————————————————————— Redis(REmote DIrectory Server)Redisは例えば以下の特徴を持つLLOOGGを元としたインメモリの非リレーショナルのデータベースです。 String, List, Hash, Set, Sorted Setに代表される豊富なデータ型シングルスレッド処理イベント駆動処理 by aeライブラリ通常RESPプロトコルによるクライアント/サーバーモデルでリクエスト/レスポンスデータは条件を満たす場合にメモリ最適化されて保存。CPUとのトレードオフRAXを利用したメモリ利用量の最適化(Redis 4.0~)この記事では、入門から始まり、実装をより意識することで深く理解することを目標としています。 以下の説明中の(*)マークは、特にVanilla Redisでの話となり

                          Dive Deep Redis ~ 入門から実装の確認まで - hayashier Tech Blogs
                        • Deep learning等の精度評価に便利なPyCMの紹介と各種指標の比較 - OPTiM TECH BLOG

                          OPTiM TECH BLOG Advent Calendar 2020 12/8 の記事です。 お久しぶりです。R&Dの加藤です。最近買った大きな買い物はDAHONのK3です。 購入したのは8月末ですが、11月に入るまでスタンドが手に入らなかったです。現状の不満点は空気が入れにくいという事だけですね。輪行するには最適な自転車です。 去年執筆したこの記事はいまだに定期的にアクセスがあって嬉しいですね。まだ読んでない方は是非こちらも読んでみてください。 今回の記事はこれの補足に加え、コードを加えた実践的な内容になります。 tech-blog.optim.co.jp 記事執筆のモチベーションとしては、「最近PyCMというライブラリを使い始めたら思いのほか便利だったので伝えたい」という事なんですが、なかなかボリュームのある記事になってしまいました。忙しい人は必要な章だけかいつまんで読んでください

                            Deep learning等の精度評価に便利なPyCMの紹介と各種指標の比較 - OPTiM TECH BLOG
                          • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                            Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                            • Mastodon: Ruby on Rails Open Source Web App

                              The product https://joinmastodon.org Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, and video. All Mastodon servers are interoperable as a federated network. Open source The project is open source at https://github.com/mastodon/mastodon License

                                Mastodon: Ruby on Rails Open Source Web App
                              • How Uber Deals with Large iOS App Size

                                You’re seeing information for Japan . To see local features and services for another location, select a different city. Show more The App Size Problem Uber’s iOS mobile Apps for Rider, Driver, and Eats are large in size. The choice of Swift as our primary programming language, our fast-paced development environment and feature additions, layered software and its dependencies, and statically linked

                                  How Uber Deals with Large iOS App Size
                                • WebAssembly at the Edge – Vercel

                                  We've been working to make it easier for every developer to build at the Edge, without complicated setup or changes to their workflow. Now, with support for WebAssembly in Vercel Edge Functions, we've made it possible to compile and run Vercel Edge Functions with languages like Rust, Go, C, and more. WebAssembly (Wasm) is a low-level language similar to Assembly. It’s commonly supported by JavaScr

                                    WebAssembly at the Edge – Vercel
                                  • SubRISC+ - 西尾泰和のScrapbox

                                    Here we briefly explain the basics of SubRISC+ to the extent of highlighting our contributions in this paper. SubRISC+ was developed on the basis of a one-instruction set computer (OISC) whose unique instruction is ‘‘subtraction and branch on negative’’ that is capable of realizing any operations and hence is Turing complete. By extending the instruction set architecture (ISA) of this OISC, SubRIS

                                      SubRISC+ - 西尾泰和のScrapbox
                                    • Performance of WebAssembly runtimes in 2023 | Frank DENIS random thoughts.

                                      Using libsodium in a web browser has been possible since 2013, thanks to the excellent Emscripten project. Since then, WebAssembly was introduced. A more efficient way to run code not originally written in JavaScript in a web browser. And libsodium added first-class support for WebAssembly in 2017. On web browsers supporting it, in allowed contexts allowing it,this gave a nice speed boost. Like Ja

                                      • 0.8.0 Release Notes ⚡ The Zig Programming Language

                                        Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                        • Python: featuretools ではじめる総当り特徴量エンジニアリング - CUBE SUGAR CONTAINER

                                          今回は featuretools というパッケージを用いた総当り特徴量エンジニアリング (brute force feature engineering) について書いてみる。 総当り特徴量エンジニアリングは、実際に効くか効かないかに関係なく、考えられるさまざまな処理を片っ端から説明変数に施して特徴量を作るというもの。 一般的にイメージする、探索的データ分析などにもとづいて特徴量を手動で作っていくやり方とはだいぶアプローチが異なる。 そして、featuretools は総当り特徴量エンジニアリングをするためのフレームワークとなるパッケージ。 使った環境は次の通り。 $ sw_vers ProductName: Mac OS X ProductVersion: 10.14.6 BuildVersion: 18G1012 $ python -V Python 3.7.5 もくじ もくじ 下準備

                                            Python: featuretools ではじめる総当り特徴量エンジニアリング - CUBE SUGAR CONTAINER
                                          • Beej's Guide to Network Programming

                                            Wait! You also have to make a call to WSAStartup() before doing anything else with the sockets library. You pass in the Winsock version you desire to this function (e.g. version 2.2). And then you can check the result to make sure that version is available. The code to do that looks something like this: #include <winsock2.h> { WSADATA wsaData; if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { fprin

                                            • New in PHP 8 - stitcher.io

                                              What's new in PHP 8 PHP 8 was released on November 26, 2020. You can download it here. It's a new major version, which means that there are some breaking changes, as well as lots of new features and performance improvements. Because of the breaking changes, there's a higher chance you'll need to make some changes in your code to get it running on PHP 8. If you've kept up to date with the latest re

                                                New in PHP 8 - stitcher.io
                                              • 2019-08-13のJS: React 16.9.0正式リリース、Image lazy-loading、Web API in Node.js

                                                JSer.info #448 - 先週RC版が公開されたReact 16.9.0の正式版がリリースされました。 React v16.9.0 and the Roadmap Update – React Blog 次のコンポーネントのライフサイクルメソッドに警告を表示するようになりました。 これらのメソッドはReact 17.xで削除されます。 componentWillMount componentWillReceiveProps componentWillUpdate これらのライフサイクルメソッドは、react-codemodのrename-unsafe-lifecyclesを使うことでUNSAFE_* prefixのライフサイクルメソッドにリネームできます。 このUNSAFE_* prefixのライフサイクルメソッドは17.xでも動作が維持されます。 componentWillMou

                                                  2019-08-13のJS: React 16.9.0正式リリース、Image lazy-loading、Web API in Node.js
                                                • Lezer

                                                  I keep coming across people who consider parser technology a forbidding, scary field of programming. This is nonsense—a small parser can be very, very simple, and provide a wholesome exercise in recursive thinking. At the same time, it is true that you can make parsing extremely complicated. Mostly, this tends to happen when you generalize parsing techniques to work for different grammars. Since c

                                                  • Let's Build a Compiler 01: Starting Out - The General Problem

                                                    Compilers, interpreters, runtimes, and the like can sometimes feel vaguely magical. They take your code, perform complex transformations that you only partially understand, and spit out an executable binary. Clearly, the inner workings of such a beast must contain arcane secrets, not meant for the minds of mortals. Of course, even if it feels that way sometimes, that doesn't make it true. As with

                                                    • x86_64 プログラミング入門

                                                      レジスタと算術演算 好きなエディタを開いて、add.s というテキストファイルを作り、中に以下のように書く x8664_asm_language/add.s .globl main main: add $1, %rax ret 続いて、gcc を使って、これを実行ファイルに変換する。 $ gcc add.s $ ls add.s a.out 間違いがなければ、同じディレクトリに、a.out という実行ファイルができているはずだ。 次に、gdb に a.out を指定して起動する。(デバッガは、CPUやメモリの状態を調べるのに、非常に有用なツールである。必要な使いかたは都度説明するが、可能ならば色々な使いかたを知っておくことをおすすめする) $ gdb a.out GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 Copyright (C) 2016

                                                      • To Learn a New Language, Read Its Standard Library - Pat Shaughnessy

                                                        If I was learning to read English as a foreign language, I would need something simple to get started. (from The Remarkable Story of Chicken Little, 1840) The best way to learn a new programming language, just like a human language, is from example. To learn how to write code you first need to read someone else’s code. But who is the best person to learn from? Which code should we read? Where shou

                                                        • A Lisp Interpreter Implemented in Conway’s Game of Life

                                                          Lisp in Life is a Lisp interpreter implemented in Conway’s Game of Life. The entire pattern is viewable on the browser here. To the best of my knowledge, this is the first time a high-level programming language was interpreted in Conway’s Game of Life. Running Lisp on the Game of Life Lisp is a language with a simple and elegant design, having an extensive ability to express sophisticated ideas as

                                                            A Lisp Interpreter Implemented in Conway’s Game of Life
                                                          • Introducing Wolfi: The first Linux (un)distro designed for securing the software supply chain

                                                            Introducing Wolfi: The first Linux (un)distro designed for securing the software supply chain The massive push for software supply-chain integrity and transparency has left organizations struggling to secure their pipelines and manage vulnerabilities. Existing tooling doesn’t support supply chain security natively and requires users to bolt on critical features like signatures, provenance, and sof

                                                              Introducing Wolfi: The first Linux (un)distro designed for securing the software supply chain
                                                            • Ruby 3.3’s YJIT: Faster While Using Less Memory

                                                              This year, the YJIT team has been working hard to improve and optimize YJIT. We’re proud to say that the version of YJIT to be included with Ruby 3.3 is leaps and bounds ahead of Ruby 3.2’s. It provides better performance across the board, while also warming up faster and using less memory. The 3.3 release is also more robust, including a number of bug fixes along with an improved test suite. In t

                                                                Ruby 3.3’s YJIT: Faster While Using Less Memory
                                                              • FPGA design for Software Engineers // Walk N' Squalk Coding Blog

                                                                Over the last few years I’ve gotten more interested in electronics and FPGA design. I’ve also noticed that a lot of other software folks seem interested in doing the same, but often don’t know where to start. So, I think I have some interesting advice for software engineers that feel like dipping their toes into the hardware world from the point of view of a software engineer. In this post I’ll go

                                                                • YOLOv8でナンバープレートを検出してAI-OCRで読み取ってみました。 〜ファインチューニングに使用したデータは、撮影した写真ではなく、Pythonで生成した画像(30,000枚・192,000アノテーション)です〜 | DevelopersIO

                                                                  5 AI-OCR AI-OCRとしては、MicrosoftのComputer Visionで提供されている、Read APIを使用させて頂きました。 参考: Computer Vision 3.2 GA Read API を呼び出す 最初は、ナンバープレート画像を、そのままOCRにかけてみたのですが、下段左の平仮名1文字のところの認識が難しいようでした。これは、このように「ひらがな」1文字だけが配置されることに、モデルが対応しきれていないような気がしました。 対策として、画像を3つの部分に分割し、それぞれでOCRにかけるようにしてみました。また、認識精度が上がるように、業務用(緑バックの白文字、及び、黒バックの黄色文字)は、ネガポジ反転し、最終的にグレースケール変換することにしました。 AI-OCRで処理しているコードと、それを使っている、全体のコードです。 ocr.py import t

                                                                    YOLOv8でナンバープレートを検出してAI-OCRで読み取ってみました。 〜ファインチューニングに使用したデータは、撮影した写真ではなく、Pythonで生成した画像(30,000枚・192,000アノテーション)です〜 | DevelopersIO
                                                                  • ラズパイとSORACOMで子豚の出産通知を作ってみた - Qiita

                                                                    これらを組み合わせてこのようなものを作りました。 これを豚舎に設置して、高い位置から子豚の様子を撮影しています。 処理の概要 処理の流れはこのようになっていて、これらの処理を30分周期で行ってます。 全てを紹介するのは大変なので、それぞれの関数について処理のポイントを紹介したいと思います。 写真を撮影して、親豚の位置を判定 子豚の有無を判定 日付、温度、湿度、子豚のチェック結果を写真に記載 認識エリアの合成 GoogleDriveのフォルダに同期 子豚が産まれていたらLINE通知 1.写真を撮影して親豚の位置を判定 最初に装置を作って豚舎に置いたときに、撮影する場所によって親豚が右に映る場合と左に映る場合がありました。 なのでまずは親豚の位置を判定する学習モデルを作成しました。 学習精度を上げるために、画像を白黒にしたものをlobeに読み込ませて学習します。 lobeについてはこちら 学習

                                                                      ラズパイとSORACOMで子豚の出産通知を作ってみた - Qiita
                                                                    • Writing a simple 16 bit VM in less than 125 lines of C

                                                                      This tutorial is intended for C beginners who want to do some coding practice and in the process, gain valuable insights regarding low-level programming and how (some) Virtual Machines operate under the hood. By the end of the article, we will have a working register-based VM capable of interpreting and running a limited set of ASM instructions + some bonus programs to test if everything works wel

                                                                      • All C++20 core language features with examples

                                                                        Introduction The story behind this article is very simple, I wanted to learn about new C++20 language features and to have a brief summary for all of them on a single page. So, I decided to read all proposals and create this “cheat sheet” that explains and demonstrates each feature. This is not a “best practices” kind of article, it serves only demonstrational purpose. Most examples were inspired

                                                                        • Everything you ever wanted to know about terminals

                                                                          so here's a short tutorial on ansi escape codes and terminal control, because you philistines won't stop using ncurses and oh my god WHY ARE WE STILL USING NCURSES IT IS THE TWENTY FIRST FUCKING CENTURY the way terminal emulators handle fancy things like color and cursor shape aren't some mysterious opaque black box you can only access through a library. accessing most of these capabilities is act

                                                                          • Reverse Engineering Tiktok's VM Obfuscation (Part 1)

                                                                            TikTok has a reputation for its aggressive data collection. In fact, an article published on 22 December 2022 uncovered how ByteDance spied on multiple Forbes journalists using TikTok. While some of the data they collect may seem benign, it can be used to build a detailed profile of each user. Information such as user location, device type, and various hardware metrics are combined to create a uni

                                                                            • ビットコインが4年ぶりのメジャーアップデート「Taproot」を導入

                                                                              仮想通貨最大手のビットコインに、署名方式を「シュノア署名」に切り替えて取引のプライバシーとセキュリティを向上させるメジャーアップデート「Taproot」が導入されました。案としては2018年に提出されたもので、3年越しの実装となります。 Bitcoin's long-anticipated Taproot upgrade is activated https://www.theblockcrypto.com/linked/124276/bitcoin-taproot-activated What investors should know about the bitcoin Taproot upgrade https://www.cnbc.com/2021/11/12/what-investors-should-know-about-the-bitcoin-taproot-upgrade.

                                                                                ビットコインが4年ぶりのメジャーアップデート「Taproot」を導入
                                                                              • Opciones Binarias Recetor: 100 Accurate Binary Options Indicator

                                                                                Visiteurs depuis le 25/01/2019 : 6381 Connectés : 1 Record de connectés : 15 5 dollar 100 accurate binary option indicator for mt4 Posted on Mar 18, 2015 by in Page turtle trading is not repaint mt4 2014 much better. Minimum deposit basics 101 open an eight year. Tallahassee up domain help in simple. Elective methods ny: minute binary. Clients can decide to regular moment beat the banking options

                                                                                  Opciones Binarias Recetor: 100 Accurate Binary Options Indicator
                                                                                • Darker Corners of Go – Rytis Biel

                                                                                  Note: this article is available as an ebook and as a printed book for easier reading Introduction What is this? When I was first learning Go, I already knew several other programming languages. But after reading an introductory book and the language specification I felt like I really didn’t know enough about Go to use it for real world work. I felt I’d probably need to fall into many traps before

                                                                                    Darker Corners of Go – Rytis Biel