« first day (3994 days earlier)      last day (937 days later) » 

2:47 AM
@Squirrel.98 Good Job! Now just don't get it again
@AndyD273 Ya I see what you're looking to do, It looks like a stander-ish api for requests, with an IP or Host Middleware to filter where requests are authorized instead of a login.
 
 
2 hours later…
5:02 AM
hello
can anyone help me with my question? stackoverflow.com/questions/69241244/…
0
Q: ClosedXML reading empty cell and increasing count

gorgeusDevI am reading excel file with ClosedXML, I have data in 1 single Column A1.A2.A3... all A columns, When I open excel and delete A2.A3 and keep only single value in A1 and save excel, after that when I upload file to file control it uploads file and prints 3 even though I have single data in A1. it...

I am not able to fix it Kindly, help!!!
 
 
1 hour later…
6:26 AM
hi
Error CS0266 Cannot implicitly convert type 'System.Collections.Generic.List<AssetDeclaration.Infrastructure.Models.AssetDeclarationSummary>' to 'System.Collections.Generic.ICollection<AssetDeclaration.Domain.Interfaces.IAdditionalAssetSummary>'. An explicit conversion exists (are you missing a cast?)
i created interface in namespace AssetDeclaration.Domain.Interfaces
and classes in namespace AssetDeclaration.Infrastructure.Models
I am trying to implement my function as below
public ICollection<IAdditionalAssetSummary> GetAdditionalAssetSummary()
{
var summary=(from a in _context.AssetDeclarationAdditionalAssets
join at in _context.AssetTypes on a.AssetTypeId equals at.Id
group new { at.Name, a.CreatedBy } by at.Name into g
select new AssetDeclarationSummary
{
AssetType = g.Key,
EmployeeCount = g.Select(x=>x.CreatedBy).Distinct().Count()

}).ToList();


return summary;
}
please help in understanding this issue.
 
6:52 AM
the issue is that a List<String> is not a valid ICollection<Object>
(where String is just a subtype of Object, any 2 types in a hierarchy where A is a subtype of B would have this problem)
because a collection of objects claims that you can add more objects to it, but a list of strings does not allow that
you would have to return a list of the supertype
List<IAddicionalAssetSummary> in your case
basically, before you do ToList(), also do a Cast<IAdditionalAssetSummary>()
also 2 hints:
1, avoid var unless it is extremely obvious which type it is (literals or in combination with new)
2, avoid sql syntax linq queries, just use the method syntax
@gorgeusDev dont use array, use List, dont add items when the value is an empty string, if necessary, you could convert the list to an array afterwards
@Squirrelkiller in our codebase, we dont even see the dead code, we are too used to it
 
7:09 AM
Good morning
 
ohai
 
8:05 AM
What would you use? string.IsNullOr.. or String.IsNullOr..
 
@Ravi generic parameters are usually not covariant, unless it's na interface and marked as out T. A simple fix here would be return summary.Cast<IAdditionalAssetSummary>();.
@Squirrel.98 Definitely string.IsNullOr... but don't ask Wietlol.
 
hahaha :D
Now I am curious
 
myString.IsNullOrEmpty()
obviously negated by myString.IsNotNullOrEmpty()
 
string.IsNullOrEmpty(myString)
 
string is the C# language keyword, compiler will turn it to `String`. Similar to int -> `Int32`.
String is the actual class, compiler has no choice.
MS says to use the language keyword whenever possible.
 
8:10 AM
do they tho?
6583
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, 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 generally recommended to...

personally, I just avoid the lower case names
 
so you'd use String.?
 
String is a type, I treat it as a type, types have the naming conventions to be PascalCase
so I use String name = GetName();
 
I support syntax of "".IsNullOrEmpty() , it just save my precious 5 seconds
 
and I use String.Format()
IsNullOrEmpty() as an extension method is primarily for the reason of chronology
GetUser()
    .Name
    .IsNullOrEmpty()
 
@Wietlol Didn't know that is possible.
 
8:14 AM
it isnt
not by default at least
 
I just have a set of magical functions in a library that gets included everywhere
public static Boolean IsEmpty(this String text) => text.Length == 0;
public static Boolean IsNotEmpty(this String text) => text.IsEmpty().Not();

