Posts by ℛɑƒæĿᴿᴹᴿ • 1,680 points
66 posts
-
1
votes1
answer35
viewsA: Know how many images or files you have in a folder
This is not possible using Javascript only! You can make an Ajax call to a page that accesses the folder on the server and returns the expected result, but it is important to remember that the…
javascriptanswered ℛɑƒæĿᴿᴹᴿ 1,680 -
2
votes2
answers77
viewsA: How to delete repeated numbers within a Javascript array?
Instead of removing you should think about efficiency and not add the repeated numbers: numeros = [] function adicionar() { if (numeros.length >= 10) { window.alert('Não é possível inserir mais…
-
2
votes1
answer72
viewsA: I can’t enable javascript function
Are two problems: According to the Icaro Martins mentioned, are missing document before the getElementById In the month variable, you declared mth and in the if placed mes, placed mes in both places…
-
5
votes3
answers230
views -
1
votes1
answer44
viewsA: Problem with css Animation called by a javascript function
Example in javascript pure: function atualizar(valor) { textBox = document.getElementById("valor"); textBox.innerText = valor; requestAnimation(textBox); } var requestAnimation = function(obj) {…
-
3
votes1
answer1006
viewsA: What is a microprogramming?
Microprogramming Microprogramming: alternative method to generate control signals in a systematic and orderly manner. It is to strategically program the control unit of a processor at the level of…
-
1
votes1
answer1363
viewsA: Update JSF component via Bean
Try to update your dialog (update="mod") by clicking the button: <p:commandButton value="Buscar" id="pesquisa" class="ui-button-custom ui-button-busca" action="#{fluxo.veiculos}" process="@form"…
-
0
votes3
answers221
viewsA: Mysql LIKE cannot be found by full name
Search using the joker or by full name: $sqlPost = "SELECT id FROM tabela WHERE nome LIKE '%$nome%' OR nome = '$nome'"; Or if you want a more comprehensive search by last names use: SELECT id FROM…
-
1
votes1
answer412
viewsA: Use semicolon instead of comma on numeric keyboard with Linux Mint
Solution via command line: To use the dot instead of the comma on the number pad, open the terminal and run the following command: echo 'xmodmap -e "keycode 129 = period"' >> ~/.bashrc This…
-
0
votes1
answer412
viewsQ: Use semicolon instead of comma on numeric keyboard with Linux Mint
I’m using the Linux Mint 19.1 Tessa On my number pad the dot button (.) click inserts comma (,) I tried to enter the settings but did not find the option that makes this change There is how to…
-
2
votes1
answer47
viewsA: What is the name of a non-retail recursion?
To tail recursion is a recursion technique that makes less use of memory during the stacking, which makes it faster than common recursion. In a common recursion, every recursive call made, it is…
-
4
votes1
answer664
viewsA: Count with HQL JPA
Change the * for cat in your query: public Integer quantidadeRegistros() { try { Query query = em.createQuery("SELECT COUNT(cat) FROM Categoria cat"); return (Integer) query.getSingleResult(); }…
-
2
votes3
answers55067
viewsA: Script to go back to the previous updated page?
Other possibilities to return to the previous page: history.go(-1); window.open(document.referrer,'_self'); location.href = document.referrer; Examples for testing: <button…
-
0
votes1
answer82
viewsA: I can’t display anything in a JSF view
You have not entered the code of your template. If you haven’t set it, you should set a body of your template to be able to display it. Like you did with your title. Example: <ui:composition ...…
-
0
votes2
answers114
viewsA: How to format html tags with javascipt
I recommend the javascript library Highlight.js (open-source): 176 languages and 79 styles Automatic language detection Multi-language code styler Available for Node.js Works with any marking…
-
1
votes3
answers1649
viewsA: Send email with STARTTLS porta 587
The first response from @user2227682 works perfectly, but as you are using Start TLS there is a more specific property for it, comfort the @Fernando Leal said, not the ideal rule, although it works.…
-
0
votes2
answers171
viewsA: Install Avalon Primefaces Theme - Netbeans
Marcos, Place the theme file . jar in webapp/WEB-INF/lib folder In his web.xml put it like this: <context-param> <param-name>primefaces.THEME</param-name>…
-
3
votes2
answers1741
viewsA: How is the 'Two way data Binding' process with pure JS?
Two-way data Binding or two-way connection means basically the following: When the data/elements of the interface (frontend) user are updated/included Changes are propagated to the model…
javascriptanswered ℛɑƒæĿᴿᴹᴿ 1,680 -
1
votes1
answer162
viewsA: Object comes pro bean with all blank JSF fields
Tathian, Your example contains several likely problems: Your dialog is inside a form? The method editaPredio is not in your ManagedBean or you didn’t put? Your commandButton shall process and update…
-
1
votes1
answer1738
viewsA: HEAD Detached at origin/master
You’re probably not in branch master, that should solve your problem: git checkout master
-
0
votes2
answers931
viewsA: Materialize CSS - sticky label at the top
Luiz Felipe, this example was taken from showcase of Materializecss: <div class="input-field col s6"> <input placeholder="Placeholder" id="first_name" type="text" class="validate">…
-
0
votes7
answers91443
viewsA: Error: Unable to find or load the main class in Java (Eclipse or CMD)?
Navigate to the directory where your files are .class: cd C:\Users\MeuNome\workspace\ProjetoX\bin\br\com\pacote Run the code below by passing the classpath as reference: java -classpath ../../..…
-
4
votes2
answers252
viewsQ: Scope equivalent to @Stateless on CDI
I’m migrating the notes EJB from my application to CDI and I have some doubts: What is the equivalent scope @Stateless of the EJB at the CDI? The @ResquestScoped would act in an equivalent manner? I…
-
0
votes1
answer184
viewsA: Repeated ID with facelets
First, your growl must be inside a <h:form> Suggestion is that you put one growl specific to each page You are repeating the Growl component in your template: <section class="aw-content…
-
1
votes2
answers1141
viewsA: Android calendar with events
Nokas, To set events you can use the following code: calendarView.addEvent(new Event(date, "Feriado X")); To highlight events, you’ll need to use decorators on specific dates, where you define how…
-
2
votes2
answers354
viewsA: Why doesn’t this setTimeout work?
If really the need is to refresh the page all you can use: Works in IE: setTimeout(function(){ window.location.href = window.location.href; }, 3000); Not tested on all browsers, may not work on…
-
0
votes3
answers12797
viewsA: Refresh page after action
To reload a page via javascript you can use one of the following options: Javascript 1.0 window.location.href = window.location.pathname + "pagina"; Creates page history entry Javascript 1.1…
-
3
votes1
answer4972
viewsQ: SELECT in VIEW generates sub-query?
I wonder if I make one VIEW with a simple query, whether the view call generates a new SELECT, ie a sub-SELECT totaling 2 SELECTS or whether it only points to SELECT from within the VIEW? I only ran…
-
1
votes2
answers560
views -
1
votes2
answers703
viewsA: How to get the ID value of the i tag?
The tag <i> sets a part of the text to display in italic. It does not contain id, so it is not appropriate to make this logic. My suggestion is that you separate with <div> and put the…
-
1
votes1
answer339
viewsA: Favicon does not work on IE
Place the following code inside the <head> of your html: <!DOCTYPE html> <html> <head> <link rel="icon" href="img/body/icon-amova.ico" type="image/x-icon" /> <link…
-
1
votes2
answers110
viewsA: Adjust only one component
Place the attribute styleClass in his p:autoComplete: <p:autoComplete styleClass="classeEstilo" /> Configure your css class as follows: .classeEstilo ul { background-color: red; }…
-
0
votes1
answer69
viewsA: How can I keep a component dynamically created with jQuery on the page?
Using jQuery you can manipulate the element when creating the page, for example: $(document).ready(function() { $("#minhaDiv").html('<div id="NovaDiv"></div>');…
-
1
votes2
answers718
viewsA: SELECT that brings products active in one company and that are not active in all others
You can try something like this: SELECT * FROM Tabela_Produtos p INNER JOIN Tabela_Filiais f ON f.id = p.filial_id WHERE p.filial_id = 16 AND p.status LIKE 'Ativo' AND p.id NOT IN ( SELECT p2.id…
-
4
votes1
answer20804
viewsA: How and where to add image by Android Studio?
Using the Android Studio 1.5: Right-click on res, new Image Asset In the Type of Resource, choosing Action Toolbar and Tab Icons Choose the Way and name your image Click on Next Click on Conclude…
-
1
votes1
answer584
viewsA: After requesting AJAX input no arrow value to Managedbean?
This is a Primefaces bug that can be fixed easily by placing an element that involves the component that will be updated. Follows gernérico example: <p:selectOneMenu> <p:ajax…
-
4
votes2
answers662
viewsA: Set Auto Increment position, always for the smallest ID
This is standard and will always happen. If you have 2 overlapping transactions you are making INSERTs: Transaction 1 makes a INSERT, gets the ID 26 (for example) Transaction 2 makes a INSERT, gets…
-
2
votes1
answer69
viewsA: Requestcontext as null
Your RequestContext will not be available because your scheduler is not a Managedbean. And if you used the Ajax Poll of Primefaces: <h:form> <p:poll interval="3"…
-
3
votes1
answer166
viewsA: Schedule job to run on the Wildfly server
Example for the method funcaoAgendada() be invoked every second: @Singleton public class Agendador { @Schedule(second = "*/1", minute = "*", hour = "*", persistent = false) public void…
-
3
votes6
answers1694
viewsA: Why not use a Boolean parameter?
The division of this function into smaller functions will produce more cohesion, that is, a function that does only one thing. Within this function will end up having a if to check the condition and…
-
11
votes1
answer18212
viewsQ: What are the types of Scade in JPA?
I’m looking for information on the types of Scade that exist and how they work in JPA relational modeling. The guys I found explanations for were: NONE = Does nothing with the object (default) MERGE…
-
2
votes4
answers1314
viewsA: Position div below other after browser decrease
To place the div side by side and break the line when resize use: #teste { float: left; width: 200px; height: 100px; background-color: red; } .teste2 { float: right; width: 200px; height: 100px;…
-
1
votes2
answers395
viewsA: Progress bar on web system
Marcos, Your question is very generic, I don’t know how it is structured, but to track the progress of sending a file you can use something like this: var formData = new FormData(); var arquivo =…
progress-baranswered ℛɑƒæĿᴿᴹᴿ 1,680 -
6
votes1
answer4275
viewsQ: What is the difference between using focusin/focusout and Focus/Blur?
Using jQuery to focus on a specific element raised the doubt: What’s the difference between using focusin() in relation to focus()? And focusout() in relation to the blur()? Is there any specific…
-
0
votes1
answer163
viewsA: Manipulating Radiobutton to have no value in any field
Leonardo, Put one of these options on your radiobutton onClick: this.checked = false; $(this).prop('checked', false); $(this).attr('checked', false); $(this).removeAttr('checked'); If placed in a…
-
0
votes2
answers129
viewsA: Change cursor in "onhover" event to HTML5 <video>
Put the class below or the css property cursor: pointer; in the div you want: .cursor_pointer { cursor: pointer; } Example:…
-
0
votes1
answer97
viewsA: Error when using eclipse EE
The problem seems to be in getFoto(), try doing something like this: public StreamedContent getFoto() { FacesContext fc = FacesContext.getCurrentInstance(); if (fc.getCurrentPhaseId() ==…
-
0
votes2
answers548
viewsA: How to detect change in input value with active readonly
Try to put this jQuery to run at the beginning of the page: $(document).ready(function () { $('input#estado-cliente').bind("change", function () { alert($(this).val()); }); }); If you need to…
-
1
votes2
answers1275
viewsA: Image HTML position does not scroll with the screen
Sarah, Your question is very confusing, but your problem must be here: #corpo-img > #rede-social{ position:absolute; left:0%; margin-left:0px; top:70%; margin-top:0px; } #box-img{…
-
0
votes3
answers701
viewsA: Make a search independent of the order of the keywords
Try it like this: description LIKE "%joão%cristo%" OR description LIKE "%cristo%joão%" This second condition %cristo%joão% will provide you the missing lines in the query: holy Christ John holy…