failed to load resource: the server response with a status 500 (internal server error)

If your _service.getCardList() returns null then the foreach will throw an exception which you have not handled. Maybe that is the reason you are getting (500) internal server error and not the jquery url, as 500 error code suggests that something went wrong in the server code. As a suggestion, You should use implement try – catch and log the exceptions somewhere to be able to … Read more

What is the difference between int, Int16, Int32 and Int64?

Each type of integer has a different range of storage capacity As stated by James Sutherland in his answer: int and Int32 are indeed synonymous; int will be a little more familiar looking, Int32 makes the 32-bitness more explicit to those reading your code. I would be inclined to use int where I just need ‘an integer’, Int32 where the size is important (cryptographic code, … Read more

Priority queue in .Net

You might like IntervalHeap from the C5 Generic Collection Library. To quote the user guide Class IntervalHeap<T> implements interface IPriorityQueue<T> using an interval heap stored as an array of pairs. The FindMin and FindMax operations, and the indexer’s get-accessor, take time O(1). The DeleteMin, DeleteMax, Add and Update operations, and the indexer’s set-accessor, take time O(log n). In contrast to an ordinary priority queue, an interval heap … Read more

LINQ’s Distinct() on a particular property

EDIT: This is now part of MoreLINQ. What you need is a “distinct-by” effectively. I don’t believe it’s part of LINQ as it stands, although it’s fairly easy to write: So to find the distinct values using just the Id property, you could use: And to use multiple properties, you can use anonymous types, which implement equality appropriately: … Read more

Unity OnTriggerEnter2D not registering

There are four things I can think of which need to happen so that OnTriggerEnter gets called: The two objects’ colliders need to actually be overlapping. Just because their rendered pixels are overlapping, doesn’t mean their colliders are overlapping. This can be checked in the editor. Their colliders are indicated with a green outline in the Scene tab. If … Read more

Algorithms in O(n^2) vs O(n) [duplicate]

What you are asking about is a topic in computer science known as Algorithm Complexity Analysis. It is a very important topic to consider when writing algorithms, or solutions, in your programs because it relates to run-time, or how fast your computations will run. Big-Oh, or O(n) relates to the upper-bound run-time for an algorithm … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)