运行程序时总是有这个出错信息:
OS version: 5.1.2600.196608
okeoke version: 2.3.2.0
Program Folder: G:\OkeOke.Net\
Object reference not set to an instance of an object.
at OkeOke.Net.Controls.PlayListPanel.<_player_OnPlayerStopped>b__1() in D
:\Dev\OkeOke\OkeOke.Net\Controls\PlayListPanel.xaml.cs:line 566
at OkeOke.Net.Execute.<>c__DisplayClass2.b__0(
Action action) in D:\Dev\OkeOke\OkeOke.Net\Utilities\Execute.cs:line 26
at OkeOke.Net.Execute.OnUIThreadAsync(Action action) in... 阅读全帖
nvidia interview experience
location:
NVIDIA
San Thomas Expressway, Santa Clara
duration
2 hours, 1PM to 3PM
2 interviewers, each for 1 hour
------------------------------------------
cdj
xor eax, edx
sub eax, edx
问我这段代码干嘛。就是算负数的补码(Two's Complement),正数没变化
logic puzzle,
4 fuses, each fuse burns out in 40 minutes, create a fuse that can burn
in
20 minutes. slightly flawed problem. Because when you burn the fuse from
two
ends, it is not exactly 20 minutes. (Two combustion points are
certainly
faste... 阅读全帖
C++ Q 103: stream manipulators
Multiple choices
Which options are true of stream manipulators?
a. To use manipulators, you need only to include iostream.h as a header in
your C++ program
b. To use manipulators, you need only to include iomanip.h in your program
c. Stream manipulators are special functions which can be included in an I/O
expression
d. endl is a stream manipulator
Answer: b, c, d
C++ Q 104: object reference
Multiple choices
Which of the following statements are correct?
a. When pa... 阅读全帖
http://www.whattoexpect.com/toddler/childhood-injuries/first-ai
First Aid for a Choking Child
The best way to help a choking child is to be prepared—and that means
enrolling in a CPR class (or a refresher course) so you'll know what to do
in case of an accident. But there are other steps you can learn so that you
know what to do—and how to act immediately if see your child choking.
How choking happens: It goes without saying that it’s a scary thing to see
a choking child. Usually, it happens whe... 阅读全帖
You can't. T doesn't exist at runtime. It's an illusion. Just remove T and
ask yourself how to do it. If you cannot do it without T, then you cannot do
it with T either:
public class SpecialArray {
Object[] createSpecialArray()
{
return (Object[])Array.newInstance(???, 10);
// How to get T?
// You do not pass anything into this method
}
}
Your problem is that arrays in Java know their component type at runtime. If
you do new String[5], the object knows it's an... 阅读全帖
【 以下文字转载自 JobHunting 讨论区 】
发信人: careerchange (Stupid), 信区: JobHunting
标 题: C++ Q 103-105
发信站: BBS 未名空间站 (Fri Oct 28 23:15:10 2011, 美东)
C++ Q 103: stream manipulators
Multiple choices
Which options are true of stream manipulators?
a. To use manipulators, you need only to include iostream.h as a header in
your C++ program
b. To use manipulators, you need only to include iomanip.h in your program
c. Stream manipulators are special functions which can be included in an I/O
expression
d. endl is a s... 阅读全帖
In Python, every value is a pointer to an object. Assigning one variable to
another copies the pointer so you have two pointers that point to the same
object. Since they point to the same object, the id() will be the same.
a = object()
b = a
# id(a) and id(b) are the same
c = object()
b = c
# id(b) and id(c) are the same,
# different from id(a) which is the same as before
Just like in C++ for example:
object *a = new object; // pretend we have a class called "object"
object *b = a;
// a and b ar... 阅读全帖
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... 阅读全帖
没听说过是你自己无知。这只能说明你是个很容易被骗的无知之徒, 你又要凭你自己的无知骂人,你又无耻了。
揭露 BIG-BANG 是披着科学外衣的宗教,这在10年前就有很多文章了。
THE "BIG BANG" IS JUST RELIGION DISGUISED AS SCIENCE
by Michael Rivero
Once upon a time, a long time ago, there was this guy named Aristotle.
Pretty sharp fellow; he thought up a lot of good things. But, occasionally
he made a mistake.
One mistake he made was to toss an orange up in the air and watch it come
straight back down to his hand. Aristotle reasoned that if he was moving,
the orange would have flown... 阅读全帖
interview 迟到了20分钟,只问了一道oo题,open end discussion。其实应该挺简单
,但答得不咋地,发上来给大家讨论造福后人吧~
假设有如下class: Account,Campain, TargetingCritierion,Logger. 前三个
class包含account,campain,和target的相关信息,后面的logger class用来输出前
三个class的信息。以下是初始code,问在class设计上有什么可以改进的地方,怎么改
进,怎么进一步改进,等等
class Account
attr_accessor :id, twitter_handle
end
class Campaign
attr_accessor :id, :name, :budget, :account
end
class TargetingCriterion
attr_accessor :targeting_type, :targeting_value
end
class Logger
def log(object)
case object... 阅读全帖
没有问题,以下是 hashcode 的 contract:
Whenever it is invoked on the same object more than once during
an execution of a Java application, the {@code hashCode} method
must consistently return the same integer, provided no information
used in {@code equals} comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
If two objects are equal according to the {@code equals(Object)}
method, then calling the ... 阅读全帖
没有问题,以下是 hashcode 的 contract:
Whenever it is invoked on the same object more than once during
an execution of a Java application, the {@code hashCode} method
must consistently return the same integer, provided no information
used in {@code equals} comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
If two objects are equal according to the {@code equals(Object)}
method, then calling the ... 阅读全帖
PVH has the following job openings.
1. Business Systems Analyst-Commercial IT-Store Systems
2. Testing Manager
3. Senior Developer-Middleware
for more info, please check www.pvh.com site.
Business Systems Analyst-
Commercial IT-Store Systems
More information about this job:
Overview:
PVH Corp. is a global, action-oriented company characterized by achievement
and commitment. We
want people who are hungry for both professional and personal growth; who
will help us take our
brands, our businesses a... 阅读全帖
第一次买Tiger Direct的东西做Total defense的rebate,现在想去把自动续订关掉,
可是网站(https://my.totaldefense.com/Login2.aspx)根本登陆不进去啊,无论用
哪个电脑,什么浏览器,总是出现这个信息:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an i... 阅读全帖
PVH has the following job openings.
1. Business Systems Analyst-Commercial IT-Store Systems
2. Testing Manager
3. Senior Developer-Middleware
for more info, please check www.pvh.com site.
Business Systems Analyst-
Commercial IT-Store Systems
More information about this job:
Overview:
PVH Corp. is a global, action-oriented company characterized by achievement
and commitment. We
want people who are hungry for both professional and personal growth; who
will help us take our
brands, our businesses a... 阅读全帖
http://www.technologyreview.com/view/509106/best-of-2012-chines
Best of 2012: Chinese Physicists Smash Distance Record For Teleportation
The ability to teleport photons through 100 kilometres of free space opens
the way for satellite-based quantum communications, say researchers
Teleportation is the extraordinary ability to transfer objects from one
location to another without travelling through the intervening space.
The idea is not that the physical object is teleported but the information
th... 阅读全帖
This is dynamic language. `Person` is NOT a C++ or java like `class`. `
Person` is just a name in global scope referring to an instance of `type`.
In another word `Person` is nothing but a key in the global name dictionary.
During interpretor exiting, as @hatemaths pointing out, when __del__ get
called, there is no guarantee any referred global name still exists (
deleting order is unpredictable). In this case `Person` in the global scope
has already being destroyed. But in the local scope it st... 阅读全帖
1. Given a set of candidate garbage objects,
scan the referencing graph accessible from them,
and for each object, reduce (by one) the refcounts
of the objects that are referenced by this object.
2. Then scan the graph again, and for each object
that has NON-ZERO refcount, increase (by one)
the refcounts of the objects that are referenced
by this object.
3. Now any object on the graph with zero refcount
is a real garbage object.
Objects on a dead cycle will have their... 阅读全帖
费了老大的劲才把FMP的介绍塞进了2000个字符里。大家帮忙挑挑毛病。
Fast Messenger Programming (FMP) is a new object-based model for general
concurrent programming with NO threads.
FMP elements:
• Active objects – a type of virtual objects that represent business
functions
• Messenger objects – act as virtual machines to host and realize
active objects
• Text-based names – for FMP entities
An active object is defined as an object with:
• A name
• A list of services – each has a name and can be vie... 阅读全帖
〉〉“真是你妹啊”
这段话有什么问题吗?首先,你漏掉了这段话前的 "In Addition, protected has
another important property: A derived object...."
在结合书中这段话后面的的例子, 这段话的意思非常清楚了。并无冗余。
以下是摘要全段:
In addition, protected has another important property:
· A derived object may access the protected members of its base class only
through a derived object. The derived class has no special access to the
protected members of base type objects.
As an example, let's assume that Bulk_item defines a member function that
takes a reference to a Bulk_i... 阅读全帖
Sleek and athletic exterior meets interior elegance for a commanding yet
sophisticated presence
Top-of-the-line Elite trim introduces a premium look, feel and
experience with highest level of standard features
Direct injected 3.5-liter i-VTEC® engine with more horsepower and
torque than outgoing model
Smartest Pilot ever with new Intelligent Traction Management system,
Honda Sensing™ technologies and i-VTM4 AWD system
The all-new, third generation 2016 Honda Pilot will... 阅读全帖
最近Amazon面试好像喜欢问LRU (least recently used cache)的设计
我用doubly-linked list 和 hashtable 实现了一个简单的LRU, 抛砖引玉,供大家做
参考。祝大家都顺利拿到offer.
using System;
using System.Collections.Generic;
namespace LRU
{
public class Cache
{
public class Container
{
public Object obj;
public Container next;
public Container prev;
public Container(object o)
{
this.obj = o;
}
}
private const int MaxSize ... 阅读全帖
刚看了一个例子。大概是说static synchronized method是对class object lock,
synchronized method是对当前object lock。如果都是static synchronized或者都是
synchronized,则可以实现synchronization,因为是对同一个object。
那么在这个例子里面,f1和f2的两个synchronized是对不同的object lock。要让它们
真正synchronized,函数得用static synchronization。
以上是我的观点,不知对不对?
Using synchronized keyword along with method is easy just apply synchronized
keyword in front of method. What we need to take care is that static
synchronized method locked on class object lock and non static synchroniz... 阅读全帖
攒了个段子请大牛点评一下:
// Not thread-safe
// Talk about validation requirement: none vs in next() vs in constructor
private static class DeepIterator implements Iterator {
private final Iterator
攒了个段子请大牛点评一下:
// Not thread-safe
// Talk about validation requirement: none vs in next() vs in constructor
private static class DeepIterator implements Iterator {
private final Iterator myIterator;
private final Class eleType;
private final Iterator empty = new ArrayList().iterator();
My client in Billerica MA has following open positions.
The base salary for senior position is around 110K
The base salary for principal position is around 130K
Please send your resume to me if you are interested in one of the positions.
Thanks in advance.
====================================================================
Title: Enterprise Architect
Division: G&A
Department: Technology IT and Infrastructure
Location: USA - Massachusetts - Billerica
Description:
The Enterprise Architect will wo... 阅读全帖
My client in Billerica MA has following open positions.
The base salary for senior position is around 110K
The base salary for principal position is around 130K
Please send your resume to me if you are interested in one of the positions.
Thanks in advance.
====================================================================
Title: Enterprise Architect
Division: G&A
Department: Technology IT and Infrastructure
Location: USA - Massachusetts - Billerica
Description:
The Enterprise Architect will wo... 阅读全帖
1. What is Visual C++?
a.It's a program used for starting other programs.
b.It's a program that you use to create other programs.
c.It's a program for browsing the Web.
d.It's a multimedia program that teaches you how to program.
2.What is the name of the process by which Visual C++ converts your C++
code to a program the computer can understand?
a.Compile.
b.Run.
c.Debug.
d.Build.
3.What do you call the container that stores all the files you write and
all the files Visual C++ writes to create ... 阅读全帖
刚好最近写了一些多线程的东西, 自己也研究了一下, 多写几句.
yes, the problem is shared_ptr<> itself may not be lock-free (and atomic
automatically). so it's possible that when doing
p=shared_ptr(new Object); // why not write p.reset(new Object)?
p may be in an intermediate indetermined state. it's possible that p get
accessed during this state and you are in race condition.
However, since you used shared_ptr, you can use it's accompanying atomic
store for this purpose (not fully implemented in libstdc++ yet)
atomic... 阅读全帖
string s = "hi" + "ji";
是不是left operand,right operand都是const char*,在5个函数里都没有这个
signature?
"At least one of the arguments used has to be a string object."
参考: http://www.cplusplus.com/reference/string/operator+/
Parameters
lhs
A string object, a c-string or a character. Its content forms the
beginning of the returned object.
rhs
If lhs is a string object, this is another string object, a c-string or
a character.
If lhs is not a string object, this is a string object.
In either cas... 阅读全帖
));
Creates a new std::vector on heap. The constructor parameter (100)
sets the vector's initial size to 100, and each element (of type double) is
default initialized, making them all double(0.0).
The pointer is assigned to a boost shared_ptr, which owns it.
(Internally, there is another hidden object created, which contains a
reference count. shared_ptr then points to this hidden object.)
Prints the first element to standard output.
A new boost::shared_ptr is initialized by sharing the... 阅读全帖
1. What is Visual C++?
a.It's a program used for starting other programs.
b.It's a program that you use to create other programs.
c.It's a program for browsing the Web.
d.It's a multimedia program that teaches you how to program.
2.What is the name of the process by which Visual C++ converts your C++
code to a program the computer can understand?
a.Compile.
b.Run.
c.Debug.
d.Build.
3.What do you call the container that stores all the files you write and
all the files Visual C++ writes to create ... 阅读全帖
摘自 WIKI:
Conspiracists devote much of their efforts to examining NASA photos.
They point to oddities in photographs and films purportedly taken on
the Moon. Photography experts (even those unrelated to NASA) answer
that the oddities are what one would expect from a real Moon landing,
and not what would happen with tweaked or studio imagery.
Conspiracists also argue that whistleblowers may have knowingly
tweaked photos in hope of uncovering NASA. Some of the main arguments
and counter-arguments ... 阅读全帖
first aid: under 1 year
conscious baby
1. Lay the infant facedown on your forearm, resting your arm on your thigh
to hold her steady. Support her chin firmly with one hand, and be sure her
head and neck are lower than her torso.
2. Using the heel of your free hand, deliver five quick blows right between
her shoulder blades.
3. If she doesn't cough up the object, turn her onto her back. Rest her on
your forearm, using your thigh to support her body and your hand to steady
her head and neck. Make ... 阅读全帖
各有利弊
其他车型的radar sensor是放前保险杠后边散热器附近的吧,貌似较容易damage,但是
radar探测距离应该远。
eyesight的肯定和他的俩摄像头的探测能力直接相关了,视力要是出问题了那啥也别说了
Eyesight的disclaimer
The twin video cameras’ field of view is 25 degrees horizontally from the
center of the windshield. Unlike human vision, EyeSight has no peripheral
vision
The twin video cameras’ field of vision extends up to 260 feet in front of
the vehicle, but objects very close to the vehicle may not be detected
EyeSight works to recognize obstacles within a 19 mph (or less) spee... 阅读全帖
/**
* Using {@link AppleExercise.Problem1.SampleCache} as a starting point,
answer questions 1-3 by
* creating 3 new inner classes within {@link AppleExercise.Problem1}
below.
*/
public static class Problem1 {
public interface Cache {
public void put(Object key, Object value);
public Object get(Object key);
}
public static class SampleCache implements Cache {
private Map map;
public SampleCache() {
... 阅读全帖
When you start to learn a programming language, you want to start from a
pure language.
Before you read my incomprehensible post, you can think of Ruby as a piano
that is suitable for beginners since it got the purest sound. JavaScript is
more like an electric keyboard or guitar. Funky but hard to get the right
tune. Expert players can play fantastically but beginners will only produce
noise.
=========
Programming languages have many categories and the division is not always
clear.
However, you... 阅读全帖