VirtualBox:不能创建仅主机(Host-Only)网络连接.

vb添加host-only时出现如图错误,求大佬解答。。图片

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
虚拟机中Host-Only模式网卡无法被主机ping通

我是网络小白,最近在使用得到一个任务是搭建线上环境,并且使用vagrant进行打包。 线上环境是Centos6.6,Apache2.4.4,PHP5.5.3,我下载的软件是CentOS6.6的ios镜像 并在搭建好环境后使用vagrant将环境打包成了.box 使用box启动新的虚拟机时遇到了如下问题 问题一: 在Vagrantfile文件中配置添加config.vm.network "private__network",ip:"192.168.10.35",在vagrant up启动虚拟机后ip绑定失效。 在遇到以上问题后我就去网上下载了一个centOS的box文件并也使用Vagrantfile配置静态Ip,启动后发现ip成功绑定,然后查看配置,发现vagrant创建了一张新的网卡,eth4,网卡使用hots-only模式,并且主机是可以ping通该网卡的ip的。看到这些后我就在自己的虚拟机中也手动创建了一张网卡eth1_,也是采用的_host-only模式,并启成功启动了该网卡,然后出现 了第二个问题 问题二:发现主机无法ping通该网卡,在反复对比两台主机配置后都没有发现差异。但是无意间发现了virtualbox启动界面的差异,如下图所示: 图一,我的虚拟机_ ![图片说明](https://img-ask.csdn.net/upload/201807/31/1533015945_682206.jpg) _图二,成功绑定ip并平通的虚拟机_ ![图片说明](https://img-ask.csdn.net/upload/201807/31/1533015975_651207.jpg)

在VMware中安装Centos7中,怎样查找 kernel headers的软件包的安装位置?

我在centos中更新vmtools时出现: The path "" is not a valid path to the 3.10.0-514.el7.x86_64 kernel headers. Would you like to change it? 而我的 kernel-headers-3.10.0-514.10.2.el7.x86_64 和 kernel-devel-3.10.0-514.10.2.el7.x86_64都是最新版本;通过uname -r得到的内核版本3.10.0-514.el7.x86_64。 我用find -name 目录名 -type d没找到;网上的找的说在/usr/src/kernels/3.10.0-514.10.2.el7.x86_64/include/(这是我的安装目录)目录下,而我填上去一句是个无效地址

使用virtualbox,怎样实现宿主机和ubuntu相互访问而且ubuntu可以连接外网。

我在win7中的virtualbox5.0装的ubuntu server12.04,现在想通过宿主机中的SecureCRT连接到ubuntu上,而且同时ubuntu也能够访问外网(互联网)。 初步想法是虚拟机采用两个网卡,一个使用NAT模式,一个采用Host-only模式,并且对ubuntu设置如下![图片说明](https://img-ask.csdn.net/upload/201508/25/1440516230_968249.png)virtualbox的全局设置如下![图片说明](https://img-ask.csdn.net/upload/201508/25/1440516386_303818.png),![图片说明](https://img-ask.csdn.net/upload/201508/25/1440516491_436100.png),windows这边的设置如下:![图片说明](https://img-ask.csdn.net/upload/201508/25/1440516585_73250.png)。 这样设置之后,重启ubuntu网络服务之后,结果显示如下:![图片说明](https://img-ask.csdn.net/upload/201508/25/1440516624_588396.png),为什么没有如愿的显示出eth1的信息,反而出来了个eth2,而且也没有ip地址呢?

ubuntu无法apt-get, grub-pc出错

在ubuntu16.04系统下进行操作 ``` sudo apt-get install pyth-qt4on ``` 所有的apt-get均会报错, 报错如下: ``` Setting up grub-pc (2.02~beta2-36ubuntu3.20) ... dpkg: error processing package grub-pc (--configure): subprocess installed post-installation script returned error exit status 10 dpkg: dependency problems prevent configuration of grub-gfxpayload-lists: grub-gfxpayload-lists depends on grub-pc (>= 1.99~20101210-1ubuntu2); however: Package grub-pc is not configured yet. dpkg: error processing package grub-gfxpayload-lists (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: grub-pc grub-gfxpayload-lists E: Sub-process /usr/bin/dpkg returned an error code (1 ) ``` 试了谷歌上面的各种方法均未解决,看看各位大佬有没有什么方法

Laravel 5.7无法加载`storage / framework / cache / data`并写入`./ storage / logs / laravel-2019-06-11.log`

<div class="post-text" itemprop="text"> <p>I have a project under laravel 5.7 installation and for some reason I get the following error:</p> <pre><code>file_put_contents(/home/vagrant/code/storage/framework/cache/data/1c/6e/1c6ea8378a1030f85a05f4cb2262de1e2164efa6): failed to open stream: No such file or directory </code></pre> <p>In order to mitigate the error I tried the following:</p> <ul> <li>Permission Based tries:</li> </ul> <pre><code> chmod 777 -R storage chmod 0777 -R storage </code></pre> <ul> <li>artistan based attempts:</li> </ul> <pre><code> php artisan cache:clear php artisan config:clear php artisan config:cache php artisan view:clear </code></pre> <ul> <li>php-fpm default user settings:</li> </ul> <pre><code>sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap/cache </code></pre> <p>Also for the development I use vagrant with the following <code>Vagrantfile</code> located at the root of my project:</p> <pre><code>Vagrant.configure("2") do |config| config.vm.box = "ubuntu/xenial64" config.vm.box_version = "20180917.0.0" config.vm.box_download_insecure = true config.vm.provider "virtualbox" do |vb| vb.name = "myapp-api" vb.memory = 2024 vb.cpus = 1 vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] end config.vm.network "private_network", ip: "192.168.10.111" config.vm.network "forwarded_port", guest: 80, host: 8888 config.vm.network "forwarded_port", guest: 22, host: 2223 config.vm.synced_folder "./.", "/home/vagrant/code" # Provision Scripts end </code></pre> <p>But any of these failed to resolve the solution.</p> <h1>Edit 1</h1> <p>The folder <code>framework/cache/data</code> already exists as <code>ls -l</code> shows:</p> <pre><code>$ ls -l /home/vagrant/code/storage/framework/cache/ | grep data drwxrwxr-x 1 vagrant vagrant 4096 Jun 11 10:46 data </code></pre> <p>By doing:</p> <pre><code>rm -rf storage/framework/cache mkdir -p storage/framework/cache </code></pre> <p>Resulted to the following <strong>NEW</strong> error:</p> <pre><code>The stream or file "/home/vagrant/code/storage/logs/laravel-2019-06-11.log" could not be opened: failed to open stream: Permission denied </code></pre> <p>So in my investigation shows:</p> <pre><code>$ ls -l /home/vagrant/code/storage/logs total 112 drwxrw-rw- 1 vagrant vagrant 4096 Jun 10 17:31 . drwxr-xr-x 1 vagrant vagrant 4096 Jun 10 15:47 .. -rwxrwxrwx 1 vagrant vagrant 14 Jun 10 15:47 .gitignore -rwxrwxrwx 1 vagrant vagrant 96507 Jun 10 18:09 laravel-2019-06-10.log </code></pre> <p>Meaning it has more than enouch permissions to get written. I also run the following command:</p> <pre><code>$ ls -l /home/vagrant/code/storage/ | grep logs drwxrw-rw- 1 vagrant vagrant 4096 Jun 10 17:31 logs </code></pre> <p>Meaning that still there are good enouch permissions in order for the laravel to write into the file. Still the error shows the opposite.</p> <p>Furthermore I tried this one:</p> <pre><code>mv bootstrap/cache/config.php ~/ </code></pre> <p>I also tried the following:</p> <pre><code>rm -rf storage/logs/* ./artisan cache:clear </code></pre> <p>And the problem still remains.</p> </div>

vagrant reload --provision是错误的说运行作曲家为“root”,我该怎么办?

<div class="post-text" itemprop="text"> <p>I used vagrant reload --provision, it says:</p> <pre><code>==&gt; homestead-7: Attempting graceful shutdown of VM... ==&gt; homestead-7: Checking if box 'laravel/homestead' is up to date... ==&gt; homestead-7: Clearing any previously set forwarded ports... ==&gt; homestead-7: Fixed port collision for 80 =&gt; 8000. Now on port 2200. ==&gt; homestead-7: Clearing any previously set network interfaces... ==&gt; homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==&gt; homestead-7: Forwarding ports... homestead-7: 80 (guest) =&gt; 2200 (host) (adapter 1) homestead-7: 443 (guest) =&gt; 44300 (host) (adapter 1) homestead-7: 3306 (guest) =&gt; 33060 (host) (adapter 1) homestead-7: 4040 (guest) =&gt; 4040 (host) (adapter 1) homestead-7: 5432 (guest) =&gt; 54320 (host) (adapter 1) homestead-7: 8025 (guest) =&gt; 8025 (host) (adapter 1) homestead-7: 27017 (guest) =&gt; 27017 (host) (adapter 1) homestead-7: 22 (guest) =&gt; 2222 (host) (adapter 1) ==&gt; homestead-7: Running 'pre-boot' VM customizations... ==&gt; homestead-7: Booting VM... ==&gt; homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2222 homestead-7: SSH username: vagrant homestead-7: SSH auth method: private key homestead-7: Warning: Connection reset. Retrying... homestead-7: Warning: Remote connection disconnect. Retrying... homestead-7: Warning: Connection reset. Retrying... homestead-7: Warning: Remote connection disconnect. Retrying... homestead-7: Warning: Connection reset. Retrying... homestead-7: Warning: Remote connection disconnect. Retrying... ==&gt; homestead-7: Machine booted and ready! ==&gt; homestead-7: Checking for guest additions in VM... homestead-7: The guest additions on this VM do not match the installed version of homestead-7: VirtualBox! In most cases this is fine, but in rare cases it can homestead-7: prevent things such as shared folders from working properly. If you see homestead-7: shared folder errors, please make sure the guest additions within the homestead-7: virtual machine match the version of VirtualBox you have installed on homestead-7: your host and reload your VM. homestead-7: homestead-7: Guest Additions Version: 5.0.18_Ubuntu r106667 homestead-7: VirtualBox Version: 5.2 ==&gt; homestead-7: Setting hostname... ==&gt; homestead-7: Configuring and enabling network interfaces... ==&gt; homestead-7: Mounting shared folders... homestead-7: /vagrant =&gt; /Users/imchess/Homestead homestead-7: /home/vagrant/code =&gt; /www/Code/php ==&gt; homestead-7: Running provisioner: file... ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: /var/folders/hq/czdzwx2n1c3_mzsf4vfwm8gm0000gn/T/vagrant-shell20180202-16576-1j9ra42.sh ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Certificate: mwboom.local ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Site: mwboom.local ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Checking for old Schedule ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Certificate: slboom.local ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Site: slboom.local ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Checking for old Schedule ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Clear Variables ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Restarting Cron ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Restarting Nginx ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating MySQL Database: homestead ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Postgres Database: homestead ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: script: Update Composer homestead-7: You are running composer as "root", while "/home/vagrant/.composer" is owned by "vagrant" homestead-7: You are already using composer version 1.6.3 (stable channel). ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: /var/folders/hq/czdzwx2n1c3_mzsf4vfwm8gm0000gn/T/vagrant-shell20180202-16576-17qinoh.sh ==&gt; homestead-7: Running provisioner: shell... homestead-7: Running: /var/folders/hq/czdzwx2n1c3_mzsf4vfwm8gm0000gn/T/vagrant-shell20180202-16576-i3q6nl.sh </code></pre> <p>In this report,</p> <pre><code>homestead-7: You are running composer as "root", while "/home/vagrant/.composer" is owned by "vagrant" homestead-7: You are already using composer version 1.6.3 (stable channel). </code></pre> <p>is red, like an error message.</p> <p>This is the picture:</p> <p><a href="https://i.stack.imgur.com/rMVNd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rMVNd.png" alt="picture"></a></p> <p>So how can I fix this error message?</p> </div>

Laravel 5.7 - 广播 - socket.io - redis:客户端什么也没发生

<div class="post-text" itemprop="text"> <p>Since few days I read about how to setup laravel-echo on my local machine. I manage to be able to run laravel-echo-server with redis and socket.io.</p> <p>The problem is that the event is fired, but nothing happen on the client side.</p> <p>I know that the event is fired, because it's log into my horizon.log file.</p> <pre><code>Horizon started successfully. [2018-08-29 18:35:30][31] Processing: App\Events\NewModel [2018-08-29 18:35:31][31] Processed: App\Events\NewModel </code></pre> <p>Then, into my echo.log file, I can see that the user is connected to the channel and echo trigger the event.</p> <pre><code>L A R A V E L E C H O S E R V E R version 1.3.9 ⚠ Starting server in DEV mode... ✔ Running at localhost on port 60010 ✔ Channels are ready. ✔ Listening for http events... ✔ Listening for redis events... Server ready! [6:35:15 PM] - QW3VITRzWPH4FvxPAAAB joined channel: channel-name Channel: presence-channel-name Event: App\Events\NewModel </code></pre> <p>It run on port 60010, because when I tried to do it on port 6001, the client is unable to connect.</p> <p>I'm using virtualbox/homestead on a windows 10 machine.</p> <p>There is the port forwarding into my Homestead.yaml</p> <pre><code>ports: - send: 60010 to: 6001 </code></pre> <p>So, I don't understand why client don't log the event. There is why my code at the moment</p> echo.js <pre><code>/** * Echo exposes an expressive API for subscribing to channels and listening * for events that are broadcast by Laravel. Echo and event broadcasting * allows your team to easily build robust real-time web applications. */ import Echo from "laravel-echo" window.io = require('socket.io-client'); // Have this in case you stop running your laravel echo server if (typeof io !== 'undefined') { window.Echo = new Echo({ broadcaster: 'socket.io', host: window.location.hostname + ':60010', }); console.log('Connected to socket.io'); } else { console.log('Not connected to socket.io'); } window.Echo.channel('channel-name') .listen('NewModel', (e) =&gt; { console.log('1:'); console.log(e); }) .listen('App\Events\NewModel', (e) =&gt; { console.log('2:'); console.log(e); }) .listen('App.Events.NewModel', (e) =&gt; { console.log('3:'); console.log(e); }); </code></pre> laravel-echo-server.json <pre><code>{ "authHost": "https://app.torque.homestead", "authEndpoint": "/broadcasting/auth", "clients": [{ "appId": "appId", "key": "key" }], "database": "redis", "databaseConfig": { "redis": { "port": "6379", "host": "127.0.0.1" }, "sqlite": { "databasePath": "/database/laravel-echo-server.sqlite" } }, "devMode": true, "host": "", "port": "60010", "protocol": "https", "socketio": {}, "sslCertPath": "app.torque.homestead.crt", "sslKeyPath": "app.torque.homestead.key", "sslCertChainPath": "", "sslPassphrase": "", "apiOriginAllow": { "allowCors": false, "allowOrigin": "", "allowMethods": "", "allowHeaders": "" } } </code></pre> channels.php <pre><code>&lt;?php /* |-------------------------------------------------------------------------- | Broadcast Channels |-------------------------------------------------------------------------- | | Here you may register all of the event broadcasting channels that your | application supports. The given channel authorization callbacks are | used to check if an authenticated user can listen to the channel. | */ Broadcast::channel('App.User.{id}', function ($user, $id) { return (int) $user-&gt;id === (int) $id; }); Broadcast::channel('channel-name', function () { return true; }); </code></pre> <p>If you want to see another file, let me know. Actually I don't know what could be needed to fix the issue.</p> <p>I think the problem may come from the forwarding port... But like I said, using 6001 is not working.</p> <p>I tried many things like changing port(maybe not the right combination like client on 60010 and server on 6001????)</p> <p>I also change that line into echo.js many times</p> <pre><code>host: window.location.hostname + ':60010', </code></pre> <p>There is some version of what i'm using :</p> <pre><code>vagrant@homestead:~$ node -v v10.8.0 vagrant@homestead:~$ npm -v 6.4.0 vagrant@homestead:~$ php -v PHP 7.2.9-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug 19 2018 07:16:54) ( NTS ) </code></pre> <p>packages.json</p> <pre><code>{ "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.18", "babel-preset-react": "^6.24.1", "bootstrap": "^4.1.3", "cross-env": "^5.2.0", "jquery": "^3.2", "laravel-mix": "^2.1.14", "lodash": "^4.17.4", "popper.js": "^1.14.4", "vue": "^2.5.17" }, "dependencies": { "@fortawesome/fontawesome": "^1.1.8", "@fortawesome/fontawesome-free-brands": "^5.0.13", "@fortawesome/fontawesome-free-regular": "^5.0.13", "@fortawesome/fontawesome-free-solid": "^5.0.13", "@fortawesome/fontawesome-free-webfonts": "^1.0.9", "@fortawesome/vue-fontawesome": "0.0.22", "ajv": "^6.5.3", "bootstrap-confirmation2": "^4.0.1", "datatables.net": "^1.10.19", "datatables.net-bs4": "^1.10.19", "datatables.net-buttons": "^1.5.3", "datatables.net-buttons-bs4": "^1.5.3", "express": "^4.16.3", "ioredis": "^4.0.0", "laravel-echo": "^1.4.0", "laravel-echo-server": "^1.3.9", "socket.io": "^2.1.1", "socket.io-client": "^2.1.1", "vee-validate": "^2.0.9", "vue-inject": "^2.1.1", "yarn": "^1.9.4" } } </code></pre> <p>composer.json</p> <pre><code>{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": "^7.1.3", "aloha/twilio": "^4.0", "eyewitness/eye": "dev-beta", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "laravel/framework": "5.7.*", "laravel/horizon": "^1.3", "laravel/passport": "^6.0", "laravel/tinker": "^1.0", "predis/predis": "^1.1" }, "require-dev": { "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", "phpunit/phpunit": "^7.0" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "extra": { "laravel": { "dont-discover": [ ] } }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate" ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "minimum-stability": "dev", "prefer-stable": true } </code></pre> <h2>Thank you for helping me!</h2> <h2>--EDIT--</h2> <p>After mcklayin suggest me, I look for redis data. So I run this :</p> <pre><code>vagrant@homestead:/var/lib$ redis-cli --scan presence-channel-name:members horizon:1 horizon:34 horizon:supervisors horizon:measured_jobs horizon:9 horizon:monitor:time-to-clear horizon:job:App\Jobs\ProcessModels horizon:35 horizon:queue:default horizon:job_id horizon:job:App\Events\NewModel horizon:masters horizon:last_snapshot_at horizon:33 horizon:master:homestead-xVse horizon:failed_jobs horizon:32 horizon:supervisor:homestead-xVse:supervisor-1 horizon:recent_jobs horizon:measured_queues </code></pre> <h2>--EDIT 2--</h2> <p>There is the App\Events\NewModel.php file</p> <pre><code>&lt;?php namespace App\Events; use Illuminate\Broadcasting\Channel; use Illuminate\Queue\SerializesModels; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; class NewModel implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; public $data; /** * Create a new event instance. * * @return void */ public function __construct($data) { $this-&gt;data = $data; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { return new PrivateChannel('channel-name'); } public function broadcastAs() { return 'NewModel'; } } </code></pre> </div>

合并常见的前缀子字符串

<div class="post-text" itemprop="text"> <p>I have a stream of messages entering a Go channel, most of which look like:</p> <p><code>T: added package to graph: acl-devel/2.2.52_4/armv6l-musl T: added package to graph: rofs-filtered/1.7_1/x86_64-musl T: added package to graph: rofs-filtered/1.7_1/HOST T: added package to graph: libshout/2.4.1_1/i686 T: added package to graph: mate-terminal/1.18.1_1/armv6l T: added package to graph: bullet-devel/2.86.1_1/x86_64-musl T: added package to graph: bullet-devel/2.86.1_1/HOST T: added package to graph: cubietruck-uboot/2016.11_1/armv6l-musl T: added package to graph: libfontenc/1.1.3_1/i686-musl T: added package to graph: apk-tools/2.8.1_1/x86_64 T: added package to graph: virtualbox-ose/5.1.28_1/armv7l-musl T: added package to graph: acl-devel/2.2.52_4/armv7l T: added package to graph: apk-tools/2.8.1_1/x86_64-musl T: added package to graph: tzutils/2017c_1/x86_64-musl T: added package to graph: python-argh/0.26.2_1/noarch T: added package to graph: tzutils/2017c_1/HOST </code></p> <p>I wish to be able to efficiently combine the above strings, line by line, but lose no information. This is for printing to an IRC channel, so I don't want to trigger flood warnings. To do that, I want to massage the above to be similar to the below:</p> <p><code>T: added package to graph: rofs-filtered/1.7_1/{x86_64-musl,HOST} T: added package to graph: libshout/2.4.1_1/i686 T: added package to graph: mate-terminal/1.18.1_1/armv6l T: added package to graph: bullet-devel/2.86.1_1/{x86_64-musl,HOST} T: added package to graph: cubietruck-uboot/2016.11_1/armv6l-musl T: added package to graph: libfontenc/1.1.3_1/i686-musl T: added package to graph: apk-tools/2.8.1_1/{x86_64,x86_64-musl} T: added package to graph: virtualbox-ose/5.1.28_1/armv7l-musl T: added package to graph: acl-devel/2.2.52_4/{armv6l-musl,armv7l} T: added package to graph: tzutils/2017c_1/{x86_64-musl,HOST} T: added package to graph: python-argh/0.26.2_1/noarch </code></p> <p>While still a lot of output and messages, the bulk of the reporting is about 10-12 lines with common prefixes as above, interspersed with the output of multiple threads doing the above (hence the low number of duplicates in the above data, lots of threads and the data is a snapshot of about 2 seconds).</p> <p>How might I condense multiple lines to join along their common prefix in Go?</p> </div>

virtualBox桥接方式 与主机互ping不通

问题:主机和虚拟都是采用自动获取ip,都在一个同一个网段上,都可以上外网,但不是就是互Ping不通??求大神指点,到底是什么原因,万分感谢! 环境: virtualbox: 版本Version 5.1.0 r108711 装的系统:win8.1 网络连接方式:桥接 ![图片说明](https://img-ask.csdn.net/upload/201607/17/1468729564_156796.png) ![图片说明](https://img-ask.csdn.net/upload/201607/17/1468729585_41698.png) 主机:系统:win10,已插入网线(以太网接入)可以上网。 ![图片说明](https://img-ask.csdn.net/upload/201607/17/1468729595_652109.png)

xdebug连接到客户端的超时。 :-(使用phpstorm 7.1.3 / vagrant / virtualbox / magento

<div class="post-text" itemprop="text"> <p>For a while, I was using Phpstorm EAP, and had xdebug running perfectly. I recently purchased a personal license and imported all my settings from the EAP into 7.1.3. Now xdebug does not work.</p> <p>Here's xdebug.ini</p> <pre><code>zend_extension=xdebug.so xdebug.remote_host = 192.168.56.1 xdebug.remote_cookie_expire_time = 36000 xdebug.remote_log = /tmp/xdebug.log xdebug.remote_port = 9000 xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_enable = 1 xdebug.remote_autostart = 0 xdebug.idekey="PHPSTORM" xdebug.scream=0 xdebug.remote_connect_back=1 xdebug.show_local_vars=1 </code></pre> <p>xdebug is also showing in the php.ini. I even ran it in <a href="http://xdebug.org/wizard.php" rel="noreferrer">http://xdebug.org/wizard.php</a> and the latest version is installed.</p> <p>Phpstorm is listening on port 9000 for xdebug, and "Listen for PHP Debug Connections" is on.</p> <p>My xdebug log constantly tells me this:</p> <pre><code>Log opened at 2014-07-18 17:46:16 I: Checking remote connect back address. I: Remote address found, connecting to 192.168.56.1:9000. E: Time-out connecting to client. :-( Log closed at 2014-07-18 17:46:16 </code></pre> <p>I've even tried a registry edit: <a href="http://brianreiter.org/2010/09/18/fix-virtualbox-host-only-network-adapter-creates-a-virtual-public-network-connection-that-causes-windows-to-disable-services/" rel="noreferrer">http://brianreiter.org/2010/09/18/fix-virtualbox-host-only-network-adapter-creates-a-virtual-public-network-connection-that-causes-windows-to-disable-services/</a></p> <p>No matter what I try, xdebug times out. Even with all firewalls off.</p> <p>I'm on Windows 7 Enterprise. VM is puphpet/centos65-x64</p> <p><strong>EDIT</strong> Forgot to mention the IDE key in Phpstorm is PHPSTORM</p> </div>

关于Fedora 22上安装Virtualbox-5.0问题

我在步骤安装virtualbox过程中,在执行/usr/lib/virtualbox/vboxdrv.sh setup这句话时提示错误信息: Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS[ OK ] Starting VirtualBox kernel modules [FAILED] (modprobe vboxdrv failed. Please use 'dmesg' to find out why) 我在dmesg中搜索关键字failed和error显示如下: [ 0.178239] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM [ 1.392305] pci 0000:00:1a.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001 [ 2.492302] pci 0000:00:1d.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001 [ 62.711387] ata3: COMRESET failed (errno=-16) [ 72.716349] ata3: COMRESET failed (errno=-16) [ 107.766068] ata3: COMRESET failed (errno=-16) [ 3.918142] radeon 0000:01:00.0: VCE init error (-22). [ 15.128825] radeon 0000:01:00.0: VCE init error (-22). [ 180.379060] radeon 0000:01:00.0: VCE init error (-22). [ 181.252889] radeon 0000:01:00.0: VCE init error (-22). [ 187.258773] usb 1-1.3: device descriptor read/64, error -110 [ 197.834764] usb 1-1.3: device not accepting address 7, error -32 其中ata3: COMRESET failed (errno=-16)这句话不用管,因为我的光驱已经拆掉了,识别不出来也是正常,BIOS中的Virtual Machine项我已经选了enable,其他错误是什么意思?请问我该如何解决?谢谢

virtualbox安装增强工具失败

共享文件夹failed 已安装包(fedora21 kernel3.19) abrt-addon-kerneloops-2.3.0-4.fc21.x86_64 kernel-3.19.3-200.fc21.x86_64 kernel-core-3.19.3-200.fc21.x86_64 kernel-devel-3.19.3-200.fc21.x86_64 kernel-headers-3.19.3-200.fc21.x86_64 kernel-modules-3.19.3-200.fc21.x86_64 libreport-plugin-kerneloops-2.3.0-6.fc21.x86_64 日志: Uninstalling modules from DKMS Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxguest/4.3.20/source -> /usr/src/vboxguest-4.3.20 DKMS: add completed. Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area... make KERNELRELEASE=3.19.3-200.fc21.x86_64 -C /lib/modules/3.19.3-200.fc21.x86_64/build M=/var/lib/dkms/vboxguest/4.3.20/build...........(bad exit status: 2) Error! Bad return status for module build on kernel: 3.19.3-200.fc21.x86_64 (x86_64) Consult /var/lib/dkms/vboxguest/4.3.20/build/make.log for more information. Failed to install using DKMS, attempting to install without grep: /lib/modules/3.19.3-200.fc21.x86_64/build/include/linux/version.h: No such file or directory make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.19.3-200.fc21.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false)

Starting Docker VM报错

![图片说明](https://img-ask.csdn.net/upload/201809/14/1536887091_270432.jpg) ![图片说明](https://img-ask.csdn.net/upload/201809/14/1536886982_452431.jpg) 详细错误信息如下: ``` Command failed: /usr/local/bin/docker-machine -D create -d virtualbox --virtualbox-memory 2048 default,Docker Machine Version: 0.15.0, build b48dc28d,Found binary path at /usr/local/bin/docker-machine,Launching plugin server for driver virtualbox,Plugin server listening at address 127.0.0.1:50209,() Calling .GetVersion,Using API Version 1,() Calling .SetConfigRaw,() Calling .GetMachineName,(flag-lookup) Calling .GetMachineName,(flag-lookup) Calling .DriverName,(flag-lookup) Calling .GetCreateFlags,Found binary path at /usr/local/bin/docker-machine,Launching plugin server for driver virtualbox,Plugin server listening at address 127.0.0.1:50215,() Calling .GetVersion,Using API Version 1,() Calling .SetConfigRaw,() Calling .GetMachineName,(default) Calling .GetMachineName,(default) Calling .DriverName,(default) Calling .GetCreateFlags,(default) Calling .SetConfigFromFlags,Reading certificate data 。。。。。。这里省略中间一部分内容。。。。。。 Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue,open /Users/lemostic/.docker/machine/machines/default/default/Logs/VBox.log: no such file or directory,notifying bugsnag: [Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue], ``` 请教各位,这个问题应该怎么处理,看后面的问题说是VirtualBox,让安装5.0.12以上版本,可是Docker ToolBox里自带的VirtualBox 是5.2的版本啊,本来就比5.0.12要高。

win10的VM VirtualBox无法创建64位虚拟机

CPU虚拟化已经启用![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507034_496220.png) 系统是win10 64bit![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507104_902382.png) VMware Workstation Pro创建虚拟机状态:![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507179_112093.png) Oracle VM VirtualBox创建虚拟机状态:![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507246_360089.png) 360核晶防护引擎:![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507329_51033.png) windows功能-Hyper-V:![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507404_714432.png) Windows版本:![图片说明](https://img-ask.csdn.net/upload/201710/20/1508507496_85250.png) 希望各位大牛给出解决方案! PS:不想重装系统。。。。

Hadoop 同时启动HDFS、YARN出错

``` liuye@liuye-VirtualBox:~$ start-all.sh This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh /usr/local/hadoop/bin/hdfs: 行 276: /usr/lib/jvm/java-7-openjdk-amd64/bin/java: 没有那个文件或目录 Starting namenodes on [] liuye@localhost's password: localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-liuye-namenode-liuye-VirtualBox.out localhost: /usr/local/hadoop/bin/hdfs: 行 276: /usr/lib/jvm/java-7-openjdk-amd64/bin/java: 没有那个文件或目录 liuye@localhost's password: localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-liuye-datanode-liuye-VirtualBox.out localhost: /usr/local/hadoop/bin/hdfs: 行 276: /usr/lib/jvm/java-7-openjdk-amd64/bin/java: 没有那个文件或目录 /usr/local/hadoop/bin/hdfs: 行 276: /usr/lib/jvm/java-7-openjdk-amd64/bin/java: 没有那个文件或目录 starting yarn daemons starting resourcemanager, logging to /usr/local/hadoop/logs/yarn-liuye-resourcemanager-liuye-VirtualBox.out /usr/local/hadoop/bin/yarn: 行 284: /usr/lib/jvm/java-7-openjdk-amd64/bin/java: 没有那个文件或目录 liuye@localhost's password: localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-liuye-nodemanager-liuye-VirtualBox.out localhost: /usr/local/hadoop/bin/yarn: 行 284: /usr/lib/jvm/java-7-openjdk-amd64/bin/java: 没有那个文件或目录 liuye@liuye-VirtualBox:~$ ```

virtualbox上安装oracle11g主机连接不上

虚拟机上安装的是11g的客户端,网卡选择的是host-only.主机能ping通虚拟机ip,虚拟机防火墙也关闭了,listener文件的host地址也改过了,在主机上执行sqlplus命令连接不上,一直提示no listener?怎么解决

Homestead没有设置VM Web应用程序

<div class="post-text" itemprop="text"> <p>I'm trying to start up Homestead to work on a couple websites located in the virtual machine, but they are not available, even though they were working yesterday when I configured it for the first time, and even though no error is displayed. This is the output text of the homestead up:</p> <pre><code>C:\Users\Luis&gt;homestead up Bringing machine 'default' up with 'virtualbox' provider... ==&gt; default: Checking if box 'laravel/homestead' is up to date... ==&gt; default: Clearing any previously set forwarded ports... ==&gt; default: Clearing any previously set network interfaces... ==&gt; default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==&gt; default: Forwarding ports... default: 80 =&gt; 8000 (adapter 1) default: 443 =&gt; 44300 (adapter 1) default: 3306 =&gt; 33060 (adapter 1) default: 5432 =&gt; 54320 (adapter 1) default: 22 =&gt; 2222 (adapter 1) ==&gt; default: Running 'pre-boot' VM customizations... ==&gt; default: Booting VM... ==&gt; default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection timeout. Retrying... ==&gt; default: Machine booted and ready! ==&gt; default: Checking for guest additions in VM... ==&gt; default: Setting hostname... ==&gt; default: Configuring and enabling network interfaces... ==&gt; default: Mounting shared folders... default: /vagrant =&gt; C:/Users/Luis/AppData/Roaming/Composer/vendor/laravel/homestead default: /home/vagrant/Code =&gt; D:/www default: /home/vagrant/laravel =&gt; D:/www/laravel default: /home/vagrant/Code/phpmyadmin =&gt; D:/www/phpmyadmin default: /home/vagrant/Code/codeigniter =&gt; D:/www/codeigniter ==&gt; default: Machine already provisioned. Run `vagrant provision` or use the `--provision` ==&gt; default: flag to force provisioning. Provisioners marked to run always will still run. </code></pre> <p>As I've mentioned, it was working perfectly yesterday, but I can't access any of the web applications installed (Laravel, phpMyAdmin, Codeigniter).</p> <p>And this is my homestead.yaml file:</p> <pre><code>--- ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: C:\Users\Luis\.ssh\id_rsa.pub keys: - C:\Users\Luis\.ssh\id_rsa folders: - map: D:\www to: /home/vagrant/Code - map: D:\www\phpmyadmin to: /home/vagrant/Code/phpmyadmin - map: D:\www\codeigniter to: /home/vagrant/Code/codeigniter - map: D:\www\laravel to: /home/vagrant/laravel sites: - map: homestead.app to: /home/vagrant/Code/laravel/public - map: laravel.app to: /home/vagrant/Code/laravel/public - map: phpmyadmin.app to: /home/vagrant/Code/phpmyadmin - map: codeigniter.app to: /home/vagrant/Code/codeigniter databases: - homestead - codeigniter variables: - key: APP_ENV value: local # blackfire: # - id: foo # token: bar # client-id: foo # client-token: bar # ports: # - send: 93000 # to: 9300 # - send: 7777 # to: 777 # protocol: udp </code></pre> <p>Ping to 192.168.10.10 doesn't work either. The host machine is Windows as you can guess.</p> <p>The domains are listed within the hosts file too.</p> <p>What else could I do?</p> </div>

GO语言:致命错误:所有goroutine都在睡眠中-死锁

<div class="post-text" itemprop="text"> <p>Code below works fine with hard coded JSON data however doesn't work when I read JSON data from a file. I'm getting <code>fatal error: all goroutines are asleep - deadlock</code> error when using <code>sync.WaitGroup</code>.</p> <p><strong>WORKING EXAMPLE WITH HARD-CODED JSON DATA:</strong></p> <pre><code>package main import ( "bytes" "fmt" "os/exec" "time" ) func connect(host string) { cmd := exec.Command("ssh", host, "uptime") var out bytes.Buffer cmd.Stdout = &amp;out err := cmd.Run() if err != nil { fmt.Println(err) } fmt.Printf("%s: %q ", host, out.String()) time.Sleep(time.Second * 2) fmt.Printf("%s: DONE ", host) } func listener(c chan string) { for { host := &lt;-c go connect(host) } } func main() { hosts := [2]string{"user1@111.79.154.111", "user2@111.79.190.222"} var c chan string = make(chan string) go listener(c) for i := 0; i &lt; len(hosts); i++ { c &lt;- hosts[i] } var input string fmt.Scanln(&amp;input) } </code></pre> <p><strong>OUTPUT:</strong></p> <pre><code>user@user-VirtualBox:~/go$ go run channel.go user1@111.79.154.111: " 09:46:40 up 86 days, 18:16, 0 users, load average: 5" user2@111.79.190.222: " 09:46:40 up 86 days, 17:27, 1 user, load average: 9" user1@111.79.154.111: DONE user2@111.79.190.222: DONE </code></pre> <p><strong>NOT WORKING - EXAMPLE WITH READING JSON DATA FILE:</strong></p> <pre><code>package main import ( "bytes" "fmt" "os/exec" "time" "encoding/json" "os" "sync" ) func connect(host string) { cmd := exec.Command("ssh", host, "uptime") var out bytes.Buffer cmd.Stdout = &amp;out err := cmd.Run() if err != nil { fmt.Println(err) } fmt.Printf("%s: %q ", host, out.String()) time.Sleep(time.Second * 2) fmt.Printf("%s: DONE ", host) } func listener(c chan string) { for { host := &lt;-c go connect(host) } } type Content struct { Username string `json:"username"` Ip string `json:"ip"` } func main() { var wg sync.WaitGroup var source []Content var hosts []string data := json.NewDecoder(os.Stdin) data.Decode(&amp;source) for _, value := range source { hosts = append(hosts, value.Username + "@" + value.Ip) } var c chan string = make(chan string) go listener(c) for i := 0; i &lt; len(hosts); i++ { wg.Add(1) c &lt;- hosts[i] defer wg.Done() } var input string fmt.Scanln(&amp;input) wg.Wait() } </code></pre> <p><strong>OUTPUT</strong></p> <pre><code>user@user-VirtualBox:~/go$ go run deploy.go &lt; hosts.txt user1@111.79.154.111: " 09:46:40 up 86 days, 18:16, 0 users, load average: 5" user2@111.79.190.222: " 09:46:40 up 86 days, 17:27, 1 user, load average: 9" user1@111.79.154.111 : DONE user2@111.79.190.222: DONE fatal error: all goroutines are asleep - deadlock! goroutine 1 [semacquire]: sync.runtime_Semacquire(0xc210000068) /usr/lib/go/src/pkg/runtime/sema.goc:199 +0x30 sync.(*WaitGroup).Wait(0xc210047020) /usr/lib/go/src/pkg/sync/waitgroup.go:127 +0x14b main.main() /home/user/go/deploy.go:64 +0x45a goroutine 3 [chan receive]: main.listener(0xc210038060) /home/user/go/deploy.go:28 +0x30 created by main.main /home/user/go/deploy.go:53 +0x30b exit status 2 user@user-VirtualBox:~/go$ </code></pre> <p><strong>HOSTS.TXT</strong></p> <pre><code>[ { "username":"user1", "ip":"111.79.154.111" }, { "username":"user2", "ip":"111.79.190.222" } ] </code></pre> </div>

无法让localhost连接到流浪汉中的docker

<div class="post-text" itemprop="text"> <p>I'm trying to build a local dev environment for GoLang.</p> <p>My environment would consist of a VirtualBox VM using ubuntu and inside I'd use docker-compose to build out my different pieces.</p> <p>All other pieces of my environment work, except for golang. </p> <p>When I attempt to get a simple hello world HTTP response it get back "ERR_SOCKET_NOT_CONNECTED" inside chrome. </p> <p>My vagrant file looks like </p> <pre><code>Vagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" port = 3000 config.vm.hostname = "vagrant-docker-example" config.vm.network(:forwarded_port, guest: port, host: port) config.vm.network(:forwarded_port, guest: 8080, host: 8080) config.vm.network(:forwarded_port, guest: 80, host: 4567) config.vm.provision :shell, inline: "apt-get update" config.vm.provision :docker config.vm.provision :docker_compose, env: { "PORT" =&gt; "#{port}" }, yml: ["/vagrant/docker-compose-base.yml","/vagrant/docker-compose.yml"], rebuild: true, project_name: "myproject", run: "always" end </code></pre> <p>and my docker-compose file looks like</p> <pre><code>app: build: ./ links: - redis ports: - "${PORT}:8080" nginx: image: nginx:latest ports: - 80:80 </code></pre> <p>finally my docker file looks like</p> <pre><code># Start from a Debian image with the latest version of Go installed # and a workspace (GOPATH) configured at /go. FROM golang # Copy the local package files to the container's workspace. ADD . $GOPATH/src/github.com/sinangedik/vagrant-docker-go-example #Build RUN go get github.com/tools/godep &amp;&amp;\ cd $GOPATH/src/github.com/sinangedik/vagrant-docker-go-example &amp;&amp;\ godep go build #Give the ownership to daemon RUN ["chown", "-R", "daemon", "."] USER daemon #Set the port ENV PORT 3000 # Document that the service listens on port 8080. EXPOSE 3000 CMD ["/go/src/github.com/sinangedik/vagrant-docker-go-example/vagrant-docker-go-example"] </code></pre> <p>What am I doing wrong here?</p> <p>the Vagrant call is being run inside windows 10.</p> </div>

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

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

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

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

CSDN:因博主近期注重写专栏文章(已超过150篇),订阅博主专栏人数在突增,近期很有可能提高专栏价格(已订阅的不受影响),提前声明,敬请理解!

CSDN:因博主近期注重写专栏文章(已超过150篇),订阅博主专栏人数在突增,近期很有可能提高专栏价格(已订阅的不受影响),提前声明,敬请理解! 目录 博客声明 大数据了解博主粉丝 博主的粉丝群体画像 粉丝群体性别比例、年龄分布 粉丝群体学历分布、职业分布、行业分布 国内、国外粉丝群体地域分布 博主的近期访问每日增量、粉丝每日增量 博客声明 因近期博主写专栏的文章越来越多,也越来越精细,逐步优化文章。因此,最近一段时间,订阅博主专栏的人数增长也非常快,并且专栏价

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

培训班出来的人后来都怎么样了?(二)

接着上回说,培训班学习生涯结束了。后面每天就是无休止的背面试题,不是没有头脑的背,培训公司还是有方法的,现在回想当时背的面试题好像都用上了,也被问到了。回头找找面试题,当时都是打印下来天天看,天天背。 不理解呢也要背,面试造飞机,上班拧螺丝。班里的同学开始四处投简历面试了,很快就有面试成功的,刚开始一个,然后越来越多。不知道是什么原因,尝到胜利果实的童鞋,不满足于自己通过的公司,嫌薪水要少了,选择...

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

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

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

工作八年,月薪60K,裸辞两个月,投简历投到怀疑人生!

近日,有网友在某职场社交平台吐槽,自己裸辞两个月了,但是找工作却让自己的心态都要崩溃了,全部无果,不是已查看无回音,就是已查看不符合。 “工作八年,两年一跳,裸辞两个月了,之前月薪60K,最近找工作找的心态崩了!所有招聘工具都用了,全部无果,不是已查看无回音,就是已查看不符合。进头条,滴滴之类的大厂很难吗???!!!投简历投的开始怀疑人生了!希望 可以收到大厂offer” 先来看看网...

97年世界黑客编程大赛冠军作品(大小仅为16KB),惊艳世界的编程巨作

这是世界编程大赛第一名作品(97年Mekka ’97 4K Intro比赛)汇编语言所写。 整个文件只有4095个字节, 大小仅仅为16KB! 不仅实现了3D动画的效果!还有一段震撼人心的背景音乐!!! 内容无法以言语形容,实在太强大! 下面是代码,具体操作看最后! @echo off more +1 %~s0|debug e100 33 f6 bf 0 20 b5 10 f3 a5...

不要再到处使用 === 了

我们知道现在的开发人员都使用 === 来代替 ==,为什么呢?我在网上看到的大多数教程都认为,要预测 JavaScript 强制转换是如何工作这太复杂了,因此建议总是使用===。这些都...

什么是a站、b站、c站、d站、e站、f站、g站、h站、i站、j站、k站、l站、m站、n站?00后的世界我不懂!

A站 AcFun弹幕视频网,简称“A站”,成立于2007年6月,取意于Anime Comic Fun,是中国大陆第一家弹幕视频网站。A站以视频为载体,逐步发展出基于原生内容二次创作的完整生态,拥有高质量互动弹幕,是中国弹幕文化的发源地;拥有大量超粘性的用户群体,产生输出了金坷垃、鬼畜全明星、我的滑板鞋、小苹果等大量网络流行文化,也是中国二次元文化的发源地。 B站 全称“哔哩哔哩(bilibili...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

MySQL性能优化(五):为什么查询速度这么慢

前期回顾: MySQL性能优化(一):MySQL架构与核心问题 MySQL性能优化(二):选择优化的数据类型 MySQL性能优化(三):深入理解索引的这点事 MySQL性能优化(四):如何高效正确的使用索引 前面章节我们介绍了如何选择优化的数据类型、如何高效的使用索引,这些对于高性能的MySQL来说是必不可少的。但这些还完全不够,还需要合理的设计查询。如果查询写的很糟糕,即使表结构再合理、索引再...

用了这个 IDE 插件,5分钟解决前后端联调!

点击上方蓝色“程序猿DD”,选择“设为星标”回复“资源”获取独家整理的学习资料!作者 |李海庆我是一个 Web 开发前端工程师,受到疫情影响,今天是我在家办公的第78天。开发了两周,...

大厂的 404 页面都长啥样?最后一个笑了...

每天浏览各大网站,难免会碰到404页面啊。你注意过404页面么?猿妹搜罗来了下面这些知名网站的404页面,以供大家欣赏,看看哪个网站更有创意: 正在上传…重新上传取消 腾讯 正在上传…重新上传取消 网易 淘宝 百度 新浪微博 正在上传…重新上传取消 新浪 京东 优酷 腾讯视频 搜...

【高并发】高并发秒杀系统架构解密,不是所有的秒杀都是秒杀!

网上很多的文章和帖子中在介绍秒杀系统时,说是在下单时使用异步削峰来进行一些限流操作,那都是在扯淡! 因为下单操作在整个秒杀系统的流程中属于比较靠后的操作了,限流操作一定要前置处理,在秒杀业务后面的流程中做限流操作是没啥卵用的。

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

Java14 新特性解读

Java14 已于 2020 年 3 月 17 号发布,官方特性解读在这里:https://openjdk.java.net/projects/jdk/14/以下是个人对于特性的中文式...

爬虫(101)爬点重口味的

小弟最近在学校无聊的很哪,浏览网页突然看到一张图片,都快流鼻血。。。然后小弟冥思苦想,得干一点有趣的事情python 爬虫库安装https://s.taobao.com/api?_ks...

疫情后北上广深租房价格跌了吗? | Alfred数据室

去年3月份我们发布了《北上广深租房图鉴》(点击阅读),细数了北上广深租房的各种因素对租房价格的影响。一年过去了,在面临新冠疫情的后续影响、城市尚未完全恢复正常运转、学校还没开学等情况下...

面试官给我挖坑:a[i][j] 和 a[j][i] 有什么区别?

点击上方“朱小厮的博客”,选择“设为星标”后台回复&#34;1024&#34;领取公众号专属资料本文以一个简单的程序开头——数组赋值:int LEN = 10000; int[][] ...

又一起程序员被抓事件

就在昨天互联网又发生一起让人心酸的程序员犯罪事件,著名的百度不限速下载软件 Pandownload PC 版作者被警方抓获。案件大致是这样的:软件的作者不仅非法盗取用户数据,还在QQ群进...

应聘3万的职位,有必要这么刁难我么。。。沙雕。。。

又一次被面试官带到坑里面了。面试官:springmvc用过么?我:用过啊,经常用呢面试官:springmvc中为什么需要用父子容器?我:嗯。。。没听明白你说的什么。面试官:就是contr...

太狠了,疫情期间面试,一个问题砍了我5000!

疫情期间找工作确实有点难度,想拿到满意的薪资,确实要点实力啊!面试官:Spring中的@Value用过么,介绍一下我:@Value可以标注在字段上面,可以将外部配置文件中的数据,比如可以...

Intellij IDEA 美化指南

经常有人问我,你的 IDEA 配色哪里搞的,我会告诉他我自己改的。作为生产力工具,不但要顺手而且更要顺眼。这样才能快乐编码,甚至降低 BUG 率。上次分享了一些 IDEA 有用的插件,反...

【相亲】96年程序员小哥第一次相亲,还没开始就结束了

颜值有点高,条件有点好

太厉害了,终于有人能把TCP/IP 协议讲的明明白白了

一图看完本文 一、 计算机网络体系结构分层 计算机网络体系结构分层 计算机网络体系结构分层 不难看出,TCP/IP 与 OSI 在分层模块上稍有区别。OSI 参考模型注重“通信协议必要的功能是什么”,而 TCP/IP 则更强调“在计算机上实现协议应该开发哪种程序”。 二、 TCP/IP 基础 1. TCP/IP 的具体含义 从字面意义上讲,有人可能会认为...

腾讯面试题: 百度搜索为什么那么快?

我还记得去年面腾讯时,面试官最后一个问题是:百度/google的搜索为什么那么快? 这个问题我懵了,我从来没想过,搜素引擎的原理是什么 然后我回答:百度爬取了各个网站的信息,然后进行排序,当输入关键词的时候进行文档比对……巴拉巴拉 面试官:这不是我想要的答案 我内心 这个问题我一直耿耿于怀,终于今天,我把他写出来,以后再问,我直接把这篇文章甩给他!!! 两个字:倒排,将贯穿整篇文章,也是面试官...

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问