雨滴米
xieyanxy9 · 共 68 篇文章
git/github环境配置 创建密钥和设置用户信息
----//git/github环境配置 一 . github上创建立一个项目 用户登录后系统,在github首页,点击页面右下角“New Repository” 填写项目信息: project name: hibernate-demo description : my first project 点击“Create Repository” ; 现在完成了一个项目在github上的创建。 说明:我们创建的是一个github仓库,一个仓库里只能存放(或叫对应)一个项目。 当你创建完成一个仓库的之后,github已经给你一个提示:当你看完了我的文章再来看这个提示就非常清楚了。 Global se…
2015-03-20 15:10 · git · 评论(0)
drupal_static 函数用法
http://drupalchina.cn/comment/2154 http://blog.sina.com.cn/s/blog_682c842901011hkt.html
2015-01-30 14:26 · drupal7CODE · 性能优化 · 评论(0)
PHP 中的内存引址&
转自: http://www.xiukun.me/php-%E4%B8%AD%E7%9A%84%E5%86%85%E5%AD%98%E5%BC%95%E5%9D%80/ 在PHP一般有函数引址和变量引址 变量引址 $var = 998; $c = &$var; // 变量$c引用了$var的内存地址. 这时变量$c和变量$var使用的就是同一个内存地址. 他们值会一起变 $c = 100; // 当我改变了变量$c的值以后$var也会跟着变 var_dump($var); //返回结果 100 类引址 函数地址引用可以改变函数的返回值. 适用于跨函数的值保存. class ref { pub…
git 差异比较
1:修改文件后,执行git diff ,可以看到差异 2:修改后的文件通过git add 命令提交到暂存区,再执行git diff ,将看不到该文件的差异 3:继续对文件进行修改,再次之行git diff,会看到新的修改显示在差异中,但看不到旧的修改, 4:执行 git diff --cached 命令才可以看到添加到暂存区中的文件所做出的修改
2015-01-22 10:52 · git · 评论(0)
使用SVN命令行工具
转自: http://www.cnblogs.com/analyzer/archive/2009/08/25/1553424.html 从 http://subversion.tigris.org 获取subversion for windows的版本,安装之后就有了svn.exe这个基于命令行的客户端工具。当然服务器端的程序也有了,这里就不关心如何配置SVN服务了。安装程序把svn.exe的路径加入了path环境变量,我们已经可以在命令行中直接输入svn就可以使用了。 如果你不知道命令怎么用svn命令,可通过如下方式查询: svn help 知道了子命令,但是不知道子命令的用法,还可以查询…
2014-12-23 15:06 · SVN · 评论(0)
Linux Top 命令解析
Linux Top 命令解析 转自 http://www.jb51.net/LINUXjishu/34604.html TOP命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况。 TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止.比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序;而且该命令的很多特性都可以通过交互式命令或者在个人定制文件中进行设定. top - 12:38:33 up…
2014-12-23 10:57 · Linux · 评论(0)
drupal - override form action
function avene_global_form_alter(&$form, $form_state, $form_id) { switch ($form_id) { case 'webform_client_form_1': // unset($form['#action']); $form['#action'] = 'http://www.eau-thermale-avene.cn' . $form['#action']; array_push($form['#submit'], 'contactus_alert'); break; case 'newsletter_subscrib…
2014-06-20 15:03 · Drupal7 · 评论(0)
为页面添加metatag
<?php $html_head = array( /* 'product_list_title' => array( '#type' => 'html_tag', '#tag' => 'title', '#value' =>"馥绿德雅产品[field_product_pl_1]_产品系列 | 馥绿德雅洗护中国官网" ),*/ 'product_list_keywords' => array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array('name'=>'keywords','content'=>"[fiel…
2014-06-20 14:00 · drupal7CODE · metatag · 评论(0)
将taxonomy输出为菜单
<?php // The ID of the taxonomy vocabulary for which you'd like to create a nested list $vid = 10; $depth = 0; $num_at_depth = 0; $tree = taxonomy_get_tree($vid); print "<ul class="menu">\n<li>"; foreach ($tree as $term) { $diffdepth=0; if ($term->depth > $depth) { print "\n<ul>\n<li>"; $depth = $t…
2014-05-16 14:14 · Drupal7 · 评论(0)
调用block
$g_block = block_load('webform', 'client-block-27'); //模块名,block delta $rarray = _block_get_renderable_array(_block_render_blocks(array($g_block))); $block['content'] = drupal_render($rarray);
2014-05-16 14:12 · Drupal7 · 评论(0)
首页无内容时,隐藏默认信息“No front page content has been created yet”
in page.tpl.php In hook_preprocess_page() ... https://groups.drupal.org/node/229993 function YOURTHEME_preprocess_page(&$variables) { if($variables['is_front']){ $variables['title'] = ''; // This is optional ... it removes the default Welcome to @site-name $variables['page']['content']['system_main…
2014-05-16 14:11 · Drupal7 · 评论(0)
修改系统中menu block 中的class(theme_menu_tree)
需求如图:为整个menu添加一个class: 在template.php文件中: /** * Main menu * Implements theme__menu_tree(). */function YOURTHEME_menu_tree__main_menu($variables){ $ul ='<ul class="menu">'. $variables['tree'].'</ul>'. $div;return $ul;} 函数名称:theme名称_menu_tree__menu的MachineName ;后面是两个_ 参考 : http://drupal.stackexchange.…
2014-05-16 13:55 · Drupal7 · 评论(0)
druapal开启clean urls
转自: http://www.51php.com/drupal/6588.html Drupal默认情况下为网站页面生成的地址看起来像“http://www.51php.com/?q=node/83”。这种类型的地址不仅难以读懂而且会让很多搜索引擎读不到您网站所有页面的索引 搜索引擎对.html静态文件的收录非常友好,将含有“?q=node/83”的动态url地址,通过服务器mod_rewrite模块将其伪装成静态页面(.html)输出,这个过程我们称之为伪静态。 在drupal中你可以使用“Clean URLs”取消您网页地址中的”?q=” 详细步骤: 1.开启.htaccess 文件中 …
2014-04-30 11:46 · Drupal7 · 评论(0)
Drupal 7 模版 theme hook
Drupal 7 Template (Theme Hook) Suggestions https://drupal.org/node/1089656
2014-04-28 17:54 · Drupal7 · 评论(0)
在views中处理日期范围过滤 'between' 操作
解决方法 patchs: https://drupal.org/node/1302940 相关参考资料: Hierarchical Select https://drupal.org/project/hierarchical_select https://drupal.org/project/views_dependent_filters