並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 28 件 / 28件

新着順 人気順

powershell if string not nullの検索結果1 - 28 件 / 28件

  • 関数名、メソッド名、変数名でよく使う英単語のまとめ

    プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • パイプライン指向JSON処理プログラミング言語 jq - 檜山正幸のキマイラ飼育記 (はてなBlog)

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

        パイプライン指向JSON処理プログラミング言語 jq - 檜山正幸のキマイラ飼育記 (はてなBlog)
      • とほほのPowerShell入門 - とほほのWWW入門

        ブレークポイントを設定してスクリプトをデバッグすることもできます。デバッガを使用するにはスクリプトをファイルとして保存し、下記の様にポリシー変更する必要があります。 Set-ExecutionPolicy -Scope CurrentUser ExecutionPolicy: RemoteSigned キーワード 言語としては下記のキーワードが定義されています。 変数 変数($xxx) 変数は $変数名 で表します。 $Name = "Yamada" Write-Output "My name is $Name." 変数の値を削除するには Clear-Variable を使用するか、値 $null を設定します。変数を削除するには Remove-Variable または Remove-Item を使用します。 Clear-Variable -Name a # 値をクリア $a = $nul

        • Windows版「rm -rf /*」の「cmd /c rd /s /q c:\」を実行してみた | DevelopersIO

          よい子(大人を含む)はマネしないでね。 この記事に書いてある内容を、自分が所有するPC以外(業務用PC、公共のPCなどで)で行った場合、 電子計算機損壊等業務妨害罪(刑法234条の2)に問われ、5年以下の懲役または100万円以下の罰金の可能性や損害賠償を求められる可能性があるらしいです。 Windows版「rm -rf /*」を実行してみたくなった つい先日、Amazon Linux 2でrm -rf /*を実行して、OSを破壊してみました。そちらの様子は以下記事をご参照ください。 Linuxを破壊してみると、何だか次はWindowsも破壊したくなってきました。 そこで、Windows Server 2019に対して、Windows版rm -rf /*と呼ばれるcmd /c rd /s /q c:\を実行してみて、どこまで壊れるのか確認してみます。 いきなりまとめ cmd /c rd /s

            Windows版「rm -rf /*」の「cmd /c rd /s /q c:\」を実行してみた | DevelopersIO
          • Announcing .NET 10 - .NET Blog

            Today, we are excited to announce the launch of .NET 10, the most productive, modern, secure, intelligent, and performant release of .NET yet. It’s the result of another year of effort from thousands of developers around the world. This release includes thousands of performance, security, and functional improvements across the entire .NET stack-from languages and developer tools to workloads-enabl

              Announcing .NET 10 - .NET Blog
            • KotlinとGradleで始めるモダンなビルド環境 - 電通総研 テックブログ

              みなさんこんにちは、電通国際情報サービス(ISID)コーポレート本部 システム推進部の佐藤太一です。 本日は最新のGradle(2022/08現在)を使いこなしながらKotlinでJavaのアプリケーションをビルドするスクリプトを書く際に、知っておくと便利なノウハウをまとめてご紹介します。 はじめに 記事の執筆環境 scoopのセットアップ Javaのセットアップ Gradleのセットアップ サンプルアプリケーションについて ルートプロジェクトの実装 ウェブアプリケーションプロジェクトの実装 ビルドスクリプトの作成 サンプルアプリケーションの実装 バージョニング その他のバージョニングプラグイン バッチプロジェクトの実装 バッチアプリケーションの実装 Fat/Uber Jarの作り方 ビルドにおける共通処理の切り出し ローカルプラグインの作り方 ローカルプラグインの実装 ローカルプラグイン

                KotlinとGradleで始めるモダンなビルド環境 - 電通総研 テックブログ
              • python_modules.pdf

                Python3 OpenCV / Pillow / pygame / Eel / PyDub / NumPy / matplotlib / SciPy / SymPy / gmpy2 / hashlib, passlib / Cython / Numba / ctypes / PyInstaller / curses / tqdm / JupyterLab / json / psutil / urllib / zenhan / jaconv Copyright © 2017-2025, Katsunori Nakamura 2025 8 19 Python ‘ .py’ Python Python Windows PSF Python py .py Enter macOS Linux PSF Python python3 .py Enter Anaconda Prompt Python p

                • PowerShell: the object-oriented shell you didn’t know you needed

                  PowerShell is an interactive shell and scripting language from Microsoft. It’s object-oriented — and that’s not just a buzzword, that’s a big difference to how the standard Unix shells work. And it is actually usable as an interactive shell. Getting Started PowerShell is so nice, Microsoft made it twice. Specifically, there concurrently exist two products named PowerShell: Windows PowerShell (5.1)

                  • Kotlinで軽量なREST APIサーバーを作ろう 〜 KtorとExposedことはじめ 〜 - 虎の穴開発室ブログ

                    はじめまして、こんにちは。虎の穴ラボに最近ジョインしました鷺山と申します。 現在はとらのあな通販の開発チーム (通販チーム) に参加しています。 通販チームでは入社時の研修として、日々の業務でも活用できる社内向けのツールをKotlinを使って開発することになっています。私は入社する以前からKotlinのことは気になっていたので、研修の機会にKotlinに本格的に触れることができたのはラッキーでした。また実際にKotlinでプログラムを書いてみると、スッキリと簡潔に書けるところが気に入っています。 今回の研修では、Kotlinを使って簡単なREST APIサーバーを作りました。1から調べながらの開発でしたが、Web上には開発のためのまとまった情報がまだそこまで多くない印象です。 そこで、本エントリーではKotlinによるREST APIサーバー開発がすぐに始められるスターター的なコード一式を

                      Kotlinで軽量なREST APIサーバーを作ろう 〜 KtorとExposedことはじめ 〜 - 虎の穴開発室ブログ
                    • Guidance for preventing, detecting, and hunting for exploitation of the Log4j 2 vulnerability | Microsoft Security Blog

                      January 10, 2022 recap – The Log4j vulnerabilities represent a complex and high-risk situation for companies across the globe. This open-source component is widely used across many suppliers’ software and services. By nature of Log4j being a component, the vulnerabilities affect not only applications that use vulnerable libraries, but also any services that use these applications, so customers may

                        Guidance for preventing, detecting, and hunting for exploitation of the Log4j 2 vulnerability | Microsoft Security Blog
                      • Linux Executables Deployed as Stealth Windows Loaders

                        No Longer Just Theory: Black Lotus Labs Uncovers Linux Executables Deployed as Stealth Windows Loaders Executive Summary In April 2016, Microsoft shocked the PC world when it announced the Windows Subsystem for Linux (WSL). WSL is a supplemental feature that runs a Linux image in a near-native environment on Windows, allowing for functionality like command line tools from Linux without the over-he

                          Linux Executables Deployed as Stealth Windows Loaders
                        • Infecting SSH Public Keys with backdoors

                          In this article, you will learn how to add a backdoor to the SSH Public Key. The backdoor will execute whenever the user logs in. The backdoor hides as an unreadable long hex-string inside ~/.ssh/authorized_keys or ~/.ssh/id_*.pub. The source is available from GitHub. TL;DR Simply prepend any SSH Public Key with the following backdoor-string - up until, but not including, the ssh-ed25519 AAAAC3Nzb

                            Infecting SSH Public Keys with backdoors
                          • KB5034957: CVE-2024-20666 のセキュリティの脆弱性に対処するために、展開されたデバイスの WinRE パーティションを更新する - Microsoft サポート

                            Windows 10 Home and Pro, version 21H2 Windows 10 Enterprise and Education, version 21H2 Windows 10 IoT Enterprise, version 21H2 Windows 10 Home and Pro, version 22H2 Windows 10 Enterprise Multi-Session, version 22H2 Windows 10 Enterprise and Education, version 22H2 Windows 10 IoT Enterprise, version 22H2 Windows 11 Home and Pro, version 21H2 Windows 11 Enterprise Multi-Session, version 21H2 Window

                            • Windows & Active Directory Exploitation Cheat Sheet and Command Reference

                              Last update: November 3rd, 2021 Updated November 3rd, 2021: Included several fixes and actualized some techniques. Changes made to the Defender evasion, RBCD, Domain Enumeration, Rubeus, and Mimikatz sections. Fixed some whoopsies as well 🙃. Updated June 5th, 2021: I have made some more changes to this post based on (among others) techniques discussed in ZeroPointSecurity’s ‘Red Team Ops’ course

                                Windows & Active Directory Exploitation Cheat Sheet and Command Reference
                              • 【C#】dotnet user-jwts はいいぞ。 - ねののお庭。

                                .NET 7 から dotnet user-jwts という機能が生えてきました。ASP.NET Core で認証認可に JWT を使って開発している人間にとっては大変便利なのですよ、コレが。 はじめに dotnet user-jwts の使い方...の前に下準備 dotnet user-jwts の使い方 気になるかもしれない点 ASP.NET Core の内部実装 おわりに References はじめに 今の世の中 WEB API の認証認可は JWT で行っているケースが殆どでしょう。 そんな JWT ですが開発時にも当然使いますよね。SwaggerUI とか Postman に設定したりして。 が、そのような開発時に使う JWT の生成を皆さんはどうしているでしょう? 使っている認証プロバイダにもよると思いますが、概ね多少の面倒が付きまとうのではないでしょうか。 そこで .NET

                                  【C#】dotnet user-jwts はいいぞ。 - ねののお庭。
                                • ACTINIUM targets Ukrainian organizations | Microsoft Security Blog

                                  April 2023 update – Microsoft Threat Intelligence has shifted to a new threat actor naming taxonomy aligned around the theme of weather. ACTINIUM is now tracked as Aqua Blizzard and DEV-0586 is now tracked as Cadet Blizzard. To learn about how the new taxonomy represents the origin, unique traits, and impact of threat actors, and to get a complete mapping of threat actor names, read this blog: Mic

                                    ACTINIUM targets Ukrainian organizations | Microsoft Security Blog
                                  • https://docs.microsoft.com/ja-jp/powershell/scripting/learn/deep-dives/everything-about-arrays

                                    配列とは まず、配列とは何か、そしてほとんどのプログラミング言語で使用される方法についての基本的な技術的な説明から始めます。その後、PowerShell がそれらを使用する他の方法に移行します。 配列は、複数の項目のコレクションとして機能するデータ構造です。 配列を反復処理したり、インデックスを使用して個々の項目にアクセスしたりできます。 配列は、各値がもう一方の隣に格納されるメモリの順次チャンクとして作成されます。 私たちは行くにつれて、これらの詳細のそれぞれについて触れます。 基本的な使用方法 配列は PowerShell の基本的な機能であるため、PowerShell で操作するための簡単な構文があります。 配列を作成する 空の配列は、次を使用して作成できます。 @() PS> $data = @() PS> $data.Count 0 配列を作成し、 @() かっこ内に配置するだけ

                                      https://docs.microsoft.com/ja-jp/powershell/scripting/learn/deep-dives/everything-about-arrays
                                    • cuneicode, and the Future of Text in C

                                      Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                                        cuneicode, and the Future of Text in C
                                      • March 2021 (version 1.55)

                                        Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.55.1: The update addresses these issues. Update 1.55.2: The update addresses these security issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the March 2021 release of Visual Studio Code. There are a number of updates in this version tha

                                          March 2021 (version 1.55)
                                        • PowerShell スクリプトのパフォーマンスに関する考慮事項 - PowerShell

                                          出力の抑制 パイプラインへのオブジェクトの書き込みを回避するには、さまざまな方法があります。 $null への割り当てまたはファイル リダイレクト [void] へのキャスティング Out-Null にパイプ $null への割り当て。[void] へのキャスティング、$null へのファイル リダイレクトの速度はほぼ同じです。 ただし、大きなループで Out-Null を呼び出す場合は、PowerShell 5.1 でも大幅に遅くなる場合があります。 $tests = @{ 'Assign to $null' = { $arrayList = [System.Collections.ArrayList]::new() foreach ($i in 0..$args[0]) { $null = $arraylist.Add($i) } } 'Cast to [void]' = { $arr

                                            PowerShell スクリプトのパフォーマンスに関する考慮事項 - PowerShell
                                          • Managing domain membership of dynamic fleet of EC2 instances | Amazon Web Services

                                            AWS Compute Blog Managing domain membership of dynamic fleet of EC2 instances This post is written by Alex Zarenin, Senior AWS Solution Architect, Microsoft Tech. Updated: February 10, 2021 1.   Introduction For most companies, a move of Microsoft workloads to AWS starts with “lift and shift” where existing workloads are moved from the on-premises data centers to the cloud. These workloads may inc

                                              Managing domain membership of dynamic fleet of EC2 instances | Amazon Web Services
                                            • Executing shell commands from Node.js

                                              Warning: This blog post is outdated. Instead, read chapter “Running shell commands in child processes” in “Shell scripting with Node.js”. In this blog post, we’ll explore how we can execute shell commands from Node.js, via module 'node:child_process'. Overview of this blog post  # Module 'node:child_process' has a function for executing shell commands (in spawned child processes) that comes in two

                                              • ZINC attacks against security researchers | Microsoft Security Blog

                                                April 2023 update – Microsoft Threat Intelligence has shifted to a new threat actor naming taxonomy aligned around the theme of weather. Zinc is now tracked as Diamond Sleet. To learn about how the new taxonomy represents the origin, unique traits, and impact of threat actors, and to get a complete mapping of threat actor names, read this blog: Microsoft shifts to a new threat actor naming taxonom

                                                  ZINC attacks against security researchers | Microsoft Security Blog
                                                • June 2025 (version 1.102)

                                                  Release date: July 9, 2025 Update 1.102.1: The update addresses these issues. Update 1.102.2: The update addresses these issues. Update 1.102.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the June 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some

                                                    June 2025 (version 1.102)
                                                  • Azure アプリ ID を作成する (PowerShell) - Microsoft identity platform

                                                    必要なアクセス許可 この記事を完了するには、Microsoft Entra ID と Azure サブスクリプションの両方で十分なアクセス許可を持っている必要があります。 具体的には、Microsoft Entra ID でアプリケーションを作成し、ロールにサービス プリンシパルを割り当てることができる必要があります。 自分のアカウントに適切なアクセス許可があるかどうかを確認する最も簡単な方法は、Microsoft Entra 管理センターを使用することです。 アプリケーションをロールに割り当てる サブスクリプション内のリソースにアクセスするには、アプリケーションをロールに割り当てる必要があります。 どのロールがそのアプリケーションに適切なアクセス許可を提供するかを判断します。 利用できるロールの詳細については、「Azure 組み込みロール」を参照してください。 スコープは、サブスクリプシ

                                                      Azure アプリ ID を作成する (PowerShell) - Microsoft identity platform
                                                    • Windows Terminal Preview 1.22 Release

                                                      Hello friends, we have a new Windows Terminal Preview release! Windows Terminal Preview 1.22 is a large release that contains new features such as Sixel image support (a LARGE community contribution!), Grapheme Cluster Support, the Snippets Pane, Quick Fixes in CMD, and a new Cooked Read popup in CMD to name a few! We are also updating Windows Terminal stable to version 1.21 which will include all

                                                        Windows Terminal Preview 1.22 Release
                                                      • Webアプリケーションを自動で操作してみよう | へっぽこ実験ブログ

                                                        自動操作を行う場合、id、name、classなどを利用して要素を指定することになるので、属性値をメモしておきましょう。 5.同様にボタンについても属性を調べます。その結果は以下のようになります。 <input class="gNO89b" value="Google 検索" aria-label="Google 検索" name="btnK" type="submit" data-ved="0ahUKEwiC0u6iu4nlAhXwyIsBHWwTBHcQ4dUDCAo"> 属性 値 ここで調べた属性を利用して要素を特定して自動操作を行うことになります。。 また、今回はChromeでのやり方を紹介しましたが、他のブラウザでも同様のことが可能です。同じWebアプリケーションを使用していてもブラウザによって出力される内容が異なる可能性もあるので、自動操作を行うブラウザを使用して要素を調べるよ

                                                          Webアプリケーションを自動で操作してみよう | へっぽこ実験ブログ
                                                        • HTB Cloud 問題の攻撃手法まとめ - blog of morioka12

                                                          1. はじめに こんにちは、morioka12 です。 本稿では、Hack The Box の Labs にある Retired な Machines の中で、Cloud に関する問題をピックアップして攻撃手法やセキュリティ視点での特徴について紹介します。 また、同様に 2021年の CTF のイベントで Cloud に関する問題は、以下のブログで紹介しているので、良ければこちらもご覧ください。 scgajge12.hatenablog.com 1. はじめに 1.1 調査対象 Machine List 1.2 Public Cloud Service 2. AWS (Amazon Web Services) 2.1 Gobox writeup reference 2.2 Bucket writeup reference 2.3 Epsilon writeup reference 3. そ

                                                            HTB Cloud 問題の攻撃手法まとめ - blog of morioka12
                                                          1