« first day (3111 days earlier)      last day (1852 days later) » 
00:00 - 14:0014:00 - 00:00

12:27 AM
@ChristianMatthew that kind of looks like you're mixing up two different features. A local function and a delegate are two different approaches, the fact that they can have similar initialisation syntax isn't really relevant. "Using a lambda" doesn't really describe what you're doing, it's like saying "using classes" without discussing what you're using classes to do. You can return a delegate from a method, add it to a collection and so on which is not valid for a local function.
The other point is that local functions are quite new whereas anonymous delegates have been around a while. I think there is some boring technical reason you can't set an anonymous delegate as var but I can't remember exactly what that is, it's not fundamental per se
 
12:38 AM
And people were writing C# without either of them for quite a long time
 
 
1 hour later…
1:51 AM
@TomW why are you saying a local function/lambda and a delegate are 2 different approaches? the local function/lambda end up creating a delegate under the hood during compile time. per my 1st example I am assuming this is what is going on. example 2 is more of a cluttered way of doing this. Point remains, I can't write the local function without using a delegate in the = format. and I can if I don't use it. I agree that the older anonymous functions is why this is now different
in what manner is writing local/lambda functions preferred 1 or 2
 
2:09 AM
Did you heard the back-end full source codes leaked on Github from China biggest broadcasting media.
 
Emergency clearance was issued on official site. Said its a old code and an active defenses action has been taken on server.
 
what are you talking about
 
More than millions of forks was done in few hours when that sources is available.
Big impact will made as everybody can construction a same site with same backend. Pity Bilibili.
 
2:25 AM
you're scarring me
 
facepalm
Im talking with everyone, not just you.
 
there's nobody here and what you're saying makes 0 sense
 
There is many of them. As the transcript will still remain up there, reader will increasing over the time.
 
mr5
2:40 AM
o/
Can I have more curly braces
 
Im looking at that source, I expect I might can be able to learn something from it.. But it is fully wrote in Go.
 
what's up?
what do you talking about?
i just discovered here :)
 
TLDR
1. Bilibili, as China biggest broadcasting media, full back-end source codes leaked.
2. Protect your valuable codes.
3. We might be able to learn something from that source.
 
2:57 AM
@mr5 hehe, I did that myself not too long ago
 
 
3 hours later…
5:38 AM
@ChristianMatthew I don't personally see the point of local functions, I've never used them. I'm not really sure what you're asking though.
If you need a delegate, use a delegate; if you don't, don't?
You can pass a delegate around, use it as an argument to a method, for example. Local functions are private to wherever they are declared. So I suppose that's the answer
 
5:59 AM
Hi
what should I do to get questions tagged with just 'c#' only?
 
posted on April 18, 2019 by Scott Hanselman

Earlier this week I talked about how Your Computer is not a Black Box and I spent time time in TCPView and at the command line exploring open ports on my computer. I was doing this in order to debug an issue with a local DNS server I was playing with, so I thought I'd take a moment and look at that server itself. The Technitium DNS Server is a personal local DNS server (FOSS on GitHub) writte

 
mr5
look for this in the home page
 
6:23 AM
Won't that also include questions that have multiple tags and C# is one of them?
@Shad Does this mean you want questions purely of C#, because C# is generally used with/on a technology and questions are generally of those, just search the c# tag and you will find all questions asking to do something using c#, I don't think questions directly of c# syntax exist that much
 
is there an alternative to typing a lot of parameters to run a method?
ex
public decimal ReturnDifferenceAmount(decimal customAmount, decimal goa, decimal minimumRatio, decimal balance, decimal interestRate, decimal cycleDays)
 
Pass a dictionary and unpack the dictionary in the method?
 
that sounds like it would work
 
ohayou
 
hello
 
6:38 AM
pass a DTO
good morning
 
whats a DTO?
 
@Adan data transfer object
 
I still think if in the same file Dictionary will be superior, but I am fairly new to C#, so I would advice caution while taking my advice
 
usually something you can serialize/deserialize easily for the purpose of message passing
 
6:44 AM
okay... i just want to run my method with 1 parameter
testMethod(1 parameter), done
 
@Adan Make a class whose fields contain customAmount, goa, minimumRatio, etc.
Then pass an instance of this to the method
 
@Adan I think you are looking for this
12
A: Can I pass arbitrary number of named parameters to function in C#?

