« first day (2582 days earlier)      last day (2365 days later) » 
01:00 - 20:0020:00 - 00:00

1:54 AM
when you run a sql query against all rows in a sql server table
which rows get updated first?
 
mr5
@DanielAllenLangdon wtf is dat
 
why would an order of updates matter
it's supposed to be atomic (?)
also is it a query if it updates shit?
 
lol i meant update statement
and it matters because I just ran it without a where clause
and i stopped it immediately, but it made me wonder how sql server would have gone about performing it
 
the answer is probably "whatever your database command planner says it will do" but I have no clue about database internals so maybe someone else will be able to provide a more comprehensive answer
 
2:26 AM
yeah, i never learned how the internals of databases worked
 
 
2 hours later…
4:44 AM
Hello guys.
I am developing winforms application and used Windows Ribbon on the main form.
in my application, there is a functionality of playing log files. so it has play, pause, stop and further buttons on the ribbon.
Problem is when I am starting playing of log file and hovering the ribbon buttons then more than one buttons are getting highlighted at a time. I am not able to solve this issue. Pls suggest something.
 
5:01 AM
 
 
1 hour later…
6:23 AM
Does This statement correctly set Y
`   int y;
    for (int h = 0; (y = h*SizeOfTile.Height) <= Texture.Height; h++)
            {//Y should Equal H * SizeOfHeight}`
For now I will just assume it works fine and deal with the consequences later when it breaks :D
 
mr5
6:45 AM
what is wrong with creating a new variable inside the loop body?
for(var h = 0; Texture.Height < h * SizeOfTile.Height; ++h) {
    var y = h * SizeOfTile.Height;
    // user y here
}
 
7:06 AM
ohayou
 
@mr5 I find it amazing that a ~5 line function in C can be optimized and the optimized version takes several kilobytes of source code
 
mr5
oh. there's this guy who's complaining that the libc is slow by some percent compared to his own implementation and why the main developers(Intel, AMD) doesn't want to make it fast
 
8:13 AM
Ohai
 
8:37 AM
good morning
that 1 hour later hit the spot
 
8:57 AM
Anybody here?
 
good morning :)
 
 
1 hour later…
10:23 AM
good mythical morning fellows
can someone check my answer here and tell me what do you think of it?
0
A: Converting four arrays into single 2D array in C#

Héctor ÁlvarezThis is what you need: string[] titles = new string[10]; string[] authors = new string[10]; string[] publishers = new string[10]; string[] dates = new string[10]; string[][] table = new string[][] { titles, authors, publishers, dates }; table will conta...

 
10:39 AM
@HéctorÁlvarez your answer is good, but this seems to be schoolwork, so if you included a solution for jagged AND multidimensional arrays it would be better, since it could be an exercise where they have to use one specific type
 
Oh right
I didn't see that one coming
 
11:16 AM
alrighty, I updated the answer to reflect that, I hope I was clear enough
 
you might just foreach on a mutlidimensional array, and it will iterate through both dimensions
"will force you to iterate through and fill the data with a couple of nested for loops" is not true
or that is true, but reading from it might get simpler
        var multiDim = new[,] { { "a", "b", "c" }, {"a", "b", "c"}, {"a", "b", "c"}, {"a", "b", "c"} };
        foreach (string s in multiDim)
        {
        }
s will have the values of all string
 
11:33 AM
you are reading from it
if you want to put some foo in that bar, and make it humanly comprehensible, you need to loop through the arrays he already has and insert accordingly
 
"supercat: multi-dimensional arrays in C# are stored in row-major order, swapping the order of the subscripts would be slower since you would be accessing the memory non-consecutively. BTW the times reported are no longer accurate, I get almost twice as fast times for multi-dimensional arrays than jagged arrays (tested on latest .NET CLR), which is how it ought to be.."
just run the test program. Multi dim 2 times faster than jagged
 
not by a long shot
-------------------------------------------------------
ELAPSED TIME (Jagged array): 00:00:00.0000035
-------------------------------------------------------
-------------------------------------------------------
ELAPSED TIME (2D Array): 00:00:00.0000338
-------------------------------------------------------
that's what I get
 
