« first day (1876 days earlier)      last day (3073 days later) » 

12:10 AM
Huh, so apparently MVC 6 lets you put a cancellation token in a controller method, which gets triggered if the browser aborts the HTTP request (such as on page navigation or ajax .abort()) davepaquette.com/archive/2015/07/19/…
 
12:21 AM
That only makes sense.
Cool
 
@MikeAsdf Fun fact: Array has a Count property, just not conventional
 
Kendall grid is bad :D
n00b
 
@KendallFrey I was just thinking
 
@Sippy wtf are you on about
 
Grid.
is bad.
 
12:27 AM
Grid?
 
Racing game
 
wtf. are. you. on. about.
 
You launched it earlier lol
SAW
 
yeah no shit i did. problem?
 
yeah it's bad.
 
12:29 AM
Do elaborate thine Views, good Sir.
 
game
bad
i cba
i would but
basic point: i found myself driving like 5 cars during that entire game
 
u cba bc u dunno
 
pls m8 u wot
 
@Sippy I've driven more than 5 classes of cars so far
 
hey so, How can I prevent concurrent access/ modification of a db record in c#?
Interested to hear the options
 
12:56 AM
use a transaction to lock the record in the database
that is the only option
DbContext.Database.BeginTransaction() is the entry
for EF at least. it needs to be disposed. there is a lot of stuff you can do with them
 
 
2 hours later…
3:28 AM
bronchitis -> possible pneumonia -> sinus infection -> ear infections in both ears, all within like 3 days
 
 
2 hours later…
fine. die then.
 
lol
sorry
:)
 
i want chicken
where can i get cooked chicken from at 1am
 
5:45 AM
24-hour grocery store maybe
 
thats what i'm thinking
meijer
i wonder if they sell rotisserie chicken
!!google meijer rotisserie chicken
 
@SteveG That didn't make much sense. Use the !!/help command to learn more.
 
Only available from 11am-8pm daily
:(
 
I have a hard time taking "Go see the world" advice from a guy who is looking for rotisserie chicken at 1am.
 
lol
haha
idc fuckin rotisserie chicken is good
if only
 
5:50 AM
I want to reboot so I can play games without it being slow, but I want to keep one of my webpages open :(
first world problems
 
i thought you said robot when i first read that
if you want to keep your webpages open, you can open task manager, and end task
chrome/ff will think it crashed and will save your tabs
 
whut
no not that way
like if I refresh it will lose info
 
oh
you could use print screen
 
okay
well
you know
like
 
5:53 AM
it's kind of ok now
 
when it does the uhh
okay, that works too, just don't forget to put the cap back on
you're ruining diary
 
wtf are you on about
 
!!google you're ruining the diary
 
diary and dairy are very similar things
 
5:56 AM
one is a book
one is not
 
one you can eat
 
!!google diary
 
yea
gnight
 
oh yeah it is night
 
6:03 AM
half day
 
 
4 hours later…
9:47 AM
hello guys
 
 
3 hours later…
12:54 PM
ok
 
user1804599
@JohanLarsson With xUnit can you dynamically define test cases? Instead of generating C# code.
 
user1804599
I want to generate tests from data files.
 
g-g-g-gunit
 
1:44 PM
We are investigating a database issue, updates soon.
 
@Elyse I have never done that but think it is supported
 
user1804599
Nice.
 
user1804599
I just implemented subtyping.
 
I might have done it depending on how you mean :)
 
We are narrowing down the Windows Cluster issue affecting Stack Overflow.
Stack Overflow is coming back online now.
 
user1804599
2:35 PM
Wrote my first C# goto.
 
You did what now
 
@Elyse eh ...
sample please?
i have never found a reason for goto in c#
lol
 
user1804599
private void AddSymbol<T>(
    IDictionary<string, T> locals,
    IDictionary<ImmutableList<string>, T> globals,
    string name,
    T symbol,
    System.Func<string, AnalysisException> redefinitionException
) where T : Symbol
{
    if (Global)
    {
        var fullName = Namespace.Add(name);
        if (globals.ContainsKey(fullName))
        {
            goto redefinition;
        }
        globals.Add(Namespace.Add(name), symbol);
    }
    else
    {
        if (locals.ContainsKey(name))
        {
 
user1804599
lol, it always throws the exception.
 
user1804599
I should've used an Action instead of a labeled statement.
 
2:39 PM
ok that's not how I would have written that
but yay for you :)
 
user1804599
 
2:57 PM
anyone can help me to find out why am not able to establish connection between server and client using SignalR??
i get the following exception
Unable to connect to server: Start server before connecting clients. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:23373 at
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
 
3:31 PM
Heyho
Anyone here to become my programm buddy? Have some ideas in mind, but it's a bit too much for just me alone
 
3:53 PM
Just make small chunks of work and complete them. You'll get there.
 
4:29 PM
Passed a driving test!!! wooohoooo
First and last test in my lifeeee
 
5:15 PM
@Slashy the last Driving test of your life?
Good job :) was it hard?
 
@juanvan no but i was really nervouss :)
 
ya we could tell..
;-0)
 