RawlingThere is nothing in C# available to let you pass in arbitrary named parameters like this. You can get close by adding a Dictionary<string, object> parameter, which lets you do something similar but requiring a constructor, the "parameter names" to be strings and some extra braces: static void M...

 
@nyconing can you link to the source code? well if it has not been removed
 
It's been taken down from GitHub, apparently it had usernames and passwords technode.com/2019/04/23/…
the readme is in mandarin though
@nyconing Best chat thread ever
 
7:14 AM
You're scarring me
 
7:28 AM
lol
How will it contains user data? Engineers hardcoded it?
 
possibly even in history
if it was committed once, its difficult to get rid of it
might be easier to throw away your history
 
Bilibili Inc - ADR
NASDAQ: BILI
17.72 USD +0.27 (1.55%)
Closed: 22 Apr, 7:25 pm GMT-4 · Disclaimer
After hours 17.71 −0.010 (0.056%)
BTW why bilibili stock still growing?
 
7:52 AM
port = 465
username = "manager@bilibili.com"
password = "a1654OQigEsyHz2I"
I found it
 
does "equivalent" imply two different objects?
 
8:07 AM
hi
This is returning me the ascii value
File.read()
I wanted to parse to int
 
Convert.ToInt32()?
 
(int) c
or Int32.Parse(c.ToString())
 
int n = Convert.ToInt32(file.Read());
doesn't work
 
facepalm
 
I dont even have a class File
 
8:10 AM
File.ReadAllText()
 
sorry
It's a variable
I am using StreamReader
 
can you post an MCVE?
 
File.ReadAllTheTHINGS()
 
Lol
 
It's StreamReader!
 
8:11 AM
File.ReadEntireDisk()
 
first, convert StreamReader to String
then convert to int
 
BufferOverflowException
 
System.Lang.XYException
 
string n = (file.Read().ToString());
int x = Int32.Parse(n);
doesn't work!
 
8:16 AM
first confirm that the string n contains what you want
 
it contains a number
 
or... isnt what you want
 
Is that in encoded by ASCII?
Then you need to decode
Convert.ToInt32(Encoding.ASCII.GetChars(file.Read())[0])
 
@Shad so? it contains a number, isnt that what you wanted?
looks fine to me
 
but I get 49
 
8:17 AM
@nyconing stop using Convert
 
for 10
 
its horrible
@Shad what is the string n ?
 
actually 1
1!
 
and what is the int x?
 
49
 
8:18 AM
(X) Doubt
 
int.Parse(Encoding.ASCII.GetChars(file.Read())[0])
 
it's not in ascii
Asci in 49 means 1 in human
or decimal however you want to put it
 
11 mins ago, by Shad
This is returning me the ascii value
wAIT
ASCII 49?
 
Yup the question he asked is wrong
99.99 % likelihood of that
 
hmm..
 
8:20 AM
 
it was never in Ascii
 
if the string is "1", the int will be 1
so, if your int is 49, your string is not what you want
try "C# convert streamreader to string" in google
should give you a solid result with code how to read a string from a streamreader
 
//Your code goes here
Console.WriteLine("Hello, world!");
var readedBuffer = new byte[]{ 49};
var decode = System.Text.Encoding.ASCII.GetString(readedBuffer);
Console.WriteLine("decode "+ decode);
Hello, world!
decode 1
EDIT: use GetString() instead
!!>String.fromCharCode(49)
 
@nyconing "1"
 
YES!
Im mastered JS
 
8:29 AM
dont use GetString
dont use bytes
dont use encoding
streamReader.ReadToEnd()
 
not sure, he might read() it for single byte
 
in that case, use (int) streamReader.Read()
or wait... it returns an int
 
StreamReader.Read Method

Reads the next character or next set of characters from the input stream.
 
Int32.Parse(((char) reader.Read()).ToString())
 
Yes, but he claims, he get 49
 
8:32 AM
xD
 
oh I now remember why I dont like C#
the ordering is horrible
 
I will update you guys later
thanks again
 
Hmmm. Casting to char must implicitly have an encoding, no?
it doesn't say anywhere which one
 
                    reader.Read()
             (char) -------------
            (--------------------).ToString()
Int32.Parse(---------------------------------)
start in the middle, then go left, right, left
also... its not a cast
its a conversion
 
er
 
8:35 AM
but... it uses the same syntax as a cast
 
(char)
how is that not a cast
 
and the same syntax as a box
MS likes to reuse syntax
it uses UTF16 iirc
since a char in C# is a UTF16 character
 
That makes sense, I thought it probably would be. Would much rather it was explicit though
 
