Posts by Ivan Ferrer • 12,096 points
772 posts
-
1
votes3
answers169
viewsA: How to know if Modal has active scrolling?
I solved it this way, but thanks for the help: $scope.verifyScroll = function() { $timeout(function() { var doc = ($('.modal-detalhes-block').height()); var win = $(window).height() - 58;…
-
0
votes3
answers169
viewsQ: How to know if Modal has active scrolling?
I have a modal that scrolls when the content of the window is larger on the screen..., I would like to put a different class when the modal scrolling was active, in the example below it changes the…
-
0
votes2
answers113
viewsA: How could I improve this SQL query query with sub querys?
Like I did to solve the problems: select user_id_int, total_points , sum(pontos_obtidos_period) as pontos_periodo, u.avatar_json, ano from ( SELECT user_id_int, total_points , ub.action_id,…
-
0
votes4
answers181
viewsA: Complete numbers with Javascript
You can do something like this, but you need to calculate the amount you want to put in zeros, and the amount you want to limit: var numero="12345.56789.00085.111111.11111.234566.6.123",…
javascriptanswered Ivan Ferrer 12,096 -
0
votes2
answers113
viewsQ: How could I improve this SQL query query with sub querys?
There are many sub selects, how could improve this query in Mysql and make a max SUM of total_points_period'? Pick up the total points for a period from the "user_bigdata" table and the total points…
-
1
votes2
answers216
viewsA: Use array type variable that returns the ajax function in PHP?
The expected output you probably want is a JSON? <?php echo json_encode($dados_array); ?>
-
0
votes0
answers28
viewsQ: How to play an audio object instance in Safari?
How do I play an audio instance in Safari? var som = new Audio("http://www.sousound.com/music/healing/healing_01.mp3"); function tocar() { this.play(); } som.addEventListener('canplay', tocar,…
javascriptasked Ivan Ferrer 12,096 -
0
votes1
answer49
viewsA: Fetch server name
In this case, I think it would solve: function encontrarValor($domain) { if (preg_match('/(http(s)?:\/\/)?(www\.)?(.+)/', $domain, $matches)){ return explode('/',$matches[4])[0]; } } echo…
phpanswered Ivan Ferrer 12,096 -
1
votes1
answer107
viewsQ: Interaction in browser behavior when leaving the page
Is there any way to open a question modal, when the person tries to quit a game in the browser, type, changing the address in the URL or giving refresh, or even more difficult, wanting to close the…
-
1
votes2
answers381
viewsQ: How to find out if your browser console is open?
Is there any way to capture the information that the browser console is open? Currently I make a script that checks if the height of the browser has been changed... but in case it dislodges the…
-
0
votes4
answers71
viewsQ: Repeat zebra style color only 5 by 5
How to make this loop repeat to have 5 numbers of one color and 5 numbers of another color? var collection = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; var html=''; for (var i in…
-
0
votes0
answers40
viewsQ: How to adjust a custom text editor to mobile version
Is there any way to adjust an editor on the screen, in the mobile version, without using css: zoom:0.1 or transform:scale(0.1). I need to make the CSS element: .main{} which is CSS of the container…
-
1
votes1
answer67
viewsQ: What is the difference in terms of Uiviewcontroller and Sfsafariviewcontroller navigation?
I would like to know the advantages and disadvantages of webview controllers Sfsafariviewcontroller and Uiviewcontroller, for the issues below: - performance - compatibility - usability…
-
0
votes1
answer217
viewsA: Sum and Subtract values with checkbox and select
Here’s a simple example, since you haven’t made it very clear what you need. <select id="opcao_soma_val1" name="soma"> <option value="1" selected>1</option> <option…
-
1
votes0
answers16
viewsQ: Why does the webview front in Objective-C behave differently than the Safari browser in ipad?
Is there any way to make both compatible in the view. IOS version: 9.3.5 iPad 3: model A1416
-
1
votes0
answers64
viewsQ: How to use ng-Hide to hide Pin in google maps?
How do I toggle (Hide/show) for the pins on the map? I am using this library NGMAP: My view code: <div map-lazy-load="https://maps-api-ssl.google.com/maps/api/js"…
-
2
votes1
answer85
viewsQ: Padding reducing the image
I have an image with a background worked, in this image I’m giving padding equal 140px, but instead of the image increase the padding, and consequently, get a bigger box, the image is reducing,…
-
0
votes2
answers26
viewsQ: How to remove Divs from an image list with jQuery?
I created Divs using: $('.images').find('img').replaceWith(function () { return '<div class="resize">' + this.outerHTML + '</div>' }); HTML output: <div class="images"> <div…
-
0
votes4
answers1768
viewsA: Create infinite menu with PHP+CSS+JS
How to make an infinite menu simple: class MenuInfinito { public function imprimeMenuInfinito( array $menuTotal , $idPai = 0, $nivel = 0 ) { $menu = ""; // abrimos a ul do menu principal $menu.=…
-
0
votes1
answer33
viewsA: Open google-map info-window with ng-map without alias in ng-controller
I decided without using template and it worked: <div ng-controller="MyController"> <div map-lazy-load="https://maps.google.com/maps/api/js" map-lazy-load-params="{{googleMapsUrl}}"…
-
0
votes2
answers309
viewsA: Why my $Scope. $watch doesn’t work
Try to check the behavior change to apply the values: $scope.$watch('paciente.telefones', function(newv, oldval) { if (newv !== oldval) { var existeCelularComEnvioSms = false;…
angularjsanswered Ivan Ferrer 12,096 -
0
votes1
answer33
viewsQ: Open google-map info-window with ng-map without alias in ng-controller
I’m using this library (ng-map) / github. Is giving template rejection error in my controller, how could it solve this? Error shown: Possibly unhandled rejection: info-window Working as a template…
-
0
votes1
answer90
viewsA: How to use Unload with angular JS?
Solved using pure javascript as follows: $window.onbeforeunload = function(e) { if(!$scope.btnReturn){ e = e || window.event; e.preventDefault = true; e.cancelBubble = true; e.returnValue = 'Se você…
-
0
votes1
answer90
viewsQ: How to use Unload with angular JS?
Unload should be called when leaving the page and hit any url from another site. In an old version, without Angular JS, doing this, works normal, it calls the request, when I turn on the debug the…
-
0
votes2
answers34
viewsA: How to capture the status rendering (pending) for svg not loaded on the screen?
I solved the problem by putting a check variable of the read total: this.convertAvatar = function(url_svg, $scope, type) { var request = $http({ method: "get", url: url_svg }); var svg =…
-
0
votes2
answers34
viewsQ: How to capture the status rendering (pending) for svg not loaded on the screen?
I have an avatar that mounts with SVG files, the problem is that it gets disassembled before status 200. How could I capture the status (pending) for only after it load show the avatar? Example of…
-
0
votes0
answers171
viewsQ: Regular expression to remove certain content
I have some texts that are in HTML, which perhaps has specific style attributes, I would like to make a method that removes these tags and their content, because they are titles... and specific…
-
0
votes1
answer103
viewsA: Take version control of Git and save to a PHP constant
I found a cool way using Gulp... var gulp = require('gulp'); var fs = require('fs'); var version = '1.2.3.' + (new Date()).getTime(); gulp.task('version', function(cb){…
-
1
votes1
answer103
viewsQ: Take version control of Git and save to a PHP constant
There is a possible way to save within the PHP code the GIT hash or a version numbering automatically each time you push, or by Javascript, using Gulp, save the version in PHP? I would like to do…
-
1
votes1
answer77
viewsQ: How to use touch event on iPad with ui-draggable and ui-resizable?
I’m using the following library: //code.jquery.com/ui/1.11.4/jquery-ui.js But when I put it to Mobile or iPad, it stops working, there is some way around the problem? Javascript: $(".container…
-
2
votes0
answers151
viewsQ: How to put CSS correctly in a rendered SVG in the view via the use tag?
I’m using Angularjs to load an element, but it doesn’t take CSS. A View: <svg version="1.1" id="body_1" data-name="body-1" xmlns="http://www.w3.org/2000/svg"…
-
0
votes1
answer34
viewsQ: Regular expression to remove images containing a height range in inline style
How could I improve this regular expression to remove images that range from 29 to 45: [0-9]{29, 45}? my expression:…
-
1
votes1
answer230
viewsQ: How do I trigger the Cancel event when I click out of the modal or Esc grip?
Problem with modal output $uibModal: var modalInstance = $uibModal.open({ animation: true, templateUrl: 'detalhes_leitura.html', controller: 'ModalController', size: size, backdrop:true,…
-
1
votes0
answers17
viewsQ: How do I Reload a directive with type A restriction?
I have an application in Angularjs that is with the following problem: Every time I access my view using: $Location.path('/my-url'); Directive with type 'A' restriction is simply not normally…
-
0
votes2
answers96
viewsA: How to simplify code using a loop?
It’s not the best way but I could do something like this, I don’t know much about C#, but the way is more or less this: for (var i=1; i <= 10; i++) { Eval("lblNomeCampo"+i+".Text =…
-
0
votes2
answers22
viewsA: How to update a service collection by calling index a second service?
I sent the Ids to a callback method: CadernosService .getCadernosPage(data_set) .then(function (response) { $('.loadingData').css({'bottom': '0', 'position':'fixed', 'top':'','margin-top': '369px'})…
-
1
votes2
answers22
viewsQ: How to update a service collection by calling index a second service?
In the call of a service within my controller I carry little data, and as soon as this data is loaded, on the screen, behind should come the complete data for a particular filtered item, the…
-
0
votes4
answers1139
viewsA: How to get last login of each user using mysql?
I believe it would be something like this you need: select MAX(data) as top, DATE(data), id, ip, usuario, codigo from `adm_historico_acesso` where codigo = '404'; Here’s a working example.…
mysqlanswered Ivan Ferrer 12,096 -
2
votes0
answers98
viewsQ: How to use ng-repeat inside the ui-Carousel library?
Carousel works, but I’m not able to ng-repeat within the directive, how could I solve this? In the controller I have the collection: $scope.steps = [ {id:1, text: 'nnoonon 1', current:1,…
-
1
votes0
answers34
viewsQ: No doubt about missing 404 error
I have a question, and I don’t know what to do. I am using Zend Framework 1.12, PHP5.6. It turns out that my system is in a subdirectory called "system": /system/application/... My public folder:…
-
1
votes1
answer283
viewsA: Carousel Multiple passing 1 item at a time
I managed to solve the problem with this example: Angular UI Carousel <div class="gallery-carousel"> <ui-carousel slides="recentes" slides-to-show="5" slides-to-scroll="1" autoplay="false"…
-
1
votes1
answer283
viewsQ: Carousel Multiple passing 1 item at a time
What I need is just that (just not with this plugin, because in this it stops at the end). I believe to be this here, I’m doing some tests. I need to do a Carousel that has a range of 5 slides on…
-
0
votes1
answer483
viewsQ: How to make a negative rounded corner to put on the tab of a button?
Would be rounded corners off the button: | | __________ / <---- em cima (usando cláusula css :before) / | Botão | \___________ \ <---- em baixo (usando cláusula css :after) | | Behold this…
-
0
votes0
answers31
viewsQ: How could I change the background css of a menu’s parent?
I am using boostrap. I would like to change the "my-Parent" menu with CSS when it is in the "Collapse.in class": <nav class="col-xs-12 col-md-2 pull-left meu-parent"> <div…
-
1
votes0
answers319
viewsQ: How do you route in Ionic 3 (deep linkings)?
I would like to know how I do that by clicking a custom button, open my page with the route in the browser? Example in the view: <button (click)="sairDaPagina()" class="btn…
-
0
votes1
answer880
viewsA: How to filter values by keyword in the array?
I managed using array_diff(): function filterDataByValues(array $array, array $values) { $filtered = array_diff($array, $values); return $filtered; }
-
1
votes1
answer880
viewsQ: How to filter values by keyword in the array?
The codes below are not working very well the way I want: $array = array('January', 'February', 'March', 'April', 'May', 'June'); function filterDataByValue(array $array, $value) { $filtered =…
-
0
votes0
answers58
viewsQ: How to disable an item from the list so it won’t be checked, to just show in the combo?
How do I leave an item disabled in this plugin: ui multiselect.? http://embed.plnkr.co/xWvfWYjaW7TThKZONkv5/ Code: angular.module('ui.multiselect', []) //from bootstrap-ui typeahead parser…
-
0
votes1
answer45
viewsA: Modal does not result from updated validation error when submitting a $http() request
I solved the problem. The problem I was solving the request within the modal instance (top layer), as the answer was to be in the bottom layer, in this case it was better to use the resolve() in the…
-
1
votes0
answers40
viewsQ: How to check the margin of an element?
I have a code to resize an element, I need to capture the resize from a margin of 18 pixels: $(document).on("mousedown",".image",function(me) { var move = $(this); var fm = matrix(this); var sv =…