由买买提看人间百态

topics

全部话题 - 话题: false
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
s********x
发帖数: 914
1
来自主题: JobHunting版 - 我觉得valid number其实并不难
if you insist:
public static boolean isNumber(String s) {
if (s == null || s.length() == 0) {
throw new IllegalArgumentException();
}
int start = 0, end = s.length() - 1;
// trim
while ((end-1) >= 0 && isWhiteSpace(s.charAt(end))) {
end--;
}
while ((start+1) <= end && isWhiteSpace(s.charAt(start))) {
start++;
}
// skip beginning + or -
if ((start+1) <= end && s.charAt(start) == '+' || s.charAt(start) == '-') {
start++;
}
start = isInteger(start, end, s);
if (start < 0) {
return false;
}
bool... 阅读全帖
s*******s
发帖数: 1031
2
我的C++代码:
class Solution {
public:
bool isMatch(const char *s, const char *p) {
int ptnCnt = 0;
const char *pp = p;
while(pp && (*pp)) {
if(*pp != '*')
++ptnCnt;
++pp;
}

int strCnt = 0;
if(s)
strCnt = strlen(s);

if(strCnt < ptnCnt)
return false;

if(!strCnt)
return !ptnCnt;
if(!ptnCnt)
return strlen(p);

... 阅读全帖
s********u
发帖数: 1109
3
做了一下7.6,就是找经过点最多的直线。
答案给的比较复杂,是用一个 >的hashmap,在斜率匹配的情况
下,再去vector找匹配的line,而且感觉有bug,在匹配斜率的时候没有考虑斜率无穷
大的情况。
我想了一下C++的做法,比较直观的做法是建立 的hashtable,然后重载一下
预算符,当斜率差和截距差都小于eps = 0.0001的时候视作两条线是同一条线。
但是因为重载这一块不太熟,不知道写的对不对,请大牛们指点一下:
//Given a two-dimensional graph with points on it,find a line which passes
the most number of points.
class Line{
private:
double slope;
double intercept;
bool infinity_slope;
static double eps;

public:
... 阅读全帖
s********u
发帖数: 1109
4
来自主题: JobHunting版 - Google第一轮面经
Phone interview,美国人,说话很清楚。不过太健谈了,导致他每次描述问题,说一
大堆,还各种打比方,要搞清楚whole picture真是太费劲了。。
不过人比较nice,希望好运吧。
1.他说warm up一下,说了一大堆,我才搞明白他的意思是,电影里经常有人拿报纸剪
下很多字母,然后拼成一句话去给别人发威胁message之类。(他一上来就说kidnap小
女孩之类,把我吓坏了,以为要写个绑匪和cops的design题。。。。)
然后让我实现一个function,看看能不能拼成一个message。
因为时间过了挺久,我就有点着急,赶紧写了一个hashtable的方法。然后他问我如果
这个message有重复单词怎么办,我才发现自己的bug(只是考虑newspaper里有没有这
个字母,而没有考虑字母的数量),改了一下。
bool compose( string msg, string newspaper){
unordered_map ccnt;
for(auto it = newspaper.begin(); it != newspa... 阅读全帖
s********u
发帖数: 1109
5
来自主题: JobHunting版 - Google第一轮面经
Phone interview,美国人,说话很清楚。不过太健谈了,导致他每次描述问题,说一
大堆,还各种打比方,要搞清楚whole picture真是太费劲了。。
不过人比较nice,希望好运吧。
1.他说warm up一下,说了一大堆,我才搞明白他的意思是,电影里经常有人拿报纸剪
下很多字母,然后拼成一句话去给别人发威胁message之类。(他一上来就说kidnap小
女孩之类,把我吓坏了,以为要写个绑匪和cops的design题。。。。)
然后让我实现一个function,看看能不能拼成一个message。
因为时间过了挺久,我就有点着急,赶紧写了一个hashtable的方法。然后他问我如果
这个message有重复单词怎么办,我才发现自己的bug(只是考虑newspaper里有没有这
个字母,而没有考虑字母的数量),改了一下。
bool compose( string msg, string newspaper){
unordered_map ccnt;
for(auto it = newspaper.begin(); it != newspa... 阅读全帖
f**********t
发帖数: 1001
6
来自主题: JobHunting版 - F, A, MS, QM, RF的OFFER和经历 -- PART 1
// Given an array [a1, a2, ..., an, b1, b2, ..., bn], transform it to [a1,
b1, a2, b2, ..., an, bn].
void EvenShuffle_(string &vi, size_t left, size_t right, bool leftmore) {
size_t len = right - left;
if (len < 2) {
return;
} else if (len == 2) {
if (!leftmore) {
swap(vi[left], vi[left + 1]);
}
return;
}
size_t mid = left + len / 2;
size_t ll = left + len / 4;
bool llmore = true;
bool rlmore = true;
if (len % 4 == 1) {
if (leftmore) {
++mid;
... 阅读全帖
x****g
发帖数: 1512
7
来自主题: JobHunting版 - 新鲜Google面经
内容是整型你比较容易解决,大不了判定一下啊当前值为INT_MAX,右结点必须为空,否
者错。
问题的引起是因为root->val+1划定下界引起的。
如果是浮点,你就不能定值了。
可以这样解决,其实并不需要判断每个结点的上下界。像单边,只要判单界即可。
就像根节点不用判,初始值随意。
bool isValidBST(TreeNode* root)
{
return BST_Helper(root,0,false,0,false);
}
bool BST_Helper(TreeNode* root, int low, bool checkLow, int high, bool
checkHigh)
{
if(root == NULL) return true;
if(checkLow)
{
if(root->val <= low) return false;
}
if(checkHigh)
{
//if(root->val > high) return false; //if BST support same value at
left ... 阅读全帖
t*******7
发帖数: 63
8
来自主题: JobHunting版 - G面经 求bless
感谢楼主分享,下礼拜电面,紧张ING。。。本人去年12月PHD毕业,专业方向DATA
MINING AND MACHINE LEARNING,搬到湾区找工作,OPT快开始了,目前还没着落,希望
能和一起在湾区找工作的同学多多交流互通信息。毕业前没时间准备现在着急了。。。
平常MATLAB写得多,JAVA最近才开始练习。。。
把电面的两个题写了一下,请拍
第一题
public boolean judgeCapital(String inputString) {

//
if ((inputString==null) || (inputString.length() == 0)) {

return false;
}



// get the first character
char firstChar = inputString.charAt(0);

//
i... 阅读全帖
r****7
发帖数: 2282
9
challenge me
bool isRepeat(string s) {
bool ret = false;
int sz = s.size();
vector pi(sz, 0);
int k = 0;
for (int i = 1; i < sz; i ++) {
while (k != 0 && s[i] != s[k]) {
k = pi[k - 1];
}
if (s[i] == s[k]) {
k ++;
}
pi[i] = k;
}
int d = sz - pi[sz - 1];

int idx = d - 1;
int expectedRes = 0;

bool rFlag = false;
if (d < 2) {
ret = false;
goto e;
}
while (t... 阅读全帖
r****7
发帖数: 2282
10
challenge me
bool isRepeat(string s) {
bool ret = false;
int sz = s.size();
vector pi(sz, 0);
int k = 0;
for (int i = 1; i < sz; i ++) {
while (k != 0 && s[i] != s[k]) {
k = pi[k - 1];
}
if (s[i] == s[k]) {
k ++;
}
pi[i] = k;
}
int d = sz - pi[sz - 1];

int idx = d - 1;
int expectedRes = 0;

bool rFlag = false;
if (d < 2) {
ret = false;
goto e;
}
while (t... 阅读全帖
a********e
发帖数: 53
11
class Solution {
public:
Write a function to find the longest common prefix string amongst an array
of strings.
The Time complexity is O(logM * N), while M is the size of strs, N is the
shortest length of the str in the strs
而我觉得这个时间复杂度应该是O(MN). 因为isEqual()的复杂度应该是O(M), as T(M
) = 2T(M/2) + O(1). 谢谢。
============================
bool isEqual(vector &strs, int index, int start, int end) {
if(end < start) return true;
if(end == start) {
if(strs[start].size() > index) return ... 阅读全帖
a*****y
发帖数: 22
12
bool IsIdenticalTree(const Node* root1, const Node* root2) {
if (root1 && !root2) {
return false;
} else if (!root1 && root2) {
return false;
} else if (!root1 && !root2) {
return true;
} else if (root1->data != root2->data) {
return false;
} else if (root1->next.size() != root2->next.size()) {
return false;
}
for (int i = 0; i < root1->next.size(); ++i) {
if (!IsIdenticalTree(root1->next[i], root2->next[i])) {
return false;
}
}
return true;
}
... 阅读全帖
a***e
发帖数: 413
13
题目
https://oj.leetcode.com/problems/search-a-2d-matrix/
我写的如下,先搜索行,再列。后面那个简短的是看到的别人的答案,简洁很多,但要
不要考虑行数*列数overflow的情况呢?多谢!
bool searchMatrix(vector > &matrix, int target) {
int row = matrix.size();
if (row==0) return false;
int col = matrix[0].size();
if (col==0) return false;
int rmin=0, rmax=row-1, cmin=0, cmax=col-1,rmid,cmid;
while (rmin<=rmax)
{
rmid = rmin+(rmax-rmin)/2;
if (matrix[rmid][0]>target... 阅读全帖
a***e
发帖数: 413
14
这样是不是 O(N^N)的复杂度?
class Solution {
public:
int maximalRectangle(vector > &matrix) {
int row=matrix.size();
if (row==0) return 0;
int col=matrix[0].size();
if (col==0) return 0;

//find all disjoint rectangles
vector> flag(row, vector(col,false));
int maxArea=INT_MIN;

for (int r=0; r for (int c=0; c {
int area=0;
if (matrix[... 阅读全帖
a***e
发帖数: 413
15
我感觉word ladder 2的思路比这道题还容易点,算法还比较出名,就是很不好写。。
。。。。。。
yuxrose (鱼香肉丝), 我倒是找到两个比较简洁的答案,但是最烦recursion。。。。
。。我觉得自己都缺乏动力搞懂这个题,也可能今天状态不佳。看答案都不清楚为啥,
都想放弃刷题啦!
但是花时间仔细琢磨,第一个答案好像也不是那么那么难,但第二个就不知道在干嘛了
,搞了3d table。晕啊!哪位大牛能解释一下呢?
如果没见过,谁能15分钟内搞懂题意,到写完代码,估计得下了狠功夫的。
这个有recursion还比没有recursion的快!
class Solution {
private:
bool isDeformation(string &s1, string &s2)
{
if(s1.size() != s2.size())return false;
int albe[26] = {0};
for(int i = 0; i < s1.size(); i ++)
albe[s1[i]... 阅读全帖
t******i
发帖数: 35
16
来自主题: JobHunting版 - 看到的一道题,挺有意思
下面代码好像可以跑过几个case, 就是用两个 minStack, maxStack,在 traverse
list
同时判断是否是valid BST.
bool listValidBSTHelper(stack &minsk, stack &maxsk, list::
iterator &it, list &l) {
if (it == l.end()) return true;
if (minsk.empty() || maxsk.empty()) return false;
if (*it <= minsk.top() || *it >= maxsk.top()) {
int val = maxsk.top();
maxsk.pop();
minsk.push(val);
return listValidBSTHelper(minsk, maxsk, it, l);
}
maxsk.push(*it);
it++;
if ... 阅读全帖
t****o
发帖数: 94
17
这个呢?随便写的,没test过。
bool CanAlwaysWin(vector& num, vector& used, int target)
{
if (target <= 0) return false;
for (int i = 0; i < num.size(); i++)
{
if (used[i]) continue;
if (num[i] >= target) return true;
used[i] = true;
bool win_anyway = true;
for (int j = 0; j < num.size(); j++)
{
if (used[j]) continue;
used[j] = true;
if (!CanAlwaysWin(num, used, target - num[i] - num[j]))
... 阅读全帖
l****c
发帖数: 782
18
来自主题: JobHunting版 - FB Onsite新题,有人能看看吗?
这个DFS对吗?
bool FindThiefDFS(const vector& S, int idx, int n, int pos,
unordered_map, bool, HashPair>& cache) {
if (idx >= S.size()) return false;
if (S[idx] == pos) return true;
if (cache.find({idx, pos}) != cache.end()) return false;
if (pos >= 1 && FindThiefDFS(S, idx + 1, n, pos - 1, cache))
return true;
if (pos <= n - 2 && FindThiefDFS(S, idx + 1, n, pos + 1, cache))
return true;
cache[{idx, pos}] = fal... 阅读全帖
c*****m
发帖数: 271
19
来自主题: JobHunting版 - 求問一題G家面經
楼主题目没有描述清楚,看完你的解答才明白完整的题意是什么。我感觉更好的答案是
并查集和树的结合。peer用并查集表示(一个集合里面的都是peer),manager关系用
树的结构表示。构建过程中先用(manager,A,B)先构建树结构;然后再用(peer,A,C)构建
并查集结构(在树中有父结点的是并查集的root)。is_peer(a,b)要么a,b在一个并查
集中,要么两个所属的并查集有相同的manager。is_manager(a,b)就递归地找了。自己
写的测试用例过了,如有不对请指正
class People:
def __init__(self, name):
self.name = name
#parent in tree to represent employee-manager info,
#tree_parent is manager of this person
self.tree_parent = None
#parent in union-find group
... 阅读全帖
n*****x
发帖数: 686
20
来自主题: JobHunting版 - 问道面试题,关于bst的
写了一下。不用build tree,找ancestor,求p和q到ancestor的距离即可,只是corner
case实在多,发现bug记得告诉我一声
int BST_distance(vector& nums, int p, int q){
if (p>q) return BST_distance(nums,q,p);
int ancestor=-1, grandpa=-1;
bool left;
for (int i=0; i if (nums[i]>=p && nums[i]<=q){
ancestor=i;
for (int j=i-1, dist=INT_MAX; j>=0; j--){
if (abs(nums[j]-nums[i]) if (nums[j]>nums[i]) left=true;
else... 阅读全帖
W***o
发帖数: 6519
21
来自主题: JobHunting版 - 脸家电话面试面筋
几个月之前写的代码
public static boolean isMonotonic(int[] A) {
int n = A.length, start = 1;
while (start < n && A[start] == A[start-1]) { start++; }
if (start == n) return true; // NOTE: critical
boolean isIncreasing = A[start] > A[start-1];
for (int i = start + 1; i < n; i++) {
if (isIncreasing && A[i] < A[i-1]) return false;
if (!isIncreasing && A[i] > A[i-1]) return false;
}
return true;
}
// 单调栈的思路
public sta... 阅读全帖
l*h
发帖数: 4124
22
来自主题: Medicine版 - 如何测幽门螺旋杆菌
抽血: detect antibody. less false negative, more false positive. if you have
not undergone h. pylori treatment in ~ 1 year, false positive is still very
low.
呼吸: urea breath test. more false negative, less false positive.
M*****a
发帖数: 231
23
我做了这个test,我自己的测试结果是好的(老天保佑), 但不知为什么我对这个去年
10月launch的新test的准确性还有很多的狐疑,所以最近花了很长时间来研究这个test
,这里想和姐妹们讨论一下,特别欢迎有专业背景的mm发表意见。
这个测验针对21th染色体的准确性号称99%,对13 和18的准确性略低一些 (98% 和91%
)。
我仔细读了该公司网站上的资料和他们在期刊上发表的研究文章,对他们的数据的不信
任感主要由于以下几点:
1. 他们研究的取样(sampling)目前只针对高危人群, 但临床应用却是所有的人。研究
所使用的数据至少有一半的样本取自于second trimester,约40%来自于1st trimester
的母体血液, 但临床上多数测验的血液样本都是在1 trimester 取样的。
2. 按照他们的研究数据,约有1%-2%左右的false positive 和false negative。 目前
在babycenter.com上已经有很多人 报告了false positive 的案例,但目前的false
negative, 我发现的有2个, 按统计数... 阅读全帖
r********y
发帖数: 2540
24
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: laoguai (没开迷死吹的老怪), 信区: SanFrancisco
标 题: 湾区大新闻:核光大学CEO Jerry Wang 涉嫌VISA欺诈被逮捕起诉
发信站: BBS 未名空间站 (Sun Aug 5 12:02:53 2012, 美东)
http://www.mercurynews.com/peninsula/ci_21222408/sunnyvale-univ
15天内所有学生需要转学,15天后拿不出证据,学校关门。核光大学CEO同时也是国际
医药大学的CEO。
除VISA 欺诈,还有制造假文件,非法侵入政府电脑系统等其他罪名。
这个可是第二所中国人开的学校被查出VISA 诈欺了。 中文新闻里面好像都没提到。
。。。
Sunnyvale university CEO indicted on visa fraud charges
By Lisa M. Krieger and Molly Vorwerck
Staff writers
Posted: 08/02/2012 05:12:06 PM PD... 阅读全帖
r********y
发帖数: 2540
25
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: laoguai (没开迷死吹的老怪), 信区: SanFrancisco
标 题: 湾区大新闻:核光大学CEO Jerry Wang 涉嫌VISA欺诈被逮捕起诉
发信站: BBS 未名空间站 (Sun Aug 5 12:02:53 2012, 美东)
http://www.mercurynews.com/peninsula/ci_21222408/sunnyvale-univ
15天内所有学生需要转学,15天后拿不出证据,学校关门。核光大学CEO同时也是国际
医药大学的CEO。
除VISA 欺诈,还有制造假文件,非法侵入政府电脑系统等其他罪名。
这个可是第二所中国人开的学校被查出VISA 诈欺了。 中文新闻里面好像都没提到。
。。。
Sunnyvale university CEO indicted on visa fraud charges
By Lisa M. Krieger and Molly Vorwerck
Staff writers
Posted: 08/02/2012 05:12:06 PM PD... 阅读全帖
D****g
发帖数: 1551
26
【 以下文字转载自 Military 讨论区 】
发信人: horsemen (horseman), 信区: Military
标 题: 一名华裔美籍女子被美国联邦法官剥夺美国国籍
发信站: BBS 未名空间站 (Fri Sep 5 22:38:43 2014, 美东)
一名华裔美籍女子因涉入2007年的一件国家安全信息走漏事件而被美国联邦法官剥夺美
国国籍。这名45岁李姓女子在2005年加入美籍,她名义上的假丈夫是中国公民持绿卡,
去年被驱逐出境。李姓女子是亚利桑反恐信息中心的合同工,负责头像识别技术。
Grace Li became a naturalized U.S. citizen in 2005. In 2009, she pleaded
guilty to knowingly making false statements in her pursuit of citizenship.
Credit: Courtesy of Grace Li
A federal judge in Arizona has ordered the U.S. government to rev... 阅读全帖
j***h
发帖数: 4412
27
Earthquake detection systems can sound the alarm in the moments before a
big tremor strikes—time enough to save lives
Japan’s system, which went live in 2007, makes heavy use of personal
technology. Alerts go out not only on television and radio but through
special receivers in homes, offices and schools. Pop-up windows on
computers show a real-time map with the epicenter’s location and the
radiating seismic waves. A timer counts down to the shaking at your
location and highlights predicted inte... 阅读全帖
w*******n
发帖数: 408
28
来自主题: Pittsburgh版 - Re: 减肥知识小测试

false, too absolute.
false, around 3/10
maybe true
true
false
true
true
false
false
maybe true
j***h
发帖数: 4412
29
Earthquake detection systems can sound the alarm in the moments before a
big tremor strikes—time enough to save lives
Japan’s system, which went live in 2007, makes heavy use of personal
technology. Alerts go out not only on television and radio but through
special receivers in homes, offices and schools. Pop-up windows on
computers show a real-time map with the epicenter’s location and the
radiating seismic waves. A timer counts down to the shaking at your
location and highlights predicted inte... 阅读全帖
I*******a
发帖数: 38
30
来自主题: Cycling版 - 第一次Group Ride求建议
1. It is your turn at front . you gracefully slide into position , then
A. Accelerate to drag the line with you.
B. Maintain the average pace of the group.
C. Adjust your speed to accommodate all levels of effort within the pack.
2. Midpack riders are not expected to point out hazards or announce traffic.
(True) Only the lead and rearmost riders can see what's going on from ahead
and behind.
(False) It is every rider's responsibility to relay messages through the
pack whether from front to back ... 阅读全帖
T***u
发帖数: 1468
31
要是领先的一方false start呢?本来需要跑一档,现在false start就行
我觉得最后两分钟false start应该多罚5码,谁觉得一个短暂停值这些码数的话去
false start好了


: 应该像最后2分钟不停表的false start犯规减10秒那样,故意拖时间的犯规加10
秒钟到

: play clock,这样就没人敢玩了。

b*****e
发帖数: 14299
32
来自主题: GunsAndGears版 - 还有人对战备话题感兴趣吗

看这个网站
http://www.radiationnetwork.com/Message.htm
Update: 6/6/12, 11:55 P.M. - Very high reading in South Bend, IN station
this evening. Reason unknown. Station unresponsive to contact at this
late hour. Since this same station has triggered the Alert system before,
which Alerts may have been false, and because his current readings do not
appear to be corroborated by nearby stations, we have disabled his station
for the time being. Will report back when we know more.
然后更正了,说是false alert:
U... 阅读全帖
g*z
发帖数: 3227
33
来自主题: Swimming版 - 大狗熊的游泳日记
http://www.usms.org/rules/part1.pdf
103.8.6 False Starts
A. Any swimmer starting before the starting signal is given shall be
disqualified if the referee independently observes and confirms the starter
’s observation that a violation occurred. Swimmers remaining on the
starting blocks shall be relieved from their starting positions with the “
Stand up” command and may step off the blocks.
B. If the starting signal has been given before the disqualification is
declared, the race shall continue wi... 阅读全帖
g*z
发帖数: 3227
34
来自主题: Swimming版 - 大狗熊的游泳日记
http://www.usms.org/rules/part1.pdf
103.8.6 False Starts
A. Any swimmer starting before the starting signal is given shall be
disqualified if the referee independently observes and confirms the starter
’s observation that a violation occurred. Swimmers remaining on the
starting blocks shall be relieved from their starting positions with the “
Stand up” command and may step off the blocks.
B. If the starting signal has been given before the disqualification is
declared, the race shall continue wi... 阅读全帖
r********y
发帖数: 2540
35
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: laoguai (没开迷死吹的老怪), 信区: SanFrancisco
标 题: 湾区大新闻:核光大学CEO Jerry Wang 涉嫌VISA欺诈被逮捕起诉
发信站: BBS 未名空间站 (Sun Aug 5 12:02:53 2012, 美东)
http://www.mercurynews.com/peninsula/ci_21222408/sunnyvale-univ
15天内所有学生需要转学,15天后拿不出证据,学校关门。核光大学CEO同时也是国际
医药大学的CEO。
除VISA 欺诈,还有制造假文件,非法侵入政府电脑系统等其他罪名。
这个可是第二所中国人开的学校被查出VISA 诈欺了。 中文新闻里面好像都没提到。
。。。
Sunnyvale university CEO indicted on visa fraud charges
By Lisa M. Krieger and Molly Vorwerck
Staff writers
Posted: 08/02/2012 05:12:06 PM PD... 阅读全帖
h**o
发帖数: 1879
36
来自主题: WaterWorld版 - 学习讨论:Fair comment(公正评论)
先贴后看
http://en.wikipedia.org/wiki/Fair_comment
In the United States, the traditional privilege of "fair comment" is seen as
a protection for robust, even outrageous published or spoken opinions about
public officials and public figures. Fair comment is defined as a "common
law defense [that] guarantees the freedom of the press to express statements
on matters of public interest, as long as the statements are not made with
ill will, spite, or with the intent to harm the plaintiff".[1]
The defense... 阅读全帖
t******n
发帖数: 2939
37
来自主题: WaterWorld版 - [合集] l63的证明的确不够严谨
☆─────────────────────────────────────☆
l63 (l63) 于 (Fri May 24 02:08:51 2013, 美东) 提到:
我不是认为命题1是真.
我是根据逻辑和公理推导出了 "如果假设成立, 则命题1为真"
看不懂别乱给人扣帽子. 你倒是给论证论证, 我怎么就 "认为命题1为真" 了?

☆─────────────────────────────────────☆
l63 (l63) 于 (Fri May 24 02:13:43 2013, 美东) 提到:
那你得指出错在哪, 是不是?
你不能说 "我已经根据假设推导出命题1为真, 所以就不考虑命题2" 是错的吧?
☆─────────────────────────────────────☆
cyw (口令) 于 (Fri May 24 02:24:23 2013, 美东) 提到:
看你id怎么隐约看见了孙维?
☆─────────────────────────────────────☆
firearasi (firearasi) 于 (Fr... 阅读全帖
d**********o
发帖数: 1321
38
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
第二次作业report
#+latex_class: cn-article
#+latex_header: \usepackage{CJKutf8}
#+latex_header: \begin{CJK}{UTF8}{gbsn}
#+latex_header: \lstset{language=c++,numbers=left,numberstyle=\tiny,
basicstyle=\ttfamily\small,tabsize=4,frame=none,escapeinside=``,
extendedchars=false,keywordstyle=\color{blue!70},commentstyle=\color{red!55!
green!55!blue!55!},rulesepcolor=\color{red!20!green!20!blue!20!}}
#+title: CS572 Project 2 Report
#+author: (me~~~)
#+begin_abstract
|---------------------------+------------... 阅读全帖
d**********o
发帖数: 1321
39
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
第二次作业report
#+latex_class: cn-article
#+latex_header: \usepackage{CJKutf8}
#+latex_header: \begin{CJK}{UTF8}{gbsn}
#+latex_header: \lstset{language=c++,numbers=left,numberstyle=\tiny,
basicstyle=\ttfamily\small,tabsize=4,frame=none,escapeinside=``,
extendedchars=false,keywordstyle=\color{blue!70},commentstyle=\color{red!55!
green!55!blue!55!},rulesepcolor=\color{red!20!green!20!blue!20!}}
#+title: CS572 Project 2 Report
#+author: (me~~~)
#+begin_abstract
|---------------------------+------------... 阅读全帖
a*****c
发帖数: 2086
40
来自主题: Joke版 - 现在的考题很强大啊
反证法:
首先假设他说的命题A是真的。 Assume that A = TRUE
那么这里 [A为真] 就有2个暗示: B1 = [A命题是存在的]。 B2 = [A是真的]。
正式的写法: A => B1 AND B2 ( X=>Y表示 if X then Y 的逻辑关系)
B1 等价于命题 C1 = [梦中他告诉我说我正在梦中考试。]
B2 等价于命题 C2 = [我在梦中考试]
引入永真命题 M = [梦中的一切都不是真的]
于是我们知道 B1 与 B2 都不是真的。
B1 = C1 = FALSE
B2 = C2 = FALSE
B1 AND B2 = FALSE
而 A => B1 AND B2
因此 A = FALSE。 这里我们就得到了矛盾。
因此假设是错的,A is false.
a*****c
发帖数: 2086
41
来自主题: Joke版 - 现在的考题很强大啊
反证法:
首先假设他说的命题A是真的。 Assume that A = TRUE
那么这里 [A为真] 就有2个暗示: B1 = [A命题是存在的]。 B2 = [A是真的]。
正式的写法: A => B1 AND B2 ( X=>Y表示 if X then Y 的逻辑关系)
B1 等价于命题 C1 = [梦中他告诉我说我正在梦中考试。]
B2 等价于命题 C2 = [我在梦中考试]
引入永真命题 M = [梦中的一切都不是真的]
于是我们知道 B1 与 B2 都不是真的。
B1 = C1 = FALSE
B2 = C2 = FALSE
B1 AND B2 = FALSE
而 A => B1 AND B2
因此 A = FALSE。 这里我们就得到了矛盾。
因此假设是错的,A is false.
n**********2
发帖数: 648
42
【 以下文字转载自 Programming 讨论区 】
发信人: xykkkk (asdf), 信区: Programming
标 题: 老码农冒死揭开行业黑幕:如何编写无法维护的代码(zz)
发信站: BBS 未名空间站 (Fri Nov 28 13:28:27 2014, 美东)
如何编写无法维护的代码
让自己稳拿铁饭碗 ;-)
– Roedy Green(翻译版略有删节)
简介
永远不要(把自己遇到的问题)归因于(他人的)恶意,这恰恰说明了(你自己的)无
能。 — 拿破仑
为了造福大众,在Java编程领域创造就业机会,兄弟我在此传授大师们的秘籍。这些大
师写的代码极其难以维护,后继者就是想对它做最简单的修改都需要花上数年时间。而
且,如果你能对照秘籍潜心修炼,你甚至可以给自己弄个铁饭碗,因为除了你之外,没
人能维护你写的代码。再而且,如果你能练就秘籍中的全部招式,那么连你自己都无法
维护你的代码了!
(伯乐在线配图)
你不想练功过度走火入魔吧。那就不要让你的代码一眼看去就完全无法维护,只要它实
质上是那样就行了。否则,你的代码就有被重写或重构的风险!
总体原则
Quidquid... 阅读全帖
s******g
发帖数: 5074
43
因为,你没有直接推翻我的逻辑图,而多增加了几个概念,
我想有必要把这几个概念的关系图理顺一下,才是。
我们现在有这样几个集合
1、信{}---------------起名为A集合
2、懂{}---------------起名为B集合
3、知道{}-------------起名为C集合
4、神{}---------------起名为D集合
5、性命攸关{}----------起名为E集合
6、悔改{}-------------起名为F集合
7、傻瓜{}---------------起名为G集合
前面,在我的图里是这样的。
因为单单是信{}和懂{}两个集合,所以没有必然的联系。
而你讲的呢,实际上是
A(D){},和B(D){}这两者的关系。
所以按照你的方式,是这样表达的,你看看这种表述有没有问题?
1、
A(D)&&(A(D)==false)
=>(C(A(D))=false)
&&((C(A(D))=false)=>A(D)==false)
2、
satement_1: (C(E)&&A(D)
B(D)&&(A(D)==false)
=>(satement_1==true)&&(
N*******8
发帖数: 1449
44
来自主题: TrustInJesus版 - 你相信没有神, 你有证据去证明吗?
请问老 E,你有能力证明神不不存在吗?
----------------------
发信人: Eloihim (真神), 信区: TrustInJesus
标 题: Re: 我相信沒有神(譯)
发信站: BBS 未名空间站 (Thu Apr 12 17:00:27 2012, 美东)
嘿嘿! 你有證據,我一定相信你。 你敢説有證據證明神不存在就不信神嗎?
-----------------------
请读下面这个文章.
http://www.philosophynow.org/issues/78/Wheres_The_Evidence
The New Atheism
Where’s The Evidence?
Michael Antony argues that the New Atheists miss the mark.
“A wise man,” wrote Hume, “proportions his belief to the evidence.” This
is a formulation of evidentialism – the view that a bel... 阅读全帖
C*******r
发帖数: 10345
45
来自主题: TrustInJesus版 - Is God a Taoist?
这是数学家,逻辑学家Smullyan对free will问题的一次尝试。Smullyan本人认为他自
己是道家哲学者。
Mortal:
And therefore, O God, I pray thee, if thou hast one ounce of mercy for
this thy suffering creature, absolve me of having to have free will!
God:
You reject the greatest gift I have given thee?
Mortal:
How can you call that which was forced on me a gift? I have free will,
but not of my own choice. I have never freely chosen to have free will. I
have to have free will, whether I like it or not!
God:
Why would you wish ... 阅读全帖
d******e
发帖数: 4192
46
来自主题: Wisdom版 - 学英语了啊,BITCH的意思
Word Story
How shocked and offended will people be if you use this word? Well, that all
depends on how you are using it and what you are referring to. Originally,
bitch simply meant a female dog, and it still does. But around the year
1400, it gained currency as a disparaging term for a woman, originally
specifically “a lewd or sensual woman,” and then more generally “a
malicious or unpleasant woman.” The word is first found used this way in
the Chester Plays of the 1400's, which has the line “... 阅读全帖
d******e
发帖数: 4192
47
来自主题: Wisdom版 - 学英语了啊,BITCH的意思
Word Story
How shocked and offended will people be if you use this word? Well, that all
depends on how you are using it and what you are referring to. Originally,
bitch simply meant a female dog, and it still does. But around the year
1400, it gained currency as a disparaging term for a woman, originally
specifically “a lewd or sensual woman,” and then more generally “a
malicious or unpleasant woman.” The word is first found used this way in
the Chester Plays of the 1400's, which has the line “... 阅读全帖
c**t
发帖数: 2292
48
来自主题: HuNan版 - 奥数题详解
不是学计算机的试着写一个。请教授和其他学计算机指正。
Class cleanSickDogs{

DogSet ds = new DogSet();
public static void checkDogs(DogSet allDogs, int foundOtherSickDogAmt)
{
if (allDogs.getSickDogAmt()<1) throw new Exception("CDC Sucks!");
Dog myDog;
if(iAmNWWolf)
myDog = new Dog(true);
else
myDog = new Dog(false);
int dayCounter = 1;
while(true)
{

if(dayCounter>foundOtherSickD... 阅读全帖
t********5
发帖数: 274
49
来自主题: DotNet版 - 求救一个小问题
我也认为是button的事件里写的
可是我找不到那个button相关的任何代码
是flash,整个页面主要都是flash的,我以前没接触过flash方面的编程,不知道您有
没有什么猜想,我顺着路子去找一找
table.aspx页面,就是有聊天窗口,有send按钮的这个页面
<%@ Page Title="" Language="VB" MasterPageFile="~/Shared/xxxx.master"
AutoEventWireup="false"
CodeFile="table.aspx.vb" Inherits="VNT_table" %>
"Server">

阅读全帖
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)