自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(86)
  • 资源 (10)
  • 收藏
  • 关注

原创 linux free命令用法以及解释

free -mt total used free shared buffers cachedMem: 16084 11115 4968 0 40 7311-/+ buffers/cache: 3764 12320Sw

2015-09-13 13:13:25 2090

原创 php 中利用json_encode和json_decode传递包含特殊字符的数据

$json2 = json_decode($json, true);//echo "json2:";//var_dump($json2);json_encode string json_encode ( mixed $value [, int $options = 0 ] )返回 value 值的 JSON 形式json_decodemixed json_decode (

2015-07-12 11:38:01 6155

原创 gem5 设置checkpiont以及从checkpoint处开始执行

以spec2006中的bzip2为例说明,如何设置checkpoint ,以及从checkpoint处开始继续执行。这样做的目的是,可以采用automic的方式执行N条指令,然后以detailed的方式执行M条指令。1.设置checkpoint:在第5000000条instruction处设置checkpoint./build/ALPHA_SE/gem5.opt -d ./

2015-03-17 12:35:15 3833

原创 关于gem5预取实验时的一些注意事项

1. 不同版本的gem5开启prefetch的方法可能不同,较新的版本需要在gem5/configs/common/Caches.py的class L2Cache(BaseCache)或者class L1Cache(BaseCache)添加相应的prefetcherclass L2Cache(BaseCache):    assoc = 8    block_size = 64

2015-01-28 10:35:49 7271

原创 Gem5下同时模拟多个benchmark

仅模拟一个benchmark的脚本# Copyright (c) 2006-2008 The Regents of The University of Michigan# All rights reserved.## Redistribution and use in source and binary forms, with or without# modification, are

2014-11-07 10:52:18 3344

原创 Leetcode Path Sum

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ /** * http

2014-10-07 22:49:33 1160

原创 Leetcode Best Time to Buy and Sell Stock III

/*** 题目:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/* Say you have an array for which the ith element is the price of a given stock on day i.* Design an algorithm to find t

2014-10-07 09:44:23 1035

原创 Leetcode Best Time to Buy and Sell Stock II

/** * Say you have an array for which the ith element is the price of a given stock on day i. * Design an algorithm to find the maximum profit. You may complete as many transactions as you like *

2014-10-07 08:54:39 1395

原创 Leetcode Best Time to Buy and Sell Stock

/*** https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/* Say you have an array for which the ith element is the price of a given stock on day i.* If you were only permitted to comple

2014-10-06 21:41:17 1033

原创 Surrounded Regions

/** * https://oj.leetcode.com/problems/surrounded-regions/ * 从四个边界的'O'出发,它们所能到达的'O'就是没有被包围的'O'。 * 所以,该题可以用BFS遍历或者DFS遍历。*/class Solution {public: void solve(vector> &board) { int row

2014-10-06 20:47:25 963

原创 Leetcode Longest Common Prefix

/** *https://oj.leetcode.com/problems/longest-common-prefix * Write a function to find the longest common prefix string amongst an array of strings. * 问题描述:写一个函数找到一组字符串的最长公共前缀。 * 这个题要明确一个观点,一组

2014-10-06 13:22:43 1012

原创 Leetcode Plus One

//Given a non-negative number represented as an array of digits, plus one to the number.//The digits are stored such that the most significant digit is at the head of the list.//digits={9,9,9,

2014-10-06 12:27:04 1112

原创 Leetcode Symmetric Tree

非递归解法/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class

2014-10-06 09:59:02 1209

原创 Leetcode Pascal's Triangle II

class Solution {public: vector getRow(int rowIndex) { vector result; int i = 0; int j = 0; if(rowIndex < 0) { return result; } result.

2014-10-05 22:04:47 948

原创 Leetcode Pascal's Triangle

class Solution {public: vector > generate(int numRows) { vector > result; vector innerResult; int i = 0; int j = 0; for(i = 0; i < numRows; i++){

2014-10-05 21:23:35 834

原创 Leetcode Triangle

/*意思就是:给定一个三角形,求得和最小的路径。每层只能选一个整数,上一层和下一层的整数必须是相邻的。思路:1,动态规划。到第i层的第k个顶点的最小路径长度表示为f(i,k),则f(i, k) = min{f(i-1,k), f(i-1,k-1)} + d(i, k); 其中d(i, k)表示原来三角形数组里 的第i行第k列的元素。则可以求得从第一行到最终到第length-1行第

2014-10-05 20:29:10 869

原创 Leetcode Remove Duplicates from Sorted Array

class Solution {public: int removeDuplicates(int A[], int n) { int duplicate = 0; int i = 0; for(i = 0; i < n - 1; i++){ if(A[i] == A[i + 1]){ dupli

2014-10-05 20:28:56 921

原创 Leetcode Two Sum

struct Node{ int index; int value;};bool compare(Node a, Node b){ return a.value < b.value;}class Solution {public: vector twoSum(vector &numbers, int target) {

2014-10-05 20:26:34 895

原创 042_翻转单词顺序

/**Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without u

2014-10-04 15:41:38 962

原创 Leetcode Binary Tree Preorder Traversal

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2014-10-04 14:15:57 1094

原创 Leetcode Linked List Cycle

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: bool hasCycl

2014-10-04 13:42:14 813

原创 Leetcode Single Number II

/**Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without u

2014-10-04 13:20:53 817

原创 Leetcode Candy

https://oj.leetcode.com/problems/candy/

2014-10-04 10:41:50 1083

原创 057_删除聊表中的重复的节点

#include #include using namespace std;typedef struct ListNode { int data; struct ListNode * next; ListNode(int d) : data(d), next(NULL){}};ListNode *initList(int *array, unsigned int lengt

2014-09-13 22:32:28 811

原创 031_连续子数组的最大和

#include #include using namespace std;bool isValid = true;int FindGreatestSumOfSubArray(int *data, int length) { isValid = true; if (data == NULL || length == 0) { isValid = false; return

2014-09-07 16:54:38 702

原创 017_合并两个排序的链表

#include #include using namespace std;typedef struct ListNode { int data; struct ListNode * next; ListNode(int d) : data(d), next(NULL){}};ListNode *initList(int *array, unsigned int lengt

2014-09-06 22:05:29 770

原创 11_数值的整数次方

#includeusing namespace std;bool isValid = true;bool isPositive = true;bool doubleEqual(double number1, double number2) { if(number1 - number2 -0.0000001) { return true; } else { return

2014-09-06 15:59:54 571

原创 10_二进制中1的个数

#includeusing namespace std;int main() { unsigned int number = 9; cout<<"number:"<<number<<endl; int count_one = 0; while(number) { count_one++; number = number & (number - 1); }

2014-09-06 14:50:44 504

原创 09_斐波那契数列

#include#include#include using namespace std;long long fibRecursion(unsigned n) { if(n <= 0) { return 0LL; } if(n == 1) { return 1LL; } if(n >= 2) { return fibRecursion(n - 1) +

2014-09-06 14:22:38 865

原创 05_从尾到头打印链表

#include #include using namespace std;typedef struct ListNode { int data; struct ListNode * next; ListNode(int d) : data(d), next(NULL){}};ListNode *initList() { ListNode * head = NULL;

2014-09-06 13:22:02 1143

原创 剑指offer_02_二维数组中的查找

#include using namespace std;bool ifHasNum(int *data,int row, int col, int num){ if(data == NULL || row <= 0 || col <= 0){ return false; } int i = 0; int j = col - 1; while(i = 0){ if(nu

2014-09-06 10:34:20 764

原创 采集元数据的C++实现

我要做的是提取Test_case的名字,以及Test_case的持续时间(单位秒):下面是一段示例元数据Start| 20140618 root (6033) | tpi 1.4 | 14:53:52 10050943579848 0 |Start| 20814 SunOS 5.11 11.2 i86pc tcx4440-01 |STF_ENV| STC_NAME = os-zones |

2014-09-06 09:45:16 2015

原创 Leetcode Add two numbers

/*#include using namespace std; *//** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */cla

2014-08-22 18:50:25 701

转载 贪心算法 解决 活动选择问题

#define GREEDY_RECURIVE#ifdef GREEDY_RECURIVE#include #include #include using namespace std;void recursive_activity_selector( const int started[], const int finished[],vector& result, int i,in

2014-08-02 17:10:33 746

转载 c++_学习路线与推荐书籍(软件工程师)

转载地址(一)语言入门:《C++ Primer》最新版本:第三版(第四版国外已上架,国内一些网上书店也在预订中)适合有丰富C经验,缺乏C++经验的。不过我个人一直认为此书带着过于强烈的C语言的痕迹,对于C++的学习未必是好事。《The C++ Programming Language》/《C++程序设计语言

2014-04-28 10:26:09 1719

原创 二分查找

#include //LENGTH 为有序表长度 #define LENGTH 6 //int binarySearch(int a[], int value, int len){ int low = 0; int high = len - 1; int mid = 0; while(low <= high){ mid = low + (high - low) / 2;

2014-04-13 21:20:06 703

原创 微软实习生第一题

/*时间限制:10000ms单点时限:1000ms内存限制:256MBFor this question, your program is required to process an input string containing only ASCII characters between ‘0’ and ‘9’, or between ‘a’ and ‘z’ (including

2014-04-13 13:36:10 920 3

原创 一个简单的数据收集程序

#include #include#define BufferLength 500#define NUM_BENCHMARKS 10int isBufferContainsStr(char buffer[], char str[], int n) { int isContains=0; int i = 0; int j = 0; int k = 0; for(i=0; i

2014-03-20 11:42:27 1919 1

原创 关于spec2006的调研

以下表格为spec2006的简单介绍,分别benchmark的语言,benchmark指令数(单位billion),benchmark指令中,分支执行,load,store指令比例(所占百分比)Name – LanguageInst. Count(Billion)Branches %Loads %Stores %C

2014-03-14 13:03:14 2603

转载 十分钟掌握diff&patch用法(转)

原博客地址:http://hi.baidu.com/thinkinginlamp/item/0ba1d051319b5ac09e2667f8作为程序员,了解diff&patch命令是非常必要的。比如说我们发现某个项目有bug代码,而自己又没有svn的提交权限,那么此时最合适的解决方法就是用diff命令做一个补丁发给项目成员。项目成员通过patch命令可以立刻知道你的意图。有人会说直接传一个新文

2014-03-12 10:48:51 897

build_opts

gem5对应的文件,仅供参考

2014-01-07

gem5-stable

官网上下载的gem5-stable有bug,改了一下没改好,这个版本以前的,可以正确运行

2014-01-02

splash2_benchmark-master

参考地址http://blog.csdn.net/xf_xjtu/article/details/7916547

2013-09-14

alpha的交叉编译器

在x86的机器下跑alpha的程序,可以用该交叉编译器,把程序交叉编译成alpha的,我是在gem5的fullsystem下跑程序,需要用到交叉编译

2013-09-14

数字化社区综合网络安全性分析——社区信息反馈系统.

数字化社区综合网络安全性分析——社区信息反馈系统,本资源包含以下内容:jar包,源代码,这里只包含后者

2011-04-27

毕业设计 五子棋的设计与实现 java

此毕业设计是用java实现的,有详细的文档参考,对于初学者有帮助,可以用来参考学习

2011-04-27

毕业设计 基于java的聊天室

这是用java做的毕业设计,有需要的同学可以下载看看,只供学习参考用

2011-04-27

科学计算器源代码用VC制作

这是我大二时做的课程设计,用VC做的,适合于初学者参考,

2010-06-22

vc++ 多功能计算器

vc++ 多功能计算器,此计算器能够解一元一次函数和一元二次函数,还能够经行复数运算,是学习VC的好材料

2010-01-05

基于vc的考勤系统1.com

这是用vc编写的考情管理系统,适合初学者学习,是一个不错的资料

2009-12-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除