question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Binary indices appear bugged

See original GitHub issue

I created an array of 12 bytes, and used that as the _id value for entries in a collection.

It would semi-consistently fail to find, delete, etc. operations on the entries.

I swapped that for a string of the same data, and it works perfectly.

So…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mbdavidcommented, Mar 27, 2016

Hi, found the problem! .NET gives me crazy!!

int a = 1;
int b = 10;
var r = a.CompareTo(b); // -1

byte a = 1;
byte b = 10;
var r = a.CompareTo(b); // -9  WTF???

To byte, char, Int16 and UInt16 CompareTo returns difference between values. All others datatypes returns -1, 0 or 1. Thanks for find this!

0reactions
mcmonkey4evacommented, Mar 27, 2016

Confirmed this is fixed and functional in latest 😃 Great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the core problem trading of Binary Options for ...
Most binary options brokers will offer you the chance to trade commodities, currencies, stocks, and indices. These markets are all open during different...
Read more >
Learn way to spot reversal - reversal strategy - binary options
... Trusted spots blog https://trustedspots1.blogspot.com/?m=1 NOTE- Turn off AdBlock from youtube if the link is not working.
Read more >
Here's How I Solved a Weird Bug Using Tried and True ...
Let's try and confirm our hypothesis. If we temporarily exclude all non-browser stylesheets, the issue should not occur. I did that in my...
Read more >
Binary Options Fraud
These complaints typically involve customers who have deposited money into their binary options trading account and who are then encouraged by “brokers” over ......
Read more >
Slice appending not working as intended when generating ...
I have this piece of code that generate all binary sequences of length n. so: allBitsSeqs(2) gives a 1-by-n int slice [[1 1][0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found