我在CodeIgniter站点中有几个文件,我希望在repo中有这些文件但不跟踪任何更改.
例如,我将此框架的新安装部署到新客户端,我希望下载以下文件(它们具有默认值CHANGEME),我只需要对此客户端进行特定更改(数据库凭据,电子邮件地址信息,自定义CSS).
// the production config files i want the files but they need to be updated to specific client needs
application/config/production/config.php
application/config/production/database.php
application/config/production/tank_auth.php
// index page, defines the environment (production|development)
/index.php
// all of the css/js cache (keep the folder but not the contents)
/assets/cache/*
// production user based styling (color, fonts etc) needs to be updated specific to client needs
/assets/frontend/css/user/frontend-user.css
Run Code Online (Sandbox Code Playgroud)
目前如果我跑
git clone git@github.com:user123/myRepo.git httpdocs
Run Code Online (Sandbox Code Playgroud)
然后编辑上面的文件,一切都很棒.直到我发布修补程序或补丁并运行git pull.然后我的所有更改都会被覆盖.
我遇到两个问题..
问题1
这只发生在Mac上的chrome上,尝试过canary和旧版本..矩形是一个<canvas>元素..这里是它的截图.看起来黑色矩形是标记的位置.标记仍然可以点击,只是无法看到它.

问题2 我正在获得一个黑盒子,其中包含嵌入在Google Maps api v3的InfoBubble中的YouTube视频.单击标记图标后放大时,黑框通常会消失. 这仅发生在Windows中的Chrome上.

我所指的开发网站位于:http://sgaz.mapitusa.com
选择Health & Wellness and click on the red marker icon.
我正在为此付出赏金,因为我无法得到答案,我需要一个才能将此产品转移到生产状态.
这是地图代码的GIST https://gist.github.com/a5515bd0b0139185ea16
这是地图初始代码的GIST https://gist.github.com/4937a60d2402e99278b0
更新: 以下是嵌入YouTube视频的iframe代码:
<iframe width="246" height="125" src="http://www.youtube.com/embed/XFDtfg7RquI" frameborder="0" allowfullscreen=""></iframe>
Run Code Online (Sandbox Code Playgroud)
视频上的黑框可以在chrome - > inspect元素中选择,这是HTML ..
<embed width="100%" id="video-player-flash" height="100%" type="application/x-shockwave-flash" src="http://s.ytimg.com/yt/swfbin/watch_as3-vflTsQfnT.swf" allowscriptaccess="always" allowfullscreen="true" bgcolor="#000000" flashvars="el=embedded&fexp=904527%2C913102%2C913601&is_html5_mobile_device=false&allow_embed=1&allow_ratings=1&hl=en_US&use_tablet_controls=0&eurl=http%3A%2F%2Fsgaz.mapitusa.com%2F&iurl=http%3A%2F%2Fi1.ytimg.com%2Fvi%2FXFDtfg7RquI%2Fhqdefault.jpg&view_count=28&probably_logged_in=1&title=GermRid&avg_rating=0&video_id=XFDtfg7RquI&length_seconds=89&sendtmp=1&enablejsapi=1&sk=abu5-utg87bNYJgjGarozMSmFFhRfpxwC&use_native_controls=false&rel=1&playlist_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fplaylist_module-vflDOq0Br.swf&iurlsd=http%3A%2F%2Fi1.ytimg.com%2Fvi%2FXFDtfg7RquI%2Fsddefault.jpg&jsapicallback=ytPlayerOnYouTubePlayerReady&playerapiid=player1&framer=http%3A%2F%2Fsgaz.mapitusa.com%2F">
Run Code Online (Sandbox Code Playgroud) Max OS X 10.7 ..当我运行时,phing -v我得到以下错误:
Warning: require_once(phing/Project.php): failed to open stream: No such file or directory in /usr/lib/php/pear/phing/Phing.php on line 22
Fatal error: require_once(): Failed opening required 'phing/Project.php' (include_path='.:') in /usr/lib/php/pear/phing/Phing.php on line 22
Run Code Online (Sandbox Code Playgroud)
pear config-set auto_discover 1
pear install phing/phing
Run Code Online (Sandbox Code Playgroud)
include_path = ".:/Applications/MAMP/bin/php/php5.3.6/lib/php"
Run Code Online (Sandbox Code Playgroud)
bash-3.2$ whereis php
/usr/bin/php
bash-3.2$ whereis pear
/usr/bin/pear
bash-3.2$ whereis phing
/usr/bin/phing
Run Code Online (Sandbox Code Playgroud)
? pear config-get php_dir
/usr/lib/php/pear
Run Code Online (Sandbox Code Playgroud)
检查此文件夹,system.php并且phing.php都存在于此路径中.
我让库的其余部分完全工作,只是尝试生成api键,并在通过ajax执行时抛出403禁止.
({"status":false,"error":"Invalid API Key."})
我将它跟踪到REST_Controller下的_remap函数..几乎就像我错误地调用了url一样?
工作流程: user visits site1.com -> registers for account -> generates api key for their domain -> key recorded in db -> key displayed
以下表格将在site1.com上注册一个帐户后点击"生成密钥".
ajax电话:
/**
* Generate an API Key for Us to use
*/
$("#submitGetApiKey").click(function(){
$.ajax({
url: "http://dev.site1.com/api/key",
crossDomain: true,
type: "PUT",
dataType: "jsonp",
error: function(XMLHttpRequest, textStatus, errorThrown){
alert(errorThrown);
},
success: function(data){
for (var i = keys.length - 1; i >= 0; i--) {
console.log(keys[i]);
};
}
});
});
Run Code Online (Sandbox Code Playgroud)
GitHub上的REST-SERVER:https://github.com/philsturgeon/codeigniter-restserver …
我正在使用CodeIgniter,并在编辑表单上从数据库中提取数据。有时,此数据包含撇号,“&”号等。
我如何才能让CI不解析它并将其更改为HTML版本,以便最终用户可以对其进行编辑。
这是编辑表单的图像,此文本字段具有从数据库中提取的数据,并已填充到输入文本字段中。数据不包含任何特殊字符,如下面的第二张图片所示。