11:54 AM
It doesn't make much sense to me... a multi-dimensional array is slower than a jagged array
 
what is a jagged array?
 
but in a MDA you set the length of the array, it should be easier to access it within memory
@Wietlol an array of arrays
 
what is a 2D array then?
 
man, scroll up. One scroll will yield the results you need
 
ah
i thought a jagged array was a 2d array
 
11:58 AM
it's similar
 
seems like C# again comes with a weird syntax
 
jagged arrays are much more versatile, and apparently much better-performant
(is that an actual term?)
seems like devs made it up to describe this sort of stuff
 
it's all about the memory layout, and the reason why nobody uses Java for numerical computing :D
float[][] is a hilariously inefficient representation of a matrix
 
jagged arrays are faster, even though they are dynamic in size, not uniform, and are accessed individually in both dimensions, whereas MDAs are fixed, uniform, and have proper notation
@milleniumbug Do you mean that programming language based on a multi-platform virtual machine that encapsulates itself to run a 50MB hello world?
 
well, to be fair, .NET Framework is also large
 
12:04 PM
@milleniumbug I've never used matrices or vectors, never had the need to do so and hopefully never will
 
Doing linear algebra is a privilege, not a chore
 
@HéctorÁlvarez when the need is there you can open your hands and tell them you require more money for this :D
@KendallFrey this
 
@milleniumbug What do you mean with this BTW? How does memory layout impact the performance of either syntaxes?
Okay if someone can break it down for me it would be awesome, not even the MSDN docs have any information about this that I'm aware of
 
12:19 PM
because it's not about a syntax. what matters is that for a XxY 2D array, an [1, 0] element lies just behind [0, Y-1] in memory. With arrays of arrays, [1][0] belongs to a different object than [0][Y-1], guaranteeing a cache miss
 
@HéctorÁlvarez I have used this: stackoverflow.com/a/597790/1859959
 
cache miss means accessing slower memory than cache, that is, the RAM itself, which is way slower than the operations done on the matrix elements
 
multi dim array much faster than jagged
(I have changed dim = 100 to dim = 150)
 
hello guys
I need some advice about the naming convention of api controller in asp.net?
 
@ntohl Not in my project, what's the difference between yours and mine?
 
12:28 PM
like host/api/apicontroller/
 
@HéctorÁlvarez clearly source code...
 
what is the good name instead of apicontroller
 
@ntohl you don't say
 
6 mins ago, by ntohl
@HéctorÁlvarez I have used this: https://stackoverflow.com/a/597790/1859959
there is my source code
 
@jsonGPPD host/api/rest/Foo
 
12:29 PM
2D arrays allow you to reduce (if you had used arrays of arrays previously) number of cache misses on iteration from X to 0 (if you're iterating in a correct order), or no reduction at all, that is X*Y (if you're iterating in an incorrect order)
 
I store the same controller name inside the controller folder
like studentcontroller
 
ohh. Shit I haven't changed the const in other versions...
 
but if I use the same name studentcontroller, I get student1controller
so it will be host/api/student1/Foo
and it's not good to read
 
but still
multi dim is faster
 
You can't name 2 controllers the same way, you already have a student controller if that's the case, I believe? What do you get if you remove the 1?
 
12:33 PM
It says, a file name already exists
 
@ntohl Most comments there state otherwise, and I can't reproduce, let me increase the size of arrays to 1000²
 
since they both in the same controller folder
 
jesus it's even worse
-------------------------------------------------------
ELAPSED TIME (Jagged array): 00:00:00.0000162
-------------------------------------------------------
-------------------------------------------------------
ELAPSED TIME (2D Array): 00:00:00.0001276
-------------------------------------------------------
I had to make it 1000*4 because I won't type 1000 arrays manually and that's the point of the test
then again, this is sequential access
 
> Multi-dimensional arrays should logically be more efficent but their implementation by the JIT compiler is not.
wonderful
 
