VS2015 用GIT来安装EF

我看到一朋友通过VS2015里的GIT 安装最新版的EF。。 但是我刚玩2015。。发现找不到git在哪里,这么安装EF呢?


请安装 vs2015 git插件
VS2015本身是不支持 GIF 的。

Csdn user default icon
如何在不使用go get的情况下安装Go应用?

<div class="post-text" itemprop="text"> <p>I'm trying to install a specific version of CockroachDB on my ubuntu machine. I followed the guide on the site and after downloading ~200MB, the latest version is installed :</p> <pre><code>$ go get -d github.com/cockroachdb/cockroach $ cd $GOPATH/src/github.com/cockroachdb/cockroach $ git checkout beta-20170330 $ make install </code></pre> <p>One issue is that <code>/src/github.com/cockroachdb/cockroach</code> is 300MB while if I download last version from the GitHub page it is only 30MB. Why?</p> <p>I used <code>git checkout v0.1-alpha</code> to switch to the version I want :</p> <pre><code>warning: unable to rmdir vendor: Directory not empty Previous HEAD position was f0f5783... Merge pull request #14448 from BramGruneir/vendorsnappy HEAD is now at 26088f8... Merge pull request #3475 from mrtracy/mtracy/code_review_feedback </code></pre> <p>But it fails after running <code>make install</code> :</p> <pre><code>github.com/agtorre/gocolorize 99fea4bc9517 [checkout f42b554bf7f0] github.com/biogo/store 913427a1d5e8 [checkout 3b4c041f52c2] github.com/cockroachdb/c-lz4 834d3303c9e8 [checkout c40aaae2fc50] github.com/cockroachdb/c-protobuf 323984796a7b [checkout 6a18bfcdd516] github.com/cockroachdb/c-rocksdb 0dd42399d1f0 [checkout bf15ead80bdc] github.com/cockroachdb/c-snappy c0cd3c9ce92f [checkout 5c6d0932e0ad] github.com/cockroachdb/yacc 7c99dfd2164a [get checkout 443154b1852a] github.com/coreos/etcd 38a914973544 [checkout 0eb46eb1457b] github.com/cpuguy83/go-md2man a65d4d2de4d5 [get checkout 71acacd42f85] github.com/docker/docker 6311e9fc9d34 [get checkout 5e0283effa73] github.com/elazarl/go-bindata-assetfs 30f82fa23fd8 [checkout d5cac425555c] github.com/go-sql-driver/mysql 9dee4ca50b83 [get checkout d512f204a577] github.com/gogo/protobuf c0656edd0d9e [checkout 8658879224bd] github.com/golang/lint cb00e5669539 [get checkout 32a87160691b] github.com/google/btree 316fb6d3f031 [checkout cc6329d4279e] github.com/gordonklaus/ineffassign f0c5cfc1817d [get checkout 507e48671a07] github.com/inconshreveable/mousetrap 76626ae9c91c [get OK] github.com/jteeuwen/go-bindata a0ff2567cfb7 [get OK] github.com/julienschmidt/httprouter 6f3f3919c878 [checkout f30ab90cccbd] github.com/kisielk/errcheck 23699b7e2cbf [get checkout 12fd1ab9811e] github.com/kisielk/gotool 0de1eaf82fa3 [get checkout 58a7a198f2ec] github.com/kr/pretty cfb55aafdaf3 [get checkout e6ac2fc51e89] github.com/kr/text 7cafcd837844 [get checkout bb797dc4fb83] github.com/lib/pq 2704adc878c2 [checkout 11fc39a580a0] github.com/mattn/go-runewidth 14207d285c6c [checkout d96d1bd051f2] github.com/mibk/dupl 3447d9b0cb5a [get checkout 47b66d6a523f] github.com/montanaflynn/stats f8cd06f93c6c [checkout 4dd27fe9ac79] github.com/olekukonko/tablewriter febf2d34b54a [checkout 333c0610de34] github.com/opennota/check 11e2eec79ec4 [get checkout 591428223a6a] github.com/peterh/liner 88609521dc4b [checkout 4d47685ab2fd] github.com/rcrowley/go-metrics 1f30fe9094a5 [checkout 7839c01b09d2] github.com/robfig/glock 39b969c32281 [checkout cb3c3ec56de9] github.com/russross/blackfriday 5f33e7b78783 [get checkout d18b67ae0afd] github.com/samalba/dockerclient a30362618471 [get checkout 4656b1bc6cbc] github.com/shurcooL/sanitized_anchor_name 1dba4b3954bc [get checkout 10ef21a441db] github.com/spf13/cobra 7aeaa2cce6ae [checkout ee6224d01f6a] github.com/spf13/pflag d16db1e50e33 [checkout 08b1a584251b] github.com/tebeka/go2xunit 13c29c7515e6 [get checkout 0519fcc9b45b] github.com/termie/go-shutil bcacb06fecae [get OK] golang.org/x/crypto 88915ccf7aeb [checkout 7b85b097bf75] golang.org/x/net ffcf1bedda3b [checkout 21af302bb527] golang.org/x/text f4b4367115ec [checkout 00e205363f74] golang.org/x/tools 620ecdb8d794 [checkout 1cdaff4a02c5] gopkg.in/yaml.v1 9f9df34309c0 [OK] cmd github.com/cockroachdb/c-protobuf/cmd/protoc [built] cmd github.com/cockroachdb/cockroach/protoc-gen-gogoroach [error exit status 2] github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/gogoproto github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/vanity github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/testgen github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/defaultcheck github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/embedcheck github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/enumstringer github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/marshalto github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/oneofcheck github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/populate github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/unmarshal github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/compare github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/description github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/equal github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/face github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/gostring github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/size github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/stringer github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/plugin/union github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc github.com/cockroachdb/cockroach/vendor/github.com/gogo/protobuf/vanity/command github.com/cockroachdb/cockroach/protoc-gen-gogoroach # github.com/cockroachdb/cockroach/protoc-gen-gogoroach protoc-gen-gogoroach/main.go:12: undefined: vanity.NotInPackageGoogleProtobuf go install -tags '' -ldflags '-X "github.com/cockroachdb/cockroach/util.buildTag=alpha-6447-g26088f8" -X "github.com/cockroachdb/cockroach/util.buildTime=2017/04/03 11:46:56" -X "github.com/cockroachdb/cockroach/util.buildDeps=github.com/cockroachdb/c-lz4:c40aaae2fc50293eb8750b34632bc3efe813e23f github.com/cockroachdb/cockroach:26088f81e5ecfb2fd63f8f15f524102c9a0c1c05 github.com/cockroachdb/cockroach/vendor:17711805119083543d94edac10e423260a597426 github.com/julienschmidt/httprouter:f30ab90cccbd5171771d26b6557d3c2f49e047a6 github.com/peterh/liner:4d47685ab2fd2dbb46c66b831344d558bc4be5b9 gopkg.in/yaml.v1:9f9df34309c04878acc86042b16630b0f696e1de"' # github.com/cockroachdb/cockroach/cli cli/sql_util.go:148: table.Append(row) used as value Makefile:71: recipe for target 'install' failed make: *** [install] Error 2 </code></pre> <p>I'd really appreciate if I could install the specific version I downloaded from GitHub because it's smaller in size and it has a cleaner structure. But it's missing some files such as <code>.go-version</code> <code>.bootstrap</code> and <code>fatal: Not a git repository (or any of the parent directories): .git</code></p> <p>Does <code>go get</code> insert these files itself? How do I initialize them?</p> <p>Shouldn't there be a better way to do this, without having to download an extra 100MB everytime I run <code>make install</code>?</p> </div>

在Mac OS X El Capitan上安装php56(不赞成使用自制程序)

