並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 257件

新着順 人気順

c# switch case string exampleの検索結果1 - 40 件 / 257件

  • Google TypeScript Style Guide

    // Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r

    • Command Line Interface Guidelines

      Contents Command Line Interface Guidelines An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day. Authors Aanand Prasad Engineer at Squarespace, co-creator of Docker Compose. @aanandprasad Ben Firshman Co-creator Replicate, co-creator of Docker Compose. @bfirsh Carl Tashian Offroad Engineer at Smallstep, first e

        Command Line Interface Guidelines
      • Node.jsのMySQLパッケージにおけるエスケープ処理だけでは防げない「隠れた」SQLインジェクション - GMO Flatt Security Blog

        ※本記事は筆者styprが英語で執筆した記事を株式会社Flatt Security社内で日本語に翻訳したものになります。 TL;DR Node.jsのエコシステムで最も人気のあるMySQLパッケージの一つである mysqljs/mysql (https://github.com/mysqljs/mysql)において、クエリのエスケープ関数の予期せぬ動作がSQLインジェクションを引き起こす可能性があることが判明しました。 通常、クエリのエスケープ関数やプレースホルダはSQLインジェクションを防ぐことが知られています。しかし、mysqljs/mysql は、値の種類によってエスケープ方法が異なることが知られており、攻撃者が異なる値の種類でパラメータを渡すと、最終的に予期せぬ動作を引き起こす可能性があります。予期せぬ動作とは、バグのような動作やSQLインジェクションなどです。 ほぼすべてのオンラ

          Node.jsのMySQLパッケージにおけるエスケープ処理だけでは防げない「隠れた」SQLインジェクション - GMO Flatt Security Blog
        • A Vim Guide for Advanced Users

          #Tools #Vim #MouselessA Vim Guide for Advanced UsersWelcome to the third part of this series aimed to help you unleash a power never seen on Earth using the Almighty Vim. We’ll see together in this article: Some nice keystrokes beginning with g.What ranges are and how to use them.The quickfix list and the location lists.The marvelous substitute command.The crazy useful :global (or :g) command.What

            A Vim Guide for Advanced Users
          • 比較的安全にMCPサーバを動かす - LIFULL Creators Blog

            KEELチーム の相原です。 前回のエントリは「小さい経路最適化ミドルウェアを実装してあらゆるAZ間通信を削減する」でした。 www.lifull.blog 今回は、MCPサーバを比較的安全に動かすために色々やってた話を書きたいと思います。 MCPについて MCPサーバのリスク なるべくローカルで動かさない ローカルではせめてDockerで動かす 無理やりHTTP Transportに対応する セッションの開始 コマンドの起動 ペイロードを受け取るためのエンドポイントの実装 まとめ MCPについて MCPはModel Context Protocolの略で、Anthropicが標準化を主導するLLMとその外部を繋ぐプロトコルです。 github.com これによりGitHubやPlaywrightといった外部のツールをLLMが自律的に利用できるようになり、OpenAIもサポートを表明したこ

              比較的安全にMCPサーバを動かす - LIFULL Creators Blog
            • jQuery 4.0.0 BETA! | Official jQuery Blog

              jQuery 4.0.0 has been in the works for a long time, but it is now ready for a beta release! There’s a lot to cover, and the team is excited to see it released. We’ve got bug fixes, performance improvements, and some breaking changes. We removed support for IE<11 after all! Still, we expect disruption to be minimal. Many of the breaking changes are ones the team has wanted to make for years, but co

              • Goで書くテスタブルなCLIツールの作り方 | gihyo.jp

                CLIツールをテストする難しさ ターミナルなどで動作するCLI(コマンドラインインタフェース)ツールは、パッケージを公開して利用してもらうライブラリと比べてテストがしにくいと感じる読者も多いでしょう。 CLIツールは、ファイル/標準入力からの入力や、ファイル/標準出力/標準エラー出力への出力があることが多いです。また、コマンドライン引数やオプション(フラグ)によって変わる挙動のパターンが多いため、網羅的なテストが大変です。 入出力についても単一のファイルを読み書きするだけではなく、ディレクトリごと作成したり、特定のディレクトリ以下を再帰的に読み込むような処理もよくあります。 main関数にすべての処理をすべて書くような作りのCLIツールだと、実際にビルドしてテストスクリプトなどから動かしてテストするしかありません。しかし、せっかくCLIツールをGoで書いているのであれば、テストもGoで書き

                  Goで書くテスタブルなCLIツールの作り方 | gihyo.jp
                • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

                  2/2に12時間というちょうどよい競技時間で開催された。21時終了だったけれども、11時45分ぐらいに最速で全完して1位🎉 第1回以来4年ぶりの優勝だ。昨年大会の第4回ではヒントの閲覧数で優勝を逃してしまって悔しい思いをしたので、雪辱を果たすことができ嬉しい。開始直後からずっと1位を独走できており、450名以上のプレイヤーがいる中で圧勝だったのも嬉しい。 昨年度や一昨年度はバルクが作問を担当していたが、今回はAGESTが担当していた。これまでの問題と比較すると全体的に易化したように思うが、解くにあたって発想の大きな飛躍を必要とするいわゆる「エスパー要素」のある問題はごく一部を除いて存在しておらず*1、よかったと思う。また、昨年度・一昨年度に引き続きwriteupは公開可能というのもよかった。 戦略というほどの戦略は立てていなかったけれども、とりあえずWebを見た後は全カテゴリを上から見て

                    防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
                  • TabFS

                    Going through the files inside a tab's folder. For example, the url.txt, text.txt, and title.txt files tell me those live properties of this tab (Read more up-to-date documentation for all of TabFS's files here.) This gives you a ton of power, because now you can apply all the existing tools on your computer that already know how to deal with files -- terminal commands, scripting languages, point-

                      TabFS
                    • Announcing TypeScript 5.0 - TypeScript

                      Today we’re excited to announce the release of TypeScript 5.0! This release brings many new features, while aiming to make TypeScript smaller, simpler, and faster. We’ve implemented the new decorators standard, added functionality to better support ESM projects in Node and bundlers, provided new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified con

                        Announcing TypeScript 5.0 - TypeScript
                      • Beyond Console.log() – Level up Your Debugging Skills — SitePoint

                        Stay Relevant and Grow Your Career in TechPremium ResultsPublish articles on SitePointDaily curated jobsLearning PathsDiscounts to dev toolsStart Free Trial7 Day Free Trial. Cancel Anytime. You may have established a pattern of coding that utilizes a few key tools offered by your browser’s console. But have you dug any deeper lately? There are some powerful tools available to you, and they might j

                          Beyond Console.log() – Level up Your Debugging Skills — SitePoint
                        • Flutterアプリでのデザインマネジメント - エムスリーテックブログ

                          エンジニアリンググループ 新規プロダクト支援チーム所属の荒谷(@_a_akira)です。 あまり知られていないかもしれませんが弊社では、2019年末から既に6つの新規アプリをFlutterで実装しリリースしています。 先日リリースされたデジカルスマート診療(以降デジスマアプリ)という医療機関向けに予約やキャッシュレス決済を導入・利用できるアプリもFlutterで作成しています。 digikar-smart.jp このサービスの立ち上げからリリースまでの開発期間は約3ヶ月で開発側の人数もPdM1人、アシスタントPdM1人、デザイナー1人、バックエンド2人、WEB フロント(クリニック向け管理画面)1人、アプリ(患者向け, Flutter)1人の構成で開発しています。 このあたりの開発体制については先日記事が上がっているので興味のある方はそちらを見てみてください。 www.m3tech.blo

                            Flutterアプリでのデザインマネジメント - エムスリーテックブログ
                          • マークダウンパーサを作ろう - エムスリーテックブログ

                            デジカル開発メンバーの末永(@asmsuechan)です。電子カルテの開発を通して医師や医療事務の方の「書く」をサポートしています。 みなさん、マークダウンでテキストを書いていますか?私はマークダウンで書くことが好きで、プレーンテキストでもほとんどのメモをマークダウン記法で書いてしまいます。この記事もはてなのマークダウンを使って書いています。*1 マークダウンを使えるサービスを挙げていくとGitHubやStackOverflowなど開発者ならば誰しも知るサービスが多く出てきます。このことからもわかるように、マークダウンはもはや開発者とは縁の切れないものとなっています。 しかし、普段の開発時によく使うマークダウンですが、実際にはどのような仕組みで動いているのかを知る人は少ないのではないかと思います。 この記事ではオリジナルのマークダウンパーサ「minute」をTypeScriptを使ってハン

                              マークダウンパーサを作ろう - エムスリーテックブログ
                            • Bubble Tea でリッチなターミナルアプリケーションを作る #Go - 詩と創作・思索のひろば

                              近年、普段の作業をマウスでやりたくない気持ちが高まっている(デスク周りが散らかってきたせいだという説が有力です)。メールは結局ターミナルでメールを読むことにしたため問題なく過ごせているが、その他のタスクをキーボードだけでやるには、ターミナル動くアプリケーションを作れる必要がある。それもリッチなやつだ。見た目は派手な方がいい。 この記事は Kyoto.go remote #32 LT会 で発表した 入門 Bubble Tea の増補版です。 Bubble Tea とは GitHub - charmbracelet/bubbletea: A powerful little TUI framework 🏗 Bubble Tea とは、Go でリッチなターミナルアプリケーション(TUI)を作るためのフレームワーク。Charm というプロジェクトの一部のようで、ホームページを見てもらったら分かると

                                Bubble Tea でリッチなターミナルアプリケーションを作る #Go - 詩と創作・思索のひろば
                              • OOP: the worst thing that happened to programming

                                > BTC: bc1qs0sq7agz5j30qnqz9m60xj4tt8th6aazgw7kxr ETH: 0x1D834755b5e889703930AC9b784CB625B3cd833E USDT(Tron): TPrCq8LxGykQ4as3o1oB8V7x1w2YPU2o5n Ton: UQAtBuFWI3H_LpHfEToil4iYemtfmyzlaJpahM3tFSoxomYQ Doge: D7GMQdKhKC9ymbT9PtcetSFTQjyPRRfkwTdismiss OOP: the worst thing that happened to programming [2/24/2025] In this article, we will try to understand why OOP is the worst thing that happened to prog

                                  OOP: the worst thing that happened to programming
                                • Fish 4.0: The Fish Of Theseus

                                  About two years ago, our head maintainer @ridiculousfish opened what quickly became our most-read pull request: #9512 - Rewrite it in Rust Truth be told, we did not quite expect that to be as popular as it was. It was written as a bit of an in-joke for the fish developers first, and not really as a press release to be shared far and wide. We didn’t post it anywhere, but other people did, and we go

                                  • research!rsc: Coroutines for Go

                                    This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines? Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one fu

                                    • Kernel Queue: The Complete Guide On The Most Essential Technology For High-Performance I/O

                                      Kernel Queue: The Complete Guide On The Most Essential Technology For High-Performance I/O When talking about high-performance software we probably think of server software (such as nginx) which processes millions requests from thousands clients in parallel. Surely, what makes server software work so fast is high-end CPU running with huge amount of memory and a very fast network link. But even the

                                        Kernel Queue: The Complete Guide On The Most Essential Technology For High-Performance I/O
                                      • Linux Hardening Guide | Madaidan's Insecurities

                                        Last edited: March 19th, 2022 Linux is not a secure operating system. However, there are steps you can take to improve it. This guide aims to explain how to harden Linux as much as possible for security and privacy. This guide attempts to be distribution-agnostic and is not tied to any specific one. DISCLAIMER: Do not attempt to apply anything in this article if you do not know exactly what you ar

                                        • React 初心者が Material-UI で今どきの Web フォームを作ってみた(yup編) | DevelopersIO

                                          React 初心者が、Material-UI と React Hook Form v7 を活用して今どきの Web フォーム開発に挑んでみました! つい先月、React(+ React Hook Form)と Material-UI を組み合わせた Web アプリ開発を始めました。アプリ開発初心者でも簡単に、かつ今っぽい Web フォームを開発することができたので、少しコードを交えてご紹介してみたいと思います。 なお本記事は、前の記事(react-hook-form編)に続く形式となりますので、お時間あれば下記の記事も合わせてご参照いただけますと幸いです。 作ってみた 前回の記事で作成した Web フォームの基本項目(Basic.js)というフォームに下記の yup という JavaScript schema builder を利用してバリデーションの機能を追加していきたいと思います。 バ

                                            React 初心者が Material-UI で今どきの Web フォームを作ってみた(yup編) | DevelopersIO
                                          • 改めて学ぶ satisfies 演算子

                                            TSKaigi Advent Calendar 2024の9日目の記事となります。 皆さんは普段TypeScriptのsatisfies演算子を使っていますか?私はswitch文の最後をnever型で終える際に、1行で記述するために使っていました。 type Role = "admin" | "user"; const getRoleText = (role: Role) => { switch (role) { case "admin": return "管理者"; case "user": return "ユーザー"; default: // もし将来Role型に新しい値が追加された場合、この部分でコンパイルエラーが発生 return role satisfies never; } }; const getRoleText = (role: Role) => { switch (rol

                                              改めて学ぶ satisfies 演算子
                                            • Next.js 13 vs Remix: An In-depth case study

                                              Next.js 13 vs Remix: An In-depth case studyLast updated on 29 Sep 2023 by Prateek Surana   •   - min read When it comes to building web applications, React has been at the forefront for a while now, and its adoption continues to grow. Among the most common approaches to building web applications with React, Next.js stands out as one of the most preferred options. Next.js has also been in the limel

                                                Next.js 13 vs Remix: An In-depth case study
                                              • OAuth 2.0 / OIDCを理解するために、自分でGoで実装してみた

                                                OAuth 2.0 / OIDCを理解するために、自分でGoで実装してみました。 以下のハンズオンに従って実装していただくと、OAuth認可コードフローとOIDCの一連の流れの理解が深まると思います。 概要 OAuth 2.0は、ユーザーの認証情報を直接アプリに渡すことなく、外部サービスを通じて安全に認可を行うためのプロトコルです 。特にWebやモバイルアプリ開発では、認証と認可を分離しセキュアに委譲する手段として広く利用されています。OpenID Connect (OIDC)はOAuth2.0を拡張してユーザーのアイデンティティ情報を扱う仕組みで、OIDCではIDトークンと呼ばれるJWT形式のトークン(署名付き)が発行され、これによってクライアントはユーザーを識別できます。OAuth2.0単体ではユーザー個人を表すトークンは発行されませんが、OIDCではscopeにopenidを含めるこ

                                                  OAuth 2.0 / OIDCを理解するために、自分でGoで実装してみた
                                                • Just make it scale: An Aurora DSQL story

                                                  Just make it scale: An Aurora DSQL storyMay 27, 2025 • 3404 words At re:Invent we announced Aurora DSQL, and since then I’ve had many conversations with builders about what this means for database engineering. What’s particularly interesting isn’t just the technology itself, but the journey that got us here. I’ve been wanting to dive deeper into this story, to share not just the what, but the how

                                                    Just make it scale: An Aurora DSQL story
                                                  • Why stdout is faster than stderr? - Orhun's Blog

                                                    I recently realized stdout is much faster than stderr for Rust. Here are my findings after diving deep into this rabbit hole. I have been using the terminal (i.e. command-line) for most of my day-to-day things for a while now. I was always fascinated by the fact that how quick and convenient the command-line might be and that's why I'm a proponent of using CLI (command-line) or TUI (terminal user

                                                      Why stdout is faster than stderr? - Orhun's Blog
                                                    • 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

                                                      • Mastraのサンプル集を一気に紹介する|yoshi8

                                                        こんにちは!吉波です! 最近、AIエージェントフレームワーク「Mastra」が彗星の如く現れました。衝撃的だったのが、こちらの画像↓ 「LangChainのGithubスター数を抜き去った…!?」 これを見た時、衝撃が走りました。LLMを用いたアプリケーション開発を効率的に行うためのライブラリとして、長らく君臨してきたLangChainが抜かされたという事実は、全世界が驚いたはずです。 そこで今回は、これからMastraを触ってみたいと思う方に向けて、Mastra公式が出しているサンプル集を紹介します!AIエージェントの作り方を学びたいなと思っている方はぜひ最後までご覧ください! また、今日から「吉波塾」というAI駆動開発やAIエージェントに関する講義を開始したので、そちらも良ければご参加ください!☺️ 次回の開催はX(@yoshi8__)より共有します! Mastraのサンプル集今回の記

                                                          Mastraのサンプル集を一気に紹介する|yoshi8
                                                        • An introduction to WebAssembly for JavaScript Developers

                                                          If you transmit a number whereas an integer encoded on 64 bits is expected you will get an exception: let run = async () => { try { let bytecode = await fetch("add/add.wasm"); let wasm = await WebAssembly.instantiateStreaming(bytecode); console.log(wasm.instance.exports.addInt64(1,2)); } catch(e) { console.error(e); } }; > run().then(); TypeError: wasm function signature contains illegal type Call

                                                          • Hello IPv6: a minimal tutorial for IPv4 users

                                                            This website uses cookies to analyze the website traffic (Google Analytics). By clicking the accept button below to see the content on this site, you consent to the use of cookies. Your choice will be remembered for 365 days or until this cookie policy considerably changes. (2023-07-12) Accept IntroductionIt might be a bit funny to call this post “Hello IPv6”, since the first draft of IPv6 was pub

                                                              Hello IPv6: a minimal tutorial for IPv4 users
                                                            • `undefined` vs. `null` revisited

                                                              Many programming languages have one “non-value” called null. It indicates that a variable does not currently point to an object – for example, when it hasn’t been initialized yet. In contrast, JavaScript has two such non-values: undefined and null. In this blog post, we examine how they differ and how to best use or avoid them. undefined vs. null  # Both values are very similar and often used inte

                                                              • CVE-2024-4367 - Arbitrary JavaScript execution in PDF.js — Codean Labs

                                                                This post details CVE-2024-4367, a vulnerability in PDF.js found by Codean Labs. PDF.js is a JavaScript-based PDF viewer maintained by Mozilla. This bug allows an attacker to execute arbitrary JavaScript code as soon as a malicious PDF file is opened. This affects all Firefox users (<126) because PDF.js is used by Firefox to show PDF files, but also seriously impacts many web- and Electron-based a

                                                                  CVE-2024-4367 - Arbitrary JavaScript execution in PDF.js — Codean Labs
                                                                • Fixing For Loops in Go 1.22 - The Go Programming Language

                                                                  Go 1.21 includes a preview of a change to for loop scoping that we plan to ship in Go 1.22, removing one of the most common Go mistakes. The Problem If you’ve written any amount of Go code, you’ve probably made the mistake of keeping a reference to a loop variable past the end of its iteration, at which point it takes on a new value that you didn’t want. For example, consider this program: func ma

                                                                    Fixing For Loops in Go 1.22 - The Go Programming Language
                                                                  • Announcing TypeScript 4.7 - TypeScript

                                                                    Today we’re excited to announce the availability of TypeScript 4.7! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you’re working with and what kinds of functions you’re calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting

                                                                      Announcing TypeScript 4.7 - TypeScript
                                                                    • Prototyping in Rust | corrode Rust Consulting

                                                                      Programming is an iterative process - as much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often start as quick prototypes. The bad ones stay prototypes, but the best ones evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best approach before

                                                                        Prototyping in Rust | corrode Rust Consulting
                                                                      • Rewriting the Ruby parser

                                                                        At Shopify, we have spent the last year writing a new Ruby parser, which we’ve called YARP (Yet Another Ruby Parser). As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into C

                                                                          Rewriting the Ruby parser
                                                                        • フロントエンドエンジニアのためのHaskell入門 | ダーシノ(@bc_rikko)

                                                                          フロントエンドエンジニアのためのHaskell入門 JavaScriptのなんちゃって関数型プログラミングではなく、純粋な関数型プログラミングのエッセンスを学びたくてHaskellを選んだ。しかし、過去3回入門したが3回破門されたので、今度こそ免許皆伝したい。 普段はTypeScriptで開発を行っているので、Haskellと比較しながら学んでいきたい。 基本構文 変数の宣言 const x: number = 10 x :: Int x = 10 関数の宣言 function add(x: number, y: number): number { return x + y } add :: Int -> Int -> Int add x y = x + y アロー関数 const add = (x: number, y: number): number => x + y add :: I

                                                                            フロントエンドエンジニアのためのHaskell入門 | ダーシノ(@bc_rikko)
                                                                          • Changing std::sort at Google’s Scale and Beyond

                                                                            TL;DR; We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can

                                                                              Changing std::sort at Google’s Scale and Beyond
                                                                            • Hypershell: A Type-Level DSL for Shell-Scripting in Rust | Context-Generic Programming

                                                                              Discuss on Reddit, Lobsters, and Hacker News. Summary I am thrilled to introduce Hypershell, a modular, type-level domain-specific language (DSL) for writing shell-script-like programs in Rust. Hypershell is powered by context-generic programming (CGP), which makes it possible for users to extend or modify both the language syntax and semantics. Table of Contents Estimated reading time: 1~2 hours

                                                                                Hypershell: A Type-Level DSL for Shell-Scripting in Rust | Context-Generic Programming
                                                                              • Announcing TypeScript 5.0 Beta - TypeScript

                                                                                Today we’re excited to announce our beta release of TypeScript 5.0! This release brings many new features, while aiming to make TypeScript, smaller, simpler, and faster. We’ve implemented the new decorators standard, functionality to better support ESM projects in Node and bundlers, new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified configuratio

                                                                                  Announcing TypeScript 5.0 Beta - TypeScript
                                                                                • Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew

                                                                                  Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction In this series of tutorials, we will delve into creating simple 2D games in Common Lisp. The result of the first part will be a development environment setup and a basic simulation displaying a 2D scene with a large number of physical objects. It is assumed that the reader is familiar with some high-level programming language, has a gener

                                                                                    Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew