Posts by Ivan Ferrer • 12,096 points
772 posts
-
1
votes0
answers50
viewsQ: How to put border-Radius in a span for the entire line even where there is break?
CSS: .mark-style { background-image: linear-gradient(to right, transparent 50%, rgb(183, 202, 88) 50%); background-size: 200% 90%; font-size: inherit; background-repeat: repeat-x;…
-
1
votes2
answers101
viewsA: Why doesn’t this work in Javascript?
Think of the class, as a structure similar to a JSON, JSON is a simple structure, similar to XML, it is worth noting that the class is a template/template, and the JSON object is a custom model with…
-
2
votes4
answers333
viewsA: How to manipulate these objects with Javascript?
From what I understand you want to make a matrix, of the letters is this? var data = [ { letter: "A", num1: "1", num2: "2", num3: "3" }, { letter: "B", num1: "3", num2: "2", num3: "1" }, { letter:…
-
0
votes2
answers72
viewsA: How to put Try/catch in ES6 format?
In fact I solved so: try { this.boxes.forEach(box => document.body.removeChild(box) ); } catch(e) { //... }o pli The problem is that I made a method that removes the element when I changed my…
-
-1
votes2
answers72
viewsQ: How to put Try/catch in ES6 format?
Code: this.boxes.forEach(box => document.body.removeChild(box) ); In ES5 it would be: this.boxes.forEach(function (box) { try { return document.body.removeChild(box); } catch(e){ //erros } });…
-
1
votes0
answers67
viewsQ: Is it possible to capture the origin of a dragged file from the computer?
I wanted to send the image path from the "drop event": Javascript: window.onload = function() { var dropZone = document.getElementById('box_paper'); function handleFileSelect(event) {…
-
0
votes4
answers3012
viewsA: How to convert scientific notation to full number string
Just for the record here, there is a way to solve this serialize, which is by passing the number to string, that nobody thought: $a = array('valor' => (string) 1338838365890273563); $serializado…
-
1
votes1
answer89
viewsQ: Safari bug of a CSS animation with keyframes
In safari Version 12.1 (14607.1.40.1.4), a bug occurs, the effect happens, but gives a strange error, the element that suffered the event seems to recede, the initial position of the translate3d,…
-
1
votes2
answers88
viewsA: Send data by json with highcharts
I believe it must be something like this you want: //aqui seria seus dados que vem da requisição... var graph_data = <?php echo json_encode($data);?>; var graph_keys = Object.keys(graph_data);…
-
2
votes0
answers64
viewsQ: Media Queries to identify notch
Does anyone have a complete solution to identify all the phones that have this "notch" in the existing market versions? Currently I am using these strategies, but I’m still having problems with some…
-
0
votes4
answers830
viewsA: How to search for value in Array/object in PHP?
By your example, it would be enough to do this: $obj = new stdClass('Chats'); $chat_obj_0 = new stdClass(); $chat_obj_0->ChatId = 133831; $chat_obj_0->UserId = "a2784a6dcf1";…
-
1
votes1
answer882
viewsQ: What does this reticence mean in the array?
I saw that ES6 tends to be cleaner, but I can’t understand some things: 1. What exactly is this reticence doing, in theory? function getHiddenHTML(el) { return [...el.childNodes].reduce((txt, node)…
-
0
votes3
answers106
viewsQ: How to convert HTML comments to HTML code?
Is there any way to take comments from an html and convert to html code using javascript? Before: <div class="container"> <!-- [p] -->texto 1<!-- [/p] --> <!-- [p] -->texto…
-
1
votes0
answers58
viewsQ: How to pick up paragraphs from a selected text snippet?
Imagine that the snippet between keys is a text selected with the mouse... That I captured with: window.getSelection().toString(); <p> <--- [pegar daqui] Meu texto selecionado {está aqui…
javascriptasked Ivan Ferrer 12,096 -
1
votes1
answer57
viewsQ: How could I mark a text in html format without deleting the content?
Is there any way to put a tag in the type HTML, if I select a part of html with the mouse, where you have it focused, write a text [mark-open] and then at the end, [mark-close]: <div…
javascriptasked Ivan Ferrer 12,096 -
1
votes1
answer386
viewsA: How to change the application theme in Ionic 4
It works with componentization, example: @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.dark.scss'], }) If you use Materials: function…
-
0
votes1
answer57
viewsA: I need to save the image of fabricjs along with the objects
See if this works for what you need: var w=1108, h=598; var uploadCanvas = function (canvas, callback) { SeuMetodoDeUploadQueNaoseiQuale(canvas) .then(function(rtn){ if (callback &&…
-
1
votes2
answers233
viewsA: What are the ways to use Return in Javascript and how do they work?
The return is used to return something, if you do not set anything for it, it will only return an output of the method: function soma() { //retorna soma 3 mais 4 => 7 return (3 + 4); } function…
javascriptanswered Ivan Ferrer 12,096 -
5
votes1
answer194
viewsQ: How could I undo a paragraph marking
Normal text image: Image of the selected text: Obs: I intend to format the selection better, but in case what I need is to reverse the process through the cancel method: When there is no paragraph…
-
1
votes2
answers54
viewsA: Sorts PHP Array Frequency
I did the following, sorted the array and then ordered the number of repetitions, then I checked if the quantity was equal to 1, otherwise it adds at the end, through the "for", it adds and…
-
0
votes2
answers49
viewsA: "Filter" is not closed
Try it this way and see if it works: function LoadJsonData(callback) { $.ajax({ url: './Json/dados.json', dataType: 'json', async: false, success: function (json) { if (callback) callback(json); }…
-
0
votes1
answer66
viewsA: With mounting a query dynamically depending on a typed string
I put as a method to simplify: function constructQuerySearch($s) { $results = explode(' ', $s); $query_parse = array(); if (count($results)) { $query = "SELECT resposta FROM suporte WHERE pergunta…
-
0
votes3
answers198
viewsA: What javascript code can I use to replace all html images with webp extension to png when the browser is Safari?
You can use picture tag: <picture> <source srcset="path/imagem.webp" type="image/webp"> <img src="path/imagem.png"> </picture> Or You can put an attribute in your images like…
-
2
votes1
answer1642
viewsQ: How to make this transition effect using CSS?
How to make a transition with pure CSS, and in the final transition layout I will have 2 boxes on the left side. The transition: When loading the page, you will only have one box with evaluation…
-
0
votes1
answer27
viewsA: How to reposition an image, through a matrix with fabricjs?
I solved the problem as follows: oImg.transformMatrix = [0.172549, 0, 0, 0.172549, 0, 0]; var currentT = oImg.calcTransformMatrix(); var transformMatrix = oImg.transformMatrix; var mT =…
-
0
votes1
answer27
viewsQ: How to reposition an image, through a matrix with fabricjs?
I have the following matrix for an image: var Matrix = [0.172549, 0, 0.172549, 0, 0]; I would like to position this image with this matrix above, and within the scale of a container: My code: var…
-
0
votes1
answer53
viewsA: inject dependency into a link function in a Directive Angularjs?
Try it like this: You can also try to pass the: calendar($compile) { ... } If it doesn’t work, I believe it should solve the problem: (function () { 'use strict'; angular .module('calendar',…
-
0
votes1
answer76
viewsA: How to make a horizontal progress bar using css Transform scale with scale3d?
I already solved: It was only divided by 100: 80/100 => 0.8 Reusing the method of Pure Javascript, it was possible to make the effect smooth... I needed to transform a percentage number, for…
-
-1
votes1
answer76
viewsQ: How to make a horizontal progress bar using css Transform scale with scale3d?
var progress = 0.0 => 0.99 => 1; //tipo de cálculo que eu gostaria... var obj = { 'will-change': 'transform', 'transform': 'scale3d('+progress+', 1, 1)' } I have two methods that makes…
-
1
votes5
answers3984
viewsA: How to compare arrays to javascript?
Hello, welcome to Stackoverflow, the method below checks the similarity and returns the element it considers most similar! function checkSimilar(collection, a, b) { var first=0, last=0; for (var i…
-
0
votes1
answer194
viewsA: How to log out of Office 365 account automatically?
I managed to do it this way: $scope.redirectOutSistem = function() { loadingOn(); //ESSA FUNCAO CONSTA NO ARQUIVO IS_MOBILE.JS try { if (is_running_on_ipad) { //ESSA FUNCAO SO FUNCIONA QUANDO É NO…
thatanswered Ivan Ferrer 12,096 -
0
votes1
answer194
viewsQ: How to log out of Office 365 account automatically?
I’m having a hard time using a good link to log in with the user in Office 365. The 3 examples below do logout, however... 1) In this first example the user has to click on the user, so that it…
thatasked Ivan Ferrer 12,096 -
1
votes1
answer102
viewsA: How could I implement a Swipe for this slide library?
I managed to solve by doing so: $scope.swipeGallery = function() { //PERMITE SWIPE (EVENTO TOUCH DE ARRASTAR) NO CARROSSEL $(function() { var start_client_x = null, start_client_y = null; var…
-
2
votes1
answer102
viewsQ: How could I implement a Swipe for this slide library?
I’m using this library / Plunker: I would like to make the touch work with the effect: touch-action: pan-x; Like this example, if you enable the console, with active mobile version can see the…
-
-2
votes1
answer84
viewsQ: CSS for Google Pixel 3 XL resolution
What would be the media querie for the resolution of the new mobile: Google Pixel 3 XL ? At this link i have the media queries for version 2: @media only screen and (-webkit-min-device-pixel-ratio:…
-
0
votes1
answer26
viewsA: Open modal from a span hierarchy
I found out, just make one: event.stopPropagation()in the click event.
-
0
votes1
answer26
viewsQ: Open modal from a span hierarchy
How to make both a parent element and a child element being of the "span" type capture the attributes for a modal type event, regardless of the span hierarchy in the text? I already have a text that…
-
0
votes1
answer39
viewsQ: How to distribute elements in class hierarchy by dividing by aligned element?
Imagine you have a parent element with children where the class represents a text selection: <span class="item-1" data-id="1">texto selecionado 1 <span class="item-2" data-id="2">texto…
-
0
votes1
answer37
viewsQ: How to make a funnel responsive table?
I’m trying to do similar to this image: Here’s a Fiddle as far as I can go The data will be dynamic, and I need the corners to be rounded. I accept other alternatives or suggestions for mounting…
-
3
votes1
answer327
viewsQ: How to preserve an iframe cache?
When changing an angular path, I would like to preserve the cache of an iframe that has been read and rendered: $scope.loading_guten_pro = false; $scope.url_pro = '/acesso-pro'; $scope.iframePro =…
-
1
votes1
answer64
viewsA: Multilaser tablet does not load svg positioning correctly
I discovered the problem, is that older browsers do not accept CSS of width and height of the SVG element. Hence I had to pass width and height as attribute directly in the element, ie: That’s not…
-
1
votes4
answers3500
viewsA: How to increase the space between text and underline in CSS?
To n ways to do this, I’ll introduce you to one of them, the border-bottom option would be the best in the case of a large text, but here’s another way to do: <p class="op1"> Texto sublinhado…
cssanswered Ivan Ferrer 12,096 -
0
votes1
answer64
viewsQ: Multilaser tablet does not load svg positioning correctly
I created a character using SVG, which appears unmounted on the tablet inside the webview, this happened in the standard browser also tablet: Multilaser Android 4.4.2 Model Number: ML02-M9-Quad-Core…
-
0
votes1
answer15
viewsQ: Error when trying to assign a new value to a repeat object
I need to assign or even create a new attribute in an object within a loop, but it is giving the following error, that I have no idea what it is: Typeerror: Cannot create Property 'is_content_hide'…
-
0
votes1
answer281
viewsQ: How do I place a function inside ng-bind-html?
I made a simpler example for my problem: Inside my controller is like this: $rootScope.myAction = function(){ alert('Olá mundo!'); } $scope.setAction = function() { var comp = $compile('<button…
-
0
votes1
answer194
viewsQ: How to put a ui-accordion with another ui-accordion inside?
How do I individualize the ui-accordion, the script is not loading? Javascript: $( function() { $("#accordion_search_item1,#accordion_search_item2,#accordion_search_item3") .accordion({…
-
1
votes0
answers17
viewsQ: How to release scrolling in Safari 11.1?
I needed to do this so that the content is not being disturbed and doing Wipe with your finger, but now the scrolling of the page has stopped working, as I do to release the bearing?…
-
0
votes1
answer46
viewsA: Macbook Pro Retina screen is breaking the bootstrap CSS layout
I solved the problem, it was a simple thing, the top column div, which encompassed the exit button of the game and the lives were closing in the wrong place, just at the end of everything.
-
0
votes1
answer46
viewsQ: Macbook Pro Retina screen is breaking the bootstrap CSS layout
How could I fix it, I’ve tried it but it didn’t work: @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio : 1.5) and (min-width: 1200px) {…
-
4
votes2
answers353
viewsQ: Why does Typescript when compiled convert "Let" to "var" in variables?
If let variavel = "valor"; is also compatible with JavaScript, because in the compilation of Typescript, it turns to var variavel = "valor"? Take the test right here: function foo(){ var x = 1; let…