<div class="post-text" itemprop="text"> <p>I have a dev environment on OS X El Capitan: - homebrew - nginx - php56 - mysql - etc.</p> <p>Homebrew no longer support El Capitan, also no support php56. But my frontend at now not compatible with php7. I'm input <code>brew update &amp;&amp; brew upgrade</code>and output:</p> <pre><code>==&gt; Upgrading 7 outdated packages: git 2.20.1 -&gt; 2.21.0, httpd 2.4.37_1 -&gt; 2.4.38, mysql 5.7.22 -&gt; 8.0.15, nghttp2 1.35.1 -&gt; 1.36.0, nginx 1.15.8 -&gt; 1.15.9, openssl@1.1 1.1.1a -&gt; 1.1.1b, pcre 8.42 -&gt; 8.43 ==&gt; Upgrading openssl@1.1 ... openssl@1.1 is keg-only, which means it was not symlinked into /usr/local, because openssl/libressl is provided by macOS so don't link an incompatible version. ... ... ==&gt; Upgrading nginx ==&gt; Installing dependencies for nginx: pcre ==&gt; Reinstalling 1 broken dependent from source: curl-openssl ... </code></pre> <p>After that php does not start. I rollback to previous version all updated formulas, uninstall php. When reinstalling php56:</p> <pre><code>==&gt; Downloading https://php.net/get/php-5.6.39.tar.xz/from/this/mirror Already downloaded: ~/Library/Caches/Homebrew/downloads/6bf39b5c5c754a031a92474c066074442448c1331f50f80882ef744cf17d8fa3--php-5.6.39.tar.xz ==&gt; Patching patching file acinclude.m4 Hunk #1 succeeded at 444 (offset 3 lines). Hunk #2 succeeded at 459 (offset 3 lines). Hunk #3 succeeded at 494 (offset 3 lines). Hunk #4 succeeded at 506 (offset 3 lines). Hunk #5 succeeded at 2500 with fuzz 2 (offset 81 lines). patching file Zend/zend_compile.h patching file Zend/zend_execute.h ==&gt; ./buildconf --force Last 15 lines from ~/Library/Logs/Homebrew/php@5.6/01.buildconf: 2019-02-28 14:55:01 +0300 ./buildconf --force Forcing buildconf Removing configure caches buildconf: checking installation... buildconf: autoconf not found. You need autoconf version 2.59 or newer installed to build PHP from Git. make: *** [buildmk.stamp] Error 1 make: *** Waiting for unfinished jobs.... </code></pre> <p>autoconf installed</p> <p>Any suggestions pls?</p> </div>


<div class="post-text" itemprop="text"> <p>Context: <a href="https://github.com/fusspawn/tserver/blob/master/app/controllers/gorp.go" rel="nofollow">https://github.com/fusspawn/tserver/blob/master/app/controllers/gorp.go</a></p> <p>As part of trying to get gorm setup I tried to convert the standard revel/gorp examples.</p> <p>However. even having the Begin(),Commit(),Rollback() methods defined is enough to cause go to panic.</p> <pre><code> TRACE 2015/09/06 17:37:47 harness.go:126: Rebuild INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir tmp INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir routes INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir tmp INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir routes TRACE 2015/09/06 17:37:47 build.go:151: Exec: [/usr/bin/git --git- dir=/home/fusspawn/go/src/github.com/fusspawn/tserver/.git describe --always -- dirty] TRACE 2015/09/06 17:37:47 build.go:94: Exec: [/usr/bin/go build -ldflags -X github.com/fusspawn/tserver/app.APP_VERSION "git-2588ef1" -tags -o /ho me/fusspawn/go/bin/revel.d/github.com/fusspawn/tserver/tserver github.com/fusspawn/tserver/app/tmp] TRACE 2015/09/06 17:39:14 app.go:56: Exec app: /home/fusspawn/go/bin/revel.d/github.com/fusspawn/tserver/tserver [/home/fusspawn/go/bin/revel.d/git hub.com/fusspawn/tserver/tserver -port=46276 - importPath=github.com/fusspawn/tserver -runMode=dev] INFO 2015/09/06 17:39:14 revel.go:329: Loaded module static INFO 2015/09/06 17:39:14 revel.go:329: Loaded module testrunner INFO 2015/09/06 17:39:14 revel.go:206: Initialized Revel v0.12.0 (2015-03-25) for &gt;= go1.3 INFO 2015/09/06 17:39:14 main.go:30: Running revel server TRACE 2015/09/06 17:39:14 controller.go:402: Registered controller: App panic: reflect: call of reflect.Value.Type on zero Value goroutine 1 [running]: runtime.panic(0x88cec0, 0xc21011b7a0) /usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6 reflect.Value.Type(0x0, 0x0, 0x0, 0x0, 0x0) /usr/lib/go/src/pkg/reflect/value.go:1698 +0x79 github.com/revel/revel.findControllers(0x7f365698bea8, 0x9186e0, 0x0, 0x0, 0x0) /home/fusspawn/go/src/github.com/revel/revel/controller.go:321 +0x25a github.com/revel/revel.RegisterController(0x9172a0, 0x0, 0xc2100c4bf0, 0x2, 0x2) /home/fusspawn/go/src/github.com/revel/revel/controller.go:400 +0x1f3 main.main() /home/fusspawn/go/src/github.com/fusspawn/tserver/app/tmp/main.go:150 +0x141b TRACE 2015/09/06 17:39:14 controller.go:402: Registered controller: GormController TRACE 2015/09/06 17:39:14 controller.go:402: Registered controller: Static TRACE 2015/09/06 17:39:14 controller.go:402: Registered controller: TestRunner </code></pre> <p>Commenting out the method definitions will stop the panic. I cant seem to understand how not calling these methods (note the revel.InterceptMethod calls are commented out) can make the panic happen :/ </p> </div>

ci / cd中断go get测试

<div class="post-text" itemprop="text"> <p>I'm trying to prebuild docker image so that my ci/cd pipeline would go much faster and there is problem with go</p> <p>I have tried reseting cache and change env variables but no one worked for me</p> <pre><code>Fetching https://git.dar.kz/forte-market/domain?go-get=1 Fetching https://gopkg.in/olivere/elastic.v5?go-get=1 go: finding github.com/sirupsen/logrus v1.4.2 go: finding github.com/modern-go/reflect2 v1.0.1 go: finding github.com/xanzy/go-gitlab v0.20.1 go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd go: finding github.com/tealeg/xlsx v1.0.3 go: finding github.com/gorilla/mux v1.7.3 go: finding github.com/prometheus/client_golang v1.1.0 go: finding github.com/satori/go.uuid v1.2.0 Parsing meta tags from https://gopkg.in/olivere/elastic.v5?go-get=1 (status code 200) get "gopkg.in/olivere/elastic.v5": found meta tag get.metaImport{Prefix:"gopkg.in/olivere/elastic.v5", VCS:"git", RepoRoot:"https://gopkg.in/olivere/elastic.v5"} at https://gopkg.in/olivere/elastic.v5?go-get=1 go: finding gopkg.in/olivere/elastic.v5 v5.0.82 Parsing meta tags from https://git.dar.kz/forte-market/domain?go-get=1 (status code 200) get "git.dar.kz/forte-market/domain": found meta tag get.metaImport{Prefix:"git.dar.kz/forte-market/domain", VCS:"git", RepoRoot:"https://git.dar.kz/forte-market/domain.git"} at https://git.dar.kz/forte-market/domain?go-get=1 go: finding git.dar.kz/forte-market/domain v1.2.0 go: git.dar.kz/forte-market/domain@v1.2.0: unknown revision v1.2.0 go: finding github.com/go-kit/kit v0.9.0 go: finding github.com/djumanoff/amqp v1.0.4 Fetching https://git.dar.kz/forte-market/acl?go-get=1 Parsing meta tags from https://git.dar.kz/forte-market/acl?go-get=1 (status code 200) get "git.dar.kz/forte-market/acl": found meta tag get.metaImport{Prefix:"git.dar.kz/forte-market/acl", VCS:"git", RepoRoot:"https://git.dar.kz/forte-market/acl.git"} at https://git.dar.kz/forte-market/acl?go-get=1 go: finding git.dar.kz/forte-market/acl v1.0.4 go: finding github.com/sony/sonyflake v1.0.0 go: git.dar.kz/forte-market/acl@v1.0.4: unknown revision v1.0.4 go: finding github.com/caarlos0/env v3.5.0+incompatible go: finding github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6 go: finding github.com/lestrrat-go/libxml2 v0.0.0-20190724003929-faf2a4a99869 go: error loading module requirements ERROR: Job failed: exit code 1 </code></pre> </div>