这是表格中数据外观的屏幕截图,请注意,我只是从最右边的列中提取。不是第四栏:

如您所知,数据没有以html转换的形式存储,但CI仍在进行转换。
这是上述文本字段的摘要:
<?php
/**
* Form Field attribute settings
* @author Mike DeVita
*/
$companyname = array(
'name' => 'companyname',
'placeholder' => 'Enter Your Companies Name',
'id' => 'companyname',
'value' => set_value('', $points['pointFields']['companyname']->uf_fieldvalue),
'maxlength' => 80,
'size' => 30
);
<div class="_100">
<p><?php echo form_label('Company Name', $companyname['id']); ?><?php echo form_input($companyname); ?></p>
<?php echo form_error($companyname['id']); ?>
</div>
Run Code Online (Sandbox Code Playgroud)
这是插入数据库的片段:
function addUserFieldHtml($compiledHtml){
foreach ($compiledHtml as $cHK => $cHV){
$data = array (
'pointid' => $cHV['pointId'],
'timestamp' => time(),
'html' …Run Code Online (Sandbox Code Playgroud) rails已安装...正在运行gem list rails返回rails (3.2.1)..但是,当我运行rails命令,如rails new testapp -T我得到Command Not Found: rails
我正在使用安装到`〜/ .rvm /的RVM.
在/ bin/bash shell中,该命令工作正常,但在/ bin/zsh中却没有.
我的.zshrc文件是:
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="doubleend"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this …Run Code Online (Sandbox Code Playgroud) 我是ActiveAdmin和RoR的新手,我无法弄清楚如何在has_many关联中更改下拉列表的可见值.
class Fillup < ActiveRecord::Base
// key is car_id:integer
belongs_to :car
end
Run Code Online (Sandbox Code Playgroud)
class Car < ActiveRecord::Base
validates :description, :presence => true
key is fillup_id:integer
has_many :fillups
end
Run Code Online (Sandbox Code Playgroud)
它目前显示我假设对分配给它的Car的编码引用.

我需要它显示给出的描述被定义为description:string在Car Model.

我是RoR/Ruby的新手,我正在使用Lazy High Charts gem根据一些数据库信息生成一些purdy图表.
我已经尝试过前一个问题中提供的答案,但我仍然对如何做到这一点感到困惑.
我需要总结amount_used,billed_amount和按月/年分组(例如; 2012年8月)
最终结果类似于双轴图表,其中包含两个系列"已使用金额"和"成本".此信息特定于某个account_id.

+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| account_id | int(11) | YES | | NULL | |
| invoice_date | varchar(255) | YES | | NULL | |
| amount_used | float | YES | | NULL | |
| billed_amount | float | YES | | NULL | …Run Code Online (Sandbox Code Playgroud) 我想开始使用内置于CI中的DBForge和迁移类,但我不确定如何为我的所有表创建迁移.
我的想法是在我的安装程序过程中为每个下表创建一个迁移文件:advertisements, announcements, config, users, points..当用户安装应用程序时,它将自动运行这些迁移文件并创建表.
IE: 001_advertisements, 001_announcements, 001_config, 001_users, 001_points
001_map_advertisements
class Migration_map_advertisements extends CI_Migration {
public function up(){
$this->dbforge->add_field(array(
'id' => array(
'type' => 'INT',
'constraint' => 11,
'unsigned' => TRUE,
'auto_increment' => TRUE
),
'youtube_id' => array(
'type' => 'VARCHAR',
'constraint' => '255',
),
'status' => array(
'type' => 'int',
'constraint' => 11,
'null' => FALSE,
'default' => 1
),
'timestamp' => array(
'type' => 'int',
'constraint' => 11
),
'type' => array(
'type' …Run Code Online (Sandbox Code Playgroud) 我使用https://github.com/davezuko/react-redux-starter-kit作为入门套件,并尝试在启动器应用程序中引入身份验证.
我有身份验证工作,它设置state.auth登录成功,然后onEnter我在我的受保护路由上调isAuthenticated()用以检查用户是否经过身份验证.
这是我迷路的地方,我不知道如何检查state.auth.user和localStorage.token确保设置的东西.
我看到它的方式,我需要考虑两个案例
state.auth.user/auth/login(这部分我已经工作).我的问题是使用入门套件我不知道如何正确到达我的路线文件中的状态/存储,所以我可以检查该state.auth.user属性..或者如果这甚至是正确的方法(也许我应该使用一个动作)代替)?
终极版/模块/ auth.js
import { createAction, handleActions } from 'redux-actions';
import { pushPath } from 'redux-simple-router'
// ------------------------------------
// Constants
// ------------------------------------
export const LOGIN_REQUEST = 'LOGIN_REQUEST';
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
export const LOGIN_FAILURE = 'LOGIN_FAILURE';
export const STORE_USER = 'STORE_USER';
export const IS_AUTHENTICATED = 'IS_AUTHENTICATED';
const initialState = {
isFetching: false,
isAuthenticated: false, …Run Code Online (Sandbox Code Playgroud) 我有一个类别列表,其中一些类别有孩子,我试图创建一个所有类别,点击后,将检查同一类别中的所有兄弟复选框.
例如; 单击MUSIC类别下面的ALL将检查blues, jazz, rock n roll
HTML:
<ul name="events-categories" id="events-categories">
<li><input type="checkbox" name="category-events" value="185" placeholder="" id="category-185" class="events-category"> CONVENTIONS
<ul class="event-children">
<li><input type="checkbox" name="child-category-all" value="" class="events-child-category-all">ALL</li>
<li><input type="checkbox" name="child-category-190" value="190" id="child-category-190" class="child events-child-category">SCIENCE</li>
<li><input type="checkbox" name="child-category-191" value="191" id="child-category-191" class="child events-child-category">TECHNOLOGY</li>
</ul>
</li>
<li><input type="checkbox" name="category-events" value="184" placeholder="" id="category-184" class="events-category"> MUSIC
<ul class="event-children">
<li><input type="checkbox" name="child-category-all" value="" class="events-child-category-all">ALL</li>
<li><input type="checkbox" name="child-category-189" value="189" id="child-category-189" class="child events-child-category">BLUES</li>
<li><input type="checkbox" name="child-category-188" value="188" id="child-category-188" class="child events-child-category">JAZZ</li>
<li><input type="checkbox" …Run Code Online (Sandbox Code Playgroud)