« first day (3513 days earlier)      last day (1418 days later) » 

1:35 AM
Hey all, I have a task at work that involves assigning an Guid(uniqueidentifier) identifier to a "family" of records. I have a stored procedure that will insert the family of records when I pass in a C# DataTable(i.e, DataTable passed in via a User-Defined Type). Should I generate the Guid in C# by Guid.NewGuid(); in C#? Or within the SQL Server stored procedure by doing newid()? Which is better and why would it be better? Thanks in advance.
 
mr5
1:52 AM
does chat.so got a UI update?
 
 
2 hours later…
4:16 AM
bezier easing in c#?
 
mr5
4:26 AM
are you looking for solution?
 
public float QuadraticEasingInOut(float t, float b, float c, float d) {
    t /= d / 2;
    if (t < 1) return c / 2 * t * t + b;
    t--;
    return -c / 2 * (t * (t - 2) - 1) + b;
}
 
mr5
4:38 AM
holy
 
most of countries in asia is in near the end of deceleration
 
mr5
you mean start to accelerate?
because next month, we will basically open up
 
Ben Popper on May 29, 2020
Brian LeRoux walks us through the pendulum swings the software industry has seen in the last decade.
 
orange is..... reached tests maximum payload
maybe
cubic-bezier is best value interpolation method.. in afaik
 
mr5
4:49 AM
yeah
I always use that for my animations
cubic in-out
I think that's the most used easing function for animation as it looks natural.
 
5:09 AM
!~>()=>{var i=0;return i++;}
!=>0
!~>()=>{var i=0;return ++i;}
!=>1
wow...ok...
 
@nyconing ?
i++ is "use i, then increment it" , the other is "increment it, then use" .
 
5:33 AM
var easeInOut = CubicBezierCore.CreateNewBezier(0.5f,0f,0.5f,1f);
Console.WriteLine(easeInOut(0.75f).ToString("0.0000000"));
//0.8941075
hehe... get best interpolator
 
mr5
@nyconing are you writing your own easing function library?
 
5:50 AM
no, I rip convert it from js
 
Buenos dias
 
6:21 AM
hola
lets see what the free game of the week is from epic games
wow nice
Basically Borderlands 2 and all the DLCs are free now
 
They got really great stuff lately
 
yeah, my idea is it's because they're requiring two-way authentication
they want to be sure that they don't start losing users
I guess
 
Would be a shame if requiring 2FA made users leave
It's for your own fucking security!
 
6:38 AM
they started strong, then started releasing shitty indie games every week
now they're releasing big games again (albeit a bit old)
 
6:55 AM
Morning!
I do 2FA on my password manager with a physical security token. You do feel safe online!
Luckily I am not traveling to countries where they require you to see your shit at the customs. Wonder why they USA call themselves the country of the freedom but spy on everyone
 
7:57 AM
good morning
 
mr5
can you achieve this gradient in CSS only?
 
It's amazing what you can do with just css
 
8:16 AM
Good morning.
 
mr5
IE ftw!
 
a visual representation of how far behind IE is
 
mr5
look at the crap MS Teams is made of.
Is this angular?
 
no idea, but it's ugly af
 
looks like a ton of feature id
 
8:26 AM
if you have a list of 100+ codes that you need to keep on your page, do you and your clients a favor and create a grouping of these 100+ codes so you can simply write one down on the page
that just looks sloppy
 
but... Any of the features might be switched on or off. They are not necessarily groupable.
lool. RoboCop made it to new Mortal Kombat
Fujin is nice
 
if it's a bunch of toggleable features, then you send a bitmap
in any case, what does that matter clientside?
the feature is on the page because it is on the page
give it an id and be done with it
 
hmm. That is true. They might be needing some human readable form, I don't know why. Just like json. All json data could be just serialized binary. No need for json at all...
wooow. Terminator in Mortal Kombat. And it can shed it's Arnold Schwarzenegger form if it burns. So cool.
 
8:47 AM
your definition of "human readable form" is different than my own, sir
 
mr5
human readable is YAML
 
you can write a binary file using YAML. that doesn't make it human readable
codes in general aren't human readable because they're just symbols of something else
unless the code itself is clear, like say, an enum for CLIENT_ORDER or something
at least that's just my humble opinion
 
at least P-R-48043-9-11 is human readable... as compared to w3vr1B-d),s}d2&.sGWr;@rYmD53a^N=KB&d7uu$SHU@0,
 
^
 
you might not know what that weird number means, but you can pronounce it
you can write it down
you could potentially remember it
 
mr5
8:53 AM
X Æ A-12 is human readable
 
no!
 
also a programmer, who took 3 days to implement it, and phoned by a support personel, he/she knows what it is about
 
I refuse
 
@Wietlol speak for yourself
P-R-48043-9-11 is about as readable as hexadecimal
 
