Posts by haykou • 3,602 points
126 posts
-
8
votes1
answer2899
viewsQ: What is the difference between computed properties and the methods of a Vue.js instance?
I am trying to understand the difference between the two, when using one or the other, I know that there are also the Watchers, which the correct use of them?
-
3
votes1
answer2649
viewsQ: Doing a Get using Axios (Vue.js)
I’m trying to pull up a list of names coming from a json (http://pokeapi.co/api/v2/pokemon) using the Xios but I don’t understand why I get the error Typeerror: Cannot set Property 'Pokemons' of…
-
1
votes7
answers5040
viewsA: Regular expression for accepting numbers and letters, regardless of sequence
After some tests the following expression solved my problem: function vSenha(senha) { return /^((?=(?:.*?[a-z]){1,})(?=(?:.*?[0-9]){2,})).{8,16}$/.test(senha); } The cases below work: 12cbahda…
-
5
votes7
answers5040
viewsQ: Regular expression for accepting numbers and letters, regardless of sequence
I have the following problem, I need to validate a password field with at least 8 characters, being at least 2 numbers and the rest letters, they can be in any position. 12abcdef abcdef12 The…
-
2
votes1
answer298
viewsQ: How to isolate CSS from a component?
I am using the React.js (in the example create React app) and I even created two components, but I could not isolate the .css of each component. The css of the tableInfo.css ends up being applied to…
-
1
votes1
answer109
viewsA: How to redirect url with query with . htaccess?
I found the solution, it is necessary to use the RewriteCond with a query string: RewriteCond %{QUERY_STRING} ^q=([^&]+) [NC] RewriteRule ^(nossos-socios)/?$ $1.php?termo=%1 [NC,L]…
-
2
votes1
answer109
viewsQ: How to redirect url with query with . htaccess?
I have the following problem, I need to redirect to the following url: site/nossos-socios.php?termo=teste for site/nossos-socios/?q=teste I need you to have the question before q=, I tried using the…
-
0
votes1
answer282
viewsQ: How to remove the first value within an array?
I have the following array: array(3) { [0]=> string(22) "VALOR 1" [1]=> string(10) "VALOR 2" [2]=> string(14) "VALOR 3" } I need to show all the values of this array but delete the first…
-
2
votes1
answer258
viewsA: how to use inherit and initial properties in css?
Basically the initial returns the initial value of the browser, so depending on the browser you use it can return a different value. The inherit checks the value of the parent element, for example:…
-
0
votes1
answer344
viewsQ: How to activate counter with a particular scroll
I have the following problem, I need to activate a counter when the user scrolls to the div where the numbers are, but in my code the counter works and then it seems to activate the function again,…
-
0
votes2
answers111
viewsQ: How to prevent an image from uploading to mobile?
I’m trying to prevent certain images to be uploaded on mobile, all are with display:None but know that they will be loaded by default, anyone knows any alternative that nay either using the…
-
1
votes1
answer429
viewsA: View wordpress posts by category
According to the wordpress documentation, I believe this solves your problem: query_posts( array( 'category_name' => 'my-category-slug', 'posts_per_page' => -1 ) );…
-
3
votes1
answer267
viewsQ: How to repeat content on multiple static pages?
The point is, I have only static files. HTML and am looking for a simple way to create the blocks just once using only the client side. The idea is to respect DRY, there is some way to do this…
-
8
votes1
answer349
viewsQ: Is there any way to calculate a pattern of extra space from a source?
I am trying to put together a layout as "pixel Perfect" as possible, but I have always come across this problem, using large fonts, there is a space above and below the font, as if it were a…
-
3
votes2
answers511
viewsQ: How to activate an event from a class change
I have the following problem, I made navigation arrows for some elements and depending on the active element, I need to change the CSS of another element. In the example below I would need to change…
-
0
votes1
answer69
viewsQ: How to save a post title based on a selected field?
My problem is this, I created a custom post type called "Home Highlights" and within it the user will add the post you want, these posts come from a select_advanced of Metabox, I made a function to…
-
1
votes1
answer30
viewsA: Recovering Data with Twitch with JS
A simple way is to make an AJAX request (in the example I am using jquery), follow an example that returns a jsonp: $.ajax({ type : "GET", dataType : "jsonp", url :…
javascriptanswered haykou 3,602 -
5
votes1
answer4900
viewsQ: When to use the http Patch method?
I did some research on the method PATCH, and saw that it makes partial modifications, but did not understand in practice when to use it and what is its difference to the PUT. I am looking for a…
-
1
votes1
answer175
viewsA: Is it possible to use Cordova with nodemon?
I found a viable solution, the Cordova Browser-Sync Plugin. With it you can edit the html of the app without needing to update anything, it refreshes the emulator you are using.…
-
2
votes1
answer175
viewsQ: Is it possible to use Cordova with nodemon?
I’m starting to study more Cordova but every time I need to use the cordova run browser to go up the server and test the app, with Node I use the nodemon to keep the server updating without having…
-
2
votes1
answer702
viewsQ: Compare current url to href
My scenario is this, I have 3 links and I need to identify which one is the same as the url current. <a href="meulink">Menu 1</a> <a href="meulink2">Menu 2</a> <a…
-
3
votes1
answer26
viewsQ: .each() ends when the div is closed
I have the following problem, I have Divs that have a dynamic amount of Divs inside. <div class="grid-f"> <div class="col-4"></div> <div class="col-4"></div> <div…
-
5
votes3
answers241
viewsQ: Condition within a . each()
The problem is, I’m 9 li within a ul <ul> <li>Teste1</li> <li>Teste2</li> <li>Teste3</li> <li>Teste4</li> <li>Teste5</li>…
-
3
votes1
answer224
viewsQ: Leading vs line-height
I have the following problem in converting a layout, I have a list of names that has the following property (in the image below): I found some formulas like this Line-height = Font-size + Leading/2,…
-
1
votes1
answer42
viewsA: When I resize the viewport, the image moves to the bottom of the page
Remove inline-block from class .block before: It is creating a 100% space before the class . block and pushing the div down when the page is resized.
-
2
votes1
answer27
viewsQ: Firing a method . scroll on mobile device
I am trying to use Jquery’s . scroll method as follows, when the user scrolls any change happens. $(window).scroll(function() { $('.exemplo').css('color', 'red'); }) .exemplo { height: 250px; width:…
-
6
votes4
answers877
viewsQ: How to search for an element with the same class depending on the number of children?
My scenario is this, I have two ul with li. As uls have the same class, but I wanted to manipulate only one of them, in this case, the one that has only one li as a daughter. Example:…
-
2
votes1
answer125
viewsA: How to resolve soon being shown in half
There are some Ivs above your logo, so it’s cutting. See this by applying a float:right to the following Ivs: The menu . navbar . navbar-default . navbar-top In the container below the menu And no .…
-
1
votes1
answer241
viewsA: How to compile all . Less files into a single . css
I managed to solve my problem, quite simply, in the task I replaced . src with gulp.src('src/main.less') And on that main.Less I called the other files with @import @import "home.less"; @import…
-
1
votes1
answer241
viewsQ: How to compile all . Less files into a single . css
I’m trying to configure Gulp in my project but when I compile the . Less files it generates a new . css for each. Less, I wanted Gulp to compile all . Less and the result was just a "result.css".…
-
3
votes2
answers544
viewsA: Translate Wordpress strings from Portuguese to English
I did not find a more practical solution, I switched the strings manually even, as the ? lang Wordpress, follows my solution: <?php $mylocale = get_bloginfo('language'); //Pega o lang padrão do…
-
3
votes2
answers544
viewsQ: Translate Wordpress strings from Portuguese to English
I am with a Wordpress installation in en en and have searched numerous forms of theme translation, strings but none has worked out. Most take a theme that the default is English and I translate into…
-
0
votes4
answers4452
viewsA: Navbar Collapse does not work!
In the documentation of Bootstrap shows that the <nav class="navbar navbar-default" role="navigation"> should come before your <div class="container"> . Making this change the Collapse…
-
1
votes2
answers449
viewsA: MASK field does not render formatting
The function .Mask is not native to Jquery, you have to import the plugin after calling the jquery.min. Follow an example of Jquery Mask working, $("#telefone").mask("(00) 0000-00009"); <script…
-
3
votes2
answers202
viewsA: View . HTML with Vraptor. Is it possible?
If you use the result.forwardTo("/minhapagina.html"); in the controller works, but it makes more sense for you to use JSP that allows you to create Java code within HTML, i.e., dynamic pages.…
-
2
votes3
answers48474
viewsA: Getting input value with jQuery
Place the var inside the function: $("#vendaMediaMensal").focusout(function(){ var vendaMediaMensal = $("#vendaMediaMensal").val(); alert(vendaMediaMensal); });…
-
1
votes1
answer808
viewsA: Display contents of the <link rel=""> tag on the html page?
How are you using this feed2js to grab the feed, and add on the page use the script that way: <script language="JavaScript"…
-
1
votes4
answers9290
viewsA: How to place a gif before displaying the site page
The plugin you want is the Royal Pre Loader. One tip I give is to search the code of the site, in my case I use Chrome, I enter in Dev Tools, I go to the Source tab and look in the Javascript…
-
3
votes2
answers598
views -
0
votes1
answer647
viewsA: Dropdown menu moving Ivs below
So the dropdown doesn’t change the rest of the structure, add: ul li:hover ul li{ display:block; position:absolute; } There really is a lot of code in your question, and the amount of uls and lis…
-
2
votes1
answer45
viewsQ: Bank query for another variable
I have the following scenario, I perform a query to the bank and return all data: <?php include ("conectar.php"); $query = "SELECT * FROM pontos ORDER by pontos DESC LIMIT 0,10"; if ($result =…
-
2
votes2
answers2985
viewsA: Consume Moodle Web Service
I couldn’t understand why the js code doesn’t work but I was able to consume using a php example that is in the same repository as the javascript example. <?php $token = 'meutoken'; $domainname =…
-
4
votes2
answers2985
viewsQ: Consume Moodle Web Service
I am trying to consume the webservice of Moodle, following a js/Rest example I found on github, I created a test.php with the code below (changing the domainname and token) but when I call the page…
-
0
votes1
answer739
views -
4
votes2
answers23279
viewsQ: How to remove an old commit
I’m trying to remove a very old commit from my repository that was just to test git, I researched some solutions and came up with this: git rebase --onto (sha1) (sha2) or git rebase --onto HEAD~2…
-
3
votes1
answer512
viewsQ: Configure Heroku with proxy
I’m trying to start using Heroku to test a web java app I made, I downloaded Heroku’s Toolbelt but when it comes to logging in it launches a Unable to connect to Heroku API, Please check internet…
-
5
votes3
answers3224
viewsA: How big is the line break?
From what I understand you want to increase the size of br, as the line-height base is 100%, increase as needed. The default value of line-height is normal, it is calculated by the value multiplied…
-
2
votes1
answer1048
viewsQ: Pass an input value to an object array
I’m trying to pass on the value of one input text for an array of objects, via jQuery but not understood how to insert it in array. I tried to wear something like: var usuario =…
-
0
votes1
answer387
viewsQ: Drawing through a . txt
I have a big question about how to pass the data from the Quivo2D milking method to the hairX and Hairy variables, in the Quivo2D milking it goes through a file populating vx and Vy with the values…
-
2
votes2
answers457
viewsA: Adjust text color in submenu
Puts a color: black here: #bt-menu ul a