Posts by J. Bruni • 8,142 points
79 posts
-
1
votes1
answer191
viewsA: How to pass a dynamic argument to a method in Vue.js?
Just do it like this: v-on:click="my_method(value)" You do not need to use interpolation within dynamic HTML attributes. In Vuejs 2 any interpolation attempt on attributes generates an error…
-
3
votes1
answer1037
viewsA: Run next audio in javascript
See, I cleaned up your code, and now it works smoothly: http://codepen.io/anon/pen/EAqeF The main problem was the unnecessary redefinition of the Audioplayer variable (var audioPlayer = ...) in…
-
7
votes3
answers2192
viewsA: How to work with multi tenancy architecture?
I recently worked on a "multi-tenant" project. I did not participate in the decision of the architecture; I only did maintenance and development with the project in advanced stage. There was a…
-
1
votes1
answer1298
viewsA: Get the selected row object with ng-grid Angular-UI
I checked the ng-grid documentation. As in the "Master/Details" example, you can do so: var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function($scope) { $scope.mySelections…
-
54
votes2
answers6578
viewsQ: Business Rules in the Database - what are the advantages and disadvantages?
Maybe I join a team to develop a new project. The leader has already made some decisions. Among them, that "business rules will be in the database". In "procedures" and "views", "triggers", etc..…
-
20
votes4
answers120536
viewsA: Regular expression to validate a field that accepts CPF or CNPJ
Regular expression to validate a field that accepts CPF or CNPJ (no calculation of the check digits):…
-
20
votes2
answers3841
viewsA: Best practices for sending emails and avoiding spam
Email content is just an ingredient among "best practices for sending emails". There are many other factors that influence the classification as spam or not. Reputation of the IP address First of…
-
2
votes1
answer681
viewsA: Angularjs ng-repeat is not taking values
I don’t understand why you are turning the object into a JSON string. I don’t think it is appropriate. Suggestion 1: $scope.movies = results.data.results; And use your original HTML: <ion-item…
-
29
votes9
answers37388
viewsA: What should I use in CSS, id, or class?
If you use Ids, the CSS Lint will accuse your CSS of breaking the rule "Disallow Ids in selectors" (Prohibit ID’s on selectors). No wonder the slogan of CSS Lint is "Will Hurt your Feelings" ("It…
-
49
votes4
answers120536
viewsQ: Regular expression to validate a field that accepts CPF or CNPJ
I have a <input> on the form that must accept CPF or CNPJ. I will use in the back-end in PHP the value to save or in the field "Cpf" or in the field "cnpj" of a table in the database. I’m…
-
3
votes5
answers6123
viewsA: Physical Exclusion vs Logical Exclusion
Avoid logical deletion so as not to get useless and irrelevant data in your database. Use logical deletion only when necessary! It is a common and safe practice, as the application code takes care…
-
1
votes1
answer284
viewsA: CSS and JS in production of Nodejs + Expressjs + Socket.IO
The request is being made to the wrong address. At the beginning of index.js has var endereco = "http://192.168.1.100:3000/"; But the IP of grupicrm.com.br is 198.1.103.47 - change to: var endereco…
-
1
votes1
answer364
viewsA: Syntax error when doing two updates in a single command
For security reasons, for a long time it was not possible to run more than one SQL command at a time, using Mysql from PHP. Newer versions of PDO accept multiple commands. To execute multiple…
-
7
votes4
answers3455
viewsA: Is it possible to communicate Client-Server in real time via HTTP?
My only real-time experience was with the tutorials of Meteor, and I recommend you take a look - it’s pretty impressive. In minutes you assemble a basic application with HTTP clients (browsers)…
-
4
votes1
answer336
viewsQ: Width of element with position: Absolute (box-Sizing: border-box)
Important: I’m using Twitter Bootstrap, so everything is with box-sizing: border-box. The difficulty is this: I have an element with absolute positioning. I want its width to be equal to that of the…
-
3
votes2
answers326
viewsA: Use of uncharted entities in Symfony2
Answer There is no contraindication. You can do as you think by getting the benefits of the validation component. Reflections An "Entity" is actually a common object. Through metadata (by…
-
1
votes5
answers491
viewsA: Product search by name and brand
The biggest difficulty is prepare the "LIKE" clause appropriately, since the user can type "%" or other characters with special meaning in your search. function like($string, $e) { return…
-
2
votes1
answer1089
viewsA: Create 1:1 relation in Query Browser
In the image below you can see an example of relation 1:1 in the Query Browser: Remember that the engine table must support relationships. (Meaning: needs to be Innodb instead of Myisam.) In this…
-
6
votes6
answers90846
viewsA: Do I use PHP inside an HTML or an HTML inside a PHP?
When you ask: if I modify all my documents to . php or use php within html Actually they are not mutually exclusive options: to "use PHP within HTML" you accurate modify the document to ". php"! :-)…
-
4
votes5
answers1446
viewsA: Is it possible to include elements in the DOM after it is loaded and ready?
In that case I could (should) redirect the user to the screen previous. I strongly disagree that I should redirect the user to the previous screen if it means what I understand - go back in the…
-
1
votes2
answers211
viewsA: Doubt about inheritance in classes
You can use a variável! $booleano = RelatorioVenda::validate($form); if($booleano){ print 'Nenhum erro.'; } return $booleano; Don’t forget to use return functions to return some result... ... but…
-
1
votes3
answers1028
viewsA: How do I populate a $Scope (angular) with get. Json (jquery)?
The most recommended is to do as Gustavo said... using Angularjs' own functions. But in the case of your code, the simplest solution is to place the function in a place where it has access to…
-
7
votes2
answers7182
viewsA: How to send an Array via POST to a PHP controller
The problem is in Javascript here: var item = new Array(); item["id"] = 1; item["descricao"] = "teste"; You defined a array but is using as if it were an object/hash. Do so: var item = {};…
-
1
votes2
answers336
viewsA: Why does the script not only accept the letter F?
The problem is in the rules (Rules)... substitute nota: "required nota" for nota: true rules:{ nota:{ nota: true, required: true } },…
-
1
votes4
answers47574
viewsA: Capture screen size at time of request
You ask about Javascript, then the way is to send the data via Ajax and make a redirect. Then when you reload the page, you will already have the data saved in Session there on the server (sent by…
javascriptanswered J. Bruni 8,142 -
1
votes3
answers1814
viewsA: Installation of Laravel
Yes, it is possible. At the moment, I am developing an application with Laravel 4, and the client has provided me access to shared hosting on "Hostgator". I had to enable the correct version of PHP…
-
13
votes4
answers35368
viewsA: Explanation about concatenation of variables in PHP
The concatenation operator of strings is the point . For example: $ddd = '34'; $fone = '32105691'; echo '(' . $ddd . ') ' . $fone; This example works the same with double quotes: echo "(" . $ddd .…
-
10
votes1
answer541
viewsQ: How to install the dependencies of a Durandal project using Mimosa?
Let me explain the question. I would know the answer if the question were: "Como instalar as dependências de um projeto Laravel usando Composer?" In the world of PHP, using Composer, we can create a…
-
3
votes2
answers241
viewsA: How to specify a CSS class for text that breaks line in an HTML element?
Suggestion: Decrease the line-heightof the text, leaving in the measure of your last image, where the text with line break appears beautiful. Wrap this text in a div or other element, and apply…
-
2
votes3
answers157
viewsA: Why does this violate Strict Standards?
I think the answer to this question is very simple. That code violates the standard because the standard is Strict (restricted), and in its strict definition of compatible (compatible), the…
-
2
votes1
answer1381
viewsA: Does anyone know how to connect the oracle to codeigniter?
After a quick search, everything indicates that the answer can only be that, contrary to what was stated in the question, the module is not enabled. It remains to know how to do to effectively…
-
8
votes3
answers2241
viewsA: How to control tuition and access to the application?
Payment control via boleto Generate the billing slip Record billing data in database (subscriber, maturity, value, etc.) Get the bank’s return file (every business day) Process the return file (here…
-
1
votes2
answers330
viewsA: Class not found, but in another project worked
Suggestion: Completely remove the folder vendor/jenssegers On the command line (cmd), go to the project folder (laravel-master) Execute the command composer selfupdate to update your commiserate…
-
2
votes4
answers1358
viewsA: Conceptual database and file backup strategy
Conceptual database and file backup strategy I think there are different strategies that are better for different cases. It depends a lot on the context. I’ll enjoy learning other strategies here.…
-
2
votes2
answers2867
viewsA: Assign selected item in a <select>
Maybe it works by putting the code to run inside a callback (Event Handler): $("select#cidade").one("atualizado", function(){ var cidade = response.cidade; $("select#cidade option").each(function()…
-
0
votes2
answers1137
viewsA: Configuring Virtual Hosts in Apache
It is necessary restart Apache after changing the settings, so that they take effect.
-
1
votes2
answers758
viewsA: Angularjs + Sharepoint + Rest API
If you are entering the error condition, this means there has been some problem with the HTTP request made via Ajax. In the code shown, the variable _spPageContextInfo is not defined, but is used:…
-
1
votes7
answers30383
viewsA: How to dump a Mysql database with PHP?
mysqldump It’s not that simple. It’s better to use the mysqldump from PHP with shell_exec or system, or simply schedule a cronjob, as suggested. I particularly use cronjob from a remote system,…
-
5
votes1
answer350
viewsA: How to use Salts and hashs with PHP?
Past tense I recommend that you use the solution Wordpress and the Drupal use. I think if they use, then it should be safe enough. You don’t think? It’s called Portable PHP password hashing…
-
2
votes4
answers482
viewsA: Disabled button modified using firebug
Yes, you always have to do the treatment on the server. In fact, it’s not even necessary browser (browser) to make potentially hostile HTTP requests to your server. A malicious programmer (hacker)…
-
2
votes2
answers1556
viewsA: How to add a file extension to the list of extensions supported by Adobe Brackets?
Open the file: Brackets\www\editor\EditorUtils.js Add the corresponding extension within the switch (ext) For example: switch (ext) { ... case "eco": return "htmlmixed"; ... Source:…
-
0
votes3
answers485
viewsA: How to select separate records on multiple pages of a PHP pagination?
At first, all that is needed is a variable boolean. Example: // no client-side (javascript) var todos_registros = false; // valor inicial // no server-side (php) todos_registros =…
-
2
votes2
answers1468
viewsA: Entity Framework is saving duplicate values when saving entities with relationship N to N
You are creating a new category with new Categoria. You need to pass the existing Category object as parameter: novoLivro.Categorias.Add(categoriasContext.Categorias.Find(selectedId))…
-
1
votes1
answer124
viewsA: How to show a Facebook Embedded Post through Button Click?
The Facebook code mounts the Embedded Posts that it finds on the page when running. A strategy is: first mount the Divs only then call the Facebook code Sort of like this: function…
-
1
votes2
answers241
viewsA: Firing CSS Transition when performing ajax request
The problem is that the this within the function Event Handler no longer corresponds to this of the execution context outside it. Try it like this: var self = this; document.getElementById(…
-
5
votes1
answer107
viewsA: Jqplot error in IE 7
Outdated versions of jqPlot do not work with jQuery 1.9 Update the version of jqPlot you’re using, or use an earlier version of jQuery: <script…
-
4
votes1
answer1213
viewsA: conflict with jquery googleapis
You can’t run multiple different versions of jQuery on the same page. Choose just one, preferably the latest: <script…
-
3
votes2
answers258
views -
7
votes1
answer611
viewsA: How do I get the last tweet?
Use any PHP library that supports the Tweeter API: https://dev.twitter.com/docs/twitter-libraries#php Below is an example using the Abraham Williams' Twitteroauth class: # Carregar a classe do…
-
2
votes1
answer191
viewsA: Improved image insertion in comics
My suggestion to improve is like this: // controller/GaleriasController.php public function addGaleria { $galeria = new Galeria; $galeria->descricao = "galeria 1"; $max = 3; // quantidade de…