Posts by Hamurabi Araujo • 1,095 points
34 posts
-
12
votes1
answer560
viewsQ: What is the operator '...' in Javascript?
I saw some uses of ... but I’m not sure what it does. Example: var a = [1, 2, 3]; var b = [4, 5, ...a]; What’s that operator’s name and how it works?…
-
2
votes1
answer70
viewsA: Error connecting SQL Server to Java in Resteasy API
The solution I found was to import the driver jdbc by Maven. I put the following code in my pom.xml: <dependency> <groupId>com.microsoft.sqlserver</groupId>…
-
0
votes1
answer70
viewsQ: Error connecting SQL Server to Java in Resteasy API
I’m using the driver JDBC from microsoft 6.0 in a design of an API using Java (JRE 1.8) with resteasy using Eclipse Oxygen and Tomcat 7 (I tried with other versions and presented the same behavior).…
-
2
votes2
answers132
viewsA: Should I encrypt the password in the application or on the server?
Responding in a clear and fast way: the password must be encrypted in the application. Why? When the application sends the data to the server, nothing prevents this data from being read or…
-
3
votes1
answer37
viewsA: How to assign a looping to code - PHP
You don’t need PHP, really. You can add this code to your header, which will force the page to reload every 300 seconds (5 minutes): <meta http-equiv="refresh" content="300" />…
phpanswered Hamurabi Araujo 1,095 -
1
votes2
answers303
viewsA: How to make a page with full blocks using bootstrap?
There are a few ways to do this. The one I used was to create a general container with the class container-fluid which causes the div occupy all space of the screen. In parts that the line should…
-
2
votes1
answer44
viewsA: Images in the creation of wordpress theme
To solve this you could use custom Fields. Using this approach, you can insert one more image in each post and call it in your theme normally. There are several ways to do this, from a fully manual…
wordpressanswered Hamurabi Araujo 1,095 -
1
votes1
answer4383
viewsA: Highlighted image Wordpress
Inside your loop, you should call the function the_post_thumbnail_url(). She returns to you the url of the highlighted image of the current post. Here in the documentation you can see more about…
-
9
votes2
answers113
viewsQ: Use of@in variables
I see in some languages that compile for javascript, such as Typescript and Coffeescript, the use of @ variables, as well as cases where it is not used. For example: w = 10; @v = 11; After all, what…
-
12
votes3
answers425
viewsQ: Difference between '$()' and 'jQuery()'
It is common to see, in codes that use jQuery, references to selectors using the $(). Only I’ve already found codes using jQuery() to make darlings selection. What is the difference between them?…
-
0
votes3
answers210
viewsA: How to format an HTML element p/ become equal to a button?
You can solve this using jQuery! jQuery('.sg-show-popup').addClass('button'); With this code, you select all items that have the class .sg-show-popup and adds to each item in that list the class…
-
1
votes1
answer42
viewsA: Listing Side by side
You can do it this way: <?php $i = 0; while( have_posts() ) : the_post(); if( $i % 2 == 0 ) : ?> //html da coluna da esquerda <?php else: ?> //html da coluna da direita <?php endif;…
-
2
votes1
answer1419
viewsA: Find duplicate words without selecting one by one
If your Sublime is set to default, using the Ctrl + D each occurrence of your current selection will be selected one by one. To select all at once, use the Ctrl + F. Open the search bar at the…
-
2
votes1
answer38
viewsA: How to hide the word "blog" from my wordpress site
Simpler than editing the htaccess manually, it is possible to do this configuration directly in the WP admin panel. Go to Configurações > Links permanentes. There select the Post Name option, ex:…
htaccessanswered Hamurabi Araujo 1,095 -
0
votes2
answers577
viewsA: Pass Token by header to each Angularjs request (Authorization )
To set the header authorization just do the following: $http.defaults.headers.common['Authorization'] = 'Basic ' + token; If this is the case, simply exchange 'Basic' for 'Bearer' or leave only the…
-
3
votes1
answer46
viewsA: Wordpress Problem, Manipulating Images
To list a post of a particular type or category, you don’t need to scroll down to the level of creating a query itself. wp has functions that abstract this. All this can be done using the class…
-
0
votes0
answers848
viewsQ: How to get the http request body in the API
How do I access the body content of the request sent by the client? For example: @Override @GET @Path("/mypath") public Response myMethod() { System.out.println("Conteúdo da requisição: " +…
-
7
votes1
answer3851
viewsQ: How to generate secure tokens dynamically
Various applications use token authentication to maintain secure network communication. However, using dynamically generated tokens, the probability of breakage decreases greatly. So there is the…
-
0
votes1
answer686
viewsQ: How to return status code from Java Resteasy request
It’s quite intuitive to make a return of the API with an object or something like that, only you would like to make the return of an object along with the status code of the request. @Override @GET…
-
1
votes1
answer299
viewsA: Wordpress Function Enqueue - I can’t add Jquery to the theme
This happens because after using the wp_deregister_script('jquery') if it makes it necessary to 'register it' again before putting it back in the queue. See documentation. So you could do something…
-
4
votes1
answer3193
viewsQ: Java SOAP webservice authentication engine
I am building a Java webservice (wsdl) that will be consumed via SOAP. I need to implement a form of authentication in each method of the webservice so that each request is tested if the source is…
-
1
votes2
answers597
viewsA: Insert buttons to share posts in Wordpress
There are some plugins that do this in a simple way. I don’t know exactly what social networks you want to share, but based on what you said I can cite some plugins that feature a greater number of…
-
2
votes1
answer1254
viewsQ: Difference between REJECT and DROP in iptables
What’s the difference of using the REJECT or DROP in the configuration of iptables?
-
4
votes1
answer1934
viewsQ: Difference between acceptance test and system test
In practice, what is the difference between acceptance testing and system testing? And how to do them?
-
1
votes1
answer36
viewsA: Error installing git in EC2 instance with Cent OS 5
To solve this problem I initially followed this tutorial, only with some modifications. yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel cd /usr/local/src wget…
-
0
votes1
answer36
viewsQ: Error installing git in EC2 instance with Cent OS 5
I have an ec2 instance newly created using Centos release 5.11 (Final). One of the first things I tried to do was to install git using: sudo yum install git only that you’re making that mistake:…
-
1
votes0
answers19
viewsQ: Parameter with default value in Java
In other languages, such as javascript, it is allowed to make a function by passing a parameter with a default value, as in the following structure: function myFunction(value = true){ //alguma ação…
-
0
votes1
answer125
viewsQ: Ionic emulate - Error running on AMD processor machine
When I try to give the ionic emulate android gives the following error: Emulator: Requested console port 5584: Inferring adb port 5585. ERROR: x86 emulation Currently requires hardware Acceleration!…
-
0
votes1
answer257
viewsQ: Authorization via token with Angularjs
I saw that to set the 'Authorization' field of the header with Angular is used: $http.defaults.headers.common.Authorization = "Bearer " + token or $http.defaults.headers.common.Authorization =…
-
8
votes2
answers352
viewsA: Code help (appears to be hexadecimal)
Just like you, I saw that it was a hexadecimal code. I then converted the data to ASCII table values here. Giving me that result: "QDR YD WDR JHQWLOPHQWH QHVVD ERD QRLWX HVFXUDUDLYD FRQWUD D PRUWH…
-
1
votes3
answers1244
viewsA: Show Data in Div Jumping Line
You can solve it this way: document.getElementById("divExibir").innerHTML = document.getElementById("divExibir").innerHTML + i + '<br>';
javascriptanswered Hamurabi Araujo 1,095 -
3
votes1
answer1714
viewsA: How Promises works in Angularjs
You could try to do something like: function validateUser(name, pw, callback) { var status = ''; var data = {login: name, senha: pw, plataforma: 'APP'}; $http.post('http://localhost:8100/login',…
-
1
votes1
answer1223
viewsA: Display the category posted in post type in wordpress
I’m not sure how your framework works, but using some WP functions can do this in various ways: $categoria = get_category(get_query_var('cat'))->name; Ref:…
-
5
votes2
answers996
viewsA: Is it wrong to use ! Import to override Bootstrap rules?
Is doing it that way wrong? Would I have any consequences on small projects? And large projects? If it is a wrong mode to edit Bootstrap, what would be the recommended mode? It’s not wrong, it’s…