« first day (3546 days earlier)      last day (1386 days later) » 
01:00 - 14:0014:00 - 23:00

mr5
1:35 AM
o/
@DAustin are you here already?
Should I CC may project manager in my resignation email since he's the one I communicate most of the time instead of just our HR director?
 
@Freerey yeah. And I realised I should sleep at what. Like 4 AM? Just like now. :D
 
 
1 hour later…
2:55 AM
different behavior of two kind of timer with GC
using System.Threading;

new System.Threading.Timer(timerCallBack, null, 0, 1000);
void timerCallBack(object obj)
{
    WriteLine("Will System.Threading.Timer GC?");
    GC.Collect();
    WriteLine("GC System.Threading.Timer now, if not trigger the second time means it's GC.");
}

var timer = new System.Timers.Timer(1000);
timer.Elapsed += timerElapsed;
timer.Start();
timer = null;
void timerElapsed(object sender, EventArgs e)
{
    WriteLine("Will System.Timers.Timer GC?");
    GC.Collect();
    WriteLine("GC System.Timers.Timer now, if not trigger the second time means it's GC.");
 
3:28 AM
someone please explain to him do not call gc?
 
well... just test the GC for two kind of timer
Someone saw....

//...
GC.Collect();
//...

***TRIGGER***
oh, the last squirrel left chat room
 
you means me?
I wont get triggered by gc
squirrels jumps in around 4-5hrs later
youre too early
 
4:26 AM
@Grace It is not case sensisitve, i'd add an ordinalignorecase to that.
 
 
1 hour later…
mr5
5:31 AM
you're early
 
Good moorniiiiiiiing CeeeeShaaaarp! Have you told someone to not do the stupid thing lately? Like building a .NET Websocket implementation themselves or manually calling GC?
 
6:04 AM
oh, a squirrel join the chat... uh.. a squirrel killer.....
 
6:22 AM
so funny xD
 
6:35 AM
h
All the code I write looks like spaghetti code :/
 
Sounds like an awesome font
 
it's not a font
 
FiraCode NoodleCode!
 
anyways, some masterhacker 'published' my source code lol
I didn't even obfuscate the project
all that skid did was put the file in dnspy and export it
my dog can do that
 
git clone github/virtualization/superProject
git push -u github/squirrelkiller/hackedSuperProject
 
6:39 AM
I dunno, skids these days, they're all over the place.
 
hello
is anybody there who does unit testing in c#?
 
morning
 
I do
And then I fail
0
Q: Controller test fails only on server

SquirrelkillerSo I built unit tests for an ApiController, and one of those fails only on the server in the CI pipeline with the exception System.InvalidOperationException : HttpControllerContext.Configuration must not be null. The structure looks like this: public IHttpActionResult MyControllerMethod() { if(...

 
7:01 AM
that is an interesting problem you filthy squiller.
 
Hey, I clean myself regularly!
Not saying how often though. I also celebrate christmas regularly.
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
@Squirrelkiller Weall knows you is lying
 
Filthyness is embedded in squirrels, so...
 
7:20 AM
@Squirrelkiller dont use resharper and use dotnet test?
 
netFx462...
Believe me I would love to
Unfortunately we have your typical business codebase
 
gotcha gotcha
 
I have to go sneaky sneaky to update it
two months ago, I finally achieved the upgrade from 451 to 462
 
wait this is an integration test that looks like a unit test
what gives
well this is a tough question ill give you that
 
so many smart people...
@misha130 you know, your name is the combination of my crush and my name.
like goku and vegeta = gogeta xD
 
7:26 AM
what does 130 mean?
 
I don't know, going to study numerology and find a pattern xD
 
oh thats pretty extreme
 
haha
 
@misha130 Definitely a unit test. I completely mock the services - the only thing tested here is the controller method.
 
Well it reaches for HttpContext.Configuration somewhere and then its null
best advice I can give you is clean, rebuild
 
7:30 AM
Oh it works locally. And the pipeline builds it from the ground up anyway.
 
yes I guess thats the only difference right?
that it isn't built from ground up locally
 
yup
Well I clean/rebuild locally too
 
well why not be hardcore about it
clone it again in a different folder and run the tests
who knows
 
uh... what's that....
 
7:53 AM
@Shad your crush is named Misha and your name is 130?
 
hahaha
 
@Virtualization those are funny things
@Wietbot evalnode var fs = require('fs');
var contents = fs.readFileSync('handler.js', 'utf8');
console.log(contents);
 
Result: undefined
Output:
module.exports.evalNodePrivate = async function (event) {
if (event.code === undefined || event.code === null || event.code === "")
return {}

const items = [];
console.log = (obj) => {
items.push(obj)
};
console.error = console.debug = console.warn = console.log;

const resultObject = exec(event.code);
const result = stringify(resultObject);

const stdOut = items.join("\r\n");
if (stdOut === "") {
if (/\S/.test(result)) // check if not whitespace
return {result};
else
 
Morning all
 
ohai
 
8:07 AM
brb coffee, no point in making that before im on the clock
 
Oh damn
I had a load of mentions
It was just from me testing the bot last night
 
lol standard dev response
"Dont be alarmed at all this weird stuff happenning, it was me doing something"
back to your lives
 
ooh, botler is a thing now?
@CaptainObvious did you do a fork from cap?
 
SQL Server [indexed views restrictions](https://docs.microsoft.com/en-us/sql/relational-databases/views/create-indexed-views?view=sql-server-ver15) are ludicrous.
Some of them make sense (no external database tables)
Others are insane: No outer joins? No outer/cross apply? No order by? No cte? No min/max/count? No OVER?
 
dang I am feeling emo
 
8:16 AM
Ayy ccaramaba lots to do this mornign
 
what's the point of being surrounded with amazing people like you when I myself can't reach the same heights.
 
"If GROUP BY is present, the VIEW definition must contain COUNT_BIG(*) and must not contain HAVING" Fuck you Microsoft!
 
why use views?
 
@Wietlol What
God no
It's based on Sandy
 
8:22 AM
sorskoot?
 
Hi. I'm a little lost as to what MMO games are. For example, Elder Scrolls Online. Do games like this play like the offline version (complete a task, move to the next), other than many (all) characters in villages / caves / dungeons are other players? I know this isn't a site for games, but many programmers are also gamers :)
 
 
@Wietlol I am working exclusively in a SQL Server enviroment where they interact between databases (external database has view and is referenced using a synonym)
Performance is awful, cannot index those views
They do introduce innecesary network tradffic between the databases
 
@MyDaftQuestions Username checks out
 
8:28 AM
Hey @Wiet I need your aws knowledge
 
Database a: Exposes a view of "Granulos"
Database b: Exposes a view of business entities cross joined with "Granulos" <-- Here we introduce network traffic
Database a: Consumes the mixed business entities-"granulos" view
 
When you have an MS SQL Server isntance, how does it work? is there a dedicated specifically rent an SQL server option or do you have to do it on ec2?
 
can you use materialized views?
good morning
 
Cannot use materialized views
After the poor data relationships they do query those views tons of time in a concurrent way
Yesterday at 2 pm, I did a full process of the business rules with 1 million rows, it is still going
 
public TLTTController(ITLTT_BAL iTL_BAL)
{
_iTLTT_BAL = iTL_BAL;
}
 
8:33 AM
<ironic>who knows why is so slow</ironic>
 
public TLTTController(ITLTT_BAL iTL_BAL)
{
_iTLTT_BAL = iTL_BAL;
}
i am not able to mock this object, and for binding i am sing Ninject
anyone is familiar with Ninject.MockingKernel.NSubstitute? and know how to use that?
 
@CaptainObvious I dont really have much knowledge about licenses tho
I just use a mysql maria db
loaded on an RDS (platform as a service)
I dont manage the server, I dont deal with the licenses, etc
at work, we used to use ec2 with a self managed sql server instance
but we also moved to something else now
 
@SoumyashreePattnaik I'm not familiar, but the project looks promising
 
> When you set up an Amazon RDS DB instance for Microsoft SQL Server, the software license is included.
 
there is an example, which should be taken with a grain of salt (the coder couldn't decide to use Moq or NSubstitute)
 
8:45 AM
I suppose that, if you want to keep using your existing sql license, you would use an EC2 with a self managed database server
I guess that answers your question, or I have no clue what you mean with "have an MS SQL Server instance"
 
@ntohl yeah it is , i am struggling since three days on this. I am clueless now how to mock the ninject mapped objects
 
so you have this.IoCKernel = new NSubstituteMockingKernel(); in the initialize
than Bind something .ToMock
this.IoCKernel.Get<something>() gets you a new one
 
okay , so the ToMock is from which assembly?
i mean i dont need any extra Mocking framework for this right?
 
it should be from Ninject.MockingKernel
 
cool, let me try this. Thanks
 
8:49 AM
you need Ninject, Ninject.MockingKernel, NSubstitute
 
yeah i have installed these three
 
so whenever you write this.IoCKernel.Get<MyClass>(), where the MyClass's constructor is having a dependency on <something>, you will get one mocked> public MyClass(<something> injectedStuff) { <using injectedStuff> }
 
mr5
my eyes ughh
 
@ntohl MyClass --> is this the interface ? or the class which inherits the interface ?
 
@SoumyashreePattnaik MyClass is now self binded no interface class, but could be...
<something> is the interface
 
8:54 AM
acha cool
anyway let me try this out hope this ll work
 
I think I have left out this.IoCKernel.Bind<MyClass>().ToSelf()
 
@bradbury9 So Batabase A & B are on 2 different physical servers?
Database* lol helps if I can spell
 
@Wietlol basically one of the comapanies we work with have an MSSQL server instance in AWS but it appears to be running on ec2 and I wasn't sure if that was the "correct" way of doing it
 
9:09 AM
it is the self managed way of doing it
in basic terms, the services AWS supply are given in different layers
EC2 is the root of most of them
you can hire an EC2 and do with it as you please
for example, host a database on it
 
EC2 == VM?
 
it is what has been the only provided service for many service providers for years
EC2 is a Virtual Machine, yes
similar to a VPS
 
Shouldn't a PaaS-DB be cheaper?
 
IaaS should be cheaper
RDS is the exact same, it is an EC2 running a database server for you
the difference is that you dont have to manage the system, you dont have to update the OS, you dont have to provide licenses and you dont have to manage the database server application
you just ask for a database and it is provided to you
that is the basic difference between IaaS and PaaS
and that is also the main reason why PaaS is generally more expensive
because you make AWS responsible for keeping your database program running and the OS up to date
the "preferred" way for me would be to have stuff work for me
so, I would choose a service that provides me with the product rather than a service that provides me with the technology
 
9:17 AM
I dont care how it works, I just want a database
but if you want more control, then an EC2 is a fine solution
at work, we use RDS Aurora
 
I mean they are really dumb so who even knows
 
which is an even more specific product
but it falls out of the free tier, so I cant use it for free :D
 
Wtf is that
 
dumb people would initially prefer an EC2
 
Why can't they just be like azure and name things sensibly
 
9:19 AM
because it is probably what they are used to
 
Azure VMs are simply called virtual machines
 
AWS has 2 different kind of names
1, descriptive names
2, metaphorical names
 
Azure databases are simply called Azure SQL Database, Azure database for MariaDB, Azure database for MySQL, etc
 
for example, AWS Glacier is a database that you can just use as archive, writing to it is normal, but reading is really slow
but it is extremely cheap
RDS is the main product
Aurora is an implementation of the database, similar to maria db, sql server, etc
 
But wtf is aurora
Is it some dodgy Amazon propriteary one or somethiong
 
9:22 AM
EC2 (or ECC) is Elastic Compute Cloud
@CaptainObvious I suppose it is
Aurora is the one that works very well with serverless architecture
 
aurora is the managed db isnt it?
 
aurora is the one that has everything by default
 
similar to how azure sql db is a wrapper around mssql
 
auto scaling, distributed computation, backups with point in time recovery, etc
it is what I call a "battleship"
it is the big gun of the database services
probably an overkill for your case
 
in azure the equivalent is cosmos db i suppose
 
9:27 AM
CosmosDb is a document db though
 
it supports relational too
 
What how
 
its a wrapper around all kind of dbs
LET ME JUST GOOGLE THIS TO SEE I AM NOT WRONG
cause this is how it was advertised
 
the equivalent of CosmosDb would then probably be DynamoDb
except if it is just a wrapper
 
Pretty sure cosmos is cheaper than sql server, so I would prefer that for my personal project. It's jsut that I need relational data.
 
9:29 AM
> You can elastically scale throughput and storage, and take advantage of fast, single-digit-millisecond data access using your favorite API including: SQL, MongoDB, Cassandra, Tables, or Gremlin.
 
ok api, but does it hold relational data?
When i access cosmos db I see the document db kind of overview
unless I don't understand it and that is in fact the overview over all kinds
 
well since db-engine dot com says its schema free
so it is schema free
 
@Wietlol This site says RDS is indeed part of the free tier
 
@ntohl, hey i tried that in my code it worked. Yiippieeee... thank you
 
I'm glad
 
9:40 AM
free tier actually got expanded with interesting tools
@Squirrelkiller aws.amazon.com/free
this lists all free tier services
 
9:55 AM
wow. You had enough of your acorns? Serious business?
 
10:24 AM
@DAustin Same server, different databases
In production they could move them to separate servers tho
 
Hello
 
Hi Bass
 
When i try to add entity data model and after providing connection string it says
" the given key was not present in the dictionary "
I am trying to connect to mysql DB
any idea ?
 
10:40 AM
FUCK VB
@Bassem are you trying to load your connection string from a config file or something?
If so, check you're spelling the field name correctly. It's very case sensitive
 
no
i am using the wizard
and press New Connection
after providing all information and press on test connection , it says succeed but after press ok i see this exception
:(
 
10:56 AM
Have you tried not using the wizard?
 
i am using Entity framework
database first
how to add model without wizard ?
 
oh ew
No idea
I use code first because it's by fasr the better option
 
There is some command, something something Scaffold-something, which takes your connection string as an argument and generates the C# entities for you
 
mr5
Code first
Code second
Database first
Database second
 
Code first entity with auto applying migrations on app startup is an easy life <3
 
mr5
11:06 AM
Ew
 
@CaptainObvious true
 
Plus it's great for multiple environments because you don't have to remember about what state each environment is in
Just start the app and it'll be in the right state
 
why anti migrations?
 
I'm not anti-migrations, I'm very pro-migrations
 
oh with auto , I read it as with out
 
11:09 AM
Oh yeah
 
been using dapper with fluentmigrator its also nice
gotta write my own migrations and queries but i know whats up
 
11:24 AM
@ntohl hey don't worry; I went to bed almost 4 hours late last night x-x
 
11:35 AM
So my question evolved
from
0
Q: Controller test fails only on server

SquirrelkillerSo I built unit tests for an ApiController, and one of those fails only on the server in the CI pipeline with the exception System.InvalidOperationException : HttpControllerContext.Configuration must not be null. The structure looks like this: public IHttpActionResult MyControllerMethod() { if(...

to
 
@misha130 looks very nice
@Freerey yeah. 4 am again last night.
@Squirrelkiller noice. How did you find AspNetWebStack github as problem forum?
 
Looked at the source to find out what else I have to mock
turns out I mocked everything I need to
- as far as I can tell -
That code is pretty straight forward
 
11:58 AM
so just mock ApiControllerDependencyProvider
 
But it's an internal thing :/
Also I actually do set the request, so it should be there
 
so I'm wondering....is it possible to have asp.net react to a key being held down while someone clicks?
like how discord will skip the confirmation box if you click "delete" message while holding shift
I think it'd be if (key.ispresseddown())
 
yeah. You need a global state which is set in keydown/up, and use the global state in click
but if you really want "react", than stackoverflow.com/a/19896246/1859959 go rx
you can easily filter and combine the two event source
 
12:14 PM
hmm ok ty :)
 
@Freerey Can you specify 'asp.net' here? What's the frontend? javsscript? Blazor? Razor?
 
MVC?
oh right yeah JS in taht context
 
Because the click event should have a property like ModifierKey or something
 
ye it's JS
 
event.ctrlKey and event.altKey then
And event.shitfKey of course for this one
notice printf != shitf
 
12:28 PM
buffer overflow :|
 
Well you better expand your buffer then
 
yipes
'your mom is like a doubly-linked list' :D
 
12:48 PM
!~shiba
 
1:48 PM
I don't understand why something as simple as deleting a gridview row has to be so goddamn complicated
 
It is simple
Remove the item from the collection the grid is bound to
Simples
 
gridview.DeleteRow(rowIndex) doesn't do shit outside of randomly breaking when I put it in a _RowDeleting void and trying to remove the grid in a dedicated method does nothing, either
this isn't even supposed to tie into a sql database; it's just removing rows from a static gridview
 
Are you not using a binding?
 
I was, and that didn't work either
 
But it does
 
1:54 PM
An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module. occurred
 
Wow what th ehll did you do
 
mr5
binding should work unless you're doing this in WPF/UWP
 
so it's a problem with VS? thank fuck because I was going to lose my mind
 
mr5
no. you should not be touching data from code behind.
always use MVVM
 
I'm not even touching data, like I said. There's no sql data here. It's literally just taking a static gridview and deleting a row in case the user added an extra row by mistake
data processing only occurs after the user clicks a submission button -- at which point the data entered is parsed into a sql table
 
mr5
1:59 PM
gridview.DeleteRow(rowIndex) tis one touching data dow
 
01:00 - 14:0014:00 - 23:00

« first day (3546 days earlier)      last day (1386 days later) »