« first day (3036 days earlier)      last day (1910 days later) » 

1:35 AM
Something to bear in mind, sometimes those integrations are a crutch that allows you to get by without understanding your pipeline. More and more they're just running a command with all kinds of useful switches hidden from view. Learn the command and you may not have to pick up the mouse as much.
 
 
3 hours later…
mr5
4:22 AM
I'm not sure which one comes first
 
 
2 hours later…
6:02 AM
O/
 
7:00 AM
o/
 
O/
 
mr5
7:16 AM
⃝ /
2
 
7:26 AM
Ø
2
 
ohayou
 
8:00 AM
Yo.
 
 
2 hours later…
9:58 AM
I am having a code like below :
public abstract class Duck
    {

        public IQuack iqu;
        public IFly ifl;
    }

interface IQuack
    {
        void quacking();
    }
I am getting this error :
 
mr5
Error: "arf arf arf"?
 
10:14 AM
@Learning-Overthinker-Confused That's some weird style of programming.
 
What error?
 
usually Duck would implement IQuack / IFly
they're verbs, not objects
 
15
Q: Is it bad practice to use public fields?

Jonathan Egerton Possible Duplicate: When are Getters and Setters Justified Why are public and private accessors considered good practice? In my time as developer I learned that properties can be very useful. I use properties to control read and write access or to add something like validation checks...

 
Sorry as of now i am just trying my hands with designing hence given stupid names
Error :
InConsitent accessibility :field type IFly is less accessible than Duck.ifl
@Neil But how come above error
whats the problem
 
IFly might be declared private
I don't know, you didn't show it
 
10:26 AM
 interface IFly
    {
        void flying();
    }
but same error is also in Quack
 
should probably be public interface IFly
 
actually declaring it as public solved the error
but i dont know how
 
.. as the error message is stating. inconsistent accesibility.
 
and whats the reason for error
 
the reason is inconsistent accesibility. if you use Duck somewhere and would allow IFly to be internal, then the users of Duck wouldn't be able to access it (from a different Assembly). The accessibility needs to be equal based on the topmost class (i.e. Duck)
 
10:30 AM
but in above code i have make IFly as public and also Duck is public
then whats the problem?
 
but the interface IFly isn't public
it will get the default accessor internal
with is less accessible than public
 
but all my code is in the same console application
and i am trying to access it in same console app
 
How should the compiler know that?
you told the compiler that "Duck shall be public and be accessible everywhere"
 
Yeah got it sir
Thank you so much
This really clear my doubts :)
 
you can also change the accessor on Duck to internal. If you really only want it to be internal (see the docs link I sent). As long as the accessors are consistent on the public state from Duck you'll be fine
 
10:34 AM
Yeah right sir
can i ask you 1 last question please
 public abstract class BaseType : IBaseType
    {
        internal readonly string ConnectionString = ConfigurationManager.ConnectionStrings["dbConnectionString"].ConnectionString;
Connection string property is field right?
 
yeah
it's not a property
it's a string field.
 
so it should start with capital c or small c?
whats the standard for declaring fields which is not private?
 
it's up to you. You can check out what Microsoft says about naming conventions if you want docs.microsoft.com/en-us/dotnet/standard/design-guidelines/…
fields shouldn't be public. Unless they are const or static readonly I guess.
 
actually i am using it in my derive class as weel
so what should i declare it then?
field or property?
 
field
 
10:42 AM
but field shouldnt be public as said by Default
i want it to be accessible only inside base as well as derived class
 
Are you reassigning a value?
to the field
 
Perhaps you should read up on public modifiers.
 
@Maartenw No
Once it is set it is set
hence i have marked it as readonly
 
public abstract class BaseParent
    {
        protected int Source { get; protected set; }
        protected int Target { get; protected set; }
    }

public class Child : BaseParent
{
    public void foo()
    {
    }
}
I want this Source and target to be set only in Child foo method hence i have marked its set as protected
error :
accessibility modifier of set must be more restrictive
 
10:51 AM
That's a new one to me. I think it's telling you that your modifiers are redundant information
Source and Target are already protected so declaring the setter protected is just repeating yourself
You can just google the error messages by the way
 
Yes got it.I think since it is already marked as protected so setting protected on set accessor doesnt make sense
 
Although what the online docs say isn't actually correct docs.microsoft.com/en-us/dotnet/csharp/misc/cs0273
> This error occurs when you declare a property or indexer with an access modifier that is less restrictive than the access modifier on one of its accessors.
Er, no?
That sentence is wrong
 
If that were true, you wouldn't be able to do public int Prop {get; private set;}
declare a property or indexer with an access modifier (public int Prop) with an access modifier that is less restrictive (public is the least restrictive) than the access modifier on one of its accessors (private set)
The sentence is wrong
 
Hehe
Msdn docs cannot be wrong though :)
 
11:05 AM
I've had them corrected on a couple of occasions as a consequence of feedback
 
 
3 hours later…
1:53 PM
hey I'm losing my mind, what would the URL be for this Get action? (aspnetcore2.2)
[Area("Events")]
[Route("test")]
[ApiController]
public class TestController : ControllerBase
{
    [HttpGet("")]
    IActionResult Get()
    {
        return Ok("cool");
    }
}
 
GET /Areas/Events/test

Assuming all default routing
 
404 ;_;
 
More controllers, one with same route but different area, one with same area butz different route, each more methods with a different httpget route!
 
there needs to be a way to make aspnet show me the entire list of urls that it will recognize based on route attributes I used
I'm just guessing at this point
crap, they don't target v4.7
 
2:24 PM
FML even swashbuckle doesn't list areas
I guess I'm the only moron trying to put api controllers into areas
google is no help
actually I just forgot to make my action public
2
 
lightbulb moment
 
starworthy
I totally didn't notice either
 
guize
help
i accidentally made malware again
 
This should be good.
 
When i click this hyperlink (tel:0123456789) in ie
it opens a shit tonne of new windows telling you that it doesn't work
Its not as bad as the time I took a server down with Word...
 
2:36 PM
What's the actual markup for the hyperlink?
and he was never heard from again
 
he was fired and escorted by security
 
<a href="tel:@mt.PhoneNumber" class="btn btn-primary btnPhone" style="margin-bottom: 5px;">
<i class="fa fa-phone"></i>
</a>
 
Indent by 4
 
And what's actually rendered into the browser?
 
2:46 PM
Sup losers
 
<sup>losers</sup>
 
Not a valid dom tag you pleb
 
@MikeTheLiar the button gets rendered correctly
 
That doesn't answer my question.
 
you want a screenshot?
 
2:53 PM
No, I want the rendered HTML.
 
oh
2 secs
 
I'm guess @mt.PhoneNumber is malformed somehow.
 
<a class="btn btn-primary btnPhone" style="margin-bottom: 5px;" href="tel:01234 567890">
<i class="fa fa-phone"></i>
</a>
 
Can you put a + in front and remove the space? See what that does.
So href="tel:+01234567890"
 
for reference, this happens
sec
I'll try without the space now
Without the space and with the + does the exact same thing
 
2:58 PM
This doesn't happen in other browsers?
 
nope
not in chrome
not in firefox
 
Nothing to be done. Stop supporting IE.
 
I would love to
but not allowed.
 
@CaptainSquirrel Why is there a space in that number?
 
@RoelvanUden british number
 
3:01 PM
I wonder if this is related superuser.com/q/1067233/178307
 
Try a fully qualified number? +{COUNTRYCODE}{BRITISH_NUMBER}
In Netherlands it would +31612345657 for mobile
 
I'm thinking this is IE trying to open the link as URL in a new tab, not being able to load it, and panicking.
That doesn't explain why it opens so many of them, though.
Try adding data-rel="external" to the anchor
 
funnily enough there is a window that has popped up saying that theres no default mail client installed
Which is wierd because i have outlook...
doesn't happen on the win10 vm either using IE 11
 
Yeah but if it's not registered as the default or if IE doesn't recognize it as the default it won't help you.
 
this is true
I'm thinking its an issue with my outlook
 
3:16 PM
Julia Silge on February 07, 2019

For nine years, we at Stack Overflow have fielded a survey, asking people who code about their opinions on a variety of topics, from whether they prefer a dark or light theme in their IDE to how their challenges change with experience. This is a huge project for us each year, with contributions in 2019 from product managers, our UX researcher, designers, community managers, web developers, marketers, and me, Stack Overflow’s data scientist. We learn so much each year from our Developer Survey, both from the results and the process of fielding it; right now, we have a massive Google Doc of thin …

 
Have you tried whatever-the-IE-equivalent-of-incognito is?
 
3:45 PM
Don't think that exists in 11
s/Don't think that/It doesnt/
 
incognito is a good only thing?
 
Cap'n o7
incognito is a useful thing for certain cases
 
4:33 PM
@CaptainSquirrel it's called InPrivate apparently
Open with Ctrl+Shift+P
Chrome Incognito is opened with Ctrl+Shift+N
So it's Ctrl+Shift+P or N
 
5:16 PM
@MikeTheLiar right you are.
 
5:31 PM
posted on February 07, 2019 by ericlippert

Last time on FAIC I described a first attempt of how I’d like to fix System.Random: Make every method static and threadsafe Draw a clear distinction between crypto-strength and pseudo-random methods There were lots of good comments on ways to … Continue reading →

 
Really? No one is going to comment on P or N?
for private browsing
 
5:55 PM
Doesn't work on FF
 
6:06 PM
PN is
 
Ahh now it works
had to disable snagit
 
So, why I'm doing this aside, is this the most straightforward way to do this? pastebin.com/embed_iframe/UUrCzahp
 
Use a language with range literals
 
Why does the loop have to start at 26
 
ch1 = [65..90] -- voila
 
6:11 PM
@KendallFrey char[] ch3 = Enumerable.Range(65, 90).Cast<char>().ToArray();
 
so verbose :P
 
Ruh roh
Invalid cast exception
Damn you, boxing.
 
I guess you want chars directly so... ch1 = ['A'..'Z']
 
And in what language is that valid?
 
Haskell
I'm pretty sure python does stuff like that as well, and there are certainly more
Prelude> [False .. True]
[False,True]
Prelude> [True .. False]
[]
Gotta love it
 
6:16 PM
Prelude?
 
That's the REPL prompt
 
For Haskell?
 
Prelude is the "standard" namespace/import
Prelude> :module Data.List
Prelude Data.List>
Everything before the > is your scope
Much like cmd
 
Hmph. You use Haskell much?
What asshole put shift right below enter?
 
Once in a while
I've never found a project where it's useful on a large scale
 
6:22 PM
Can't remember, are we supposed to put a space between the target cast and the variable name? e.g. (string) obj vs (string)obj
@KendallFrey Why do you think that is?
PS, you'd have to do this: char[] ch3 = Enumerable.Range(65, 26).Select(num => (char)num).ToArray();
 
Mainly because I'm more experienced with OOP and imperative programming
@Sinjai I never put a space
 
Slightly more verbose than ['A'..'Z'] ;)
Any of y'all use ReSharper?
 
7:03 PM
Yep, that's code alright.
        // c == Letter
        if (c.IsLetter())
hissssssss
 
@MikeTheLiar Shit man, what would I do without you.
 
Write dumbass comments, apparently.
 
Letter of Letter is C
 
Why did you write your own IsLetter and IsDigit?
 
@MikeTheLiar The consistency helps me when looking at it alongside the things that aren't that obvious, like else.
 
7:07 PM
Char.IsDigit
 
referencesource.microsoft.com's SSL cert expired today, apparently.
 
IsSpecialCharacter isn't actually called anywhere
 
@MikeTheLiar Quite right.
 
Didn't know those existed, but do I really need all this?
Wow, that bitwise-or with 0x20 is pretty fucking dope though.
 
7:14 PM
That page won't load for me
 
Define won't load?
 
The cert expired 24 minutes ago.
 
So?
8 mins ago, by Sinjai
referencesource.microsoft.com's SSL cert expired today, apparently.
 
First chrome blocked it for "ssl interference" which is a new one for me
Then I was able to jump through the hoops Chrome wanted me to in order to load it over http
Anyway, if you think you're smarter than the people at Microsoft who wrote that code, by all means don't use the built-ins.
And you also think you're willing to defend that decision to everyone who reads your code, ever.
 
The people at MS write code that has a level of safety I don't always need. But I wasn't intentionally avoiding those methods, I just didn't know they existed.
@MikeTheLiar I just had to do an "advanced -> show me anyway" kinda thing.
 
7:19 PM
That's what I got after I manually removed the https.
 
Huh. That's odd.
 
I mean, cars have a level of safety you don't always need, too.
 
But my milliseconds!
 
Are you going to disable your airbags until you get in an accident?
 
What level of stupidity would be required to write wrapper extension methods for char.IsDigit, etc?
 
7:21 PM
And if your performance needs are so high as to worry about things like this, you shouldn't be programming in C#, anyway.
 
@MikeTheLiar I knew that was coming. xD
If you don't write in binary, you're a fake programmer.
 
@Sinjai depends on the situation. If you're programming to an interface, none whatsoever.
 
@MikeTheLiar I'm talking public static bool IsDigit(this char c) => char.IsDigit(c);
 
