James Arnold

1

votes
0

answer
142

views

MySQL Weird Date Error (Incorrect datetime value)

I can't really explain what's happening here. Here are three MySQL queries wherein they only differ in the YEAR. One is not working! Query 1: (OK) update `users` set `updated_at` = '2018-03-10 02:14:26' where `id` = 7 Query 2: (OK) update `users` set `updated_at` = '2020-03-10 02:14:26' where `id` =...
James Arnold
0

votes
0

answer
3

views

Laravel Cashier Invoice Date Issue

I am using Laravel 5.8 with Laravel Cashier. When I try to show a list of invoices of a user, I used this code: @foreach (Auth::user()->invoices() as $invoice) {{ $invoice->date()->toFormattedDateString() }} {{ $invoice->total() }} Download @endforeach However, the line $invoice->date()->toFormatted...
James Arnold
1

votes
1

answer
314

views

Disadvantages of Caching User Permissions

I'm writing an authentication package for an application in FuelPHP. The permissions will be fairly fine grained and several permissions will need to be determined for each page load. Are there any issues that would occur if I were to cache my groups_permissions table on the server, and query that...
James Arnold
1

votes
3

answer
2.6k

views

Node.js passport-saml redirects to localhost:3000/login/callback all the time

I am using the tutorial from www.npmjs.org/package/passport-saml for the SAML. I am a beginner in SAML. The tutorial says The SAML identity provider will redirect you to the URL provided by the path configuration I already have a OpenIdp account. It seems I can successfully login but the redirect U...
James Arnold
6

votes
1

answer
13k

views

Android OpenCV getPerspectiveTransform and warpPerspective

I am a bit confused with the parameters of getPerspectiveTransform as I cannot see a proper image. Here is my code. The original_image variable is the image that contains a square object (and some others) that I want to crop and create a new image (something like this Android OpenCV Find Largest Squ...
James Arnold
2

votes
0

answer
37

views

Parallax with Many Assets and Large One

I am trying to create a landing page that has a parallax effect. The problem is that when scrolling, the assets seem to move at less than 15 fps. In this performance, the parallax effect is not noticeable. The object inside the element bg_container is more than 10000px in height. What is wrong with...
James Arnold
3

votes
2

answer
6.8k

views

OpenCV Android Create New Image Using the Edges of the Largest Contour

I am able to detect the largest square/rectangle (in green) in an image. However, I want to convert the largest square/rectangle detected in the image into a new image (to be stored in a new Mat). Here's the return image of this function that has the largest rectangle/square on it: http://img153.ima...
James Arnold
25

votes
3

answer
12.2k

views

Entity-Attribute-Value Table Design

I am currently designing a database structure for the products section of an ecommerce platform. It needs to be designed in such a way that makes it possible to sell an infinite number of different types of products with an infinite number of different attributes. E.g. The attributes of a laptop...
James Arnold
10

votes
3

answer
20.7k

views

Android OpenCV Find Largest Square or Rectangle

This might have been answered but I desperately need an answer for this. I want to find the largest square or rectangle in an image using OpenCV in Android. All of the solutions that I found are C++ and I tried converting it but it doesn't work and I do not know where I'm wrong. private Mat findLarg...
James Arnold
7

votes
2

answer
236

views

Unable to explode on 'þ' when using file_get_contents()

I need to get the contents of a remote file, and then explode those contents on the symbol: 'þ'. I can make it work if the string I am exploding is just a local variable, but I can't get it to work with file_get_contents(); $string = '1þClassic Los 1/10þþ15þ1þTrueþ2þCú'; $parts = explode('...
James Arnold
0

votes
1

answer
15

views

Firebase Authentication Rules Using the Data Inside

How can I authenticate that only users with the data contents can write/remove the node? My data structure looks like this: project-xxxxxxxx Messages Chat-Record-001 User1: 'B3xUEsPRZ1XhIAhDQo1DEyLZlSX2' User2: 'PR70j0ou4JdDWf8S5X9h9BUevpo1' Message: 'This is a test message!' Chat-Record-002 User1:...
James Arnold