@HéctorÁlvarez Sample set is too small. You can't conclude anything from this small timeframe, it can be just the allocation of CPU cycles. Do it for at least a minute or so.
 
@milleniumbug Oh jesus, just-in-time messing up with me again
@RoelvanUden good point, perhaps one grows linearly whereas the other grows as in log n?
 
your benchmark doesn't prove anything though
 
@HéctorÁlvarez But... what are you testing?
 
I'm doing what I can while I wait for a bunch of binaries extracted from an Access MBD through VB6 are generated, give me a break
 
12:40 PM
I'd call it "warm-up" (JIT compilation, optimization passes, etc). Then there is garbage collection as a factor, etc. But if you're after access times, jagged arrays are by far superior to multi-dimensional arrays. :P
 
JK, it's fun
 
@KendallFrey which is faster. Multi dim, or jagged
 
@KendallFrey jagged vs multi-dimensional efficiency when it comes to setting values
 
Enumerable.Range(0, 1000).Select(x => new T[1000]).ToArray() <- here, have a 1000 element array of 1000 element arrays
 
but not much memory
 
12:42 PM
@milleniumbug So I'm to believe no one uses C# for numerical computing either
 
er, not that huge
 
@milleniumbug it's for educational purposes, and fun
 
@HéctorÁlvarez You don't measure the filling of the first (big) dimension in the jagged case. That should take up most of the time. After filling the first dimension, You just measure how much time it take to put the 4 reference into the other dimension. That is much faster, than reaching all dim all element, and set it
18 mins ago, by ntohl
6 mins ago, by ntohl
@HéctorÁlvarez I have used this: https://stackoverflow.com/a/597790/1859959
 
Now I need to make a benchmark myself
 
@milleniumbug Alright, so I'll initialize the MDA like this, and the jagged one to empty, then see how long it takes to fill each one
 
12:50 PM
@HéctorÁlvarez clock.Start(); should be before for (int i = 0; i < 1000; i++)
 
i only have 4 arrays with data though, does it get some cache bonus if I use the same one every time?
 
strings get cache bonus, if it's the same.
 
@ntohl yes I only want to measure the filling process this time, instantiation not taken into account
damn now I have to make a random string array builder
 
just use other type
not string
 
value types basically, like double or int
 
12:54 PM
In computer science, string interning is a method of storing only one copy of each distinct string value, which must be immutable. Interning strings makes some string processing tasks more time- or space-efficient at the cost of requiring more time when the string is created or interned. The distinct values are stored in a string intern pool. The single copy of each string is called its 'intern' and is typically looked up by a method of the string class, for example String.intern() in Java. All compile-time constant strings in Java are automatically interned using this method. String interning...
 
Can someone help with a transform question? Im not good at this. I'm trying to eliminate TransformToAncestor methods because the give invalidoperation exceptions sometimes : This is my old code : //var transformToAncestor = Window.TransformToAncestor(MainWindow);
//var topLeft = transformToAncestor.Inverse.Transform(new Point(0, 0));
//var bottomRight = transformToAncestor.Inverse.Transform(new Point(MainWindow.ActualWidth, MainWindow.ActualHeight));
//return new Rect(topLeft, bottomRight);
 
if you assign a single array to every outer array element, well, then, you're not comparing the same thing then
 
this is wat i have so far var vector = VisualTreeHelper.GetOffset(Window);
var topLeft = new Point(vector.X, vector.Y);
var renderTransform = Window.RenderTransform;
var bottomRight = renderTransform.Inverse.Transform(new Point(MainWindow.ActualHeight, MainWindow.ActualHeight));
the topleft in the second example is already ok but how to calculate bottom right
?
 
Nevermind, I'm confused. What would be a good way to make 1000 x arrays with 1000 items each which I can access later for this test?
 
a loop
 
1:03 PM
actually 2 loops, I thought about that
 
Or, y'know, LINQ
 
but there's probably some enumerable functionality that will do this for me
Hey, LINQ might work. I keep forgetting it works out of Entity Framework
 
@milleniumbug Sure they do.
 
for me it's more like "oh, right, people use LINQ for databases too"
 
