Unable to determine HOST_OS from uname -sm 1C

2个回答

FFmpeg C++ 的 avcodec_encode_video2 返回 -40

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'？

python 3.7引用docx操作word文档报错exception 该怎么办？

IBM Cloud-Cloud Foundry App Go部署失败

GIGA Universe Cup 计算概率几分

Description Following FIFA World Cup, a larger competition called "GIGA Universe Cup" is taking place somewhere in our universe. Both FIFA World Cup and GIGA Universe Cup are two rounds competitions that consist of the first round, also known as "group league", and the second called "final tournament." In the first round, participating teams are divided into groups of four teams each. Each team in a group plays a match against each of the other teams in the same group. For example, let's say we have a group of the following four teams, "Engband, Swedon, Argontina, and Nigerua." They play the following six matches: Engband - Swedon, Engband - Argontina, Engband - Nigerua, Swedon - Argontina, Swedon - Nigerua, and Argontina - Nigerua. The result of a single match is shown by the number of goals scored by each team, like "Engband 1 - 0 Argontina," which says Engband scored one goal whereas Argontina zero. Based on the result of a match, points are given to the two teams as follows and used to rank teams. If a team wins a match (i.e., scores more goals than the other), three points are given to it and zero to the other. If a match draws (i.e., the two teams score the same number of goals), one point is given to each. The goal difference of a team in given matches is the total number of goals it scored minus the total number of goals its opponents scored in these matches. For example, if we have three matches "Swedon 1 - 2 Engband," "Swedon 3 - 4 Nigerua," and "Swedon 5 - 6 Argontina," then the goal difference of Swedon in these three matches is (1 + 3 + 5) - (2 + 4 + 6) = -3. Given the results of all the six matches in a group, teams are ranked by the following criteria, listed in the order of priority (that is, we first apply (a) to determine the ranking, with ties broken by (b), with ties broken by (c), and so on). (a) greater number of points in all the group matches, (b) greater goal difference in all the group matches, (c) greater number of goals scored in all the group matches. If two or more teams are equal on the basis of the above three criteria, their place shall be determined by the following criteria, applied in this order: (d) greater number of points obtained in the group matches between the teams concerned, (e) greater goal difference resulting from the group matches between the teams concerned, (f) greater number of goals scored in the group matches between the teams concerned, If two or more teams are still equal, apply (d), (e), and (f) as necessary to each such group. Repeat this until those three rules to equal teams do not make any further resolution. Finally, teams that still remain equal are ordered by : (g) drawing lots by the Organizing Committee for the GIGA Universe Cup. The two teams coming first and second in each group qualify for the second round. Your job is to write a program which, given the results of matches played so far in a group and one team specified in the group, calculates the probability that the specified team will qualify for the second round. You may assume each team has played exactly two matches and has one match to play. In total, four matches have been played and two matches are to be played. Assume the probability that any team scores (exactly) p goals in any match is: 8!/(P!(8 - P)!)*(1/4)^p*(3/4)^(8-p) , for p <= 8, and zero for p > 8. Assume the lot in the step (g) is fair. Input The first line of the input is an integer, less than 1000, that indicates the number of subsequent records. The rest of the input is the indicated number of records. A single record has the following format: (empty) (-) (team)1 (-) (team)2 (-) (team)3 (-) (team)4 (team)1 (-) (empty) (-) (m)12 (-) (m)13 (-) (m)14 (team)2 (-) (empty) (-) (empty) (-) (m)23 (-) (m)24 (team)3 (-) (empty) (-) (empty) (-) (empty) (-) (m)34 (team)4 (-) (empty) (-) (empty) (-) (empty) (-) (empty) In the above, (-) is a single underscore (-) and (empty) a sequence of exactly four underscores (____). Each of (team)1,?,(team)4 is either an asterisk character (*) followed by exactly three uppercase letters (e.g., *ENG) , or an underscore followed by exactly three uppercase letters (e.g., _SWE). The former indicates that it is the team you are asked to calculate the probability of the second round qualification for. You may assume exactly one of (team)1,?, (team)4 is marked with an asterisk. Each (m)ij (1 <= i < j <= 4) is a match result between the (team)i and (team)j. Each match result is either __-_ (i.e., two underscores, hyphen, and another underscore) or of the form _x-y where each of x and y is a single digit (<= 8). The former indicates that the corresponding match has not been played, whereas the latter that the result of the match was x goals by (team)i and y goals by (team)j. Since each team has played exactly two matches, exactly two match results are in the former format. Output The output should consist of n lines where n is the number of records in the input. The ith line should show the probability that the designated team (marked with an asterisk) will qualify for the second round in the ith record. Numbers should be printed with exactly seven digits after the decimal point. Each number should not contain an error greater than 10^(-7). Sample Input 5 _____*AAA__BBB__CCC__DDD *AAA_______0-0__0-0___-_ _BBB_____________-___0-0 _CCC_________________0-0 _DDD____________________ ______CHN__CRC__TUR_*BRA _CHN_______0-2___-___0-4 _CRC____________1-1___-_ _TUR_________________1-2 *BRA____________________ ______CMR_*KSA__GER__IRL _CMR_______1-0___-___1-1 *KSA____________0-8___-_ _GER_________________1-1 _IRL____________________ ______TUN__JPN_*BEL__RUS _TUN________-___1-1__0-2 _JPN____________2-2__1-0 *BEL__________________-_ _RUS____________________ ______MEX__CRO_*ECU__ITA _MEX_______1-0__2-1___-_ _CRO_____________-___2-1 *ECU_________________0-2 _ITA____________________ Sample Output 0.5000000 1.0000000 0.0000000 0.3852746 0.0353304

