03 2018 档案

摘要:css 也分写得好写的不怎么好的区别, 比如, 尽量不能写 1, 多余的行数, 写着很爽,其实没有啥用, 或者还会成为以后的绊脚石, 2, 拼凑型代码, 想着一个元素5px, 一个元素5px, 包裹的元素10px, 看起来天衣无缝, 其实这种有强依赖,就是错的。比如以后要变成7px, 那就需要改2个 阅读全文
posted @ 2018-03-31 16:15 qqisnow2021 阅读(121) 评论(0) 推荐(0) 编辑
摘要:有大的文件变动 最好是先drush cr,清空一些缓存,免得一旦文件错误产生错误的数据库记录,那就麻烦了。比如新建一个module, 这是要drush cr, 特别是本地,更方便,远程也是,要清缓存。 阅读全文
posted @ 2018-03-31 15:58 qqisnow2021 阅读(127) 评论(0) 推荐(0) 编辑
摘要:这个千万要谨慎,宁愿git checkout -b abc, 然后到这边来git reset也是可以的,免得删了就没有了。 阅读全文
posted @ 2018-03-31 11:43 qqisnow2021 阅读(104) 评论(0) 推荐(0) 编辑
摘要:www-data is the user (and also group) that the service httpd (apache) is acting with on your system. www-data Some web servers run as www-data. Web co 阅读全文
posted @ 2018-03-30 17:47 qqisnow2021 阅读(318) 评论(0) 推荐(0) 编辑
摘要:301 永久转向302 临时转向 https://www.cnblogs.com/timeismoney/p/7117779.html 阅读全文
posted @ 2018-03-30 15:14 qqisnow2021 阅读(87) 评论(0) 推荐(0) 编辑
摘要:host之后的所有字符串,/d844/demo?abc=abc&qeruy=query但不包含# http://localhost/d844/?q=demo?&bc=abc&qeruy=query#df这个访问确是不行的 阅读全文
posted @ 2018-03-30 10:15 qqisnow2021 阅读(1789) 评论(0) 推荐(0) 编辑
摘要:in_array() foreach array_search() 由上可以大致看出这三种方法在性能上的表现了吧,array_search 和 in_array 表现差不多,foreach 表现最差。 http://www.phpernote.com/php-function/553.html 阅读全文
posted @ 2018-03-29 16:45 qqisnow2021 阅读(312) 评论(0) 推荐(0) 编辑
摘要:各个维度都要考虑数量,有可能是1个,也有可能是1000个,也许有可能是100000个,报的时候就从自己的理解入手,来估算大致的时间。既要从简单着眼,也不能忘记可能有复杂的需求。 阅读全文
posted @ 2018-03-29 14:49 qqisnow2021 阅读(126) 评论(0) 推荐(0) 编辑
摘要:现有一个commit号,然后修改什么的,git commit 生成一个新的commit号,git diff 旧的commit号码 新的commit号码 > /c/www/abc.patch这样就能看到有个patch文件了, 如何apply一个patchECLIPSE->右键->team->applY 阅读全文
posted @ 2018-03-29 13:17 qqisnow2021 阅读(309) 评论(0) 推荐(0) 编辑
摘要:是因为那个目录下有新的commit,这是git diff就会出现@@ -1 +1 @@-Subproject commit 9ea1cebe3dc529ba3861d87c818f045362c40484+Subproject commit 04ab7af68536ac2c80fd6c08a6fd3 阅读全文
posted @ 2018-03-29 09:48 qqisnow2021 阅读(1232) 评论(1) 推荐(0) 编辑
摘要:Git clean -ngit clean -fd-f 是文件-d 是目录-n 是列出哪些要remove/clean 就是在新添加了很多文件但又想恢复到以前的情况下。比如: composer update更新了很多文件,出现很多的文件untracked,但又想删掉这些,于是。。。 阅读全文
posted @ 2018-03-29 09:31 qqisnow2021 阅读(134) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/00fa11d258d6 display-property-grouping 当 display:inline时, width,height,margin-top,margin-bottom,和float属性的设置 将不会起到作用,因为 内联(in 阅读全文
posted @ 2018-03-28 16:26 qqisnow2021 阅读(128) 评论(0) 推荐(0) 编辑
摘要:4/18/2017 可能是以前學校都教 C/C++,在自學 PHP 和 Laravel 的過程中一直都是使用 C-like 的註解方式。常見的就是以下幾種寫法: // 單行註解 /* 多行註解 多行註解 */ 結果今天在公司的 code 發現了 # 開頭的程式?! 趕快上網查了一下,在 Stack 阅读全文
posted @ 2018-03-28 14:48 qqisnow2021 阅读(128) 评论(0) 推荐(0) 编辑
摘要:name varchar 60pass varchar 255 阅读全文
posted @ 2018-03-28 10:17 qqisnow2021 阅读(144) 评论(0) 推荐(0) 编辑
摘要:就是在host的后面 阅读全文
posted @ 2018-03-27 17:22 qqisnow2021 阅读(1194) 评论(0) 推荐(0) 编辑
摘要:$test = new Test(); kint($test);class Test{ public $a; public $b;} 则任然是会生成一个对象,但是属性有没有有值就看定义类的时候是怎么定义的有没有初始值。 阅读全文
posted @ 2018-03-27 17:06 qqisnow2021 阅读(208) 评论(0) 推荐(0) 编辑
摘要:array_merge 后合并[数字下标一字延展开]array_merge_recursive 各个层级合并且是array_merge因为名字就是array_merge_recursive+ 前合并【数组下标也算, 】 前后合并的要点就在数字下标键。 $a = ['b'=>'bb','c'=>'cc 阅读全文
posted @ 2018-03-27 16:25 qqisnow2021 阅读(175) 评论(0) 推荐(0) 编辑
摘要:This is all done from the render array itself. The nitty gritty details are documented in Cacheability of render arrays. In your case, you need to do 阅读全文
posted @ 2018-03-27 14:42 qqisnow2021 阅读(148) 评论(0) 推荐(0) 编辑
摘要:render_placeholder_generator: class: Drupal\Core\Render\PlaceholderGenerator arguments: ['%renderer.config%'] $this->rendererConfig = $renderer_config 阅读全文
posted @ 2018-03-27 14:00 qqisnow2021 阅读(169) 评论(0) 推荐(0) 编辑
摘要:一个用户登录就是一条匿名用户是没有session记录的 原来phpmyadmin搜索表左右不一样,左边搜索这个数据库下所有的表,右边呢,只搜索当前页面的,所以出现一种情况,就是发现有的表格搜不到,这个显然是不可能的呀。 因为设置了cookie/session最大生存周期,所以当浏览器关闭的时候,数据 阅读全文
posted @ 2018-03-26 16:38 qqisnow2021 阅读(207) 评论(0) 推荐(0) 编辑
摘要:protected function config($name) {..... if (in_array($name, $this->getEditableConfigNames())) { // Get a mutable object from the factory. $config = $c 阅读全文
posted @ 2018-03-23 17:18 qqisnow2021 阅读(140) 评论(0) 推荐(0) 编辑
摘要:比如: 北京时间比UTC时间早8小时,比如说UTC时间1月21日中午12:00,北京时间是1月21日20:00 12:00 + 8 = 20 阅读全文
posted @ 2018-03-22 12:50 qqisnow2021 阅读(3601) 评论(0) 推荐(0) 编辑
摘要:出了一个问题, 今天早上从正式环境下下载sql文件, 然后导入到本地环境,却怎么也不生效, 这个是什么问题呢, 原来是因为导错了文件, 为什么会出现这个问题呢,我不知道, 可能是因为文件太多了, 是因为下载目的文件夹里面有很多类似的文件, 然后我直接选择了高亮的那一个, 但选择的这个是错的。 其实都 阅读全文
posted @ 2018-03-22 09:36 qqisnow2021 阅读(207) 评论(0) 推荐(0) 编辑
摘要:https://drupal.stackexchange.com/questions/223376/what-is-the-correct-way-to-set-cache-contexts-on-custom-blocks 阅读全文
posted @ 2018-03-21 16:39 qqisnow2021 阅读(86) 评论(0) 推荐(0) 编辑
摘要:https://www.qed42.com/blog/lazy-builders-drupal8--先加载,然后通过javascript插入到DOM中去。很神奇的技术。 阅读全文
posted @ 2018-03-21 14:56 qqisnow2021 阅读(168) 评论(0) 推荐(0) 编辑
摘要:当一段数据废了很大劲才获取到,这时要考虑使用cache:max-age,感觉没啥用,一般只尊重后台的设置,主要是针对于匿名用户tag: 不管匿名和还是登陆用户,都有效,但不知道有什么用,特别是自己定义的一个字符串tagcontext: 应该是有些变体,所以--所谓数据费了很大劲,我估计是数据比从数据 阅读全文
posted @ 2018-03-21 13:58 qqisnow2021 阅读(115) 评论(0) 推荐(0) 编辑
摘要:Revert This operation changes your site configuration (living in the database) to match up with the definitions in the feature module code.Change data 阅读全文
posted @ 2018-03-20 14:55 qqisnow2021 阅读(117) 评论(0) 推荐(0) 编辑
摘要:To avoid unexpected requests to the server, you should call encodeURIComponent on any user-entered parameters that will be passed as part of a URI. Fo 阅读全文
posted @ 2018-03-19 09:43 qqisnow2021 阅读(514) 评论(0) 推荐(0) 编辑
摘要:The other responses focus on the differences between the two functions. This is true, but if the source array does not contain null or 0 or "", ... (e 阅读全文
posted @ 2018-03-15 16:48 qqisnow2021 阅读(227) 评论(1) 推荐(0) 编辑
摘要:http%3a%2f%2fwww.baidu.com%2fa-b%2fc+dhttp://www.baidu.com/a-b/c d空格+/ %2f: %3ahttp%3a%2f%2fwww.baidu.com%2fa-b%2fc+d%3fa%3db%26c%3dd%3d = %26 & 阅读全文
posted @ 2018-03-15 15:06 qqisnow2021 阅读(106) 评论(0) 推荐(0) 编辑
摘要:https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=zh-cn 我们唯一要做的就是确保服务器提供必要的 ETag 令牌。检查您的服务器文档中有 阅读全文
posted @ 2018-03-14 17:20 qqisnow2021 阅读(172) 评论(0) 推荐(0) 编辑
摘要:https://medium.com/@joshirohit100/cache-context-drupal-8-part-2-10088f67012ehttps://medium.com/@joshirohit100/cache-context-drupal-8-part-1-55303ec665 阅读全文
posted @ 2018-03-14 11:08 qqisnow2021 阅读(117) 评论(0) 推荐(0) 编辑
摘要:if( 1 || 2 && 0) { var_dump('1111');}if((1 || 2) && 0) { var_dump('2222');}if(1 || (2 && 0)) { var_dump('3333');} 阅读全文
posted @ 2018-03-12 15:50 qqisnow2021 阅读(149) 评论(0) 推荐(0) 编辑
摘要:Text (plain) varchar(16000)<input class="js-text-full text-full form-text" data-drupal-selector="edit-field-article-text-plain-0-value" id="edit-field 阅读全文
posted @ 2018-03-12 14:29 qqisnow2021 阅读(153) 评论(0) 推荐(0) 编辑
摘要:$config['system.logging']['error_level'] = 'verbose';如果这个选项打开则在drush cr的时候报错。in settings.local.php 阅读全文
posted @ 2018-03-09 17:18 qqisnow2021 阅读(192) 评论(0) 推荐(0) 编辑
摘要:直接拷贝数据库,方便简单直接。免得一个一个地方的配置。 阅读全文
posted @ 2018-03-09 10:55 qqisnow2021 阅读(109) 评论(0) 推荐(0) 编辑
摘要:每次sass scss/style.scss css/styl.css都会生成不同的style.css文件,可能是很细微的区别吧顺便还会生成style.map文件,这个基本不变,如果这个文件删了,会让firebug产生源映射错误。如果我本地的firebug没有设置启用源映射,则即便没有css.map 阅读全文
posted @ 2018-03-09 10:46 qqisnow2021 阅读(417) 评论(0) 推荐(0) 编辑
摘要:f12 如果开 他就关 如果关 他就开f5 加载页面当firebug开着的时候, 如果加载页面,则会自动跑到调试器窗口,这显然是不行的,那么只有关闭firebug然后再加载页面,还好都有快捷键方式。 PROD上的代码要非常小心,不能后退,只能从前面推过去。 阅读全文
posted @ 2018-03-09 10:05 qqisnow2021 阅读(80) 评论(0) 推荐(0) 编辑
摘要:content security policy 是服务器发送到浏览器的message header 键值对, 只有出现在上面的 url 里的才能生效, 不然浏览器就直接 拒绝了。其中有个 default-src 的属性, 这是一个属性key, 值就是后面属性的默认值, 后面如何设置了具体的值 就会覆 阅读全文
posted @ 2018-03-09 09:45 qqisnow2021 阅读(111) 评论(0) 推荐(0) 编辑
摘要:有时你想忽略一些自己的文件,却不想污染 repo 中的 .gitignore,也可以修改 .git/info/exclude 文件。语法和 .gitignore 一样。 --global 是可选,如果不带--global则只是配置本地的user.name和user.email 阅读全文
posted @ 2018-03-08 11:03 qqisnow2021 阅读(160) 评论(0) 推荐(0) 编辑
摘要:$arr = array('Hello','World!','I','love','Shanghai!'); echo implode($arr," ");echo "\n\t\n\r"; echo implode(" ",$arr); 这个地方在屏幕上显示是没有换行的但如果查看屏幕右键源代码的话, 阅读全文
posted @ 2018-03-05 13:33 qqisnow2021 阅读(236) 评论(0) 推荐(0) 编辑
摘要:当服务器重启后, 有可能让Key发生改变, 这个时候提示public key不能用了,其实本地的Public key是有效的,我们要删除/备份本地的Known host, 重新git pull 就可以更新本地的known host了。就好了。 阅读全文
posted @ 2018-03-05 10:37 qqisnow2021 阅读(305) 评论(0) 推荐(0) 编辑
摘要:$ export https_proxy=http://xx.xx.xx.xx:x$ export http_proxy=http://x.x.x.x:x谁能想到大小写在任何地方都有可能产生不同的结果。 阅读全文
posted @ 2018-03-02 10:20 qqisnow2021 阅读(1418) 评论(0) 推荐(0) 编辑
摘要:$response->send();就是调用Header一些变量setCookieecho $content等一些操作$autoloader = require_once 'autoload.php';获取加载类对象$kernel = new DrupalKernel('prod', $autolo 阅读全文
posted @ 2018-03-01 14:31 qqisnow2021 阅读(193) 评论(0) 推荐(0) 编辑
摘要:I'd like to add that for including a custom class that doesn't fit into the D8 "plugin, controller, form, etc." defaults, you can still do so as noted 阅读全文
posted @ 2018-03-01 10:46 qqisnow2021 阅读(120) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示