What else does one use LINQ for :D
 
1:06 PM
as in, "hey, by LINQ they are referring to something different than LINQ to Objects"
 
@milleniumbug for me its like, why dont you use linq for everything?
on a side note, do you use the method chain syntax or the sql syntax?
 
I use the method syntax
 
can someone tell me if my code is retarded? Because I feel it is but I can't see why
            var testArrays = Enumerable.Range(0, 1000)
                                        .Select(_ => Enumerable.Range(0, 1000)
                                        .Select(r => random.Next(10))).ToArray();
if this does what I think it does, it stores 1000 arrays with 1000 random numbers
yeah it's storing zeroes, the 2nd select is probably wrong
It works like this
            Random random = new Random();
            var results = Enumerable.Range(0, 1000)
                                    .Select(r => random.Next(10))
                                    .ToList();
            var testArrays = Enumerable.Range(0, 1000).Select(_ => results).ToArray();
but it stores the same random array every time
Okay I just deduced my brain is burnt today, because the answer was right there, so I got a 1000² array of numbers, but I'm leaving in 5minutes so this benchmark is gonna be delayed until monday
 
1:27 PM
:D
 
@HéctorÁlvarez ofc its retarded, it uses a messed up indentation
i read it as 2 consecutive selects
which is not what it does
also, I believe you missed an ToArray()
version without ToArray and version with ToArray respectively
notice that the first one creates new sets of random numbers each time
 
2:02 PM
^ that will create jagged array. There is no easy LINQ way to create multi dimensional array:
0
A: How can I convert a list<> to a multi-dimensional array?

OmegaManHere is a solution using Linq's Aggregate extension. Note that the below does not check, nor is concerned if it gets a jagged sub list, it uses the max size of all the sublists and fills in according to the current list. If that is a concern one could add a check to the if to check for the same...

 
2:15 PM
he never said he wanted a multi-dimensional array
he probably just wanted an IEnumerable<IEnumerable<Int32>>
or he wanted retarded code, but we can all do that pretty easily
 
while(true) DoNothing();
 
we were arguing about which is faster. Multi dim array, or jagged array.
so he definitely did not want IEnumerable<IEnumerable<int>>
why does anyone comes up with the idea to write Int32 instead of int?
in the code base I'm working in, it's everywhere like that
Boolean String Int32
 
@SebastianL my life in code
 
why? Also EF generates Nullable<...> when converting from db first
 
2:46 PM
@ntohl I use variable declarations as "int i = 0;" "private int num;" etc
I use static methods as "Int32.Parse("bla");"
I use type parameters as "IList<Int32>"
I think that covers most usages
 
what was Your driving, to use Int32 in List<Int32>? Why?
 
some people think its more descriptive
 
i dont really think its more descriptive
 
(i dont use it, but thats what ive heard)
 
but its more related to the usage of the type
in variables/fields/properties/etc, its about the value of a variable
 
2:49 PM
Int32 is more typeish, than int?
 
in other cases, its about what type the actual type is
and in static methods, I use it consistently with other scopes
 
i like the difference between basetype lowercase everything other upper case
 
like other classes/structs
@ntohl Int32 refers to the C# struct Int32
int refers to the CIL int primitive
 
Aren't they basically synonyms?
 
the struct Int32 however is the alias for the CIL primitive
@mikeTheLiar they are aliases, true
 
2:51 PM
4482
A: What is the difference between String and string in C#?

Derek Parkstring is an alias in C# for System.String. So technically, there is no difference. It's like int vs. System.Int32. As far as guidelines, I think it's generally recommended to use string any time you're referring to an object. e.g. string place = "world"; Likewise, I think it's generall...

 
basically that ^
 
82
A: Should I use int or Int32

ravenThey both declare 32 bit integers, and as other posters stated, which one you use is mostly a matter of syntactic style. However they don't always behave the same way. For instance, the C# compiler won't allow this: public enum MyEnum : Int32 { member1 = 0 } but it will allow this: publ...

there is functional difference tho
(in which is Int32 is subset of int in functionality)
 
