Posts by Artur_Indio • 1,093 points
46 posts
-
1
votes1
answer46
viewsQ: How not to display levels without values using scale_fill_manual?
This is the data.frame for behavior playback: structure(list(CAATINGA = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,…
-
0
votes1
answer37
viewsA: Removal of automated outilers
Thanks to the user @Ruibarradas who found the source of the function I used 2 years ago, you have in the link in the comment I made several ways to do what you want (in SO En). But at the end of the…
-
1
votes1
answer54
viewsQ: How to find larger increasing or decreasing subsequence in a vector?
I have the following vector: a <- c(1,2,3,1,1,2,3,4,2,5,6,7,8,4,6,4,3,2,1) I would like to find the largest increasing and decreasing subsequence of it. The output would be the indices of the…
-
2
votes1
answer33
viewsQ: How to make a subset in a zoo-type series choosing certain years or months?
I have the following series: library(zoo) zoo_serie <- zoo(1:length(seq.Date(as.Date("1991-12-01"),as.Date("1998-12-31"),'day')),seq.Date(as.Date("1991-12-01"),as.Date("1998-12-31"),'day')) I…
-
2
votes1
answer166
viewsQ: How to add two captions using geom_sf and geom_raster in ggplot?
I have these dice: structure(list(lon = c(-84.375, -84.125, -83.875, -83.625, -83.375, -83.125, -82.875, -82.625, -82.375, -82.125, -81.875, -81.625, -81.375, -81.125, -80.875, -80.625, -80.375,…
-
7
votes1
answer265
viewsQ: make Sankey diagram with two-way links R
I have the following data I use to make the Sankey diagram: list(nodes = structure(list(name = c("1.1.1. Formação Florestal", "1.1.2. Formação Savanica", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
-
2
votes2
answers66
viewsQ: read txt file with less than 5 elements using read.table
I am trying to read the txt file with two columns below: +-----------------------------------------------------------------------------+ | Category Information | square| | #|description | miles|…
-
3
votes1
answer41
viewsQ: create sequence that increases and decreases monotonically
I have the following vector: > a [1] 64.42 66.99 100.39 97.96 97.96 96.26 94.22 92.35 86.05 84.01 I wish that I could generate another vector that grows and decreases monotonically, whatever the…
rasked Artur_Indio 1,093 -
3
votes1
answer719
viewsA: Extract and include SQL data with R
Dude you use the package RODBC, then just make the consultation: #testa se vc tem o pacote, caso não instala list.of.packages <- c("RODBC") new.packages <- list.of.packages[!(list.of.packages…
-
2
votes1
answer78
viewsQ: how to define the input array for RNA training in the rnn package?
In the package rnn there is an example of how to proceed to perform network training, which is described in this link (example 1). In the approach of this package the entries are given in the format…
-
4
votes2
answers62
viewsQ: Merge two series (zoo) of the same variable making the intersection and filling
I have two zoo series like this: to: data valor 01-02-2010 2 01-03-2010 0 01-04-2010 9 b: data valor 01-06-2010 3 01-07-2010 6 01-08-2010 2 I wish a set c this way: c: data valor 01-02-2010 2…
rasked Artur_Indio 1,093 -
1
votes1
answer1834
viewsA: Add elements to an array in Matlab
Follows: maxInteracao = 10; for index = 1 : maxInteracao //stuff erroClassifTeste = 100 * (classificacoesErradas/numTeste); arrayErro [i] = erroClassifTeste; end
matlabanswered Artur_Indio 1,093 -
2
votes1
answer2133
viewsA: Identify what is in the USB port
Follow this example, I have tested it here at Delphi xe6: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls,…
delphianswered Artur_Indio 1,093 -
2
votes1
answer790
viewsA: Package Management in R, how to export and import packages?
Look at a very simple way is to copy the contents of the folder C:\Users\User\Documents\R\win-library\3.2, or in place of 3.2 its version of R and paste into the new computer that has R without the…
-
1
votes3
answers696
viewsQ: Generate RES (stringtable) file from a resourcestring Unit
I’m studying some sources of how to internationalize the software, and in the example I have the software has a Unit with constant strings (captions, etc), something like: unit Resources; interface…
-
3
votes1
answer1080
viewsQ: How to remove all references from deleted acestras forms from the parent form?
I have my generic form and I have several others who have visually inherited its components. When I delete a component in the form father and open a heir get that message: I can click OK and confirm…
-
1
votes1
answer4404
viewsQ: Mysql: Pivot (p rows/ columns) columns with the result of a query dynamically
I have two sets of tables below: 1: 2: I created a query that brings the results of the two tables using Union: Select tbprojeto.projNome As Projeto, tbindp.indPNome As `Tipo(Ind/Idx)`,…
-
5
votes1
answer396
viewsQ: Migration dbExpress to Firedac
I’m migrating a system dbExpress to the Firedac, the system is in three layers (multtier), changed the components on the server side of SQLConnection for FDConnection, and the SQLDataset for…
-
8
votes1
answer789
viewsA: What is SOAP technology?
As mentioned above, there are other ways to do what you need using REST servers, an advantage of REST is that client layers can be developed in any programming language that has JSON support…
-
1
votes1
answer765
viewsQ: How to import data (Inserts) to a model (.MWB) in the Workbench?
In Workbench I can enter data in the model individually by table as below, then when using the forward Engineer just enable Create Inserts in the SQL file it generates, follows: But to do this for…
-
0
votes0
answers385
viewsQ: How to display two columns in a result of a lookup field?
I’m trying to show not just a result (LookupResultField) for a lookup field (FieldKind, fkLookup), but yes two, I tried to put the result fields separated by point and comma, but it did not work,…
-
2
votes1
answer87
viewsA: Ramdrive with video card ram
Yes there is this possibility in R, Alis parallel computing comes from the beginnings in R, just take a look at the section of High-Performance and Parallel Computing with R in the CRAN, such the…
-
1
votes2
answers2827
viewsA: How to know if there is a line selected in Dbgrid?
Eventually I discovered that in this case we should work with grid, would then be: DBGDados.Columns.Grid.Focused
-
0
votes2
answers2827
viewsQ: How to know if there is a line selected in Dbgrid?
How can I know if there is a selected line in my Dbgrid. In this case below: The pointer is selected in the dataset, but I wanted to know when the grid is this way: In this case it would be only if…
-
1
votes1
answer901
viewsQ: Function for popular Ttreeview only adds Childs to the first Node
I created this procedure to popular a treeview: procedure TFrmGerProfDock.Button1Click(Sender: TObject); Var Tables: TTreeNode; I: Integer; begin for I := 0 to ds.DataSet.FieldCount - 1 do begin…
-
3
votes1
answer336
viewsQ: Mount SQL to generate a dataset and popular a Treeview
I have a database here and I want to mount an SQL to generate a dataset in Delphi and then popular a Treeview. The figure below shows part of the seat, but that is the general structure of it:…
-
3
votes3
answers2208
viewsA: Create database on server via mysql-Workbench (.mwb) template via command line
So after a lot of research I was able to do the bat, really the script to be used was in python, I had to learn some python. I know I can’t answer my own response that I’m rewarded, but since I…
-
1
votes2
answers1947
viewsA: How to use function return in Scilab or Matlab?
Matlab functions can have a single output or multiple. A single output: function y = media(x) if ~isvector(x) %testa se é um vetor error('A entrada tem que ser um vetor') end y = sum(x)/length(x);…
-
1
votes0
answers318
viewsQ: Html5 enable geolocation in Tchromium in Delphi
I use the Chromium component in my Delphi projects to navigate html pages but it does not show any interaction when the user tries to access page requesting geolocation access, as I do to enable…
-
8
votes3
answers2208
viewsQ: Create database on server via mysql-Workbench (.mwb) template via command line
I am trying to assemble a bat to create the database in the mysql server from an EER (.mwb) mysql-Workbench model, that is, in the command line, is it possible to perform this process? Someone could…
-
5
votes2
answers12986
viewsA: how to import data in excel format to Matlab
Have you tried using xlsread? xlsread(nome do arquivo,pasta,intervalo) Example: % Criar um arquivo do excel chamado Exemplo.xlsx. values = {1, 2, 3 ; 4, 5, 'x' ; 7, 8, 9}; headers =…
matlabanswered Artur_Indio 1,093 -
4
votes1
answer1552
viewsQ: Create database via existing command line and overwrite
I have a Function (Delphi) that creates processes and executes BAT files that make, for example, backup a Mysql BD, like this: "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root…
-
1
votes2
answers1650
viewsQ: Show hint when component receives focus
How do I show the hint of a Tedit when it receives focus, without the mouse being on top of it? I didn’t put code because I don’t have a clue.
delphiasked Artur_Indio 1,093 -
4
votes1
answer3305
viewsQ: Creating bat at runtime and process in Delphi
I have two functions that create a file bat and runs it, but I’m just not getting to create the process (CreateProcess returns False) and I can’t identify the error. I use Windows 7, 64 bit. I must…
-
1
votes2
answers1775
viewsQ: batch file to create mysql database
I’m trying to create a batch file. bat to create the database and then recover formations via sql file, follows file procedure . bat: @echo off cls @echo. @echo Instalando DB cd C:\Program…
mysqlasked Artur_Indio 1,093 -
0
votes1
answer1191
viewsQ: Sort a double array (array) based on the chosen column
I have a multidimensional matrix in Delphi with 3 lines and 2 columns, I wanted a way to sort (Sort) it based on a column, follow the example: procedure; var Matriz: array of array of Double; begin…
-
3
votes0
answers162
viewsQ: Add horizontal line in a Dbchart for a defined value of the y-axis
I have a chart DBChart with a series of values float on the axis y and datetime in the x. I wanted to add a horizontal line according to a defined axis value y. The DBChart has the function to add…
-
1
votes2
answers3208
viewsA: Adjust data to exponential model in R
Your question lacks some explanations, but in a basic way you can do so in R: x<- c(1,2,3,4,5) y<- c(0.5,0.8,0.10,0.12,0.16) cbind(x,y) n<-length(x) cbind(x,log(y),x*log(y),x^2)…
ranswered Artur_Indio 1,093 -
0
votes3
answers1398
viewsA: in R, create a vector rounding function so that the coordinates vanish 100
Have a look at the functions floor and ceiling? I already needed it that you’re behind I’d do something like that: > v<- c(32.5 , 43.2 , 24.1) > v [1] 32.5 43.2 24.1 > sum(v) [1] 99.8…
ranswered Artur_Indio 1,093 -
2
votes1
answer1108
viewsA: How to create color palette in MATLAB?
As was commented on in your question, it would be good if you had tried something, or had brought options, that there are several. There are some tips for you to develop your work, anything you…
-
2
votes1
answer1215
viewsQ: Edit records of a field clientdataset from a Join
I have a simple example, but in three layers, with sqldataset + datasetprovider + clientdataset. I do not load any field in sqldataset. In datasetprovider I leave the updatemode in upwherekeyonly.…
-
4
votes2
answers1941
viewsA: Word cloud in R
I wanted to comment but can not yet, you need the vector with the words in text format what appears if you do this class(capa)? This is the way I do: texto = readLines("cloud.txt", encoding =…
ranswered Artur_Indio 1,093 -
3
votes1
answer117
viewsQ: Automating Inner Join using Lookupcombobox component
Sometimes I use the Tdblookupcombobox component to bring a list of a dataset lookup field, this approach streamlines some things but is very limited. For example I have a list of stores in one…
-
2
votes1
answer605
viewsQ: Filter dbgrid with lookup fields
I made a generic search form for my application, but now I realized that I can’t filter the dataset using lookup fields, is there an alternative to not using a query? A component that can do this…
-
1
votes1
answer1306
viewsQ: Correct way to record multiple records at once dbgrid and clientdataset
I have to record several records at once in the database, I’m using it in the form below, however I think giving applyupdate to each interaction is not the right way. There is another way? procedure…
-
2
votes1
answer204
viewsQ: Is it possible to work with spatial object attribute tables in Delphi and dbExpress?
I have a spatial database in Mysql where the geometry and attributes of space objects are stored. I tried to create a basic form, as basic as possible using Sqlconnection, Provider, Dataset,…