public static Boolean IsNullOrEmpty(this String text) => String.IsNullOrEmpty(text);
public static Boolean IsNotNullOrEmpty(this String text) => text.IsNullOrEmpty().Not();
these are just 4 of the functions in that library
it doesnt use nullable references yet tho
and it probably never will because MS will probably never fix their issues
 
This is your own library ?
 
ye
 
Pretty cool
 
8:19 AM
I have similar ones lol
Also .As<T>() as a chainable cast.
Way nicer than having to add more parentheses around a cast
 
my As<T> uses as
there is also one
CastTo<T> which uses a direct cast
both are pretty useful ;)
not sure what yours uses, but I would assume an as operation as well
 
Ah good idea. I just went with direct cast because I usually want it to just fail in those cases.
Also didn't think of just making two methods^^
 
now you have a problem though
your code that uses As<T>() will assume a cast happens
it will be difficult to refactor that
you are probably just fine with keeping it as-is
 
Why refactor? It's just a replacement for ((MyType)GetSomeObject).
Like enums
Old netFx has no generic methods for enums
 
you cant change the As function to use as tho
because as has a different behavior than (T)
 
8:28 AM
Ah I see. Yeah I don't wanna change it anyway so...I'm good.
 
I rarely use As<T>() myself
its often that I want the error when it is not of that type
 
There are very few times I wanna use as, and if it happens it's usually combined with pattern matching in an if or something.
 
8:54 AM
Fucking get in !!!
Finally got it working
 
Nice
So...new machine right?
 
my bet is on new internet
 
Factory reset the internet real quick
 
Nah :D I'll post the answer to my question.
0
A: Nuget not installing packages

Squirrel.98These are the steps I did to make it work. Tools > NuGet Package Manager > Package Manager Settings Go into Package Sources Copy the details of nuget.org Delete nuget.org Then, re-add nuget.org using the details you copied.

Not sure why this has worked for me..
I am quite amazed, considering it had the same details. Unless, the source had some corruption.
 
Damn
Caching fucked you hard
 
9:02 AM
Glad it's bloody working now
Finally can work :)
 
9:31 AM
@Squirrelkiller Thanks for your reply. Actually i was using wrong interface.
but still i don't know when I was returning ICollection it was not working but when I used IEnumrable it worked.
 
Yup IEnumerable is declared as IEnumerable<out T> so it's covariant.
 
9:48 AM
[Captain Obvious] @squirrel98 I've had that issue before actually where the sources cock themselves up
 
10:12 AM
@Botler A lot of bollocks isn't it.
 
10:34 AM
@Ravi an IEnumerable<String> is a valid IEnumerable<Object>
because IEnumerable does not care about the exact type
 
Just started using Xamarin.
 
[Captain Obvious] My condolences
 
MainPage = new AppShell(); is set to AppShel()
 
good luck
you'll need it
 
I'd like to change this to LoginPage
Danke
 
10:35 AM
[Captain Obvious] My name is Lee and I agree with Wietlol in this specific instance
[Captain Obvious] in this context
 
Hello Lee and I agree with Wietlol, I am dad!
 
lol
 
[Captain Obvious] I was more going for the american still "I'm <insert representative here>, and I approve this message"
 
Captain Obvious heavily regretting his decision of going online today
I am too european to understand those mediocre american statements
my jailed mind cannot understand the amount of freedom that is expressed in stating someone's approval
 
[Captain Obvious] I too am european
[Captain Obvious] Just not EI-ean
 
10:38 AM
EAN13
 
[Captain Obvious] EU-ean, althought that's right too
 
btw, nice job Cap
 
[Captain Obvious] thanks, but why
 
it appears you updated botler to relay edits
 
10:39 AM
probably a while ago
 
[Captain Obvious] I just logged in as the bot and edited the message
 
no?
 
We can't have you linked messages like that one out of context now can we
 
... u serious?
 
ye boi
 
10:40 AM
well... in that case...
go fix ur bot lee, we need relay edits
preparing to ignore the invitation to make a pull request
 
I'd need to store the message IDs
sod that
anyway bye
 
