码迷,mamicode.com
首页 >  
搜索关键字:turn    ( 27138个结果
02.5 js中的语法知识补充
1. 函数 // 带名称的函数 // function func1 (args) { // return args + 1 // } // // const func2 = function (args) { // return args + 1 // } // 直接执行的匿名函数 // (func ...
分类:Web程序   时间:2020-01-29 21:23:27    阅读次数:74
flutter 状态保持之provide
代码: 1. import 'package:flutter/cupertino.dart'; class Counter with ChangeNotifier{ int num = 1; increase(){ num ++ ; notifyListeners();//加入监听者模式 } } 2 ...
分类:其他好文   时间:2020-01-29 20:13:15    阅读次数:104
SpringMVC在JSP页面取不到ModelAndView中的值
问题:在java代码中设置 了msg但是在jsp页面使用jstl取不出来 原因:创建maven工程时,idea自动添加的web.xml中的jsp页面头约束版本太低 解决方法:将“一”的代码替换为“二”的代码即可 “一” <!DOCTYPE web-app PUBLIC "-//Sun Microsy ...
分类:编程语言   时间:2020-01-29 19:57:45    阅读次数:126
使用列表模拟队列操作
如下程序模拟队列先进先出(FIFO)的特性: 代码: class Queue: def __init__(self): self.__data = [] def push(self,value): self.__data.append(value) def get(self): if self.__ ...
分类:其他好文   时间:2020-01-29 18:04:00    阅读次数:81
遗传算法(三)—— 旅行商问题TSP
遗传算法 (GA) 算法最主要的就是我们要想明白什么是他的 DNA 和怎么样对个体进行评估 (他们的 Fitness). Fitness和DNA 这次的编码 DNA 方式又不一样, 我们可以尝试对每一个城市有一个 ID, 那经历的城市顺序就是按 ID 排序咯. 比如说商人要经过3个城市, 我们就有 ...
分类:编程语言   时间:2020-01-29 17:38:20    阅读次数:128
遗传算法(二)——求单变量函数的最值
要想使用遗传算法,首要任务是定义DNA编码。 传统的 GA 中, DNA 我们能用一串二进制来表示, 比如: DNA1 = [1, 1, 0, 1, 0, 0, 1] DNA2 = [1, 0, 1, 1, 0, 1, 1] 这里,我们仍然使用二进制编码,但是如何与我们的问题对应起来呢? 我们知道二 ...
分类:编程语言   时间:2020-01-29 16:29:35    阅读次数:148
The Unique MST POJ - 1679 次小生成树
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; const int N=510,M=10010; int ...
分类:其他好文   时间:2020-01-29 16:24:35    阅读次数:79
Agri-Net POJ - 1258 prim
#include<iostream> #include<cstdio> #include<cstring> using namespace std; const int N=110; #define inf 1<<29 int map[N][N],n; int dist[N]; bool st[N] ...
分类:Web程序   时间:2020-01-29 16:08:44    阅读次数:60
Arctic Network POJ - 2349
#include<cstring> #include<iostream> #include<algorithm> #include<cmath> #include<cstdio> #define x first #define y second using namespace std; typede ...
分类:Web程序   时间:2020-01-29 15:56:54    阅读次数:65
Block
1.概述(block变量的声明) 1. block是一个数据类型 2. 数据类型的作用: 可以声明一个这个数据类型的变量, 用来存储数据 block 也是一个数据类型, 所以也可以声明一个 block 类型的变量, 往这个变量中存储数据 block 类型变量是专门用来 存储一段代码的, 这段代码可以 ...
分类:其他好文   时间:2020-01-29 15:48:17    阅读次数:59
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!