thats pretty interesting
but quite logical
in C#, enums are treated as a primitive int
(which can definately be argued about)
but what if you dont want to treat them as an int, but as something else?
i despise C#'s usage of ":" as it has several meanings
here, it doesnt mean "extends" nor "implements"
as stated in the comments, it means what type it will use
 
3:16 PM
Not necessarily. An enum is, by default, an int, but you can make it a byte, short, ushort, etc.
/technically correct guy
I'll see myself out. Have a nice weekend. Or not. Your choice, really.
 
ohh hi
 
@RoelvanUden that is what I said, right?
 
So I have a problem that I'm not understanding... I have two ways of starting a task that writes to a socket, and when complete writes "Thread sending on port {socketSendingPort} done" when done. The implementation of the first link works, the second link, only posts "Thread sending on port 3 done". Thoughts?
https://pastebin.com/gLb1YmS2
https://pastebin.com/e3VHTx6N
 
3:31 PM
try again the first. Maybe it did not unbind the socket, and just a false error.
 
I tired it and got the same result... humm.
On the first link, I took out the task and just ran it as a normal function call, works fine. Must have to do with the Tasks...
I should be able to have two endpoints X and Y that use udp to send messages to endpoint Z at the same time, right?
 
3:52 PM
UDP have broadcasting yes
 
That's not broadcasting
 
4:06 PM
Broadcasting is where you send to all addresses that support it, right?
 
A broadcast address is a logical address at which all devices connected to a multiple-access communications network are enabled to receive datagrams. A message sent to a broadcast address is typically received by all network-attached hosts, rather than by a specific host. == IP networking == In Internet Protocol Version 4 (IPv4) networks, broadcast addresses are special values in the host-identification part of an IP address. The all-ones value was established in RFC 919 as the standard broadcast address for networks that support broadcast. This method of using the all-ones address was fi...
 
4:51 PM
Keep in mind that UDP broadcasting requires careful setup of your network.
 
@WilliamMariager how did Your Observable.Create gone?
 
Ah, didn't use it, it was mostly just a bit of brain storming.
 
for brainstorming it was quiet effective. I have figured out some cool way to enhance my example code.
next time I will write it down. But I got to go.
 
5:07 PM
Hey, anyone here really good with F#?
 
NH.
5:19 PM
does anyone else think the person who reads the YouTube Red ads sounds like the most depressed person you ever heard?
 
@BenjaminGruenbaum Reed but he doesn't come around here anymore. Check chat.stackoverflow.com/rooms/51909/f
 
Sucks, I was hoping he was here
 
NH.
ok, so any URL that starts with stackoverfiow.com redirects people to the same page? Like stackoverfiow.com/any-text-whatsoever ?
 
@NH. AFAIK yes but that URL wasn't working a ways back
Also "C# and Mumps professionally" - do you seriously have to work with MUMPs?
Also "Javascript just for fun" I'd call you a monster for that but if you actually do have to work with MUMPs I can see how JS would be a fun diversion.
 
NH.
5:39 PM
meaning that I use Node-red when I'm programming for non-work-related things.
Yes, ASP.NET Web API is more fun for making a whole webservice (as long as the schema is rigid, JS licks MS hollow when using dynamic schemas), but I jolly well shan't set up a whole C# project if I'm just trying to hook together two online services real quick.
 
@NH. not meta.stackoverfiow.com
 
> starts with
 
not contains
 
NH.
@mikeTheLiar where did you hear about MUMPS? I thought Epic was the only (large, somewhat-modern) company that uses it?
 
NH.
5:48 PM
@mikeTheLiar That is very sad, and so true. I dropped a couple grand in pay level to escape that insanity, and that after about 6 months
which also means employment practices are flawed. but anyway, I'm allright now, starting my career after 3 years of useless software company work.
sorry, not couple grand. 20 grand.
I would say that is a good cautionary tale for anyone about to graduate with a CS degree.
"developers needed to use the internally-created text editor. It actually made vi look user-friendly." If this is Epic they are talking about, that text editor is called Breeze, or ^%ZMSP (the actual routine name)
hardly anyone uses it as of the time I left, as there is a much better (still internal) alternative.
 