MS likes to add implicit stuff
because "there is probably someone out there that wants this particular feature"
even tho for 90% of the other cases, it breaks code
 
Can I use a like to like copy of a MYSql database in SQlite?
MySQL db has no foreign keys but some views in it. Would that or some Datatypes cause an issue?
It will be used in Xamarin.Forms
 
mr5
8:48 AM
@Wietlol is that fill in the blank exam?
 
that is the order of execution
the blanks are from the previous line
 
9:25 AM
r/woooosh
?
 
im sorry, im autistic, I dont understand jokes
 
Why were you vaccinated?
Disclaimer: This is a joke
 
Autistic people understand jokes. Good jokes, anyway.
 
Ohh burn!!
 
Hello Budies Im New In Your Group
Hello Any Xamarin Expert?
 
9:44 AM
I rebuilt the project, and then error messages in vs appeared, I closed all opened docs, then controls (datagridview and buttons ) has deleted from designer, my life is paused right now, and I'm only able to chat
 
@zubairz probably, it's discussed a bit here
 
another reason to quit
 
@mshwf git checkout?
 
using TFS andd didn't make any checkout
 
@Default ok Thanks but can you invite me in a group where mostly discuses the xamarin android problems
 
9:48 AM
no
 
9:59 AM
ok brother no problem
 
10:23 AM
bonjour o/
 
Bonjour Capitan O7
 
11:09 AM
Güten tag everyone
 
*Guten
 
I'm sorry I'm abusing the umlaut (or is it ümlaut)
 
11:34 AM
You are indeed
 
whät ïs ümläüt?
 
idk I flunked German in high school
 
all I can see are diaereses
 
diawhatnow?
 
Noun: diaeresis (plural diaereses)
  1. (orthography) A diacritic ( ¨ ) placed over a vowel letter (especially the second of two consecutive ones) indicating that it is sounded separately, usually forming a distinct syllable, as in the English words naïve, Noël and Brontë, the French haïr and the Dutch ruïne.
  2. (linguistics, prosody) The separation of a vowel, often a diphthong, into two distinct syllables.
  3. (prosody) A natural break in rhythm when a word ends at the end of a metrical foot, in a line of verse.
 
11:48 AM
"See also: Umlaut"
 
I dont C
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace SGDD_Portal.Model
{
 public class ImageFileName
  {
    public List<string> ImageName { get; set; }

    public byte[] ImageBytes { get; set; }
  }
}
I have make this classs
 
cool story
 
ImageFileName image = new ImageFileName();
 
11:53 AM
initilize the class object
now i want to pass value to imageName
im using this
image.ImageName.Add(filename);
but getting error
how i pass filename is a string value
anyone can help me?
 
how long have you been doing C#?
 
What's the error message?
 
@TomW NRE
NullReferenceException
 
yes
 
@Wietlol I assume so, yes
 
11:55 AM
I dont make assumptions :D
 
OK, well, it's telling you what's wrong. Do you understand what null is?
 
I know things
 
no i didt get
i want to pass image name list value to multiple time when user add image i get the name and set in image list
anyone understand
 
List<T> is a reference type, which means that unless you create one and assign it to the member, that member points nowhere and you can't reference it
this.ImageName = new List<string>();
 
ok then how pass string value
 
11:57 AM
public List<string> ImageName { get; set; } = new List<string>();
 
^ yeah you can use that, that's a new syntax in C# 7 I think it is
Imagine being able to use the latest version of the language
 
should probably revise the setter of the list.
 
@zubairz after you initialized the List you can do whatever you want with it
@TomW by that you mean c# 8.0? :P
 
IMO don't have setters for Lists. and return IEnumerable or IList instead.
 
im not understanding
 
11:59 AM
@ActionHank I'm aware of that syntax but haven't used it, I thought it was C# 7.0 but maybe it's only in 8.0
 
@Default IEnumerable is king, yes. Setters for lists, who knows what he wants to do with it further? I say keep a setter
@TomW I meant that C# 8 is the newest one (I can only imagine using that too)
Currently on c# 7, and it's a feature here
 
@zubairz you have to create the list first to be able to add items to it. The error message is telling you that you're trying to add a string to nothing, because the member ImageName has not been assigned a value yet
the value is of type List<string>
 
@ActionHank no need if you return IList - you can add and clear it to your hearts content, but when you have a List and setters you start lose control of, for instance, propertychanged
 
@Default that makes sense
 
and it's more replaceable if you want a HashSet in the future or whatnot. Encapsulate the internals of a class, return minimum
 
