码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
c++: 函数重载(函数多态)
一、重载的概述 简单讲就是允许使用多个同名的函数。 函数重载的关键是函数的参数列表,也叫函数特征标。c++允许定义名称相同的函数,前提是特征标不同。 void print(const char * str, int width); //#1 void print(double d, int widt ...
分类:编程语言   时间:2020-09-10 22:56:17    阅读次数:34
python2和python3如何共存并都可用
借用py的一个参数来调用不同版本的Python。py -2调用python2,py -3调用的是python3. 当python脚本需要python2运行时,只需在脚本前加上,然后运行py xxx.py即可。 #! python2 当python脚本需要python3运行时,只需在脚本前加上,,然后 ...
分类:编程语言   时间:2020-09-10 22:38:02    阅读次数:39
[Unity3D] 如何实现鼠标点击拖拽图片移动图片跟随移动
1 using UnityEngine; 2 using UnityEngine.EventSystems; 3 using UnityEngine.UI; 4 5 public class LoginMoveWithMouse : MonoBehaviour, IDragHandler, IPoi ...
分类:移动开发   时间:2020-09-09 19:16:57    阅读次数:130
Xml文件的序列化操作
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using System.IO; using System.Xm ...
分类:其他好文   时间:2020-09-09 18:55:07    阅读次数:45
【题解】[SDOI2008] 烧水问题 By 5ab as a juruo.
题目 题目来源:CCF 山东省选 2008; 在线评测:Luogu#1984。 题目描述 把总质量为 $1\ \textrm$ 的水分装在 \(n\) 个杯子里,每杯水的质量均为 \(\left(\dfrac{1}{n}\right)\ \textrm{kg}\),初始温度均为 $0; ^\circ ...
分类:其他好文   时间:2020-09-09 18:54:43    阅读次数:40
代码重构之委派代替继承【组合代替继承】
核心:继承应该是在存在逻辑关系的环境中使用,而不是出于方便的目的。没有意义的继承用委派替代【用组合替代继承】,这样可以避免类中增加额外没有意义的接口。 代码演示: 1、代码 using System; using System.Collections.Generic; using System.Li ...
分类:其他好文   时间:2020-09-08 20:51:16    阅读次数:55
C++中的三个特殊宏:__FILE__,__FUNCTION__和__LINE__
__FILE__宏 __FILE__宏用于检查当前文件名,例如: #include <cstdio> using namespace std; int main() { printf("%s\n", __FILE__); return 0; } 假如这段代码保存为a.cc,就会输出a.cc。这在大项 ...
分类:编程语言   时间:2020-09-07 18:49:04    阅读次数:48
动态规划基础(三)DAG与树上的dp
这篇文章主要讨论了DAG上dp和树形dp DAG上dp DAG上的dp一般有记忆化搜索与拓扑排序两种方法来实现。 食物链 食物链 两者时间复杂度都是线性的 拓扑排序解法: #include <iostream> #include <queue> using namespace std; const ...
分类:其他好文   时间:2020-09-04 17:25:19    阅读次数:61
题解 CF1388A 【Captain Flint and Crew Recruitment】(思维、贪心)
AC代码: #include<bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; if (n <= 30) cout << "no" << endl; else { if (n != 36 && n != 40 && ...
分类:其他好文   时间:2020-09-03 16:59:36    阅读次数:43
Grpc+MagicOnion的学习和例子(二)
一,继续上一篇博客的扩展( Grpc+MagicOnion的学习和例子(一)),我们再服务端加入MagicOnion.Hosting包,如下 把startup的配置注释调,我们再program添加主机配置,如下 program using System; using System.Collectio ...
分类:其他好文   时间:2020-09-03 16:27:53    阅读次数:50
53562条   上一页 1 ... 83 84 85 86 87 ... 5357 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!