user7442629
Hi guys
Is there any way I can play a byte of sound data on my own (i.e. making my own audio engine)? Or like a starting point or something?
 
@Aleksbgbg A single byte is not any kind of sound data
 
user7442629
Same thing
 
user7442629
You get my point
 
What? No I don't. Same thing as what? What?
 
user7442629
6:01 PM
Playing sound
 
There are plenty of APIs for playing sound
 
user7442629
Wanna make my own
 
Your own what? Sound card? Audio driver?
 
user7442629
Motherboard
 
user7442629
Sound playing API
 
6:03 PM
Like, wrapping an existing one with more features?
 
user7442629
I want to completely make everything from the ground up (as low level as I can get)
 
You don't mean that
You want to manufacture your own transistors?
 
user7442629
On the software side
 
user7442629
By as low level as I can get
 
user7442629
I mean as low level as my abilities go
 
6:04 PM
You want to write a driver?
 
user7442629
I guess so
 
Then don't use C#
 
user7442629
Well how low can you go with C#
 
You can't.
 
Not drivers, unless you want COSMOS or something
 
6:06 PM
COSMOSOS
:D
 
user7442629
So
I couldn't instruct the sound card to play a unit of sound data in C#?
 
Not directly
There's no such thing as a "unit" of sound data, either
 
user7442629
Yeah whatever
 
user7442629
A set of sound
 
user7442629
Or what is it called
 
user7442629
6:09 PM
A sample?
 
A note?
I dunno
 
A sound?
A waveform?
 
Sounds like you need to find an API that plays sound files and then just construct the files at runtime to get the control you're looking for.
Maybe if you can find something that can play from streams, you can stream the sounds to play.
 
user7442629
Well like make my own audio engine
That's what I wanna do
 
Asking to play one sample of a sound is like asking to display one pixel of a video
 
user7442629
6:10 PM
Instead of using the MediaPlayer class
 
user7442629
Yeah I know but I can go from there
 
Well, there are plenty of APIs you can use, at various high and low levels
But Windows doesn't give you direct access to the hardware
 
Doesn't DirectX have something to do with sound too?
@mikeTheLiar Oh god, that's horrible :|
 
user7442629
So what is a low level API that can play sound samples that I can build on? Or something like MediaPlayer does
 
1 min ago, by William Mariager
Doesn't DirectX have something to do with sound too?
 
user7442629
6:14 PM
Yeah but that's a graphics API mainly isn't it
 
Have you checked?
 
Direct3D is a graphics API. DirectX is a superset of Direct3D
 
Apparently DirectSound is deprecated
 
@Aleksbgbg Why are you doing this? It seems like you don't really know how to accomplish what you want.
If you are doing driver programming just to learn, then C# is the wrong language.
 
user7442629
Main reasons are:
- For practice and understanding (i.e. to get better understanding)
- I have an audio player which I want to make the audio engine for
 
6:24 PM
If you want to understand hardware and low-level programming, you're basically doing OS dev. Otherwise, you're using software APIs. There's not much crossover.
 
@Aleksbgbg Define "audio engine." How are you planning on swapping out the "engine" of the audio player?
 
user7442629
Yeah I see what you mean, I obviously don't know much about this stuff
Thought there'd be some way to do it
 
It's typically not easy to just swap out an integral part of an application.
 
user7442629
Well in my app I'm using the MediaPlayer class
So just make my own, and swap it out
It's all sealed so no problems there, just replace the functionality, and refactor the bits I change
 
@Aleksbgbg "It's all sealed" Are you talking out C# sealed?
 
6:27 PM
@Aleksbgbg Maybe you'd enjoy Arduino programming. You could probably write an audio driver for that.
 
@KendallFrey I've done it.
 
user7442629
It's a class
Not a 'sealed class', just a class, which is sealed functionality
 
done what? an audio driver?
 
@KendallFrey On an Ardunio, yes. Was crap and only played flat tones, but it technically was a driver.
 
Oh so it wasn't PCM or anything cool?
 
