我想使用没有Javascript来实现这样的自定义颜色形状:

目前我在橙色矩形div上覆盖了"框架"的图像,但这非常黑客.我想我可以使用动态生成的canvas元素,但这不仅需要JS,还需要HTML5 canvas支持.有任何想法吗?
我有一个正常运行的PHP盒式磁带,除了我无法找到一种直接的方法来获取OpenShift(递归地)推送我的git子模块的文件在推送我的核心repo文件时/之后.
这似乎应该是一个超级简单和常见的用例.我忽略了什么吗?
我可以ssh进入我的服务器并手动拉它们,但我想完全自动化,所以如果我在我的仓库中更新子模块的引用,这些更改将在我部署时反映出来.
我无法通过以下错误:
$ rhc setup
OpenShift Client Tools (RHC) Setup Wizard
This wizard will help you upload your SSH keys, set your application namespace,
and check that other programs like Git are properly installed.
A secure connection could not be established to the server (SSL_connect
returned=1 errno=0 state=SSLv3 read server key exchange B: bad ecpoint). You may
disable secure connections to your server with the -k (or --insecure) option
'https://openshift.redhat.com/broker/rest/api'.
If your server is using a self-signed certificate, you may disable …Run Code Online (Sandbox Code Playgroud) 以下内容未在iOS 39.2(12B440)的Chrome 39.0.2171.50上打开弹出/新标签/执行任何操作,但它似乎在同一台设备上的Safari上运行:
<button ng-click="$auth.$authWithOAuthPopup('facebook')">Login with Facebook</button>
Run Code Online (Sandbox Code Playgroud)
请参阅plnkr:http://plnkr.co/edit/Ejd7fsyTHf6Ohn0F25Wy?p=preview
这是Chrome或Firebase/AngularFire的错误还是我做错了什么?
我从这里看到这可能是一个Chrome问题,但我也无法开始$authWithOAuthRedirect()工作; 请参阅:http://plnkr.co/edit/9dd0W8X5k33LFBcCLmzs?p=preview
Popup和Redirect都适用于桌面Chrome 39.0.2171.95
我有多个对象,我希望通过人类可读的URL访问,因此我为所有数据库记录生成别名(例如blog.com/this-is-an-alias/).
自动生成这些的最佳做法是什么?
我现在挂钩模型的'values()'方法并在那里产生一个新的别名(基于所需的'name'字段),但我不禁觉得这可以更优雅地使用,例如,Kohana的内置-in过滤器.
这是精简模型:
class Model_Category extends ORM {
// relevant rules:
public function rules(){
return array(
'alias' => array(
array('max_length', array(':value', 63)),
array(array($this, 'unique'), array(':field', ':value')),
),
'name' => array(
array('max_length', array(':value', 63)),
),
// (...)
);
}
// overrides default method:
public function values(array $values, array $expected = NULL){
if(!$this->_loaded){
if($values['name'] && !$values['alias'])
$values['alias'] = Helper_Form::to_alias($values['name']);
}
return parent::values($values, $expected);
}
}
Run Code Online (Sandbox Code Playgroud)
仅供参考,to_alias函数看起来像这样:
return strtolower(substr(trim(preg_replace('/[^0-9a-zA-Z]+/','-',$str),'-'),0,63));
Run Code Online (Sandbox Code Playgroud)
所以,我的问题:
openshift ×2
angularfire ×1
css ×1
css-shapes ×1
css3 ×1
deployment ×1
filter ×1
firebase ×1
git ×1
kohana ×1
orm ×1
php ×1
redhat ×1
unique ×1