haha
 
trying to figure out how to open a dat file to read in humm..
time to paint later!
 
gj @Slashy
 
5:25 PM
@ShotgunNinja thanks haha
also i've tried to encode the data using leb128
 
ugh, making up missed hours on a Saturday
but yeah, gotta get dat monay
 
it's quite fine now but still need more reduction... :(
i think i should work on finiding nearby pixels now
 
6:22 PM
welcome @ProblemSlover
 
@ShotgunNinja cool. Thanks for welcoming. but it won't attract active people to this room :(
 
Uh
This room is one of the most active rooms on SO behind Javascript and the Lounge
it's just that it's rather slow on weekends
would you rather I tell you to fuck off back to the cesspool that is Lounge?
I'm a regular in all three rooms, but I'm a room owner here
either way, welcome
 
I saw an announcement that... Lounge<C++>. is about to get closed
Sooo. C# may become a decent alternative,, but I think it should have some more attractable title. like Sexy Csharp xD
 
6:38 PM
tumbleweed.gif
 
Maybe if they used C# instead they wouldn't be so angry all the time.
 
7:05 PM
Jugh so we'll be getting an influx of C++ people? I certainly hope not.
 
Why would we want to be called Sexy Csharp in the first place?
C# is already synonymous with sexiness
and I get the feeling explicitly stating that the chatroom is sexy will draw the wrong sorts of people.
 
@RoelvanUden dat ignorance really hurts me
 
For those of us in here, C# is not only a great way to get your questions answered by fellow professional developers in a safe and fun setting, but it's already got what we're looking for, and I don't think attracting people from Lounge will add anything to this room.
 
@Slashy Hi. What ignorance?
 
@RoelvanUden i've tagged you here few times. i guess you were quite busy and i know you don't owe me nothing
 
7:11 PM
Yeah, I judge the rooms based on the room rather than the subject. I spend just as much time in the Ruby room and I hardly know any
 
@Slashy Must have missed it. What was up?
 
@RoelvanUden some new ideas i tried :) still working on reducing the network bandwidth usage
just a stupid test i tried-for example xor'ing the entire changed area on the new and previous pixels buffers
 
How is the Ruby room? It's always empty when I go in there, or at least slow as shit
 
results in even higher kb per frame
 
@ShotgunNinja there are only 5 or 6 active members, but it is very friendly
 
