Page 26 of 26 FirstFirst ... 16242526
Results 251 to 254 of 254

Thread: Programmer's Den

  1. #251
    Senior Member
    Join Date
    Dec 2013
    Quote Originally Posted by Hephaestus View Post
    [...] remembering the previous size and location is part of the feature set. There has to be a file somewhere with that information, and if I can find it I can probably alter it with a command-line script.
    C:\Users\[your_username]\AppData\Local\Google\Chrome\User Data\Default\Preferences

    There is an object like this:

    "window_placement": {
    "bottom": 1042,
    "left": 372,
    "maximized": true,
    "right": 936,
    "top": 170,
    "work_area_bottom": 1050,
    "work_area_left": 0,
    "work_area_right": 1920,
    "work_area_top": 0


    You could also launch chrome from the command line.

  2. #252
    Meae Musae Servus Hephaestus's Avatar
    Join Date
    Dec 2013
    Ceti Alpha V
    Quote Originally Posted by scarydoor View Post

    You could also launch chrome from the command line.
    Problem is, my father is anti-Chrome. Firefox command line arguments don't include that--unless it's somewhere in profiles, in which case I can build a movie profile and make shortcut to force that profile.

    But thanks for the waysign, that will save me some searching. If I get it working alright with Chrome he'd probably accept that for the convenience until I figure something out with Firefox.

    It's a little sad how much easier Chrome is to develop for even in little shit like this--the differences in behaviors are... stranged.

    For example, in my call, the margin from the top in Chrome would place the window too low. 145 is the sweet spot that puts the bottom bezel on the top of the taskbar. In Firefox the same setting has the window a good distance above the taskbar. That 170 value gets the bottom bezel as close to the top of the taskbar as Firefox will permit--via that setting. You could put in "top=10000000000" and it would end up in the same place--a smidge higher than desired.

    Then there's the issue of Firefox refusing window.close(), but Chrome takes it no problem. The code looks like it opens only one window for Chrome on my machine.
    Some days you're the bug; some days you're the feature.

    --Meditations on Uncertainty Vol ξ(x)

  3. #253
    Senior Member
    Join Date
    Dec 2013
    I got one of those "oh no your computer's been hacked!" pages just then. Uhh. I rebooted the thing. Tried to investigate whatever this page was.

    Here's the original entry point:

    Spoiler: don't click this

    I'm fairly sure there's nothing actually in this. But I take no responsibility.

    At least turn off javascript, or you will be agitated.
    Spoiler: turn off javascript at least

    This loads a basic page with some javascript that then redirects for some reason.

    freepcsuppoprt -callnow -error25f05d . azurewebsites . net

    redirects to a /chx path for chrome, for some reason... where you can see the proper page that's going to piss you off if you haven't got js turned off.

    I think it's a completely nothing page. I can't find anything in there. It's just annoying. There's some really shitty coding too. But some funny things

    you bastards:
    for (let i = 0; i < 1 / 0; i++) document.location.href = "#", window.history.back(), window.history.forward();
    wtf is ~~ in javascript?
    var x = (9999 * Math.random())
    x -> 9147.696313164619
    ~x ->-9148
    ~~x -> 9147

    This little style, which conveniently makes the cursor a giant transparent image with the cursor in the wrong spot:
    Looks like a php programmer. Or I've just been softened by front end frameworks too much to cringe at this:
    <div style="float:left; height:250px; width:520px; padding-left:20px; padding-top:25px; color:#FFF; "> Please call us immediately at:<br/>
    document.write("<span style="font-size:25px;font-weight:bold;"> " + phone + " (Toll Free)<\/span>");
    <audio autoplay="autoplay" loop="" id="audio">
    <source src="./sound/err.mp3" type="audio/mpeg">
    Why are they collecting google analytics on this?
    <script async src=""></script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'UA-108861314-1');

  4. #254
    Perfect is Shit LowIQLogan's Avatar
    Join Date
    Dec 2013
    Quote Originally Posted by scarydoor View Post
    wtf is ~~ in javascript?
    ~ is a bitwise operator, it reverses the bits on the number. Since javascript uses 32-bit signed numbers using ~ will always change the number from + to - or visa versa but since the first positive number is 0 and the first negative number is -1 the results are 1 digit off the intuitive result in this respect.

    I don't understand exactly why decimals are dropped as the encoding for fractions of a number in javascript is imperfect and cause famous problems like

    > 0.1 + 0.2
    "A new immortal appeared in front of you. Would you like preparations of inception?"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts