// we declare a module name for our projet, and its dependencies (none)
angular.module(‘revolunet.stepper‘, [])
// declare our naïve directive
.directive(‘rnStepper‘, function() {
return {
// can be used as attribute or element
restrict: ‘AE‘,
// which markup this directive generates
template: ‘‘ +
‘
0
‘ +
‘‘
};
});
现在directive rnStepper 已经有了一个简单的雏形了。
可以有如下两种试用方法:
demo: http://jsfiddle.net/revolunet/n4JHg/
添加内部动作
直接上代码:
.directive(‘rnStepper‘, function() {
return {
restrict: ‘AE‘,
// declare the directive scope as private (and empty)
scope: {},
// add behaviour to our buttons and use a variable value
template:
‘‘ +
‘
{{value}}
‘ +
‘‘,
// this function is called on each rn-stepper instance initialisation
// we just declare what we need in the above template
link: function(scope, iElement, iAttrs) {
scope.value = 0;
scope.increment = function() {
scope.value++;
};
scope.decrement = function() {
scope.value--;
};
}
};
});
.directive(‘rnStepper‘, function() {
return {
// restrict and template attributes are the same as before.
// we don‘t need anymore to bind the value to the external ngModel
// as we require its controller and thus can access it directly
scope: {},
// the ‘require‘ property says we need a ngModel attribute in the declaration.
// this require makes a 4th argument available in the link function below
require: ‘ngModel‘,
// the ngModelController attribute is an instance of an ngModelController
// for our current ngModel.
// if we had required multiple directives in the require attribute, this 4th
// argument would give us an array of controllers.
link: function(scope, iElement, iAttrs, ngModelController) {
// we can now use our ngModelController builtin methods
// that do the heavy-lifting for us
// when model change, update our view (just update the div content)
ngModelController.$render = function() {
iElement.find(‘div‘).text(ngModelController.$viewValue);
};
// update the model then the view
function updateModel(offset) {
// call $parsers pipeline then update $modelValue
ngModelController.$setViewValue(ngModelController.$viewValue + offset);
// update the local view
ngModelController.$render();
}
// update the value when user clicks the buttons
scope.decrement = function() {
updateModel(-1);
};
scope.increment = function() {
updateModel(+1);
};
}
};
});
如果希望workflow存储最近20次的log,在session里的Config Object设置,log options做配置,save session log :sessions run ;savesessio log for these runs:20
session下面的source 里面有个tracing 
今天遇到一个客户BUG,当前的jdbc连接用户是root,然后部分删除操作都会报下面这个错误:The user specified as a definer ('aaa'@'localhost') does not exist
最后找原因发现删除操作做了触发器,而触发器里面有这样一句
/*!50017 DEFINER = ''aaa@'localhost' */
原来最初
O7_DICTIONARY_ACCESSIBILITY参数控制对数据字典的访问.设置为true,如果用户被授予了如select any table等any table权限,用户即使不是dba或sysdba用户也可以访问数据字典.在9i及以上版本默认为false,8i及以前版本默认为true.如果设置为true就可能会带来安全上的一些问题.这也就为什么O7_DICTIONARY_ACCESSIBIL
#h1#
0、完成课堂例子
1、将一个四位数逆序打印
1234 ==> 4321
实现方法一:
# include <stdio.h>
int main(void)
{
int i = 1234;
int one = i%10;
int two = i / 10 % 10;
int three = i / 100 % 10;
===================================================================
第一个
===================================================================
try{
CString sql;
sql.Format("select * from p