github

Git lost local commited files after git checkout

坚强是说给别人听的谎言 提交于 2021-02-09 12:12:54
问题 I was switching from a different branch so I can do a push. While doing the checkout the files were open in my editor which may have caused a permission denied error. Did git lose all my files? I dont know how to get them back. Here is what i did - The files are lost are js/Messages directory templates/Messages directory These were open in my editor when i was doing git operations C:\Users\***\Documents\myproject>git pull Password for 'https://********@bitbucket.org': Already up-to-date. C:

长期活动 | Apache Pulsar 官方:部署企业标志上传征集

萝らか妹 提交于 2021-02-09 12:11:57
关于 Apache Pulsar Apache Pulsar 是 Apache 软件基金会顶级项目,是下一代云原生分布式消息流平台,集消息、存储、轻量化函数式计算为一体,采用计算与存储分离架构设计,支持多租户、持久化存储、多机房跨区域数据复制,具有强一致性、高吞吐、低延时及高可扩展性等流数据存储特性。 GitHub 地址:http://github.com/apache/pulsar/ Apache Pulsar 自 2018 年毕业成为 Apache 软件基金会顶级项目以来,凭借云原生架构与诸多企业级功能特性,吸引了大量的用户和公司部署使用。Apache Pulsar 中文社区里越来越多的团队或组织也对其进行调研、测试并最终落地,比如腾讯、达达集团、BIGO、华为云等等,不一而足。 Pulsar 官网部分用户图示例 在 Apache Pulsar 的 官网 [1] 上, 有专门页面用来展示使用或对 Pulsar 作出贡献的公司。特此,Apache Pulsar 社区联合 Apache Pulsar 商业支持公司 StreamNative 面向社区共同发起倡议: 如果你所在团队、业务线或公司已经在生产环境使用 Pulsar 部分或大部分功能,欢迎将贵司团队或公司标志上传到 Apache Pulsar 官网。StreamNative 将为此活动长期提供指导与辅助。 近期

你用 Python 写过最牛逼的程序是什么?

那年仲夏 提交于 2021-02-09 11:31:32
编译:Python开发者 - Jake_on 英文:Quora http://python.jobbole.com/85986/ 有网友在 Quora 上提问,「你用 Python 写过最牛逼的程序/脚本是什么?」。本文摘编了 3 个国外程序员的多个小项目,含代码。 Manoj Memana Jayakumar, 3000+ 顶 更新:凭借这些脚本,我找到了工作!可看我在这个帖子中的回复,《Has anyone got a job through Quora? Or somehow made lots of money through Quora?》 1. 电影/电视剧 字幕一键下载器 我们经常会遇到这样的情景,就是打开字幕网站subscene 或者opensubtitles, 搜索电影或电视剧的名字,然后选择正确的抓取器,下载字幕文件,解压,剪切并粘贴到电影所在的文件夹,并且需把字幕文件重命名以匹配电影文件的名字。是不是觉得太无趣呢?对了,我之前写了一个脚本,用来下载正确的电影或电视剧字幕文件,并且存储到与电影文件所在位置。所有的操作步骤仅需一键就可以完成。懵逼了吗? 请看这个 Youtube 视频:https://youtu.be/Q5YWEqgw9X8 源代码 存放在GitHub: subtitle-downloader 更新: 目前,该脚本支持多个字幕文件同时下载。步骤

一个MySQL双引号把我坑惨了!

蹲街弑〆低调 提交于 2021-02-09 09:58:23
点击关注上方“ SQL数据库开发 ”, 设为“置顶或星标 ”,第一时间送达干货 一、前言 最近经常碰到开发误删除误更新数据,这不,他们又给我找了个麻烦,我们来看下整个过程,把我坑得够惨。 二、过程 由于开发需要在生产环节中修复数据,需要执行120条SQL语句,需要将数据进行更新, 于是开发连上了生产数据库,首先执行了第一条SQL update tablename set source_name = "bj1062-北京市朝阳区常营北辰福第" where source_name = "-北京市朝阳区常营北辰福第" 我们仔细看了下,这个SQL,的确没有什么问题,where条件也是正常的,大意就是将这个地址的前面加字符串bj1062,是真的没有错误么?是的没有错误。开发执行完成后,结果的确是符合预期。 然后开发执行了剩下的SQL,都是和上面的SQL一样,将地址进行更新。执行完成后,开发懵逼了,发现source_name都变成了0,开发赶紧给我打电话说: Harvey,我执行了update,where条件都是对的,set的值也是对的,但是set后的字段全部都变成了0,你赶紧帮我看看,看看能不能恢复数据。 我赶紧登上服务器,查看了这段时间的binlog,发现了大量的update tablename set source_name=0的语句,利用binlog2sql进行了解析,项目地址:

How to protect Google API Key in an open-source (Github + Heroku) application

冷暖自知 提交于 2021-02-09 09:16:31
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-

How to protect Google API Key in an open-source (Github + Heroku) application

醉酒当歌 提交于 2021-02-09 09:16:04
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-

How to protect Google API Key in an open-source (Github + Heroku) application

ぃ、小莉子 提交于 2021-02-09 09:15:31
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-

基于OpenVINO的端到端DL网络-Tesseract5+VS2017+win10源码编译攻略

[亡魂溺海] 提交于 2021-02-09 09:04:36
一,记录我目前在win10 X64和VS2017的环境下成功编译Tesseract5.0的方式; 二,记录在VS2017 C++工程中调用 Tesseract4.0 的方法; 三,记录编译和调用 Tesseract4.0过程 中踩到的坑和相应的解决方案或看法。 最终结果: 识别为: ======================================================================================================================= 一、资料准备 1 下载 最新的CPPAN版本。解压缩后,将cppan.exe所在的路径添加到系统变量中; CPPAN是跨平台的C / C++ 依赖管理器。它建立在 CMake 的基础之上,并具有构建系统的能力。CPPAN 支持快速的脚本式编码和原型制作,以及处理大型项目。查找,共享和重用库,发布您的项目。把时间花在你的代码上,而不是管理依赖关系。CPPAN为您降低包时间到几秒钟!它支持简单的交叉编译,继承和推送你自己的设置,标志到每个依赖。 链接为 https://cppan.org/client/ 编译过程中相应的支持库是由cppan下载的,我们需要下载cppan并设置其环境变量 解压后 在系统变量里面选择PATH变量,将cppan

Chrome DevTools 全攻略!助力高效开发

烈酒焚心 提交于 2021-02-09 07:54:56
李华西,微医云服务团队前端开发工程师,喜欢瞎折腾,典型猫奴 Console 面板 此章节请打开 justwe7.github.io/devtools/console/console.html 一起食用 一方面用来记录页面在执行过程中的信息(一般通过各种 console 语句来实现),另一方面用来当做 shell 窗口来执行脚本以及与页面文档、DevTools 等进行交互 组合快捷键按键: Windows: Control + Shift + J Mac: Command + Option + J 首先看一下 console 对象下面都有哪些方法: console.clear() 顾名思义,清空控制台 console.log(), info(), warn(), error() 日常用的比较多的就是这几个了,其中 log 和 info ,印象中在 2016 年之前老用 info 打印,还是有区别的, info 输出的内容前面是有一个蓝色背景的小圈, 大概跟这个差不多: i,后来 chrome 更新就没了(IE 还是可以看出差别的) console .log( '普通信息' ) console .info( '提示性信息' ) console .error( '错误信息' ) console .warn( '警示信息' ) 使用占位符 // 支持逗号分隔参数,不需要每个参数都单独打印

Chrome DevTools 全攻略!助力高效开发,摆脱 996

孤街醉人 提交于 2021-02-09 07:53:43
Console 面板 此章节请打开 justwe7.github.io/devtools/console/console.html 一起食用 一方面用来记录页面在执行过程中的信息(一般通过各种 console 语句来实现),另一方面用来当做 shell 窗口来执行脚本以及与页面文档、DevTools 等进行交互 组合快捷键按键: Windows: Control + Shift + J Mac: Command + Option + J 首先看一下 console 对象下面都有哪些方法: console.clear() 顾名思义,清空控制台 console.log(), info(), warn(), error() 日常用的比较多的就是这几个了,其中 log 和 info ,印象中在 2016 年之前老用 info 打印,还是有区别的, info 输出的内容前面是有一个蓝色背景的小圈, 大概跟这个差不多: i,后来 chrome 更新就没了(IE 还是可以看出差别的) console .log( '普通信息' ) console .info( '提示性信息' ) console .error( '错误信息' ) console .warn( '警示信息' ) 使用占位符 // 支持逗号分隔参数,不需要每个参数都单独打印 console .log( 1 , '2' , + '3'