日记整理---->2016-11-26
记录一些营销产品中的一些学习知识。我们在同一个时区,却有一辈子的时差。
一、关于mysql的注释问题
mysql的注释有以下三种,要注意是第二种的--后面至少要有一个空格。
/*hello world*/
-- hello world
#hello world
二、angular中的map的遍历
- js测试的数据
$scope.maptest = {
"man0": "hello1",
"man1": "hello2",
"man2": "hello3"
};
- html页面的代码
<div ng-repeat="(key, value) in maptest">
{{key}} and {{value}} and {{$index}}
</div>
- 代码的效果如下:

三、js数组的splice方法的介绍
splice:该方法的作用就是从数组中删除一个元素
array.splice(index,count,value....);
index:表示从哪一个下标开始,
count:表示删除元素的个数
value:代表增加的元素
提供一个例子如下:
var arrays = ["huhx", "linux", "tomhu"];
// 替换一个元素
arrays.splice(1, 1, "python");
console.log(arrays); // ["huhx", "python", "tomhu"]
// 增加一个元素
arrays.splice(arrays.length, 0, "go");
console.log(arrays); // ["huhx", "python", "tomhu", "go"]
// 删除一个元素
arrays.splice(0, 1);
console.log(arrays); // ["python", "tomhu", "go"]
js中关于slice方法的使用:http://www.w3school.com.cn/jsref/jsref_slice_array.asp
四、java中关于List遍历的情况
public static void main(String[] args) {
List<String> strLists = new ArrayList<String>();
strLists.add("linux");
strLists.add("huhx");
for (String string : strLists) {
string += "huhx";
}
System.out.println(strLists); // [linux, huhx]
List<Map> mapLists = new ArrayList<Map>();
Map<String, String> map = new HashMap<String, String>();
map.put("username", "huhx");
map.put("password", "1234");
mapLists.add(map);
for (Map maps : mapLists) {
map.put("address", "china");
map.put("password", "123456");
}
System.out.println(mapLists); // [{username=huhx, address=china, password=123456}]
}
五、关于响应式事件的开发
http://cn.vuejs.org/v2/guide/reactivity.html
六、关于java中的static块
class StaticClass {
static {
System.out.println("hello world");
}
public static void sayHello() {
System.out.println("Hello");
}
public void sayWorld() {
System.out.println("World");
}
}
以下是测试的结果:
StaticClass.sayHello();
hello world
Hello
------------------------------------------
StaticClass.sayHello();
new StaticClass().sayWorld();
hello world
Hello
World
------------------------------------------
new StaticClass().sayWorld();
new StaticClass().sayWorld();
hello world
World
World
七、阿里云的maven仓库,提高下载速度
修改maven根目录下的conf文件夹中的setting.xml文件,内容如下:
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
八、position:absolute的用法
<div style="position: relative;">
<div style="position: absolute;">hello world</div>
<input type="file" name="file" >
</div>
效果如下:

<div style="position: relative;">
<span style="position: absolute;">hello world</span>
<span>hello world</span>
<input type="file" name="file" onchange="alert('hello world')" >
</div