<div class="post-text" itemprop="text"> <p>Not sure if this is the right place to ask.</p> <p>Say I write a shell that takes stdin input, filters this input so let's say only certain commands like</p> <ul> <li>ls (list contents of binary directory and subdirectory)</li> <li>update (git clone)</li> <li>build (go build)</li> <li>test (go test)</li> <li>start (systemctl start this.service only)</li> <li>stop (systemctl stop this.service only)</li> <li>running (is the binary being executed and with how many GOMAXPROCS?)</li> <li>usage (memory, cpu usage)</li> <li>gensvc (generate .service file)</li> <li>exit (leave shell/logout)</li> </ul> <p>work, you guessed it, I'm trying to give a user only very limited maintenance access over ssh.</p> <p>Say I'm careful with <code>\0</code> (I'd write it in Go anyway using bufio.Scanner)</p> <p>Is there any way to stop the running shell and execute /bin/sh or similar or any way to get around this shell?</p> <p>The idea is a user should push their stuff via git to a bare repo, this repo is cloned to the filesystem to a certain directory, then go build is called and the binary is ran with a systemd .service file that is generated previously.</p> <p>Thinking logically, if the user is only able to write certain strings that are accepted, no there is no way. But maybe you know of one, some ctrl+z witchcraft ;) or whatever.</p> <p>The only attack surface is the input string or rather bytes. Of course the user could git push a program that builds its own shell or runs certain commands, but that's out of scope (I would remove capabilities with systemd and restrict device access and forbid anything but the connection to the database server, private tmp and all, namespace and subnamespace it TODO)</p> <p>The only problem I see is git pushing but I'm sure I could work around that in a git only mode argv and adding it to ~/.ssh/authorized_keys. something like <code>lish gitmode</code> and execute stdin commands if they start with git or something like it.</p> <p>Example:</p> <p><a href="https://gist.github.com/dalu/ce2ef43a2ef5c390a819" rel="nofollow">https://gist.github.com/dalu/ce2ef43a2ef5c390a819</a></p> </div>


刚接触C#,对正则表达式不熟,谁能帮我看看这个要怎么做?我有如下字符串,怎么写正则表达式获取到我想要的值str3有如下3种形式: str3 = ";a=commit;h=e7c4dd13ad4f481f0d45300e72fadfcb03a2cbb1"; str3 = ";a=commit;h=322df00e744dbf90006da4da563f8b5ef4d323d4"; str3 = ";a=commit;h=ed61c57a95a521699d6b00055ee64c5a6db416c0"; 我想得到: 1.这一长串本身; 2.p=和.git之间的; 3.h=之后的那串值; 请高手指点,万分感谢

无法从dist下载symfony / finder:解压缩ZIP文件时出错。 腐败文件?

<div class="post-text" itemprop="text"> <p>I'm trying to clone a Laravel 4.1 project onto a Vagrant 1.6.3 VM, but when I try to install the composer dependencies by running <code>composer install</code> I get the following:</p> <pre><code> - Installing symfony/finder (2.4.x-dev 4a15fc1) Downloading: 100% Failed to download symfony/finder from dist: There was an error extracting the Z IP file. Corrupt file? Now trying to download from source - Installing symfony/finder (2.4.x-dev 4a15fc1) Cloning 4a15fc12b56ca06d3a6bf32ef8f603ccb421d846 [RuntimeException] Failed to execute git checkout "4a15fc12b56ca06d3a6bf32ef8f603ccb421d846" &amp;&amp; g it reset --hard "4a15fc12b56ca06d3a6bf32ef8f603ccb421d846" error: The following untracked working tree files would be overwritten by chec kout: .gitignore Adapter/AbstractAdapter.php Adapter/AbstractFindAdapter.php Adapter/AdapterInterface.php Adapter/BsdFindAdapter.php Adapter/GnuFindAdapter.php Adapter/PhpAdapter.php CHANGELOG.md Comparator/Comparator.php Comparator/DateComparator.php Comparator/NumberComparator.php Exception/AccessDeniedException.php Exception/AdapterFailureException.php Exception/ExceptionInterface.php Exception/OperationNotPermitedException.php Exception/ShellCommandFailureException.php Expression/Expression.php Expression/Glob.php Expression/Regex.php Expression/ValueInterface.php Finder.php Glob.php Iterator/CustomFilterIterator.php Iterator/DateRangeFilterIterator.php Iterator/DepthRangeFilterIterator.php Iterator/ExcludeDirectoryFilterIterator.php Iterator/FilePathsIterator.php Iterator/FileTypeFilterIterator.php Iterator/FilecontentFilterIterator.php Iterator/FilenameFilterIterator.php Iterator/FilterIterator.php Iterator/MultiplePcreFilterIterator.php Iterator/PathFilterIterator.php Iterator/RecursiveDirectoryIterator.php Iterator/SizeRangeFilterIterator.php Iterator/SortableIterator.php LICENSE README.md Shell/Command.php Shell/Shell.php SplFileInfo.php Tests/Comparator/ComparatorTest.php Tests/Comparator/DateComparatorTest.php Tests/Comparator/NumberComparatorTest.php Tests/Expression/ExpressionTest.php Tests/Expression/GlobTest.php Tests/Expression/RegexTest.php Tests/FakeAdapter/DummyAdapter.php Tests/FakeAdapter/FailingAdapter.php Tests/FakeAdapter/NamedAdapter.php Tests/FakeAdapter/UnsupportedAdapter.php Tests/FinderTest.php Tests/Fixtures/A/B/C/abc.dat Tests/Fixtures/A/B/ab.dat Tests/Fixtures/A/a.dat Tests/Fixtures/copy/A/B/C/abc.dat.copy Tests/Fixtures/copy/A/B/ab.dat.copy Tests/Fixtures/copy/A/a.dat.copy Tests/Fixtures/dolor.txt Tests/Fixtures/ipsum.txt Tests/Fixtures/lorem.txt Tests/Fixtures/one/a Tests/Fixtures/one/b/c.neon Tests/Fixtures/one/b/d.neon Please move or remove them before you can switch branches. Aborting install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-p lugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--ver bose] [-o|--optimize-autoloader] [packages1] ... [packagesN] </code></pre> <p>I tried some random stuff like clearing my .gitignore file and deleting the vendor/syfony/Finder directory (which it seems to be failing on) but no luck. What could be causing this and how can I fix it? </p> </div>

PHP Composer自动加载不起作用,没有启动类

