l*********u 发帖数: 19053 | 1 实在看不下去无耻日托,硬拗基本物理定律。
Whenever you select a car to buy, you make tradeoffs. With a pickup, for
instance, you typically sacrifice ride comfort and ease of access for the
sake of utility. Similarly, when you pick a small car, you naturally expect
good fuel economy, maneuverability and a low price, for which you usually
forego passenger space, quietness and ride comfort. Intuitively, you know
you may also be compromising some crash safety.
It’s long been known that in a duel between a small, light v... 阅读全帖 |
|
i*******y 发帖数: 225 | 2 挺不错了,small overlap是目前最tough的正碰测试了。passenger compartment基本
保持完好。dummy头部一直向前运到,和气囊接触后弹会,碰撞中没有侧滑。
侧碰有人说倾入太多,其实都这样。XC90这个dummy头部基本都没碰到车门,侧面安全
气囊保护不错,胸腹压缩程度那要看dummy上的sensor, video看不到。
翻车测试镜头少,不过dummy也没有out of position。 |
|
t******h 发帖数: 120 | 3 第三题 大概是这样
用队列 设一个dummy node
循环开始前把root dummy enqueue
当读到dummy就表示这层结束了 输出换行
如果队列里还有元素 就再enqueue dummy
否则结束循环
我倒是很怕那种处理大量数据的题 |
|
s********x 发帖数: 914 | 4 那我写一下吧
public static Node mergeKSortedLists(Node[] l) {
// heapify: Make it a heap: Trickling Down in Place: start at node n
/2-1, the rightmost node with children
// O(n)
for (int i = (l.length / 2 - 1); i >= 0; i--)
trickleDown(l, i, l.length);
int heapSize = l.length; // size of the heap
// use an extra dummy node as the head
Node dummy = new Node();
Node pre = dummy;
while (heapSize > 0) {... 阅读全帖 |
|
q****m 发帖数: 153 | 5 请问我这个按层打印的code有什么问题,leetcode说我memory limit exceeded,另外
,除了memory,还有什么bug么?
class Solution {
public:
vector > levelOrder(TreeNode *root) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
vector > results;
if(!root) return results;
queue myQ;
myQ.push(root);
TreeNode* dummy = NULL;
myQ.push(dummy);
vect... 阅读全帖 |
|
l*****a 发帖数: 14598 | 6 想了一下,对层而言,确实可以用DFS.
print bt level by level的一个做法就是用dummy node,每次用前一次的结果
求这次的。。。
TreeNode dummy=new TreeNode();
dummy.next=root;
func(dummy.next);
public void func(TreeNode list){
//generate list of next level;
func(nextlist);
//print list of current level;
}
这个甚至是O(1)space 吧(不考虑callstack) |
|
p*****2 发帖数: 21240 | 7 我刚写了一个,没发现有什么问题。就是leetcode现在很慢。
public ListNode partition(ListNode head, int x) {
ListNode dummy=new ListNode(0);
dummy.next=head;
ListNode newDummy=new ListNode(0);
ListNode p1=dummy;
ListNode p2=newDummy;
while(p1.next!=null){
if(p1.next.val
p2.next=p1.next;
p2=p2.next;
p1.next=p1.next.next;
}
else
p1=p1.next;
... 阅读全帖 |
|
s********u 发帖数: 1109 | 8 感觉你们的想法都太tricky了,我想不到。我就是存两个map,一个新节点对应到旧节
点,另一个旧节点对应到新节点。。。
class Solution {
public:
RandomListNode *copyRandomList(RandomListNode *head) {
unordered_map< RandomListNode *, RandomListNode *> oldNew;
unordered_map< RandomListNode *, RandomListNode *> newOld;
RandomListNode *runner = head;
RandomListNode *dummy = new RandomListNode(0);
RandomListNode *curr = dummy;
while(runner){
curr->next = new R... 阅读全帖 |
|
m**p 发帖数: 189 | 9 为什么泥?
class Solution {
public:
ListNode *partition(ListNode *head, int x) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
ListNode* dummy = new ListNode(-1);
ListNode* pivot = new ListNode(x);
ListNode* dummy_tail = dummy;
ListNode* pivot_tail = pivot;
ListNode* cur = head;
while (cur) {
if (cur->val < x) {
dummy_tail->next = cur;
dummy_tail = dummy_tail->next;
} else {
... 阅读全帖 |
|
b********6 发帖数: 97 | 10 那我也贴个java的好了
public ListNode insertionSortList(ListNode head) {
// IMPORTANT: Please reset any member data you declared, as
// the same Solution instance will be reused for each test case.
if (head == null) return null;
ListNode dummy = new ListNode(-1);
dummy.next = head;
ListNode i = head;
while (i.next != null) {
int n = i.next.val;
ListNode j = dummy;
while (j!=i&&j.next.val < n){
... 阅读全帖 |
|
c********w 发帖数: 2438 | 11 我po个我的
public class Solution {
public ListNode sortList(ListNode head) {
if(head==null||head.next==null)
return head;
ListNode slow=head;
ListNode fast=head.next;
while(fast!=null){
fast=fast.next;
if(fast!=null){
fast=fast.next;
slow=slow.next;
}
}
ListNode h1=head;
ListNode h2=slow.next;
slow.next=null;
h1=sortLi... 阅读全帖 |
|
s********x 发帖数: 914 | 12 public static Node sortLinkedList(Node l) {
if (l == null) {
return null;
}
if (l.getNext() == null) {
return l;
}
Node mid = findMid(l);
Node firstHalf = l, secondHalf = mid;
firstHalf = sortLinkedList(firstHalf);
secondHalf = sortLinkedList(secondHalf);
return mergeTwoSortedLists(firstHalf, secondHalf);
}
private static Node findMid(Node l)
{
Node fast = l... 阅读全帖 |
|
t**r 发帖数: 3428 | 13 class Solution {
public:
ListNode *swapPairs(ListNode *head) {
ListNode* dummy = new ListNode(0);
dummy->next = head;
ListNode* p = head;
ListNode* prev = dummy;
while(p && p->next){
ListNode* q = p->next;
ListNode* r = p->next->next;
prev->next = q;
q->next = p;
p->next = r;
prev = p;
p = r;
}
return dummy->next;
}
}; |
|
H**********5 发帖数: 2012 | 14 之前看前面某童鞋贴的代码里的dummy指针,之前没接触过感觉晕。
下午研究了下,
原来就是复制个节点的技巧,因为单链表删除某节点必须先找到欲删除节点的前面一个
节点,但如果要删除头节点,没有前面的节点如何处理,于是生成一个dummy点,将
dummy的next指向头节点,然后删除头节点,最后返回dummy的next,间接的更新头节点,
但这种只适合函数原型为让你返回指针的形式,即 strcut node* xxx(struct node *
root)
如果烙印让你为void形式,入参为**形式直接更新头节点的话,
那就只能老老实实
void xx(struct node **root)了。 |
|
|
q****i 发帖数: 6923 | 16 lundon bridge is falling down
twinkle twinkle little star
小螺号,采蘑菇的小姑娘,吹草哨,妈妈的吻,小燕子穿花衣,金孔雀,我也骑马巡逻
去,丁丁说他是个小画家,劳动最光荣,花园里面采葡萄。。。。
Songs
1.It’s a small world after all
It’s a world of laughter, a world of tears.
It’s a world of hopes and a world of fears.
There is so much that we share and it’s time we are aware.
It’s a small world after all.
It’s a small world after all. It’s a small world after all. It’s a small
world after all.
It’s a small, small world.
There’s just one moon and one golden sun.
... 阅读全帖 |
|
l****y 发帖数: 58 | 17 我想这样打是不行的,
因为如果对手忍三圈梅花,dummy进手,
而你只能够通过将吃回手,此时梅花仍
无法树立。
应该是这个样子的吧。
第一手 将吃DA
四论清将,dummy垫掉方片,
吃进梅花AK,然后梅花送。
如果敌人不收,继续送梅花可以成排。
如果敌人收,之后
如果敌人再功梅花或黑桃,dummy进手,
兑现黑桃AK和一张梅花后,将吃黑桃后树立梅花。
如果敌人功方片,dummy垫掉剩下的一张
梅花。而主打将吃后,C9取一顿,梅花
可以树立。 |
|
x***e 发帖数: 2449 | 18 W lead c5, dummy 2, E J, S Q win
draw 2 trumps.
then SCx W A, dummy K, E 9
W return D 8, summy 4, E 10, S Q win, back a C, dummy ruff,
dummy D2, E3, SK, WA, after thought a moment, W back c, contract make.
E said, P, I give a C9 to welcome H.
W said, P, during the play, I know you have HA, without Hj, you could also
welcome H, and return H is dangerous and could give S a chance.
So W think,the C9 is an even sigh and show E has 2 C left after 1 round C.
so he think S had the last C intead of D i |
|
p***r 发帖数: 20570 | 19 par contest is very different from real bridge situations. Gib is not bad in
par contest simply because in par contest a lot of constraints can be
supplied. In real life, that's totally a different issue. You have to figure
out defender's possible holding all by yourself. Also, in par contest, you
just solve the problem. In real life bridge, your opps intentionally seek
your holes and weakness to take the maximum profit out of them.
Unfortunately, there are just way too many holes in gib's playi... 阅读全帖 |
|
p***r 发帖数: 20570 | 20 SA looks like a good lead here. you need to take a look at dummy. If dummy
holds long D or C, you'd better see partner's signal to determine whether
you like to continue S or switch to H. If dummy doesn't hold a long suit,
you can also have a better guess on which suit to play next based on your
partner's signal and dummy's hand.
low H can be very bad when declarer holds H stopper and they have a cashing
long minor. Sometimes, your partner may hold SKQxxx to beat it one trick. SA
may cost you a... 阅读全帖 |
|
u********e 发帖数: 4950 | 21 In this case, it should be clear to play I guess.
ruff C into hand, if dummy's last C was established, claim D and let dummy
ruffy D to claim the last C
The condition should be like below before "ruff C into hand":
Dummy:
S:7
D:6
C:97
Hand:
S:J
D:K85
Any problem?
even
dummy. |
|
s**********d 发帖数: 36899 | 22 上课做了这个几个drills/tests:
1, 一张靶纸有1-6六个标号的图案,三个弹夹每个7发,按顺序打,几号就打几发,
不能有任何脱靶也不能打错,21发21秒(中间要换弹夹两次)
2,枪上膛,弹夹五发子弹加一个dummy,别人给上,你不知道dummy是第几发,
拔枪开始共打九发,中间要clear那个dummy,加换一次弹夹。15秒及格。拔枪、
clear dummy, 换弹夹都有动作要求,错了就fail。我用了10.39秒,算好的。
有一个七点几秒的,老师说他一般6.5秒。大概是五码,也是一发都不能脱靶。
3,一个course共30发,记不清了!大概是
3码拔枪2.5秒3枪,重复一次。
从ready还是1.5秒3枪,重复。
5码从拔枪打胸部3枪头部2枪5秒(头部面积很小,只包括眼和鼻子)。
5码,ready开始,右手单手4发,换左手四发,共10秒。
8码,枪里一发弹夹两发,拔枪打完换弹夹再打两枪,好像是五秒。
8码,枪上弄一个空壳成stove pipe,clear后再打两枪。时间记不得了!
这个course是算分的,胸部和头部每枪五分,胸部有个大框4分,其它部位2分。
以上所有,... 阅读全帖 |
|
w****o 发帖数: 783 | 23 枪 Hawk 982,霰弹,泵动,国产,Remington 870的仿制品,非常Solid Build,12 GA
, 982型号带鬼环儿,瞄准舒适, 18寸管,价格 200左右。
对于家防的枪来说,可靠,禁操耐用,简单,人体工学是我的选择顺序的标准,精致,
外观涂层在我的选择里不占太大的比重,所以 我对982非常非常满意。
982是870的仿,但是我也用过870,个人感觉做的比870更Solid,但是不如870精细。几
乎(不是所有)Aftermarket的870配件都可以用在982上。加上一些趁手儿的配件,个
人感觉是一杆可以Battle Field Available的枪。
我加了一些配件,不为酷,纯粹从考虑实际使用需要出发。
Tacstar Sidesaddle Fits Remington 870, 1100 and 11-87
http://www.amazon.com/gp/product/B000TTX75W/ref=oh_details_o07_
为了装这个Sidesaddle,必须换掉原来的Forearm
Hogue Stock Remington 870 Over... 阅读全帖 |
|
l******a 发帖数: 3339 | 24 http://www.mediafire.com/?mwimwnywwcd
趁着link还在,要下的赶紧,这个是official的ixtreme LT,据说不会被ban,但是还
没有太多
样本。
From the Jungle Flasher NFO:
**Lite On Support
Auto-Load Lite-Touch firmwares
Calibration data
- spoof copies calibration data if present in source
- dummy from traget will place calibration data in dummy v2 at same
location
Secret Inquiry
- performed before LO83info to identify 83 v2 and abort sequence
- performed for DVDKey, Lo83info and Dummy from iXtreme and added to
dummy v2 to differientiate 8 |
|
z*********e 发帖数: 10149 | 25 如果老大进去看见indicator Light是关的,那说明之前没人进去过,之后数数22次就
是了
如果老大进去看见indicator light是开着的,那可能是
1 indicator light本来就是开着的
2 indicator light本来是关着,但是有个prisoner进去给开了
这个时候应该需要用那个dummy light来显示到底是哪种情况。
可以约定,如果犯人进去了打开了indicator light,就把dummy light也打开,否则把
dummy light 关掉。可是同样的问题,如果indicator和dummy本身都开着的,而老大是
第一个进去,就分不清是有prisoner进去过,还是本身这两个灯都开着。。。咋整呐 |
|
b*d 发帖数: 75 | 26 i have a generic class
class Dummy {
public Dummy() {
}
private T dummy;
}
how to instantiate the dummy field in ctor? how to achieve "new T()" like in c+
+? |
|
c*******h 发帖数: 1096 | 27 C和C++的复数好像不是很兼容。下面这个问题怎么办?
我有一个legacy.h,里面定义了一个dummy函数
#ifndef _LEGACY_
#define _LEGACY_
#include
void dummy(complex x);
#endif
用gcc是可以编译的
然后我写一个驱动器driver.c
#include
#include "legacy.h"
int main(void) {
complex c = 4.0;
dummy(c);
return 0;
}
gcc也是能编译的
然而我把driver.c改成driver.cpp,g++编译就不通过了,说
In file included from driver.cpp:2:0:
legacy.h:4:20: error: ISO C++ forbids declaration of 'x' with no type [-
fpermissive]
driver.cpp: In function 'int main()':
driver.cpp:4:11: e... 阅读全帖 |
|
m*********a 发帖数: 3299 | 28 哪在c++中可能有这样的memory leak
在main 中,在stack上initiate一个struct node{int value,node *next}
node dummy;
然后在main中call, addNode(node &dummy)
在add中在 heap 上 加一个node
dummy->next=new node();
这样返回的dummy node一个在stack 上,一个heap上。
推出main时,heap上的node还在? |
|
m*********a 发帖数: 3299 | 29 哪在c++中可能有这样的memory leak
在main 中,在stack上initiate一个struct node{int value,node *next}
node dummy;
然后在main中call, addNode(node &dummy)
在add中在 heap 上 加一个node
dummy->next=new node();
这样返回的dummy node一个在stack 上,一个heap上。
推出main时,heap上的node还在? |
|
a****f 发帖数: 29 | 30
reboot
cd previous_dir
while true
do
cat /boot/* >> dummy
done
( ^C after 10 minutes)
rm dummy
cd /tmp
while true
do
cat /boot/* >> dummy
done
(^C after 10 minutes)
rm dummy |
|
i*******e 发帖数: 349 | 31 我知道的一个简单的方法,仅供参考。把obs按X排序后分成若干组,每组一个dummy,
然后在回归中用dummy,把dummy的系数列出来可以简单看看X对Y有没有非线性的效果,
缺点之一是分组不能太多,否则dummy的系数估计会不准确。 |
|
x****x 发帖数: 87 | 32 在这里一致感谢各位的帮助...谢谢啊
先不考虑其它变量(事实上我打算取ln(maturity),ln(issue quantity)等等)
就credit 这部分, 按照idioteque的建议,我AAA作为一个dummy,如果这个债券的评级
是AAA,那么是1,否则是0; 同样我把AA作为一个dummy; 把A作为一个dummy; 然后把A以
下的也作为一个dummy
是这样么,多谢啊. |
|
A*********u 发帖数: 8976 | 33 %macro dummy(in=, var=, out=);
data &out;
set ∈
if missing(&var) then dummy=1;
else dummy=0;
run;
%mend dummy;
help ya.
thanks. |
|
A*********u 发帖数: 8976 | 34 如果想一次全搞定
用Array
用'--'连接var1--var100
%macro dummy(in=, var=, out=);
data &out;
set ∈
if missing(&var) then dummy=1;
else dummy=0;
run;
%mend dummy;
help ya.
thanks. |
|
k*******a 发帖数: 772 | 35 我的笨方法,不过可以用
data a;
input SCHOOLID;
datalines;
1
1
5
6
10
10
10
11
;run;
proc sql;
select count(distinct schoolid) into :n
from a;
%let n=%trim(&n);
proc sql;
select unique schoolid into :name1-:name&n
from a;
quit;
%macro dummy;
data dummy;
set a;
%do i=1 % to &n;
if &&name&i=schoolid then school_&&name&i=1;
else school_&&name&i=0;
%end;
run;
%mend;
%dummy
proc print data=dummy;run; |
|
D***0 发帖数: 414 | 36 新人 求指教!非常感谢大家!
问题是这样的,
Team A's performance in Jan-Mar by month is 200 and in Apr-Dec is 250.
Team B's performance in Jan-Mar by month is 150 and in Apr-Dec, team B was
given a special treatment (while team A was not given that treatment) and
team B's performance in Apr-Dec by month was 250.
Team A is the control group and therefore the base/intercept is 200(team A's
performance in period 1).
Team B has a binary dummy variable (0/1) and the coefficient is 150-200=-50
Period 2 has a binary dummy ... 阅读全帖 |
|
u*h 发帖数: 397 | 37 what is your assumption? like this?
observation value =
effect of (A or B or C or D) +
effect of (S1 or S2) +
effect of (M1 or M2) +
error
if this is your model, one way I can think is to use linear regression,
create 3 dummy variables for ABCD
1 dummy for S1/S2
1 dummy for M1/M2
test the last dummy variable coefficient not equal to 0 |
|
发帖数: 1 | 38 【 以下文字转载自 Prepaid 俱乐部 】
发信人: AscenZ (RashoreZ), 信区: Prepaid
标 题: 关于买bad ESN刷机和用donor phone换ESN的潜在问题
发信站: BBS 未名空间站 (Mon May 20 01:27:32 2013, 美东)
刚看到PDA有版友在CL上买2手手机,后来原机主报失被blacklist,导致在T-Mobile和
AT&T都无法入网。想到Prepaid可能有版友买过bad ESN的Sprint手机然后刷机到P+,所
以来提醒下。
今年11月30前Sprint和Verizon两家也会把自己的数据库加到这个联合数据库来。买bad
ESN的Sprint手机然后刷机到PagePlus的,或者买bad ESN的global phone但是解锁GSM
卡槽用T-mobile或者ATT的到时候也可能会被封。买bad ESN然后刷到USCellular,
MetroPCS或者Cricket这些小运营商的可能能多用一段时间。因为Regional carrier可
以一直到2014年4月都不用加入到这个数据库来。现在已经用在PP... 阅读全帖 |
|
|
g******t 发帖数: 18158 | 40 如果两眼一抹黑就先看傻瓜书,这几本写的挺好的,容易读,读完了就不是傻瓜了
Investing For Dummies
Investing in Your 20s & 30s For Dummies
Asset Allocation For Dummies
读完了还有兴趣可以读:
The Intelligent Asset Allocator: How to Build Your Portfolio to Maximize
Returns and Minimize Risk
The Intelligent Investor: The Definitive Book on Value Investing. A Book of
Practical Counsel
The Power of Passive Investing: More Wealth with Less Work
读投资理财的书之前可以到马棕看一下book review,不到四星的就不用读了,好书太
多,读不过来 |
|
l****z 发帖数: 29846 | 41 August 15, 2013 by Warner Todd Huston
Don’t make fun of king Obama. If you do your life will be destroyed. That
is the message that the Missouri State Fair is sending by the banning for
life of a rodeo clown that used an Obama mask during a recent performance.
Of course, the crowd had a great time with the stunt as can be seen in a
video of the event…
The incident occurred on August 10 at the Missouri State Fair where Rodeo
clown Tuffy Gessling made a bunch of Obama jokes with a dummy figure o... 阅读全帖 |
|
i****a 发帖数: 36252 | 42 and that's what the US wanted exactly
create "emenies" around China so people from china will focus their
attention on those dummies 傀儡. the US doesn't really care if China takes
down Japan. they still have S. Korea, Taiwan. If those two dummies fail,
they can use India, Vietnam etc etc.
How many dummies do Chinese people want to focus on before realizing who's
behind them? |
|
l*****6 发帖数: 7881 | 43 Camry 大烂车你还敢买?
2013 Toyota Camry Scores "Poor" Rating In New IIHS "Small Overlap" Crash
Test
Toyota falls short
Shoppers looking for a midprice family car will recognize some perennial
bestsellers on the TOP
SAFETY PICK+ winners' list, including the Accord, Altima and Fusion.
One nameplate they won't find is Toyota. The Camry, which is the top-selling
midsize car in the United States, and the Prius v, a 4-door hybrid wagon,
earn poor ratings for small overlap protection and are the worst perform... 阅读全帖 |
|
A***n 发帖数: 8859 | 44 Toyota falls short
Shoppers looking for a midprice family car will recognize some perennial
bestsellers on the TOP
SAFETY PICK+ winners' list, including the Accord, Altima and Fusion.
One nameplate they won't find is Toyota. The Camry, which is the top-selling
midsize car in the United States, and the Prius v, a 4-door hybrid wagon,
earn poor ratings for small overlap protection and are the worst performers
of the midsize group. The Camry was redesigned for 2012, and the Prius v was
an all-new m... 阅读全帖 |
|
m******6 发帖数: 210 | 45
恭喜你. 说对了. 你太有才了.
From iihs.org side crash test.
Corolla 2014 (not valid for early year model)
Driver — Measures taken from the dummy indicate a low risk of any
significant injuries in a crash of this severity.
Audi A4:
Driver — Measures taken from the dummy indicate that rib fractures would be
possible in a crash of this severity.
BMW 3:
Driver — Measures taken from the dummy indicate that rib fractures would be
possible in a crash of this severity. |
|
s**********w 发帖数: 866 | 46 买之前看看IIHS的评述吧,这个是关于small overlap的。有条件的还是考虑别的吧。
"The Town & Country's structure also collapsed around the dummy. Intrusion
measured 15 inches at the lower hinge pillar and the instrument panel. The
skin on the dummy's left lower leg was gouged by the intruding parking brake
pedal, and its left knee skin was torn by a steel brace under the
instrument panel. The head barely contacted the front airbag before sliding
off and hitting the instrument panel, as the steering column moved to the
right. The... 阅读全帖 |
|
g******d 发帖数: 511 | 47 好像不用这么复杂.
push完一层后压一个left or right dummy node.下一层根据这个dummy决定从左到右,
或从右到左. 再push一个反方向的dummy node.
from |
|
s******n 发帖数: 3946 | 48 他的意思是假设是operator重载
++i先做++再放在stack上,i++则先复制一份copy到stack上再做++,多了一份复制(假
设编译无优化)
大家看有道理吗?
I did a real test on arm compiler turn off optimization:
the O0 code is exactly the same, except that post operator++()(int dummy)
has an extra dummy parameter which is required by c++ to identify the
difference of prefix and postfix.
2nd, even I change the Test& operator++() into Test operator++(), it still generates the same code.
printf("%d \n", 10+ (abc++).value);
sub r3, fp, #8
mov r0, ... 阅读全帖 |
|