记录一些营销产品中的一些学习知识。我们在同一个时区,却有一辈子的时差。

一、关于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的更多相关文章

  1. 【读书笔记】2016.11.19 北航 《GDG 谷歌开发者大会》整理

    2016.11.19 周六,我们在 北航参加了<GDG 谷歌开发者大会>,在web专场,聆听了谷歌公司的与会专家的技术分享. 中午免费的午餐,下午精美的下午茶,还有精湛的技术,都是我们队谷 ...

  2. 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 ...

  3. 微信iphone7、 ios10播放视频解决方案 2016.11.10

    2016.11.10日更新以下方法 微信最新出同层播放规范 即使是官方的也无法解决所有android手机的问题. 另外iphone 5 .5s 某些手机始终会弹出播放,请继续采用 “以下是老的解决办法 ...

  4. 最新的 cocoapods 安装与使用(2016.11)

    cocoapods简介: cocoapods 是iOS的类库管理工具,可以让开发者很方便集成各种第三方库,而不用去网站上一个个下载,再一个个文件夹的拖进项目中,还得添加相关的系统依赖库.只需要安装好c ...

  5. 【转载】webstorm11(注册,激活,破解,码,一起支持正版,最新可用)(2016.11.16更新)

    很多人都发现 http://idea.lanyus.com/ 不能激活了 很多帖子说的 http://15.idea.lanyus.com/ 之类都用不了了 最近封的厉害仅作测试 选择 License ...

  6. 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 ...

  7. string源码分析 ——转载 http://blogs.360.cn/360cloud/2012/11/26/linux-gcc-stl-string-in-depth/

    1. 问题提出 最近在我们的项目当中,出现了两次与使用string相关的问题. 1.1. 问题1:新代码引入的Bug 前一段时间有一个老项目来一个新需求,我们新增了一些代码逻辑来处理这个新需求.测试阶 ...

  8. Murano Weekly Meeting 2016.07.26

    Meeting time: 2016.July.26 1:00~2:00 Chairperson:  Nikolay_St, from Mirantis Meeting summary: 1.Masc ...

  9. http://stormzhang.com/opensource/2016/06/26/android-open-source-project-recommend1/

    转载自:http://stormzhang.com/opensource/2016/06/26/android-open-source-project-recommend1/ 推荐他的所有博文~ 图片 ...

  10. github javascript相关项目star数排行榜(前30,截止2016.11.18):

    github javascript相关项目star数排行榜(前30,截止2016.11.18): 前端开源框架 TOP 100 前端 TOP 100:::::https://www.awesomes. ...

随机推荐

  1. oracle for update和for update nowait的区别 - 转

    1.for update 和 for update nowait 的区别: 首先一点,如果只是select 的话,Oracle是不会加任何锁的,也就是Oracle对 select 读到的数据不会有任何 ...

  2. Android Handler机制 (一个Thead中可以建立多个Hander,通过msg.target保证MessageQueue中的每个msg交由发送message的handler进行处理 ,但是 每个线程中最多只有一个Looper,肯定也就一个MessageQuque)

    转载自http://blog.csdn.net/stonecao/article/details/6417364 在android中提供了一种异步回调机制Handler,使用它,我们可以在完成一个很长 ...

  3. C# winform右击导入手机号码

    private void 导入手机号ToolStripMenuItem_Click(object sender, EventArgs e) { using (OpenFileDialog Openfi ...

  4. WiFidog 广告路由可修改功能更加智能化的几点看法

    海蜘蛛Tomato出了mini版,这个对很多做WiFi营销的朋友来说,是一个福音,因为可以直接从FIR302B,一台30多块钱的路由直接刷成Hi-WiFi,而且界面这么漂亮 相信很多人已经对此界面OE ...

  5. node,npm的安装

    1. 在node的官网下载 2.安装node 3. 4.进入项目根目录,安装依赖:```npm install 如:npm install -g cnpm --registry=https://reg ...

  6. 配置IP

    配置目的:配置IP为静态,让IP地址不变,方便长时间连接. 几个命令: dhclient 自动获取IP; 杀死进程:dhclient -r ip addr 显示网卡情况,了解到IP地址: 编辑配置文件 ...

  7. SharePoint PowerShell部署开发好的WebPart到服务器上

    内容仅供参考,需结合实际需求来处理. =========SharePoint 环境下运行ps1文件,ps1内容如下======= Set-ExecutionPolicy ByPass Add-PSSn ...

  8. SpringMVC工作原理详解

    先来看一下什么是 MVC 模式 MVC 是一种设计模式. MVC 的原理图如下: SpringMVC 简单介绍 SpringMVC 框架是以请求为驱动,围绕 Servlet 设计,将请求发给控制器,然 ...

  9. Java8比较器,如何对 List 排序

    首页 所有文章 资讯 Web 架构 基础技术 书籍 教程 Java小组 工具资源 Java 8新特性终极指南 2014/06/20 | 分类: 基础技术 | 3 条评论 | 标签: java8 分享到 ...

  10. 微信公众号支付-Common

    using System.Web; /// <summary> /// 公共帮助类 /// </summary> public class Common { private H ...