Posts by Alexandre Thebaldi • 463 points
16 posts
-
1
votes1
answer90
viewsQ: How to register each new relationship between two entities
Considering a scenario where a member has a account, personal profile, academic profile and may vary between status (between pre-defined status: teacher, student and collaborator) within the system.…
-
1
votes1
answer45
viewsQ: How to maintain orderly list of records in relationship N:N
Considering a scenario where a author can hold several publications and a publishing may have several authors, we have an intermediate table to maintain relationships. However, the order of authors…
-
1
votes1
answer120
viewsA: Understand context given statement
datasetCSR is a variable that when declared executes and receives the return value of the method execECM. Considering the definition of the object as: var obj = { execECM: function ( callback ) { //…
javascriptanswered Alexandre Thebaldi 463 -
2
votes1
answer609
viewsA: Relationship N:N in Laravel does not record object attributes
Laravel Eloquent provides basically two ways to work with relationship several to several (N:N). The first is attach and separate manually. For this use attach and detach. The second is to build…
-
0
votes2
answers355
viewsA: Split Divs into group with jquery
Considering: <a href="#dividir">Click para dividir</a> Using pure javascript: var blocos = document.querySelectorAll('.bloco'), blocosLength = blocos.length, trigger =…
-
3
votes2
answers168
viewsA: Take all src contained in the document and transform into array in jquery
Considering: <img src="image1" /> <img src="image2" /> <img src="image3" /> Using pure javascript: var srcs = [], images = document.querySelectorAll('img'), imagesLength =…
jqueryanswered Alexandre Thebaldi 463 -
0
votes1
answer81
viewsA: video in Html5 with fixed height and malleable width
Your question is not very clear. If you want a child element to inherit the width and height of its parent element (.container), take my example: http://codepen.io/ahlechandre/pen/PqvJJQ…
-
4
votes2
answers944
viewsA: Every class must have a builder
Every class must have a builder? No. In PHP, classes can be declared without the definition of a constructor. However: "Classes that have a constructor method call this method each time a new object…
phpanswered Alexandre Thebaldi 463 -
2
votes1
answer6661
viewsQ: Generate token from string and check generated token
Basically, I need something that works similar to $hash = Hash::make('string') and Hash::check('string', $hash) but that does not produce as big a result as (60 characters). or $hash =…
-
2
votes1
answer173
viewsQ: Techniques to maintain data consistency in the front end
Example: In a form, some fields (input) are loaded via ajax from a select. To option selected will be used in the back-end for validation of those fields. However, the user can load a certain…
-
2
votes2
answers497
viewsQ: How to manipulate Event Listeners order of a DOM element
I have a link: <a href="foo" class="foo">go to foo</a> First Event Handler (main.js) document.querySelector('.foo').addEventListener('click', function( event ) { console.log(1); }); In…
-
1
votes1
answer548
viewsQ: Select only the first children of a parent element
I have the following appointment: <div class="step-content"> <div id="step-1"> <h1>step 1</h1> <h1>step 1</h1> </div> <div id="step-2"> <h1>step…
-
1
votes1
answer765
viewsQ: How to implement a guest user confirmation system by email
In the system, the user registration will not be free. Each user will be invited by email by administrator to participate. In the user table I have, briefly, the following attributes:…
phpasked Alexandre Thebaldi 463 -
0
votes3
answers56
viewsA: Access to arrays of other HTML functions
It is not good practice to use global variables by n reasons. Perhaps the best way for this case would be to work with a literal object. See: var obj = { arr: [], suffle: function ( someArray ) {…
-
0
votes1
answer56
viewsQ: Convention for attributes that preserve types
A table stores data from teachers. Each teacher has a degree: specialist, master, doctor, post-doctor and others. Another table present in the base is the publications. Each publication may (or may…
-
8
votes3
answers241
viewsQ: Best way to keep data that depends on a condition
Hypothetically I have a table publicação that has, by default, attributes autores (derives from a relationship table),titulo, edição, editora and ano. However, depending on the type of publication…