<div class="post-text" itemprop="text"> <p>I'm trying to use Composer within PHP. I've installed composer within my project directory, then installed some needed PHP classes/methods with cli:</p> <pre><code>php composer.phar require ahsankhatri/firestore-php php composer.phar require guzzlehttp/guzzle </code></pre> <p>Great, this worked fine!</p> <p>After installing succesfully, I optimized the lockfile with:</p> <pre><code>php composer.phar dump-autoload --optimize </code></pre> <p>101 classes where added (cli returned this message).</p> <p>Now I added the autoloader to my PHP file, I thought this would be easy... just add the autoload.php</p> <pre><code>&lt;?php require 'vendor/autoload.php'; //print_r(get_declared_classes()); $firestoreClient = new FirestoreClient('Dimo-233713', ' AIzaSyCNHz_EbF13KuAvEnlBIto_2n1eIqkCnzk', [ 'database' =&gt; 'test', ]); </code></pre> <p>But, when I run this script on my XAMPP, the PHP log says:</p> <pre><code>[28-Mar-2019 13:27:33 Europe/Berlin] PHP Fatal error: Uncaught Error: Class 'FirestoreClient' not found in /Users/***/Documents/Websites/xampp/domare.nl/htdocs/subdomains/portal/firestore.php:6 Stack trace: #0 {main} thrown in /Users/***/Documents/Websites/xampp/domare.nl/htdocs/subdomains/portal/firestore.php on line 6 </code></pre> <p>Class cannot be found. I dumped all classes as you can see at the commented line. But there is no class loaded I requested with composer. Not one of the 101 classes...</p> <p>What is wrong here?</p> <p>Working with PHPStorm. Running on XAMPP with PHP7.2.4</p> <p>And here is the Composer.json file</p> <pre><code>{ "require": { "guzzlehttp/guzzle": "^6.3", "ahsankhatri/firestore-php": "^2.0" } } </code></pre> <p>And this is the composer.lock file's json</p> <pre><code>{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "caedd171718e9452e0e742dcd84f2235", "packages": [ { "name": "ahsankhatri/firestore-php", "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/ahsankhatri/firestore-php.git", "reference": "ecdd92bdcb3f00c0b94e0e1909ac104fe20b1eb8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/ahsankhatri/firestore-php/zipball/ecdd92bdcb3f00c0b94e0e1909ac104fe20b1eb8", "reference": "ecdd92bdcb3f00c0b94e0e1909ac104fe20b1eb8", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "guzzlehttp/guzzle": "~6.0|~5.0|~4.0", "php": "&gt;=5.6.6" }, "require-dev": { "phpunit/phpunit": "5.7" }, "type": "library", "autoload": { "psr-4": { "MrShan0\\PHPFirestore\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Ahsaan Muhammad Yousuf", "email": "ahsankhatri1992@gmail.com", "homepage": "https://ahsaan.me", "role": "Developer" } ], "description": "Firestore PHP Client", "homepage": "https://github.com/ahsankhatri/firestore-php", "keywords": [ "firebase", "firestore", "google", "php" ], "time": "2019-02-25T13:27:14+00:00" }, { "name": "guzzlehttp/guzzle", "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.4", "php": "&gt;=5.5" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.3-dev" } }, "autoload": { "files": [ "src/functions_include.php" ], "psr-4": { "GuzzleHttp\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" } ], "description": "Guzzle is a PHP HTTP client library", "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", "rest", "web service" ], "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, "require": { "php": "&gt;=5.5.0" }, "require-dev": { "phpunit/phpunit": "^4.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" } ], "description": "Guzzle promises library", "keywords": [ "promise" ], "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": "&gt;=5.4.0", "psr/http-message": "~1.0", "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.5-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, { "name": "Tobias Schultze", "homepage": "https://github.com/Tobion" } ], "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", "psr-7", "request", "response", "stream", "uri", "url" ], "time": "2018-12-04T20:46:45+00:00" }, { "name": "psr/http-message", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { "php": "&gt;=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", "psr", "psr-7", "request", "response" ], "time": "2016-08-06T14:39:51+00:00" }, { "name": "ralouphie/getallheaders", "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/ralouphie/getallheaders.git", "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", "shasum": "" }, "require": { "php": "&gt;=5.3" }, "require-dev": { "phpunit/phpunit": "~3.7.0", "satooshi/php-coveralls": "&gt;=1.0" }, "type": "library", "autoload": { "files": [ "src/getallheaders.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Ralph Khattar", "email": "ralph.khattar@gmail.com" } ], "description": "A polyfill for getallheaders.", "time": "2016-02-11T07:05:27+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": [], "platform-dev": [] } </code></pre> </div>


<div class="post-text" itemprop="text"> <p>I'm using echo to build a web app for dokku management. It has a url router to handle <a href="http://dokku.viewdocs.io/dokku/deployment/methods/tar/#deploying-via-stdin" rel="nofollow noreferrer">tarfile deploying</a> and my handler is bellow: package routers</p> <pre><code>import ( "fmt" "github.com/labstack/echo" "io" "net/http" "os/exec" ) // deploy app via tar file func deployTarApp(c echo.Context) error { name := c.Param("name") file, ef := c.FormFile("file") if ef != nil || file == nil { return c.NoContent(http.StatusBadRequest) } tempfile, et := file.Open() if et != nil { return c.JSON(http.StatusInternalServerError, et) } cmd := exec.Command(DokkuPath, "tar:in", name) stdin, err := cmd.StdinPipe() if err != nil { return c.JSON(http.StatusInternalServerError, err) } go func() { defer stdin.Close() io.Copy(stdin, tempfile) }() out, e := cmd.CombinedOutput() if e != nil { fmt.Println(string(out), e) return c.JSON(http.StatusInternalServerError, e) } return c.NoContent(http.StatusOK) } </code></pre> <p>First get the form file, then copy it to stdin, then run <code>dokku tar:in app-name</code>. But the code throws an error</p> <pre><code>/var/lib/dokku/plugins/available/git/functions: line 114: /home/dokku/node-sample/refs/heads/master: No such file or directory exit status 128 </code></pre> <p>What is the problem with the handler? I am new to golang, so I am not so familiar with it. Thanks for your help.</p> </div>


<div class="post-text" itemprop="text"> <p>We are running redis on our production platform. Redis runs fine on it but every now and then it starts to build up memory and then will eventually crash out.</p> <p>We cant seem to pinpoint what is happening. This happens once a week. During the rest of the week its running with max of 400mb memory.</p> <p>Here is the redis-cli info all:</p> <pre><code># Server redis_version:2.8.4 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:645b61b5aa39f6b1 redis_mode:standalone os:Linux 3.13.0-170-generic x86_64 arch_bits:64 multiplexing_api:epoll gcc_version:4.8.4 process_id:14311 run_id:ec45c8262378b81c977cd8ef1f1466872601a72b tcp_port:6379 uptime_in_seconds:174217 uptime_in_days:2 hz:10 lru_clock:680264 config_file:/etc/redis/redis.conf # Clients connected_clients:4 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0 # Memory used_memory:4516218008 used_memory_human:4.21G used_memory_rss:4007305216 used_memory_peak:4522107864 used_memory_peak_human:4.21G used_memory_lua:33792 mem_fragmentation_ratio:0.89 mem_allocator:jemalloc-3.5.1 # Persistence loading:0 rdb_changes_since_last_save:3095 rdb_bgsave_in_progress:0 rdb_last_save_time:1558694950 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:9 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:ok # Replication role:master connected_slaves:0 master_repl_offset:0 repl_backlog_active:0 repl_backlog_size:1048576 repl_backlog_first_byte_offset:0 repl_backlog_histlen:0 # CPU used_cpu_sys:1122.99 used_cpu_user:422.74 used_cpu_sys_children:20.35 used_cpu_user_children:162.11 # Commandstats cmdstat_get:calls=11786294,usec=83965773,usec_per_call=7.12 cmdstat_set:calls=100000,usec=257525,usec_per_call=2.58 cmdstat_setex:calls=1462233,usec=90698334,usec_per_call=62.03 cmdstat_del:calls=16950,usec=105826,usec_per_call=6.24 cmdstat_lpush:calls=100000,usec=241470,usec_per_call=2.41 cmdstat_select:calls=1412415,usec=5822129,usec_per_call=4.12 cmdstat_keys:calls=1,usec=7307,usec_per_call=7307.00 cmdstat_dbsize:calls=2,usec=7,usec_per_call=3.50 cmdstat_info:calls=152,usec=18292,usec_per_call=120.34 cmdstat_monitor:calls=5,usec=18,usec_per_call=3.60 cmdstat_ttl:calls=3,usec=25,usec_per_call=8.33 cmdstat_config:calls=3,usec=69,usec_per_call=23.00 cmdstat_slowlog:calls=1,usec=7,usec_per_call=7.00 # Keyspace db0:keys=24429,expires=24425,avg_ttl=37811496 </code></pre> <p>We've read about solutions but dont want to implement because we are on the fence as to what to try first. When we clear out redis db when this is happening it starts to build up again.</p> </div>

golang:导入gin-gonic / gin时,macOS上的alpine docker容器抛出“ go.string的无效符号版本”

