如何在 powershell 中列出所有已安装、可运行的 cmdlet?

2023-12-29

我想列出 powershell 中所有已安装、可运行的 cmdlet 和函数,但是Get-Command正在列出以某种方式“存在”但未加载且不可运行的 cmdlet。

举个例子,Get-Command lists New-IseSnippet:

PS W:\> get-command "*-*" -CommandType Function,Cmdlet | where name -like "New-IseSnippet" | select name,module,path

Name           Module path
----           ------ ----
New-IseSnippet ISE

所以看起来我们有一个New-IseSnippet命令 - 让我们检查一下:

PS W:\> get-command New-IseSnippet
get-command : The term 'New-IseSnippet' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that 
the path is correct and try again.
At line:1 char:1
+ get-command New-IseSnippet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (New-IseSnippet:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

不,我们可以运行它吗?:

PS W:\> New-IseSnippet
New-IseSnippet : The 'New-IseSnippet' command was found in the module 'ISE', but the module could not be loaded. For more information, run 'Import-Module ISE'.
At line:1 char:1
+ New-IseSnippet
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (New-IseSnippet:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Nope.

我们如何只获取已安装的、可运行的命令?


至于这个根查询...

我想列出所有已安装、可运行的 cmdlet 和函数 电源外壳

... In my personal library, here is part of a snippet I created/put-together, a long time ago and update as needed, for exactly this kind of use case. There is far more in my snippet, but this should get you what you are after as per your post. This being my my snippet library in ISE / VSCode, I bring it up anytime as need using CTRL+J and selecting it in the ISE and just typing Help in VSCode and selecting it.

# Get parameters, examples, full and Online help for a cmdlet or function

# Get a list of all Modules
Get-Module -ListAvailable | 
Out-GridView -PassThru -Title 'Available modules'

# Get a list of all functions
Get-Command -CommandType Function | 
Out-GridView -PassThru -Title 'Available functions'

# Get a list of all commandlets
Get-Command -CommandType Cmdlet | 
Out-GridView -PassThru -Title 'Available cmdlets'

# Get a list of all functions for the specified name
Get-Command -Name '*ADGroup*' -CommandType Function | 
Out-GridView -PassThru -Title 'Available named functions'

# Get a list of all commandlets for the specified name
Get-Command -Name '*ADGroup**'  -CommandType Cmdlet | 
Out-GridView -PassThru -Title 'Available named cmdlet'

# get function / cmdlet details
Get-Command -Name Get-ADUser -Syntax
(Get-Command -Name Get-ADUser).Parameters.Keys
Get-help -Name Get-ADUser -Full
Get-help -Name Get-ADUser -Online
Get-help -Name Get-ADUser -Examples

# Get parameter that accepts pipeline input
Get-Help Get-ADUser -Parameter * | 
Where-Object {$_.pipelineInput -match 'true'} | 
Select * 

# List of all parameters that a given cmdlet supports along with a short description:
Get-Help dir -para * | 
Format-Table Name, { $_.Description[0].Text } -wrap


# Find all cmdlets / functions with a target parameter
Get-Command -CommandType Function | 
Where-Object { $_.parameters.keys -match 'credential'} | 
Out-GridView -PassThru -Title 'Available functions which has a specific parameter'

Get-Command -CommandType Cmdlet | 
Where-Object { $_.parameters.keys -match 'credential'} | 
Out-GridView -PassThru -Title 'Results for cmdlets which has a specific parameter'

# Get named aliases 
Get-Alias | 
Out-GridView -PassThru -Title 'Available aliases'

# Get cmdlet / function parameter aliases
(Get-Command Get-ADUser).Parameters.Values | 
where aliases | 
select Name, Aliases | 
Out-GridView -PassThru -Title 'Alias results for a given cmdlet or function.'

### Query Powershell Data Types
[AppDomain]::CurrentDomain.GetAssemblies() | 
Foreach-Object { $_.GetExportedTypes() }

# Or 

[psobject].Assembly.GetType(“System.Management.Automation.TypeAccelerators”)::get

# Or

[psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::Get.GetEnumerator() `
| Sort-Object -Property Key

<#
 Get any .NET types and their static methods from PowerShell. 
 Enumerate all that are currently loaded into your AppDomain.
#>  
[AppDomain]::CurrentDomain.GetAssemblies() | 
foreach { $_.GetTypes() } | 
foreach { $_.GetMethods() } | 
where { $_.IsStatic } | 
select DeclaringType, Name | 
Out-GridView -PassThru -Title '.NET types and their static methods'

如前所述,有些东西(不一定是模块/cmdlet)仅是 ISE(当然是 ISE 模块等中的任何东西),具体取决于您之后/正在做什么,例如很多形式的东西,但只要当您将适当的表单类/类型添加到代码中时,它们也应该在控制台主机中运行良好。

然而,认为任何标记为 ISE 的东西都可以在其他地方运行的想法是不正确的。还有很多 ISE 插件。您可以通过 ISE 附加组件菜单访问它们。该菜单中的任何内容都不应该出现在控制台主机中。例如,psEdit 是一个内置工具,可直接在 ISE 编辑器选项卡中打开基于文本的文件。

Get-Help -Name psedit

NAME
    psEdit
    
SYNTAX
    psEdit [-filenames] <Object>  [<CommonParameters>]
    

ALIASES
    None
    

REMARKS
    None

尝试在控制台主机中使用它将会失败,因为控制台主机没有这样的编辑器。

您也可以在 ISE 中以编程方式执行操作,当然这种操作在控制台主机中永远不会工作。

请参阅此处的详细信息:ISE 对象模型层次结构 https://learn.microsoft.com/en-us/powershell/scripting/components/ise/object-model/the-ise-object-model-hierarchy?view=powershell-6

为了确保东西在您需要时位于应有的位置,请调整您的 PowerShell 配置文件。例如,这里是当我在 ISE 与控制台主机中时我要处理的内容的示例。

# Validate if in the ISE or not

If ($Host.Name -match 'ISE')
{
    Import-Module -Name PsISEProjectExplorer
    Import-Module -Name PSharp
    Import-Module -Name ClassExplorer

}

If ($Host.Name -notmatch 'ISE')
{ Import-Module -Name PSReadline }

Import-Module -Name PSScriptAnalyzer
Import-Module -Name Posh-SSH
Import-Module -Name ModuleLibrary -DisableNameChecking
Import-Module -Name Pester
Import-Module -Name PSKoans


If ($Host.Name -match 'ISE')
{
    #Script Browser Begin
    #Version: 1.3.2
    Add-Type -Path 'C:\Program Files (x86)\Microsoft Corporation\Microsoft Script Browser\System.Windows.Interactivity.dll'
    Add-Type -Path 'C:\Program Files (x86)\Microsoft Corporation\Microsoft Script Browser\ScriptBrowser.dll'
    Add-Type -Path 'C:\Program Files (x86)\Microsoft Corporation\Microsoft Script Browser\BestPractices.dll'
    $scriptBrowser = $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('Script Browser', [ScriptExplorer.Views.MainView], $true)
    $scriptAnalyzer = $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('Script Analyzer', [BestPractices.Views.BestPracticesView], $true)
    $psISE.CurrentPowerShellTab.VisibleVerticalAddOnTools.SelectedAddOnTool = $scriptBrowser
    #Script Browser End

    Set-StrictMode  -Version Latest 
}

OP 更新

As for …

那么,有没有办法查询实际加载的命令并 可以在 powershell.exe(或 pwsh.exe)控制台中运行吗?

不是我认为你所想的那种意义上的。您似乎对启动时加载哪些 cmdlet 有概念。那不是一件事。 cmdlet 通过模块加载和路径公开。您期望 PowerShell 仅根据您所在的 PowerShell 版本/环境显示模块/cmdlet/函数。这也不是一件事。 PowerShell 将有权访问系统上的所有 .Net 以及定义路径中的任何内容。无论您是否加载和使用它们,都是另一回事。

Get-Module                # will show you all currently loaded ones.
Get-Module -ListAvailable # Will show all modules installed on your system.

如果您使用的是 PSv3 及更高版本,则任何内容都是您的系统环境,并且 PowerShell 路径始终可用,因为当您尝试使用它时,您在路径中调用的任何内容都会自动加载。

再次,Get-Command 将列出所有可用的内容,它们仅在您调用一个时加载,当然,当调用或会话完成/关闭时它们就会消失。

如果您的模块、cmdlet/函数不在预期的(环境或 PS 路径)位置,那么您必须添加该路径或使用它们的 UNC 路径来运行它们。因此,路径中的任何内容(来自任何 UNC 的点源)始终可用。如果您在 ISE 中,则可以在“命令”选项卡中看到此内容,或者使用 Get-Command 在控制台中看到此内容。

您可以临时动态或使用 PowerShell 配置文件添加路径,也可以通过 PowerShell 配置文件或使用 Windows 环境变量对话框永久动态添加路径。

控制台主机和 ISE 将始终列出预期路径中的任何模块、cmdlet、函数。它们并不意味着全部可用。如前所述,出于显而易见的原因,ISe 特定模块、cmdlet、功能只能在 ISE 中工作。然而,ISE 将运行控制台主机将运行的任何模块、cmdlet 和功能,PSReadline 除外。它会加载它,但不会在 ISE 控制台中执行任何操作。 ISE 控制台实际上是一个输出窗口,与控制台主机不同。好吧,你可以在其中做类似 consolehost 的事情,但这不是同一件事。

因此,模块被加载,模块公开其中的 cmdlet/函数。并非所有模块都会默认加载,因此上面两个命令的原因,这就是导入模块和调用时自动加载存在的原因。独立的个人模块/cmdlet/函数/脚本不是 PS 所知道的,除非你告诉它应该从哪里导入/加载/使用它们。

如果您真的对这类事情感到好奇,您可以利用 Trace-Command cmdlet ...

跟踪命令 https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/trace-command?view=powershell-6

$A = "i*"
Trace-Command ParameterBinding {Get-Alias $Input} -PSHost -InputObject $A

DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Get-Alias]
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Get-Alias]
DEBUG: ParameterBinding Information: 0 :     BIND arg [System.Object[]] to parameter [Name]
DEBUG: ParameterBinding Information: 0 :         Binding collection parameter Name: argument type [Object[]], parameter type [System.String[]], collection type 
Array, element type [System.String], no coerceElementType
DEBUG: ParameterBinding Information: 0 :         Arg is IList with 1 elements
DEBUG: ParameterBinding Information: 0 :         Creating array with element type [System.String] and 1 elements
DEBUG: ParameterBinding Information: 0 :         Argument type System.Object[] is IList
DEBUG: ParameterBinding Information: 0 :         Adding element of type String to array position 0
DEBUG: ParameterBinding Information: 0 :         BIND arg [System.String[]] to param [Name] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Get-Alias]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing

...使用您的代码查看实际被调用的内容,您将看到每次运行代码时都会调用它。

安装的模块越多,摩尔纹 cmdlet/功能就变得可用。如果您认真思考一下,就会发现它们有数百个模块,因此有数千个公开的 cmdlet/函数。为什么你想要将所有内容加载到内存中。您的系统将因资源耗尽而失败。所以,只加载你真正需要的东西,PowerShell只会在需要的时候调用它需要的东西。如果您打算住在控制台主机中,或者住在 ISE/VSCode 中,并且仅在需要时才使用控制台主机,请了解 ISE 特定的内容并忽略所有这些内容。这就是我做事的方式。我很少(如果有的话)需要去控制台主机做任何事情。 ISE 是我的默认设置,VSCode 是我的辅助设置(目前)。有些人对 ISE 嗤之以鼻,但我不是其中之一。

OP 更新

至于...

我的用例不是坐在 PC 前的用户,而是 NodeJS 应用程序 它运行 powershell.exe (PS5) 或 pwsh.exe (PS6/Core) 主机。我 完全明白模块可能“可用”但未加载,那就是 我想查询什么:加载了哪些 cmdlet/函数(即 现在无需加载模块即可运行)。我找到了 奇怪/错误的是 Get-Command * 将列出 Cmdlet X 但 Get-Command X 会拉屎的。如何查询命令:您是否已加载可运行?附: 谷歌“powowshell”来查看我的项目。

只需将链接放到您的项目而不是让我搜索它就会有所帮助。8-}事实上,它只显示在 Google 中,而不显示在 DuckDuckGo 或 Bing 等其他引擎中,这有点奇怪,但是哦,好吧。

所以,你的意思是这个系列——

http://cawoodm.blogspot.com http://cawoodm.blogspot.com https://github.com/cawoodm/powowshell https://github.com/cawoodm/powowshell.

我会看一看。然而,对于您所追求的目的,不要单独使用 Get-Command。将 Get-Module 与 Get-Command 结合使用来列出这些已加载模块中的 cmdlet/函数,以更接近您想要的内容。通过这种方式,仅列出该会话的已加载模块和关联的 cmdlet/函数。

# List all loaded session modules and the exposed cmdlets / functions in them
Get-Module -Name '*' | 
ForEach-Object { Get-Command -Module $PSItem }

# Results

 # List all loaded modules and the exposed cmdlets / functions in them
Get-Module -Name '*' | 
ForEach-Object { Get-Command -Module $PSItem }

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
... 
Cmdlet          Export-BinaryMiLog                                 1.0.0.0    CimCmdlets
Cmdlet          Get-CimAssociatedInstance                          1.0.0.0    CimCmdlets
Cmdlet          Get-CimClass                                       1.0.0.0    CimCmdlets
...
Cmdlet          Find-Member                                        1.1.0      ClassExplorer
Cmdlet          Find-Namespace                                     1.1.0      ClassExplorer
Cmdlet          Find-Type                                          1.1.0      ClassExplorer
...
Function        Get-IseSnippet                                     1.0.0.0    ISE
Function        Import-IseSnippet                                  1.0.0.0    ISE
Function        New-IseSnippet                                     1.0.0.0    ISE
Cmdlet          Add-Computer                                       3.1.0.0    Microsoft.PowerShell.Management
Cmdlet          Add-Content                                        3.1.0.0    Microsoft.PowerShell.Management
Cmdlet          Checkpoint-Computer                                3.1.0.0    Microsoft.PowerShell.Management                                   
...

OP 更新

至于...

您的解决方案将无法列出 cmdlet/函数(例如 ForEach-Object 或 Stop-Job),它们没有模块关联(我的系统上有 64 个)。还, 您如何确定 Get-Module 仅返回已加载的模块?

PowerShell 从 PowerShell 源和模块获取 cmdlet 和函数。

如果您对指向的 cmdlet/函数进行查找,您将看到它们来自哪里here https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/?view=powershell-6:

'ForEach-Object','Start-Job' | 
    ForEach{
                Get-Command -CommandType Cmdlet -Name $PSItem | 
                Format-Table -AutoSize
           }

<#
CommandType Name           Version Source                   
----------- ----           ------- ------                   
Cmdlet      ForEach-Object 3.0.0.0 Microsoft.PowerShell.Core



CommandType Name      Version Source                   
----------- ----      ------- ------                   
Cmdlet      Start-Job 3.0.0.0 Microsoft.PowerShell.Core
#>

因此,基本 cmdlet/函数不是来自导入模块的工作。 OS/.Net 安装中就设计有这些。

所以,我的解决方案并不是失败,我从来没有说过使用它会让你获得 100% 的成功。这是一种向您展示加载哪些模块以使用哪些 cmdlet/函数的方式,并且与 Microsoft.PowerShell.Core、.Net 整体和/或操作系统版本允许的内容几乎没有任何关系(Cmdlet/函数/模块是众所周知,操作系统和 $PSVersion 也是特定的)。

因此,再次强调,您尝试设计的用例是无效的。无论来源如何,Cmdlet 和函数都不会加载并可供使用。它们已安装或公开,并且可以在您需要通过上述方式调用它们时使用。在您调用它们之前,它们永远不会被加载(位于内存中),与 GAC 中的任何内容一样。

所以,看看你的项目,我明白你正在尝试做什么,但你正在努力为用户思考。正如您作为开发人员必须引用 GAC 中的程序集(其中有数千种内容,但在您引用它们之前不会加载),并且您必须知道它在哪里以及您想要使用哪一个以及为什么。因此,对于 PowerShell 可以访问的内容也是如此。请注意,我说的是访问权限,而不是是否可以在 PowerShell 会话中使用它。

所以,如果我们进入这个领域,我们会得到......

Cmdlets / Function come from. The OS (DLLs), [.Net][4], [Core module][3], and those exported from the modules you Import.

因此,再次强调,您必须考虑什么是可用的,或者是在导入模块或 DLL 时可用的。导入的模块及其关联的 cmdlet/函数可能无法工作,具体取决于您所处的会话类型。 意思是,ISE 与 consolhost。

仅供参考,你必须拓宽你的视野......

在伊势

# Total host available commands cmdlet / Functions regadless where the come from
(Get-Command).Count
8750
# Total host avaialble cmdlets
(Get-Command -CommandType Cmdlet).Count
4772
# Total host available functions
(Get-Command -CommandType Function).Count
3035

# Difference of host available cmdlets / functions not shown that are part of the previous two calls.
(Get-Command).Count - ((Get-Command -CommandType Cmdlet).Count + (Get-Command -CommandType Function).Count)
943

# Further breakdown
(Get-Command -CommandType Alias).Count
1446
(Get-Command -CommandType Application).Count
937
(Get-Command -CommandType Configuration).Count
# The property 'Count' cannot be found on this object. Verify that the property exists.
(Get-Command -CommandType ExternalScript).Count
2
(Get-Command -CommandType Script).Count
# The property 'Count' cannot be found on this object. Verify that the property exists.
(Get-Command -CommandType Filter).Count
2
(Get-Command -CommandType Workflow).Count
# The property 'Count' cannot be found on this object. Verify that the property exists.
(Get-Command -CommandType All).Count
10219


# Get a list of all Modules
(Get-Module -ListAvailable).Count
387

# Get a list of all loaded Modules
(Get-Module).Count
12

# List all loaded session modules and the exposed cmdlets / functions in them
(Get-Module -Name '*' | 
ForEach-Object { Get-Command -Module $PSItem }).Count
505

(Get-Module -ListAvailable | 
ForEach {
    Get-Module -Name $PSItem.Name | 
    ForEach-Object { Get-Command -Module $PSItem }
}).Count
669



# If I Import another 3rdP module I installed from the gallery, things will change of course

Import-Module -Name ShowUI

# Get a list of all Modules
(Get-Module -ListAvailable).Count
387

# Get a list of all loaded Modules
(Get-Module).Count
13

# List all loaded session modules and the exposed cmdlets / functions in them
(Get-Module -Name '*' | 
ForEach-Object { Get-Command -Module $PSItem }).Count
937

(Get-Module -ListAvailable | 
ForEach {
    Get-Module -Name $PSItem.Name | 
    ForEach-Object { Get-Command -Module $PSItem }
}).Count
1101

在控制台主机中 - 注意差异

# Total host available commands cmdlet / Functions regadless where the come from
(Get-Command).Count
9191

# Total host avaialble cmdlets
(Get-Command -CommandType Cmdlet).Count
4772

# Total host available functions
(Get-Command -CommandType Function).Count
3472

# Difference of host available cmdlets / functions not shown that are part of the previous two calls.
(Get-Command).Count - ((Get-Command -CommandType Cmdlet).Count + (Get-Command -CommandType Function).Count)
947


# Further breakdown
(Get-Command -CommandType Alias).Count
1809

(Get-Command -CommandType Application).Count
937

(Get-Command -CommandType Configuration).Count
0
# The property 'Count' cannot be found on this object. Verify that the property exists.
(Get-Command -CommandType ExternalScript).Count
2

(Get-Command -CommandType Script).Count
0
# The property 'Count' cannot be found on this object. Verify that the property exists.
(Get-Command -CommandType Filter).Count
1

(Get-Command -CommandType Workflow).Count
1
# The property 'Count' cannot be found on this object. Verify that the property exists.
(Get-Command -CommandType All).Count
10994




# Get a list of all Modules
(Get-Module -ListAvailable).Count
387

# Get a list of all loaded Modules
(Get-Module).Count
8

# List all loaded session modules and the exposed cmdlets / functions in them
(Get-Module -Name '*' | 
ForEach-Object { Get-Command -Module $PSItem }).Count
467

(Get-Module -ListAvailable | 
ForEach {
    Get-Module -Name $PSItem.Name | 
    ForEach-Object { Get-Command -Module $PSItem }
}).Count
623



# If I Import another 3rdP module I installed from the gallery, things will change of course

Import-Module -Name ShowUI

# Get a list of all Modules
(Get-Module -ListAvailable).Count
387


# Get a list of all loaded Modules
(Get-Module).Count
9


# List all loaded session modules and the exposed cmdlets / functions in them
(Get-Module -Name '*' |
ForEach-Object { Get-Command -Module $PSItem }).Count
899


(Get-Module -ListAvailable |
ForEach {
    Get-Module -Name $PSItem.Name |
    ForEach-Object { Get-Command -Module $PSItem }
}).Count
1055
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 powershell 中列出所有已安装、可运行的 cmdlet? 的相关文章

随机推荐

  • 如何以及在哪里处理关联记录的更新过程?

    我正在使用 Ruby on Rails 4 我想通过以下方式正确处理关联记录的更新和创建过程update attributes方法 也就是说 我有以下内容 Model class Article lt ActiveRecord Base h
  • 替换除
     标记之间的换行符之外的换行符                
                

    我正在寻找替换 删除给定字符串中的所有换行符 嵌套在 a 中的换行符除外 pre 标签 因此对于以下字符串 var text Some contents which is formatted over multiple lines but
  • 将 3d 4x4 旋转矩阵转换为 2d

    假设我们有一个 4x4 矩阵 其索引如下 00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33 如何将该矩阵中包含的旋转数据 忽略 z 轴 如果有帮助的话 转换为单个 2d 旋转角度 以弧度为单位
  • VSTS 缺少某些构建标志:env:BUILD_SOURCEVERSIONMESSAGE

    在我的 Visual Studio Team Services 构建中 我从 bitbucket 存储库中提取 我正在尝试获取提交消息并在 powershell 脚本中使用它 在我的 powershell 脚本中 我有以下代码 param
  • 不明白这个 TypeError: 'list' object is not callable

    我有一个名为im py其中包含几个函数和几个类 第一个函数和类失败了 TypeError list object is not callable 问题似乎是在函数中创建的列表的第一个元素 然后将其传递给类 列表的大部分可以由类处理 但第一个
  • 如何在 C# 中使用管道和 let 参数进行 $lookup (MongoDB.Driver 2.7.2)

    我需要在我的 C 代码中在 MongoDB 中运行以下查询 我使用 MongoDB Driver 2 7 2 和 MongoDB 4 0 我想使用 lookup 而不是 project unwind 以防止命名集合的每个可能字段 db ge
  • std::initializer_list 的实现

    我一直在研究如何initializer list已实现 所以我找到了标准的第 18 9 节 并找到了一个看起来足够简单的界面 我认为制作我自己的版本 我命名为 会很有启发性MyNamespace InitializerList和一个用例 t
  • 在mfc中如何将控件置于前面

    如何更改 MFC 中控件的 Z 顺序在设计时 即我无法使用 SetWindowPos 或在运行时执行此操作 我想在设计器中查看更改后的 z 顺序 即使我必须诉诸直接编辑 rc 代码 我有一个 MFC 对话框 要向其中添加控件 如果控件的边缘
  • 在 tvOS 上对 Dropbox 进行身份验证

    我在我的 ios 移动应用程序中使用 dropbox sdk 它使用 dropbox 身份验证从我的应用程序中的 dropbox 中获取用户文件 它在我的 ios 应用程序上完美运行 并上传到苹果商店 我想让它也适用于 tvos 苹果商店
  • EC2 上的轻度、中度或重度利用率预留实例之间有什么区别?

    他们讨论了不同的利用率实例 但除了价格之外 我找不到任何一个地方可以实际说明轻利用率大型实例和重利用率大型实例之间的区别 有人可以告诉我有什么区别吗 实例是相同的 这只是价格差异 因此如果您知道自己将大量使用该实例 则可以通过支付预付费用来
  • Mandelbrot 集渲染的平滑频谱

    我目前正在编写一个程序来生成非常巨大的 65536x65536 像素及以上 Mandelbrot 图像 我想设计一个光谱和着色方案来使它们公正 这维基百科精选曼德尔布罗图像 http en wikipedia org wiki File M
  • 最有效的多重纹理方法 - iOS、OpenGL ES2、优化

    我正在尝试找到在 iOS 上处理 OpenGL ES2 中多重纹理的最有效方法 我所说的 高效 是指即使在较旧的 iOS 设备 iPhone 4 及更高版本 上也能实现最快的渲染 但同时还要平衡便利性 我考虑过 并尝试过 几种不同的方法 但
  • 单个 Logger 的每个附加程序的日志级别

    是否可以根据appender为单个Logger配置不同的日志级别 我意识到这与此类似question https stackoverflow com questions 1839647 how to configure log4j to l
  • 何时在 Spring 中使用自动装配

    我正在看书专业春季3 https rads stackoverflow com amzn click com 1430241071 其中有一段确实让我很困惑 该段落是关于 Spring 中的自动装配 以下是摘录 在大多数情况下 是否应该使用
  • 合成器外观和感觉中的默认按钮输入映射?

    我正在尝试使用 UIManager 获取并清除一些默认键绑定 以便空格键不会激活我的 JButtons 如所解释的here https stackoverflow com questions 12133795 removing defaul
  • strtok()函数的实现

    我需要编写我的函数 strtok 下面是我的代码 问题是 我无法显示结果字符串 在我使用的代码中strcpy 然后显示新数组 是否可以仅使用指针显示字符串 str include
  • 使用 Spring DispatcherServlet 自定义 404

    我已设置 web xml 如下 我还有一个基于注释的控制器 它接受任何 URL 模式 然后转到相应的 jsp 我已在 servlet xml 中进行了设置 但是 如果我转到以 html 结尾的页面 并且其 jsp 不存在 我不会看到自定义
  • Selenium 访问框架内的元素时出现问题

    我在验证由框架集和框架组成的页面中的元素时遇到问题 我正在使用代码 selenium selectFrame relative up selenium selectFrame topFrame 但它失败并出现错误 未找到元素 topFram
  • J2ME 支持 HTTP PUT 吗?

    我刚刚注意到 MIDP 2 0 API 中的一个奇怪的事情 HttpConnection 类 apidocs 明确引用了方法 GET POST 和 HEAD 但没有其他方法 这是否意味着它们不受支持 http java sun com ja
  • 如何在 powershell 中列出所有已安装、可运行的 cmdlet?

    我想列出 powershell 中所有已安装 可运行的 cmdlet 和函数 但是Get Command正在列出以某种方式 存在 但未加载且不可运行的 cmdlet 举个例子 Get Command lists New IseSnippet