Ubuntu18.10,Oracle12C R2 安装报错
  • 安装参考的网页



  • 下载的依赖

    root# apt-get install automake autotools-dev binutils bzip2 elfutils expat gawk gcc gcc-multilib g++-multilib lib32z1 ksh lesstif2-dev libaio1 libaio-dev libc6-dev libc6-dev-i386 libc6-i386 libelf-dev libltdl-dev  libmrm4  libodbcinstq4-1 libpth-dev libpthread-stubs0-dev libstdc++-6-dev lsb make openssh-server rlwrap sysstat unixodbc unixodbc-dev unzip x11-utils zlibc // 安装依赖
    apt-get install glibc* 
    apt-get install gcc* 
    apt-get install make* 
    apt-get install compat-db* 
    apt-get install libstdc* 
    apt-get install libXp* 
    apt-get install libXtst*  
    apt-get install compat-libstdc++*
  • 解压安装Oracle

./runInstaller -force -silent -ignoreSysPrereqs -noconfig -responseFile /opt/software/database/response/db_install.rsp

链接:[url]https://pan.baidu.com/s/1EQJrAfbtQ5h1lRD830YL1A [/url]

  • 报错
[WARNING] [INS-13001] Oracle Database is not supported on this operating system. Installer will not perform prerequisite checks on the system.
   CAUSE: This operating system may not have been in the certified list at the time of the release of this software.
   ACTION: Refer to My Oracle Support portal for the latest certification information for this operating system. Proceed with the installation if the operating system has been certified after the release of this software.
[WARNING] [INS-32016] The selected Oracle home contains directories or files.
   ACTION: To start with an empty Oracle home, either remove its contents or choose another location.
You can find the log of this install session at:
Error in invoking target 'client_sharedlib' of makefile '/opt/oracle/product/db/rdbms/lib/ins_rdbms.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'links proc gen_pcscfg procob' of makefile '/opt/oracle/product/db/precomp/lib/ins_precomp.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'idg4odbc' of makefile '/opt/oracle/product/db/rdbms/lib/ins_rdbms.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'itnsping' of makefile '/opt/oracle/product/db/network/lib/ins_net_client.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'install' of makefile '/opt/oracle/product/db/ctx/lib/ins_ctx.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'install' of makefile '/opt/oracle/product/db/plsql/lib/ins_plsql.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'all_no_orcl' of makefile '/opt/oracle/product/db/rdbms/lib/ins_rdbms.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'install' of makefile '/opt/oracle/product/db/network/lib/ins_net_client.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'install' of makefile '/opt/oracle/product/db/sqlplus/lib/ins_sqlplus.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'clientonlyinstall' of makefile '/opt/oracle/product/db/ldap/lib/ins_ldap.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'ioklist' of makefile '/opt/oracle/product/db/network/lib/ins_nau.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'install' of makefile '/opt/oracle/product/db/srvm/lib/ins_srvm.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'utilities' of makefile '/opt/oracle/product/db/rdbms/lib/ins_rdbms.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'iokdstry iokinit' of makefile '/opt/oracle/product/db/network/lib/ins_nau.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'install' of makefile '/opt/oracle/product/db/network/lib/ins_net_server.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'itrcroute' of makefile '/opt/oracle/product/db/network/lib/ins_net_client.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
Error in invoking target 'irman ioracle' of makefile '/opt/oracle/product/db/rdbms/lib/ins_rdbms.mk'. See '/opt/oracle/oraInventory/logs/installActions2018-11-14_10-09-05AM.log' for details.
The installation of Oracle Database 12c was successful.
Please check '/opt/oracle/oraInventory/logs/silentInstall2018-11-14_10-09-05AM.log' for more details.

As a root user, execute the following script(s):
    1. /opt/oracle/oraInventory/orainstRoot.sh
    2. /opt/oracle/product/db/root.sh

Successfully Setup Software.
[FATAL] File not found /opt/oracle/product/db/oui/bin/platform/linux64/attachHome.sh



混世小萌羊 这个貌似不行,我刚刚试了
一年多之前 回复
Csdn user default icon
ubuntu 18.10安装了Serv-U,但是安装好之后启动不了程序,单击图表、用终端都启动不料,有了解的师傅能不能指导下,小白初学linux?