<div class="post-text" itemprop="text"> <p>I am trying to run a very simple go/gin program on golang:alpine docker image. This fails to run/build.</p> <p>Run container:</p> <pre><code>docker run -it --rm golang:1.10.1-alpine sh </code></pre> <p>In the container paste:</p> <pre><code>apk update &amp;&amp; apk add git gcc musl-dev go get github.com/gin-gonic/gin cat &lt;&lt;EOT &gt; src/main.go package main import _ "github.com/gin-gonic/gin" func main() { } EOT go run src/main.go </code></pre> <p>The error:</p> <pre><code># command-line-arguments 2018/04/06 18:07:33 invalid symbol version for "go.string.\"aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a3855\xdb\x0f\x849\x0e\x00\x00H\x8b[\bH\x83\xfb\x01\x0f\x8f\x17 \x00\x00H\x8bH H\x85\xc9\x0f\x84\x01": -7 </code></pre> <hr> <p>Host Machine: <code>macOS High Sierra 10.13.3, MacBook Pro Mid 2014, Intel i5</code> </p> <p>Docker version: </p> <pre><code>Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24 Built: Wed Mar 21 23:06:22 2018 OS/Arch: darwin/amd64 Experimental: false Orchestrator: swarm Server: Engine: Version: 18.03.0-ce API version: 1.37 (minimum version 1.12) Go version: go1.9.4 Git commit: 0520e24 Built: Wed Mar 21 23:14:32 2018 OS/Arch: linux/amd64 Experimental: false </code></pre> <hr> <p>This works <strong>without error on golang/stretch</strong> image, though:</p> <pre><code>✗ dk run -it --rm golang:1.10.1-stretch bash 11:24AM root@5d98f42504c2:/go# go get github.com/gin-gonic/gin root@5d98f42504c2:/go# root@5d98f42504c2:/go# cat &lt;&lt;EOT &gt; src/main.go &gt; package main &gt; import _ "github.com/gin-gonic/gin" &gt; func main() { &gt; } &gt; EOT root@5d98f42504c2:/go# root@5d98f42504c2:/go# go run src/main.go root@5d98f42504c2:/go# </code></pre> <hr> <p>What could be going wrong with alpine? Any suggestion is appreciated.</p> <hr> <p><strong>More Information</strong></p> <p>Same error with CGO disabled.</p> <p>This is a build time failure and with -x option fails at:</p> <pre><code>EOF mkdir -p $WORK/b001/exe/ cd . /usr/local/go/pkg/tool/linux_amd64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -buildmode=exe -buildid=UZcMyOX9lILP9hahS-FF/kCN0nlKO7qaS5D1mwkHf/i8lsdHfkhJNsud-tI68Q/UZcMyOX9lILP9hahS-FF -extld=gcc /root/.cache/go-build/55/55d1e3d2979a75ff5a13bc75c855482f90c32615d3b9e9d42ed096051efec200-d # command-line-arguments 2018/04/06 21:28:17 invalid symbol version for "go.string.\"aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e0 82542a3855\xdb\x0f\x849\x0e\x00\x00H\x8b[\bH\x83\xfb\x01\x0f \x8f\x17 \x00\x00H\x8bH H\x85\xc9\x0f\x84\x01": -7 </code></pre> </div>

Docker GO build返回非零代码:1

<div class="post-text" itemprop="text"> <p>Docker command to build</p> <p><code>sudo docker build -t gpst .</code></p> <pre> ubuntu@ip-172-31-9-252:~/goyo/GO/goyo.in/gpstracker$ sudo docker build -t gpst . Sending build context to Docker daemon 1.819MB Step 1/10 : FROM golang:1.8 ---&gt; a8ef0d2260ca Step 2/10 : RUN mkdir -p /go/src/goyo.in/gpstracker ---&gt; Using cache ---&gt; 70f242e31c63 Step 3/10 : WORKDIR /go/src/goyo.in/gpstracker ---&gt; Using cache ---&gt; a1609e2d1463 Step 4/10 : COPY . /go/src/goyo.in/gpstracker ---&gt; 2c90614f0f5b Step 5/10 : RUN go get github.com/codegangsta/gin ---&gt; Running in aae1a6e5d8bc ---&gt; e808aee68694 Removing intermediate container aae1a6e5d8bc Step 6/10 : RUN go-wrapper download # "go get -d -v ./..." ---&gt; Running in 427b2c574de7 + exec go get -v -d github.com/go-playground/log (download) github.com/go-playground/errors (download) github.com/tidwall/tile38 (download) package github.com/tidwall/tile38/client: cannot find package "github.com/tidwall/tile38/client" in any of: /usr/local/go/src/github.com/tidwall/tile38/client (from $GOROOT) /go/src/github.com/tidwall/tile38/client (from $GOPATH) github.com/garyburd/redigo (download) github.com/googollee/go-socket.io (download) github.com/googollee/go-engine.io (download) github.com/gorilla/websocket (download) github.com/rs/cors (download) github.com/jasonlvhit/gocron (download) github.com/NaySoftware/go-fcm (download) Fetching https://golang.org/x/net/context?go-get=1 Parsing meta tags from https://golang.org/x/net/context?go-get=1 (status code 200) get "golang.org/x/net/context": found meta tag main.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/context?go-get=1 get "golang.org/x/net/context": verifying non-authoritative meta tag Fetching https://golang.org/x/net?go-get=1 Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200) golang.org/x/net (download) Fetching https://google.golang.org/grpc?go-get=1 Parsing meta tags from https://google.golang.org/grpc?go-get=1 (status code 200) get "google.golang.org/grpc": found meta tag main.metaImport{Prefix:"google.golang.org/grpc", VCS:"git", RepoRoot:"https://github.com/grpc/grpc-go"} at https://google.golang.org/grpc?go-get=1 google.golang.org/grpc (download) Fetching https://golang.org/x/text/secure/bidirule?go-get=1 Parsing meta tags from https://golang.org/x/text/secure/bidirule?go-get=1 (status code 200) get "golang.org/x/text/secure/bidirule": found meta tag main.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/secure/bidirule?go-get=1 get "golang.org/x/text/secure/bidirule": verifying non-authoritative meta tag Fetching https://golang.org/x/text?go-get=1 Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200) golang.org/x/text (download) Fetching https://golang.org/x/text/unicode/bidi?go-get=1 Parsing meta tags from https://golang.org/x/text/unicode/bidi?go-get=1 (status code 200) get "golang.org/x/text/unicode/bidi": found meta tag main.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/bidi?go-get=1 get "golang.org/x/text/unicode/bidi": verifying non-authoritative meta tag Fetching https://golang.org/x/text/unicode/norm?go-get=1 Parsing meta tags from https://golang.org/x/text/unicode/norm?go-get=1 (status code 200) get "golang.org/x/text/unicode/norm": found meta tag main.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/norm?go-get=1 get "golang.org/x/text/unicode/norm": verifying non-authoritative meta tag github.com/golang/protobuf (download) Fetching https://google.golang.org/genproto/googleapis/rpc/status?go-get=1 Parsing meta tags from https://google.golang.org/genproto/googleapis/rpc/status?go-get=1 (status code 200) get "google.golang.org/genproto/googleapis/rpc/status": found meta tag main.metaImport{Prefix:"google.golang.org/genproto", VCS:"git", RepoRoot:"https://github.com/google/go-genproto"} at https://google.golang.org/genproto/googleapis/rpc/status?go-get=1 get "google.golang.org/genproto/googleapis/rpc/status": verifying non-authoritative meta tag Fetching https://google.golang.org/genproto?go-get=1 Parsing meta tags from https://google.golang.org/genproto?go-get=1 (status code 200) google.golang.org/genproto (download) The command '/bin/sh -c go-wrapper download # "go get -d -v ./..."' returned a non-zero code: 1 </pre> </div>


<div class="post-text" itemprop="text"> <p>I am using the function below to parse and save a Go template to a map the first time the template is invoked.</p> <p>Subsequently, the template is loaded from the map for optimization.</p> <pre><code>// Resource ... type Resource struct { Templates map[string]template.Template } func (res *Resource) FetchTemplate(templateName string) (template.Template, bool) { tmpl, ok := res.Templates[templateName] return tmpl, ok } func (res *Resource) ExecTemplate(w http.ResponseWriter, name, path string, model interface{}) error { t, ok := res.FetchTemplate(name) if !ok{ t := template.New(name) t, err := t.ParseFiles(res.Assets + path) t = template.Must(t, err) if err != nil { return err } res.Templates[name] = *t } if err := t.Execute(w, model); err != nil { w.WriteHeader(http.StatusBadGateway) return err } return nil } </code></pre> <p>The first time the code is invoked on a template however, it panics on the <code>t.Execute</code> call.</p> <p>It always works subsequently.</p> <p>Here are the error logs.</p> <pre><code> /usr/local/go/src/net/http/server.go:1746 +0xd0 panic(0x15b3ac0, 0x1b1c8d0) /usr/local/go/src/runtime/panic.go:513 +0x1b9 html/template.(*Template).escape(0xc000127088, 0x0, 0x0) /usr/local/go/src/html/template/template.go:95 +0x32 html/template.(*Template).Execute(0xc000127088, 0x4a90200, 0xc000374680, 0x15ed6c0, 0xc000370a20, 0x0, 0x0) /usr/local/go/src/html/template/template.go:119 +0x2f git.imaxinacion.net/uoe/anssid/app/resource.(*Resource).ExecTemplate(0xc0002ee120, 0x4a901b0, 0xc000374680, 0x16577a3, 0x5, 0x1660b7a, 0x10, 0x15ed6c0, 0xc000370a20, 0x145de5e, ...) /Users/gbemirojiboye/go/src/git.imaxinacion.net/uoe/anssid/app/resource/resource.go:110 +0x1ef </code></pre> <p>What could be the cause of this?</p> <p>When I was creating a new template for each call, this was not happening.</p> </div>

