Posts by WitnessTruth • 1,017 points
57 posts
-
-2
votes1
answer34
viewsQ: Angular - Custom Matform Validator does not work
I have the following code in the constructor of my component: this.form = new FormGroup({ id_periodo_ini: new FormControl(undefined), id_periodo_fim: new FormControl(undefined) }) In the…
angularasked WitnessTruth 1,017 -
0
votes0
answers39
viewsQ: C# - Comparison of date with LINQ does not bring the expected result
We have an Oracle database with a View. We have to take the total harvested cane by adding the column QT_LIQUIDO according to the day. We made the code in C#, but it is with an unexpected behavior.…
-
0
votes1
answer111
viewsA: Number(3.0) field in Oracle database for Java
I managed to solve. In question I did not put the other fields you have in the class so the question does not get too long. But this class had other fields of type Short and Byte. I changed EVERYONE…
-
0
votes1
answer111
viewsQ: Number(3.0) field in Oracle database for Java
I have a table in an Oracle 11g database with a field of type NUMBER(3,0) In a Spring project, I own the following: @Repository public interface TipoPropriRepository extends…
-
3
votes6
answers73010
viewsA: I installed XAMPP but can’t start apache, Error: Apache shutdown unexpectedly
It is not always port problem. In my case, it was another problem: Root directory not found. I found out by opening the Xampp -> Shell (below the "Netstat" button) and I’ve turned the command…
-
0
votes1
answer847
viewsQ: Java - Query Spring with current date
I have the following repository with the following method @Query("SELECT m FROM Money m WHERE m.data = CURRENT_DATE()") Money findTop1IfHasMoneyInCurrentDate(); My money class is like this: @Entity…
-
1
votes2
answers418
viewsQ: Spring - @Autowire a List with elements
I have a controller that has this @Autowired: @Autowired Rules rules; This Rules class is defined as follows:: @Service public class Rules { @Autowired private List<RegistrationRule> allRules;…
-
2
votes1
answer664
viewsA: Weather API - Cities with accent give error
I decided to ENCODE the City name that I receive via get BEFORE sending to Endpoint Climatempo. Getting this way: //Encode the nomeCidade to send to the ClimaTempo Endpoint //(This must be done…
-
2
votes1
answer159
viewsA: Java Spring - Null returns repository
I don’t know why, but it only solved when I passed the code to the Climatempocontroller class. Climatempocontroller.java: @RestController @RequestMapping("/cockpit") @CrossOrigin(origins="*",…
-
2
votes1
answer159
viewsQ: Java Spring - Null returns repository
This is my Apikey class: @Entity @Table(name="API_KEYS", schema="DEMO_PIMS") @JsonIgnoreProperties(allowGetters=true) public class ApiKey implements Serializable{ private static final long…
-
4
votes1
answer664
viewsQ: Weather API - Cities with accent give error
I have the following Endpoint in which you receive in the URI the name of the city and the state: @RequestMapping(value= "/clima/{nomeCidade}/{ufCidade}/agora", method = {RequestMethod.GET,…
-
0
votes2
answers3743
viewsA: Java - Taking the value of a specific JSON element
I was able to solve it this way: JsonObject JSONResult = getExchangesRate(); JsonObject rates = JSONResult.getAsJsonObject("rates"); Double ValorUSD = 1 / rates.get("USD").getAsDouble(); Double…
-
0
votes2
answers3743
viewsQ: Java - Taking the value of a specific JSON element
I am using the exchangerate API (https://www.exchangerate-api.com) to pick up the currency quotes of the day. Using the code below I get a Jsonobject containing the "rates": private JsonObject…
-
1
votes1
answer252
viewsQ: Java - What to do when JSON can come in Double and Long?
I am using a Climatempo API. When I get the weather data of a city via JSON I get the temperature as follows: clima.setTemperatura((Long) dataNode.get("temperature")) However, in the API…
-
2
votes1
answer51
viewsQ: C# - Name of the instance property in a Datagridview
I have a class Produtos with the following attributes: public class Produto { public int cod { get; set; } public string codBarras { get; set; } public string nome { get; set; } public Categoria…
-
2
votes2
answers418
viewsA: Android - Scratch text on a Listview
What I did to scratch the text on Listview was the following: Instead of creating String type Arraylist I switched to Spannablearraylist: private ArrayAdapter<SpannableString> itensAdaptador;…
-
1
votes2
answers418
viewsQ: Android - Scratch text on a Listview
I created an application of tasks to be done that are presented in a Listview. I am using Sqlite with a table with the columns: ID, task, completed. I want that when I go through the records, if the…
-
0
votes1
answer36
viewsQ: C# - High memory consumption when calling method
I am working with a Main Form and it has several Panels. In one of them, the "Geral panel" I use to call the instances of new forms and show in it using the following code of the Formcall class:…
-
1
votes1
answer29
viewsQ: C# - Add Mousehover to each Button in a Flowlayout
How do I add a Mousehover event to each existing button in a Flowlayoutpanel? I want that when you hover the mouse on each button in this Panel the mouse pointer changes to "Hand" and that the…
-
0
votes0
answers152
viewsQ: Fancybox - Update Parent after close
I am using an iframe Fancybox where when the user confirms a question I want to update the content of the original page after success in an ajax: $.ajax({ type: 'POST', url: 'excluir_foto2.asp',…
-
0
votes1
answer28
viewsA: Improve image quality - Upload Facebook API
The answer I found was to decrease the JPEG quality while uploading the image to my server before creating the Facebook post using the Wideimage class for PHP with the following code: //Classe para…
-
0
votes1
answer28
viewsQ: Improve image quality - Upload Facebook API
I’m performing the creation of a Facebook post with a photo with the following code: FB.api( '/me/photos', 'POST', {"url": imagem,"message": texto_publicaco}, function(response) { alert("Postagem…
-
2
votes1
answer77
viewsQ: How to use Jquery UI with Jquery 3.1
I’m using the Jquery UI 1.12 with the Jquery 3.1.1 and using the functions draggable and resizable. However, always when I test it does not work because it gives the exception…
-
1
votes1
answer291
viewsQ: Jquery - Select and deselect elements on the page
I have a screen with several Ivs that are draggable. However, I need that when the user clicks on them, it creates an edge around it and adds some options (delete, for example). But I want that when…
-
1
votes1
answer149
viewsQ: API to grab image from a search engine
I will have to add a function on the site I am working on that the user will search by image name in some web search engine (this may be Google, Yahoo, Bing and so on) and the images found will be…
apiasked WitnessTruth 1,017 -
1
votes3
answers842
viewsQ: Disable and maintain click
I got three columns in one of these <td align="center" height="240" width="380" > <img src="imagens/modelo3_thumbnail.png" alt="" class="imagemModelo"> </td> In my JS, I want that…
-
2
votes1
answer591
viewsA: Facebook Logout - How to Deploy the Facebook Person
I found the solution, and this is it. I added this code to the.fbAsyncInit window: FB.Event.subscribe("auth.logout", function(){ window.location = '[sua tela de login aqui]' }); And the Quit…
-
3
votes1
answer591
viewsQ: Facebook Logout - How to Deploy the Facebook Person
The login part is OK. I had to add a "You are not x? Click here to login with another account" which calls the following function: function deslogarFacebook(){ FB.logout(function (response){…
-
0
votes2
answers46
viewsQ: Doubt about where to put the JS script
I’m fiddling with a panel of a website that has two JS functions at the bottom of the page that will only be used on a page that will open in a modal. On this site there is also a file dedicated…
-
0
votes1
answer73
viewsQ: Doubt web.config
I need you not to show the actual physical address on a link to download a file on my site. The file link I want it to look like this: [Urlsite]/downloads/filename. And I’m trying to use the…
-
3
votes3
answers85
viewsQ: Jquery ischecked does not work
I have the following checkbox: <input type="checkbox" name="responderam" id="responderam" value="1" onchange="Filtra()" /> Mostrar apenas quem respondeu And the function it calls will update…
jqueryasked WitnessTruth 1,017 -
0
votes2
answers2085
viewsQ: Fix Double Click Buttons with Jquery
I am performing maintenance on a site with multiple forms with buttons of type SUBMIT and also normal buttons that call an onclick event that in FORMS is used to perform the validation of the data…
-
0
votes0
answers173
viewsQ: Best Way to Store Varchar(MAX)
I’m working on an EAD project where I work. There will be simulations with many questions and their respective answers. These questions and some answers are usually quite large and I am storing them…
-
1
votes2
answers859
viewsQ: Chart.JS does not appear in the modal bootstrap!
I want to show statistics on what percentages of each answer given in a question from a survey I’m projecting here. I studied and saw several tutorials on how to use Charts.JS. It usually works if I…
modalasked WitnessTruth 1,017 -
0
votes1
answer164
viewsQ: Why use dice type and not just use Varchar?
I am manipulating some databases in which the vast majority of columns are with the data type VARCHAR for fields such as Date, Price, Total Value, Birth, Date/Time and etc. Briefly, practically…
-
8
votes3
answers948
viewsQ: What makes a JOIN bad in a database?
Where I currently work I had to make some queries in the database to generate a report or take emails from students who did not do remakes in other courses. However, I was given the idea of making…
-
0
votes1
answer402
viewsQ: Mysql - Update column with Brazilian date value
I am updating a table in a bank with more than 100 thousand records to be able to perform future SELECTS to generate a statistical report. The table currently has a 'Birth' column of type…
-
0
votes1
answer51
viewsQ: Create Actionfilter for "Anonymous" login
I looked it up online, but I couldn’t find the answer to what I wanted. I have the simple code below that checks if the user is authenticated or not in my Actionfilter public class FiltroLogin :…
-
1
votes1
answer51
viewsQ: Doubt about data type database
See this table of INT data types in SQL SERVER: tinyint | 0 a 255 | 1 byte smallint |-2^15 (-32.768) a 2^15-1 (32.767) | 2 bytes int |-2^31 (-2.147.483.648) a 2^31-1 (2.147.483.647) | 4 bytes About…
-
3
votes2
answers154
viewsQ: Find out if particular control is a button
I have the following code that serves to change the color of the buttons that are in a panel: private void mudaCorBotao(Button bt) { foreach(Control b in Panel_esq.Controls) { if (/*[O que devo…
-
1
votes2
answers939
viewsQ: Android - Invalid Resource Directory Name
I tried everything searching the internet, saw various responses about giving Clean Project, rename, update IDE and nothing worked. Still giving the following problem: I just want to better organize…
-
2
votes1
answer180
viewsQ: Does Tempdata lose property when using Response.Redirect?
I have the following code on the pages that, to be accessed, it is necessary to log in: if (Session["Login"] == null) { TempData["msg"] = "É necessário realizar o login para acessar esta página!";…
-
1
votes2
answers1601
viewsQ: Use more than one template in View - C# MVC
I have two tables in my bank: Celular and Marca. To register a mobile phone, I need to select a brand for it, ie two models in a view. Like I do to make two Models are accessed in the same view?…
-
6
votes3
answers2361
viewsQ: High consumption of RAM
My Visual Studio 2015 when I use to debug a WEB C# MVC project has the following RAM consumption: Is this consumption normal? My computer gets very slow when I have to test some modification on a…
-
1
votes1
answer637
viewsQ: Changing values in Modal - C# MVC Javascript
I have the following javascript code in my project that picks up attribute values when the user clicks the class button rename and calls a modal: <script type="text/javascript">…
-
0
votes1
answer936
viewsQ: Link calling method in Controller - C# MVC
I have a Mysql table that is shown on a page of my project: foreach (var item in Model) { <tr> <td>@Html.DisplayFor(modelItem => item.id)</td>…
-
3
votes2
answers319
viewsQ: Foreach with PHP Stdclass
My page shows posts that have been registered in the database. Some posts have files that have been uploaded. These files are saved in server folders and the database has the table "Archive" with…
-
0
votes1
answer795
viewsQ: Upload PHP does not work
Good afternoon, I’m trying to make the file upload function via PHP using the code below: if(isset($_FILES['arquivo'])) { $diretorio = "D:/wamp64/www/revi/arquivos/postagens/".$postagem;…
-
0
votes0
answers82
viewsQ: Can’t find Controller’s method
I was testing some features on the project site that I am doing in MVC, but it has a function that is not working anymore. When accessing the site it says: "Method App Http Controllers…
-
2
votes1
answer506
viewsQ: Bootstrap - Jquery error
I’m trying to make some javascript confections in my project that also uses bootstrap and I need to see the log. However, even using the code provided on the bootstrap website itself, I am getting…