|
I am looking for an algorithm that, based on the previous behavior of a system, predicts the future behavior.
I'm building a parallel memory allocator that has a public list of empty blocks. Each thread, when it needs, can take blocks from this list and...
Started by lgratian on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Check out these SO questions:
When to use Genetic Algorithms and when to use Neural Networks? What are some good resources for learning about Neural Networks... .
I believe artificial neural networks are more appropriate to your task than genetic algorithms .
|
|
Possible Duplicate:
Java - Common Gotchas
What is the weirdest behavior that you have found in Java? (Behavior that is unexpected)
Started by steven on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Everything else....
Calendar.set(int year, int month, int date)
final Calendar a = Calendar.getInstance( ); a.set( 2009, 10, 16 ); System.out.println( a.getTime( ) );
-> Mon Nov 16 14:21:33 EST 2009
Apparently, month field in Calendar object is 0-based .
|
|
I remember when I was 11 or so, I was really campy, but as time goes by, I gradually changed, not because of care what people say to me, I just found I was kinda weird when I act like that. But there are still some I just cannot resist : I like shopping...
Started by stevenmai on
, 15 posts
by 15 people.
Answer Snippets (Read the full thread at gayspeak):
Make a list
feminine behavior
-i dont do sports, in any way, no exception
-i like the nice digs several colognes
masculine behavior
-work on cars, plumbing, carpentry
-speed freak: drive super fast a macho....and honestly its very hard ....
|
Ask your Facebook Friends
|
Should entities have behavior? or not?
Why or why not?
If not, does that violate Encapsulation?
Started by therealhoff on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
A "Business Entity" is a modeling of a real world object, and it should encapsulate all of the business logic ... .
I do case they should have behavior.
If you're strictly following MVC, your model (entities) won't have any inherent behavior.
|
|
What´s the name of the behavior in the statement below?
Create table dbo.Foo(name varchar(10)) insert dbo.Foo (name) select 'Weird' union select 'SQL' union select 'Server' union select 'behavior' declare @title varchar(max) set @title = '' select @title...
Started by Nitai Bezerra on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
The problem is documented in PRB: Execution Plan.
What´s the name of the behavior in the statement below?
I would Behavior' but also 'Behavior Weird Server SQL'.
Since the ordering is really random.
|
|
Hi,
I have doctrine's softdelete behavior attached to all of my models. Is there a way I can hard delete a particular record?
In cakephp I remember detaching the behavior... deleting the record and then re attaching the behavior.
Is there something similar...
Started by Yash on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Just call
$record->.
The SoftDelete behavior includes a much nicer way of doing this ...
$manager->setAttribute(Doctrine::ATTR ..
Try calling this, it should disable the behavior handling.
|
|
I have used cakePHP 1.2 and know how to use behaviors in it.
using cakephp 1.1 on a new project(i know it might sound silly but the project is very similar to an older project we have which was built on 1.1).
after a little googling i have come to believe...
Started by Yash on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Then I would go through all of the beforeSaves, afterSaves, etc and ... .
When I was doing my early developing, I wrote a behavior and realized that behaviors didn't start by importing/declaring the behavior I'm interested in.
Branch.
|
|
In C++ there are a lot of ways that you can write code that compiles, but yields undefined behavior (Wikipedia) . Is there something similar in C#? Can we write code in C# that compiles, but has undefined behavior?
Started by luvieere on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
However in Unsafe code, undefined behavior I believe is possible/library/aa664771%28VS.71%29.aspx
Has an example ....
Looking at the Wiki, the situations in which undefined behavior happens are either not allowed or throw an exception in C#.
|
|
I have a series of behaviors I want to enable/disable based on bit values. For example, the status of Behavior "A" is 0 or 1, Behavior "B" is 0 or 2, Behavior "C" is 0 or 4, etc. If the value of the variable containing the status is "5", I know Behavior...
Started by Scott on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to manipulate individual bits in an int variable directly, you can use bitwise operators:
Check whether i-th bit is set or not: bool isSet = (variable & ... .
They abstract away bit manipulation from you.
You can use a BitVector32 or BitArray.
|
|
Is it acceptable for an API to have bad behaviors (like segfault, bus error, memory leak) if the condition that would cause the bad behaviors is documented? Or should it always fail "gracefully" in all known conditions?
Answer Snippets (Read the full thread at stackoverflow):
It's called undefined behavior (link) , but you should.
Yes?? ;)
Absolutely.
Time in the future ..
|