7:16 PM
@RoelvanUden im working now on detecting nearby pixels with the same rgb values to push more fps :(
wish me goodluck
 
Push more 'fps'? What? Reduce networking?
 
oh i mean to reduce the data sent*
my mistake
 
Have you considered an over-time approximation approach?
 
@RoelvanUden which means?
to check the network state and send less or more data according to this?
 
the big question is why haven't you switched to using MPEG compression yet
it's a huge learning curve but it might give you the edge you need
 
7:31 PM
@Slashy Allocate one byte for an entire pixel update. That's 2 bits per channel. So you can change a channel by a maximum of 3 (or more if you shift it, but you lose accuracy). Then keep track on the server and each frame you shift the value towards the current screen value (gradual shift over time). Since you can do a max shift of 3/sec, changing from 0 to 255 takes 85 frames (2 seconds? less if you shift it more)
@ShotgunNinja MPEG encoding shows a lot of artifacts/reduced quality which is pretty bad if you stream something for screen sharing. Hence Steam is okay with it, but TeamViewer isn't.
 
@RoelvanUden how's one byte for entire pixel?
 
Would two bytes be better?
You could do 1 sign bit and 2 regular bits for change for each pixel
then on your server side have three images
1 latest, 1 as an emulation of what the client has, and 1 which indicates change timings
since it takes a certain time for each pixel to change, everytime you have a change you set each channel value of each pixel in the change-timing frame to 255, and count down each frame.
Then you lerp between most recent frame and client-emulation frame to get the next pixel value, and send that, encoded as a sign bit and two data bits
since you're already counting down from 255, you will end up cutting out a lot of data because there will be frames where the value doesn't change
I'm not doing it justice here
 
@ShotgunNinja wow wowo wow what the fuck
i hear huge ideas coming haha
 
lol
I'll try to diagram it out, pictures always help with video crap
 
7:46 PM
you would think teamviewer or more likely one of their competitors has released a white paper on this?
 
Unfortunately i'm suck at the bitwise arithmetic shit
lol
 
hi guys
I have a list of customer records (Customers), that contains a country field where each customer is from.

What I'm trying to do is convert that data into a Key/Value pair list, so it can be bound to a pie chart. Where the key is the country field from customers, and the value is the amount of occurrences of the same country name in the Customers list.

Any ideas how to approach that?
I'm thinking a Linq query on the list could return that result
but not too hot on Linq
I know where to start, create a list of type PiePoint (contains name, amount fields), then = Customers...something something
 
8:01 PM
from the list of Customers, you want the Count of all the Unique Countries
 
yes was just thinking that, I think I came across something to do that
 
@Slashy I have a quick diagram
This is a quick and dirty way to cut data out of the transmitted frame by reducing the size of the changes between subsequent frames
Say your server is alternating between two different frames, F' (previous) and F (current).
To store those two, we need 6 bytes per pixel (RGB for F' and RGB for F)
We have an interpolation timing frame, which isn't really an image, but a tool for helping us time when we need to send updates.
Everytime a channel changes between F' and F, we set that channel in our timing frame, T, to 255
and every other frame, we count it down by 1.
We also have two frames, C' and C, which represent what the client can see.
C' being the last frame, and C being the current.
 
8:19 PM
@ShotgunNinja i must to say im really amazed from the help people are giving out here
 
and we have a smaller frame I which represents the data we're about to send.
in our frame I, we have only 6 bits per pixel, not 3 bytes.
 
really realy thanks for the investment
wait what do you mean by `f?
 
You're welcome; this is just something I've come up with in the last half hour
 
or f`?
 
F' (f-prime) is the previous frame that is being sent (the screen a sixtieth of a second ago)
 
8:21 PM
lets give an example so i could undestand it better. it's a little hard for me right now hah
if we have a total red 3x3 image
 
Consider we have a red 3x3 image which is changing to a green 3x3 image
 
so it's
[255,0,0] [255,0,0] [255,0,0]
*3
 
yep, and moving to [0,255,0][0,255,0][0,255,0] x3
 
alright
 
so the red channel is moving from 255 -> 0, and green is moving from 0 -> 255, and blue stays the same
We're trying to encode the fact that red needs to get smaller and green needs to get bigger.
If we can do that, we cut a huge amount of data
but the screen takes longer to get to the right values
 
8:23 PM
i think im starting to get it
 
so changes in F-F' will be immediate
 
actually kind of deltas.. isnt it?
 
but changes in C-C' will be gradual
 
like Rcurrent-Rprev
 
yeah, it's kinda like deltas
We have a timing frame which gives us how close each pixel is to stability. We call this T.
It's the second one on my diagram.
and we're trying to produce the packed frame I, which indicates what needs to be changed on the client for this frame.
 
8:25 PM
im sorry but my english is not perfect too haha . i cannot get the meaning of timing frame
it's like a temporary frame?
 
Kinda; it more is a way of telling us how far along we are towards changing the pixels in C to match F.
 
and what will be it's values?
 
0-255 for each channel
 
for example if previous frame is [184,49,0] and new frame is [200,51,14]
 
although you could make this smaller, and the transmitted data a bit larger, if you wanted to make the gradation process faster
This wouldn't be a delta between those two frames, this would be a time value indicating how long ago those frames changed.
 
8:27 PM
the T frame values would be in that praticular pixel [200-184,51-49,14-0]?
 
No, that's not correct.
 
so i didnt get you :(
 
The point is that we're slowing down how fast pixels change in order to reduce the data needed to apply those changes.
and in order to do that, we have to know how much time we've already spent changing.
 
alright lets continue-so the T stores the time
right?
 
8:29 PM
but how eventually it would help me to reduce the data sent?
 
Basically, whenever you get a new frame F, you compare all pixels in F against the last frame, F'.
 
if in pixel number 100597
 
Oh, sorry. You're reducing the size in bits of each change in channel value.
 
@ShotgunNinja i use the desktop duplication api and i get noticed for dirty changed regions and moved region so i guess i wont need that comparison
soo another example haha
 
Oh, you're doing dirty rectangles?
 
8:31 PM
i use that too
right now
 
that changes things quite a bit
 
im passing a int +3 byres
bytes*
 
this is a cheap ripoff of dirty rectangles
 
but i can switch to your technique
lol
why?
 
the timing frame is a dirty rectangle approximation, where white pixels are ones that have had all channels changed in the last frame, and black pixels are ones that haven't changed in a while.
and shades of grey indicate pixels in the slow process of gradation
this is incompatible since it has to do compares every frame
but it was a fun thought experiment
 
8:34 PM
@ShotgunNinja shit im starting to get it. saying shit because it's implemention sounds very complex
 
it's a cheap hack, and it's very limited
you have to do more calculation on the server side, and it can easily result in corrupted image
 
actually your main intention is to transmit only the changed channel right?
 
yeah, and to only say whether it needs to increase or decrease in value to get closer to the final color
instead of transmitting a mask, we're transmitting the number to add or subtract from the current value
kind of a unit vector, if you will
 
@ShotgunNinja but what does it matter if i transmit the current channel or how much it close to the closer value?
 
and by keeping that number small, we transmit less data because we can pack it into smaller spaces
are you familiar with bit packing?
 
8:37 PM
as i said.. very very no :)
but wait
 
instead of leaving bytes and data types how they are, you take 6 bits from this byte, and take 2 bits from the same byte and 4 more from the next byte, and etc.
Rather than aligning your bits to byte boundaries, you just shove them next to each other
 
@ShotgunNinja yeah this is a very begginer somthing i've never really understand about bit shifting
if i have 2 bytes one is 14 and one 80
if i shift them into one byte
how actualy the exctraction done after?
isn't it depends on the shifting values?
i really need to get a litle deeper into this subject
 
You don't have to use shifting or masking, you can just use subtraction
but that's the sort of stuff you can do
peel out unnecessary bits when possible
 
@ShotgunNinja but just in general how it works?
 
You make the differences between values smaller, then pack them into less space
 
8:51 PM
i mean if i have the number 51
and 100
how actually can i store them as one byte?
and extract it after
 
think of them as fields of bits
not as integers
51 can be represented by a byte
so can 100
because they're less than 1111 1111, or 255
If you use a signed byte, you can get values -128 through 127 into a byte
if you use a signed 7-bit integer, you can get values -64 through 63
Signed 6-bit integer is -32 through 31
5-bit is -16 through 15
4-bit is -8 through 7
what I had was, for each channel, a signed 2-bit number, ranging from -2 to 1
if you keep adding that onto your regular 8-bit unsigned channel values, you will eventually get the full addition
oh crap, I gotta go
 
@ShotgunNinja thank you so much mate. see you later!
 
 
2 hours later…
user47589
10:44 PM
good afternoon C# peoples.
 
user47589
and the rest o' yez
 
hi amy
 

« first day (1876 days earlier)      last day (3073 days later) »