GIGA Universe Cup

Following FIFA World Cup, a larger competition called "GIGA Universe Cup" is taking place somewhere in our universe. Both FIFA World Cup and GIGA Universe Cup are two rounds competitions that consist of the first round, also known as "group league", and the second called "final tournament". In the first round, participating teams are divided into groups of four teams each. Each team in a group plays a match against each of the other teams in the same group. For example, let's say we have a group of the following four teams, "Engband, Swedon, Argontina, and Nigerua." They play the following six matches: Engband - Swedon, Engband - Argontina, Engband - Nigerua, Swedon - Argontina, Swedon - Nigerua, and Argontina - Nigerua. The result of a single match is shown by the number of goals scored by each team, like "Engband 1 - 0 Argontina", which says Engband scored one goal whereas Argontina zero. Based on the result of a match, points are given to the two teams as follows and used to rank teams. If a team wins a match (i.e., scores more goals than the other), three points are given to it and zero to the other. If a match draws (i.e., the two teams score the same number of goals), one point is given to each. The goal difference of a team in given matches is the total number of goals it scored minus the total number of goals its opponents scored in there matches. For example, if we have three matches "Swedon 1 - 2 Engband", "Swedon 3 - 4 Nigerua", and "Swedon 5 - 6 Argontina", then the goal difference of Swedon in these three matches is (1 + 3 + 4) - (2 + 4 + 6) = -3. Given the results of all the six matches in a group, teams are ranked by the following criteria, listed in the order of priority (that is, we first apply (a) to determine the ranking, with ties broken by (b), with ties broken by (c), and so on). (a) greater number of points in all the group matches; (b) greater goal difference in all the group matches; (c) greater number of goals scored in all the group matches. If two or more teams are equal on the basis of the above three criteria, their place shall be determined by the following criteria, applied in this order: (d) greater number of points obtained in the group matches between the teams concerned; (e) greater goal difference resulting from the group matches between the teams concerned; (f) greater number of goals scored in the group matches between the teams concerned; If two or more teams are still equal, apply (d), (e), and (f) as necessary to each such group. Repeat this until those three rules to equal teams do not make any further resolution. Finally, teams that still remain equal are ordered by: (g) drawing lots by the Organizing Committee for the GIGA Universe Cup. The two teams coming first and second in each group qualify for the second round. Your job is to write a program which, given the results of matches played so far in a group and one team specified in the group, calculates the probability that the specified team will qualify for the second round. You may assume each team has played exactly two matches and has one match to play. In total, four matches have been played and two matches are to be played. Assume the probability that any team scores (exactly) p goals in any match is: For p <= 8, and zero for p > 8. Assume the lot in the step (g) is fair. Input The first line of the input is an integer, less than 1000, that indicates the number of subsequent records. The rest of the input is the indicated number of records. A single record has the following format: <empty> <_> <team>1 <_> <team>2 <_> <team>3 <_> <team>4 <team>1 <_> <empty> <_> <m>12 <_> <m>13 <_> <m>14 <team>2 <_> <empty> <_> <empty> <_> <m>23 <_> <m>24 <team>3 <_> <empty> <_> <empty> <_> <empty> <_> <m>34 <team>4 <_> <empty> <_> <empty> <_> <empty> <_> <empty> In the above, <_> is a single underscore (_) and <empty> a sequence of exactly four underscores (____). Each of <team>1, ..., <team>4 is either an asterisk character (*) followed by exactly three uppercase letters (e.g., *ENG), or an underscore followed by exactly three uppercase letters (e.g., _SWE). The former indicates that it is the team you are asked to calculate the probability of the second round qualification for. You may assume exactly one of <team>1, ..., <team>4 is marked with an asterisk. Each <m>ij (1 <= i < j <= 4) is a match result between the <team>i and <team>j. Each match result is either __-_ (i.e., two underscores, hyphen, and another underscore) or of the form _x-y where each of x and y is a single digit (<=8). The former indicates that the corresponding match has not been played, whereas the latter that the result of the match was x goals by <team>i and y goals by <team>j. Since each team has played exactly two matches, exactly two match results are in the former format. Output The output should consist of n lines where n is the number of records in the input. The ith line should show the probability that the designated team (marked with an asterisk) will qualify for the second round in the ith record. Numbers should be printed with exactly seven digits after the decimal point. Each number should not contain an error greater than 10^-7. Sample Input 5 _____*AAA__BBB__CCC__DDD *AAA_______0-0__0-0___-_ _BBB_____________-___0-0 _CCC_________________0-0 _DDD____________________ ______CHN__CRC__TUR_*BRA _CHN_______0-2___-___0-4 _CRC____________1-1___-_ _TUR_________________1-2 *BRA____________________ ______CMR_*KSA__GER__IRL _CMR_______1-0___-___1-1 *KSA____________0-8___-_ _GER_________________1-1 _IRL____________________ ______TUN__JPN_*BEL__RUS _TUN________-___1-1__0-2 _JPN____________2-2__1-0 *BEL__________________-_ _RUS____________________ ______MEX__CRO_*ECU__ITA _MEX_______1-0__2-1___-_ _CRO_____________-___2-1 *ECU_________________0-2 _ITA____________________ Sample Output 0.5000000 1.0000000 0.0000000 0.3852746 0.0353304

