« first day (3266 days earlier)      last day (1692 days later) » 

user47589
6:02 PM
@UlisesOntiveros we can't help without seeing your code.
 
Jay
6:21 PM
I know this isn't the CSS room, but the CSS room is abandoned so
what does an * in front of a CSS property mean? I just came across *vertical-align: middle; and I'm not sure what that does
 
this seems to be what you're looking for stackoverflow.com/questions/1204275/…
 
Jay
no, not an * on the selector
on one of the properties
 
well then I don't know :(
 
Jay
textarea {
    *vertical-align: middle;
}
 
setting a razor class variable inside of a .js file. Whats the best way to do this? Currently Im passing it to a <script> tag with var json = @Html.Raw(@Model.JSON)
 
6:36 PM
Is there a better way to do this?
if (
    integer == 60 ||
    integer == 120 ||
    integer == 180 ||
    integer == 240 ||
    integer == 300 ||
    integer == 360 ||
    integer == 420 ||
    integer == 480 ||
    integer == 540 ||
    integer == 600)
{
I guess I could use a modular and see if division from 60 is < 1?
 
if <= 600 and multiple of 60?
 
Beat me to it. Thats exactly what I was thinking
 
I came up with this
if (integer % 60 == 0)
 
6000000 ?
 
Good idea about the 600 and multiple!
Yeah should probably handle bad case there.
&& integer / 60 < 1440 maybe?
 
6:39 PM
depends what you want..
 
public static string GetFormattedTimeFromSeconds(this int integer)
{
    if (integer < 60)
    {
        return $"{integer} seconds";
    }

    if (integer % 60 == 0 && integer / 60 < 60)
    {
        var minutes = integer / 60;
        return $"{minutes} minute" + (minutes != 1 ? "s" : "");
    }

    if (integer / 60 > 60)
    {
        var hours = integer / 60 / 60;
        return $"{hours} hour" + (hours != 1 ? "s" : "");
    }

    else
    {
        var minutes = integer / 60;
        var secondsAfterMinutes = integer - minutes * 60;
Seems like overkill, but I don't want an overblown package for it.
 
close..
ish.
 
Hours and minutes?
I was too lazy to do that part.
 
and seconds
 
if (integer < 60)
{
    return $"{integer} seconds";
}
 
6:45 PM
you did it correctly (?) below that point
 
user10864482
good afternoon
 
hello @humanpony
 
posted on September 25, 2019

Thank you to everyone who came to events on my book tour! If you weren't able to make it to any of my tour events, How To is now available everywhere, including at Barnes and Noble, Target, Amazon, local independents, and more. Some Barnes and Noble locations and indies have special signed copies, so you can check with your bookseller to see if those are available.

 
user47589
@Jay is that SASS or CSS?
 
Jay
7:02 PM
@Amy it's CSS
 
pffff ok now these comics are making sense to me
 
user47589
In css it makes the property invalid
 
user47589
Causing that property to be ignored
 
user47589
However, in some very old browsers, coughIEcough, it'll cause the property to only apply jn that browser
 
Jay
Interesting, I wonder if it was intentional then. Maybe some kind of leftover from the IE days. The CSS file in question is part of a (probably older) theme we still use for our intranet pages here
Not sure when the theme was created honestly, I'm still the new guy
 
user47589
7:14 PM
Some old browsers had a bug in their css parser, letting people use the asterisk like that.
 
Jay
@Amy you know a lot of stuff, thanks Amy!
 
8:02 PM
Hi, I have a question on fixing my IIS stuff
I'm trying to run .NET framewokr 4.6 project
service
and I wanted to connect my frontend from my mac to the service on my windows machine
so I followed this:
How can I confirm the service is running?
 
Jay
on Windows you can press Ctrl+Shift+Esc to open Task Manager, then click the Services tab to see the list of services
not sure exactly which part of that would end up being the name of the service
or you can type netstat on a command prompt to see all of your connections and you could look for anything on the port you used
 
8:17 PM
I copied this from Java code :
for (int lo = 0, hi = nums.Length - 1; lo < hi;)
 {}
and it's totally compiled. thought for has only one way to use it!
 
Welcome to for loop land, babey
 
Jay
don't you also have to declare hi?
 
they are
 
@Grace Is that like "Welcome to Stackoverflow"?
 
int a = 0, b = 1 is a valid way to declare a and b
 
Jay
8:21 PM
oh okay
 
@Jay no
 
It's more like "looks like there's been a C programmer sneaking through your code base", but yeah
Nothing wrong with it, it's just that you don't see many fancy for loops any more.
my favorite weird loop is still

while (*dest++ = *src++) {} to copy a C string
 
Jay
you have a favorite weird loop, I'm definitely in the right place ^_^
 
I'd probably prefer Duff's Device if I was smarter, but here we are.
 
Jay
idk what that is, I can't really say if I'd prefer it or not
I now (sort of) know what a Duff's Device is
 
user10864482
8:56 PM
Using VS 2017 Enterprise how can I see all references to a method override and not the reference for the base class?
 

« first day (3266 days earlier)      last day (1692 days later) »