並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 150件

新着順 人気順

js if array includes stringの検索結果1 - 40 件 / 150件

  • React with TypeScript Cheatsheet

    Build in AI speed — Compose enterprise-grade applications, features, and componentsHow to type React propsSince React props are used to send transmit data between one React component to another, there are many types that you can use to type React props. To write the types of your props, you need to add a colon and the object literal notation (: {}) next to the destructuring assignment of the child

      React with TypeScript Cheatsheet
    • 【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問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
      • jestでDBありのテストを高速化する

        課題link お手伝いしているシステムでNestJSを採用しているバックエンドのテストが遅いという課題があったので対処した。 前提link フレームワークDBテストランナーその他 テストの総数は700弱。 最終結果link 最終的には2段階の改修を経てローカルのテストが3倍速程度高速化した。 # before Test Suites: 145 passed, 145 total Tests: 2 skipped, 681 passed, 683 total Snapshots: 0 total Time: 925.063 s Ran all test suites. Done in 926.48s. # ts-jestを@swc/jestに置き換えた Test Suites: 145 passed, 145 total Tests: 2 skipped, 681 passed, 683 t

          jestでDBありのテストを高速化する
        • 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

          • ブラウザで動作する地理空間データ処理ライブラリとして DuckDB-wasm を使い、 SQL を TypeScript で管理する仕組みを作る - newmo 技術ブログ

            newmo では、地図データや地理情報を扱う場面が多くあります。 たとえば、タクシーやライドシェアでは、営業区域のような営業していいエリアといった地理的な定義があります。 また、乗り入れ禁止区域のようなタクシーが乗り入れてはいけないエリアといった定義も必要になります。 これらの地理に関する定義は GeoJSON のような地理情報を扱うデータ形式で管理されることが多いです。 しかし、GeoJSONなどの定義をテキストとして手書きするのは困難です。 そのため、地図上に区域を作図するエディタやその定義した区域が正しいかをチェックするような管理ツールが必要です。 管理ツールは、ウェブアプリケーションとして作った方が利用できる環境が広がります。 このような地理情報は一度に扱うデータが多かったり、空間的な計算処理が必要になるため、専用の仕組みを使うことが多いです。 このような技術を、地理情報システム(

              ブラウザで動作する地理空間データ処理ライブラリとして DuckDB-wasm を使い、 SQL を TypeScript で管理する仕組みを作る - newmo 技術ブログ
            • 【AI駆動開発】Cursorを使いこなして1ヶ月でプログラミング学習サイトを作ったのでノウハウを伝えたい - Qiita

              Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? こんにちは、とまだです。 皆さん、最近話題の AI 駆動開発、試していますか? 私は普段フリーランスの Web エンジニアとして活動しており、そちらでは AI エージェントをフル活用した開発を行っています。 そして業務だけでなく、個人開発の中でも AI を活用して、開発効率を劇的に向上させています。 そんな中、個人開発として Cursor と Claude をフル活用して、プログラミング学習サイトを たった 1 ヶ月で作り切る ことができました。 今回作ったのは「Learning Next」というサイトで、プログラミング学習用のテキスト

              • OpenAI API ドキュメント 日本語訳|#2 GET STARTED 後編|Nobue Otsu|地方で老舗パン屋を第三者承継

                OpenAI API ドキュメントの日本語訳をこちらでまとめます。文字量の多いドキュメントなので、セクションごとに記事を分割しています。 今回は「GET STARTED 」のセクションからLibraries 、Models、TutorialsそしてUsage policiesを抜粋した後編です。 基本 DeepLで翻訳して、気になるところだけ書き換えています(ほぼ気になるところがないのが、DeepLのすごいところ)。原文との突き合わせができるようにはじめに原文を入れてますので、間違いなど見つけられましたら、ぜひご指摘ください。ご指摘箇所は随時反映させていただきます。 原文のリンクが有効になってますので、それぞれ必要な場合は原文リンクの方を参照ください。 前回のおさらいはこちら Python library|Python ライブラリWe provide a Python library, w

                  OpenAI API ドキュメント 日本語訳|#2 GET STARTED 後編|Nobue Otsu|地方で老舗パン屋を第三者承継
                • AI「できました!」人間「(…本当に大丈夫か?)」 Devinと探る、AIコードセキュリティ虎の巻 - GMO Flatt Security Blog

                  万華鏡のように変化するテクノロジーの世界。かつて専門家が丹精込めて紡ぎ出していた『創造物』――精巧な絵画や心揺さぶる音楽、そして複雑なプログラムコードでさえも――が、今やAIによって驚くほど自然に、そして巧妙に生み出されています。その筆致やロジックのきらめきが、人間の手によるものか、それとも精緻なアルゴリズムの産物か。見分けることの難しさは日増しに高まり、私たちに新たな問いを投げかけているようです。 と、ここまでがGemini 2.5 Proに書いてもらった導入文です!記事全文を読んでもらったうえで、「人間が書いたのと見分けがつかないような面白い導入文を載せて、AIが生成するものが高度化していることを興味深く紹介したい」と言ったら書いてくれました。まあまあいい感じですね。全然いい感じじゃないと思った人はAIに文句を言ってください。 個人的に冒頭の文章はわりかしいい線をいっていると思いますが

                    AI「できました!」人間「(…本当に大丈夫か?)」 Devinと探る、AIコードセキュリティ虎の巻 - GMO Flatt Security Blog
                  • フルスクラッチして理解するOpenID Connect (1) 認可エンドポイント編 - エムスリーテックブログ

                    こんにちは。デジカルチームの末永(asmsuechan)です。 この記事では、OpenID Connect の ID Provider を標準ライブラリ縛りでフルスクラッチすることで OpenID Connect の仕様を理解することを目指します。実装言語は TypeScript です。 記事のボリュームを減らすため、OpenID Connect の全ての仕様を網羅した実装はせず、よく使われる一部の仕様のみをピックアップして実装します。この記事は全4回中の第1回となります。 なお、ここで実装する ID Provider は弊社内で使われているものではなく、筆者が趣味として作ったものです。ですので本番環境で使用されることを想定したものではありません。なんなら私は ID Provider を運用する仕事もしておりません。 1 OAuth 2.0 と OpenID Connect 1.1 用語の

                      フルスクラッチして理解するOpenID Connect (1) 認可エンドポイント編 - エムスリーテックブログ
                    • npm debug and chalk packages compromised

                      Starting at September 8th, 13:16 UTC, our Aikido intel feed alerted us to a series packages being pushed to npm, which appeared to contains malicious code. These were 18 very popular packages, backslash (0.26m downloads per week)chalk-template (3.9m downloads per week)supports-hyperlinks (19.2m downloads per week)has-ansi (12.1m downloads per week)simple-swizzle (26.26m downloads per week)color-st

                        npm debug and chalk packages compromised
                      • 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
                        • REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js

                          By Jean-Marc Möckel I've created and consumed many API's over the past few years. During that time, I've come across good and bad practices and have experienced nasty situations when consuming and building API's. But there also have been great moments. There are helpful articles online which present many best practices, but many of them lack some practicality in my opinion. Knowing the theory with

                            REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js
                          • Optimizing Javascript for fun and for profit

                            I often feel like javascript code in general runs much slower than it could, simply because it’s not optimized properly. Here is a summary of common optimization techniques I’ve found useful. Note that the tradeoff for performance is often readability, so the question of when to go for performance versus readability is a question left to the reader. I’ll also note that talking about optimization n

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

                                Today we are excited to announce the availability of TypeScript 6.0! If you are not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for types, which enables type-checking to catch errors, and provide rich editor tooling. You can learn more about TypeScript and how to get started on the TypeScript website. But if you’re already familiar with the language, you ca

                                  Announcing TypeScript 6.0 - TypeScript
                                • 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. 2slides - An MCP server that provides tools to convert content into slides/PPT/presentation or generate slides/PPT/presentation with user intention. ActionKit by Paragon - Connect to 130+ SaaS inte

                                    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 Matter .NET & Visual Studio .NET Tools ReSharper C++ Languages & Frame

                                      JavaScript Best Practices | The WebStorm Blog
                                    • 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
                                      • フロントエンドアプリケーションがエージェントに接続する方法を標準化する AG-UI

                                        { "scripts": { "dev": "tsx watch src/index.ts" } } AG-UI リクエストを解析する まずは、AG-UI リクエストを解析して返すだけのエンドポイントを作成します。src/index.ts ファイルを作成し、以下のコードを追加します。 import express from "express"; import { RunAgentInputSchema, RunAgentInput } from "@ag-ui/core"; const app = express(); app.use(express.json()); app.post("/awp", async (req, res) => { try { // Zod スキーマでリクエストボディを検証 const input: RunAgentInput = RunAgentInputS

                                          フロントエンドアプリケーションがエージェントに接続する方法を標準化する AG-UI
                                        • 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
                                          • JSX Over The Wire — overreacted

                                            Suppose you have an API route that returns some data as JSON: app.get('/api/likes/:postId', async (req, res) => { const postId = req.params.postId; const [post, friendLikes] = await Promise.all([ getPost(postId), getFriendLikes(postId, { limit: 2 }), ]); const json = { totalLikeCount: post.totalLikeCount, isLikedByUser: post.isLikedByUser, friendLikes: friendLikes, }; res.json(json); }); You also

                                              JSX Over The Wire — overreacted
                                            • 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
                                              • 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
                                                • 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 5.9 - TypeScript

                                                    Today we are excited to announce the release of TypeScript 5.9! If you’re not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for types. With types, TypeScript makes it possible to check your code to avoid bugs ahead of time. The TypeScript type-checker does all this, and is also the foundation of great tooling in your editor and elsewhere, making coding even e

                                                      Announcing TypeScript 5.9 - TypeScript
                                                    • ライブラリ作者におすすめしたいBabelの新機能 babel-plugin-polyfill-corejs3 | Wantedly Engineer Blog

                                                      Babelの新しいpolyfill用プラグインであるbabel-polyfillsが2022年4月に脱experimentalを果たしていました。そこで本稿では、Babelにおいてpolyfillがどのように扱われていたかを振り返りながら新しいpolyfill pluginを紹介します。 注意: Babel 7.4で非推奨化された@babel/polyfillとは別物です。 何が問題だったのか?babel-polyfillsのREADMEと元issueにも説明がありますが、本記事ではあらためて日本語で説明したいと思います。端的に言うと今までは以下の要件を両立できませんでした。 ソースコード中で使われている機能のpolyfillだけを注入する。ターゲットブラウザを指定して、必要なpolyfillだけを注入する。副作用のない形でpolyfillを注入する。babel-polyfillsはこれら

                                                        ライブラリ作者におすすめしたいBabelの新機能 babel-plugin-polyfill-corejs3 | Wantedly Engineer Blog
                                                      • AWS公式SDKにも存在した、署名付きURLにおけるパストラバーサル - GMO Flatt Security Blog

                                                        はじめに こんにちは。GMO Flatt Securityのセキュリティエンジニアの松井(@ryotaromosao)とチョン(Eui Chul Chung)です。 皆さんは、「署名付きURLにおけるパストラバーサル」の脆弱性をご存知でしょうか? Webアプリケーションで署名付きURLを実装する際、AWS公式のSDKを用いることが多いかと思います。過去にはその公式SDK自体にパストラバーサルの脆弱性が見つかった事例がありました。また一方で、公式SDK側では正しい対策がされているものの、アプリケーション開発者の実装ミスによってパストラバーサルが引き起こされてしまうケースも存在します。 本記事では、実際にAWS SDKで見つかった脆弱性の事例を交えながら、コードベースで署名付きURLにおけるパストラバーサルの脆弱性を深掘りしていきたいと思います。また、後半では、SDKを利用するアプリケーション

                                                          AWS公式SDKにも存在した、署名付きURLにおけるパストラバーサル - GMO Flatt Security Blog
                                                        • 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
                                                          • 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
                                                            • 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 6.0 Beta - TypeScript

                                                                Today we are announcing the beta release of TypeScript 6.0! To get started using the beta, you can get it through npm with the following command: npm install -D typescript@beta TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase. As announced last year (with recent updates here), we are working on a new codebase for the TypeSc

                                                                  Announcing TypeScript 6.0 Beta - TypeScript
                                                                • jQuery 4.0.0 | Official jQuery Blog

                                                                  On January 14, 2006, John Resig introduced a JavaScript library called jQuery at BarCamp in New York City. Now, 20 years later, the jQuery team is happy to announce the final release of jQuery 4.0.0. After a long development cycle and several pre-releases, jQuery 4.0.0 brings many improvements and modernizations. It is the first major version release in almost 10 years and includes some breaking c

                                                                  • TypeScript一人カレンダー 2022 目次と索引

                                                                    こんにちは、クレスウェア株式会社の奥野賢太郎 (@okunokentaro) です。本記事は『TypeScript 一人 Advent Calendar 2022』(TypeScript一人カレンダー) の目次と索引ページです。 本アドベントカレンダー内の各記事では、2022年12月、TypeScript 4.9の時点で解説しています。本アドベントカレンダーのすべての記事は、TypeScript初心者を脱し始めてもっと活用していきたいと願う読者層に向けていますので、最低限の前提は省略して記述しています。 目次 第1部 Conditional Types 1日目 ReturnType<T> Utility Types ReturnType<T> どんなときに便利? 例1 例2 注意点 2日目 Awaited<T> Awaited<T> どんなときに便利? 例1 例2 3日目 inferと実例

                                                                      TypeScript一人カレンダー 2022 目次と索引
                                                                    • How Stripe builds interactive docs with Markdoc

                                                                      At Stripe, our product docs are designed to feel like an application rather than a traditional user manual. For example, we incorporate a user's own API test key into code samples, making it possible to copy and paste code that seamlessly works with the user's own account. We have client-side interactivity, like checklists and collapsible sections. We tailor the content to the individual user, con

                                                                        How Stripe builds interactive docs with Markdoc
                                                                      • Reverse engineering Claude Code • Kir Shatrov

                                                                        I’ve been curious about what happens inside Claude Code so I’ve spent a couple hours digging through prompts that it sends back to Anthropic. As I’ve been going through that, I’ve gathered some insights why Claude Code is often slower and more expensive than other tools like Cursor. Updated: Since this post was published, someone on the internet created much deeper analysis of Claude Code. Check i

                                                                        • 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
                                                                          • Vue.jsで再利用可能なタブのUIコンポーネントを実装する方法を解説

                                                                            タブは、Webサイトやスマホアプリでよく使用されるUIコンポーネントです。TailwindCSSやBootstrapなどのライブラリにも必ずありますが、再利用可能な柔軟性のあるものではありません。 スタイルを簡単にカスタマイズできる再利用可能なタブコンポーネントをVue.jsで実装する方法を紹介します。 How to Build a Tab Component In Vue.js by Luca Spezzano 下記は各ポイントを意訳したものです。 ※当ブログでの翻訳記事は、元サイト様にライセンスを得て翻訳しています。 はじめに 実装の概要 AppTabs.vueコンポーネントの作成 コードの解説 コンポーネントの使用方法 終わりに はじめに タブはUIでよく使用されるコンポーネントの1つで、Bootstrapのような人気のあるCSSフレームワークやTailwindUIのようなUIコンポ

                                                                              Vue.jsで再利用可能なタブのUIコンポーネントを実装する方法を解説
                                                                            • Weird Lexical Syntax

                                                                              I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                                                                                Weird Lexical Syntax
                                                                              • 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