Golang Dep无法读取元数据

<div class="post-text" itemprop="text"> <p>I use this command:</p> <pre><code>dep init -gopath -v </code></pre> <p>in my gopath,like this:</p> <pre><code>gopath/src/aaa.com/bbb/ccc.v2 </code></pre> <p>in my code, import is:</p> <pre><code>import ("aaa.com/bbb/ccc.v2") </code></pre> <p>final got this:</p> <pre><code>init failed: unable to determine direct dependencies: unable to deduce repository and source type for "aaa.com/bbb/ccc.v2": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://aaa.com/bbb/ccc.v2?go-get=1": Get http://aaa.com/bbb/ccc.v2?go-get=1: context canceled </code></pre> <p>actually,aaa.com don`t exists,it just a dir in my gopath</p> <p>WHY dep still request the network to get metadata even if I specified the <code>-gopath</code> param?</p> </div>

Storm-kafka集成问题,求解答

Read partition information from: /f-k-s/wordCount/partition_0 --> null 67357 [Thread-108-kafka_spout-executor[18 18]] INFO o.a.s.k.PartitionManager - No partition information found, using configuration to determine offset 67357 [Thread-108-kafka_spout-executor[18 18]] INFO o.a.s.k.PartitionManager - Starting Kafka 192.168.1.19 Partition{host=192.168.1.19:9092, topic=f-k-s, partition=0} from offset 4731080 本地模式启动!日志打印可以看到偏移量 但是zookeeper 客户端登录无法查看偏移量 如果在storm tuple里获取到偏移量值

