Quantcast
Channel: User Jacob - Stack Overflow
Browsing index pages (56 articles)
↧

Comment by Jacob on cakephp 2 multiple OR conditions while retrieving data

I downvoted because I misread the answer, but now I can't undo the downvote :( This answer does actually work.

View Article


Comment by Jacob on Why doesn't this PHP function update array values?

@redanimalwar I agree, but don't forget that anytime you pass an object you're passing by reference.

View Article


Comment by Jacob on What is the correct way to write PHPDocs for constants?

It's useful to declare the type of array elements

View Article

Comment by Jacob on How do I truncate a decimal in PHP?

Is this any different than casting using (int) or intval()? If not, I'd avoid it as it's not immediately clear what it's doing.

View Article

Comment by Jacob on read-only properties in PHP?

is_array($v) will never be true since $v is always a string (the name of the property attempted to be accessed)

View Article


Comment by Jacob on Unit Tests vs. Acceptance Tests

@RubinSimons that term is wildly misused here

View Article

Comment by Jacob on Why php function doesn't update array values

@redanimalwar I agree, but don't forget that anytime you pass an object you're passing by reference.

View Article

Comment by Jacob on NULL-safe property access & conditional assignment in...

@Mulan I'm stuck with legacy code that has deeply nested properties, so this would be very useful. I'd love to refactor it to not suck so much, but sadly, can't.

View Article


Comment by Jacob on Make PhpStorm stop automatically closing tabs

What an absolutely useless "feature". They make some bizarre design decisions about their IDEs, which wouldn't be too bad if they gave us the option to disable them.

View Article


Comment by Jacob on Should I ever use continue inside a switch statement?

@Thomas continue <number> should be used sparingly. It starts getting really confusing when using nested loops and continues.

View Article

Comment by Jacob on what is the meaning of recursive in cakephp?

This is now the first result in Google

View Article

Answer by Jacob for How set width and height attributes for element within...

Allowing width and height attributes on <source> elements is now in the spec and browsers are beginning to adopt it.GitHub Issue

View Article

Image may be NSFW.
Clik here to view.

Failed to set up deployment source for web app, using Visual Studio Team...

I have already set up a deployment from master branch of Git repository mywebapp in Visual Studio Team Services to a web app in Azure. I did this through Azure Portal's "Deployment source" setting for...

View Article


Answer by Jacob for Why would $_FILES be empty when uploading files to PHP?

If you're using AJAX instead of a Form submission, then ensure the request header Content-Type is set to multipart/form-data; boundary=myAwesomeBoundary' where myAwesomeBoundary is the unique string...

View Article

Why does PHP strict typing allow function arguments of wrong type?

I'm using PHP 7.4.16. I enabled strict_types in my PHP file thinking it would prevent passing a string argument to a function expecting an int by throwing a TypeError. However, the function actually...

View Article


Answer by Jacob for Convert JSON array in MySQL to rows

If you can't use the JSON_TABLE function, but can use recursive CTE's, you can do the following:SET @j = '[1, 2, 3]';WITH RECURSIVE x AS ( /* Anchor, start at -1 in case empty array */ SELECT -1 AS n...

View Article

Answer by Jacob for HTML anchor in URL is not working in Chrome

You have two elements with the same id="corporate-innovation". The browser is going to the first of those elements. id's must be unique to one element. Check the spec.

View Article


Answer by Jacob for thumbnail images aren't aligned right

You're hiding some thumbnails using <div class="hidden"></div>. Some of those div's children have the item-thumbs class which your main.js script is taking into account when setting up...

View Article

Answer by Jacob for create a table with thead wider than the table itself

You can use the caption element, which spans the table's width and is more semantically correct in your situation since it describes the entire table. Then use a pseudo-element to fill the remaining...

View Article

Answer by Jacob for Image causing table cell height to extend

Remove height from .outer-icon. I don't know that it's ever a good idea to apply height to a table cell. Set vertical-align: middle; on .search-bar and .outer-icon.

View Article
Browsing index pages (56 articles)


Latest Images