码迷,mamicode.com
首页 >  
搜索关键字:using    ( 53562个结果
【剑指offer 面试题14】调整数组顺序使奇数位于偶数前面
思路: 头尾指针,向中间遍历,依据条件交换元素。 1 #include 2 using namespace std; 3 4 void reOrder(int *pData, unsigned int len, bool (*func)(int)) 5 { 6 if(pData == ...
分类:编程语言   时间:2015-06-20 18:22:46    阅读次数:163
ASP.NET MVC5--杂学
1.在默认的MVC中,是根据路由来显示的。例如:通过这个链接,@Html.ActionLink("Edit", "Edit", new { id=item.ID }) *TheHtmlobject is a helper that's exposed using a property on theS...
分类:Web程序   时间:2015-06-20 18:17:27    阅读次数:154
POJ 2318 TOYS(计算几何)
跨产品的利用率推断点线段向左或向右,然后你可以2分钟代码:#include #include #include using namespace std;const int N = 5005;int n, m, x1, y1, x2, y2;struct Point { int x, y; ...
分类:其他好文   时间:2015-06-20 18:17:07    阅读次数:105
跳马问题
#include #include using namespace std; typedef struct{ int row; int col; }Node; int n; int sx,sy;//start node int ex,ey;//end node int map[200][200];//mark array int a[8][2] = {{1,2},{2,1...
分类:其他好文   时间:2015-06-20 15:46:26    阅读次数:106
C#自制数据库操作类代码
源代码如下: using System; using System.Data; using System.Data.OleDb; using System.IO; using System.Windows.Forms; namespace Test { class Database { public static bool DataBase_Exists() ...
分类:数据库   时间:2015-06-20 15:45:16    阅读次数:170
设计模式学习--观察者模式
观察者模式定义了对象之间的一对多依赖,这样一来,当一个对象改变状态时,他的所有依赖着都会收到通知并自动更新。设计原则 为了交互对象之间的松耦合设计而努力 1 using System; 2 using System.Collections; 3 using System.Collections...
分类:其他好文   时间:2015-06-20 15:32:13    阅读次数:96
asp.net mvc上传文件
在view视图里面@using (Html.BeginForm("uploadfile", "home", FormMethod.Post, new { enctype = "multipart/form-data"})){ }在controller [HttpPost] ...
分类:Web程序   时间:2015-06-20 14:19:05    阅读次数:150
设计模式学习--策略模式
00基础:抽象;继承;封装;多态;00原则:封装变化;多用组合,少用继承;针对接口编程,不针对实现编程;OO模式:策略模式--定义算法族,分别封装起来,让他们之间可以相互替换,此模式让算法的变化独立于使用算法的客户using System;using System.Collections.Gener...
分类:其他好文   时间:2015-06-20 14:16:44    阅读次数:145
[LeetCode-JAVA] Implement Stack using Queues
题目:Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.to...
分类:编程语言   时间:2015-06-20 13:08:12    阅读次数:119
leetcode 225 Implement Stack using Queues
1. 问题描述  用队列来模拟栈的操作。实现如下栈操作:    push(x) 将元素x入栈。 pop() 出栈。 top() 获取栈顶元素。 empty() 判断是否为空。   注意:只能用队列的标准操作,队头取元素,队尾插入元素,获取队列的大小,以及队列是否为空。2 方法和思路  可以用两个队列q1和q2来实现栈的操作,设q2为辅助队列。    入栈时将元素都存入q1队列中。 出栈时将q1中...
分类:其他好文   时间:2015-06-20 12:00:50    阅读次数:123
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!