QT交叉编译 缺少sys/cdefs.h

python3.6安装pypsa包时报错，无法安装。

<div class="post-text" itemprop="text"> <p>I'm new to this so sorry for my questions. I have access to a running yii-project with password-protected backend. I want to copy this to my synology where I have phpmyadmin, apache installed. The sql database is already exported an imported to the local environment. I copied everything of the directory <code>/var/www</code> from the yii-project to my local server. </p> <p>What do I have to change to run the site on my local environment? Actually error 403 is shown when I try to start the site with local address <code>192.x.x.x</code>. Could you please help me?</p> <blockquote> <p>Update: Following yii\base\ErrorException occurses when starting the index.php: Uninitialized string offset: 0 Details: /vendor/yiisoft/yii2/web/Request.php (Version: Apache/2.4.25 (Unix) Yii Framework/2.0.3)</p> </blockquote> <pre><code> \$pathInfo = substr(\$pathInfo, strlen(\$scriptUrl)); } elseif (\$baseUrl === '' || strpos(\$pathInfo, \$baseUrl) === 0) { \$pathInfo = substr(\$pathInfo, strlen(\$baseUrl)); } elseif (isset(\$_SERVER['PHP_SELF']) &amp;&amp; strpos(\$_SERVER['PHP_SELF'], \$scriptUrl) === 0) { \$pathInfo = substr(\$_SERVER['PHP_SELF'], strlen(\$scriptUrl)); } else { throw new InvalidConfigException('Unable to determine the path info of the current request.'); } if (\$pathInfo[0] === '/') { \$pathInfo = substr(\$pathInfo, 1); } return (string) \$pathInfo; } </code></pre> </div>

CentOS 7无法连接clamd.sock文件（权限被拒绝错误）

<div class="post-text" itemprop="text"> <p>I am trying to scan uploaded files on PHP server using clamAV. I've installed ClamAV on my server (Centos 7). Currently, I am using PHP 7, so I am using Clamd socket connection to scan uploaded files. I've enabled PHP sockets, clamd.sock file is present at <code>/var/run/clamd.scan/</code> folder with apache owner. </p> <p>My Socket connection code - </p> <pre><code> \$socket = socket_create(AF_UNIX, SOCK_STREAM, 0); if(socket_connect(\$socket, '/var/run/clamd.scan/clamd.sock')) { return \$socket; } </code></pre> <p>When I try to run above code on the browser I am getting error as <code>socket_connect(): unable to connect [13]: Permission denied</code>, But if I run the PHP code through command line with a user as root it is working fine.</p> <p>I know there is some issue with SELinux policy with Centos as if I disable SELinux policy everything is working fine from the browser as well. I have checked <code>httpd_can_network_connect --&gt; on</code> and <code>antivirus_can_scan_system --&gt; on</code> both are on. </p> <p>The issue is with accessing anything inside <code>/var/run/</code> folder for <code>apache</code> user, there is something (some policy) from SELinux which is stopping apache to connect to clamd socket file. Any ideas? </p> </div>

openstack验证nova时执行openstack host list命令报错