`go build -mod vendor`无法使用供应商的软件包

<div class="post-text" itemprop="text"> <p>When deploying my Go services to Google AppEngine (standard), I receive an errors describing a module version not being found, while everything compiles fine.</p> <p>The modules are on a private Github instance and checked out to <code>vendor/</code>.</p> <p>A <code>go build -mod vendor -o /dev/null ./...</code> works in cloud-build-local, locally and in Google Cloud Build. A tag called 'v1.1.0' exists on github.com/company/gosystem:</p> <pre><code>gosystem$ git tag v0.0.1 v0.0.2 v0.0.3 v1.0.0 v1.1.0 </code></pre> <pre><code>Failed to build app: [go build -o /tmp/staging172777881/usr/local/bin/start .] with env [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=f3f56ce621f0 HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache019702820 GOPATH=/go] failed: err=exit status 1, out=" go: finding github.com/pquerna/otp v1.1.0 go: finding github.com/gin-gonic/gin v1.4.0 go: finding github.com/pkg/errors v0.8.1 go: finding github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be go: finding github.com/gosimple/slug v1.5.0 go: finding github.com/boombuler/barcode v1.0.0 go: finding github.com/company/gosystem v1.1.0 go: finding github.com/oblq/i18n v0.0.0-20181031085821-98eec2978e00 go: finding github.com/go-pg/pg v8.0.4+incompatible go: finding golang.org/x/text v0.3.2 go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd go: finding github.com/modern-go/reflect2 v1.0.1 go: finding github.com/golang/protobuf v1.3.1 go: finding github.com/stretchr/testify v1.3.0 go: finding github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43 go: finding github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 go: finding github.com/mattn/go-isatty v0.0.7 go: github.com/company/gosystem@v1.1.0: unknown revision v1.1.0 </code></pre> <p>A <code>grep -RI 'gosystem@' *</code> reports nothing.</p> </div>

phpmailer错误提示You must provide at least one recipient email address

在实际工作中用到的phpmailer功能,但是在发送邮件的时候有些时候出现提示You must provide at least one recipient email address错误,但是我email是从数据库提取的。。而且我自己编写一个程序将数据库所有的邮件与phpmailer正则表达式进行过匹配都是没有问题,请问有没有PHP大神知道这个是为什么?什么情况会发生这样的问题


<div class="post-text" itemprop="text"> <p>In the middle of a development session, this stupid behavior started and now it looks permanent. I have no idea what happened:</p> <pre><code>[dtrombley@sleet bin]$ echo $GOROOT /usr/lib/golang [dtrombley@sleet bin]$ echo $GOPATH /home/dtrombley/go/ [dtrombley@sleet bin]$ ./liteide </code></pre> <p>liteide build error:</p> <pre><code> ../../github.com/Sirupsen/logrus/writer.go:4:2: cannot find package "bufio" in any of: /home/dtrombley/go/src/bufio (from $GOROOT) /home/dtrombley/go/src/bufio (from $GOPATH) </code></pre> <p>What? Why is it using GOPATH in place of GOROOT? This used to work, and mysteriously switched to broken <em>while liteide was running</em>, from one build to the next, literally a few seconds later... </p> <p>Has anyone seen this? Is there some way I can inspect/set the GOROOT within liteide?</p> <p>[Edit] Further weirdness: I thought the / at the end of GOPATH might be confusing it, so I removed that. Now:</p> <pre><code> [dtrombley@sleet bin]$ echo $GOROOT /usr/lib/golang [dtrombley@sleet bin]$ echo $GOPATH /home/dtrombley/go [dtrombley@sleet bin]$ ./liteide </code></pre> <p>...</p> <pre><code>warning: GOPATH set to GOROOT (/home/dtrombley/go) has no effect ../../github.com/Sirupsen/logrus/writer.go:4:2: cannot find package "bufio" in any of: /home/dtrombley/go/src/bufio (from $GOROOT) ($GOPATH not set) </code></pre> <p>Misery.</p> </div>

Heroku PHP应用程序在本地工作,如果我推送供应商目录,则在部署时工作,但如果我不推送供应商目录则不行

