Posts by Sertage • 942 points
16 posts
-
7
votes2
answers2256
viewsA: Break line after semicolon ;
It would be something like that? str_replace(";",";<br>",texto); Will replace all the ; for ;<br> of texto.
-
1
votes1
answer273
viewsA: Color in an SQL query
In the HTML tag you are showing the result, just put the color: red property in the style. For example, let’s say the tag that displays the value is a <td> of a <table>: <td…
-
1
votes2
answers496
viewsA: Problem with Fileupload
The image did not change because you saved another image with the same name, so the browser uses the image that is cached. A trick to always update the image is to put a random text as parameter…
-
1
votes1
answer238
viewsA: How could I implement Command (Design Pattern) in this work?
The softest to make is the Design Pattern Builder. For example, in the movie class would look something like this: class Filme { private String nome; private Date duracao; ... /** Setters **/ public…
-
0
votes2
answers3198
viewsA: Completely customize the Youtube player
Once I needed to change, but I could not do much. By default youtube allows you to change the properties as below: <p> <% options = '?' #options += '&autoplay=1' # 1: Inicia automatico…
-
0
votes4
answers1578
viewsA: How to calculate the CPU percentage?
To calculate I imagine that it checks how much data is being processed by the processor’s capacity. To retrieve the information (from the top) to display, you can do it as follows:…
-
1
votes2
answers763
viewsA: Is it possible to compare items from two lists and if there is similarity between items do not display this item in a datatable?
I would do something like this: private List<Solicitacoes> listDB; private List<Solicitacoes> listXML; private List<Solicitacoes> listaFiltrada; private void filtrar() { listDB =…
-
1
votes1
answer511
viewsA: Eclipse ADT does not work
Maybe this will help: https://stackoverflow.com/questions/21059612/no-resource-found-that-matches-the-given-name-style-theme-appcompat-light It goes something like this: Lower the addCompat library…
-
0
votes1
answer704
viewsA: Determine maximum height of a column title in Primefaces
To do what you asked just set max-height in the Stilo of your column by setting the maximum size in pixels. <p:column ... style="max-height: 50px" > But in the case you quoted above I would…
-
2
votes1
answer523
views -
4
votes1
answer2159
viewsA: How to pass the value of one variable in JSP to another in Javascript?
var foo = '${newsletter.content}'; By placing the apostrophes, whatever is on newsetter.content will be placed inside a String. In fact you are using Java to generate Javascript code, so if the…
-
46
votes4
answers82876
viewsA: Not IN or Not EXISTS which to use?
This will depend on the situation. Not in is recommended when you already have the values and pass as parameter, for example: select * from tbl where status_id not in (1,3,7) Now if you are going to…
-
2
votes3
answers140
viewsA: Search results in 3 tables with the date of the last 5 days
I think the best way would be using a not exists, as follows: select * from tbl_utilizadores u where not exists (select 1 from tbl_votos v where v.id_user = u.id and v.data > (NOW() - interval 5…
-
1
votes1
answer386
viewsA: Color of the Collapse menu
To work like the ipded site is just to put the classes .hidden-xs and .hidden-sm on the Nav tag. http://getbootstrap.com/css/#Responsive-Utilities-print Thus: <nav role="navigation" class="navbar…
-
2
votes2
answers682
views -
0
votes2
answers1021
viewsA: Display all directories and files contained in them
Uses recursion: public static void main(String[] args) { File folder = new File("C:\\"); for (File arquivo : folder.listFiles()) { listarArquivos(arquivo); } } public static void listarArquivos(File…