``` ``` 这是执行命令后报的错误 The server is currently unavailable. Please try again at a later time.<br /><br /> (HTTP 503) (Request-ID: req-cc86ee4c-b854-4577-ba9a-57190d2cf39c) 这是日志中报的错误 2019-04-09 20:37:56.792 1778 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} 2019-04-09 20:37:56.793 1778 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data 这是我改的配置文件（基于n版） [root@bogon ~]# egrep "^[a-z]" /etc/nova/nova.conf use_neutron=True firewall_driver = nova.virt.firewall.NoopFirewallDriver enabled_apis=osapi_compute,metadata auth_strategy=keystone connection=mysql+pymysql://nova:nova@192.168.131.129/nova_api connection=mysql+pymysql://nova:nova@192.168.131.129/nova api_servers=http://192.168.131.129:9292 auth_uri = http://192.168.131.129:5000 auth_url = http://192.168.131.129:35357 memcached_servers = 192.168.131.129:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = nova lock_path=/var/lib/nova/tmp transport_url=rabbit://openstack:openstack@192.168.131.129 vncserver_listen=0.0.0.0 vncserver_proxyclient_address=192.168.131.129 我确定nova的用户和密码是正确的，以及服务也创建成功了的 ```

arm-linux-gcc编译出错

<div class="post-text" itemprop="text"> <p>I am using the Go SDK to connect to the Kinesis Video Streams service. When issuing a <code>GetMedia</code> request, I'm receiving a 403 response with the following body:</p> <pre><code>&lt;AccessDeniedException&gt; &lt;Message&gt;Unable to determine service/operation name to be authorized&lt;/Message&gt; &lt;/AccessDeniedException&gt; </code></pre> <p>I am using LogLevel <code>LogDebugWithHTTPBody</code> to see this since the SDK is expecting JSON and receives XML, causing a <code>SerializationError</code>. </p> <p>I am using Go 1.9.2 and have attempted this operation with both v1 and v2 of aws-sdk-go with the same result.</p> <p>Here is my request:</p> <pre><code>POST /getMedia HTTP/1.1 Host: kinesisvideo.us-west-2.amazonaws.com User-Agent: aws-sdk-go/2.0.0-preview.1 (go1.9.2; darwin; amd64) Content-Length: 141 Authorization: AWS4-HMAC-SHA256 Credential=AKIAXXXXXXXXXXXXXX/20180112/us-west-2/kinesisvideo/aws4_request, SignedHeaders=content-length;host;x-amz-date, Signature=60c625357b67c64caed32f5a0924882f26ffc776211801e94e7ecae84e7213c2 X-Amz-Date: 20180112T012511Z Accept-Encoding: gzip {"StartSelector":{"StartSelectorType":"NOW"},"StreamARN":"arn:aws:kinesisvideo:us-west-2:XXXXXXXXXXXXX:stream/StreamTest/XXXXXXXXXXXXX"} </code></pre> <p>Response:</p> <pre><code>HTTP/1.1 403 Forbidden Content-Length: 130 Date: Fri, 12 Jan 2018 01:25:11 GMT X-Amzn-Requestid: 6f1701aa-f737-11e7-bcd5-c70a68e72add &lt;AccessDeniedException&gt; &lt;Message&gt;Unable to determine service/operation name to be authorized&lt;/Message&gt; &lt;/AccessDeniedException&gt; </code></pre> <p>Any help would be greatly appreciated.</p> <p>To follow up, I have tried to issue the HTTP request above directly with the <code>Content-Type: application/json</code> header added, and the response is now:</p> <pre><code>{ "Output": { "__type": "com.amazon.coral.service#UnknownOperationException", "message": null }, "Version": "1.0" } </code></pre> </div>

springboot+jwt实现token登陆权限认证

MySQL数据库面试题（2020最新版）

2020阿里全球数学大赛：3万名高手、4道题、2天2夜未交卷

HashMap底层实现原理，红黑树，B+树，B树的结构原理 Spring的AOP和IOC是什么？它们常见的使用场景有哪些？Spring事务，事务的属性，传播行为，数据库隔离级别 Spring和SpringMVC，MyBatis以及SpringBoot的注解分别有哪些？SpringMVC的工作原理，SpringBoot框架的优点，MyBatis框架的优点 SpringCould组件有哪些，他们...

Python爬虫，高清美图我全都要（彼岸桌面壁纸）

Java岗开发3年，公司临时抽查算法，离职后这几题我记一辈子