<div class="post-text" itemprop="text"> <p>This is very confusing to me. I have built a simple heroku app. It works fine locally. It actually works fine on Heroku IF I push the vendor directory, but then heroku warns me that I should not push the composer vendor directory. The message directs me to a link that instructs me to use composer.lock file for dependencies. So I added a .gitignore to ignore the vendor directory and pushed again, but when I did that, the app doesn't work. I checked the file structure on the heroku remote and it appears dependencies were installed correctly, but the app doesn't work. I'm trying to do this the right way, so I really want this to work, even though I know I can just push my vendor folder and it will work. Has anyone encountered this?</p> <p>Here is the code from my composer.json file</p> <pre><code>{ "require": { "salesforce-mc/fuel-sdk-php": "1.2.2", "guzzlehttp/guzzle": "~6.0", "ext-soap": "*", "php": "7.1.28", "ext-mcrypt": "*" } } </code></pre> <p>and my Procfile</p> <pre><code>web: vendor/bin/heroku-php-apache2 </code></pre> <p>The error I get when I try to load the page is pretty generic</p> <pre><code>This page isn’t working project.herokuapp.com is currently unable to handle this request. HTTP ERROR 500 </code></pre> <p>Here are the heroku logs</p> <pre><code> $ heroku logs 2019-04-26T18:14:40.303998+00:00 app[api]: Initial release by user stan_alach@hotmail.com 2019-04-26T18:14:40.888724+00:00 app[api]: Enable Logplex by user stan_alach@hotmail.com 2019-04-26T18:14:40.888724+00:00 app[api]: Release v2 created by user stan_alach@hotmail.com 2019-04-26T18:14:40.303998+00:00 app[api]: Release v1 created by user stan_alach@hotmail.com 2019-04-26T18:15:12.000000+00:00 app[api]: Build started by user stan_alach@hotmail.com 2019-04-26T18:15:21.000000+00:00 app[api]: Build succeeded 2019-04-26T18:15:22.259480+00:00 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2` 2019-04-26T18:15:20.868799+00:00 app[api]: Deploy 1f57bbb2 by user stan_alach@hotmail.com 2019-04-26T18:15:20.868799+00:00 app[api]: Release v3 created by user stan_alach@hotmail.com 2019-04-26T18:15:20.887739+00:00 app[api]: Scaled to web@1:Free by user stan_alach@hotmail.com 2019-04-26T18:15:24.264059+00:00 app[web.1]: Optimizing defaults for 1X dyno... 2019-04-26T18:15:24.284000+00:00 app[web.1]: 4 processes at 128MB memory limit. 2019-04-26T18:15:24.288460+00:00 app[web.1]: Starting php-fpm... 2019-04-26T18:15:26.290267+00:00 app[web.1]: Starting httpd... 2019-04-26T18:15:26.665144+00:00 heroku[web.1]: State changed from starting to up 2019-04-26T18:15:34.496861+00:00 heroku[router]: at=info method=GET path="/" host=cloud-buddy.herokuapp.com request_id=7fa87fe1-fb53-4ef6-ae75-f14488321528 fwd="" dyno=web.1 connect=0ms service=645ms status=500 bytes=169 protocol=http 2019-04-26T18:15:34.495116+00:00 app[web.1]: [26-Apr-2019 18:15:34 UTC] PHP Fatal error: Uncaught Error: Class 'FuelSdk\SQZL_ET_Client' not found in /app/index.php:18 2019-04-26T18:15:34.495133+00:00 app[web.1]: Stack trace: 2019-04-26T18:15:34.495135+00:00 app[web.1]: #0 {main} 2019-04-26T18:15:34.495201+00:00 app[web.1]: thrown in /app/index.php on line 18 2019-04-26T18:15:34.496655+00:00 app[web.1]: - - [26/Apr/2019:18:15:33 +0000] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36 2019-04-26T18:16:07.874786+00:00 app[api]: Starting process with command `bash` by user stan_alach@hotmail.com 2019-04-26T18:16:10.152678+00:00 heroku[run.9911]: State changed from starting to up 2019-04-26T18:16:10.244363+00:00 heroku[run.9911]: Awaiting client 2019-04-26T18:16:10.279025+00:00 heroku[run.9911]: Starting process with command `bash` 2019-04-26T18:20:32.049330+00:00 heroku[run.9911]: State changed from up to complete 2019-04-26T18:20:32.028902+00:00 heroku[run.9911]: Process exited with status 0 </code></pre> <p>Here is the output I get when I include the vendor folder, and when I do this, the app actually works. I guess for now I'll just let it be, since it's working, but it would be nice to know how to do it the proper way. There must be some sort of file structure issue with the autoload that is not resolving itself when heroku installs the dependencies.</p> <pre><code>$ git push heroku master Enumerating objects: 612, done. Counting objects: 100% (612/612), done. Delta compression using up to 8 threads Compressing objects: 100% (595/595), done. Writing objects: 100% (612/612), 1.08 MiB | 307.00 KiB/s, done. Total 612 (delta 247), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----&gt; PHP app detected remote: -----&gt; Bootstrapping... remote: -----&gt; Installing platform packages... remote: - php (7.1.28) remote: - ext-mcrypt (bundled with php) remote: - ext-soap (bundled with php) remote: - apache (2.4.39) remote: - nginx (1.14.2) remote: remote: ! WARNING: Your app's PHP version is no longer actively maintained remote: ! remote: ! Only security updates will be provided for your PHP version remote: ! series by the PHP Group until its end-of-life on 2019-12-01. remote: ! remote: ! It is strongly recommended you update your app to a version of remote: ! PHP with "active support" status immediately to ensure you get remote: ! the latest bugfixes and security updates each time you deploy. remote: ! remote: ! You may check the list of versions supported by the PHP Group remote: ! and their EOL dates here: http://php.net/supported-versions.php remote: ! remote: ! For a list of supported runtimes &amp; extensions on Heroku, please remote: ! refer to: https://devcenter.heroku.com/articles/php-support remote: remote: -----&gt; Installing dependencies... remote: Composer version 1.8.4 2019-02-11 10:52:10 remote: remote: ! WARNING: Composer vendor dir found in project! remote: ! remote: ! Your Git repository contains Composer's 'vendor' directory. remote: ! remote: ! This directory should not be under version control; only your remote: ! 'composer.json' and 'composer.lock' files need to be added, as remote: ! Composer will handle installation of dependencies on deploy. remote: ! remote: ! To suppress this notice, first remove the folder from the index remote: ! by running 'git rm -r --cached vendor/'. remote: ! Next, edit your project's '.gitignore' file and add the folder remote: ! '/vendor/' to the list, then commit the changes. remote: ! remote: ! For more info, refer to the Composer FAQ: remote: remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: Nothing to install or update remote: Generating optimized autoload files remote: -----&gt; Preparing runtime environment... remote: -----&gt; Checking for additional extensions to install... remote: -----&gt; Discovering process types remote: Procfile declares types -&gt; web remote: remote: -----&gt; Compressing... remote: Done: 16.2M remote: -----&gt; Launching... remote: Released v3 remote: https://cloud-buddy.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/cloud-buddy.git * [new branch] master -&gt; master </code></pre> </div>

Golang-跳过SSL / x509验证并构建软件包?

<div class="post-text" itemprop="text"> <p>I know nothing about the Go language, I'd just like to use this app on Ubuntu 14:</p> <ul> <li><a href="https://github.com/mvdan/fdroidcl" rel="nofollow noreferrer">https://github.com/mvdan/fdroidcl</a></li> </ul> <p>Before doing anything, I had to <a href="https://stackoverflow.com/questions/21001387/how-do-i-set-the-gopath-environment-variable-on-ubuntu-what-file-must-i-edit/21012349#21012349">set the GOPATH environment variable in my ~/.bashrc</a>. Then the README says this program is installed with:</p> <pre><code>go get -u github.com/mvdan/fdroidcl/cmd/fdroidcl </code></pre> <p>This passes fine, and an executable is found. In fact, these are the files found in home, where <code>GOPATH</code> is <code>~/go</code>:</p> <pre><code>$ find ~ -name 'fdroidcl*' 2&gt;/dev/null /home/myusername/.cache/fdroidcl /home/myusername/.config/fdroidcl /home/myusername/go/pkg/gccgo_linux_386/github.com/mvdan/fdroidcl /home/myusername/go/src/github.com/mvdan/fdroidcl /home/myusername/go/src/github.com/mvdan/fdroidcl/cmd/fdroidcl /home/myusername/go/bin/fdroidcl </code></pre> <p>Nice, but now when I start the initial command:</p> <pre><code>$ fdroidcl updateDownloading https://f-droid.org/repo/index.jar... update: could not update index: Get https://f-droid.org/repo/index.jar: x509: certificate signed by unknown authority (possibly because of "x509: cannot verify signature: algorithm unimplemented" while trying to verify candidate authority certificate "COMODO RSA Certification Authority") </code></pre> <p>This is most likely a failure due to self-signed certificate. A quick fix would be to use <code>http://</code> instead of <code>https://</code> (in case of <code>f-droid.org</code> it is currently possible), so I tried changing <code>~/go/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/main.go</code>:</p> <pre><code>var config = userConfig{ Repos: []repo{ { ID: "f-droid", //URL: "https://f-droid.org/repo", URL: "http://f-droid.org/repo", Enabled: true, }, { ID: "f-droid-archive", //URL: "https://f-droid.org/archive", URL: "http://f-droid.org/archive", Enabled: false, }, }, } </code></pre> <p>... but the command is actually binary:</p> <pre><code>$ file $(which fdroidcl) ~/go/bin/fdroidcl: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=cd1dc87b54f9023983511ef46fda15a4d88dcb2d, not stripped </code></pre> <p>... which means I'd have to somehow re-build this application from source in order to get those changes in - how would I do that?</p> <p>Furthermore, there may be other apps with self-signed https certificates that would break, so I'd much rather skip SSL / X509 verification. It seems that, as <a href="https://stackoverflow.com/questions/12122159/golang-how-to-do-a-https-request-with-bad-certificate">golang: How to do a https request with bad certificate?</a> points out, that one should do in code:</p> <pre><code>tr := http.DefaultTransport.(*http.Transport) tr.TLSClientConfig.InsecureSkipVerify = true </code></pre> <p>... which again requires hacking/recompiling the source code - but isn't there some sort of a environment variable to help that, like <a href="https://stackoverflow.com/questions/11621768/how-can-i-make-git-accept-a-self-signed-certificate/19363404#19363404"><code>GIT_SSL_NO_VERIFY</code> for <code>git</code></a>?</p> </div>

公司网络中的PHP Composer问题

