並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 252件

新着順 人気順

if else statement example in cの検索結果1 - 40 件 / 252件

  • 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

    • 「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる

      はじめに 「Just use Postgres」という言葉を初めて聞いたのは、いつだったか覚えていません。Twitter か Hacker News か、あるいは社内の Slack か。どこで聞いたにせよ、私の反応は決まっていました。「また極端なことを言う人がいる」と。 「それ、〇〇でもできますよ」——この手のフレーズはもう100回は聞いてきました。そして大抵の場合、その〇〇は専用ツールに置き換えられていきます。技術が専門分化していくのは自然な流れです。 全文検索なら Elasticsearch。時系列データなら InfluxDB。メッセージキューなら RabbitMQ。それぞれの分野に専門家がいて、専用のソリューションがあって、ベストプラクティスがあります。「とりあえず Postgres で」なんて、それは思考停止ではないか、と。でも、心のどこかで気になっていたんです。 www.mann

        「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる
      • 大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog

        1. はじめに 2024 年 5 月 14 日、OpenAI 社から新たな生成 AI「GPT-4o」が発表され、世界に大きな衝撃を与えました。これまでの GPT-4 よりも性能を向上させただけでなく1、音声や画像のリアルタイム処理も実現し、さらに応答速度が大幅に速くなりました。「ついにシンギュラリティが来てしまったか」「まるで SF の世界を生きているような感覚だ」という感想も見受けられました。 しかし、いくら生成 AI とはいえ、競技プログラミングの問題を解くのは非常に難しいです。なぜなら競技プログラミングでは、問題文を理解する能力、プログラムを実装する能力だけでなく、より速く答えを求められる解法 (アルゴリズム) を考える能力も要求されるからです。もし ChatGPT が競技プログラミングを出来るようになれば他のあらゆるタスクをこなせるだろう、と考える人もいます。 それでは、現代最強の

          大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog
        • MySQL のインデクスが利用されないクエリ等を自動検出する ExplainPolice の運用について

          LINE株式会社は、2023年10月1日にLINEヤフー株式会社になりました。LINEヤフー株式会社の新しいブログはこちらです。 LINEヤフー Tech Blog LINE 株式会社 B2B Platform 開発担当フェローの Matsuno です。 LINE の Business Platform ではメインのデータベースとして MySQL を利用しています。MySQL は非常に高速に動く OSS の RDBMS なので、とても便利に利用させていただいております。 MySQL はとても高速なのですが、うっかり index を使わないクエリを発行した場合に実行がとても遅くなってしまうことがあります。LINE の Business Platform はとても多くのお客様が利用されるので、B2B としては異例なほどトラフィックが多く、少し遅いクエリが発生した結果としてサイト全体がダウンして

            MySQL のインデクスが利用されないクエリ等を自動検出する ExplainPolice の運用について
          • Go の ORM はどのようにして AUTO INCREMENT で採番された値を取得しているのか? - MySQL 編 - カミナシ エンジニアブログ

            こんにちは。カミナシで「カミナシレポート」の開発を担当しているソフトウェアエンジニアの佐藤です。 カミナシレポートのバックエンドは Go で開発しており、データベースには Amazon Aurora MySQL を使用しています。また、データベースアクセスには ORM ライブラリの GORM を採用しています。 ほとんどのテーブルでは、プライマリキー(ID列)に AUTO INCREMENT を利用しています。これらのテーブルに GORM の Create メソッドなどを使って新しいレコードを挿入すると、AUTO INCREMENT で採番された値が自動的に対応する Struct のフィールドに反映されます。 AUTO INCREMENT による値の採番は MySQL 側で実行されているため、Go 側の Struct のフィールドに反映させるためには、Go アプリケーション側が何らかの方法

              Go の ORM はどのようにして AUTO INCREMENT で採番された値を取得しているのか? - MySQL 編 - カミナシ エンジニアブログ
            • IAM ロールで 100 連鎖してみた | DevelopersIO

              俺達はいつまでも立ち尽くし見つめていた━━━ 数多の IAM ロールが移ろうように連鎖していく、そのさまを。 コンバンハ、「 IAM ロールはお面」おじさんです。 この世で最も大切なもの、それは繋がりであり、そして連なりですよね。 ということで、早速 IAM ロールで 10 連鎖してみました。 いや、せっかくなので 100 連鎖くらい行ってみましょうか。そうしましょう。興奮してきたな。 まとめ IAM ロールはそんな連鎖させるようなもんじゃない。 手始めに IAM ロールを 101 個作ろう 早速、 100 連鎖のために IAM ロールを 101 個作ります。 「 100 連鎖なのに 101 個なの?」と思うかもしれませんが、ヤマタノオロチの「股(首と首の間)」は 7 個しかありませんよね。(「岐」は 8 個あるんですけどね。)それと同じです。 101 個くらいの数なら「温かみのある手作業

                IAM ロールで 100 連鎖してみた | DevelopersIO
              • Introducing Deopt Explorer - TypeScript

                Over the past few months, during the lead-up to the TypeScript 5.0 beta, our team spent a good portion of our time looking for ways to improve the performance of our compiler so that your projects build faster. One of the ways we improved was by looking into an oft overlooked aspect of many JavaScript VMs: inline caching. A Brief Primer on Inline Caching Inline caching is an optimization often use

                  Introducing Deopt Explorer - 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
                  • The Untold Story of SQLite - CoRecursive Podcast

                    00:00 - Introduction 01:45 - The Battleship 02:49 - NP-Complete Problems 06:24 - Building SQLite V1 07:54 - Motorola Phones 09:40 - America Online Phones 11:12 - Symbian OS and Nokia 13:01 - The Bus Factor and the Consortium 15:11 - Enter Android 17:05 - Guys, This Is Important 18:18 - Testing and Aviation Standards 21:29 - Billions of Tests 25:30 - Building From First Principles 28:05 - B-Trees a

                      The Untold Story of SQLite - CoRecursive Podcast
                    • The Linux Kernel Module Programming Guide

                      Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram, Jim Huang 1 Introduction 1.1 Authorship 1.2 Acknowledgements 1.3 What Is A Kernel Module? 1.4 Kernel module package 1.5 What Modules are in my Kernel? 1.6 Is there a need to download and compile the kernel? 1.7 Before We Begin 2 Headers 3 Examples 4 Hello World 4.1 The Simplest Module 4.2 Hello and Goodbye 4.3 The __init and __exit Mac

                      • 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
                        • Rust 1.51を早めに深掘り - OPTiM TECH BLOG

                          こんにちは、R&Dチームの齋藤(@aznhe21)です。書きたい記事がいっぱいあるのに時間が取れません。悲しい。 さて、本日、日本時間3/26(金)、Rust 1.51がリリースされました。 この記事ではRust 1.51での変更点を詳しく紹介します。 3/26は普通選挙法成立の日 ピックアップ ジェネリクスの引数として定数を使えるようになった 配列要素の所有権を奪いつつイテレート出来るようになった featureの新しい解決機構が使えるようになった 安定化されたAPIのドキュメント Arc::decrement_strong_count 安全性 サンプル Arc::increment_strong_count 安全性 サンプル Once::call_once_force サンプル Peekable::next_if_eq サンプル Peekable::next_if サンプル Seek:

                            Rust 1.51を早めに深掘り - OPTiM TECH BLOG
                          • Writing a C compiler in 500 lines of Python

                            A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

                            • CD PROJEKT RED User Agreement

                              CD PROJEKT RED USER AGREEMENT last updated: 17 JULY 2025 in effect from: 16 AUGUST 2025 (click here to view the previous versions) First Things First Hi! So great to see you here! What you see here are the rules that regulate how you can use our video games (Game(s)) and/or other services that we may offer from time to time (Service(s)). Before we let you read on, we need to address our customers

                              • 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
                                • Rust 1.50を早めに深掘り - OPTiM TECH BLOG

                                  こんにちは、R&Dチームの齋藤(@aznhe21)です。 さて、本日、日本時間2/12(金)、Rust 1.50がリリースされました。 この記事ではRust 1.50での変更点を詳しく紹介します。 2/12はダーウィンの日 *1 *2 ピックアップ Rust財団が誕生 ディレクトリ内容を変更した際のbuild.rsの再実行 boolの値でOptionを返す関数 値域を制限する関数 配列を同じ値で埋める関数 安定化されたAPIのドキュメント bool::then サンプル btree_map::Entry::or_insert_with_key サンプル f32::clamp パニック サンプル f64::clamp パニック サンプル hash_map::Entry::or_insert_with_key サンプル Ord::clamp パニック サンプル RefCell::take パニ

                                    Rust 1.50を早めに深掘り - OPTiM TECH BLOG
                                  • Turing Machines

                                    ALAN M. TURING 23 June 1912 – 7 June 1954 F | | P(T) R P(u) R P(r) R P(i) R P(n) R P(g) R P( ) R P(M) R P(a) R P(c) R P(h) R P(i) R P(n) R P(e) R P(s) R -> B B | | L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) -> F 2024-12-20 Translations: English, Spanish In 1928, David Hilbert, one of the most influential mathematicians of his time, aske

                                      Turing Machines
                                    • 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
                                      • TypeScript and native ESM on Node.js

                                        In this blog post, I’ll explain everything you need to know in order to use and produce native ECMAScript modules on Node.js. The GitHub repository iterable is an example of a TypeScript ESM package that works on Node.js. It still uses the "typesVersions" workaround (which isn’t needed in TypeScript 4.7 and later). (Thanks to Guy Beford and Oleg Drapeza for their feedback on this post.) 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
                                          • 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
                                            • Python 3.13 gets a JIT

                                              Happy New Year everyone! In late December 2023 (Christmas Day to be precise), CPython core developer Brandt Bucher submitted a little pull-request to the Python 3.13 branch adding a JIT compiler. This change, once accepted would be one of the biggest changes to the CPython Interpreter since the Specializing Adaptive Interpreter added in Python 3.11 (which was also from Brandt along with Mark Shann

                                                Python 3.13 gets a JIT
                                              • Choose Postgres queue technology

                                                Introduction⌗ Postgres queue tech is a thing of beauty, but far from mainstream. Its relative obscurity is partially attributable to the cargo cult of “scale”. The scalability cult has decreed that there are several queue technologies with greater “scalability” than Postgres, and for that reason alone, Postgres isn’t suitably scalable for anyone’s queuing needs. The cult of scalability would rathe

                                                  Choose Postgres queue technology
                                                • Part 1: How We Fell Out of Love with Next.js and Back in Love with Ruby on Rails & Inertia.js - Hardcover Blog

                                                  This is part 1 of a series documenting Hardcover’s Alexandria release. We recently migrated our codebase from Next.js to Ruby on Rails, and it’s been amazing so far! It was a learning experience, and I’m excited to share some of our takeaways. I’ll link each article here as it’s written. Introducing Alexandria: Faster, Smoother, Smarter Part 1: How we fell out of love with Next.js and back in love

                                                  • CVE-2020-19909 is everything that is wrong with CVEs

                                                    This is a story consisting of several little building blocks and they occurred spread out in time and in different places. It is a story that shows with clarity how our current system with CVE Ids and lots of power given to NVD is a completely broken system. CVE-2020-19909 On August 25 2023, we got an email to the curl-library mailing list from Samuel Henrique that informed us that “someone” had r

                                                      CVE-2020-19909 is everything that is wrong with CVEs
                                                    • Decoded: GNU coreutils – MaiZure's Projects

                                                      Helpful background for code reading The GNU coreutils has its foibles. Many of these utilities are approaching 30 years old and include revisions by many people over the years. Here are some things to keep in mind when reading the code: Tiny programs - These utilities are small, (mostly) single-source file programs designed to do one thing and do it well. They are not designed for long life or to

                                                      • RFC 9562: Universally Unique IDentifiers (UUIDs)

                                                         Internet Engineering Task Force (IETF) K. Davis Request for Comments: 9562 Cisco Systems Obsoletes: 4122 B. Peabody Category: Standards Track Uncloud ISSN: 2070-1721 P. Leach University of Washington May 2024 Universally Unique IDentifiers (UUIDs) Abstract This specification defines UUIDs (Universally Unique IDentifiers) -- also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform Resou

                                                          RFC 9562: Universally Unique IDentifiers (UUIDs)
                                                        • 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
                                                          • 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
                                                            • 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

                                                              • Announcing Parcel v2!

                                                                The Parcel team is beyond excited to announce that v2.0.0 stable is now available! 🎉 Parcel 2 brings the zero configuration experience you know and love from Parcel 1, and makes it scalable and extensible to projects of any size and complexity. It is already being used in production at some of the biggest companies in the industry including Atlassian, Adobe, and Microsoft. Check out our new websi

                                                                  Announcing Parcel v2!
                                                                • Rust 1.54を早めに深掘り - OPTiM TECH BLOG

                                                                  こんにちは、R&Dチームの齋藤(@aznhe21)です。 オリンピックでは日本が金メダルラッシュですね!現地まで見に行けない分テレビ前での応援に力が入ります。 さて、本日、日本時間7/30(金)、Rust 1.54がリリースされました。 この記事ではRust 1.54での変更点を詳しく紹介します。 7/30は映画「モスラ」公開の日 ピックアップ 一部の属性内で値としてマクロを使えるようになった WebAssemblyでSIMDが使えるようになった eBPF向けにビルド出来るようになった 安定化されたAPIのドキュメント BTreeMap::into_keys サンプル BTreeMap::into_values サンプル HashMap::into_keys サンプル HashMap::into_values サンプル arch::wasm32 VecDeque::binary_searc

                                                                    Rust 1.54を早めに深掘り - OPTiM TECH BLOG
                                                                  • Announcing Dart 3

                                                                    Hello from Google I/O 2023. Today, live from Mountain View, we’re announcing Dart 3 — the largest Dart release to date! Dart 3 contains three major advancements. First, we’ve completed the journey to 100% sound null safety. Second, we’ve added major new language features for records, patterns, and class modifiers. Third, we’re giving a preview of the future, where we broaden our platform support w

                                                                      Announcing Dart 3
                                                                    • Stranger Strings: An exploitable flaw in SQLite

                                                                      Trail of Bits is publicly disclosing CVE-2022-35737, which affects applications that use the SQLite library API. CVE-2022-35737 was introduced in SQLite version 1.0.12 (released on October 17, 2000) and fixed in release 3.39.2 (released on July 21, 2022). CVE-2022-35737 is exploitable on 64-bit systems, and exploitability depends on how the program is compiled; arbitrary code execution is confirme

                                                                        Stranger Strings: An exploitable flaw in SQLite
                                                                      • Parsing SQL - Strumenta

                                                                        The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                                                                          Parsing SQL - Strumenta
                                                                        • research!rsc: The xz attack shell script

                                                                          Posted on Tuesday, April 2, 2024. Updated Wednesday, April 3, 2024. Introduction Andres Freund published the existence of the xz attack on 2024-03-29 to the public oss-security@openwall mailing list. The day before, he alerted Debian security and the (private) distros@openwall list. In his mail, he says that he dug into this after “observing a few odd symptoms around liblzma (part of the xz packag

                                                                          • syntaxdesign

                                                                            One of the most recognizable features of a languages is its syntax. What are some of the things about syntax that matter? What questions might you ask if you were creating a syntax for your own language? Motivation A programming language gives us a way structure our thoughts. Each program, has a kind of internal structure, for example: How can we capture this structure? One way is directly, via pi

                                                                            • Implementing Logic Programming

                                                                              Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

                                                                                Implementing Logic Programming
                                                                              • 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
                                                                                • Font with Built-In Syntax Highlighting

                                                                                  Note: I received a lot of great feedback from the discussions at Mastodon and Hacker News, so I've updated the post with some improvements to the font! I've also added some further examples and acknowledgements at the end. Syntax Highlighting in Hand-Coded Websites The problem I have been trying to identify practical reasons why hand-coding websites with HTML and CSS is so hard (by hand-coding, I