Posts by taiar • 278 points
8 posts
-
0
votes4
answers261
viewsA: Sequencia Fibonacci
def fib(n) return 1 if n < 2 return fib(n - 1) + fib(n - 2) end I don’t think I can be more concise. What’s more, you can find several other implementations here:…
-
1
votes3
answers149
viewsA: How to open a message screen in all the views the user logs in? + Laravel
Since the action will only be triggered when you enter the screen, there is no need for the request to be made through ajax. You can return a parameter in your controller indicating that it has been…
-
2
votes2
answers268
viewsA: Database does not save data in php, although no error returns
There is probably an error with your SQL that is not natively reported by PHP. To see the error generated in Mysql use the php function mysqli_error http://php.net/manual/en/mysqli.error.php Put a…
-
3
votes2
answers988
viewsA: Declare public variables in the __Construct method
Answer to the question You are so right! If you want the variables to be really public, when using them within the class they are implicitly declared (public). This example works without errors or…
-
1
votes1
answer27
viewsA: Error returning data from JS array
I think you should do the assignment like this: oi[i] = res[i];
-
3
votes1
answer1453
views -
1
votes1
answer235
viewsA: Data persistence using Event sourcing
The type of database you use to implement Event Sourcing is indifferent. I believe that this is the fact of the doubt on this subject: it is not about applying different tools to solve new problems…
-
1
votes4
answers2583
viewsA: Can PHP’s unset() function improve performance?
Hello, your amount of free memory will have no effect on the performance of your PHP programs. You will only have more space to allocate memory by creating more variables. Even in a situation where…