<div class="post-text" itemprop="text"> <p>I want to install Matomo (<a href="https://matomo.org/" rel="nofollow noreferrer">https://matomo.org/</a>) on Openshift. I can install a simple PHP Website without any problems. But when I try to install Matomo I get this Error in the Log when I start to build the Project. </p> <pre><code>Cloning "ssh://git@stash.mycompany.net:22/matomo/analysetool.git" ... Commit: 5f4878b33d3e7dbae65d4ef674ea71d6f3e054e9 (update composerfile) Author: Wilhelm, Tom &lt;tom.wilhelm@mycompany.com&gt; Date: Fri Nov 30 14:28:33 2018 +0100 ---&gt; Installing application source... Found 'composer.json', installing dependencies using composer.phar... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to 2001:41d0:302:1100::8:104f: Network is unreachable /usr/libexec/s2i/assemble: line 21: ./composer.phar: No such file or directory error: build error: non-zero (13) exit code from artifactory.mycompany.net/rhscl/php-70-rhel7@sha256:0277d2c99328657e80822cc4ef3e5907e1e77cd0bd672ae497c98eeff37aefbd </code></pre> <p>The Problem is that the Server my Company runs does not allow access to Files outside the Network. I think the Error comes from the composer.json File:</p> <pre><code>{ "name": "piwik/piwik", "type": "application", "description": "the leading free/libre analytics platform", "keywords": ["piwik","matomo","web","analytics"], "homepage": "https://matomo.org", "license": "GPL-3.0+", "authors": [ { "name": "The Matomo Team", "email": "hello@matomo.org", "homepage": "https://matomo.org/team/" } ], "support": { "forum": "https://forum.matomo.org/", "issues": "https://github.com/matomo-org/piwik/issues", "wiki": "https://github.com/matomo-org/piwik/wiki", "source": "https://github.com/matomo-org/piwik" }, "config":{ "platform": { "php": "5.5.9" } }, "require": { "php": "&gt;=5.5.9", "twig/twig": "~1.0", "leafo/lessphp": "~0.5.0", "symfony/console": "~2.6.0", "tedivm/jshrink": "~0.5.1", "mustangostang/spyc": "~0.5.0", "piwik/device-detector": "~3.0", "piwik/decompress": "~1.0", "piwik/network": "~0", "piwik/cache": "~1.0.0", "piwik/ini": "^1.0.6", "php-di/php-di": "^5.0.0", "psr/log": "~1.0", "monolog/monolog": "~1.11", "symfony/monolog-bridge": "~2.6.0", "symfony/event-dispatcher": "~2.6.0", "pear/pear_exception": "~1.0.0", "matomo/referrer-spam-blacklist": "~1.0", "matomo/searchengine-and-social-list": "~1.0", "tecnickcom/tcpdf": "~6.0", "piwik/piwik-php-tracker": "^1.0", "composer/semver": "~1.3.0", "szymach/c-pchart": "^2.0", "geoip2/geoip2": "^2.8", "davaxi/sparkline": "^1.1" }, "require-dev": { "aws/aws-sdk-php": "2.7.1", "phpunit/phpunit": "~4.8", "facebook/xhprof": "dev-master", "phpseclib/phpseclib": "~0.3.8", "symfony/var-dumper": "~2.6.0", "symfony/yaml": "~2.6.0" }, "repositories": [ { "type": "package", "package": { "name": "facebook/xhprof", "type": "library", "description": "XHProf: A Hierarchical Profiler for PHP", "keywords": ["profiling", "performance"], "homepage": "http://pecl.php.net/package/xhprof", "license": "Apache-2.0", "version": "master", "require": { "php": "&gt;=5.2.0" }, "autoload": { "files": [ "xhprof_lib/utils/xhprof_lib.php", "xhprof_lib/utils/xhprof_runs.php" ] }, "source": { "type": "git", "url": "https://github.com/phacility/xhprof", "reference": "master" } } } ], "scripts": { "pre-update-cmd": [ "Piwik\\Composer\\ScriptHandler::cleanXhprof" ], "pre-install-cmd": [ "Piwik\\Composer\\ScriptHandler::cleanXhprof" ], "post-update-cmd": [ "Piwik\\Composer\\ScriptHandler::buildXhprof" ], "post-install-cmd": [ "Piwik\\Composer\\ScriptHandler::buildXhprof" ] }, "autoload": { "psr-4": { "Piwik\\Plugins\\": "plugins/", "Piwik\\": "core/" }, "psr-0": { "Zend_": "libs/", "HTML_": "libs/", "PEAR_": "libs/", "Archive_": "libs/" } }, "autoload-dev": { "psr-4": { "Piwik\\Tests\\": "tests/PHPUnit/" } } } </code></pre> <p>For this Case my Company has a JFrog Artifactory (<a href="https://jfrog.com/artifactory/" rel="nofollow noreferrer">https://jfrog.com/artifactory/</a>). Now my Question is which File do I have to upload to the Artifactory and how Can I tell the Composer that he has to get the Files from the Artifactory and not from the Internet.</p> <p>Thanks in advance</p> </div>

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

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


CopyOnWriteArrayList.java和ArrayList.java,这2个类的构造函数,注释中有一句话 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public ArrayList(Collection&lt;? ...


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


我在年前从上一家公司离职,没想到过年期间疫情爆发,我也被困在家里,在家呆着的日子让人很焦躁,于是我疯狂的投简历,看面试题,希望可以进大公司去看看。 我也有幸面试了我觉得还挺大的公司的(虽然不是bat之类的大厂,但是作为一名二本计算机专业刚毕业的大学生bat那些大厂我连投简历的勇气都没有),最后选择了中软,我知道这是一家外包公司,待遇各方面甚至不如我的上一家公司,但是对我而言这可是外包华为,能...


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


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

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



写在开头: 上周面试了一位女程序员,上午10::30来我们部门面试,2B哥接待了她.来看看她的简历: 个人简历 个人技能: ● 熟悉spring mvc 、spring、mybatis 等框架 ● 熟悉 redis 、rocketmq、dubbo、zookeeper、netty 、nginx、tomcat、mysql。 ● 阅读过juc 中的线程池、锁的源...




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


Spring的缓存抽象 Spring从3.1开始定义了一系列抽象接口来统一不同的缓存技术;并支持使用Java Caching(JSR-107)注解简化我们进行缓存开发。Spring Cache 只负责维护抽象层,具体的实现由你的技术选型来决定。将缓存处理和缓存技术解除耦合。 JSR107 Java Caching(JSR-107)定义了5个核心接口,分别是CachingProvider, Cach...


分享的这9个保证另你意外的网站,每个都非常实用!非常干货!毫不客气的说,这些网站最少值10万块钱。 利用好这些网站,会让你各方面的技能都得到成长,不说让你走上人生巅峰,但对比现在的你,在眼界、学识、技能方面都有质的飞跃。 一、AIRPANO 传送门:https://www.airpano.com/360photo_list.php 这是一个可以躺在家里,就能环游世界的神奇网站。 世界那么大,绝大多...


导读 前天面试了一个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,别再问密...


每家公司为了保证公司员工每天的工作时间,一般都会采用上下班打卡的工作制度,这其实是一个很常见的是,本身也没有什么问题的。正所谓无规矩不成方圆,公司肯定是有公司的规矩,虽然每个员工都很不喜欢这些规矩来束缚我们,但是公司也只是为了能更好的管理员工。但是一家公司如果一成不变的使用打卡制度,而不会去变通管理,也真不一定是好事。 打卡制度特别对于销售部门来说,不但会让公司发展不起来,还很容易丢失员工。但如...


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


文章目录前言正文**1、Kaspersky Cyberthreat real-time map****2、Finding Home****3、Silk – Interactive Generative Art****4、Liquid Particles 3D****5、WINDOWS93****6、Staggering Beauty****7、Ostagram图片生成器网址****8、全历史网址*...




在新冠疫情中,德国人越来越多地选择在超市,加油站或其他商店付款时使用非接触式付款方式。德国信贷协会Deutschen Kreditwirtschaft (DK) 的一位发言人告诉德国新...

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

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


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


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






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


时不时就有小伙伴问我,“二哥,能推荐一款 IDE 吗?”你看这话问的,现在搞 Java 的不都在用 Intellij IDEA 吗,还用得着推荐(我已经和 Eclipse 分手了)。然后小伙伴又说,“二哥,IDEA 支持中文吗?我英语不太好。”你看这话问的,搞编程的,英语不好是硬伤啊! 不过,随着 IDEA 最新版(版本号是 2020.1)的发布,英语不好的病可以彻底治愈了。为什么这么说呢?因为 ...

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

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

相关热词 c# 按行txt c#怎么扫条形码 c#打包html c# 实现刷新数据 c# 两个自定义控件重叠 c#浮点类型计算 c#.net 中文乱码 c# 时间排序 c# 必备书籍 c#异步网络通信