並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 122件

新着順 人気順

javascript array map index exampleの検索結果1 - 40 件 / 122件

  • 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 | サイボウズエンジニアのブログ
      • インクリメンタルに新しい技術を取り入れる方法。TypeScriptへの移行を例にしたプロセス

        📝 require(moduleName) は同期処理なのに対して、import(moduleName)は非同期処理となります。 📝 tsconfig.jsonでesModuleInteropがtrueでないとdeafult importの意味合いは異なります。 この表はCommonJS ModulesとECMAScript Modulesで機能的に1対1で応するという意味ではありませんが、 大まかにはこの対応表にそってECMAScript Modulesの構文へと変換ができます。 エディターを使い手動で変換したり、次のようなツールを使ってある程度機械的な変換も可能です。 cjstoesm commonjs-to-es-module-codemod このモジュールの変換で重要なことは、できるだけCommonJS ModulesとECMAScript Modulesを混ぜないことです。

          インクリメンタルに新しい技術を取り入れる方法。TypeScriptへの移行を例にしたプロセス
        • 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
          • 【忙しい人のための】Next.js公式チュートリアルを完走してきたので記事1本で振り返る【ギュッと凝縮】 | DevelopersIO

            本記事はNext.jsのチュートリアルが大きく変わったためリンク切れを起こしています。 技術メモのため記事としては残しますが、リンク切れにご留意ください。 また機会があれば新チュートリアルで記事を書こうと思いますm(_ _)m こんちには。 データアナリティクス事業本部 インテグレーション部 機械学習チームの中村です。 今回は以下のNext.jsのチュートリアルをほぼ一通り(SEOのところ以外)実施しましたので、ポイントを記事化しました。 https://nextjs.org/learn/foundations/about-nextjs" チュートリアル自体は、以下のような内容が分かるものとなっています。 CRA(create-react-app)のみ使用しているとイメージしづらい、素のHTML + JavaScriptとReactの関係のイメージが分かる Reactがフレームワークではな

              【忙しい人のための】Next.js公式チュートリアルを完走してきたので記事1本で振り返る【ギュッと凝縮】 | DevelopersIO
            • WebAssemblyを用いてBERTモデルをフロントエンドで動かす - OPTiM TECH BLOG

              はじめまして。R&Dチーム所属、20.5卒の伊藤です。 普段の業務では自然言語処理と格闘していることが多いです。 今回は自然言語処理モデルとして有名なBERTをWebAssemblyを使用してフロントエンドで動かしてみた話になります。 最近、自然言語処理ライブラリとして普段お世話になっているHugging Face社のTransformersのTokenizerがRustで実装されていることを知り、それならばWebAssemblyにコンパイルして動かせるのではないかと試したみたのがきっかけです。 Tokenizerのみ動かしても実用性に乏しいため、Tokenizerから得られた結果からBERTを用いた推論をブラウザで動作させるまでを行い、備忘録がでら手順をまとめました。 どなたかの参考になれば幸いです。 8/26追記 本記事内のコードを含むリポジトリを公開しました!Dockerを使用してブ

                WebAssemblyを用いてBERTモデルをフロントエンドで動かす - OPTiM TECH BLOG
              • プロと読み解く 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
                  • 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
                    • Using WebAssembly threads from C, C++ and Rust

                      Learn how to bring multithreaded applications written in other languages to WebAssembly. WebAssembly threads support is one of the most important performance additions to WebAssembly. It allows you to either run parts of your code in parallel on separate cores, or the same code over independent parts of the input data, scaling it to as many cores as the user has and significantly reducing the over

                        Using WebAssembly threads from C, C++ and Rust
                      • 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
                        • Pure Rustな近似最近傍探索ライブラリhoraを用いた画像検索を実装する - Stimulator

                          - はじめに - 本記事は、近似最近傍探索(ANN: Approximate Nearest Neighbor)による画像検索をRustを用いて実装した際のメモである。 画像からの特徴量抽出にTensorFlow Rust bindings、ANNのインデックス管理にRustライブラリであるhoraを利用した。 RustとANNの現状および、実装について触れる。 - はじめに - - RustとANN - - pretrainモデルによる特徴量化 - - 画像特徴のインデックスと検索 - - 検索結果 - - おわりに - - RustとANN - Rustの機械学習関連クレート、事例をまとめたリポジトリがある。 github.com この中でも、ANN関連のクレートは充実している。利用する場合は以下のようなクレートが候補になる。 * Enet4/faiss-rs * lerouxrgd/

                            Pure Rustな近似最近傍探索ライブラリhoraを用いた画像検索を実装する - Stimulator
                          • 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

                              • 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
                                • 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

                                  • 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
                                      • JS Self-Profiling API In Practice

                                        Nic Jansma (@nicj) is a software developer at Akamai building high-performance websites, apps and open-source tools. Table of Contents The JS Self-Profiling API What is Sampled Profiling? Downsides to Sampled Profiling API Document Policy API Shape Sample Interval Buffer Who to Profile When to Profile Specific Operations User Interactions Page Load Overhead Anatomy of a Profile Beaconing Size Comp

                                          JS Self-Profiling API In Practice
                                        • Cypressのカスタムコマンドを用いたVue.jsの効率的なE2Eテスト実装 - ZOZO TECH BLOG

                                          はじめに こんにちは、EC基盤本部・MA部・MA基盤チームでマーケティングオートメーションのシステムを開発している長澤(@snagasawa_)です。この記事では、CypressによるE2EテストをVue.jsプロジェクトへ導入した取り組みについて、実際の画面を交えてご紹介します。このE2Eテストによって、複雑な入力フォームを自動でテストできるようになり、修正後のバグを検知しやすくなりました。E2Eテストの導入を検討されている方の参考になれば幸いです。 Vue.jsプロジェクトの技術スタック 今回Cypressを導入したプロジェクトの主な技術スタックは以下の通りです。 Vue.js TypeScript Vuetify Open API 導入背景 E2Eテスト導入の理由は、複雑な入力フォームを動作保証するためです。 我々のチームでは、Line Friendship Manager(以下、L

                                            Cypressのカスタムコマンドを用いたVue.jsの効率的なE2Eテスト実装 - ZOZO TECH BLOG
                                          • Lazy Load Routes in Vue with webpack Dynamic Comments | CSS-Tricks

                                            Get affordable and hassle-free WordPress hosting plans with Cloudways — start your free trial today. The way routing works in JavaScript is usually that you specify which relative URL pattern you want for which component to render. So for /about you want the <About /> component to render. Let’s take a look at how to do this in Vue/Vue Router with lazy loading, and do it as cleanly as possible. I u

                                              Lazy Load Routes in Vue with webpack Dynamic Comments | CSS-Tricks
                                            • 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
                                              • 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
                                                  • Announcing TypeScript 5.7 - TypeScript

                                                    Today we excited to announce the availability of TypeScript 5.7! If you’re not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for type declarations and annotations. This syntax can be used by the TypeScript compiler to type-check our code, and it can also be erased to emit clean, idiomatic JavaScript code. Type-checking is helpful because it can catch bugs in

                                                      Announcing TypeScript 5.7 - TypeScript
                                                    • How MDN’s autocomplete search works – Mozilla Hacks - the Web developer blog

                                                      Last month, Gregor Weber and I added an autocomplete search to MDN Web Docs, that allows you to quickly jump straight to the document you’re looking for by typing parts of the document title. This is the story about how that’s implemented. If you stick around to the end, I’ll share an “easter egg” feature that, once you’ve learned it, will make you look really cool at dinner parties. Or, perhaps y

                                                        How MDN’s autocomplete search works – Mozilla Hacks - the Web developer blog
                                                      • 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
                                                          • 刮目せよ!! 2023年秋、TS連携もファイルサイズもUIもイケるようになった最近のScala.js事情の紹介 - Lambdaカクテル

                                                            最近Scala.jsの話をすると結構な人がRTしてくれる。TypeScriptの他にAltJSには今どんなのがあるのかな、という話に引用RTでScala.js今アツいですよという話をしたら結構ウケた。世間的にはTypeScript alternativeに興味がある人も多いようだ。一方、ネットに残っているScala.js情報は数年前のものが多いようで、あまり積極的に日本語での情報発信がなされていない様子。そこで、ここ最近Scala.jsはどういう感じなのか、そしてどうすれば始められるのかという情報をまとめると需要があるかもしれないと思い、書くことにした。 Scala.jsは数年前まではオモチャみたいな感じだったんですが最近はTSのライブラリから自動で型が生える仕組みがあったりめちゃバンドル小さくなったりとめちゃくちゃ進化してます!! https://t.co/c06IZGWhYF— Win

                                                              刮目せよ!! 2023年秋、TS連携もファイルサイズもUIもイケるようになった最近のScala.js事情の紹介 - Lambdaカクテル
                                                            • A new experimental Go API for JSON - The Go Programming Language

                                                              The Go Blog A new experimental Go API for JSON Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines, and Damien Neil 9 September 2025 Introduction JavaScript Object Notation (JSON) is a simple data interchange format. Almost 15 years ago, we wrote about support for JSON in Go, which introduced the ability to serialize and deserialize Go types to and from JSON data. Since the

                                                                A new experimental Go API for JSON - The Go Programming Language
                                                              • 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
                                                                  • Announcing TypeScript 5.8 - TypeScript

                                                                    Today we’re excited to announce the release of TypeScript 5.8! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by adding syntax for 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 editor tooling like the auto

                                                                      Announcing TypeScript 5.8 - TypeScript
                                                                    • 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

                                                                      • 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

                                                                        • 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
                                                                          • 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