at Nokia we had FS<6 digits> I think
 
8:54 AM
sure
 
@Neil I could still guess that it refers to some pull request
 
but then you need hexadecimal
 
and I could remember some of the 6 digits back in the day
 
it is also as readable as base64
 
if you're going to use hundreds of codes like P-R-48043-9-11, and hexadecimal is just as readable, use hexadecimal ffs
 
8:55 AM
but then again, that is not the actual data
 
Also I recently realized that our name fields don't allow numbers. Bad news if little X ever wants insurance in germany from a company using our product.
 
reduce those 100 codes to one hexadecimal string of size 20 characters
probably less
 
P-R-48043-9-11 is structured while you read it. Hexa is not
 
@Squirrelkiller dont worry, he will change his name at the age of 18 to "Bob"
 
the main feature was 48043, it's the 9th user stories 11th version
 
8:57 AM
Oh don't worry we don't accept special characters either, so Bobby Tables can be a normal boy for once.
 
@ntohl you can't tell me that this is structured and readable
I think being a programmer has taken a toll on your perspective
 
perspectives. Exactly
It's not ment for you to read
 
to the laymen, this is like matrix code rolling down the screen
 
what is the policy number on your car insurance?
I suspect it wont be a guid
and I suspect it wont be a random name
I guess it is something in between
 
of course, because they can't make every identifier "Your_personal_id"
but that's a technical limitation and there's no way around that
but it's acceptable because they give you one code, and usually not more than 10 digits long
 
9:01 AM
yeah. One of our id's contains our date of birth and gender. It's banned to use most of the cases. Approx 2 places it's ok to ask that number from you, and one of this is voting
 
ideally you make an id from someone's personal info in such a way as to not have collisions with other ids
 
@Neil than you decide to leave it human readable, or encode it into hex
 
like name_birthdate_random2digitnumber
@ntohl no because it then becomes human readable
and per my definition, has meaning to the one who reads it
 
there is a high chance, that all of the readers use the id as just a key in a dict.
that's all the meaningness for that specific id
 
yes of course, but each user sees only his own, and it has data that's easy to remember
if you were showing that same user a list of hundreds of randomly generated codes, best case scenario, he'd just copy that somewhere
in our field I suppose sometimes you don't have a choice
but better to avoid whenever possible
I've mentioned this before, but I'm a firm believer in hiding ids to the user
 
9:08 AM
@ntohl So when you have a gender change... your id... changes?
 
you, the programmer, uses the id to identify the record, but it is hidden otherwise
 
like soon I will have a phone call with a insurer, where I will dictate my 17 char long id of my car's VIN
 
let the user identify the record in his own way, and put a unique index on it for easy searching, bound by the user id and this user-defined value so you don't get collisions
 
@Hozuki I can't find a picture where a nice girl signs some paper at a desk, and a lot of boys sitting at the back waiting for their turn. The text was something like: "All 18-year-old males have to register themselves with the government authorities in China"
 
Wasn't that Thailand by chance
 
9:19 AM
maybe. I can't remember well
Asian for sure
A conscription system is employed in China. In practice, mandatory military service has not been implemented since 1949 as the People's Liberation Army has been able to recruit sufficient numbers voluntarily. Residents of the Special administrative regions, Hong Kong and Macau, are exempted from joining the military. == Registering for the draft == The Chinese system operates through a process of draft registration. The process for registering for the draft is written in Part 13, Article II of the Military Service Law of the People's Republic of China (Chinese: 中华人民共和国兵役法). Citizens who reach the...
^ and my guess is China
so there is no escape of registering to army however you change your gender. Rest is your decision
 
Which is pretty dumb to begin with. Why should only boys be registered for armies?
Equality. Register everyone.
 
mr5
konskkrrrrript reporrting
 
US Marines tried to integrate Female and Male, but stick with the separation.
tho they are the only military branch who separates
 
mr5
9:46 AM
finally!
I'm productive today.
that also includes playing D3 for 4hours :D
 
D3 is what
 
10:08 AM
So testing. Anyone have objective arguments for or against NUnit by now? I still have no reasonable explanation why I use NUnit everywhere beside "it can do everything and it's nice".
 
you mean specifically the library or you mean testing in general?
 
ROFL
-3
Q: PLEASE DOWNVOTE THIS POST. KINDLY

collinseyPlease downvote this post. Am trying something on my Azure AI. Downvote Please

 
wow
 
10:25 AM
maybe she is angry on why everyone downvoting her question
 
I can see how a new programmer can be discouraged with this sort of attitude towards their questions
but it's also true that if you weren't new, you'd see how details are missing in your question
it's a catch-22
 
10:50 AM
So uh...how do I test if a generated pdf ist the same as another generated pdf? For some reason the pdf generation isn't completely deterministic: The bytes from ReadAllBytes don't match the newly generated ones.
 
11:05 AM
@Squirrelkiller I don't think it can be the same
there's a field that holds a timestamp of when it was created
unless it's a literal copy
if you need them to be the same, generate the pdf, then copy it
it isn't enough to generate two the same way
 
Damn
Guess I only test if the extension comes out correctly and the byte[] has values
@Neil Oh and specifically the library. e.g. why not MSTest or xUnit?
 
11:21 AM
I see a lot of xUnit examples too. MSTest... not so much
 
11:34 AM
lol the post is gone
user for 20 days and it sure sounds like it
 
MSTest had no row tests, so I would avoid that...
47
A: MSTest Equivalent for NUnit's Parameterized Tests?

Israel RodriguezFor those using MSTest2, DataRow + DataTestMethod are available to do exactly this: [DataRow(Enum.Item1, "Name1", 123)] [DataRow(Enum.Item2, "Name2", 123)] [DataRow(Enum.Item3, "Name3", 456)] [DataTestMethod] public void FooTest(EnumType item, string name, string number) { var response = Exe...

I don't know what is that MSTest2, but that is ok as well
The only thing with x/n/ms tests, that all of them have the AreEqual form, instead of proper fluent
 
does imgur have poor taste in memes or something?
 
11:51 AM
proper fluent> x.Should().Be(13) instead of Assert.AreEqual(x, 13) or... Assert.AreEqual(13, x). Which is the expected is purely positional. Which is only evident, when there is a failing test message. "test failed, because 13 is not 43" or "test failed, because 43 is not 13"
 
@Squirrelkiller there's a version of nunit in java and python if I'm not mistaken
people just tend to know it better
though I don't think that necessarily implies it is better
it's just a matter of preference
 
Hello Guys
can this query executed with LINQ
SELECT
		*
FROM
		`lines`
WHERE
	    MATCH (Linetext) AGAINST ('"Hello"' )
this is a mysql query
 
MSTest has DataTestMethod for that
[DataTestMethod]
[DataRow("tesvalue1", "tesvalue2")]
 
sorry ?
 
My mesage was about MSTest vs NUnit, as ntohl wrote about MSTest not having datatests
 
11:58 AM
@Squirrelkiller devblogs.microsoft.com/devops/… just in V2
for Core RC2 and up
 
Ah I see. Doesn't help the comparison though, since if you go with ms, you'd always use mstest2
 
from line in lines
where line.Linetext.Contains("Hello")
select line
 
i need to use MatCH Against
because don't want to use like %
basacilly i have table with 30 million records and when i search it using like '%test'
it takes so long time
 
I don't know the exact working of match. Maybe you mean where line.Linetext == "Hello"
 
Match & Against is used for FULL TEXT indexes
 
12:03 PM
fulltext index is on the column?
 
yes
 
so. What does match do? Basically Contains? Or ==?
 
it looks for the indexed words
they can do both
What is the best way to search table with 30 million records
I am sure there is another way thank LIKE operator
How Facebook and large websites doing this search
 
will "asdf Hello" match "Hello"?
 
that's all sort of being abstracted away for you
don't focus on optimization
 
12:06 PM
what do you mean ?
 
asking if it contains "Hello" is in a way the equivalent of saying line like '%Hello%'
 
it isn't getting all loaded into memory
it just does the equivalent in the database of choice
 
LIKE operator search all table
this not happened with the FULL TEXT indexes
 
you may be able to call match by checking the line to a regex
but you'd have to verify that that is the case
 
12:10 PM
ok let me ask another question
how large sites like facebook implement the search functionality
when you start searching for a name , it get it quickly
 
different db architecture
like elasticsearch
 
12:39 PM
If you store a sentence in a column in a table that has 5 million records, searching for a word requires you to iterate over 5 million records and looking in each column to see if the word exists. Instead, if you store every word of that sentence separately in a 'word table' and have a link table that associates the 'word' with a record, you can find a word VERY QUICKLY. You just find that one word and use the already existing references to the sentences. That's full text search, simplified.
(Which is also why a lot of sites can't find what you mean if you misspell a word)
Fuzzy matching is hard.
 
@Bassem When it inserts the text into the database, it performs an analysis on the text for names
if it matches names of people that that person knows, it's inserted into the database as a name mention which is indexed
simple as that
 
Anything but simple on the scale that FB operates, but yeah, the basic gist is just that
 
searching through large walls of text is very slow, and a supercomputer from FB isn't going to make that reasonable using CPU power alone
like these things usually go, if you want it to be searchable quickly in a database, it needs its own index
 
Also, if you want to learn more about this, play with SQLite. It has a totally cool full text search that exposes its internals for you to look at!
 
1:29 PM
@neil wat
 
2:09 PM
Ryan Donovan on May 29, 2020
May 2020 Welcome to ISSUE #23 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. Check the wealth of tiny startups doing good work, the puzzle of keyfiles, and the wonder of the miracle sudoku. From the blog You want efficient…
 
what would be a good data structure to search by contains?
for example, a black-red tree is good for searching based on order and ranges
and a bk tree is good for searching based on fuzzy matching (on the entirety of the record)
but what would be be a data structure that can do a search by contains at O(n) or better?
where the size of the records dont matter
 
you are searching in a list of strings. You can't say the size or distribution of the list doesn't matter
 
why a list?
for example, what you can do is take each string, produce a dictionary of all the words in that string
then, you generate a multi-value dictionary for all records combined
then you can search for a string by contains (of a full word) in relatively low cpu time
 
that was the idea behind full text search ^ just now
but still. The distribution is a mayor point here. If you have n texts, and there is m1, m2, m3 words in them, if there is no overlap, you'll end up m1 * m2 * m3 *... long list search. So the size of the "list" matters. And the distribution
 
2:25 PM
I never said the size of the list matters
but I want the size of the records to not matter much
 
> where the size of the records dont matter
 
List<String> where String.Length doesnt matter
ofcourse, a larger string would result in a larger dictionary, but it would still be O(1)
 
no. It's not O(1)
I say that
 
why not?
 
large texts generates big matrix. You can't ignore it.
 
2:27 PM
IDictionary<String, ICollection<String>> get all the sentences that contain word X is O(1)
 
distribution might lead to list or matrix representation of the multi-value dictionary
 
with the exception of collisions, but a Dictionary is very capable of making sure that that is a very small case
 
if you have 10k rows of "Hello", and that's all, it's exactly O(10K)
 
no
because then I want 10k rows to be returned
and getting those 10k rows is still IDictionary.get
 
other way around. 10k rows with different words. It's a 10k key dictionary's .get
which is not different task, than optimizing the DB.
 
2:37 PM
it would be a large dictionary, yes, it might be a horrible solution, but I am still wondering what a nicer solution would be
and one that doesnt require full word search
 
building the LZW compression dictionary might shorten the key words in the dictionary
Lempel–Ziv–Welch (LZW) is a universal lossless data compression algorithm created by Abraham Lempel, Jacob Ziv, and Terry Welch. It was published by Welch in 1984 as an improved implementation of the LZ78 algorithm published by Lempel and Ziv in 1978. The algorithm is simple to implement and has the potential for very high throughput in hardware implementations. It is the algorithm of the widely used Unix file compression utility compress and is used in the GIF image format. == Algorithm == The scenario described by Welch's 1984 paper encodes sequences of 8-bit data as fixed-length 12-bit codes...
no. My mistake
not LZW
huffman
so you can have an ordered dict
and common words will return faster .get on the dictionary
but you have to build the huffman tree first
 
mr5
3:07 PM
sorted dictionary + binary search + prediction
I'm just throwing words here. I don't understand the question.
 
the question is what should be the data structure of a database optimized for text search. In fact "Dictionary" is not an answer for that, because it's an abstraction over the data structure.
 
4:03 PM
Ryan Donovan on May 29, 2020
At the time of this article, Kubernetes is about six years old, and over the last two years, it has risen in popularity to consistently be one of the most loved platforms. This year, it comes in as the number three most loved platform. If you haven’t heard about Kubernetes yet, it’s a platform that…
 
4:57 PM
Im so angry now, after watched the US police murdering video
 
mr5
and you'd be disappointed after you found out the "protest" people do after that.
 
The citizens are angry af , I dont think they are in protest, they wants to revenge
 
someone here finally talked about it
there are so many sides to this, but people will keep pointing fingers with their half-complete knowledge of the full picture
some people are saying the looters are only looting because of their "inferior" race, others are saying the police started the riots, the police dept says one of the guys who CLEARLY did it had nothing to do with it
except tbh the guy probably didn't do it because it's possible those text messages floating around are all fake
supposedly the guy's wife is like "omg he's wearing my stuff; that's my husband!"
but y'know, I say that to Twitter and I'll get banned
and people are trying to cancel Miles Morales' voice actor because he has a victim complex
 
5:15 PM
politically, that state's governor are failed to deescalate, and missed every chance that governor should appease the event, they tried but wrong approach, which is making the racial hatred escalate to riot
did US police executive officers are properly trained? they use their power abusive and unreasonable, not the first time, we can always see some news about the US police before
 
I'm honestly noticing a trend with police officers
a lot of them seem to have joined the force because they needed an outlet for their aggressive behavior
if they didn't have so much pride, they'd have probably joined the mafia instead
 
 
3 hours later…
8:20 PM
 
 
2 hours later…
10:26 PM
Is there a away to put a console program online, is there a free service for that?
 

« first day (3513 days earlier)      last day (1418 days later) »