Posts by Tobias Mesquita • 22,900 points
750 posts
-
1
votes2
answers353
viewsA: Div block of size proportional to itself
friend, you can use a Rick, using proportional font sizes. HTML <div id="container"> <div class="font-normal"> Auto </div> </div> CSS #container { font-size: 200px; width:…
-
4
votes1
answer128
viewsA: Problems with Width
I’ll tell you what, see if he gets it: JSFIDDLE HTML <div id="imagem"></div> <div id="header"></div> <div id="content"></div> CSS #imagem { background-color: red;…
-
2
votes3
answers11171
viewsA: Add jquery "loading" effect
You can use the plugin Blockui for this. jQuery(document).ready(function(){ jQuery('#ajax_form').submit(function(){ var dados = jQuery( this ).serialize(); $.blockUI(); //Bloquear UI jQuery.ajax({…
-
2
votes3
answers4561
viewsA: Validate Datetime on the client
@Rod, your problem here is not validation of Type DateTime, but the range allowed by the type DateTime in the SqlServer. To resolve this issue, you can change the column type in Sqlserver to…
-
1
votes2
answers1419
viewsA: Attach file . js inside other . js
@Wiliamxavier, follows an example below. In it I have a Modal that when opened is filled with an HTML content generated from a template. After it is attached to the Modal I initialize the input…
-
1
votes3
answers6238
viewsA: How to change an item in a json
you can add an object to the array with the method push var lista = [{ id: 1, total: 50.00 }, { id: 2, total: 70.00 }]; lista.push({ id: 3, total: 50.00 }); but if you want to access the array…
-
5
votes4
answers4198
viewsA: How to save and upload data from a . txt to a gridview?
I agree with @Luisalexandrerodrigues that the best would be to save in a database and data, and Sqlite EF6 would be perfect for this kind of thing. but I will consider that there is a need to save…
-
1
votes1
answer154
viewsA: How not to leave buttons to like and share below the product image?
I see you have three Ivs <div class="three-fourths"><!--Imagem--></div> <div class="one-fourth-pers column-last"><!--Descrição--></div> <div class="fb-like…
cssanswered Tobias Mesquita 22,900 -
0
votes1
answer101
viewsA: Doubt about Entity Modeling
@Samuelgomes, is correct yes. These properties are what we call Propriedades de Navegação, they allow us to quickly access another Entity that is connected to it. For example, In the Entity…
-
1
votes1
answer4196
viewsA: How to save a PDF file to SQL Server 2008 using C#
You can even do it and I will teach how, but I would like to warn you that this is not a good practice, the best to be done is to save this file in the Server (encrypted preference) and save only…
c#answered Tobias Mesquita 22,900 -
7
votes2
answers7699
viewsA: How to move one element to the position of the other with Jquery?
I decided to do the following: One div Draggable, You can move it freely across the screen. Several div forming a Grid, for this example I put them at the bottom of the page. When passing the mouse…
-
1
votes2
answers1155
viewsA: Two actions in the same View
Your View is using a Model kind PortalRH.DomainModel.Entities.Usuario, however its PartialView is expecting a Model kind PortalRH.DomainModel.Entities.Divergente. As you did not specify the Model to…
asp.net-mvcanswered Tobias Mesquita 22,900 -
1
votes1
answer201
viewsA: Ajax and link how to make a:visited work when using ajax
Unfortunately I don’t think it is possible, as :visited will only work for the sites that are present in the browser history. But you can still add a class to the visited links. If your browser…
-
1
votes1
answer48
viewsA: Convert Dictionary to Array
In this case I believe it’s best to use one JsonResult to return JSON instead of HTML. Remembering that Dictionary<T, X> cannot be serialized using the method Json(). Model using System; using…
-
1
votes1
answer1844
viewsA: How to insert a Client with HTML5 javascript
Below is one of the ways to do it: P.S.: Don’t worry about the HTML itself, because I decided to apply one layout Responsible, the important thing is Javascript JAVASCRIPT var clientes = []; var…
-
1
votes2
answers643
viewsA: Using the callback of a function
The $.post method is asynchronous, so it will run after sending the form, so you will have to do a synchronous execution, so you will need to use $.ajax with async = false. var onSucess=…
-
1
votes1
answer2827
viewsA: Consume Webservice WSDL
Note: This is not an answer, but a detailed analysis of the request. I just tested this web-service. To do so I added the same through a Web Reference and I called it as follows: var token =…
-
1
votes3
answers461
viewsA: Make a cascaded Else inside a for
I tried to rewrite your is so that it becomes more legible, I could check if the logic is correct? for (int i = 0; i < vlstDados.Count; i++) { var isObrigatorio = vlstDados[i].IcObrigatorio == 1;…
c#answered Tobias Mesquita 22,900 -
5
votes5
answers14567
viewsA: How to access index from a javascript array
you can check the keys using a conventional for. Follow an example: var array = { 0: 'Oh', 36: 'Oh', 37: 'Oh', 97: 'Oh', 98: 'Oh', 99: 'Oh', 100: 'Oh', 101: 'Oh' } for (var key in array) {…
-
1
votes2
answers297
viewsA: Delete a data list in the EF
If you want to delete all versions of a file, then it is interesting to have the file as a method parameter. internal void ApagarVersoes(Model.Arquivo arquivo) As for the method, if you are using…
-
0
votes1
answer1168
viewsA: Password encryption in login
Each of these algorithms has a different purpose, so to protect the password it is interesting to use them at different times. For example, to protect the password from a man-in-the-Middle attack,…
-
2
votes2
answers7339
viewsA: How to make button stick with another color when being clicked and selected
you can do it this way: HTML <fieldset> <legend>Item 1</legend> <div class="tab" data-tab="001">Formato 1</div> <div class="tab" data-tab="002">Formato…
-
18
votes4
answers17554
viewsA: What is the difference between 401 Unauthorized and 403 Forbidden?
Error 401 refers only to authentication, but does not treat authorization. Error 401 will be returned when the system fails to identify the user, while error 403 when the system can identify the…
-
1
votes2
answers1110
viewsA: Disable Dropdownlist in View
At the top of your View, you can do the following: @{ ddlProps = new { } as object; if (Model != null) { ddlProps = new { @readonly = "readonly", @disabled = "disabled"}; } } Then do the following…
-
2
votes2
answers4895
viewsA: Dynamic select with Jquery
As I commented in one comment, it is also possible to do this using dataList, below follows an example: HTML <div> <label for="inst">Instituição</label> <input id="inst"…
jqueryanswered Tobias Mesquita 22,900 -
0
votes2
answers1763
viewsA: Error updating Entity entries
You are trying to insert an ARQUIVO_VERSAO object that already exists, in this case you need to check if it already exists in the Database. You can do it as follows: using (var ctx = new…
-
1
votes1
answer1108
viewsA: backup of the sql database structure
@Jeanbraz, if you use SQL Server Management Studio, you can generate a Script with the Database Structure. DataBase > Right Click > Tarefas > Gerar Scripts > ...Todo o Banco de Dados...…
sql-serveranswered Tobias Mesquita 22,900 -
0
votes2
answers335
viewsA: How to decide which cryptographic hash to use?
I would like to suggest a Hash algorithm, in this case BLAKE2. BLAKE was one of the finalist candidates to be the algorithm for SHA-3, but Keccak was victorious. The second version (BLAKE2), which…
cryptographyanswered Tobias Mesquita 22,900 -
1
votes1
answer129
viewsA: Datepicker Jqueryui error in View
Hans Miller, I advise you not to try to manipulate the ID, in Vex try to use a date attribute. @using Forte.Rastreador.ViewModels @model SuperViewModel <link…
-
1
votes2
answers787
viewsA: Receive id from an autocomplete option
Running the dataList is slightly different from select, you will have to manually filter the dataList. below follows an example with a dataList: HTML <input id="txtID" list="ent" />…
-
2
votes1
answer429
viewsA: Hide and show button in a Datatable with jquery
@Sef, you can use a second parameter in the jQuery selector. If you inform it, it will fetch only the DOM objects that are inside it. So to do what you want, you have to search for all DOM objects…
jqueryanswered Tobias Mesquita 22,900 -
1
votes1
answer1784
viewsA: Insert data into table with foreign key
@Warlock, follow an example: using (var dbContext in new SeuDBContext()) { var arquivoVersao = new ARQUIVO_VERSAO(); //Set das Propriedades do objeto arquivoVersao var tipoArquivo = new…
-
1
votes3
answers162
viewsA: Relationship Have-one in C#?
you have to instance address first: static void Main(string[] args) { var cliente = new Cliente(); cliente.endereco = new Endereco(); cliente.endereco.rua = "guaranesia";…
-
1
votes1
answer725
viewsA: Delete Generated Table and recreate again with other data
@Hugomachado, a simpler approach would just change the visibility of the columns. HTML <div> <input id="ckCodigo" name="ckCodigo" type="checkbox" data-type="ckColuna" data-column="codigo"…
-
0
votes2
answers640
viewsA: How to return all records from a table
You can try the following: internal ArquivoVersao GetArquivoVersao(string arquivoGuid) { using (var ctx = new GEDEntities()) { var versoes = ( from ver in ctx.ARQUIVO_VERSAO where ver.ARQUIVO_GUID…
-
0
votes3
answers2343
viewsA: How to use a Fragment button
You can expose the btAnterior as follows. In your fragment you can write something similar: private View view; private TextView btAnterior; @Override public View onCreateView(LayoutInflater…
androidanswered Tobias Mesquita 22,900 -
1
votes2
answers138
viewsA: center form vertically to the center
look at the following example: CSS #container { position: absolute; background-color: gainsboro; top: 0px; bottom: 0px; left: 0px; right: 0px; z-index: 5; opacity: 0.4; filter: alpha(opacity=40); }…
-
0
votes2
answers568
viewsA: Javascript-enabled checkbox for controller
Taking into account that you are working with checkboxes and there may be more than one selected, it is interesting that you send an array containing the selected ids. HTML <input id="ckUm"…
-
0
votes2
answers851
viewsA: Unite results of various procedures in a single table
You can use the query below for this. DECLARE @resultado as table(Email int, Blogs int, Google int) INSERT INTO @resultado SELECT exec psGraficoestatistica 'Email' as Email, exec…
sql-serveranswered Tobias Mesquita 22,900 -
5
votes2
answers441
viewsA: Recreate tables without dropping
Unfortunately not. But you can in: Ferramentas > Opções > Designers Then uncheck the option: Evitar salvas alterações que exijam recriação de tabela This way Sql Manager will create a new…
-
3
votes1
answer58
viewsA: Access option of object without being with dot
You can access it as follows: registro["man_ins_prod_05"].
-
3
votes2
answers582
viewsA: Appear div to close only after clicking iframe
Normally I do it as follows (without the use of iframe), maybe it is interesting for you. http://jsfiddle.net/zez2n9yb/3/embedded/result/ And now it’s changed to use an iframe:…
-
5
votes1
answer567
viewsA: Update page automatically when accessing system
With an HTTP header I find difficult, however you can use a script on your page: window.onload = function() { if(!window.location.hash) { window.location = window.location + '#updateOnce';…
asp.net-mvcanswered Tobias Mesquita 22,900 -
2
votes1
answer54
viewsA: How to maintain List/Menu position online
try to do something similar: <div class="clearfix"> <div class="esquerda breadcrumbs">Breadcrumbs</div> <div class="direita"> <select name="filtro" id="filtro">…
cssanswered Tobias Mesquita 22,900 -
2
votes2
answers766
viewsA: Remove objects from memory
@user18748, there is not much to optimize a simple query like this. But you can try to set the following properties: db.Configuration.AutoDetectChangesEnabled = false;…
-
2
votes1
answer1637
viewsA: How can I test authenticated webservice?
Friend, for this you can use the Soapui Then add the address of your webservice, which should be something of the genre: http://localhost:xxxxx/testeservice.asmx Just a tip, for new webservices, I…
-
1
votes1
answer114
viewsA: Difficulty hiding part of a form with Usercontrol
Try to do the following: In frmCadastroBens.Cs add a public method that changes the visibility of Usercontrol. public void setUCVisible(wucCadastroBens userControl) { ... } So inside the…
-
1
votes1
answer74
viewsA: Text size in div
try to make the following class change. one-Fourth by removing max-width. .one-fourth-pers { width: 40.5%; /* max-width: 220px; */ float: left; }
-
4
votes1
answer127
viewsQ: Best practices when using Sqlcommand? Text or Storedprocedure?
I’m wondering which of the following approaches is best? 1 - Add a file *.sql as Resource, then run the Sqlcommand with the CommandType.Text. 2 - Add a Store Procedure to the Database, then run the…
-
17
votes8
answers49747
viewsA: How do I remove accents in a string?
An alternative to the answers given above is to install the following nuget: https://www.nuget.org/packages/MMLib.Extensions/ then you can remove the accents as follows: var str = "áéíóú"; str =…