ubuntu 18.10安装了Serv-U,但是安装好之后启动不了程序,单击图表、用终端都启动不料,有了解的师傅能不能指导下?![图片说明](https://img-ask.csdn.net/upload/201911/21/1574345515_508457.png)

从ubuntu 18.04升级到18.10后,docker容器内没有互联网连接

<div class="post-text" itemprop="text"> <h1>ping to google not working after upgrade host machine ubuntu 18.04 to 18.10</h1> <h2>my docker file</h2> <pre><code>FROM golang:1.9 WORKDIR /go/src/github.com/sohag1990/gingorm-master COPY . . </code></pre> <h2>docker build command</h2> <pre><code>docker build -t whoshakhawat/go-app . build success </code></pre> <h2>running container using /bin/bash</h2> <pre><code>docker run -it whoshakhawat/go-app /bin/bash </code></pre> <h2>ping command inside docker container</h2> <pre><code>root@62ba0502a1c6:/# ping google.com ping: google.com: Temporary failure in name resolution root@62ba0502a1c6:/# ping github.com ping: github.com: Temporary failure in name resolution </code></pre> <p>Everything was fine when it was in Ubuntu-18.04. Thanks:)</p> </div>

ubuntu14.04 apt-get update失败怎么办

ubuntu14.04 apt-get update之后一直没有无法下载?求教~~ ![图片说明](https://img-ask.csdn.net/upload/201606/09/1465477989_15977.jpg)


<div class="post-text" itemprop="text"> <p>Currently i'm using ubuntu 18.10. I installed docker .. But when i run this command for compose its installing some dependencies and at the its give's some error. </p> <p>Command: </p> <pre><code>COMPOSE_PROJECT_NAME=hello-world docker-compose up -d </code></pre> <p><code>ERROR: Service 'php' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder288674602/.docker/php/conf.d/00-opcache-recommended-.ini: no such file or directory</code></p> <p><a href="https://i.stack.imgur.com/3pAJJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3pAJJ.jpg" alt="enter image description here"></a></p> </div>


<div class="post-text" itemprop="text"> <p>I am following this netbean guide <a href="https://netbeans.org/kb/docs/php/configure-php-environment-ubuntu.html#createDocumentRootLocation" rel="nofollow noreferrer">https://netbeans.org/kb/docs/php/configure-php-environment-ubuntu.html#createDocumentRootLocation</a></p> <p>But I am stuck at creating the virtual host. I try to do as in the tutorial but there is no <code>&lt;Directory&gt;</code> tags in the "000-default.conf" file. I kept going and ignored that.</p> <p>I did as in the tutorial and put it in my /home/user/public_html. but now when I run it the php code is not interpreted</p> <p>If I a2ensite the default I can access virtual host set at /var/www/html and that php is interpreted</p> <p>There are no errors the php is just not being interpreted, what am I doing wrong here.</p> <p>Im using:</p> <ul> <li>Ubuntu 18.10 LTS</li> <li>PHP 7.2.10-0ubuntu1 (cli) </li> <li>Apache/2.4.34</li> </ul> <p>Edit: My "TestPhp.conf" file:</p> <pre><code>&lt;VirtualHost *:80&gt; ServerAdmin webmaster@localhost DocumentRoot /home/jelly/public_html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined &lt;/VirtualHost&gt; </code></pre> <p>Edit 2 and answer:</p> <p>Turned out to be some lines in my "php7.2.conf" file that had to be commented out as the out-commented lines in that file explains. as running PHP scripts in user directories is disabled by default.</p> </div>

C# CLR20r3 System.IO.FileNotFoundException 自己写的winform程序 安装时报错 如下:

![图片说明](https://img-ask.csdn.net/upload/201606/24/1466735470_350416.jpg) 描述: Stopped working 问题签名: 问题事件名称: CLR20r3 问题签名 01: System.exe 问题签名 02: 问题签名 03: 576c952e 问题签名 04: mscorlib 问题签名 05: 问题签名 06: 5584e42d 问题签名 07: 40fc 问题签名 08: 0 问题签名 09: System.IO.FileNotFoundException OS 版本: 6.0.6002. 区域设置 ID: 2052


本人初入计算机网络,最近在编写一个简单的UDP模型,主要功能是1.Server先开启监听 2.Client用sendto发送一条信息 3.Server用recvfrom接收 4.再用sendto回复 5.Client用recvfrom接收 参考了一些例子,但是从第四步开始总出错,ERRNO为97(#define EAFNOSUPPORT 97 /* Address family not supported by protocol */)在网上搜索无果,希望有经验的朋友们帮助一下我,十分谢谢!!! 我用C语言在UBUNTU18.10下实现。 以下是代码及运行结果: ``` UDPServer.c #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <string.h> #define PORT 8004 //远端地址端口号 void main(void) { int serverSocket,peerlen,buflen; char buf[200]; struct sockaddr_in local_addr,addr_from; if(-1==(serverSocket=socket(AF_INET,SOCK_DGRAM,0))) puts("socket开启失败"); else puts("socket开启成功"); bzero(&local_addr, sizeof(local_addr));//清空字节 local_addr.sin_family = AF_INET; local_addr.sin_port = htons(PORT); local_addr.sin_addr.s_addr =INADDR_ANY;//s_addr到底是个什么类型? //inet_addr是一个计算机函数,功能是将一个点分十进制的IP //转换成一个长整数型数(u_long类型)等同于inet_addr()。 if(bind(serverSocket,(struct sockaddr*)&local_addr, sizeof(local_addr))==-1) printf("%s\n","绑定失败"); else printf("%s\n","绑定成功"); if(-1==(buflen=recvfrom(serverSocket,buf,strlen(buf),0,(struct sockaddr *)&addr_from,&peerlen))) puts("接受失败\n"); else puts("接受成功\n"); puts(buf); if(-1==(int)sendto(serverSocket,"REC",strlen("REC"),0, (struct sockaddr *)&addr_from,sizeof(addr_from))) puts("发送失败\n"); else puts("发送成功\n"); close(serverSocket); printf("%d",errno); } UDPClient.c #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <string.h> #define PORT 8004 //远端地址端口号 void main(void) { int clientSocket,buflen,addrlen,peerlen; char addr[]="",buf[200]; struct sockaddr_in remoteaddr,addr_from; if(-1==(clientSocket=socket(AF_INET,SOCK_DGRAM,0))) puts("socket开启失败"); else puts("socket开启成功"); bzero(&remoteaddr, sizeof(remoteaddr));//清空字节 remoteaddr.sin_family = AF_INET; remoteaddr.sin_port = htons(PORT); remoteaddr.sin_addr.s_addr =inet_addr(addr); if(-1==(sendto(clientSocket,"HI",strlen("HI"),0, (struct sockaddr *)&remoteaddr,addrlen=sizeof(remoteaddr)))) puts("发送失败\n"); else puts("发送成功\n"); if(-1==(buflen=recvfrom(clientSocket,buf,sizeof(buf),0, (struct sockaddr *)&remoteaddr,&addrlen))) puts("接受失败\n"); else puts("接受成功\n"); puts(buf); close(clientSocket); } 运行结果 Server: socket开启成功 绑定成功 接受成功 HI3Z� 发送失败 97 Client: socket开启成功 发送成功 ```


<div class="post-text" itemprop="text"> <p>I am running the PHP internal web server inside a Docker container based on Alpine 3.8.</p> <p>This serves a simple page, which is:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test page&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt; This is a 'hello world' for my CD container. &lt;/div&gt; &lt;p&gt; Version: &lt;?php echo getenv('CD_DEMO_VERSION') ?&gt; &lt;/p&gt; &lt;p&gt; GUID: &lt;?php echo file_get_contents(__DIR__ . '/guid.txt') ?&gt; &lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I have this in a CircleCI build process, and a PHPUnit reads the HTML using <code>simplexml_load_string()</code> in order to check it is working. Most of the time it is fine, but occasionally it is adding control-character cruft either to the start or the end of the HTML, causing the HTML parsing to fail. I would say this happens 10% of the time, so it is hard to replicate. It does not seem to happen locally.</p> <p>In this build process I am waiting for the web server to start up, so I don't think there is a race-condition happening here.</p> <p>If the cruft occurs at the start, it looks like this (my output swaps carriage returns to the <code>⏎</code> symbol, this is not seen by the XML processor):</p> <pre><code>^@^@&lt;html&gt;⏎ &lt;head&gt;⏎ &lt;title&gt;Test page&lt;/title&gt;⏎ &lt;/head&gt;⏎ &lt;body&gt;⏎ &lt;div&gt;⏎ This is a 'hello world' for my CD container.⏎ &lt;/div&gt;⏎ &lt;p&gt;⏎ Version: &lt;/p&gt;⏎ &lt;p&gt;⏎ GUID: 47294362a6154e9a5397a9f9b72cefe1d349ec2e31de12e6084746a084e4e4ef &lt;/p&gt;⏎ &lt;/body&gt;⏎&lt;/html&gt; </code></pre> <p>If the cruft appears at the end, it looks like this:</p> <pre><code>&lt;!DOCTYPE html&gt;⏎&lt;html&gt;⏎ &lt;head&gt;⏎ &lt;title&gt;Test page&lt;/title&gt;⏎ &lt;/head&gt;⏎ &lt;body&gt;⏎ &lt;div&gt;⏎ This is a 'hello world' for my CD container.⏎ &lt;/div&gt;⏎ &lt;p&gt;⏎ Version: &lt;/p&gt;⏎ &lt;p&gt;⏎ GUID: a721f44d05e93debb593eef135fc664fb6b0d3aa6a04d50af7f17339d0d75399 &lt;/p&gt;⏎ &lt;/body&gt;⏎&lt;/html&gt;⏎^@^@ </code></pre> <p>I don't know if these are actual circumflexes and at symbols, or whether this is just how the random stuff is rendered to my screen.</p> <p>It looks like the web server is serving a UTF-8 character set header.</p> <p>I think my PHPUnit test is relevant, so I will add it here. Due to a way in which CircleCI works, I cannot publish a Docker port on the outside of a container, so I am using <code>docker exec</code> to do an HTTP operation from the inside:</p> <pre><code>public function testApp() { // Get the page and convert it to an XML object $html = $this-&gt;getWebPage(); // CI is giving me some parsing issues, so let's see it echo str_replace(" ", "⏎", $html); $doc = simplexml_load_string($html); $message = trim((string) $doc-&gt;body-&gt;div); $this-&gt;assertEquals( "This is a 'hello world' for my CD container.", $message ); } protected function getWebPage() { $output = $return = null; $command = sprintf( 'docker exec -ti %s php -r "echo file_get_contents(\'http://localhost\');"', escapeshellarg($this-&gt;getRepoName()) ); exec($command, $output, $return); // Check return value first if ($return) { throw new RuntimeException( sprintf( 'Returned a failure exit code %d on Docker operation', $return ) ); } $imploded = implode(PHP_EOL, $output); return $imploded; } </code></pre> <h2>Update</h2> <p>I have updated to Apache 2.4.x inside Alpine 3.8, and to my great surprise, I get exactly the same problem. So, it turns out not to be the PHP web server.</p> <p>I have also tried Alpine 3.7, same result again. I tried Ubuntu 18.10, same again.</p> <p>I have tried <code>php -r</code> with <code>file_get_contents()</code> and <code>wget</code> as HTTP devices inside the container.</p> <p>I am now minded to think that capturing stdout from <code>docker exec</code> is at fault. I assume that if I set up my tests in another image and run the containers with Docker Compose, it will probably work. Or, I could use <code>docker exec</code>, write to a container file, and then fish the file out with <code>docker cp</code>.</p> <p>It'd still be fascinating to know what is going wrong, though.</p> </div>


<div class="post-text" itemprop="text"> <p>I have seven lines of text. I want to use PHP to do the things below.</p> <p>First of all, I want to remove all the lines which don't have the word 'MARCO1998' in them.</p> <p>Then, for the remaining lines, I want to remove everything except for the 1-3 numbers <strong>after</strong> the word 'MAP'</p> <p>And then, after there's only seven rows of 1-3 numbers left, I want to remove the duplicates.</p> <pre><code>17.10.16 11:32:39 MAP104 MARCO1998 zerstoert NIGHTRIDER 17.10.16 14:17:25 MAP66 MARCO1998 zerstoert SPARTACULS 17.10.16 14:26:15 MAP66 MARCO1998 zerstoert SUPERONE 17.10.16 23:09:04 MAP104 MARCO1998 zerstoert JOCKSTRAP7 18.10.16 14:27:45 MAP244 MARCO1998 zerstoert MARIA07 18.10.16 19:50:37 MAP40 MARCO1998 zerstoert LILIENKILL 19.10.16 07:08:41 MAP186 KOBOLD1 zerstoert MARCO1998 </code></pre> </div>


<div class="post-text" itemprop="text"> <p><strong>question:How to compare two chart ranges, and get percentage as a result.</strong></p> <p>I want to compare two chart parts, (range of 60 values), and as a result get percentage of difference. So i can find very similar chart curves. (Example:Get all charts that are 90% similar to this one)</p> <p>For every range, data is stored in 60 number array. Every range starts with 0 and all next numbers represent chart value from that moment.("+" chart goes up and "-" chart goes down)</p> <pre><code>$range1 = array(0.00,-0.90,2.10,0.10,-3.40,-4.30,-1.90,-0.30,0.00,0.10,-0.60,-0.20,-0.30,-0.30,1.00,-0.90,-0.50,1.00,2.80,5.00,5.50,5.20,6.70,5.50,5.70,7.30,6.00,5.10,5.30,11.10,10.90,9.00,7.10,6.60,7.00,5.50,5.50,12.60,15.60,14.30,18.50,16.60,16.60,20.30,20.60,18.10,16.10,19.10,14.40,18.70,17.40,17.80,17.20,19.90,20.60,17.70,17.00,17.50,16.70,14.70); $range2 = array(0.00,-2.90,-3.60,-3.10,-3.90,-5.90,-11.80,-8.40,-8.00,-8.40,-8.20,-7.00,-7.60,-7.30,-5.10,-7.20,-7.30,-7.40,-7.70,-8.90,-9.30,-9.30,-9.90,-7.50,-11.70,-12.20,-19.80,-19.60,-19.90,-19.00,-22.10,-19.10,-20.10,-18.90,-19.70,-19.90,-16.50,-23.70,-26.60,-24.20,-28.30,-27.00,-28.60,-28.90,-22.90,-24.00,-25.10,-24.30,-18.40,-31.70,-29.80,-29.00,-29.50,-28.30,-35.50,-27.60,-34.00,-32.80,-36.00,-34.40,); $result = some_specific_manual_written_function($range1, $range2); //as a result i want get percentage or something else from what i can how similar charts are </code></pre> <p>I will do it reading csv files and then storing it to db, so it can be done with php or python.</p> </div>


<div class="post-text" itemprop="text"> <p>I have been writing some rpc code in go, using the standard library. </p> <p>My system is kubuntu 18.10 64 bit all updates applied in conjunction with golang 1.11.</p> <p>In an update to my initial assumptions about memory usage, they turned out to be incorrect so here is my updated question. The question still reates to a constant climb in memory consumption.</p> <p>Update:</p> <p>I have done some further investigation, and, I am probably still not understanding correctly.</p> <p>I wrote a simple test server and client as follows:</p> <p>Client:</p> <pre><code>package main import ( "net/rpc" ) import ( "fmt" "log" ) type Args struct { ThrottleName string BatchSize int } func main() { throttle, err := rpc.Dial("tcp", "") if err != nil { log.Fatal("dialing:", err) } fmt.Println("done dial") var reply int var tc = Args{ThrottleName: "a", BatchSize: 10} for { _ = throttle.Call("Task.Throttle", tc, &amp;reply) fmt.Println(reply) } } </code></pre> <p>Server:</p> <pre><code>package main import ( "net" "net/rpc" "time" ) type Args struct { ThrottleName string BatchSize int } type Task int func (t *Task) Throttle(args *Args, reply *int) error { time.Sleep(1 * time.Microsecond) //reply = 0 return nil } func main() { task := new(Task) rpc.Register(task) listener, _ := net.Listen("tcp", ":1234") defer listener.Close() rpc.Accept(listener) } </code></pre> <p>I then started the server. Checked the memory use using:</p> <pre><code>ps -eo size,command --sort -size | grep rpctest | awk '{ hr=$1/1024 ; sum +=hr} END {print sum}' </code></pre> <p>This registered about 140mb, I then started the client, the memory usage climbs over time, after 5.5hours it had reached 359mb. I cannot confirm that it had finished climbing.</p> <p>I then stopped the client and after 2 hours the memory usage was still at 359mb.</p> <p>I guess my updated question are: </p> <p>Am i do something wrong?</p> <p>Why does the memory use not at least drop back after the client exits?</p> <p>Why does memory keep rising through use?</p> <p>Excuse the appalling error checking.</p> <p>Final addendum I also tried:</p> <pre><code>stress --vm-bytes $(awk '/MemAvailable/{printf "%d ", $2}' &lt; /proc/meminfo)k --vm-keep -m 1 </code></pre> <p>In case the system was not reclaiming the memory from go.</p> </div>

c++模板和container混用导致出现的问题,c2662指针无法从const type转换成type &?

#ifndef DATATABLE_H #define DATATABLE_H #include<iostream> #include<string> #include<deque> #include<vector> #include <utility> #include<math.h> using namespace std; extern int FW; namespace sict { template<typename T> class DataTable { float Ymean = 0.0; float Ysigma = 0.0; deque<T> buffer; typename std::deque<T>::iterator i; public: T sigmaCalculator(deque<T>); DataTable(ifstream & ifile) { float reader1; float reader2=0.0; float reader2Buffer; if (ifile.is_open()) { while (ifile) { ifile >> reader1 >> reader2; reader2Buffer += reader2; buffer.push_back(reader1); buffer.push_back(reader2); } } Ymean = reader2Buffer / buffer.size() / 2; ifile.close(); } void displayData(std::ostream& os) const { os << "Data Values" << endl; os << "------------" << endl; os.width(FW); os << "x"; os.width(FW); os << "y" << endl; for (i = buffer.begin(); i != buffer.end(); i+2) { os.width(FW); os << *i; os.width(FW); os << *(++i) << endl; } } void displayStatistics(std::ostream& os)const{ os << "Statistics" << endl; os << "----------" << endl; os << " y mean ="; os.width(FW); os << Ymean << endl; os << " y sigma ="; os.width(FW); Ysigma = sigmaCalculator(buffer); os << Ysigma << endl; } }; template<typename T> T DataTable<T>::sigmaCalculator(deque<T> input) { float tempForMeanDifference = new float[input.size()]; float sumBuffer = 0.0; for (int num = 0; num < input.size(); num++) { tempForMeanDifference[num] = input[num] - Ymean; tempForMeanDifference[num] = pow(tempForMeanDifference[num], 2); } for (int num = 0; num < input.size(); num++) { sumBuffer = sumBuffer + tempForMeanDifference[num]; } sumBuffer = sumBuffer / input.size(); sumBuffer = sqrt(sumBuffer); delete []tempForMeanDifference; return sumBuffer; } } #endif // DATATABLE_H //////////////////////////////////以上是头文件,就是出问题的内容 ``` // Workshop 7 - STL Algorithms // w7.cpp // updated by Cornel on 18.10.2018 // updated by Chris Szalwinski // 2019/03/10 #include <iostream> #include <fstream> #include <string> #include "DataTable.h" #include "DataTable.h" // this is intentional using namespace std; int FW = 8; // field width int ND = 4; // precision for numbers // Reports the Statistics for file named pFileName // void processFile(const char* pFileName) { cout << endl; cout << "****************************************" << endl; cout << "*** Processing file [" << pFileName << "]" << endl; cout << "****************************************" << endl; std::ifstream dataFile(pFileName); if (!dataFile) { cerr << endl << "***Failed to open file " << pFileName << "***" << endl; return; } try { sict::DataTable<float> data(dataFile); cout << endl; data.displayData(cout); data.displayStatistics(cout); } catch (std::string& msg) { cout << "ERROR: " << msg << endl; } } int main(int argc, char** argv) { #ifndef SICT_DATA_TABLE_H cout << "Improper header guard for DataTable.h! Follow the convention " << "SICT_DATA_TABLE_H when defining a header guard.\n"; #endif cout << "Command Line: " << argv[0]; for (int i = 1; i < argc; i++) cout << " " << argv[i]; cout << endl; if (argc < 2) { cerr << endl << "***Incorrect number of arguments***" << endl; return 1; } for (int i = 1; i < argc; ++i) processFile(argv[i]); } /////////////////////////这里是固定的地方,不用查找错误 ``` 大家好,最近开始学容器和迭代器,发现了一个奇怪的问题,就是明明没有declare任何函数或变量是const,然而编译器却说无法转换,会不会是有些隐式转换我没有意识到啊?谢谢大家


<div class="post-text" itemprop="text"> <p>Hello i have array with 3 dimension. the main array hold 3 message sets and each message sets hold 10 messages. i need to show the message data on page</p> <p>i used this code for generate array.</p> <pre><code>$messages=array(); for ($i = 1; $i &lt;= 3; $i++) { $messages[]=$sqs-&gt;receiveMessage('https://sqs.us-west-2.amazonaws.com/947693316473/amazon_notification',10); } var_dump($messages); </code></pre> <p>the var dump gives me this reults(part of var dump)</p> <pre><code>array(3) { [0]=&gt; array(2) { ["RequestId"]=&gt; string(36) "38e56e19-c186-5057-aafc-24a6e3b8b9c0" ["Messages"]=&gt; array(10) { [0]=&gt; array(4) { ["MessageId"]=&gt; string(36) "64419fb5-b824-4475-83e1-bd004bfcb413" ["ReceiptHandle"]=&gt; string(288) "uUk89DYFzt3DGyM6Ey52yPUINfIRCkqjuwyXM1T2gNKWmdVIPAztgX2pS1rpj6bplAYqKFx3hsPU3ZyZ4ZH0zgazEsAPOaD28PwavMIOWfhca8D6zElXbgCv+tU0ShXAyA9NcqxcZPCAAHK3UYph2PEVd2ihk+hkTOGvu4Js2xnGozrnaRY1bUH7sZ87K2J/a3Kd8Pl6RAhVUFwVCfGpH4NkhdyduXMwkmrAKNQawRkwFmB9myDbEYBh9zpJdusnMcrTDl3F8F+yWEwphtPMxH4UijoDsgSo" ["MD5OfBody"]=&gt; string(32) "b9236bf0f013145da92cf27619b414f7" ["Body"]=&gt; string(13840) " AnyOfferChanged 1.0 7b49b7eb-2eab-4d35-a17c-6cdaef89edda 2013-09-27T05:05:29.629Z A34FW7RM36DHBT A1PA6795UKMFR9 A1PA6795UKMFR9 B0036F7WHU new 2013-09-27T05:05:28.746Z 37 1 81.89 EUR 81.89 EUR 0.00 EUR 82.47 EUR 82.47 EUR 0.00 EUR 82.47 EUR 82.47 EUR 0.00 EUR 73.10 EUR 32 1 A1HTKBNYG718CQ new 49993 93 81.89 EUR 0.00 EUR DE false Unsere Artikeldaten zum Vergleich: BT-Modul 40 BT-Modul 40 - Bluetooth-Modul f&amp;uuml;r Tele false true true false A3JWKAKR8XB7XF new 0 82.47 EUR 0.00 EUR true false true true false A31522I6NTHR25 new 31475 99 82.17 EUR 4.00 EUR DE false true true true true AOC3G2PBG3IY7 new 621523 96 86.63 EUR 0.00 EUR DE false TK Anlage ISDN Zub AGFEO BT Modul 40. Fabrikneu &amp; OVP. Rg mit ausgew. MwSt. 2 Jahre Gew&amp;#2 false true true true A1AL0IFPG5W1BM new 197465 93 88.97 EUR 0.00 EUR DE false NEUWARE mit Rechnung und ausgewiesener MwSt. DHL Versand! Packstationen und Postfächer mög false true true false A18KZ5Y7JZEYT0 new 779 91 92.55 EUR 0.00 EUR DE false ----Wir verschicken nicht an Packstationen---- BTMODUL 40 Bluetooth Modul 40 Die Einzel un false true true false A189RWP0VCRW62 new 16456 96 93.00 EUR 0.00 EUR DE false false true true true A2RQ26FRS9UTKN new 8190 96 88.75 EUR 6.89 EUR DE false geliefert wird: Artikelname: Bluetoothmodul BT-Modul 40, Hersteller: AGFEO, Herstellerarti false true true true A2TJA1FXIZNS2O new 1330 96 96.29 EUR 0.00 EUR DE false Neu OVP; Versand per DHL aus Deutschland, auch an Packstation, nur 1x Versandkosten pro Li false true true true A31XRU8TFBHI66 new 633 96 95.11 EUR 4.09 EUR DE false AGFEO Bluetoothmodul für ST 40 6101031 false true true false A133RA3ZUAU4I7 new 40406 93 101.62 EUR 0.00 EUR DE false false true true true A34FW7RM36DHBT new 4873 94 102.81 EUR 0.00 EUR DE false false true true true " } [1]=&gt; array(4) { ["MessageId"]=&gt; string(36) "d50624ce-d0d0-4d31-b762-0fcbc826dd07" ["ReceiptHandle"]=&gt; string(288) "uUk89DYFzt3DGyM6Ey52yPUINfIRCkqj79dpqDDeT9vENqvOve6dd1Kdx+bm0rUr7SnaAYm35nHU3ZyZ4ZH0zgazEsAPOaD28PwavMIOWfhca8D6zElXbgCv+tU0ShXAyA9NcqxcZPCAAHK3UYph2PEVd2ihk+hkTOGvu4Js2xnGozrnaRY1bUH7sZ87K2J//bvMYBQZeQoz7fn8u387bYQnnWVg1xEdrPo2e2/OHrYBnQQTDtuzmxTMS8y8UFB2ujqQ7FuGbGOyWEwphtPMxH4UijoDsgSo" ["MD5OfBody"]=&gt; string(32) "40e3dba34cc8fec44679d64d11806808" ["Body"]=&gt; string(16357) " AnyOfferChanged 1.0 a116d8d2-fea4-4287-b146-91b3671fa19c 2013-09-27T05:05:32.383Z A34FW7RM36DHBT A1PA6795UKMFR9 A1PA6795UKMFR9 B004F1F5B4 new 2013-09-27T05:05:31.044Z 46 1 18.06 EUR 18.06 EUR 0.00 EUR 18.72 EUR 18.72 EUR 0.00 EUR 18.06 EUR 18.06 EUR 0.00 EUR 20.99 EUR 32 1 AOC3G2PBG3IY7 new 621523 96 18.06 EUR 0.00 EUR DE false Adapter / USB / Wless N / NWD-2205. Neu. Rechnung mit ausgew. MwSt. 2 Jahre Gew&amp;#228;hrlei false true true true A1HTKBNYG718CQ new 49993 93 18.07 EUR 0.00 EUR DE false Unsere Artikeldaten zum Vergleich: NEW WLAN USB ZYXEL NWD-2205 bis 300Mbit, Wireless LAN I false true true false A1X0M9U5WW1195 new 670945 95 18.10 EUR 0.00 EUR DE false false true true true A4JBMX2FM5537 new 54060 94 18.40 EUR 0.00 EUR DE false false true true true A3JWKAKR8XB7XF new 0 18.72 EUR 0.00 EUR true false true true false A133RA3ZUAU4I7 new 40406 93 18.99 EUR 0.00 EUR DE false false true true true A34FW7RM36DHBT new 4873 94 19.37 EUR 0.00 EUR DE false false true true true AZLS81A4R7CR4 new 7521 98 19.83 EUR 0.00 EUR DE false Neuware. Versand aus Deutschland. Service und technische Unterstützung per Email und Tele false true true false A3CJ7XH8N58PQ7 new 44289 90 15.48 EUR 4.40 EUR DE false . true true true true A1AL0IFPG5W1BM new 197465 93 19.88 EUR 0.00 EUR DE false NEUWARE mit Rechnung und ausgewiesener MwSt. DHL Versand! Packstationen und Postfächer mög false true true false A21TN7USOBHKH0 new 51874 98 19.89 EUR 0.00 EUR DE false Vergleichen Sie bitte zur Kontrolle unsere Artikelbeschreibung: "ZyXEL NWD2205 Netzwerkada false true true true A1UQ4F1GL6W7 new 1141 94 20.10 EUR 0.00 EUR GB false ZyXEL: productName. Professionelle Verkäufer - Sorgfältige Lieferung aus England - auf u false true true true A3DWL7Z8V42IK3 new 28610 96 15.60 EUR 4.95 EUR DE false false true true true A2KMES8VWTGCHL new 2 50 17.57 EUR 3.00 EUR DE false true false true true A1YCATCVFL5J8N new 13.90 EUR 6.90 EUR DE false Neu... Originalverpackt... Rechnung mit MwSt. false true true true " } [2]=&gt; array(4) { </code></pre> <p>You can see the full var dump here <a href="http://aws2013.yakodo.de/getShippingPriceDE_de.php" rel="nofollow">http://aws2013.yakodo.de/getShippingPriceDE_de.php</a></p> <p>i used foreach loop for get results from above array but no luck.i wanna show <strong>MessageId,Body</strong> like values. can any one help me with that. thank you</p> </div>


大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...


今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...


一 前言 此篇文章的内容也是学习不久,终于到周末有时间码一篇文章分享知识追寻者的粉丝们,学完本篇文章,读者将对token类的登陆认证流程有个全面的了解,可以动态搭建自己的登陆认证过程;对小项目而已是个轻量级的认证机制,符合开发需求;更多精彩原创内容关注公主号知识追寻者,读者的肯定,就是对作者的创作的最大支持; 二 jwt实现登陆认证流程 用户使用账号和面发出post请求 服务器接受到请求后使用私...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...



总结了 150 余个神奇网站,你不来瞅瞅吗?



提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...






私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...




今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...


场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...


阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...


不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...






当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...


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


硅谷科技公司上班时间OPEN早已不是什么新鲜事,早九晚五是常态,但有很多企业由于不打卡,员工们10点、11点才“姗姗来迟”的情况也屡见不鲜。 这种灵活的考勤制度为人羡慕,甚至近年来,国内某些互联网企业也纷纷效仿。不过,硅谷普遍弹性的上班制度是怎么由来的呢?这种“流行性迟到”真的有那么轻松、悠哉吗? 《动态规划专题班》 课程试听内容: 动态规划的解题要领 动态规划三大类 求最值/计数/可行性 常...






爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4


编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?





已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...


前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...


在2019年的ReactiveConf 上,《Elm in Action》的作者Richard Feldman对未来5年Web开发的发展做了预测,很有意思,分享给大家。如果你有机会从头...


导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...



C 语言编程 — 堆栈与内存管理

目录 文章目录目录前文列表堆、栈内存管理动态分配内存重新调整内存的大小和释放内存 前文列表 《程序编译流程与 GCC 编译器》 《C 语言编程 — 基本语法》 《C 语言编程 — 基本数据类型》 《C 语言编程 — 变量与常量》 《C 语言编程 — 运算符》 《C 语言编程 — 逻辑控制语句》 《C 语言编程 — 函数》 《C 语言编程 — 高级数据类型 — 指针》 《C 语言编程 — 高级数据类...