並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 12 件 / 12件

新着順 人気順

booleanの検索結果1 - 12 件 / 12件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

booleanに関するエントリは12件あります。 searchgithub開発 などが関連タグです。 人気エントリには 『Boolean のカラムを生やす前に考えたいこと』などがあります。
  • Boolean のカラムを生やす前に考えたいこと

    その方が単純に情報量が増えるため 最初 boolean にしてたけど後から時刻もほしくなるということはよくある。後から日時型のカラムに変えようと思っても、過去のイベントの日時は失われてしまっていて困る。今は日時が必要でないように感じても日時にしておく方がよい。 またアプリケーション的に使わなくても、データ分析のためにあると嬉しいことは多い。 コード的にも特に扱いにくくなることはない 以下のようにして簡単に boolean と同じ感覚で扱うことができる。 class Post < ApplicationRecord scope :unpublished, -> { where(published_at: nil) } scope :published, -> { where.not(published_at: nil) } def published? !published_at.nil?

      Boolean のカラムを生やす前に考えたいこと
    • Typescript では !! と Boolean() が完全に同じ動作ではない

      🌼 はじめに 皆さんは Javascript である値を boolean に変換するときどういう方法も使いますか?よく使われる方法は!!(二重否定・Double negation)か、Boolean()だと思います。 const hello = Boolean("hello"); // true const world = !!"world" // true Typescript のハンドブックでもその2つを紹介してます。 You can always coerce values to booleans by running them through the Boolean function, or by using the shorter double-Boolean negation. いちおう型の観点では、!!を使ったら型がtrueかfalseになり、Boolean()関数を使った

        Typescript では !! と Boolean() が完全に同じ動作ではない
      • Why doesn't Ruby have Boolean class?

        https://burikaigi.dev/speakers/004/ This is BuriKaigi, so I talked about "Boolean (Bu-rian)" :)

          Why doesn't Ruby have Boolean class?
        • GitHub - Genivia/ugrep: 🔍 ugrep 7.3 file pattern searcher -- a more powerful, ultra fast, user-friendly, compatible grep replacement. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z,

          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

            GitHub - Genivia/ugrep: 🔍 ugrep 7.3 file pattern searcher -- a more powerful, ultra fast, user-friendly, compatible grep replacement. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z,
          • booleanを極力使わないReactの書き方  - AI時代のスキル面接ならHireRoo

            UIの状態を表すために、複数のbooleanが条件に利用される場合、各状態に名前をつけて状態を表現するほうが、可読性が高く、必要最小限の実装で済みます。

              booleanを極力使わないReactの書き方  - AI時代のスキル面接ならHireRoo
            • [小ネタ] flake8利用時にSQLAlchemyでBoolean型のフィルタを掛けるときの注意点 | DevelopersIO

              こんにちは!DA(データアナリティクス)事業本部 インテグレーション部の大高です。 先日、SQLAlchemyを利用しているPythonの環境にflake8を導入したのですが、思いがけない問題を起こしたので、自分自身への備忘録としても残しておきたいと思います。 前提 今回の環境は以下のような環境です。 SQLAlchemyを利用したPythonプロジェクト環境 flake8を導入して、Visual Studio Codeでコードを自動チェックするようにしている 起きた問題 SQLAlchemyでフィルタを使う際に、以下のようなコードがあるとします。 users = session.query(User).filter(User.deleted == False) このようなコードはFalseとの比較演算子として==を利用しているのでflake8からお叱りをうけます。 comparison

                [小ネタ] flake8利用時にSQLAlchemyでBoolean型のフィルタを掛けるときの注意点 | DevelopersIO
              • GitHub Issues search now supports nested queries and boolean operators: Here's how we (re)built it

                Originally, Issues search was limited by a simple, flat structure of queries. But with advanced search syntax, you can now construct searches using logical AND/OR operators and nested parentheses, pinpointing the exact set of issues you care about. Building this feature presented significant challenges: ensuring backward compatibility with existing searches, maintaining performance under high quer

                  GitHub Issues search now supports nested queries and boolean operators: Here's how we (re)built it
                • Oracle、「Oracle Database 23ai」を発表 AIベクトル検索に対応、SQLでBoolean型を追加

                  Oracleは2024年5月4日(米国時間)、コンバージドデータベースの最新バージョン「Oracle Database 23ai」(旧称:Oracle Database 23c)を発表した。Oracle Database 23aiでは、AI(人工知能)に焦点を当て、製品名を23cから23aiに変更したとしている。 Oracle Database 23aiは「Oracle Exadata Cloud@Customer」「OCI Exadata Database Service」「OCI Base Database Service」「Azure Oracle Database Service」で利用できる。自律型データベース「Oracle Autonomous Database」を無料で提供する「Always Free」版でも同バージョンを利用可能で、「Autonomous Database

                    Oracle、「Oracle Database 23ai」を発表 AIベクトル検索に対応、SQLでBoolean型を追加
                  • [TypeScript][ESLint]@typescript-eslint/strict-boolean-expressionsでTruthy/Falsyの判定を禁止する | DevelopersIO

                    [TypeScript][ESLint]@typescript-eslint/strict-boolean-expressionsでTruthy/Falsyの判定を禁止する 吉川@広島です。 JS/TSのコードに触れていると、以下のようなTruthy/Falsyを利用したnullチェックを見ることがあると思います。 const foo: Foo | undefined = getFoo() if (foo) { // fooがundefinedでない場合の処理 } 個人的に、Truthy/Falsyを使った判定は後からコードを見返した際に「nullチェックをしているのか」「0をチェックしているのか」「空文字 "" をチェックしているのか」など一瞬読解に迷う場合があるため、より厳密な判定をする方が好みです。 例えばnullチェックであれば != null と書くようにした方が意図が明確に伝わ

                      [TypeScript][ESLint]@typescript-eslint/strict-boolean-expressionsでTruthy/Falsyの判定を禁止する | DevelopersIO
                    • 【Laravel】boolean型にしたカラムのデータが0/1で返ってくる(Modelでキャストする)【MySQL】

                      と設定したはずが、データを取得するとint(0) / int(1)になっていることはないでしょうか。 実はMySQLではboolean型は無く、上記の設定で作成されるカラムは `is_xxx` tinyint(1) NOT NULL DEFAULT '0', となります。 そのためこれをこのまま取得すると0/1になってしまいます。 利用箇所で毎回キャストするのは面倒です。 ではどう対応するのか、Laravelの場合はModelにcastの機能があります。 参考:https://readouble.com/laravel/8.x/ja/eloquent-mutators.html

                        【Laravel】boolean型にしたカラムのデータが0/1で返ってくる(Modelでキャストする)【MySQL】
                      • Pandas error "Unalignable boolean Series provided as indexer" - ITipsUs

                        pandas.DataFrame is useful to handle table format data. With using pandas, we can import CSV or Excel data and extract specific rows. One day, pandas raised such an error. This error message was difficult for us to understand. What was the cause of error ? So today I will introduce about "Pandas error 'Unalignable boolean Series provided as indexer'". "Unalignable boolean Series provided as indexe

                          Pandas error "Unalignable boolean Series provided as indexer" - ITipsUs
                        • [朗報]FigmaのVariantsにBooleanが追加、コンポーネント管理がスッキリできる! - Qiita

                          レイヤーのオンオフをVariantsで設定できるようになった 控えめに言って神アップデートです。 以前までは、ボタンのアイコンのあるなしやフォームのエラーメッセージのあるなしなど、「ちょっとした要素のあるなしの違い」をいちいちVariantを分けて作成するか、Instance上で該当部分を非表示にする必要がありました。 しかし、FigmaのアップデートによってレイヤーにオンオフのBooleanを設定できるようになり、こうした「ちょっとした要素のあるなしの違い」が 「ある」状態だけを作成すれば良く なりました!!! 使い方 使い方は簡単です。 1.コンポーネントを作成する まずはオンオフのある要素が「ある」状態のコンポーネントを作成します。 2. コンポーネントプロパティを作成をする 次にプロパティパネルからコンポーネントプロパティの作成を選択し、「Boolean」を選択します。 選択すると

                            [朗報]FigmaのVariantsにBooleanが追加、コンポーネント管理がスッキリできる! - Qiita
                          1

                          新着記事