Posts by J. Bruni • 8,142 points
79 posts
-
1
votes1
answer135
viewsA: Package for validations per service
Implementing validation as a service: I don’t know a package, I suspect it doesn’t exist yet. But there are a couple of articles that contain exactly what you want:…
-
10
votes1
answer9290
viewsA: How do I remove a staging area file in git?
As mentioned in the message of git status (use "git reset HEAD <file>..." to unstage), the command is: git reset HEAD <file>... If you want to remove a file: git reset HEAD…
-
0
votes2
answers1118
viewsA: How to reuse and share an SSH private key between Mac OS X and Linux?
Copy the private key in Dropbox makes it easy to copy it to any other system where you want to use it. On Linux, create the directory ~/.ssh, if it does not exist, and copy the private key file to…
-
1
votes2
answers848
viewsA: How to adjust the height of sidebar elements?
At first it seems enough to put a rule overflow: hidden in the "father DIV". But this will "cut the surplus", hiding part of the "daughter DIV". Try removing the rule height: 100% of the "DIV…
-
3
votes2
answers1219
viewsA: How to insert Javascript code into the database?
1. Yes, it is possible. Javascript code is text only. Technically, there is no problem storing it in the database. Whether it is recommended or the best solution is another question. 2. Is it safe?…
-
3
votes5
answers10236
viewsA: echo or print, what really is the best option?
The best option is echo because it will save a byte in the file size of your source code, each time it is preferred instead of print (for echo has 4 characters and print has 5 characters). The best…
-
2
votes1
answer156
viewsA: Cakephp via Shell returns error: class Helloshell could not be Loaded
According to the manual on http://book.cakephp.org/2.0/en/console-and-shells.html From your application directory, run: Console/cake hello That is to say, from the directory of your application. So,…
-
2
votes5
answers1668
viewsA: How to use a language other than Javascript in your browser?
Dart Google will make your dart language be interpreted natively by the browser. Actually, it already does! There is a version of Chromium that already runs directly scripts written in Dart - the…
-
8
votes1
answer2375
viewsA: What is Rameter Sniffing?
When a stored Procedure will be run for the first time, SQL Server compiles the procedure and generates a action plan, which is stored in the cache, and is used in subsequent calls Procedure. This…
-
4
votes1
answer3861
viewsA: How to insert HTML content in the div with jQuery without using " (reverse bar and double quotes)
In this case, enclose the variable in single quotes: $('div.related').html('<?$RELATED_ENTRIES$(5)?>'); I’d just have to put \ (reverse slash) before double quotes if the variable was in…
-
4
votes2
answers2590
viewsA: How to force a page to open always horizontally?
You want to disable the mobile device feature that reorients the view according to its position? That is not possible. What you can do is adapt your layout so that it appears "without bugs" in the…
-
78
votes9
answers31327
viewsA: How to hash passwords safely?
phpass - the secret of Wordpress "How to hash passwords securely?" When I had to answer that question in practice, a few years ago, I went to spy on the wordpress code. My thought was: if the whole…
-
1
votes1
answer95
viewsA: Create Observer in the Mage_core_model_app class for the run function
Unable to observe function run class Mage_Core_Model_App through an event. The only event fired in this class was the application_clean_cache. Check out the full list on…
-
1
votes2
answers1449
viewsA: Query in related tables
You see, Henry... I answered another question of yours today... but I’ve only just realized a few things... you’re not defining relationships properly. We have to "go back a little" and think about…
-
1
votes2
answers318
viewsA: Populating database with Eloquent ORM
New Answer: The original answer is kept at the end. It would be correct if the relationship were even hasMany... But what is wrong is precisely the definition of the relationship in the model! The…
-
6
votes1
answer1417
views -
3
votes1
answer1044
viewsA: Return javascript result with controller
Unable to run Javascript from within Laravel Controller. In this specific case the best procedure seems to be to simply include Javascript code window.close() in the callback of your Ajax call. All…
-
3
votes1
answer208
viewsA: jQuery validate - skip_or_fill_minimum rule does not fire if used more than once
The problem you present has been solved in a recent commit. Behold your updated Fiddle. I removed the external dependencies, copied and pasted the code from…
-
254
votes6
answers12507
viewsA: Why shouldn’t we use mysql_* functions?
Summary The answer is only one: we should not use functions of the extension "mysql" because its development has been discontinued; the extension became obsolete, that is to say, code that uses…
-
4
votes3
answers1686
viewsA: How do I fix the background of a <div> in iOS Safari (iPad)?
Actually, your background is fixed. The problem is "viewport"... First, let’s recap why the fixed positioning does not work as expected. Safari Mobile uses a "viewport" to display websites. Imagine…
-
2
votes4
answers7584
viewsA: How to use AJAX with Laravel?
It’s just gonna get into Request::ajax() when the request is made via Ajax! :-) But, attention: this is checked through the HTTP header HTTP_X_REQUESTED_WITH. That one header is automatically sent…
-
30
votes5
answers9611
viewsA: How do Closures work in Javascript?
Closure has to do with scope of a Javascript variable. To avoid polluting the global namespace by protecting the variables in your script from mixing with other variables in other scripts, you can…
-
0
votes4
answers1259
viewsA: Git merge between branches with submodules
Tip: Create a new branch from the "project1" branch, then remove the submodule from that new branch, and then finally merge the new branch into the master branch (and then "project2"). Sort of like…
-
-1
votes3
answers1374
viewsA: Should I use routes or controllers in Laravel 4?
Depends. Copy and lap down the current routes.php of a project under development. <?php /* |-------------------------------------------------------------------------- | Application Routes…
-
10
votes6
answers32253
viewsA: What is the best way to create a PHP login system
Question: What is the best way to make a password login system with PHP? Answer: There is no "the best way". There are several quality solutions, each one being the best within a specific context.…
-
1
votes2
answers205
viewsA: Problem generating content via Jquery
I think the method param jQuery will help you: http://api.jquery.com/jQuery.param/ Try changing the line that calls the load jQuery’s leaving her like this: $('#anos').load('anos.php?' + $.param({…
-
0
votes2
answers233
viewsA: Nusoap using Laravel 4
What is happening is that the browser is automatically "interpreting" the XML and presenting the result transformed into HTML. The key to changing this behavior is to change the HTTP header (header)…
-
4
votes7
answers8794
viewsA: How to Convert Mysql Database?
I am using Mysql Workbench and Laravel 4. For each change in the database, I get five new files in the default directory app/database/migrations of Laravel. Everything starts using the command line:…
-
1
votes2
answers923
viewsA: Ngnix problem on OS X Mavericks
The error message is saying two things: 1st - that the user running Nginx has no access permissions at the error log file: /usr/local/var/log/nginx/error.log 2nd - that the directory of access log…