由买买提看人间百态

topics

全部话题 - 话题: false
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
k*****y
发帖数: 744
1
来自主题: JobHunting版 - leetcode上wild match
请问像 s = "abadabadabadeabecd", p = "*ab?c*d"这样的不用递归怎么办?
我也贴一个,大家帮忙看看,谢谢~
===========================
bool isMatch(const char* s, const char* p) {
if(*s == 0) return !hasNonStar(p);
if(*p == 0) return false;
if(*p != '*'){ //case: *p != '*'
while(*s && *p && *p!='*') {
if(*p!='?' && *p!=*s)
return false;
++p; ++s;
}
return isMatch(s, p);
}
else{ // case: *p == '*'
if(!skipStars(s, p)) return false;
... 阅读全帖
n*****g
发帖数: 16
2
来自主题: JobHunting版 - F面经
My version for C#.
static bool IsValidExpression(string expression)
{
Stack stackOperator = new Stack();
Stack stackOperand = new Stack();
int length = expression.Length;
int i;
char opr;
for (i = 0; i < length; ++i)
{
if (expression[i] == '(' || expression[i] == '+' ||
expression[i] == '-' || expression[i] == '*' || expression[i] == '/')
{
... 阅读全帖
n*****g
发帖数: 16
3
来自主题: JobHunting版 - F面经
My version for C#.
static bool IsValidExpression(string expression)
{
Stack stackOperator = new Stack();
Stack stackOperand = new Stack();
int length = expression.Length;
int i;
char opr;
for (i = 0; i < length; ++i)
{
if (expression[i] == '(' || expression[i] == '+' ||
expression[i] == '-' || expression[i] == '*' || expression[i] == '/')
{
... 阅读全帖
r***e
发帖数: 29
4
来自主题: JobHunting版 - BBC 编程风格面试题,求指教
我的答案(C++):
#pragma once
#ifndef _ROMON_HEADER_
#define _ROMON_HEADER_
#include
#include
using namespace std;
const string ROMON_DIGIT[] = {"","I","II","III","IV","V","VI","VII","VIII","
IV"};
//ROMON 0-9
const int ROMON_SCALE[] = {10, 50, 100, 500, 1000};
const char ROMON_SCALE_REP[] = {'X', 'L', 'C', 'D', 'M'};
//ROMON scale
const int ROMON_MAX = 3999;
const int ROMON_MIN = 1;
// rewrite the interface
class RomanNumeralGenerator
{
public:
virtual string generator(int n... 阅读全帖
S*******C
发帖数: 822
5
这答案不对,看我测试结果,IntFileIterator对象是mutable的
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 4, 8, 7, 6]
true
=====================
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 7, 6]
false
=====================
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 8, 7, 1, 6]
false
=====================
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 8, 7, 6, 3, 2]
false
=====================
[1, 2, 3, 4, 5, 4, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 7, 6]
false
=====================
[1, 2, 3, 4, 5, 4, 8, 7, 6]
[1, 2, 3, ... 阅读全帖
S*******C
发帖数: 822
6
你的代码测试结果
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 4, 8, 7, 6]
false
=====================
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 7, 6]
false
=====================
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 8, 7, 1, 6]
false
=====================
[1, 2, 3, 4, 5, 9, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 8, 7, 6, 3, 2]
false
=====================
[1, 2, 3, 4, 5, 4, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 7, 6]
false
=====================
[1, 2, 3, 4, 5, 4, 8, 7, 6]
[1, 2, 3, 4, 5, 9, 8, 7, 1, 6]
false
===... 阅读全帖
m*****g
发帖数: 71
7
JUnit test 代码
public class SolutionTest {
@Test
public void test() {
int[] a;
int[] b;
boolean expect;
Solution s = new Solution();
//both empty
a = new int[] {};
b = new int[] {};
expect = true;
testSolution(s, a, b, expect);
//empty and 1 element
a = new int[] {};
b = new int[] {1};
expect = true;
testSolution(s, a, b, expect);
//empty and 2 element all 0s
a =... 阅读全帖
S******a
发帖数: 2369
8
-End-
版主和今后的发帖人尤其注意第三条False Light.
In the United States today, "invasion of privacy" is a commonly used cause
of action in legal pleadings. Modern tort law includes four categories of
invasion of privacy:
1.Intrusion of solitude: physical or electronic intrusion into one's private
quarters.
2.Public disclosure of private facts: the dissemination of truthful private
information which a reasonable person would find objectionable
3.False light: the publication of facts which place a person in a fal... 阅读全帖
n********n
发帖数: 8336
9
The existence of God using logical absolutes
This is an attempt to demonstrate the existence of God using logical
absolutes. The oversimplified argument, which is expanded in outline form
below, goes as follows: Logical absolutes exist. Logical absolutes are
conceptual by nature--are not dependent on space, time, physical properties,
or human nature. They are not the product of the physical universe (space,
time, matter) because if the physical universe were to disappear, logical
absolutes w... 阅读全帖
c*******e
发帖数: 5818
10
我是不是 把下面的 “false” 都改成“true”, 就能修复了?
Get-SmbServerConfiguration
AnnounceComment :
AnnounceServer : False
AsynchronousCredits : 64
AuditSmb1Access : False
AutoDisconnectTimeout : 15
AutoShareServer : True
AutoShareWorkstation : True
CachedOpenLimit : 10
DurableHandleV2TimeoutInSeconds : 180
EnableAuthenticateUserSharing : False
EnableDownlevelTimewarp : False
EnableForcedLogo... 阅读全帖
k******i
发帖数: 80
f***8
发帖数: 641
12
不行啊。。。我右键单击得到那个视频的属性是framerate=25.
我试了把你给我的那个改成framerate=20/1就报错,但是改成framerate=25/1就OK。
你给我的那个是这样的:
gst-launch filesrc "location=1.MPG" ! decodebin ! video/x-raw-yuv, width=640
,height=480,framerate=25/1 ! ffmpegcolorspace ! jpegenc ! multipartmux !
tcpserversink host=192.168.2.1 port=5006
这个运行OK。但是如果直接写成framerate=25/1就报错。
于是我加了"!videoscale!"在decodebin和cap之间,又把framerate改成15:
gst-launch filesrc "location=1.MPG" ! decodebin ! videoscale ! video/x-raw-
yuv, width=640,height=480,framerate=15/1 ! ffm... 阅读全帖
c***z
发帖数: 6348
13
来自主题: Statistics版 - Random forests on imbalanced data (转载)
【 以下文字转载自 DataSciences 讨论区 】
发信人: chaoz (面朝大海,吃碗凉皮), 信区: DataSciences
标 题: Random forests on imbalanced data
发信站: BBS 未名空间站 (Fri Jun 20 12:54:36 2014, 美东)
Recently I used RF for imbalanced data (10% positive, 90% negative) and I
played with several tricks. Below are the comparison of results. We are most
concerned about false negatives.
Any comments and suggestions are extremely welcome!
1. vanilla version:
> randomForest(Relevant ~ ., data = train, ntree = 1000)
# prediction_1a FALSE TRUE
# a... 阅读全帖
c***z
发帖数: 6348
14
来自主题: DataSciences版 - Random forests on imbalanced data
Recently I used RF for imbalanced data (10% positive, 90% negative) and I
played with several tricks. Below are the comparison of results. We are most
concerned about false negatives.
Any comments and suggestions are extremely welcome!
1. vanilla version:
> randomForest(Relevant ~ ., data = train, ntree = 1000)
# prediction_1a FALSE TRUE
# actual
# FALSE 22667 83
# TRUE 523 1723
acc = 0.9757561
2. lower threshold (predict TRUE if pro... 阅读全帖
c********t
发帖数: 5706
15
贴个我的吧,一堆if, 大家轻拍
public boolean isSymmetric(TreeNode root) {
// Start typing your Java solution below
// DO NOT write main() function
if(root == null) return true;

if(root.left == null && root.right == null) return true;
if(root.left == null || root.right == null) return false;

Stack s1= new Stack();
Stack s2= new Stack();


s1.push(root.left);
s2.push(roo... 阅读全帖
c********t
发帖数: 5706
16
贴个我的吧,一堆if, 大家轻拍
public boolean isSymmetric(TreeNode root) {
// Start typing your Java solution below
// DO NOT write main() function
if(root == null) return true;

if(root.left == null && root.right == null) return true;
if(root.left == null || root.right == null) return false;

Stack s1= new Stack();
Stack s2= new Stack();


s1.push(root.left);
s2.push(roo... 阅读全帖
b*******e
发帖数: 217
17
来自主题: JobHunting版 - 一道面试题:三等分数组
for i == 0, only exist(0, 4, 0) and exist(0, 0, 4) = true. all other
comibinations for i == 0 including exist(0, 4, 10) = false and exist(0, 10,
4) = false, so exist(1, 10, 10) = false.
for i == 1, exist(1, 10, 0) = exist(0, 4, 0 ) || exist(0, 10, -6) = true ||
false. and exist(1, 0, 10) = exist(0, -6, 10) || exist(0, 0, 4) = false ||
true and exist(1, 4, 6) = exist(0, 4, 0) || exist(0, -2, 0) = true || false
and
exist (1, 6, 4) = exist(0, 0, 4) || exist(0, 6, -2) = true || false will be
true. ... 阅读全帖
b*******e
发帖数: 217
18
来自主题: JobHunting版 - 一道面试题:三等分数组
exist(3, 10, 10)
= exist(2, 10-4, 10) || exist(2, 10, 10-4)
= exist(2, 6, 10) || exist(2, 10, 6) = false || false = false already.
let us continue from i == 2 to i== 1
= exist(1, 3, 10) || exist(1, 6, 7) || exist(1, 7, 6) || exist(1, 6, 7)
= false || false || false || false.
we can continue from i == 1 to 0.
also we can find it is false.
So exist(3, 10, 10) = false. That indicates 6 are not used for multiple
times.
Otherwise exist(3, 10, 10) should be true.

to
6,
k**********i
发帖数: 36
19
►►►Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, const char *p)
Some examples:
isMatch("aa","a") → false
isMatch("aa","aa") → true
isMatch("aaa","aa") → false
isMatch("aa", "a*") → true
isMatch("aa", ".*") → true
isMatch... 阅读全帖
m********0
发帖数: 2717
20
The thing is the it's not a graph for any stock. I just make it with the
following R code,
require(TTR)
ret<-cumsum(rnorm(252,sd=0.036))
ret2<-exp(ret)
p<-50*ret2
ma20<-SMA(p,20)
ema20<-emaTA(p,20)
ema50<-emaTA(p,50)
plot(p, type="l")
lines(ema20, type="l",col='green')
lines(ema50, type="l",col='red')
and I used lognormal distribution for the returns, textbook assumptions
for
a big group of models.
skeptic(as exists everywhere), yes, I borrowed this idea from ET. Please
don
't rush to criticize,... 阅读全帖
J**********7
发帖数: 2619
21
来自主题: Fishing版 - 买卖提鱼版的常态
来,我学宗师们点评一下。

false
false
false
false
false
false
false
false
false
maybe true.
l**********n
发帖数: 201
22
已经有discussion了,至少在某些领域。去Science上留comments吧:
http://www.sciencemag.org/content/335/6076/1558.full
Science 30 March 2012:
Vol. 335 no. 6076 pp. 1558-1561
DOI: 10.1126/science.335.6076.1558
News Focus
Psychology Research
Psychology's Bold Initiative
Siri Carpenter*
In an unusual attempt at scientific self-examination, psychology researchers
are scrutinizing the reproducibility of work in their field.
Pick up the January 2008 issue of Psychological Science, turn to page 49,
and you'll find a... 阅读全帖
w*******y
发帖数: 60932
23
Best Buy Media Free Ship Link:
http://www.bestbuy.com/site/Misc/Entertainment-Free-Shipping/pc
Out of my league on what is a good deal with media, but some low prices
coupled with free ship might be a deal for some. Not everything in the links
are deals, but some of the things in the links are, and some things are
ymmv.
I would use the links below to add to the cart, and if free shipping does
not auto appear, then open link at top of OP to checkout.
Movies and TV Shows:
http://www.bestbuy.com/si... 阅读全帖
v**********m
发帖数: 5516
24
来自主题: _pennystock版 - soros的精神导师:Karl Popper的生平
Sir Karl Raimund Popper, CH FRS[1] FBA (28 July 1902 – 17 September 1994)
was an Austro-British[2] philosopher and a professor at the London School of
Economics.[3] He is regarded as one of the greatest philosophers of science
of the 20th century;[4][5] he also wrote extensively on social and
political philosophy.
Popper is known for his attempt to repudiate the classical observationalist
/ inductivist form of scientific method in favour of empirical falsification
. He is also known for his oppo... 阅读全帖
s******r
发帖数: 5309
25
来自主题: Military版 - 女疮轮把儿子扔公车底下给废了
大妈疮轮是疮轮里的战斗机。 这儿子再也别想找女朋友,更别提当海军了。有个疮轮
娘还不如死了算了。
‘This is MY son’: Navy vet horrified as mom’s tweet miscasts him as #
HimToo poster boy — and goes viral
Pieter Hanson then and now. (Courtesy of Pieter Hanson)
By Meagan Flynn October 9 at 5:51 AM
Pieter Hanson was in the middle of a marketing exam when his phone started
blowing up, buzzing and buzzing until he was convinced something terrible
had happened. Too anxious to focus, he whizzed through the rest of his test,
handed it in to his Univers... 阅读全帖
d***p
发帖数: 937
26
来自主题: USANews版 - 看看创粉是如何获取新闻的。
终于知道为什么创粉老是传播假新闻了。创粉喜欢听创普的好话。 喜欢听攻击希拉里
的新闻,不管真假。于是欧洲前那斯拉夫的Macedonia一个镇的年轻人创建了一百多个
支持创普的政治网站。这些网站Link到Facebook。为了从Facebook吸引Followers,这
些网站专门制作有利于trump的假新闻,吸引创粉制造流量来赚钱。
https://www.buzzfeed.com/craigsilverman/how-macedonia-became-a-global-hub-
for-pro-trump-misinfo?utm_term=.lmRqPXXNb#.msoL6zzD2
How Macedonia Became A Global Hub For Pro-Trump Misinformation
BuzzFeed News identified more than 100 pro-Trump websites being run from a
single town in the former Yugoslav Republic.
posted on Nov. 3, 201... 阅读全帖
p******e
发帖数: 897
27
来自主题: USANews版 - Duping Trump Supporters With Fake News
“This is the news of the millennium!” said the story on WorldPoliticus.com
. Citing unnamed FBI sources, it claimed Hillary Clinton will be indicted in
2017 for crimes related to her email scandal.
“Your Prayers Have Been Answered,” declared the headline.
For Trump supporters, that certainly seemed to be the case. They helped the
baseless story generate over 140,000 shares, reactions, and comments on
Facebook.
Meanwhile, roughly 6,000 miles away in a small town in the former Yugoslav
Republic of... 阅读全帖
i**9
发帖数: 351
28
来自主题: JobHunting版 - 判断 bst 疑问
很多人给出的答案
int isBST(struct node* node) {
if (node==NULL) return(true);
// false if the max of the left is > than us
// (bug -- an earlier version had min/max backwards here)
if (node->left!=NULL && maxValue(node->left) > node->data)
return(false);
// false if the min of the right is <= than us
if (node->right!=NULL && minValue(node->right) <= node->data)
return(false);
// false if, recursively, the left or right is not a BST
if (!isBST(node->left) || !isBST(node->right))
... 阅读全帖
l*********8
发帖数: 4642
29
来自主题: JobHunting版 - leetcode上wild match
贴一下我的程序,通过了leetcode judge.
感觉还是有些繁琐.
class Solution {
public:
bool isMatch(const char *s, const char *p) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
if(!s || !p)
return false;
if(p[0] == '\0' && s[0] != '\0')
return false;
const char * star = NULL;
const char * nextStar = NULL;
if (p[0] == '*') {
star = p;
p++;
}
while (1) {
n... 阅读全帖
k*********6
发帖数: 738
30
来自主题: JobHunting版 - [难题求助] leetcode wordsearch
public class Solution {
public boolean exist(char[][] board, String word) {
// Start typing your Java solution below
// DO NOT write main() function
//DFS
if (word == null || word.length() == 0) return true;
if (board == null || board.length == 0|| board[0].length == 0)
return false;

boolean[][] visited = new boolean[board.length][board[0].length];

for (int i = 0; i < board.length; i++)
{
for(int j = ... 阅读全帖
m*****i
发帖数: 10
31
public boolean isMultiple(String s) {
if(s==null || s.length()==0)
return true;
int maxInterval = 1;
HashMap map = new HashMap();
char[] chs = s.toCharArray();
for(int i=0; i if(!map.containsKey(chs[i]))
map.put(chs[i], i);
else{
int pre = map.get(chs[i]);
if(maxInterval<(i-pre)){
maxInterval ... 阅读全帖
m*****i
发帖数: 10
32
public boolean isMultiple(String s) {
if(s==null || s.length()==0)
return true;
int maxInterval = 1;
HashMap map = new HashMap();
char[] chs = s.toCharArray();
for(int i=0; i if(!map.containsKey(chs[i]))
map.put(chs[i], i);
else{
int pre = map.get(chs[i]);
if(maxInterval<(i-pre)){
maxInterval ... 阅读全帖
n********n
发帖数: 529
33
这是我当时写的,1个半小时左右吧。
/////////////////////////////////////////////////////
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.HashMap;
import java.util.HashSet;
public class TestForSalesforce {
// Variable to track the dependencies
HashMap> deps = new HashMap String>>();
// Variable to track the installed commands
HashMap ins = new HashMap();

public boolean... 阅读全帖
d*****a
发帖数: 3
34
贴一下我的代码,为了测试方便,我用的是char*代替的iterator,只要不往回走,意思
应该是一样的。大牛帮忙看看有没有什么问题
bool isDistanceZeroOrOne(const char *a, const char *b)
{
bool insertA = false;
bool insertB = false;
bool replace = false;
bool diff = false;
char preA;
char preB;
while (*a != '\0' && *b != '\0')
{
if (!insertA && !insertB && !replace)
{
if (*a != *b)
{
insertA = true;
insertB = true;
replace = true;
... 阅读全帖
S*******C
发帖数: 822
35
下面答案能过所有test case,如果谁发现有错请告诉我
public boolean isDistanceZeroOrOne(IntFileIterator a, IntFileIterator b)
{
boolean ins_a = false, ins_b = false, replace = false, diff = false;
int pre_a = 0, pre_b = 0;
while (a.hasNext() && b.hasNext()) {
int cur_a = a.next(), cur_b = b.next();
if (!ins_a && !ins_b && !replace) {
if (cur_a != cur_b) {
ins_a = ins_b = replace = diff = true;
}
} else {... 阅读全帖
l*******t
发帖数: 79
36
题目就是find all primes less or equal than n,要求体现OOD和写unit test。求拍
砖,多谢各位!
ps:不确定如果面试中让写C++ unit test,不用gtest, boost.test这些库,写成这样
可以吗?。。。因为之前自己写代码没有养成写unit test的习惯,感觉不太规范。。
#include
#include
#include
#include
#include
using namespace std;
class PrimeFinder {
friend class PrimeFinderTest;
public:
PrimeFinder(int n = 2) {
is_prime_.push_back(false);
is_prime_.push_back(false);
is_prime_.push_back(true);
primes_.... 阅读全帖
l******n
发帖数: 9344
37
题目是decision making的inference,需要根据给定的条件判断给出信息的可信度。有
点像GRE的逻辑题,但是思维过程不一样。
题目如下:
Statement:
Studies have shown that there is relatively much more heart
disease among people living in the north of England than
people living in the south of England. There is little if any
difference, however, in rate of heart disease between
northerners and southerners who have the same level of
income. The average income of southerners in England is
considerably higher than the average income of northerners.
Propose... 阅读全帖
x********o
发帖数: 2092
38
来自主题: Stock版 - 如何从yahoo下载OPTION数据?
不知道他们是怎么用的。我上班看option的macro用下面的代码。
对于call:
Call yahoo_stock_option_query('aapl', '2012-03', "10")
put用这个:
Call yahoo_stock_option_query('aapl', '2012-03, "14")
yahoo_stock_option_query代码:
Private Sub yahoo_stock_option_query(tickname As String, expdate As String,
position As String)

Worksheets("Temp").Activate
Worksheets("Temp").Cells.Clear
Range("A1").Select

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://finance.yahoo.com/q/op?s=" & tickname & "&m=" ... 阅读全帖
l*******t
发帖数: 78
39
换过车闸,换过timing belt, 换过泵,换过车胎。电池,运行的非常好,
后车杠,排气管和前面表面有轻微损伤,但表面总体很好。
黑车,内部灰色。
有意者电话;765-878-4755
Email:s******[email protected]
http://www.cargurus.com/Cars/inventorylisting/viewDetailsFilter
ewDetailsFilterViewInventoryListing.action?sourceContext=forSaleTab_true_0&
newSearchFromOverviewPage=true&cgLocale=en&embedType=NONE&
entitySelectingHelper.selectedEntity=c4006&entitySelectingHelper.
selectedEntity2=&uncached=false&showInactive=false&newCarsOnly=false&
useInventoryService=false&name=entitySelect... 阅读全帖
s*****5
发帖数: 69
40
来自主题: LosAngeles版 - 网上驾校gototrafficschool通过回馈贴
找网上驾校,版上推荐gototrafficschool.com, 找历史题目贴,安全通过。final
Exam只能考两次有点紧张,但一次就过了,现将最后考试题目回馈mitbbs.
Congratulations!
You passed the final exam!
You got 25 questions correct.
Review the Correct Answers
1. Diamond lanes, with the exception of motorcycles and certain hybrid
vehicles in California, are reserved for vehicles with:
A. children
B. the elderly
Correct C. two or more people
D. four or more people
2. ________ refers to speeding without realizing it.
A. highway hypnosis... 阅读全帖
G*******s
发帖数: 4956
41
Blinded By Tradition:
An Open Letter to Dave Hunt
Regarding His Newly Published Attack Upon the Reformation, What Love Is This
? Calvinism's Misrepresentation of God
James White
Updated 5/16/02, see bottom of file
Dear Dave,
In the period of time since I finally received my own copy of your book (you
may recall I scanned through it while standing at your table in St. Louis a
t the PFO Conference) I have gone through a number of different emotions. A
t first I was just going to do one Dividing ... 阅读全帖
f*******8
发帖数: 3612
42
这是一个将RFC 文件转换成 kindle格式的程序,
来自:
https://github.com/pingwin/RFC-2-Kindle
我是windows上的python 2.71, 运行完全仿照该网站的要求
结果出来是找不到font MONOSPACE, 不知道MONOspace是不是个字体库或别的什么。
running output:
D:\>rfctxt2kindlehtml.py -i rfc791.txt -o rfc791.html && ./ki
ndlegen rfc791.html
Unable to find font: /usr/share/cups/fonts/Monospace
Convert IETF RFC TXT file to HTML for kindlegen
-h --help This message
-v verbosity
-i --input input file
-o --output output file
-f --font font file to use for monospace ... 阅读全帖
m******r
发帖数: 1033
43
来自主题: Programming版 - 两个简单R代码(坑?)求解[factor]
那你帮忙看看一下两段?(都是从?factor 来的, 我稍作改动)
x <- factor(c(1, 2, NA) , exclude = NULL)
is.na(x)
结果FALSE FALSE FALSE
x <- factor(c(1, 2, NA) , exclude = NA)
is.na(x)
结果FALSE FALSE TRUE
我知道NA 和 NULL的区别。
NA 是missing value indicator, length =1
NULL 是NULL object
我都搞不清楚exclude = NULL是啥意思。
exclude = NULL 可以是说, 所有level允许。
exclude = NULL 也可以说, 要把NULL object 排出, 因为它在exclusion list上面。
(对这个题目, NA应该允许存在)
无论怎样解释, 第一段代码为啥得出FALSE FALSE FALSE的结果??
n*******y
发帖数: 437
44
来自主题: DataSciences版 - 请教一道概率题
跟我前两天做的笔试题好像,
我用模拟做了,但是运行速度好慢,
而且我为了加快速度已经做了一些优化:
1) size大的variable用节省存储空间的data type,比如本来用0,1表示座位是不是
available,但是matlab默认0,1是double精度,我现在规定是binary datatype: True/
False
2) 本来是每轮在available的座位中随机产生的下一个要坐的座位,现在改为在一开始
产生全部的随机数(1-N的permutation)
code在这里(Matlab),大家能不能帮我看看怎样提高速度,谢谢~
clear;
N = 25; %N = 50000; % how many seats in total
repeat = 1e6;
% count how many seats are taken
count = zeros(repeat, 1, 'uint16'); % uint16: 0-65535
for i = 1:repeat % repeat simulations

disp(i);

seq =... 阅读全帖
y***o
发帖数: 145
45
对骂的好, 所以美国政府也同情我的遭遇, 来帮助我。中国领事馆也同情我帮助。
就是有几个国男为拉自身的利益表面根我做朋友, 实际替那个法官做写手。
看一下白人律师帮我免费写的 petition, 我只有到December 2012 只前可以file 到法
庭。 就碰到一批汉奸骂街:你们自己看一看国南跟白南的区分把:
WAN TIN
219 South 2nd Avenue, #D
Arcadia, California 91006
Phone: 626-343-4080
Email: w********[email protected]
WAN TIN, Petitioner In Pro Per
SUPERIOR COURT OF THE STATE OF CALIFORNIA
COUNTY OF LOS ANGELES – CENTRAL DISTRICT
UNLIMITED JURISDICTION
WAN TIN,
Petitioner,
vs.
LOS ANGELES COUNTRY DEPARTMENT OF CHILDREN AND F... 阅读全帖
G****r
发帖数: 5579
46
http://www.fbi.gov/baltimore/press-releases/2014/chinese-nation
Chinese National Pleads Guilty in Scheme to Fraudulently Obtain Technology
Products from U.S. Companies
Sought to Fabricate an Infrared Detector for Night Vision, Missile Detection
, and Other Military Applications
U.S. Attorney’s Office July 02, 2014
District of Maryland (410) 209-4800
GREENBELT, MD—Zhenchun Huang, a/k/a Ted Huang, age 51, a Chinese national
and naturalized U.S. citizen, formerly residing in Clarksville, Ma... 阅读全帖
h******n
发帖数: 674
47
留学美国 脱颖而出成为“首席科学家”
黄振春,1963年出生在江苏镇江市扬中的一个农家。他1980年考取南京大学物理系,
1984年获学士学位,1987年获半导体专业硕士学位,继而被分配到北京国家教委科技管
理中心工作。
在美国,黄振春是一位声望极高的风云人物,他担任着华盛顿地区最大的华人社团“华
盛顿中国大陆大专院校校友联合会”会长。1999年,在国家主席江泽民和 总理朱鎔基
访美期间,他曾作为杰出学者受到亲切接见。1999年,他以“旅美杰出青年科学家”的
身份应邀回国参加50周年国庆庆典活动。作为侨 界领袖,他多才多艺,虽身兼数职却
仍能事事得心应手,在澳门回归、中美撞机事件等重大事件发生时,黄振春身在海外却
始终以拳拳赤子之心与祖国共荣辱。
1996年,他终于等到了机会。他获得了中国国家自然科学基金会杰出青年科学家基金,
并被聘任为南京大学物理系教授,与南京大学开展长期的产学研合作。此时,在他的心
里,已经埋下了随时准备回国创业的种子。
黄振春经常说,20世纪是出国热,本世纪将是回国热。以已所长回报祖国,也因此成了
萦绕在他心头多年的夙愿。
他的很多朋友对他的这个“种子”却不怎么... 阅读全帖
b*****n
发帖数: 2324
48
来自主题: Military版 - est