Posts by Caputo • 5,583 points
123 posts
-
6
votes3
answers301
viewsA: What is cloud computing?
According to the Wikipedia Cloud Computing is delivering computing as a service instead of as a product, by which compatible features, software and information is provided to computers and other…
-
5
votes2
answers839
viewsA: How to check if a class implements a C#interface?
I found the answer in this question from Soen in the response of Robert c Barth if (object is IBlah) or IBlah myTest = originalObject as IBlah if (myTest != null)…
-
4
votes2
answers9397
viewsA: Place image in bootstrap menu
Move the image above the navbar-header and associate it with navbar-right classes. This puts your image on the right side of the view on desktops, and goes left on mobile devices as the menu button…
-
16
votes1
answer46906
viewsA: How to change menu colors?
You can change the CSS classes or use tools such as Lavish or Twbscolor. And I found the following question from Soen which is very complete and didactic. I transcribe and translate the user…
-
3
votes2
answers1243
viewsA: Error assigning dynamic values to the Unidac Tuniconnection component
The example taken from the Unidac website shows how to make the connection: var UniConnection1: TUniConnection; ... UniConnection1.ProviderName := 'Oracle'; UniConnection1.Username := 'scott';…
-
0
votes3
answers637
viewsA: Alternative to the Enterprise Architect
The Staruml is a great tool, very complete and free. Features UML modeling capabilities, is extensible and features a very nice UX. To use Staruml on Ubuntu, you will need to use Wine Under…
software-engineeringanswered Caputo 5,583 -
2
votes1
answer226
viewsA: Extend Tclientsocket Delphi class
Simply inform the class that you want to extend in parentheses after the class unit ClientSocketPersonalizada uses System.Win.ScktComp; type TClientSocketPersonalizada = class(TClientSocket) public…
-
7
votes3
answers1083
viewsA: To what extent is premature optimization a problem?
There is a principle called YAGNI - You Ain’t Gonna Need It ( You Won’t Need It ) It comes to this. We have to worry about performance and resources at all times, about good practice. But the level…
-
4
votes2
answers1242
viewsA: How to organize the codes in Angularjs?
One of the best ways to organize the code I’ve ever used to work with these frameworks is asynchronous module loading (AMD - Asynchronous Module Loader). At this link has a very complete example…
-
1
votes1
answer536
viewsA: Delphi shortcut to move code block
Using Modelmaker you can use Alt + Shift + DOWN/UP
-
6
votes5
answers9265
viewsA: Search judicial process data on the TJSP website
Work in the company that develops the system used by the TJSP. Today, e-Saj is the only external access web interface that is available. If my memory doesn’t fail, WS access to information is not…
-
1
votes1
answer92
viewsA: Dbtreegrid component for Delphixe
The Devexpress suite has the dxDBTreeList. An example can be seen in this link https://www.devexpress.com/Products/VCL/ExQuantumTreeList/…
-
3
votes4
answers16806
viewsA: Copy part of a string
You can use the function Copy combined with the function Pos TextoOriginal := 'Cliente em questão 3: 20392039230902032032'; valorTexto := Copy(TextoOriginal , Pos(':', TextoOriginal) + 1,…
-
1
votes1
answer78
viewsA: Is it advisable to keep a zTable always open?
This has to be seen from 2 sides 1. How often these tables are amended? If they are not updated frequently, it is worth keeping them open, but you should take care that the information is not…
-
1
votes1
answer1122
viewsA: Delphi Consuming Processing
Code Insight has some problems, especially in large projects. To disable enter in Tools > Options > Options Editor > Code Insight and change the delay to None A great alternative that I use…
-
19
votes2
answers4840
viewsA: What are AMD and Commonjs?
AMD It is a javascript API that defines modules so that their dependencies can be loaded asynchronously. It is very useful in improving the performance of websites avoiding the synchronous loading…
-
1
votes1
answer161
viewsA: How to know if the client is already open on another computer?
Researching a little I found this post from Soen from which I draw the following part: User B would be able to see the record, but trying to save would give an error? This would happen if…
-
2
votes1
answer141
viewsA: Testing Viewmodel Knockout with Cucumberjs
This required the use of Requirejs To the page Download Requirejs and place it in the folder along with the other javascript scripts create a main.js or init.js which will be the setting file of the…
-
5
votes1
answer1585
viewsA: What is the difference between Knockoutjs and Angularjs/Emberjs?
Knockout As the Knockoutjs site itself says, it is a library. A set of functions that aims to facilitate the bind between DOM and Viewmodel in javascript. Knockout is a Javascript library that helps…
-
2
votes1
answer136
viewsA: How to set `href` on a link in Knockoutjs?
Just use the Binding attr <a data-bind="attr: { href: url }"> Report </a> <script type="text/javascript"> var viewModel = { url: ko.observable("http://www.google.com/"), };…
-
12
votes3
answers12262
viewsA: What is the difference between architecture and software engineering?
Architecture of Software When it says about the Architecture of Software, it is said about which technologies and the modeling of the software. The role of the architect in a development team (that…
-
15
votes2
answers746
viewsA: What is BDD and its relation to TDD?
TDD TDD is focused on Unitary Test, which means testing each functionality within all its possible variations, to ensure that each part of the whole works as expected. So when creating a class to…
-
1
votes2
answers1125
viewsA: View the side menu in a Form
The problem is that you are using the absolute mouse position in Mouse.CursorPos.X instead of using the parameter X with its relative position. Therefore: procedure TFMainMenu.FormMouseMove(Sender:…
-
5
votes1
answer5666
viewsA: Convert Image String to Bitmap Delphi
What is saved is apparently in Base64. If it is Base64 then you can use these functions (credits David Heffernan in this question in the Soen ) uses System.SysUtils, System.Classes, Vcl.Graphics,…
-
1
votes1
answer105
viewsA: ERROR: using Getjson knockout
Set the object and then perform the get function CarregarProdutos() { var self = this; self.Nome = ko.observable(); self.Quantidade = ko.observable(); self.Valor = ko.observable();…
-
1
votes1
answer1081
viewsA: Doubts creation, manipulation and elimination of form
1. How to ensure the release of the memory form? When creating a form, according to the code below, I need to destroy it somehow when it is finished by the user? F_PesqCli :=…
-
1
votes1
answer501
viewsA: How to create an event, when mouse reaches a certain area of the application
One simple way to do it is to deal with the onMouseMove event procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); const HEIGHT_TITULO_JANELA = 50; begin pnl1.Visible…
-
1
votes1
answer474
viewsA: How to give a EXECUTE IMMEDIATE command on an ORACLE database from a JAVA application?
You should only use the update command update teste set num = 1234 where num = 1 EXECUTE IMMEDIATE is only for executing SQL sentences within function blocks or PL/SQL triggers (see documentation)…
-
6
votes1
answer243
viewsA: Javascript-controlled page layout using REST for dynamic content
MVC or MVP or MVVM (Model-View-Controller / Model-View-Presenter / Model-View-Viewmodel) (The choice depends on what suits you best and what you want to do) This way you split the application rules…
-
4
votes1
answer616
views -
3
votes1
answer438
viewsQ: How to remove events associated with elements via ". on('acao'"
I have a modal from bootstrap I use to register/login cadastroModal, but at the end of the order, I’m repurposing it to request the login and for that I added an event on onHiden, but I can’t remove…
-
1
votes1
answer61
viewsA: Doubt about MYSQL Code + Delphi
delete from tdcupant Where impbox = '+ Quotedstr(impcaixa)+' and dtcompra between :Dini and :dfim It will delete all records that: Have the impcaixa equal to the informed Whose dtCompra is greater…
-
2
votes1
answer141
viewsQ: Testing Viewmodel Knockout with Cucumberjs
I have the definition of Feature as follows: Feature: Shoper can add an item to ShoppingCart Scenario: First item added to ShoppingCart Given I have an Empty ShoppingCart When I add an Item to…
-
3
votes3
answers1277
viewsA: Reading in Delphi XML generated in Excel
This model referred to <ROW NOME="PAMELA" DT_NASCIMENTO="19521002" DT_CADASTRO="20031020" TELEFONE="2548874" CELULAR="93712225" EMAIL="[email protected]"/> is the Clientdataset data schema and…
-
3
votes1
answer1270
viewsA: Print Oleobject ("word.application") with Delphi
The method PrintOut has the following parameters: Var Background: OleVariant; Var Append: OleVariant; Var Range: OleVariant; Var OutputFileName: OleVariant; Var From: OleVariant; Var To_:…
-
4
votes2
answers3311
viewsA: What is the difference between multi-layer and multi-tier applications?
Response brought to the SOEN (https://stackoverflow.com/questions/120438/whats-the-difference-between-layers-and-tiers) Layers are a way to organize your code. Typically, layers include,…
software-architectureanswered Caputo 5,583 -
4
votes1
answer747
viewsA: How to implement a process queue in Delphi 6?
To prevent errors in this type of operation you must control the competition using for example a Critical Section. For this you will need an object of the type TCriticalSection TQueueLog =…
-
5
votes5
answers6102
viewsA: How to create a view in mysql by taking data from 3 tables and repeating the different columns in the result?
Just make the Join between the tables by the field they have in common SELECT T1.id, T1.nome, T1.cnpj, T1.qtd1, T2.qtd2, T3.qtd3 FROM tabela1 T1 INNER JOIN tabela2 T2 on (T1.id = T2.id) INNER JOIN…
-
5
votes1
answer1009
viewsQ: Promises as function return in Node.js
I am using the Sequelize.js. framework to perform queries in the database, the result of the function find returns an object with 3 methods: success, error and complete Ex.:…
-
6
votes2
answers2655
viewsA: Dependencies in the same table
Self relationship When I need to do this kind of Self-regulation I create a field, as in your case, Titularid which, if null, is the holder, otherwise it is the dependent of the referenced holder…
-
0
votes2
answers3658
viewsA: "Connection refused" error when connecting to Postgresql
The Postgres connection url should follow the following template jdbc:postgresql://host:port/database If the port is not specified, it will use the postgres that is 5432 Apparently the given…
-
3
votes1
answer8490
viewsQ: Oracle Relationship Search Query
I have a program to search dependencies of records to proceed with data deletion here in the company. We support some databases but on Oracle the query is processed very slowly (about 10 to 15…
-
2
votes1
answer866
viewsQ: How to make synchronous queries with Sequelize on Node.js
I started to stew Node.js not long ago and I am using the division of logic into modules. I have a UserSessionController validates whether the user session is still valid:…
-
1
votes1
answer4451
viewsA: Do not repeat data when making a SELECT in Mysql
You must use the SUM to sum up the days and the GROUP to bring together the grouped lines SELECT diasplantao.mes, SUM(diasplantao.dias) as dias, funcionarios.id, funcionarios.nome,…
-
6
votes2
answers5023
viewsA: Fill in a Word document from Delphi
One of the easiest ways to integrate Delphi with the Word is through a OleObject, but keep in mind that if on the machine that will run the application, if the Wordnot installed, will generate a…
-
4
votes2
answers888
viewsA: Format date (from a txt file) to Insert to Mysql
To solve this problem the ideal is to use typed parameters because they protect the data from wrong conversions, and protect your code against Sqlinjection, therefore: DModuleGrid.ZQuery2.SQL.Clear;…
-
9
votes3
answers1710
viewsA: What is the role of architecture standards in object orientation?
Definition Starting from the beginning of what they are "Design Standards" (Design Patterns) Design standards are generic solutions to common problems. In fact when you try to define how a problem…
-
10
votes1
answer1520
viewsA: Automatically publish to Twitter from the PHP website
Using the Restapi of Twitter you must perform a POST action on https://api.twitter.com/1.1/statuses/update.json with the following parameters: status required The text of your status update, usually…
-
2
votes1
answer785
viewsA: Optimize database query and compress code
The problem with your code is that for each line of the text file you are loading all the records from the database. I did a refactoring to make it easier to understand and it was like this:…
-
4
votes2
answers142
viewsA: Date Killing in TXT to compare with Database Date
I prefer to protect the data to avoid unexpected exceptions, so I would do so: //Pega a data do arquivo texto dtCompraTxt := copy(lTemp,65,2)+'/'+copy(lTemp,63,2)+'/'+copy(lTemp,58,4); //Tenta…