you only need to store the message ids temporarily
 
[Captain Obvious] But it's just a pain
 
meh
 
[Captain Obvious] I'm not even sure if the shitty library supports submitting edits
 
10:41 AM
I could host Wietbot again and have him do the relay
 
[Captain Obvious] Oh yeah because that went well last time
 
sure it did :)
tbf, I dont remember things going wild with relay
the only serious problem Wietbot had was the unexpected duplication of its responses
what went wrong with the relay?
 
10:56 AM
I see... that is a significant issue
probably indeed better to not use Wietbot then
 
11:34 AM
[Captain Obvious] Some people occasionally do work you know
 
ironically, you were probably not working just now, but having lunch break :D
 
11:50 AM
[Captain Obvious] What's a lunch break 🤣
 
anyone here have experience with the m2m api?
 
12:42 PM
If my application version is 1.0.0
I have 2 new Minor features and 2 bug fixes
My next update is 1.2.2 right?
or is it 1.1.0?
For my next all in one update
 
12:53 PM
depends on the ordering how you published the versions
if both minor features goes without version release, then you publish it, it will be 1.1.0 including both minor features. If bug fixes first, then minor feature it's still 1.1.0
 
aw man there's actually rules to it? 😔
hey you're all socialized (I think) adults here; are cafes a good spot to meet new friends?
 
[Captain Obvious] The only rule is versions only go up
 
1:12 PM
if you have a single release, then only one version goes up and all version parts after that reset
so, from 1.2.3.4 with one minor (0.0.1.0) update goes to 1.2.4.0
it doesnt matter how many minor changes there are
just what the biggest change is
if you have multiple releases, then the order matters
 
Cheers guys
 
you could go
MMmm: 1.0.0 -> 1.1.0 -> 1.2.0 -> 1.2.1 -> 1.2.2
MmMm: 1.0.0 -> 1.1.0 -> 1.1.1 -> 1.2.0 -> 1.2.1
MmmM: 1.0.0 -> 1.1.0 -> 1.1.1 -> 1.1.2 -> 1.2.0
mMMm: 1.0.0 -> 1.0.1 -> 1.1.0 -> 1.2.0 -> 1.2.1
mMmM: 1.0.0 -> 1.0.1 -> 1.1.0 -> 1.1.1 -> 1.2.0
mmMM: 1.0.0 -> 1.0.1 -> 1.0.2 -> 1.1.0 -> 1.2.0
 
What's the MMmm
 
Major vs minor
 
1:17 PM
or whatever you call it
also, probably the first number should be major
 
MMmm
 
and the second minor, but whatever
hmmm
^ hotfix, minor, minor, minor :)
||hmm
 
@Wietlol Thanks :)
 
I just went from rage-fueled to bouncy/happy in a few minutes and I'm scared now
happy, but scared/unsure how the hell that keeps happening
 
1:37 PM
@Freerey What are you doing?
Anxious is probably the correct term for this description.
 
I'm just at work right now, thinking about things while I try to figure out why postman's working for one guy but not me
 
Using the same steps?
 
I recently shut myself away from a lot of social media so i can try to make friends irl finally
@Squirrel.98 well yes, and he's stumped too
 
@Squirrel.98 where I come from, we call it 'crazy'
 
but the postman thing isn't my big concern right now
 
1:44 PM
@Freerey Good start I suppose.
 
@Freerey is it a single call or a series?
 
in postman it's a single call
 
@Wietlol German's right?
 
export both to cUrl and compare text differences
 
the big difference is his thing returns proper json and mine returns "the resource cannot be found"; this API sucks
 
1:45 PM
@Squirrel.98 germans are a different kind of crazy
authorization issue probably
 
nope, we're both using hte same token
that's what he thought, too
 
@Wietlol Though you we're German :/
 
have you compared the cUrl?
 
what do you mean?
 
@Squirrel.98 nope
> export both to cUrl and compare text differences
iirc, in postman, you can "generate code" and choose "cUrl" as option
 
1:47 PM
@Wietlol Netherlands ?
 
then go to diffnow.com and compare the differences
@Squirrel.98 ze glorious netherlandisch
 
