Posts by Jhonatan Jorge de Lima • 1,012 points
47 posts
-
0
votes1
answer24
viewsA: Error in netfx (MSBUILD) when building a project
The bug was fixed by updating the version of my Visual Studio (2017).
-
-1
votes1
answer24
viewsQ: Error in netfx (MSBUILD) when building a project
When trying to build my project I’m making this mistake: > An attempt was made to load an assembly with an incorrect format: > C:\Program Files (x86)\Microsoft Visual >…
-
0
votes0
answers50
viewsQ: Pass datatable to storedprocedure with Dapper . net core
I have a proc with the following parameters @TabelaIdsCompras TipoTabelaIdGenerico READONLY, @TabelaIdsProds TipoTabelaIdGenerico READONLY And I have my datatables: DataTable tableIdsProd= new…
-
2
votes1
answer156
viewsA: How do this FOR (in C#) list only the first five items?
There is the method Take where you can pass a parameter which is the amount of records that will be returned from the list; As commented by Virgilio. lista.Take(5).ToList().; Using the Take before…
-
0
votes1
answer195
viewsA: To create a product in an online store, do I need to create an HTML page for each product?
The most advisable is to use next to php, some Framework for front, like Angular, or create a service that returns the product and consume it with Ajax. A nice detail to study, if you pay attention…
htmlanswered Jhonatan Jorge de Lima 1,012 -
0
votes0
answers38
viewsQ: Generate Object with values from a Resource file
I have a Resource File with the following values: Name: Value: Teste1 TesteUm Teste2 TesteDois And I read it like this: ResourceManager rm = new ResourceManager("MyResource",…
c#asked Jhonatan Jorge de Lima 1,012 -
2
votes3
answers1618
viewsQ: Encoding string conversion
I have the following string Cinto De Segurança How do I convert her to be like Cinto De Segurança
-
0
votes0
answers47
viewsQ: Insert with composite objects
get this json { "Name": "Teste", "ExpirationDate": "/Date(1515703416000-0200)/", "Program": { "Id": 1 }, "Resource":{ "Id": 1 }, "InsertDate": "/Date(1515703416000-0200)/", "InsertUserId": 8,…
-
0
votes1
answer271
viewsQ: Redirection with parameters
I have the following method: public ActionResult exemplo() Returning: int act = (int)TasksTypeEnum.CARGA; return RedirectToAction("Index", new { q = study.Id, msg = 1, action = act }); The page…
-
0
votes1
answer26
viewsA: jsGgrid custom field
Fixed by adding the item: $("#jsGrid").jsGrid({ height: "90%", width: "100%", filtering: true, sorting: true, paging: true, autoload: true, pageSize: 20, pageButtonCount: 5, deleteConfirm: "Do you…
-
0
votes1
answer26
viewsQ: jsGgrid custom field
I have the following script to mount a table with jsGrid var montaGridPacientes = function (data) { $("#jsGrid").jsGrid({ height: "90%", width: "100%", filtering: true, sorting: true, paging: true,…
-
3
votes1
answer745
viewsQ: Instantiate a class from its string name
I have a select where I have some options Teste1 Teste2 Teste3 I have a model for each option public class Teste1() { //atributos e métodos } I would like to receive this string ex in a certain part…
c#asked Jhonatan Jorge de Lima 1,012 -
0
votes3
answers1306
viewsA: Browser compatibility with javascript
The doubt was based on whether the client’s browser was compatible with the javascript features the system used. The library was used to solve the problem Modernizr Same as the support for checking…
-
2
votes3
answers1306
viewsQ: Browser compatibility with javascript
Is there any tool or method to recognize which browser the user is using and whether this is compatible with the version of JS and Jquery that exists on my system ? The idea is if not compatible,…
-
1
votes0
answers27
viewsQ: Trigger event by name
i receive by a function the name of the event and the element that should trigger this event ex: callEvent('click', 'btnEvent') within this function I would like to return the element and trigger…
-
1
votes0
answers547
viewsQ: Problem with visual studio to compile
I started to appear this problem when I try to run my application, I have not made any modifications in the system someone knows what can be it ? Managed Debugging Assistant 'Bindingfailure' has…
-
1
votes1
answer20
viewsA: Variable content is not displayed in the View
When using the value of variavel in view has to put the @ otherwise shall be construed as text. grid.Column("Endereco", format: @<text><a href="@Url.Action("Index", "Contato", new { id =…
-
0
votes1
answer810
viewsQ: Check the triggers linked to a given table
I use the database Sql Server 2012 And the tool SQL Server Management Studio 2012 How can I check the triggers which are linked to certain tables without having to go by the object explorer? there…
-
0
votes1
answer192
viewsQ: Return a new object using the Foreach function
Have the following list List<EmployeeTotal> totals = Context.Database.SqlQuery<EmployeeTotal>(query).ToList(); I want to transform all objects in the list totals on a new list of the…
-
1
votes4
answers1937
viewsA: View data format en dd/mm/yyyy
A more manly possibility would be this: var dateStr = '2017/06/07'; var dateSplit = dateStr.split("/"); var dateFormated = dateSplit[2] + "/" + dateSplit[1] + "/" + dateSplit[0];…
-
3
votes2
answers2292
viewsQ: Operations with time quantities and conversion between time units
Is there a library specializing in the handling of quantities and units of time? Allowing the conversion of/into milliseconds, seconds, minutes and time sum and subtraction operations. Native in c#…
c#asked Jhonatan Jorge de Lima 1,012 -
7
votes8
answers29160
viewsQ: Duplicate visual line studio
Is there a hot key that replicates the action (Ctrl c + Ctrl v)? Besides having to copy press enter or click on the bottom line and paste, I can duplicate this line with some shortcut?
visual-studio-2015asked Jhonatan Jorge de Lima 1,012 -
3
votes3
answers441
viewsQ: Integer conversation in the rounding account 0.1
echo (int) ((0.1 + 0.7) * 10 ) Isn’t that supposed to be eight? 0.1 + 0.7 = 0.8 * 10 = 8 You are returning me 7. because?
-
3
votes2
answers71
viewsQ: Shortcut navigation between keys
As the complexity of the code increases, several keys can start to appear opening and closing blocks of code, but several times at the end of the code there is a series of keys like this: } } } } }…
visual-studio-2015asked Jhonatan Jorge de Lima 1,012 -
0
votes1
answer301
viewsQ: Return date x days left to arrive
Scenario: Ciclos id name endDate (datetime?) Dice: 1, primeiro, 05/10/2017 2, segundo, 15/10/2017 3, terceiro, 20/10/2017 4, quarto, 30/10/2017 With Line and lambda, I would like to return the dates…
-
3
votes2
answers80
viewsQ: Inserting special character in view
I have an HTML table where one of your td I need to insert the following information: <td>@item.OrderSend º</td> I would like to insert in this way: <td>@item.OrderSendº</td>…
-
2
votes1
answer112
viewsQ: Creation of anonymous objects vs "named (?)"
I have a class that loga some information in the database I am using it in the following way: new StudyLogRepository().Create(new StudyLog() { StudyId = Study.Id, CycleId = null, DateOccurrence =…
-
3
votes3
answers3072
viewsQ: Provide file download from server
There is a feature of registering a customer’s data. The user selects a file from his computer, and this file is imported to the server in a separate folder, and this file can be a PDF, JPEG, PNG.…
-
1
votes3
answers842
viewsA: Check two or more occurrences of a listed element (lambda/Linq)
Solved in this way: if (listCard.Count(_ => _.ToString().Equals(card)) > 1) continue;
-
2
votes3
answers842
viewsQ: Check two or more occurrences of a listed element (lambda/Linq)
I have the following list<t> listCard; within it I have the following values: [0]:7720890002560 [1]:7720890002560 [2]:7777777002560 [3]:7720890002560 [4]:7720444402560 [5]:7720777002560…
-
14
votes4
answers977
viewsQ: Separate repeated values in a list
I have a list like this: [1,1,1,2,2,1,5,3,4,3,4] How to generate a new list with only one value of each: [1,2,3,4,5] The first list is a List<int> the second can come in any kind of list.…
c#asked Jhonatan Jorge de Lima 1,012 -
0
votes1
answer669
viewsQ: occurrence of word in sql query
I have an appointment SELECT NOME FROM PESSOA WHERE CODIGO = 1 She returns to me ANA ANA JOAO ANA ALBERTO ANA There is a way to count the events of ana? Using only the sql query?…
-
0
votes1
answer201
viewsQ: Open link in new window
How do I open a given link, for example www.google.com in a new window without affecting the one I’m using? I will receive this link when running a method of a WS it comes in string format, so I…
-
1
votes2
answers127
viewsA: Which event runs first, javascript or Asp.net?
The solution found was in the event onClickof the button inform a return false; thus barring the event of codebehind, and only when my Hidden is filled, is the event forced submit form to process…
-
0
votes1
answer37
viewsA: Javascript e Asp.net [Vb] webforms Session
Is not possible, Session's of server-side and client-side has no communication among themselves, The solution found was to allocate the results in hiddenfields and manipulate information through…
-
0
votes0
answers76
viewsQ: Write VB code in file . JS
You can write Vb code inside a file that looks like . js? For example: arquivo teste.js var testeEvento = function () { <%=MsgBox("teste")%>; }; I tried this way it didn’t work it returns me…
-
1
votes2
answers1162
viewsA: SQL Group same ID with another condition
See if it solves SELECT conta_id, produto_id, precofinal FROM ((produtos INNER JOIN contas_produtos ON id = conta_id) INNER JOIN produtos ON produto_id = produto_id ) GROUP BY id, precofinal…
-
1
votes2
answers300
viewsQ: Return Javascript before finishing processing
I have this method: var getCardToken = function () { var passa = true; var code = false; var acardNumber= $("#ContentPlaceHolder1_txtNmCartao").val(); var acvv=…
-
1
votes1
answer68
viewsQ: How to execute a JS function before the so-called Codebehind method?
I have an Asp button <asp:button ID="cmdAvancarEndereco" runat="server" cssclass="btn btn-success btn-lg" text="Avançar >"> </asp:button> that has an event of the VB trailer in the…
-
5
votes2
answers1770
viewsQ: Difference between the types of buttons
What is the difference between the following components ? <button type="button">Click Me!</button> <asp:button ID="cmdAvancar" runat="server" >Click Me!</asp:button>…
-
0
votes0
answers137
viewsQ: Scriptmanager.Registerstartupscript runs on the fly? or just after the sub end
When executing this line: ScriptManager.RegisterStartupScript(Page, Me.GetType, "OK", "openModal()", True); the script is executed at the moment the debug pointer passes through it, or only after…
-
0
votes1
answer89
viewsQ: Is it possible to change values on the screen and send to the server?
I work in an Asp.Net application where some values like order price and products are collected from the form. The final order total is made over the sums of the values that come from the form, from…
-
1
votes2
answers127
viewsQ: Which event runs first, javascript or Asp.net?
I have a javascript method on a button, which is triggered with the click of it, but this same button triggers an Asp.net event. The js event executes a method that processes a value and this value…
-
1
votes1
answer75
viewsA: How to use CSS to cut text when finding a specific character?
Face CSS serves only to "give beauty". In the case of a more refined processing so I think I should use a back language or javascript. most languages (not to say all) have a function called "split"…
-
0
votes1
answer37
viewsQ: Javascript e Asp.net [Vb] webforms Session
I have a javascript method that returns a string, In the case: var hash = PagSeguroDirectPayment.getSenderHash(); how to put this hash variable in a Session and read this Session in Asp. Dim hash as…
-
3
votes1
answer249
viewsQ: Grab Dynamic Element in JSON
I have the following json { "error": false, "installments": { "visa": [{ "quantity": 1, "installmentAmount": 500.00, "totalAmount": 500.00, "interestFree": true }, { "quantity": 2,…
-
2
votes1
answer89
viewsA: How to use Registerstartupscript one after the other?
See if you can’t solve it. Dim gBll As New Geral_BLL gBll.atribuiMensagemModal(Me.Master, dcResultado) ScriptManager.RegisterStartupScript(Page, Me.GetType, "OK",…