Posts by Filipe Moraes • 8,737 points
259 posts
-
1
votes1
answer98
viewsQ: How to do the paralax effect horizontally and vertically at the same time
I would like to know how to do with the paralax effect that exists on the following site: http://hellomonday.com/ In the arrows on the left side (arrow up), after the site load, see the example of…
-
0
votes1
answer665
viewsQ: Apply permissions after executing rsync command
I am synchronizing the files on my local machine with the server as follows: rsync -avz -e 'ssh' -exclude=temporarios ~/Projects/teste/* [email protected]:/var/www/ But for the application to work, I…
linuxasked Filipe Moraes 8,737 -
2
votes1
answer701
viewsQ: Accentuating problems on the most up-to-date server
I have 2 servers with the following settings: Server 1: PHP 5.3.10 Apache 2.2.22 Mysql 5.5.43 Ubuntu 12.04.5 LTS Server 2: PHP 5.6.9 Apache 2.4.7 Mysql 5.5.43 Ubuntu 14.04.2 LTS I’m using the Yii…
-
2
votes1
answer547
viewsQ: Instantiate class outside namespace
I have a class with the namespace defined: namespace App; class AppSessionHandler { private $db; //... $this->db = Utils::ZendDB(); >>>>>> LINHA 12 } The following error occurs:…
-
2
votes1
answer3038
viewsQ: Directory listing of the server appears in the browser
I have on the server installed the Debian, Apache, PHP5 and MySql. When typing in the browser the address of a folder, for example, http://www.dominio.com/api, all folders and files are listed. How…
-
2
votes1
answer221
viewsQ: Add multiple fields from the same table in the same query
I have an "X" table with several fields and one of the fields is "date" and the other is "type". In the same query I need to return the following: - Number of registrations in April - Number of…
-
1
votes1
answer268
viewsA: How to make random numbers
See this plugin: http://www.jqueryscript.net/animation/Animating-Numbers-Counting-Up-with-jQuery-Counter-Up-Plugin.html Implementation: Insert the following libraries into your code. Donwload the…
-
4
votes2
answers1348
viewsQ: Update involving 3 tables
I have 3 tables: TABELA A ID ID_TABELA_B 1 188 2 189 3 190 4 200 TABELA B ID ID_TABELA_C 188 22 189 22 190 22 200 23 TABELA C ID NAME 22 Gato 23 Cão Table A is linked to table B and table B linked…
mysqlasked Filipe Moraes 8,737 -
9
votes2
answers217
viewsQ: Using Jquery Library with Angularamd
I am implementing Angularjs + Requirejs through Angularamd. I want to add the Jquery library but returns the following error when using the "$": Error: $ is not defined I have the main.js configured…
-
0
votes1
answer172
viewsQ: Configure Virtualhost in wamp
I have the following configuration on wamp: <VirtualHost *:8080> ServerName 192.168.10.129 ProxyPreserveHost On ProxyPass / http://172.31.42.42/ ProxyPassReverse / http://172.31.42.42/…
-
5
votes2
answers104
viewsQ: Error executing cascade class methods
I have the following code: 1. $customer = new Customer($apiContext); 2. $customer->setVat('XYZ0123456') 3. ->setName('Filipe') 4. ->setLanguageId(1); 5. (...) The following error occurs on…
phpasked Filipe Moraes 8,737 -
3
votes1
answer2135
viewsQ: What is a "cacert.pem"?
In the code where an API call is executed, there is the following line: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); When executing the code the following error is returned: SSL Certificate…
-
1
votes1
answer337
viewsA: jQuery html with load()
Use jQuey Ajax: $.ajax({ url: "Noticias.html", dataType: "html" }).done(function( responseHtml ) { $("#minha_div").html(responseHtml); });
-
0
votes1
answer186
viewsQ: Directive is executed 2 times
I have the following "directve": app.directive('modal', ['$window', function ($window) { return { restrict: 'C', link: function (scope, element, attrs) { scope.onResizeFunction = function() {…
-
5
votes1
answer1487
viewsQ: Reuse function in 2 different controllers
I have the same function in 2 different controllers. This is not good practice because it will complicate code maintenance. How do I reuse the same code on different controllers? Using "Factory",…
angularjsasked Filipe Moraes 8,737 -
1
votes1
answer299
viewsQ: Broadcast runs once but the event is called 2 times
I have the following "broadcast" inside a "Directive": console.log('a emitir...'); $rootScope.$broadcast('olamundo', params); In my "controller" I have the following code: $scope.$on('olamundo',…
angularjsasked Filipe Moraes 8,737 -
9
votes3
answers8626
viewsQ: Protect folder from direct access
The user needs to log in to access a list of documents. All documents are in the "/uploads folder". Once you know the directory, it is easy to access it, just type in the browser…
-
1
votes2
answers1891
viewsQ: Upload with $http post
In my controller, I have the following code that I use to post my form: $http.post(url, json_object).then(function (results) { console.log(results.data); }); The above code sends a json to the…
-
2
votes2
answers1700
viewsQ: Query to return only higher values
I have the following table: Contract | Code | Year 13 7800 2015 12 7800 2014 12 7800 2013 12 7801 2016 12 7801 2013 12 5102 2017 I am trying to make a query to return the result below, that is, the…
-
4
votes1
answer6287
viewsQ: Unexpected 'use' (T_USE) error when using autoload
I have the following folder and file structure: -api -v1 -libs -Slim -Facebook -autoload.php -index.php -login.php Inside the "index.php" I do the include of "login.php": require_once 'login.php';…
-
1
votes2
answers953
viewsQ: Same controller for different views
When defining routes, I have the following code: $stateProvider .state('app', { url: '', abstract: true, views: { 'login' : { templateUrl: 'view/login.html', controller: 'authentication' },…
angularjsasked Filipe Moraes 8,737 -
1
votes2
answers661
viewsA: Search in a JSON encoding field
I found the solution here: http://dev.mysql.com/doc/refman/5.6/en/string-comparison-functions.html#operator_like Since Mysql uses C escape syntax in strings ( for example, "n" to represent a new…
-
1
votes2
answers661
viewsQ: Search in a JSON encoding field
There is a field in the table where the content before being written is encoded in JSON. The content is saved as follows: [["nome_completo","Ana Concei\u00e7\u00e3o Dias"],["idade","27…
-
0
votes2
answers2268
viewsA: Change iframe height with external src depending on content height
The problem was solved using "postMessage", remembering that the problem arose because I tried to access the contents of an iframe in which "src" did not point to the same domain. Basically what the…
-
3
votes2
answers2268
viewsQ: Change iframe height with external src depending on content height
I have an iframe where src points to an external domain After the content is loaded, a part is hidden because the iframe does not fit the content. Since iframe has an external src, I cannot…
-
2
votes1
answer354
viewsQ: Angularjs and SEO
I have a site made with Angularjs and PHP. All content that is common between pages is only loaded once, when the user changes page only the content of the respective page is loaded (running the PHP…
-
2
votes2
answers137
viewsQ: Save temporary data to the array or query the database
It is necessary to check whether the user is allowed to view/edit data from a particular client. This verification occurs in almost all application operations. Currently when logging into the…
logicasked Filipe Moraes 8,737 -
1
votes0
answers243
viewsQ: Add oauth to API with traditional authentication
When the user opens the site, it is redirected to the login form where the authentication takes place. On the server side the credentials are checked and a session is created, so that the…
-
0
votes1
answer360
viewsQ: Receive parameters in $state
In the app.config I have the following $state: .state('app.users.edit', { url: "/editar/:uid", views: { 'content@' : { templateUrl: 'view/users_edit.html', controller: 'users_edit', resolve: { auth…
angularjsasked Filipe Moraes 8,737 -
3
votes2
answers325
viewsQ: Controller runs every time I change route
In index.html I have 2 views: sidebar-left : where the menu is loaded after login. content : where the page in question is loaded I am using angular-ui-router and after login, the user is redirected…
angularjsasked Filipe Moraes 8,737 -
0
votes1
answer162
viewsQ: getimagesize() does not work on Plesk + Windows
I have the following code: $info = getimagesize($this->tmp_name); When analyzing the variable $info, I found that it was blank. I checked that the GD library was installed. I checked the write…
-
3
votes1
answer460
viewsQ: Load all dependencies dynamically
In the file index php. do the include of all controllers: <script src="app/app.js"></script> <script src="app/ctrl_A.js"></script> <script…
angularjsasked Filipe Moraes 8,737 -
1
votes1
answer403
viewsQ: HTTP loading error while uploading to product fiche
In the product sheet, in images, when uploading the image the following error is returned: HTTP loading error I’ve already given permission 775 in the briefcase media via FTP. I’ve already given…
magentoasked Filipe Moraes 8,737 -
3
votes1
answer90
viewsQ: Configure N levels in htaccess
On the site we have the product area where there may be N levels and sub-levels of categories. htaccess is currently set to accept 2 levels: RewriteRule…
-
2
votes1
answer722
viewsQ: Username and password appear on console after POST
The code below makes a POST of the data entered by the user in the login. $http.post('api/v1/login', object).then(function (results) { return results.data; }); Note that I pass as a parameter an…
-
1
votes1
answer170
viewsQ: Using Resolve in Angularjs
I am using resolve to check if the user is logged in as follows: routeProvider. //... .when('/dashboard', { title: 'Dashboard', templateUrl: 'view/dashboard.html', controller: 'authCtrl', resolve: {…
angularjsasked Filipe Moraes 8,737 -
2
votes1
answer721
viewsQ: Block pages with Angularjs login with asynchronous call
In an application made with Angularjs, some pages are protected by login. I configured the module as follows: var app = angular.module('App', ['ngRoute', 'ngTouch', 'mobile-angular-ui']);…
angularjsasked Filipe Moraes 8,737 -
1
votes1
answer1435
viewsQ: Load menu after login with Angularjs
In index.html I have ng-view where HTML content is loaded: <body> <div ng-include src="'view/sidebar.html'" class="sidebar sidebar-left" toggleable parent-active-class="sidebar-left-in"…
angularjsasked Filipe Moraes 8,737 -
1
votes3
answers2723
viewsQ: Domain without www does not work
At the root of the server I have a folder "wp" where I have Wordpress installed. I put inside the folder because the site was not made with Wordpress and yes the blog. When typing the url…
-
6
votes1
answer3596
viewsQ: Interpret the Mysql Explain command
I have a query that is taking 6/8 seconds to execute. The database I’m using is Mysql. In Phpmyadmin I did the following: EXPLAIN SELECT id_categoria, sc.categoria, categoria_principal, associada…
-
0
votes2
answers60
viewsQ: "Mage_chronorelais_helper_data'" class not found in Magento
I deleted a module in Magento and the following error appeared: [14-Oct-2014 11:42:32 UTC] PHP Fatal error: Class 'Mage_chronorelais_helper_data' not found in /public_html/app/Mage.php on line 548…
magentoasked Filipe Moraes 8,737 -
4
votes3
answers3768
viewsQ: Using Redis in practice
I’m having trouble understanding in practice where to use Redis in an Ecommerce, for example. I’m reading a book but I can not understand what I have to take into account when deciding whether to…
-
3
votes3
answers805
viewsA: Does not add values
Behold: console.log('final: ' + startField + duracao * 60000); The system will interpret it as follows: 'final' is a string so it will be concatenated with the startField variable, even if it is…
-
4
votes1
answer1713
viewsQ: Foreign key on Mongodb
I have the collection users and the collection shopping The ratio is 1 user to N purchases where each purchase is a document. What I intended was, when making a findOne in the users table, would…
mongodbasked Filipe Moraes 8,737 -
-1
votes1
answer317
viewsQ: Security in consultations with Redis and Mongodb and Nodejs
In the relational model, when using SQL we have to pay attention to SQL Injection in our application. At Redis and Mongodb, what precautions should I take when building a database query? Remembering…
-
8
votes1
answer2562
viewsQ: Main differences between Mongodb and Redis
I’m reading a book on real time applications with Nodejs. The author used Mongodb and Redis to exemplify the use of database with Nodejs. My doubt arose when he used both at the same time,…
-
2
votes1
answer125
viewsA: Install Mongodb on another drive on Windows
I managed to install Mongodb. I created within the folder "mongodb" the folders "logs" and "data/db" and then ran the following command: e: mongodb bin mongod.exe --logpath "e: mongodb logs…
mongodbanswered Filipe Moraes 8,737 -
2
votes1
answer125
viewsQ: Install Mongodb on another drive on Windows
I’m trying to install Mongodb in a unit other than "C". However when trying to use the "Mongo" command in the terminal the following error is returned: Failed to connect to localhost:27017 The…
mongodbasked Filipe Moraes 8,737 -
1
votes1
answer227
viewsQ: Copy Nodejs project to another machine
I have Nodejs installed on 2 machines. I need to migrate the design from one machine to another. Just copy only the project folder or on the target machine I will have to do something? Installed…
node.jsasked Filipe Moraes 8,737 -
1
votes2
answers2749
viewsQ: Validate e-mail with Angularjs
I have the following field for e-mail: <input type="email" class="form-control" id="email" name="email" ng-model="fields.email" required="true" /> In the div where the field is, I have the…