Posts by Edgar Muniz Berlinck • 4,569 points
94 posts
-
0
votes2
answers371
viewsA: Uses Unit - Out of memory
This is because you are using a Unit that makes uses of Unit that is using it that by the way makes uses of Unit that also makes uses of Unit that is giving uses to it. Complicated right? Yeah,…
delphianswered Edgar Muniz Berlinck 4,569 -
3
votes1
answer895
viewsA: Duplicate records with Onetomany relationship
This may be happening for some of the reasons below: You are using Detached objects in listObjetosB. JPA isn’t always smart enough to understand that it should create or update the objectClasseB…
-
2
votes2
answers1101
viewsA: Remove association in relation to Many to Many
To delete only the association is simple. Suppose the scenario below: @ManyToMany(cascade = CascadeType.PERSIST) private List<Foo> foos; If you remove an element from Foos and save the entity…
-
6
votes3
answers3037
viewsQ: Calculate loading time of a page
I would like to measure the load time of a page using Javascript. How so? When someone accesses my page I want to start measuring load time. In case this load time exceeds, for example, 500 ms I…
javascriptasked Edgar Muniz Berlinck 4,569 -
3
votes3
answers15502
viewsA: SQL Server command to list active transactions
You can consult the Locks, like this: SELECT L.request_session_id AS SPID, DB_NAME(L.resource_database_id) AS DatabaseName, O.Name AS LockedObjectName, P.object_id AS LockedObjectId, L.resource_type…
sql-serveranswered Edgar Muniz Berlinck 4,569 -
1
votes1
answer2137
viewsA: Jquery mask working only for one field
Your code works, the proof is here: http://jsfiddle.net/ryw18wax/1/ What I noticed was that the masks are only applied when you enter all the numbers, which is probably not what you want. Note that…
-
4
votes1
answer270
viewsA: Javascript syntax error
Specifically answering your question: Not. Your code in question works smoothly. Proof: http://jsfiddle.net/1dqhqu4s/ Given the section below: $("#dados #total").html("R$…
-
1
votes1
answer899
viewsA: Implementation n for n relationship in Delphi
Delphi does not do this automatically. What you can do is implement an event afterpost of life and record the records in the N to N.
-
2
votes2
answers233
viewsA: Chat Javascript does not return function
I saw some mistakes: Change this var APP new Firebase("https://nomedomeuapp.firebaseio.com/"); therefore var APP = new Firebase("https://nomedomeuapp.firebaseio.com/"); Change this var = msg…
-
2
votes2
answers2098
viewsA: Recognize if user is using iOS or Android
There are scrripts ready to do it for you. This site has for almost all languages: http://detectmobilebrowsers.com/ Basically just download the script you want and it’s gone. EDIT I don’t put the…
-
3
votes2
answers856
viewsA: @Predestroy on @Viewscoped
A bean of the kind @Viewscoped will be active while requests are made to the same page. When you make a request to another page or another bean the scope is clean. When working with JSF it is very…
-
3
votes3
answers255
viewsA: Select with joins return last result per date
The fact of being mysql makes it a little easier. I returned the max(vigencia) and I grouped by Driver.id. My sql was like this: select d.id, d.nome, max(doc.vigencia) as vigencia from Defenders d…
mysqlanswered Edgar Muniz Berlinck 4,569 -
18
votes2
answers2693
viewsA: What is the difference between charset and collation in a database?
Charset is the set of symbols and encodes Let’s assume you have the letters "A", "B", "a" and "b". For each letter shall be associated with a number: "A" = 0, "B" = 1, "a" = 2 and "b" = 3. A letter…
-
2
votes1
answer625
viewsQ: Check encoding of an XML
I need to process a number of XML files. One of the requirements is that the encoding be it UTF-8. Any other kind of enconding must be rejected. That is accepted: <?xml version="1.0"…
-
0
votes2
answers2504
viewsA: How to run a JS or jQuery function after an update, Reload in JSF and Primefaces?
I do so: <p:commandButton ... update="@form" oncomplete="carregarCss()" /> the oncomplete is executed whenever the request made by the component is successfully executed. It is equivalent to…
-
5
votes3
answers151
viewsA: Doubt in select de sql
select num from tabela where 'a data que voce quer' between data_inicial and data_final
sqlanswered Edgar Muniz Berlinck 4,569 -
3
votes1
answer856
viewsA: Error message in Glassfish
Open the properties of the server in question and enter the correct administrator password in the Connection. It is likely that the given password is wrong. By default the user password admin is…
-
2
votes1
answer472
viewsA: Android using Netbeans webservice
You can use the KSOAP. The access is simple: // Criar o objeto SOAP SoapObject soap = new SoapObject(namespace, metodo); //Setar parametros soap.addPropoerty(nome, valor); //Envelopar Requisição…
-
7
votes2
answers30147
viewsA: Joptionpane, for example?
JOptionPane.showOptionDialog( null , "Pergunta?" // Mensagem , "Titulo" // Titulo , JOptionPane.YES_NO_OPTION , JOptionPane.PLAIN_MESSAGE , null // Icone. Você pode usar uma imagem se quiser, basta…
-
12
votes2
answers30102
viewsA: What is WSDL (Web Services Description Language)?
Speaking in extremely simple and practical terms: WSDL is an XML describing a web service. WSDL content describes the methods provided by the web service and how we access it. A good reference:…
-
4
votes4
answers1684
viewsA: Dynamically check which attributes of a Model have been changed?
I usually use the patern Observer. Observer is a Design Pattern that represents a 1-N (one-to-many) relationship between objects. Thus when an object changes state the dependent objects will be…
-
7
votes2
answers9446
viewsA: Exercise of family tree
If two people have the same mother, then they are brothers. The easiest way would be to create the relationship brother and sister: irmao(X,Y) :- gerou(Z,X), gerou(Z,Y), homem(X) irma(X,Y) :-…
prologanswered Edgar Muniz Berlinck 4,569 -
1
votes2
answers572
viewsA: Primarykey, Foreignkey and Unique With JPA
1- First you need to map the entity Pupil @Entity @Table(name="Aluno") // Eu sempre informo o 'name', mania minha public class Aluno implements Serializable { @Id @Column(name = "id") private…
-
1
votes1
answer1069
viewsA: When repairing causes error - 'Lost Connection to Mysql server During query' - An idea?
If your logic is right I don’t know, because I don’t know what you want to do, but your while is in an infinite loop, since you’re not giving a zQuery2.Next;. I believe your correct loop would be:…
-
17
votes3
answers10406
viewsA: How does HTTPS (SSL) work?
I develop apps for Facebook and all these should be run by HTTPS. For this I need to install a certificate on my server (Jboss in this case, since I use java). Well, when people access my…
-
4
votes1
answer58
viewsA: Error with Cap in Safari!
The Calc function is only supported from safari 6.0. Source: https://developer.mozilla.org/en-US/docs/Web/CSS/calc#Browser_compatibility You can do the calculations using javascript, for example:…
cssanswered Edgar Muniz Berlinck 4,569 -
5
votes1
answer2666
viewsA: Working with git in graphical mode in windows
If you already have the repository on your computer you can create a remote that points to remote server (your windows server in case) and then give a push. In this way: Using the console (Optional)…
-
6
votes1
answer6160
viewsA: Capture data from Facebook users
You are making a little mess with the access token. This access_token is generated when the user explicitly authorizes his application to access the requested data. To get the user’s data it is…
-
7
votes4
answers4078
viewsA: Pros and cons of the functional paradigm and Haskell
I will not guarantee that I will answer your question with the excellence you expect. First of all, you can never learn something new. To tell you the truth, it’s healthy to get out of the comfort…
-
9
votes2
answers3578
viewsA: How to encrypt using an asymmetric encryption algorithm in Delphi?
There is a component called Tchilkatcrypt2. I worked with him a lot of time. Follow a code snippet of how to sign a file with a private key and check it with a public key: // // Passo 1: Assinar…
-
1
votes1
answer484
viewsA: Calculate/Multiply/Sum without "R$"
You can use replace this way: var Campo1 = document.getElementById("de").innerHTML.replace('R$', '').replace(',','.'); var Campo2 = document.getElementById("por").innerHTML.replace('R$',…
javascriptanswered Edgar Muniz Berlinck 4,569 -
3
votes1
answer2310
viewsA: Load "Hidden" fields by javascript
Just access them with Document.getElementById. Set the value: document.getElementById("idServico").value = 'valor que você quer...'; document.getElementById("trasladoServico").value = 'valor que…
-
3
votes1
answer2265
viewsA: Use of Callback in Delphi
I found a tutorial well completed in the blog of Andreano Lanusse. When we have a client-server call involving some kind of processing we use Callback so that the server sends the processing status…
delphi-xe3answered Edgar Muniz Berlinck 4,569 -
1
votes2
answers468
viewsA: update in 2 tables with calculation and field update keeping the previous
You have switched a ' and a + of place and the quotes in m_duel are not necessary (This considering that the m_muelo field is Numeric... If varchar use quotation marks. This would be the correct…
-
4
votes4
answers1700
viewsA: Understanding Node and Applications in Real-Time
1. Node replaces Apache and I have to choose between one and the other? Yes, but it is not mandatory. It can be run together with Apache, just listening to a different port. 2. Node replaces php?…
-
3
votes6
answers5531
viewsA: Why use Javascript if there are so many other technologies to generate dynamic content?
Your question already answers. There are several reasons, I will quote only the main. Because it runs on the client, javascript does not require constant access to the server. If you do everything…
-
0
votes6
answers7569
viewsA: Use of global variables and class variables in Delphi
When you declare a variable in VAR in Unit this variable is static and is visible anywhere importing the Unit in question. Summarizing: If unit1 has a variable varDaUnit1 and unit2 uses unit1, unit2…
-
49
votes4
answers233186
viewsA: What is the difference between INNER JOIN and OUTER JOIN?
Inner Join makes a junction between two tables A and B where the projection will be all elements of A that are in B. Ex.: I want all the clients of a bank and its certain agencies: select * from…
-
15
votes2
answers19752
viewsA: Ascending and decreasing ordination in the Clientdataset
Yes, it is possible. Just use the indexes offered by Dataset. I find it interesting to talk a little about the indices: There are basically two types of indices in Delphi: The temporary and the…
delphianswered Edgar Muniz Berlinck 4,569 -
13
votes1
answer13158
viewsA: Developing Android apps using Python
Yes, it is possible. Once I saw a discussion about it in the list of the Fedora infrastructure, indicated this sdk: https://github.com/kivy/python-for-android?source=c She turns a program into…
-
8
votes4
answers3248
viewsA: How to implement a textarea responsibly?
I do so (Using Bootstrap): textarea { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; } <div class="span9"> <textarea></textarea>…
-
2
votes2
answers1021
viewsQ: Processing of Session Objects
I’m working with legacy systems in JSF 1.2 and noticed that developers make absurd use of Session to store all kinds of objects, ranging from user-informed filters to collections. As you can…
-
2
votes8
answers7830
viewsA: Is giving a "SELECT" before an "INSERT" a safe way of not having duplicate records?
I have this problem. In cases like yours where changing the bank is not an option I simulate the sequences Oracle in Mysql. For this I create a table tb_seq_sequence, in this table I keep the table…
-
8
votes2
answers4407
viewsA: In SQL Server how to convert string uppercase part lowercase based on tab: ?
I don’t know if it’s the most elegant solution, but take your case: select Upper(Substring(t.texto, 0, CHARINDEX ( '\' ,t.texto) ) ) + '\' + lower(Substring(t.texto, CHARINDEX ( '\' ,t.texto) + 1,…