九、关于spring中的BeanWrap的使用
Person是一个javaBean,有两个属性username,password。
public void beanWrap_1() {
BeanWrapper wrapper = new BeanWrapperImpl(new Person());
wrapper.setPropertyValue("username", "linux");
PropertyValue passwordValue = new PropertyValue("password", "123456");
wrapper.setPropertyValue(passwordValue);
System.out.println(wrapper.getPropertyValue("username") + ", " + wrapper.getPropertyValue("password"));
}
// linux, 123456
十、Spring Expression Language的基础使用
public void expressionTest_1() {
ExpressionParser parser = new SpelExpressionParser();
Expression exp = parser.parseExpression("new String('hello world').toUpperCase()");
String message = exp.getValue(String.class);
System.out.println(message); // HELLO WORLD
exp = parser.parseExpression("'Hello World'.bytes.length");
int length = (Integer) exp.getValue();
System.out.println(length); //
}
友情链接
日记整理---->2016-11-26的更多相关文章
- 【读书笔记】2016.11.19 北航 《GDG 谷歌开发者大会》整理
2016.11.19 周六,我们在 北航参加了<GDG 谷歌开发者大会>,在web专场,聆听了谷歌公司的与会专家的技术分享. 中午免费的午餐,下午精美的下午茶,还有精湛的技术,都是我们队谷 ...
- U3D笔记11:47 2016/11/30-15:15 2016/12/19
11:47 2016/11/30Before you can load a level you have to add it to the list of levels used in the gam ...
- 微信iphone7、 ios10播放视频解决方案 2016.11.10
2016.11.10日更新以下方法 微信最新出同层播放规范 即使是官方的也无法解决所有android手机的问题. 另外iphone 5 .5s 某些手机始终会弹出播放,请继续采用 “以下是老的解决办法 ...
- 最新的 cocoapods 安装与使用(2016.11)
cocoapods简介: cocoapods 是iOS的类库管理工具,可以让开发者很方便集成各种第三方库,而不用去网站上一个个下载,再一个个文件夹的拖进项目中,还得添加相关的系统依赖库.只需要安装好c ...
- 【转载】webstorm11(注册,激活,破解,码,一起支持正版,最新可用)(2016.11.16更新)
很多人都发现 http://idea.lanyus.com/ 不能激活了 很多帖子说的 http://15.idea.lanyus.com/ 之类都用不了了 最近封的厉害仅作测试 选择 License ...
- ssh The authenticity of host '10.11.26.2 (10.11.26.2)' can't be established
The authenticity of host '10.11.26.2 (10.11.26.2)' can't be established. ECDSA key fingerprint is SH ...
- string源码分析 ——转载 http://blogs.360.cn/360cloud/2012/11/26/linux-gcc-stl-string-in-depth/
1. 问题提出 最近在我们的项目当中,出现了两次与使用string相关的问题. 1.1. 问题1:新代码引入的Bug 前一段时间有一个老项目来一个新需求,我们新增了一些代码逻辑来处理这个新需求.测试阶 ...
- Murano Weekly Meeting 2016.07.26
Meeting time: 2016.July.26 1:00~2:00 Chairperson: Nikolay_St, from Mirantis Meeting summary: 1.Masc ...
- http://stormzhang.com/opensource/2016/06/26/android-open-source-project-recommend1/
转载自:http://stormzhang.com/opensource/2016/06/26/android-open-source-project-recommend1/ 推荐他的所有博文~ 图片 ...
- github javascript相关项目star数排行榜(前30,截止2016.11.18):
github javascript相关项目star数排行榜(前30,截止2016.11.18): 前端开源框架 TOP 100 前端 TOP 100:::::https://www.awesomes. ...
随机推荐
- 嵌入式开发之zynq---Zynq PS侧sd驱动
http://blog.chinaunix.net/uid-29404121-id-4217026.html http://blog.chinaunix.net/uid-29709984-id-430 ...
- memcache -- 使用场景
memcache:分布式缓存机制 使用场景: 1.对数据的存储要求不高,就算丢失也关系不大(因为memcache是非持久化存储) 2.不适合单机使用,即不适合将memcache和数据库等都放到同一台机 ...
- 笔记关闭fn功能
使用笔记本在vs开发中调试需要加fn+10进行调试,一点都不方便,使用fn+esc(fnLock)这个功能就可以关闭fn功能
- WAS6.1连接SQL Server2008数据库连接池配置
原文链接:http://www.cnblogs.com/lyr2012/archive/2012/06/13/2547804.html 说明:该步骤只适用与websphere 6.1.0.15之前的版 ...
- Windows命令处理进程
1. 查看进程命令 tasklist 2.以翻页模式查看进程 tasklist | more 3.搜索关键字查找进程 tasklist | findstr "cmd" ...
- 绝对震撼 10个实用的jQuery/HTML5插件
在HTML5的世界里,我们见证了无数的特效奇迹,但很多特效我们很难在网页中应用,今天我们要分享10款效果震撼但是又比较实用的jQuery/HTML5插件,希望这些项目在应用的过程中也能给你带来设计灵感 ...
- 单例模式简介以及C++版本的实现
本篇博文主要内容参考 C++的单例模式一文,在此,为原作者耐心细致的分析讲解,表示感谢.本文将结合此篇文章,给出自己做实验后的理解以及代码,作为今天学习的小结. 单例模式,它的意图是保 ...
- Objective-C 语法之 Debug 表达式
main.m #import <Foundation/Foundation.h> #import "TestClass.h" int main(int argc, co ...
- Android 布局学习之——Layout(布局)详解二(常见布局和布局参数)
[Android布局学习系列] 1.Android 布局学习之——Layout(布局)详解一 2.Android 布局学习之——Layout(布局)详解二(常见布局和布局参数) 3.And ...
- Gridview、DataList、Repeater获取行索引号
Gridview.DataList.Repeater如何获取行索引号?很多情况下都会用得到,下面贴出代码,注意行索引号是从0开始,不是从1开始,如果要从1开始,请在代码里面+1就行了. Gridvie ...