小编use*_*479的帖子

React-Table:不可分配给 Partial<TableState<object>>

我尝试将 "react-table": "^7.0.0-rc.15" 与 React + Typescript 一起使用。我从沙箱https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/pagination获取分页示例, 然后尝试运行它。但在下面的点

function Table({ columns, data }: any) {
// Use the state and functions returned from useTable to build your UI


const {
   getTableProps,
   getTableBodyProps,
   headerGroups,
   prepareRow,
   page, // Instead of using 'rows', we'll use page,
   // which has only the rows for the active page

   // The rest of these things are super handy, too ;)
   canPreviousPage,
   canNextPage,
   pageOptions,
   pageCount,
   gotoPage,
   nextPage,
   previousPage,
   setPageSize,
   state: { pageIndex, pageSize }, …
Run Code Online (Sandbox Code Playgroud)

typescript reactjs react-table

5
推荐指数
1
解决办法
3531
查看次数

无法在 Powershell 中安装 SQLServer 模块

我尝试通过以管理员身份(win10,64Bit)执行以下命令来安装 Powershell SQLSERVER 模块,但它失败了

PS C:\WINDOWS\system32> Install-Module -Name SqlServer
PackageManagement\Install-Package : No match was found for the specified search 
criteria and module name 'SqlServer'.
Try Get-PSRepository to see all available registered module repositories.
At C:\Program 
Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 
char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: 
(Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
   ception
    + FullyQualifiedErrorId : 

NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.
InstallPackage
Run Code Online (Sandbox Code Playgroud)

我在网上搜索过,尝试了一些解决方案,我什至与公司管理员交谈过,但没有运气。正如他们告诉我的那样,公司没有代理,只有防火墙。其他同事可以毫无问题地运行该命令。下一个命令也失败

PS C:\WINDOWS\system32> Get-PSrepository
WARNING: Unable to find module repositories.
Run Code Online (Sandbox Code Playgroud)

任何的想法?

sql-server powershell sqlps

3
推荐指数
2
解决办法
1万
查看次数

在 ReactJS 中添加指向 Font Awesome 图标的链接

我使用 Typescript + ReactJS,并尝试在字体真棒图标中添加链接。我的代码是这样的:

import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faRandom } from '@fortawesome/free-solid-svg-icons'


const MiddleHeading = () => {
     return (
         <div id="middle_heading">  

              <FontAwesomeIcon icon={faRandom} size="2x"/>          

         </div>
     );
 };

 export default MiddleHeading;
Run Code Online (Sandbox Code Playgroud)

关于如何向我的图标添加 URL 的任何想法?

谢谢你的帮助

html javascript typescript reactjs font-awesome-5

3
推荐指数
2
解决办法
7308
查看次数

powershell 无法 ping 通网址

我在 Windows 10 64 位中以管理员身份运行 powershell。当我 ping 时www.powershellgallery.com出现错误:

PS C:\WINDOWS\system32> ping www.powershellgallery.com

Pinging psg-prod-eastus.cloudapp.net [40.87.85.101] with 32 bytes of data:
Request timed out.

Ping statistics for 40.87.85.101:
    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
Run Code Online (Sandbox Code Playgroud)

但当我 ping 其他网址(例如 google.com)时,一切正常。

PS C:\WINDOWS\system32> ping www.google.com

Pinging www.google.com [216.58.213.68] with 32 bytes of data:
Reply from 216.58.213.68: bytes=32 time=15ms TTL=56
Reply from 216.58.213.68: bytes=32 time=14ms TTL=56
Reply from 216.58.213.68: bytes=32 time=13ms TTL=56
Reply from 216.58.213.68: bytes=32 time=13ms …
Run Code Online (Sandbox Code Playgroud)

powershell ping

1
推荐指数
1
解决办法
3432
查看次数

C#datetime精度

让我们假设我们在C#中有一个变量

System.DateTime dt = 07/11/2018 16:10:10.2345
Run Code Online (Sandbox Code Playgroud)

是否有可能更改dt中的任何属性或将其转换为其他任何属性,所以每次我使用它,序列化它或使其成为字符串给予

07/11/2018 16:10:10.23450000
Run Code Online (Sandbox Code Playgroud)

谢谢

c# precision datetime

-2
推荐指数
1
解决办法
91
查看次数