12:02 PM
@ActionHank while you are at it, make the class immutable and set all properties via the constructor and remove all setters from it
 
@Wietlol maybe move to F# while we're at it? :P
 
meh
if you make a language swap, better go to Java :p
 
not kotlin?
 
kotlin can be used with Java
 
I was thinking python
 
12:04 PM
but sure, you can swap to kotlin instead
maybe the step to kotlin is easier, since its easier to learn
 
Kotlin isnt Java?
 
ᴴᵃˢᵏᵉˡˡ
 
Python isnt C++ ?
Kotlin is Java equally as much as JavaScript is Java
(slightly less even since it has no similarity in the name)
 
I thought Kotlin is framework for Java like .Net for C#
 
Kotlin is a language
 
12:08 PM
Never used so thats why Im askin'
 
like Java, C# and F#
Java and Kotlin can compile to Jvm bytecode
and C# and F# can compile to CLI
but C# can also be compiled to Jvm bytecode
and Kotlin can be compiled to CLI
and then comes LLVM and messes the graph even more
 
I get it now
 
because all of them can compile to LLVM IR
and LLVM IR can be compiled to all of the other targets
 
@Wietlol
 
@Me
 
12:13 PM
umm, to sum it up, why (char) did the trick?
 
@Evil
 
@Shad because MsLogic.exe has stopped working
 
It returned an int32
 
the syntax (X) y is used for 3 different language features
the one you are looking at for (char) 49 is a conversion
it converts the value of an integral type to a character type, which uses the UTF16 codepoint schema for conversion
in simple terms, no conversion of the bytes is performed, but it is still a conversion
 
hmm
 
12:16 PM
^
49 is just 49 unless you choose to interpret it as a char
 
but it isnt simply changing the type
 
49 isnt from ASCII table?
 
I asked this as well^
it gives 1
 
@zubairz you solved it yet?
 
No
'1', not 1
 
12:17 PM
UTF16 is an extension to ascii
 
digit 1 not matching with 49
oh wait
 
Convert to binary
It is
 
@Shad that's hexadecimal
 
hmm
 
12:25 PM
> string s1 = 'H' + "ello"; //yields "Hello"
string s2 = 'H' + 'e' + "llo"; //yields "173llo"
that's not quite at the level of destroyallsoftware.com/talks/wat but close
 
@Wietlol I get this now. LOL
@TomW lol
 
reader.read().as<Char>().toString().toInt()
hmm... kotlin
or simply reader.readText().toInt()
 
ya
until I would like to read line by line and take different int inputs ;P
 
chronological order, reads like a book, writes in a single direction, splits operations into a sequence rather than a tree, etc
if you read line by line you do val ints: List<Int> = reader.readLines().map { it.toInt() }
 
super Saiyan god!
 
12:32 PM
@Shad Now you can start learn about BOM
 
BOM*
 
Missclick
 
WHAT'S TAHT?
 
miss
'a' and 'o' are like 10 feet away from each other
 
I guess you never miss ya
@Shad Direction to read bytes
In UTF8 you have 1 so dont have, but for example UTF16 have 2
 
12:34 PM
yes right
 
@J.Doe is that cringy reference intended?
:D
 
@Wietlol 14 in int
 
byte order mark
 
@SebastianL Sort of
 
thank you
 
12:44 PM
@Shad Want deeper? Go for UTF7
 
not up to that level yet xD
 
or go for UTF256
 
LOL
 
Why not UTF2048?
 
hell
 
12:46 PM
or
UTF-1 is one way of transforming ISO 10646/Unicode into a stream of bytes. Its design does not provide self-synchronization, which makes searching for substrings and error recovery difficult. It reuses the ASCII printing characters for multi-byte encodings, making it unsuited for some uses (for instance Unix filenames cannot contain the byte value used for forward slash). UTF-1 is also slow to encode or decode due to its use of division and multiplication by a number which is not a power of 2. Due to these issues, it did not gain acceptance and was quickly replaced by UTF-8. == Design == UTF-1...
 
Intercal support UTF256
 
@Wietlol When the product owner specifies 'I want it in UTF' and you need job security
 
Go 1.12 finally dont need environment variables
At Build 2019 will be announced relase date of .Net Core 3.0
 
1:16 PM
looks like they are going to release without interface methods
only nullable references would be interesting
 
00:00 - 14:0014:00 - 00:00

« first day (3111 days earlier)      last day (1852 days later) »