並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 120件

新着順 人気順

javascript map key value array to objectの検索結果1 - 40 件 / 120件

  • 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

    • 実装例から見る React のテストの書き方 - Cybozu Inside Out | サイボウズエンジニアのブログ

      2024/04/17: 更新 内容を更新した記事を書きましたので、よかったらこちらも併せて、ご覧ください。 zenn.dev こんにちは!フロントエンドエキスパートチームの@nus3_です。 kintone のフロントエンド刷新プロジェクト(フロリア)では、品質を保ったまま開発を加速させるためにフロントエンドのテストを積極的に行っています。 今回はそんなフロントエンドのテストの実装例をいくつか紹介します。この記事がフロントエンドのテストを行う上での参考になれば幸いです。 テストに使用する主なパッケージ コンポーネントのテスト 補足: Testing Library の記法をチェックしてくれるeslint-plugin-testing-library カスタムフックのテスト 補足: React v18 では @testing-library/react の renderHook を使う 参考

        実装例から見る React のテストの書き方 - Cybozu Inside Out | サイボウズエンジニアのブログ
      • パイプライン指向JSON処理プログラミング言語 jq - 檜山正幸のキマイラ飼育記 (はてなBlog)

        jq(https://stedolan.github.io/jq/)の紹介では、「JSON処理のワンライナー〈一行野郎〉としてめちゃくちゃ便利!」とアピールするのが定番です。もちろんそれは本当で、「めちゃくちゃ便利!」です。が、実は jq は、ワンライナー記述にとどまらない、かなり本格的なプログラミング言語です。 JSON処理のためのDSL〈Domain Specific Language | 領域特化言語〉なので、汎用言語ではありません。しかし、汎用言語が備えている言語機能の一部(関数定義、モジュールシステムなど)を jq も持っています。また jq は、独特で楽しいプログラミング・パラダイム -- “パイプライン指向”に基づいて設計されています。 この記事では、ワンライナーを超えた jq の使い方と、プログラミング言語としての jq の特徴を紹介します。長い記事になってしまったので、一

          パイプライン指向JSON処理プログラミング言語 jq - 檜山正幸のキマイラ飼育記 (はてなBlog)
        • 【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい

          はじめに 対象イベント 読み方、使い方 Remote Code Execution(RCE) 親ディレクトリ指定によるopen_basedirのバイパス PHP-FPMのTCPソケット接続によるopen_basedirとdisable_functionsのバイパス JavaのRuntime.execでシェルを実行 Cross-Site Scripting(XSS) nginx環境でHTTPステータスコードが操作できる場合にCSPヘッダーを無効化 GoogleのClosureLibraryサニタイザーのXSS脆弱性 WebのProxy機能を介したService Workerの登録 括弧を使わないXSS /記号を使用せずに遷移先URLを指定 SOME(Same Origin Method Execution)を利用してdocument.writeを順次実行 SQL Injection MySQ

            【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
          • How I built a modern website in 2021

            How I built a modern website in 2021September 29th, 2021 — 34 min read For over half of 2021, I worked on a complete rewrite of kentcdodds.com. You're reading this on the rewrite of this site! Are you using dark mode or light mode? Have you signed in and selected your team yet? Have you tried to call into the Call Kent Podcast? This blog post isn't about these and other features of the new site, b

              How I built a modern website in 2021
            • チュートリアル: Yjs, valtio, React で実現する共同編集アプリケーション - ROUTE06 Tech Blog

              Yjsは、リアルタイム共同編集を実現するためのアルゴリズムとデータ構造を提供するフレームワークです。Notion や Figma のように、1 つのコンテンツを複数人で同時に更新する体験を提供することができます。 Y.Map, Y.Array, Y.Text といった共有データ型を提供し、それらは JavaScript の Map や Array のように利用できます。さらにそのデータに対する変更は他のクライアントに自動的に配布・同期されます。 Yjs は Conflict-free Replicated Data Types (CRDT) と呼ばれるアルゴリズムの実装であり、複数人が同時にデータを操作してもコンフリクトが発生せず、最終的に全てのクライアントが同じ状態に到達するように設計されています。 クイックスタート Y.Map がクライアント間で自動的に同期されるコード例を見てみましょ

                チュートリアル: Yjs, valtio, React で実現する共同編集アプリケーション - ROUTE06 Tech Blog
              • “Tao of Node - Design, Architecture & Best Practices” 日本語翻訳

                私が働いているAniqueという会社では、1年前に全てのソフトウェアでTypescriptを採用することにしました。私たちが開発している進撃の巨人のNFTサービス “Attack on Titan: Legacy” でも採用しています。 TypescriptではNestJSという素晴らしいAPIフレームワークを利用することができ、生産性高く開発を続けることができます。また、私たちはフロントエンドでNext.jsを利用しています。言語レベルでのコンテキストスイッチを抑えることで、一人のエンジニアがフロントエンドとバックエンドのどちらもの機能を開発する環境が作れました。 しかし、Nodeならではの作法や設計について、Web上にはたくさんの情報があるものの、あまりにも情報が多すぎて、まとまったプラクティスになかなか出会うことができませんでした。そのため、最初はチーム内での共通認識を作るのに苦労し

                  “Tao of Node - Design, Architecture & Best Practices” 日本語翻訳
                • プロと読み解く Ruby 3.2 NEWS - クックパッド開発者ブログ

                  技術部の笹田(ko1)と遠藤(mame)です。クックパッドで Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 昨日 12/25 に、恒例のクリスマスリリースとして、Ruby 3.2.0 がリリースされました(Ruby 3.2.0 リリース)。今年も Ruby 3.2 の NEWS.md ファイルの解説をします。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者ブログ プロと読み解くRuby 2.7 NEWS - クックパッド開発者ブログ プロと読み解くRuby 3.0 NEWS - クックパッド開発者ブログ プロと読み解く Ruby 3.1 NEWS -

                    プロと読み解く Ruby 3.2 NEWS - クックパッド開発者ブログ
                  • The Prompt Engineering Playbook for Programmers

                    Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

                      The Prompt Engineering Playbook for Programmers
                    • Immer はどのように実装されているか - カミナシ エンジニアブログ

                      はじめに こんにちは。カミナシでソフトウェアエンジニアをしている tokuse(@stomy_13) です。 私が所属するチームが開発している現場帳票システム『カミナシ レポート』では、一部のアプリケーションで状態管理ライブラリの Zustand を使用しています。併せて Zustand の Immer middleware も使用しています。開発を進める中で Immer の内部実装を調査する機会がありました。 Immer は React の状態管理や Redux などと組み合わされて使われることが多く、多くの開発者に愛用されています。しかし、その便利さの裏にある仕組みについて詳しく知っている方は意外と多くはないと思います。 この記事では、Immer がどのように実装されているのか、その内部構造や仕組みのコア部分を簡単に解説します。 Immer とは Immer は「不変性を持つデータ構造

                        Immer はどのように実装されているか - カミナシ エンジニアブログ
                      • GitHub - modelcontextprotocol/servers: Model Context Protocol Servers

                        Official integrations are maintained by companies building production ready MCP servers for their platforms. 21st.dev Magic - Create crafted UI components inspired by the best 21st.dev design engineers. ActionKit by Paragon - Connect to 130+ SaaS integrations (e.g. Slack, Salesforce, Gmail) with Paragon’s ActionKit API. Adfin - The only platform you need to get paid - all payments in one place, in

                          GitHub - modelcontextprotocol/servers: Model Context Protocol Servers
                        • JavaScript Best Practices | The WebStorm Blog

                          IDEs CLion DataGrip DataSpell Fleet GoLand IntelliJ IDEA PhpStorm PyCharm RustRover Rider RubyMine WebStorm Plugins & Services Big Data Tools Code With Me JetBrains Platform Scala Toolbox App Writerside JetBrains AI Grazie Junie JetBrains for Data Kineto Team Tools Datalore Space TeamCity Upsource YouTrack Hub Qodana CodeCanvas .NET & Visual Studio .NET Tools ReSharper C++ Languages & Frameworks K

                            JavaScript Best Practices | The WebStorm Blog
                          • Rubyの型チェッカーのSorbetを導入しました - freee Developers Hub

                            申告チームでテックリードをやらせてもらっている id:nanjakkun です。 freeeではfreee会計をはじめ多くのプロダクトがRuby on Rails(以下Rails)のアプリケーションとして実装されています。 日々の開発の中で、Rubyでも静的な型の解決ができればなあと思うことがあります。 ということで、Rubyの型チェッカーのSorbetをfreee申告に導入してみました。 Sorbet(ソルベ)とは sorbet.org 決済代行サービスのStripeを運営しているStripe社が公開している漸進的型チェッカーです。 ※余談ですがfreeeアプリストアではStripeを決済手段としたアプリの有料販売ができます。 developers.freee.co.jp 有料アプリ販売の準備をする | freee Developers Community 漸進的型付けとは 漸進的型付け

                              Rubyの型チェッカーのSorbetを導入しました - freee Developers Hub
                            • What's New In DevTools (Chrome 94)  |  Blog  |  Chrome for Developers

                              Use DevTools in your preferred language Chrome DevTools now supports more than 80 languages, allowing you to work in your preferred language! Open Settings, then select your preferred language under the Preferences > Language dropdown and reload DevTools. Preferences" width="800" height="494"> Chromium issue: 1163928 New Nest Hub devices in the Device list You can now simulate the dimensions of Ne

                              • Introducing Ezno

                                Ezno is an experimental compiler I have been working on and off for a while. In short, it is a JavaScript compiler featuring checking, correctness and performance for building full-stack (rendering on the client and server) websites. This post is just an overview of some of the features I have been working on which I think are quite cool as well an overview on the project philosophy ;) It is still

                                  Introducing Ezno
                                • Cloudflare Workers + Hono ワークショップ - ServerlessDays Tokyo 2023

                                  Cloudflare Workers + Hono ワークショップ 資料はこちら => workshops.yusuke.run #serverlessdays Yusuke Wada 2023-09-24 ServerlessDays Tokyo 2023 workshops.yusuke.run アジェンダ ワークショップについて Workers イントロダクション Hono イントロダクション 基本編 プロキシ編 Web API編 フルスタック編 AI編 Honoをより深く知る その他 1. ワークショップについて 1.1 対象 対象者 Cloudflareでのアプリケーション作成に興味のある方 Honoを使ってみたい方 フロント、バックエンド問いません 前提条件 Wranglerが動く環境をつくっておく npx wrangler が動く JavaScriptに対する知識があるとよい

                                    Cloudflare Workers + Hono ワークショップ - ServerlessDays Tokyo 2023
                                  • 今年のオープンソース活動振り返り @ 2020

                                    2020年のオープンソース活動の振り返り記事です。 今までの振り返り。 今年のOSS活動振り返り @ 2019 | Web Scratch 今年のOSS活動振り返り @ 2018 | Web Scratch 今年のOSS活動振り返り @ 2017 | Web Scratch 今年のOSS活動振り返り @ 2016 | Web Scratch 今年のOSS活動振り返り @ 2015 | Web Scratch 今年のOSS活動振り返り @ 2014 | Web Scratch 2020年のGitHubのPublicなContributionsは7000~9000ぐらいを推移していました。 最近はPrivateリポジトリをメモやブックマーク管理などでも使うようになったので、Private比率は増えてPrivateなContributionsは13400でした。 GitHub Issuesを個人

                                      今年のオープンソース活動振り返り @ 2020
                                    • Working With TypeScript: A Practical Guide for Developers

                                      What is TypeScriptTypeScript is a popular JavaScript superset created by Microsoft that brings a type system on top of all the flexibility and dynamic programming capabilities of JavaScript. The language has been built as an open-source project, licensed under the Apache License 2.0, has a very active and vibrant community, and has taken off significantly since its original inception. Installing T

                                        Working With TypeScript: A Practical Guide for Developers
                                      • 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

                                        • LogLog Games

                                          The article is also available in Chinese. Disclaimer: This post is a very long collection of thoughts and problems I've had over the years, and also addresses some of the arguments I've been repeatedly told. This post expresses my opinion the has been formed over using Rust for gamedev for many thousands of hours over many years, and multiple finished games. This isn't meant to brag or indicate su

                                          • Functional programming is finally going mainstream

                                            Functional programming is finally going mainstream Object-oriented and imperative programming aren’t going away, but functional programming is finding its way into more codebases. Klint Finley // July 12, 2022 Paul Louth had a great development team at Meddbase, the healthcare software company he founded in 2005. But as the company grew, so did their bug count. That’s expected, up to a point. More

                                              Functional programming is finally going mainstream
                                            • 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
                                              • Announcing TypeScript 4.7 Beta - TypeScript

                                                Today we are excited to announce the beta release of TypeScript 4.7! To get started using the beta, you can use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code and Sublime Text 3. Here’s a quick list of what’s new in TypeScript 4.7! ECMAScript Module Support in Node.js

                                                  Announcing TypeScript 4.7 Beta - TypeScript
                                                • [Slack][AWSサーバレス]Slackワークスペースへの読み取り権限がほぼゼロのChatGPTボットを作る | DevelopersIO

                                                  ちなみにこういうMarkdownテーブルの作成もSlackボットにお願いできます。便利。 Slack App設定 https://api.slack.com/apps/newより Create new app を押下し新規アプリを作成します。 左メニューから各項目を選択しつつ以下のような設定をします。 Basic Information Add features and functionality で以下を選択します。 Bots Event Subscriptions Permissions OAuth & Permissions Scopes に以下を加えます。 app_mention:read chat:write Event Subscriptions Subscribe to bot events に以下を加えます。 app_mention シークレットを控える Basic Inf

                                                    [Slack][AWSサーバレス]Slackワークスペースへの読み取り権限がほぼゼロのChatGPTボットを作る | DevelopersIO
                                                  • A virtual DOM in 200 lines of JavaScript

                                                    In this post I’ll walk through the full implementation of a Virtual DOM in a bit over 200 lines of JavaScript. The result is a full-featured and sufficiently performant virtual DOM library (demos). It’s available on NPM as the smvc package. The main goal is to illustrate the fundamental technique behind tools like React. React, Vue and the Elm language all simplify the creation of interactive web

                                                    • Announcing TypeScript 5.2 - TypeScript

                                                      Today we’re excited to announce the release of TypeScript 5.2! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                        Announcing TypeScript 5.2 - TypeScript
                                                      • Object Structure in JavaScript Engines

                                                        Object Structure in JavaScript EnginesFrom a developer's perspective, objects in JavaScript are quite flexible and understandable. We can add, remove, and modify object properties on our own. However, few people think about how objects are stored in memory and processed by JS engines. Can a developer's actions, directly or indirectly, impact performance and memory consumption? Let's try to delve i

                                                          Object Structure in JavaScript Engines
                                                        • All JavaScript and TypeScript Features of the last 3 years

                                                          TypeScript as envisioned by Stable DiffusionThis article goes through almost all of the changes of the last 3 years (and some from earlier) in JavaScript / ECMAScript and TypeScript . Not all of the following features will be relevant to you or even practical, but they should instead serve to show what’s possible and to deepen your understanding of these languages. There are a lot of TypeScript fe

                                                            All JavaScript and TypeScript Features of the last 3 years
                                                          • WebKit Features in Safari 17.4

                                                            ContentsArchitectural improvementsWeb AppsForm elementsCSSWeb APIJavaScriptMediaSVGWebGLWeb AssemblyWeb InspectorChanges to SafariSafari ExtensionsWeb AuthenticationBug Fixes and moreUpdating to Safari 17.4Feedback Just like Safari 15.4 and Safari 16.4, this March’s release of Safari 17.4 is a significant one for web developers. We’re proud to announce another 46 features and 146 bug fixes. You ca

                                                              WebKit Features in Safari 17.4
                                                            • Announcing TypeScript 5.6 - TypeScript

                                                              Today we’re excited to announce the release of TypeScript 5.6! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by adding syntax for types. Types describe the shapes we expect of our variables, parameters, and functions, and the TypeScript type-checker can help catch issues like typos, missing properties, and bad function calls before we even run our code. T

                                                                Announcing TypeScript 5.6 - TypeScript
                                                              • Rust to WebAssembly the hard way — surma.dev

                                                                Toggle dark mode What follows is a brain dump of everything I know about compiling Rust to WebAssembly. Enjoy. Some time ago, I wrote a blog post on how to compile C to WebAssembly without Emscripten, i.e. without the default tool that makes that process easy. In Rust, the tool that makes WebAssembly easy is called wasm-bindgen, and we are going to ditch it! At the same time, Rust is a bit differe

                                                                  Rust to WebAssembly the hard way — surma.dev
                                                                • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation

                                                                  233 AST vs. Bytecode: Interpreters in the Age of Meta-Compilation OCTAVE LAROSE, University of Kent, UK SOPHIE KALEBA, University of Kent, UK HUMPHREY BURCHELL, University of Kent, UK STEFAN MARR, University of Kent, UK Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interprete

                                                                  • Announcing TypeScript 5.2 RC - TypeScript

                                                                    Today we’re excited to announce our Release Candidate of TypeScript 5.2! Between now and the stable release of TypeScript 5.2, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explic

                                                                      Announcing TypeScript 5.2 RC - TypeScript
                                                                    • 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
                                                                      • WebKit Features in Safari 18.0

                                                                        ContentsNew in Safari 18Web apps for MacCSSSpatial WebHTMLJavaScriptWeb APICanvasManaged Media SourceWebRTCHTTPSWebGLWeb InspectorPasskeysSafari ExtensionsApple PayDeprecationsBug Fixes and moreUpdating to Safari 18.0Feedback Safari 18.0 is here. Along with iOS 18, iPadOS 18, macOS Sequoia and visionOS 2, today is the day another 53 web platform features, as well as 25 deprecations and 209 resolve

                                                                          WebKit Features in Safari 18.0
                                                                        • rfコマンドの紹介: Rubyでテキスト処理を便利に - ぶていのログでぶログ

                                                                          この記事はRuby Advent Calendar 2023の21日目の記事です。 Rubyでワンライナーでテキストの処理をしたいと思ったことはありませんか?ありますよね! そういったときに便利に使えるCLIツールのrfを作ったので紹介します。 モチベーション 具体例 インストール方法 rfの仕様 フィルタ レコードとフィールド コマンドと評価結果 特殊変数 定義済みメソッド match / match? メソッド at_exitメソッド 言語拡張 StringとInteger/Floatを直接計算、比較できる Hashのキーをメソッド名として扱える 未定義の変数にInteger/Float/String、Arrayへの要素追加ができる おわりに モチベーション 普段のオペレーションの中で、ファイルの特定の文字列を含む行を出力するにはgrepを使うと思います。 grepより複雑なことをやら

                                                                            rfコマンドの紹介: Rubyでテキスト処理を便利に - ぶていのログでぶログ
                                                                          • Announcing TypeScript 4.7 RC - TypeScript

                                                                            Today we’re excited to announce our Release Candidate (RC) of TypeScript 4.7! Between now and the stable release of TypeScript 4.7, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: npm install typescript@rc You can also get editor support by Downloading for Visual Studio 2022/2019 Following

                                                                              Announcing TypeScript 4.7 RC - TypeScript
                                                                            • Announcing TypeScript 5.4 - TypeScript

                                                                              Today we’re excited to announce the release of TypeScript 5.4! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                                                Announcing TypeScript 5.4 - TypeScript
                                                                              • Announcing TypeScript 5.5 - TypeScript

                                                                                Today we’re excited to announce the release of TypeScript 5.5! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                                                  Announcing TypeScript 5.5 - TypeScript
                                                                                • The Ultimate Interactive JQ Guide

                                                                                  The Ultimate Interactive JQ Guide Learn how to search, query, and modify JSON data with 25 interactive jq examples and explanations Cover Photo by Pixabay Has this ever happened to you? You’ve just received a massive JSON file that looks like it was designed to confuse you. Or maybe you entered a command, and you got so much JSON that it looks incomprehensible. Important: Level up your jq skills w

                                                                                    The Ultimate Interactive JQ Guide