6:34 PM
@KendallFrey No, just made noises. Could play crappy songs too but I basically hard coded the songs in. It was basically the first coding project I gave myself. Then I decided I liked blinking lights more and built an LED cube.
 
If you like blinking lights, you may like my project: youtube.com/watch?v=H8Cmht5duso
 
@KendallFrey Was it pre-programmed to sync to the music or does it react to the waveform? A bit of both?
 
all preprogrammed
 
Makes sense. Some of the animations would require some incredible AI to pull off.
Don't know if one actually exists.
 
Probably not for anything that complex
 
6:41 PM
@KendallFrey What LED strip is that?
 
Some ordinary Neopixel array
 
Most I've seen basically have two modes: on or off.
Looks like fun to play with.
And doesn't require all the soldering work a cube requires.
 
@TylerStahlhuth I wonder if you could have a few different samples to compare with and effects to go with them. Like the wub wub sound of dubstep.
Wouldn't be AI.
Would just be a huge database of samples.
 
At that point it would just be simpler to preprogram it
 
NH.
6:46 PM
too bad these things don't have industrial applications or my next job would be playing with them all day
 
You're literally describing a type of AI. Lol
 
Ah right
 
@NH. Move to Vegas?
Work for a band?
 
NH.
point taken
But I had relatives that (used to) live in Vegas, and I would never, ever, consider that.
 
7:17 PM
Is it possible to do something like this?
var stuff = Enumerable.Range(0, 10).Select(i => new { Index = i});
 
Try it and find out?
 
I don't see why it shouldn't be possible.
 
this compiles and runs without crashing. now, whether it does what you expect, we don't know because you haven't specified what's the expected result
 
Has there been done any metrics on machines that have .NET and which version? I know Vista comes with a certain version.
On XP you had to install it manually right?
Found this
 
idk my friend asked if he can do functional interfaces with anonymous objects and sent me this snippet of what he was referring to but I still dont' get him lol
 
7:29 PM
> functional interfaces
is your friend a Java programmer by chance
 
yes
What's the difference between lambdas in java vs c#?
Are functional interfaces only a java thing?
 
A Java functional interface refers to an interface with only one method. This matters because a lambda which can accept the same arguments as that method can be converted to an instance of that interface.
IOW, public interface AcceptsAnIntAndReturnsAnInt { int evaluate(int x); } is a functional interface, and a function which accepts a AcceptsAnIntAndReturnsAnInt, can get passed a x -> x + 1
 
So, remember that conversation we had about encoding the other day? Anyone either know what happens when MVC receives a UTF-8 encoded string and stores it into a string variable (which are Unicode) or where I can find it?
On a postack
 
It's done that way because Java never ever had delegates before
 
What do you mean by it gets passed a " x -> x + 1"? That's the parameter you can pass in?
 
7:38 PM
It's a Java lambda expression
C# equivalent would be x => x + 1
 
ok
yeah
I asked him to clarify what he expects and waiting for his response lol
 
ugh, lambdas so ugly
(+1) way better
 
why are lambdas ugly?
 
Don't get him started.
 
lol ok
 
7:40 PM
(+1) is a Haskell section, which is semantically the same as Haskell's \x -> x + 1, or C#'s x => x + 1
 
@Euridice01 so verbose
 
By Unicode I mean UTF-16LE.
 
So you prefer Haskell lol
 
6 mins ago, by mikeTheLiar
Don't get him started.
 
alright alright alright
lol
@milleniumbug, I guess my friend was just trying to show off idk. He's like I just tried it and it works, you're right and left it at that. He was just wondering.
Can you do what he meant to do in Java?
 
7:55 PM
the "he can do functional interfaces with anonymous objects" part is ambiguous because I'm not sure what does he mean with "anonymous object" because the context of the conversation suggests he's using a Java terminology, but I'm fairly sure there are no "anonymous objects" in Java, unless he's referring to the objects created by declaring an "anonymous inner class"
 
01:00 - 20:0020:00 - 00:00

« first day (2582 days earlier)      last day (2365 days later) »