ahh! You guys are like .. Crazy happy type.
 
trying to find the code snipet panel
 
Had a friend lived there for a year.
 
found it
@Squirrel.98 more like happy sometimes, sulking sometimes, so desperate for companionship that I'm getting myself in trouble, even though I have a history of being just as emotionally erratic when I am in a relatoinship anwyay
having more friends irl would be really helpful, too
 
1:56 PM
More friends?
Maybe, closer friends. Genuine friends. :)
 
I don't really have any close friends irl anymore
and 1 > 0
 
What about at work?
Is there a work's night out?
 
man we used to do stuff like that before covid...idk why we haven't gotten back into it
plus I'll be real: almost everyone I work with is old
 
What about another job? :D
Younger environment
 
@Squirrel.98 shhh they don't know
I really do miss our friday lunches though
like I always had this habit of being unintentionally funny
 
2:08 PM
What not mention it to someone..
@Freerey Looking for one already?
 
eh
haven't been looking too actively for awhile
cause a few months ago one of our 3 IT guys left and we only got a new one last month
 
All men in your work place?
 
mostly
old men with families
 
You're a woman right?
 
nooo..
 
2:14 PM
Why not break up some relationships ?
 
what
 
Don't matter - just some evil thoughts
 
[Squirrel in Training] also amyy: HI IS THIS THE STACK OVERFLOW CHAT WHERE I CAN FIND NEWZ FRIENDZ?
 
what is heut em?
oh that was today
amy, the rainbow dash one?
wtf their account is gone now?
I can already tell I'll probably end up like Amy :D
 
relay missed a message?
@CaptainObvious shame! shame! shame!
 
2:28 PM
why is Amy gone?
 
who is amy
 
someone who had a rainbow dash icon
 
mustve missed them
 
ffs I accidentally clicked an email for "gamer-dating.com" on my work pc
stfu gmail
 
Need some assistance with a database schema. I'll explain a basic scenario.
CREATE TABLE Records` (Id INT, Value INT)`
If the value is less than or more than x. I need this record to be re-checked.
How would I create a schema for this? :/
 
2:41 PM
wdym by "re-checked?"
 
As in re-test
for example...
    Id  Value
    1     40

    Minimum value should be 50, for the above record.. this record needs to be re-tested again.
 
sounds like you need a constraint for the row of Value
 
@Squirrel.98 here you go w3schools.com/sql/sql_check.asp
 
Something like
 
2:44 PM
@Freerey w3schools is a terrible resource. We suggest using MDN. Here's an potentially equivalent page: SQL - MDN Web Docs Glossary
 
CREATE TABLE `Records` (
	Id INT NOT NULL PRIMARY KEY auto_increment,
    RecordId INT NOT NULL,
    FOREIGN KEY (RecordId) REFERENCES `Records`(Id)
);
 
stfu James
Foreign keys are a type of constraint, yes
 
I actually need to note down the previous record.
Rather than check the value then.. do not store it if it does not meet the requirements.
Could just add a column Status
 
3:15 PM
[Captain Obvious] RELAY DOES NEVER MISS A MESSAGE
[Captain Obvious] HOW DARE YOU SPEAK SUCH HERESY
 
A SINGLE SPACE
 
a single space.
 
The reason Postman didn't work was because of a SINGLE TRAILING SPACE AT THE END
 
well... postman worked, the service you were using just didnt
 
STFU I'm busy strangling this single space for wasting three hours of my life
 
3:25 PM
in the meantime, you could welcome cUrl and diffnow.com to your available tools
 
trim
 
4:04 PM
Hi all, a Docker question, in Dockerfile
what do the paths in the array mean for COPY, ex:
COPY ["path1/myproject.csproj", "path1/"]
I can't find references for it
 
4:52 PM
[Captain Obvious] Do note that some diff tools don't highlight trailing space changes...
 
Anyone ever use Photoshop.Application - trying to make a AliasArray object for this batch
Can't really find anything in my google foo
 
5:20 PM
Jascha Drel on September 22, 2021
A new way to discover and share knowledge about version control, CI/CD, DevSecOps, and all-remote workflows
 

« first day (3994 days earlier)      last day (937 days later) »