Posts by Celso Marigo Jr • 2,774 points
106 posts
-
0
votes2
answers1567
viewsA: Angular 9 - mat-form-field must contain a Matformfieldcontrol
You need to import the module: MatFormFieldModule, in accordance with documentation quote. import {MatFormFieldModule} from '@angular/material/form-field'; Check if your component is declared in the…
-
1
votes2
answers120
viewsA: How to do page re-load with angular according to queryparms
The ngOnChanges is triggered when a value of @Input() changes within the component do not trigger this event. You can test another alternative, rather than trigger the route. Use a BehaviorSubject…
-
0
votes2
answers336
viewsA: Show Page from Springboot at angle 6 using Angular Material Data Table
The lines you want to show are on content of the answer object. You need to read this correctly. I suggest that you create a class from the JSON of the answer, of JSON all because you will need it…
-
6
votes4
answers4308
viewsA: Load component only after finishing HTTP requests
In my opinion, you have two options, if you want to load the server data before showing the components, you can use the Router Resolve, which ensures data loading before loading the component. The…
-
2
votes1
answer417
viewsA: Maintain application status at Angular 7
You can use the localStorage or sessionStorage to keep the data in the user’s browser. Obviously the data will only be available in that browser. Writing and reading is quite simple: // Armazenar…
-
1
votes2
answers68
viewsA: doubts regarding a dynamic select
You need to do something like below, extracted from SO-en: SELECT *, @TOTAL := @TOTAL + quantidade AS total FROM tabela1, (SELECT @TOTAL := 0) t WHERE @TOTAL <= 8000 But note that the above query…
-
1
votes2
answers119
viewsA: ngOnInit does not save value of the variable returned by a function
This is because Javascript, Typescript in this case eh asynchronous. Then in the function below: ngOnInit() { console.log('Edit site component ----------'); this.fields = this.getCampos(this._id);…
angularanswered Celso Marigo Jr 2,774 -
0
votes1
answer1389
viewsA: Javascript validation with jQuery Mask
Here it worked, so: <!Doctype html> <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script…
-
0
votes1
answer159
viewsA: (JS) Disappear with a form Ubmit button after clicked
So, there in the code above, when the form was submitted I added a name for the option that was selected in the act. But I failed because every time you refresh on the page some name This does not…
javascriptanswered Celso Marigo Jr 2,774 -
0
votes1
answer535
viewsA: Angular 6 - Comparison of values
If you will display only one at a time, it may make more sense to "calculate" what will be displayed in the code and show with a function: TS: function nomePerfil(perfil: number) : string { switch…
-
0
votes3
answers92
viewsA: PHP variable in Javascript
It seems that the variable $fracasso exists only within the while, try: <?PHP var $fracasso = ''; $consulta = mysql_query("SELECT MODELO FROM celular_banco");…
-
4
votes2
answers8439
viewsA: How does the Grid System work in Angular Material Design?
You can use the Material Grid List, to make a column layout responsive in conjunction with the Angular Flex Layout, but you’ll need a little code. TL;DR; Go to the link more detailed than the…
-
2
votes1
answer103
viewsA: When I give a post in the form I get this error: Typeerror: _co.postCreateTypeFields is not a Function
The function exists in the context of CreateTypeFieldsService, not in class CreateTypeFieldsComponent. A way to call directly would be: _createTypeService.postCreateTypeFields. But I think it would…
-
1
votes1
answer770
viewsA: How to clear the contents of a variable within a JQUERY function?
A suggestion, would put a SPAN, and set the value, date, inside it, becomes simpler the code, as long as the sentence does not change. It is as below: <div id="mostraData"> <p…
-
1
votes2
answers1539
viewsA: How to add Jquery to a wordpress page?
Try to change the $ for jQuery for example jQuery(document) as suggested by @Marcelo Bonifazio. In some cases, it may be necessary to load the script as below, this can be done using a template page…
-
8
votes1
answer109
viewsA: Why set a 0 or 1 output at the end of a program?
These are the so-called Return Codes, which became popular on Windows as ERRORLEVEL which is the name of the environment variable that receives its value when running an application. I believe the…
operating-systemanswered Celso Marigo Jr 2,774 -
1
votes1
answer59
viewsA: Failed to restart Firebird by PHP
The simplest way to run a script the way you need is by using visudo. But see this is just one way, I suggest you better understand the working of permissions on Linux, and the use of visudo…
-
1
votes1
answer754
viewsQ: Wordpress use ajax on page template
Based on the topic below: http://tableless.com.br/requisicoes-ajax-no-wordpress/ I made a code to run using ajax in my WP project, the detail is that this code is in an external site area. For this…
-
1
votes2
answers397
viewsA: Sort according to database | PHP
PHP code, I don’t understand what you mean by PHP pure, use the mysqli: $sql = "SELECT coe_class, coe_class1, coe_class2, coe_titulo FROM TESTE ORDER BY coe_class,coe_class1,coe_class2;" or…
-
2
votes1
answer848
viewsA: Help in positioning the aside
Edit your CSS: #asideesquerda { float: left; // Adicione esta linha margin-top: 20px; } .conteudo { display: inline-block; // Adicione esta linha... Source:…
-
2
votes2
answers263
viewsA: Disable editing of Firedac dataset without generating an exception
You can try to leave your DBGrid as ReadOnly, see if this property exists in your Delphi. Which Delphi is using? Maybe that’ll fix it: With DBGrid1 .AllowAddNew = False .AllowDelete = False…
-
3
votes1
answer414
viewsA: Onclik on the dbgrid line
In the form of DBGrid, create a procedure: procedure DBGridClick(Sender: TObject); Implement Procedure, doing whatever you want. Call the other form, etc: procedure TForm1.DBGridClick(Sender:…
-
2
votes1
answer138
viewsA: Change Tomcat Settings in Amazon Elasticbeanstalk
You can replace the settings as follows: Create a directory within your webapp, and paste your server.xml. After that, create an xml: server-update.config, with the code below: container_commands:…
-
1
votes1
answer171
viewsA: Exchanging values between functions with Javascript
There are some problems with your code... The code below shows on the console the output: 1,test <!DOCTYPE html> <html> <head> <script…
javascriptanswered Celso Marigo Jr 2,774 -
2
votes2
answers531
viewsA: how to call stored Procedure with Linq
Create the Stored Procedure in your database. CREATE PROCEDURE BuscaCliente @nome varchar(255) AS BEGIN SELECT * from Cliente where nome = @nome END In Visual Studio add a file of type LINQ to SQL,…
-
4
votes2
answers179
viewsA: Function that generates file
function download(filename, nome, email) { var element = document.createElement('a') element['href'] = 'data:text/plain;charset=utf-8,' + encodeURIComponent(nome + '\n' + email) element['download']…
-
0
votes1
answer360
viewsA: Help to change values with onchange
The name of the functions in the select mount is different from the function you declared in Javascript. A safer way to create a listener for an object is: var select =…
-
1
votes3
answers676
viewsA: Datatables highlight line with higher percentage
You can make a code javascript to solve the problem: // Instanciando a tabela $(document).ready(function() { var tabela = $('#exemplo').DataTable( { "order": [[ 5, "desc" ]] // Esta linha apenas…
-
1
votes1
answer47
viewsA: Onclick point to function with $_SERVER
You are trying to access a context variable from PHP, server, on client side, javascript. Try something like that: document.getElementById('LIMPAR').onclick = function() { var ip = '<?php echo…
-
0
votes1
answer70
viewsA: Project in Android studio does not run for lack of libs
Android Studio projects use Gradle to build. See the file build.gradle there is the statement for it to use the libs folder jars as dependency. Usually as below: dependencies { compile fileTree(dir:…
-
0
votes2
answers443
viewsA: What happens when we assign a float value to a double variable?
Turns out the variables have different sizes: Float Represents numbers in standard floating point notation in simple precision of 32 bits in accordance with IEEE 754-1985. The lowest repressable…
javaanswered Celso Marigo Jr 2,774 -
0
votes1
answer478
viewsQ: Use wordpress login on another site
Today I have a site made in Joomla, where the user logs in, and if he is in a certain group, can access a restricted area, php site developed internally. This site is in a directory on the same…
-
4
votes3
answers1514
viewsA: Search between dates with between
Another option would be to use a CAST for DATE SELECT * FROM (`agendamentos`) WHERE CAST(age_data_agendado_para as DATE) BETWEEN "2016-08-28" and "2016-08-30"…
sqlanswered Celso Marigo Jr 2,774 -
3
votes2
answers649
viewsA: Delete files created more than 10 days ago, saving the latest if everyone from the list has more than 10 days of creation
One option is to sort the list of files using the comparator: import org.apache.commons.io.comparator.LastModifiedFileComparator; The function below sorts the array, ai you can delete from the…
-
1
votes2
answers446
viewsA: Java Spring Extender @Scheduled to read a file
You can parameterize the Spring Annotation, it is a little different the parameter: //fixedDelay task: @Scheduled(fixedDelayString = "${fixedDelay.in.milliseconds}") //fixedRate task:…
-
1
votes1
answer75
viewsA: How to check form fields correctly
In this case if the first check fails you are doing the Exit(). On your test you scored him? If you want all error messages at the same time modify your code for something like this: //…
phpanswered Celso Marigo Jr 2,774 -
0
votes2
answers207
viewsA: Error when instantiating two or more PDO in different classes
From what I understand of your code you’re trying to make a connection class using the default Singleton. I think the way is this. A connection class in the Singleton pattern would look like this:…
-
3
votes3
answers386
viewsA: Use of the split method
You can do something simpler. Use the method String.IndexOf, it returns the position of String desired in another String, and when not found returns -1. Boolean existe =…
-
4
votes5
answers7434
viewsA: removing part of a string with php
You can use the explode to split the string by the bars and take the last position that is the Count of the array: $url_parts = explode("/", "https://www.youtube.com/embed/z1n34sRv1-A"); echo…
phpanswered Celso Marigo Jr 2,774 -
0
votes2
answers351
viewsA: Error returning Android Cursor
Failed to move cursor to first item, as you did with cursor2. cursor1.moveToFirst()
-
1
votes2
answers703
viewsA: How to return the entity number of a table using JPA and the COUNT function?
Try it like this: "SELECT COUNT(e) FROM Empregados e" Source: http://www.java2s.com/Tutorials/Java/JPA/4510__JPA_Query_COUNT.htm…
-
1
votes2
answers66
viewsA: SWIFT - How to feed a Tableview with information from a Nsarray?
The code seems correct. Maybe just force the type, using a cast. Do so: var temp: NSString = nomes[indexPath.row].objectForKey("nome") as NSString cell.textlabe.text = temp If you make a mistake,…
-
0
votes2
answers77
viewsA: Problems with prepareDesign method
In the stretch below: if let parseJSON = myJSON { // Now we can access value of First Name by its key let idretorno = parseJSON["retorno"] as? String //faz a chamada da view voltando para a main…
-
0
votes1
answer365
viewsA: How to read properties file to configure JPA?
Try it like this: InputStream is = null; Properties p = new Properties(); is = EntityManagerProducer.class.getClassLoader().getResourceAsStream('conexao.properties'); p.load(is); Source:…
-
3
votes2
answers2187
viewsA: Copy directory from one ssh server to another
1 - Create the keys as already reported in the comments. Use the commands below: ssh-keygen Answer the questions, you can type for all 2- Copy key to target host ssh-copy-id host_ou_ip_destino If…
-
4
votes2
answers406
viewsA: Memory consumption in java
The problem is that your application never stops. The suggestion given by Renan is the best. But, the problem of memory consumption can be solved with a sleep. //Pausa por 10 segundos, por exemplo…
-
0
votes1
answer83
viewsA: How to pass an array value in bind_param in mysqli?
If the solution proposed in the comment by rray does not help, you may consider using a framework. Recommend, use, the Pixie. Below is an example of SELECT: $query =…
-
0
votes2
answers732
viewsA: Retrieve via Jquery custom "date" attribute value
I get attribute values by naming them in HTML in the ID property: //JSP <select name="tipoTk" id="tipoTk" tp="select"> // Script tipoTk = $("#tipoTk").val(); $.ajax({ type: "get", data:…
-
0
votes1
answer170
viewsA: Error running Trigger mysql
Turns out you set a Trigger for the table tabela_atendimento where Trigger is fired in the UPDATE event, correct!? But in your Rigger you’re trying to update the same table, you’re trying to call…
-
0
votes3
answers4250
viewsA: How popular google line chart Charts with JSON
Something like that: <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript">…