Posts by Eduardo Lelis • 304 points
12 posts
-
1
votes1
answer234
viewsA: Wordpress display post Author photo image url
The author’s photo is also called avatar. To show the avatar inside the loop of Wordpress is like this: <?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?> The first parameter is…
-
0
votes1
answer69
viewsA: How to save a post title based on a selected field?
Basically select works by showing a pair of key and value. What you are viewing and selecting in select is just a label, what is being saved in the database is the ID of the post and not the title,…
-
1
votes2
answers1257
viewsA: Assign a value to checkbox in javascript
The default behavior of the checkbox is boolean, that is, it will only be sent if it is checked. In your case you are missing only add the values in the checkboxes repectives with the tag value with…
-
2
votes1
answer2174
viewsA: Image with Transparent Background
To remove the white color of an image you can use a php script like the one below. <?php $img = imagecreatefromjpeg("imagemexemplo.jpg"); $white = imagecolorallocate($img, 255, 255, 255);…
-
5
votes2
answers7902
viewsA: How to define the vector size dynamically in C?
To allocate a vector dynamically you must use the function malloc or calloc. You must know how to operate pointers to understand briefly how it works. For example, to allocate a vector with 10…
canswered Eduardo Lelis 304 -
0
votes2
answers3013
viewsA: Change variable value after clicking PHP button
You can put a hidden field to keep control of the counter and increment it by PHP every POST submission. <form method="post"> <input type="hidden" name="contador" value="<?php echo…
-
1
votes2
answers1307
viewsA: Use Angularjs to pass parameter to Jquery
You can capture the variable you need using a type code: angular.element('[ng-controller="SetorController"]').scope().setorId
-
1
votes1
answer49
viewsA: Prepocessor (Less) - Variable @Arguments
Yes, when creating your mixin with parameters using the "@Arguments" variable you must specify a default value for each of them. So when calling your mixin you don’t need to pass the values in a…
-
0
votes2
answers256
viewsA: Optimization of custom search tool
For ease you can mount a vector of checkboxes in HTML where the field value is the term to be searched for, so your form would look that way: <input name="termos[]" type="checkbox"…
-
1
votes1
answer263
viewsA: Disable icheck in a checkbox
It is possible yes. To start the icheck in one or more fields it is done through jQuery selectors. An example to apply the icheck to all checkboxes and radios with the blue theme would be like this:…
jqueryanswered Eduardo Lelis 304 -
1
votes1
answer738
viewsA: Angularjs Directive: $Scope does not update UI
The problem is in your Directive. When Angular updates the scope from your call on scope.$apply your ajax hasn’t finished running yet, so updates will only appear on the next change in scope. The…
angularjsanswered Eduardo Lelis 304 -
2
votes4
answers1879
viewsA: Is it necessary to add prefixes to some CSS properties?
The use of prefixes is necessary if you want to support the attribute for versions of the browsers in which this attribute was still being implemented. To better understand this you can observe the…