e*****w 发帖数: 144 | 1 加减乘,没用+-*/号。
#include
using namespace std;
int Add(int a, int b) {
return (b ? Add(a ^ b, (a & b) << 1) : a);
}
int Sub(int a, int b) {
return Add(a, Add(~b, 1));
}
int Mul(int a, int b) {
if (b == 0) return 0;
if (b < 0) return Mul(Sub(0, a), Sub(0, b));
return Add(a, Mul(a, Sub(b, 1)));
}
int main() {
cout << "Add(3, 4) = " << Add(3, 4) << endl;
cout << "Add(3, -8) = " << Add(3, -8) << endl;
cout << "Add(-8, 40) = " << Add(-8, 40) << endl;
cout << "Sub(3, 4) = " <<... 阅读全帖 |
|
e*****w 发帖数: 144 | 2 加减乘,没用+-*/号。
#include
using namespace std;
int Add(int a, int b) {
return (b ? Add(a ^ b, (a & b) << 1) : a);
}
int Sub(int a, int b) {
return Add(a, Add(~b, 1));
}
int Mul(int a, int b) {
if (b == 0) return 0;
if (b < 0) return Mul(Sub(0, a), Sub(0, b));
return Add(a, Mul(a, Sub(b, 1)));
}
int main() {
cout << "Add(3, 4) = " << Add(3, 4) << endl;
cout << "Add(3, -8) = " << Add(3, -8) << endl;
cout << "Add(-8, 40) = " << Add(-8, 40) << endl;
cout << "Sub(3, 4) = " <<... 阅读全帖 |
|
g********n 发帖数: 2314 | 3 【 以下文字转载自 SanFrancisco 讨论区 】
发信人: dadabear (bless you), 信区: SanFrancisco
标 题: [合集] goldenrain的观点未免偏颇
发信站: BBS 未名空间站 (Thu Feb 8 16:24:51 2007), 站内
☆─────────────────────────────────────☆
MSJ (Mission San Jose) 于 (Tue Feb 6 00:42:38 2007) 提到:
看完他blog的《现在在哪里买房风险小》,我只能笑着摇摇头。在我眼里,这个列表与
其说是“风险小”列表,不如说是“房子难涨地区列表”。试论证一二:
1. 常言道“强者恒强,弱者恒弱”。NYC, SF地区房价高企不是一年两年了,支撑房价
的不是那个affordability的percentage,而是能afford的人口数和房子总数的比例。
这里看百分比是没有多大意义的。只要还有人能买得起还愿意买,即使affordability
只有15%又如何呢?
2. 正如high tech公司的P/E要远大于... 阅读全帖 |
|
L**a 发帖数: 2720 | 4 拿到手不过半年,没用过几次。今天在target买了
点东西, 回家以后打算再充点钱,但是怎么也充不上,没过几
分钟就收到下面的邮件:
Hello LUDA,
During a recent review of your Target Prepaid REDcard® Account we
noticed activity that was in violation of the Prepaid REDcard Member
Agreement, section:
Section 15 D
Due to the violation, your Account has been closed.
If you have any questions, please call Account Protection Services at 1-800-
555-4318.
Thanks,
Target Prepaid REDcard by American Express
Customer Service I Privacy Statement
We kindly ask you not... 阅读全帖 |
|
p**i 发帖数: 163 | 5 小白。
长期看好股票, 如果想投75%的stock是选”LargeCap S&P 500 Index Separate
Account“吗?
还有25%买什么比较好?
Morley Capital Management
Principal Stable Value Sig Fund
$0.00
0.00%
%
Fixed Income BlackRock Financial Mgmt, Inc.
Inflation Protection Separate Account
$0.00
0.00%
%
Fixed Income Mellon Capital Mgmt
Bond Market Index Separate Account
$0.00
0.00%
%
Fixed Income Principal Global Investors
High Yield Separate Account
$0.00
0.00%
%
Fixed Income Principal Global Investors
Income Separate ... 阅读全帖 |
|
|
t*********u 发帖数: 26311 | 7 【 以下文字转载自 ebiz 讨论区 】
发信人: LuDa (智深), 信区: ebiz
标 题: 悲剧了,target红鸟卡被关
发信站: BBS 未名空间站 (Sun Sep 27 02:03:20 2015, 美东)
拿到手不过半年,没用过几次。今天在target买了
点东西, 回家以后打算再充点钱,但是怎么也充不上,没过几
分钟就收到下面的邮件:
Hello LUDA,
During a recent review of your Target Prepaid REDcard® Account we
noticed activity that was in violation of the Prepaid REDcard Member
Agreement, section:
Section 15 D
Due to the violation, your Account has been closed.
If you have any questions, please call Account Protection Services at 1-800-
555-4... 阅读全帖 |
|
V*s 发帖数: 2452 | 8 上上周把balance搞成了0,今天尝试online用checking account load 200刀,然后失
败,告诉我打电话过去合适信息。然后马上收到邮件告诉我账户被关闭了。也不能登录
了。。。
有人遇到过这个问题吗?
During a recent review of your Target Prepaid REDcard® Account we
noticed activity that was in violation of the Prepaid REDcard Member
Agreement, section:
Section 15 D
Due to the violation, your Account has been closed.
If you have any questions, please call Account Protection Services at 1-800-
555-4318.
Agreement在这里
https://amex.serve.com/prepaidredcard/legal/#PrepaidREDcard_U... 阅读全帖 |
|
x********o 发帖数: 519 | 9 here is the C++ code:
#include
#include
#include
using namespace std;
void print_vector(const vector &v){
vector::const_iterator iter=v.begin();
while(iter!=v.end()){
cout<<*iter<<" ";
++iter;
}
cout<
}
void subset(vector v, vector sub, int size,set > &s){
if(sub.size()==size){
sort(sub.begin(),sub.end());
s.insert(sub);
return;
}
vector::iterator iter=v.begin();
size_t l=v.size();
for(int ... 阅读全帖 |
|
b**********e 发帖数: 400 | 10 1,报上自己2012赛季的milage,1000mi/包子,向上取整;
1313.4 Miles
2,去年这时候都做了2012规划吧,现在该算帐了,说说自己几项达标了;
Run first half marathon -- Check
5K Sub 22:00 -- Failed
8K/5Miles Sub 40:00 -- Check
10K Sub 50:00 -- Check
15K Sub 1:15:00 -- Check
HM Sub 2:00:00 -- Check
3,展望2013赛季,大胆的规划吧,200mpw不算多,252不算快
Run first full marathon
1500 Miles
5K Sub 21:30
8K/5Miles Sub 35:00
10K Sub 43:00
15K Sub 1:10:00
HM Sub 1:40:00
FM Sub 3:50:00 |
|
f*******l 发帖数: 1239 | 11 【 以下文字转载自 Joke 讨论区 】
发信人: xiaopo (po), 信区: Joke
标 题: 今天在subway教育了一群中国小留 (转载)
发信站: BBS 未名空间站 (Sun Apr 3 13:02:59 2011, 美东)
发信人: Dreamer (不要问我从哪里来), 信区: Dreamer
标 题: 今天在subway教育了一群中国小留
发信站: BBS 未名空间站 (Sat Apr 2 12:15:44 2011, 美东)
做为一名有品位、有素质、月薪1600的高级时尚doctoral student,无论走在哪里,我都是众人瞩目的焦点。
今天是星期6,我脱下了彰显身份的白大褂,换上了hoodie,抛弃了我引以为豪高贵的身份,去街上体察体验穷人的生活。马路上熙熙攘攘,人们纷纷因为我的高雅气质投来了仰慕的目光,而我则高傲地昂着头,因为高调是的我的座右铭。
这时我路过了subway。我一看到门口贴着的广告,开始觉得有点肚子饿了,只有高贵的sub才能吸引对饮食极为讲究的高雅的我。我于是高昂着头走了进去。
我担心自己高贵的身份被人仰慕太多,影响我就餐,于是把... 阅读全帖 |
|
W********w 发帖数: 771 | 12 看到这个Email:
The San Diego Unified School District Board of Education has initiated a
redistricting process that will balance the populations of the five Board of
Education Sub-Districts using 2010 Census data as required by law. The
Board has appointed a five member Redistrict Advisory Committee that has
begun work to prepare a recommended map with new sub district boundaries
that balance population and consider communities of interest and ethnic
populations.
Since the 2000 Census, population ch... 阅读全帖 |
|
d**********g 发帖数: 2014 | 13 这个网站挺好的。
http://www.best9mm.com/compact9mm.html
我感觉先从轻的开始挑。
Compact 9mm Pistols for Concealed Carry
We didn't do a "best list" because your personal requirements for a
concealed carry pistol will not always be the same as ours.
The rules for the 9mm CCW list: Weigh 30 ounces or less, barrel 4.1 inches
or shorter, and cost less than $600 from a dealer. Most confrontations will
be at 7 yards or less, so any choice you make from the below list should be
good for concealed carry. Some of these compa... 阅读全帖 |
|
w**********g 发帖数: 2077 | 14 2010年休士顿马拉松报告 - 英文版
Houston, My Kind of Town
Goal:
After BQ in Houston last year, I was a little lost on this marathon thing. I
loved running and racing, but marathon has too many variables. Even though
I just pulled one without potty stop, I hated it, the last week carb load,
the long recovery time etc. Two years of non-stop training to BQ didn't help
the mood either. I thought of retiring from marathon and just focusing on
short distance like half. The only thing that still intrigued me was
br... 阅读全帖 |
|
x****o 发帖数: 21566 | 15 【 以下文字转载自 Dreamer 讨论区 】
发信人: Dreamer (不要问我从哪里来), 信区: Dreamer
标 题: 今天在subway教育了一群中国小留
发信站: BBS 未名空间站 (Sat Apr 2 12:15:44 2011, 美东)
做为一名有品位、有素质、月薪1600的高级时尚doctoral student,无论走在哪里,我都是众人瞩目的焦点。
今天是星期6,我脱下了彰显身份的白大褂,换上了hoodie,抛弃了我引以为豪高贵的身份,去街上体察体验穷人的生活。马路上熙熙攘攘,人们纷纷因为我的高雅气质投来了仰慕的目光,而我则高傲地昂着头,因为高调是的我的座右铭。
这时我路过了subway。我一看到门口贴着的广告,开始觉得有点肚子饿了,只有高贵的sub才能吸引对饮食极为讲究的高雅的我。我于是高昂着头走了进去。
我担心自己高贵的身份被人仰慕太多,影响我就餐,于是把hoodie帽子翻了上去。
subway的服务员小姐一看身着hoodie的我来了,连忙亲切地说:“欢迎光临!”我微笑着朝她们挥手致意。我掏出的鼓鼓的钱包,来到一个柜台,说:“给我两个six inch ... 阅读全帖 |
|
s********1 发帖数: 581 | 16 请教有关header file的几个问题
假设sub.h 和 sub.c 是header file 和与其对应的source file.
(1) 在sub.c开始都有 #include "sub.h"
我试着delete 以上的语句,compile和run时都没有问题。#include "sub.h"
在sub.c中,#include "sub.h" 是否多余??
(2) 试着将sub.h的name 改成 subbbbb.h, 结果也没有问题,是否header file 和与其
对应的source file 名字可以完全不一样?
(3) 又试着去掉.h, 并把heade file 的名字改成:
sub.h ----〉 subbbbb.c
再把main program 中开头的部分改成 #include "subbbbb.c"。 结果也没有问题。
.c 和 .h file 到底有没有不同?
(4) 将#include "subbbbb.c" (或者#include "subbbbb.h", #include "sub.h")
|
|
s********1 发帖数: 581 | 17 请教有关header file的几个问题
假设sub.h 和 sub.c 是header file 和与其对应的source file.
(1) 在sub.c开始都有 #include "sub.h"
我试着delete 以上的语句,compile和run时都没有问题。#include "sub.h"
在sub.c中,#include "sub.h" 是否多余??
(2) 试着将sub.h的name 改成 subbbbb.h, 结果也没有问题,是否header file 和与其
对应的source file 名字可以完全不一样?
(3) 又试着去掉.h, 并把heade file 的名字改成:
sub.h ----〉 subbbbb.c
再把main program 中开头的部分改成 #include "subbbbb.c"。 结果也没有问题。
.c 和 .h file 到底有没有不同?
(4) 将#include "subbbbb.c" (或者#include "subbbbb.h", #include "sub.h")
|
|
s********1 发帖数: 581 | 18 请教有关header file的几个问题
假设sub.h 和 sub.c 是header file 和与其对应的source file.
(1) 在sub.c开始都有 #include "sub.h"
我试着delete 以上的语句,compile和run时都没有问题。#include "sub.h"
在sub.c中,#include "sub.h" 是否多余??
(2) 试着将sub.h的name 改成 subbbbb.h, 结果也没有问题,是否header file 和与其
对应的source file 名字可以完全不一样?
(3) 又试着去掉.h, 并把heade file 的名字改成:
sub.h ----〉 subbbbb.c
再把main program 中开头的部分改成 #include "subbbbb.c"。 结果也没有问题。
.c 和 .h file 到底有没有不同?
(4) 将#include "subbbbb.c" (或者#include "subbbbb.h", #include "sub.h")
|
|
s********1 发帖数: 581 | 19 请教有关header file的几个问题
假设sub.h 和 sub.c 是header file 和与其对应的source file.
(1) 在sub.c开始都有 #include "sub.h"
我试着delete 以上的语句,compile和run时都没有问题。#include "sub.h"
在sub.c中,#include "sub.h" 是否多余??
(2) 试着将sub.h的name 改成 subbbbb.h, 结果也没有问题,是否header file 和与其
对应的source file 名字可以完全不一样?
(3) 又试着去掉.h, 并把heade file 的名字改成:
sub.h ----〉 subbbbb.c
再把main program 中开头的部分改成 #include "subbbbb.c"。 结果也没有问题。
.c 和 .h file 到底有没有不同?
(4) 将#include "subbbbb.c" (或者#include "subbbbb.h", #include "sub.h")
|
|
s********1 发帖数: 581 | 20 请教有关header file的几个问题
假设sub.h 和 sub.c 是header file 和与其对应的source file.
(1) 在sub.c开始都有 #include "sub.h"
我试着delete 以上的语句,compile和run时都没有问题。#include "sub.h"
在sub.c中,#include "sub.h" 是否多余??
(2) 试着将sub.h的name 改成 subbbbb.h, 结果也没有问题,是否header file 和与其
对应的source file 名字可以完全不一样?
(3) 又试着去掉.h, 并把heade file 的名字改成:
sub.h ----〉 subbbbb.c
再把main program 中开头的部分改成 #include "subbbbb.c"。 结果也没有问题。
.c 和 .h file 到底有没有不同?
(4) 将#include "subbbbb.c" (或者#include "subbbbb.h", #include "sub.h")
|
|
p*****2 发帖数: 21240 | 21 一个String有sub string 和 sub sequence.
sub string大家都知道,sub sequence就是可以不连续的sub string。
比如abc, ab, bc 都是substring, 而ac不是。但是,ac也是sub sequence。
现在给两个String, s和t
那么在s里选取一个substring, 在t里选取一个sub sequence,使得他们相等。
问可以选取多少种组合。sub string , sub sequence 内容相等不要紧,只要有字符的
位置不同就认为是不同的string。
比如
s: "aa"
t: "aa"
ans: 5 |
|
l*********8 发帖数: 4642 | 22 先找sum等于给定数字的sub-array, 然后检查这个sub-array的product是否满足要求。
下面算法找sum等于给定数字的sub-array
input:
int a[]; // array
int n; // array size
Step 1, sort the input array a[] O(nlogn)
Step 2, 找到a[]中的第一个正数, 记下标为 indexP;
Step 3, 在 a[0 ... indexP-1] (负数和零部分)中寻找sum等于给定数字的sub-array
O(n)
Step 4,在 a[indexP ... n-1] (正数部分)中寻找sum等于给定数字的sub-array O
(n)
Step 5, 在 整个a[] 中寻找sum等于给定数字的sub-array, 但是限定sub_array开始于
负数部分,结束于正数部分。 O(n)
检查sub_array 的product是否满足要求, O(l), where l is the length of the sub
-array. 因为sub-arra... 阅读全帖 |
|
M*******a 发帖数: 1633 | 23 A service system has n DIFFERENT servers; each one provides one unique
service to the clients. Clients submit requests to the service system, each
request may have multiple sub-requests; each sub-request is to a DIFFERENT
server. A request can have at most n sub-requests. Each sub-request takes 1
time unit to finish at any server. The finish time of a request is the
finish time of its LAST finished sub-request. The notation "total request
finish time" is the sum of all requests' finish time.
1. ... 阅读全帖 |
|
s*******r 发帖数: 2697 | 24 sln 1: brute force
calculate cost for every possible rectangle and return the maximum rectangle
within budget.
complexity: O(n^6)
O(n^4) rectangles and calc cost for each rectangle is O(n^2)
sln2: O(n^4)
1)fix left and right column of matrix (O(n^2) possibilities)
2)for each fixed left and right column
a)for each row, calc the cost from left to right, as tmp[i] O(n^2)
b)given 1D array tmp[], find the longest sub-array within budget, can be
done in O(n)
complexity: O(n^4)
sln3: O(n^3)
in sl... 阅读全帖 |
|
S******t 发帖数: 8388 | 25 (A couple of these haven't started trading yet and a few
just started trading and therefore don't have much volume yet,
but special mention should be made for the new 300%
Russell ETFs which will make great trading vehicles once
volume picks up.) **trader168-David Liu**
US Indexes
DIA Dow30
DDM Dow30 2x long
DOG Dow30 short
DXD Dow30 2x short
ONEQ Nasdaq
QQQQ Nasdaq100
QLD Nasdaq100 2x long
PSQ Nasdaq100 short
QID Nasdaq100 2x short
OE... 阅读全帖 |
|
y***q 发帖数: 4147 | 26 【 以下文字转载自 Stockcafeteria 俱乐部 】
发信人: ShortCut (总想偷懒), 信区: Stockcafeteria
标 题: Re: 底部探明了没有???
发信站: BBS 未名空间站 (Thu Jun 10 11:40:46 2010, 美东)
过去收藏的:
US Indexes
DIA Dow30
DDM Dow30 2x long
DOG Dow30 short
DXD Dow30 2x short
ONEQ Nasdaq
QQQQ Nasdaq100
QLD Nasdaq100 2x long
PSQ Nasdaq100 short
QID Nasdaq100 2x short
OEF SP100
IOO SP100 Global
SPY SP500
SSO SP500 2x long
SH SP500 short
SDS SP500 2x short
IVV ... 阅读全帖 |
|
j****n 发帖数: 7636 | 27 Upper-GI procedures
10. Upper stomach-intestine scope, simple (CPT 43234)
•average sub charge: $817
•average allow charge $303
•average payment: $237
11. Upper stomach-intestine scope for diagnosis (CPT 43235)
•average sub charge: $1,064
•average allow charge $318
•average payment: $249
12. Stomach-intestine scope, inject intestine wall (CPT 43236)
•average sub charge: $1,218
•average allow charge $343
•average payment: $271
13. Upper stomach... 阅读全帖 |
|
l********o 发帖数: 5629 | 28 我晚上忽然想到,如果把人的综合能力和见识看成一个vector,那么文科知识,理科知
识,市井吵架的知识,领导能力,口才等等都可以看成是其中一个维度。
世界,本来是极其丰富多彩的近似于无限高维的空间,所谓big data!!!
所以好的教育制度,应该起码让孩子逐渐认识到世界的丰富,以及培养孩子的各种能力
和眼界以尽可能认识和应付高维空间的挑战。
但是我鳖的教育制度往往只限于某个小的sub space.我鳖的理工科学生,被假定成只在
理工科这个小的sub space上活动,文科学生,被只教育了一些文科sub space上的东西
。不读书的人,混社会,社会上吃喝嫖赌请客送礼sub space很熟悉,但是其他方面知
识依然狭隘。
这样出来的人,在自己领域之外的sub space上的projection往往是0.
教育不容易啊。能爬上去做人上人的,都是高维向量,在很多sub space上都能有非零
的projection! 阿三码工就是这样,人家不光能干活,也能说。
老中码工在组织管理口才这个sub space上的投影,就是零。中国人常常说的书呆子,
从线性空间角度看,就是维度太低的向量,无法在... 阅读全帖 |
|
e***s 发帖数: 799 | 29 在LEETCODE OJ 的一题
You are given a string, S, and a list of words, L, that are all of the same
length. Find all starting indices of substring(s) in S that is a
concatenation of each word in L exactly once and without any intervening
characters.
For example, given:
S: "barfoothefoobarman"
L: ["foo", "bar"]
下面是我的代码,在small case 4ms 通过, big case Time Limit Exceeded,不知道
为什么,求解答。
vector findSubstring(string S, vector &L) {
// Start typing your C/C++ solution below
// DO NOT ... 阅读全帖 |
|
t****a 发帖数: 1212 | 30 可以用DP来做。计算复杂度大约为n^3*len(dict)
假设输入字符串s长度为n,f为求解的函数,那么
f(s, dict) = match_dict(s, dict) 当s可以直接匹配上dict里的某字符串(通过排序
后比较), match_dict返回dict中匹配上的字符串
f(s, dict) = (max the words length) [f(subs(s, 0, i), dict), f(subs(s, i, n)
, dict)], i=1..n-1 当s不能直接找到dict里的匹配
f(s, dict) = nil 当s为空
clojure程序如下
(defn gen-sorted-dict [dict]
(reduce merge (for [w dict]
{(sort w) w})))
(defn match-dict [s sorted-dict]
(sorted-dict (sort s)))
(def prob10-sub
(memoize
(fn [s sorted-dict]
(wh... 阅读全帖 |
|
G****y 发帖数: 3537 | 31 14. Unauthorized Transactions.
Prepaid REDcard provides all of the protections against unauthorized
transactions, including all of the limitations on potential liability, that
are required to be provided to holders of debit cards tied to checking
accounts by applicable federal law, including Regulation E.
Tell us AT ONCE if you believe someone has transferred or may transfer funds
from your Account or Sub-Account without your permission, or if you believe
your Card or Sub-Account Card has been l... 阅读全帖 |
|
T****B 发帖数: 5845 | 32 我也去读了马有图博客。其中有篇优惠券总结之类的文章
我先来纠正一下错误。big10经常有coupon,好好看你邮筒里边的广告就可以。桥东楼用
casa的卡有折扣,有时候在mn daily里也夹过coupon。
noodles company经常发BOGO的coupon。punch你去facebook蹲着。偶尔有5刀的deal。
另外啊,你说这“西餐厅”,我总觉得怪怪的。。。你好像总结的都是fast food
restaurant.....能不能改成快餐厅?
在明大呆了这么久,然后说sally's没去过,太亏了。
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
这次说说双城校区东岸的一些餐馆。
先是中餐馆。东岸中餐馆有桥东楼,香港面家,九龙酒家,和耀记饭店。
桥东楼的菜属于香港菜系,也很美国化。没有优惠券。笔者觉得很少几种菜适合
中国人口味,咖喱虾仁还可以。香港面家也是香港人开的中餐馆,除了米粉、河粉、面
条之外,炒菜也不错,但价格不低,特别是海鲜。中国学生会(CSU)以前有九折卡,
... 阅读全帖 |
|
j***y 发帖数: 5098 | 33 ☆─────────────────────────────────────☆
zhxfifa (硕猫) 于 (Tue May 24 11:58:44 2011, 美东) 提到:
如下:
easy pace: 9min+
long run pace: 9min+
tempo pace: 8.5min+
低于去年同期水平,全拜过去整整一个冬天加春天的荒废
狠狠心,从这个星期起,恢复认真的练习。计划如下
6-8月,恢复期,打酱油的参与两个relay
8-9月,练练5k-10k距离
10月起,开始全马训练,争取明年初跑一个全马,目标3:30,现实否?
不爽的是,南方的夏天又开始了,又得缩进gym做老鼠了。我这种意志薄弱不抗干旱炎热的人,真是可怜啊。
☆─────────────────────────────────────☆
Mutu (Camoranesi) 于 (Tue May 24 12:00:44 2011, 美东) 提到:
那也很牛了。。。应该可以吧,还有大半年呢
☆─────────────────────────────────────☆
baiji... 阅读全帖 |
|
R*****t 发帖数: 2115 | 34 【前言(1-22-2014)】:象以往一样,马拉松赛结束后,我所在团队的主教练Mike鼓
励大家分享比赛当天的经历。我是团队里唯一的中国人,所以,只能用英文完成布置的
任务。
My Race Day Report (1-20-2014)
[1] Prelude
The half marathon on Sunday is my 2nd one. Based on the result of the 1st
half marathon (1:43:12, pace 7:52) in October of 2012 and the result of the
30K last December (2:24:15, pace 7:45), I set my target pace for the race on
Sunday between 7:40-7:45, to finish the 2nd half marathon between 1:40:35
to 1:41:40, PR 0:1:32 to 0:2:37.
During our... 阅读全帖 |
|
n*****3 发帖数: 15 | 35 新手刚开始vb.net不到一年,event handler部分还很困惑。手头有一个project, 是一
个windowsCE版的application.我的工作是把它转成windows application will be
running on win 7 os, 所有程序都不用改,只是event handler process 要改, 因为
不同os系统。
app是这样的,main form只包括一些button, click the button to open secondary
level forms, these forms will handle the sanner event, and based on the data
input, 3rd level forms could be open from some point and handle scanner
event too.
main form will just initial scanner class, no data handler. the secondary
and third level fo... 阅读全帖 |
|
n*****3 发帖数: 15 | 36 新手刚开始vb.net不到一年,event handler部分还很困惑。手头有一个project, 是一
个windowsCE版的application.我的工作是把它转成windows application will be
running on win 7 os, 所有程序都不用改,只是event handler process 要改, 因为
不同os系统。
app是这样的,main form只包括一些button, click the button to open secondary
level forms, these forms will handle the sanner event, and based on the data
input, 3rd level forms could be open from some point and handle scanner
event too.
main form will just initial scanner class, no data handler. the secondary
and third level fo... 阅读全帖 |
|
|
l*******w 发帖数: 61 | 38 Here is my two cents on ASC 740 and Subpart F income.
In the simplest case, when a CFC earns $100 Subpart F income, say, an
interest income, it is a deemed dividend paid to its US parent, and the US
parent immediately made an investment of the same $100 into the sub. This
immediate reinvestment raises parent's basis in the sub by $100.
This treatment appears similar to the case where a fixed asset of parent
depreciates faster for book than for tax by $100: the book-to-tax difference
increases by... 阅读全帖 |
|
l*******w 发帖数: 61 | 39 Here is my two cents on ASC 740 and Subpart F income.
In the simplest case, when a CFC earns $100 Subpart F income, say, an
interest income, it is a deemed dividend paid to its US parent, and the US
parent immediately made an investment of the same $100 into the sub. This
immediate reinvestment raises parent's basis in the sub by $100.
This treatment appears similar to the case where a fixed asset of parent
depreciates faster for book than for tax by $100: the book-to-tax difference
increases by... 阅读全帖 |
|
w*******y 发帖数: 60932 | 40 Travelcountry.com is blowing out hundreds of items in their end of summer
clearance sale. Save up to 50% on clothing, footwear, daypacks, tents,
sleeping bags and more from major brands like The North Face, Mountain
Hardwear, Marmot, Arc'Teryx, Columbia, Keen, GoLite and more.Free shiping
over $70
Main Sale Page Here:
http://www.travelcountry.com/shop/summer-sale-clearance
Here are some of the highlights I found
The North Face Denali Jacket Mens Fleece:
http://www.travelcountry.com/shop/north-fa... 阅读全帖 |
|
l*****g 发帖数: 685 | 41 用C++写了一个版本:
void RecursivelyRemoveSubString(char *str, const char *sub)
{
if (!str || !sub || *sub == 0 || *str == 0 || strlen(str) < strlen(sub))
return;
char *end = str;
char *cur = str;
int subLen = strlen(sub);
char subEnd = sub[subLen - 1];
while (*cur != 0)
{
*end = *cur;
if (*end == subEnd)
{
char *reCur = end;
int subIndex = subLen - 1;
bool match = true;
bool reCurEnd = false;... 阅读全帖 |
|
p****z 发帖数: 55 | 42 我有一个思路,但是没编程!大家讨论一下!
Hint:不知道大家有没有看过reverse the words in a sentence的例子,我简单说一下
I love you => you love I
程序:
1)reverse 每一个单词:I evol uoy
2) reverse 每整个句子: you love I
根据上面的例子,我们可以同理做这个题(我们先简化为只有前负后正):5,7,9,-
1,-4 (不知道有大家有木有灵感,其实我们可以把上题的空格和这题的正负交界同比)
1) reverse 正和负的sub array: 9,7,5,-4,-1
2) reverse 这两个sub arrays:-1,-4,5,7,9
所以,把上面的例子复杂化: -1,-4,5,7,9,-1231,-123,54,3462
1)reverse 前面两个正和负的sub arrays:-1,-4,9,7,5,-123,-1231,54,
3462
2)reverse 这两个sub arrays:-1,-4,-1231,-123,5,7,9,,54,3462
所以总的来说:找到两个sub ar... 阅读全帖 |
|
p****z 发帖数: 55 | 43 我有一个思路,但是没编程!大家讨论一下!
Hint:不知道大家有没有看过reverse the words in a sentence的例子,我简单说一下
I love you => you love I
程序:
1)reverse 每一个单词:I evol uoy
2) reverse 每整个句子: you love I
根据上面的例子,我们可以同理做这个题(我们先简化为只有前负后正):5,7,9,-
1,-4 (不知道有大家有木有灵感,其实我们可以把上题的空格和这题的正负交界同比)
1) reverse 正和负的sub array: 9,7,5,-4,-1
2) reverse 这两个sub arrays:-1,-4,5,7,9
所以,把上面的例子复杂化: -1,-4,5,7,9,-1231,-123,54,3462
1)reverse 前面两个正和负的sub arrays:-1,-4,9,7,5,-123,-1231,54,
3462
2)reverse 这两个sub arrays:-1,-4,-1231,-123,5,7,9,,54,3462
所以总的来说:找到两个sub ar... 阅读全帖 |
|
t****a 发帖数: 1212 | 44 初学者,给一个lisp的解:
(defn all-subset [s]
(if (= (count s) 1)
[s]
(let [fst (first s)
rst (rest s)
rst-sub (all-subset rst)
new-sub (map #(cons fst %) rst-sub)
all-sub (concat [[fst]] rst-sub new-sub)]
all-sub)))
(all-subset [1 2 3 4 5])
; ([1] [2] [3] [4] (5) (4 5) (3 4) (3 5) (3 4 5) (2 3) (2 4) (2 5) (2 4 5) (
2 3 4) (2 3 5) (2 3 4 5) (1 2) (1 3) (1 4) (1 5) (1 4 5) (1 3 4) (1 3 5) (1
3 4 5) (1 2 3) (1 2 4) (1 2 5) (1 2 4 5) (1 2 3 4) (1 2 3 5... 阅读全帖 |
|
c********6 发帖数: 33 | 45 List> factorCombination(int n) {
List> result = new ArrayList>();
dfs(n, 2, result, new ArrayList());
return result;
}
void dfs(int n, int start, List> result, List sub
) {
if(n == 1) {
result.add(new ArrayList(sub));
return;
}
for(int i = start; i <= n; i++) {
if(n % i != 0) continue;
if(i == n && sub.i... 阅读全帖 |
|
r*******e 发帖数: 971 | 46 我改了一下,这要不过不了也没办法了,不用recursion实在麻烦。
public List> getFactorCombination(int n) {
List> result = new ArrayList<>();
getFactorCombinationHelper(n, n/2, result, new ArrayList());
return result;
}
private void getFactorCombinationHelper(int n, int start, List
> result, List sub) {
if(n==1) {
result.add(new ArrayList(sub));
return;
}
for(int i = start; i... 阅读全帖
|
|
c********6 发帖数: 33 | 47 List> factorCombination(int n) {
List> result = new ArrayList>();
dfs(n, 2, result, new ArrayList());
return result;
}
void dfs(int n, int start, List> result, List sub
) {
if(n == 1) {
result.add(new ArrayList(sub));
return;
}
for(int i = start; i <= n; i++) {
if(n % i != 0) continue;
if(i == n && sub.i... 阅读全帖 |
|
r*******e 发帖数: 971 | 48 我改了一下,这要不过不了也没办法了,不用recursion实在麻烦。
public List> getFactorCombination(int n) {
List> result = new ArrayList<>();
getFactorCombinationHelper(n, n/2, result, new ArrayList());
return result;
}
private void getFactorCombinationHelper(int n, int start, List
> result, List sub) {
if(n==1) {
result.add(new ArrayList(sub));
return;
}
for(int i = start; i... 阅读全帖
|
|
a***e 发帖数: 413 | 49 我自己做出来的非常慢,别人的好的答案很快,但我觉得逻辑很复杂,请问有相同复杂
度更简洁一点的答案吗?多谢!
我的慢答案,自己觉得更好解释。(按我现在水平,难以想象能把快答案在45分钟内搞
出来)
class Solution {
public:
vector findSubstring(string S, vector &L) {
vector res;
int nl=L.size();
if (nl==0) return res;
int nw=L[0].size(), ns=S.size();
if (nw==0||ns
map lmap;
for (int i=0; i
{
lmap[L[i]]++;
}
int j=0;
wh... 阅读全帖 |
|