If you don't have an explicit need to do that, don't.
Oh, I thought of another reason you might have to do that, namespace collisions
If you have two libraries both with a Char.IsDigit method a wrapper would be a sane thing to do
 
Oh, good point.
@MikeTheLiar Though I think the recommended style is to use the char alias, which should always resolve to System.Char.
That c |= (char)0x20 shenanigans to lowercase the character gives me a raging nerder.
 
7:29 PM
I think someChar ^= 32 toggles case IIRC
 
You recall correctly.
If I had to guess, the exclusive part is unnecessary there.
Given that a regular OR does the same job.
 
|= just lowercases
^= will keep toggling
 
Well that's just neat as h*ck.
I mean, I'm not really sure where that would be useful, but it's neat.
 
Don't forget &=~ to upper
 
ya
 
7:36 PM
@KendallFrey Was about to go investigate that.
 
IIRC, NTFS includes a table of upper-lower pairs that it uses for case-insensitive code
In theory, you could change that to make FOO = yee
Doubt it does unicode though
 
Yeah I don't know what it's called and I'm probably forgetting some details
 
    static private Char ToUpperAsciiInvariant(Char c)
    {
        if ('a' <= c && c <= 'z')
        {
            c = (Char)(c & ~0x20);
        }
        return c;
    }
 
@KendallFrey did you pick those letter specifically or just you just want to turn FOOT into yeet?
 
7:40 PM
'Tis what MS uses.
 
@MikeTheLiar mmm, no?
 
!!giphy yeet
 
@MikeTheLiar That didn't make much sense. Maybe you meant: giphy
 
......I'm not familiar with this type of thing I'm seeing.
 
a gif?
 
7:45 PM
c &= unchecked((char)~0x20); ain't pretty
 
Kendall's got some sort of favorite bitwise magic that I forget
 
Another possibility is | followed by ^
 
All this bitwise talk reminds me of this JavaScript nonsense: ~'foo'.indexOf('oo') // true
 
That's hardly the worst of JavaScript, that at least makes sense.
 
Only makes sense if you're aware of truthiness and two's compliment, eh?
 
7:56 PM
And suddenly he became Canadian.
 
@MikeTheLiar Everyone say it with me: Truthiness is stupid
 
@Sinjai Er what? The result is -2, not true
 
-2 is truthy.
 
(!!1).toString().replace('e', '')thiness is stupid.
 
8:00 PM
but not true
 
I know, I shouldn't have written it like that.
!!~'foo'.indexOf('oo') // ?
 
@Sinjai That didn't make much sense. Use the !!/help command to learn more.
 
lol
 
See, JS even confuses poor Caprica!
 
!!>!!~'foo'.indexOf('oo') // ?
 
8:01 PM
@MikeTheLiar true
 
!!> Array(16).join( 'wat' - 1) + ' Batman!';
 
@MikeTheLiar "NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN Batman!"
 
Hey, I've seen that trick before.
 
pop quiz: What should you pass to (a, b, c) => a == b && a == c && b != c to make it return true?
 
I'm out
 
8:03 PM
!!> [10, 10, 10, 10, 10, 10, 10, 10].map(parseInt)
 
@MikeTheLiar [10,"NaN",2,3,4,5,6,7]
 
Makes sense.
 
@KendallFrey 0, [], ' '
 
hm, that does work
 
Where you thinking 0, "0" and \0?
 
8:07 PM
My usual is 0, "", "0"
 
Or something along those lines
 
@KendallFrey f(new function(){ var a = 1; this.toString = function(){ return a++; }; },1,2);
 
Fuck JavaScript so hard
 
ECMAScript*
 
8:07 PM
@TravisJ You sneaky fuck
 
;)
 
 
1 hour later…
9:33 PM
AllowedPropertiesAreUnknownPlaceholderSingleton
I love my life
 
wtf
 
`InternalFrameInternalFrameTitlePaneInternalFrameTitlePane
MaximizeButtonWindowNotFocusedState`
 
9:55 PM
In ASP.NET MVC 6, I have a viewmodel that has an IEnumerable of another viewmodel. Call it IndexViewModel and IndexItemViewModel. Is there a way to use @Html.DisplayNameFor on IndexItem? I can accomplish that with Html.DisplayNameFor(model => model.Items.FirstOrDefault().Property), but that doesn't seem right.
@MikeTheLiar I still contend that HttpApplicationFactory.ReflectOnMethodInfoIfItLooksLikeEventHandler is a great method name.
 

« first day (3036 days earlier)      last day (1910 days later) »