Posts by Raphael Prado de Oliveira • 1,472 points
102 posts
-
1
votes1
answer203
viewsA: Layout images in Carousel bootstrap
I decided as follows : $('#carousel-imagens > div.item:eq(0)').addClass("active"); Only the first image should receive the class active, and the following ones didn’t. The way I was doing all the…
-
2
votes1
answer203
viewsQ: Layout images in Carousel bootstrap
I have the following code snippet : var images = []; for (var i = 0; i < actions.length; i++) { for (var j = 0; j < actions[i].Images.length; j++) { var imagem = new Image();…
-
0
votes1
answer254
viewsA: Modal Bootstrap being closed
Solved. I commented on the following line and it is working normally: @Scripts.Render("~/bundles/bootstrap")
-
0
votes1
answer254
viewsQ: Modal Bootstrap being closed
I have the following scenario: a link that opens a modal. <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport"…
-
1
votes1
answer140
viewsA: For nested in parallel
I had to do it this way, and it worked: for (int i = 0; i < original.Width; i++) { Parallel.For(0, original.Height, j => { lock (alterado) { Color originalColor = original.GetPixel(i, j);…
-
1
votes1
answer140
viewsQ: For nested in parallel
I’m trying to spin two for nested. The second would like it to be parallel. It follows my code. for (int i = 0; i < original.Width; i++) { Parallel.For(0, original.Height, j => { Color…
-
1
votes1
answer100
viewsQ: Nested for conversion to threads
I got the following for nested throughout the length of an image bitmap in C#. I would like to rotate the second one with threads to be executed in parallel. Bitmap alterado = new…
-
1
votes1
answer110
viewsQ: Displaying Bitmap in C#application
I have the following code in my application : Bitmap original = new Bitmap("C:/Projeto/Imagens/antialiasing.jpg"); Graphics g = Graphics.FromImage(original); g.DrawImage(original, 100, 100, 390,…
-
1
votes0
answers75
viewsQ: Parallel calculation using Geforce Cuda
I have the following method that calculates the value of PI in a serial way: public static double CalculoPISerie() { double integral = 0; double h = 1.0 / NUMERO; for (int i = 0; i <= NUMERO;…
-
1
votes2
answers54
viewsA: Conversion of SQL Server types
I decided as follows: SELECT th.CidadeCod ,th.ContratoCod ,SUM(CONVERT(BIGINT,th.Trafego)) AS [trafego] ,SUM(CONVERT(BIGINT,th.PlacasLidas)) AS [placaslidas] ,( CONVERT(DECIMAL(15,2),…
-
1
votes2
answers54
viewsQ: Conversion of SQL Server types
I got the following SELECT in SQL Server: SELECT th.CidadeCod, th.ContratoCod, CONVERT(DECIMAL(5,2), ( SUM(th.PlacasLidas)/SUM(th.Trafego) ) * 100) AS [IndiceOCR] FROM controle.TrafegoFaixaHora th…
-
3
votes2
answers313
viewsQ: Discovering the binary value in SQL Server
Is there a function in SQL Server that converts an integer into binary ? Example: SELECT Funcao_Binario(2) -> Saida : 0010 SELECT Funcao_Binario(4) -> Saída : 0100 SELECT Funcao_Binario(5)…
-
0
votes4
answers86
viewsQ: Hiding div by jQuery
I have the following code snippet in jQuery: $('#btnFiltros').click(function () { if ($('#divFiltros').css('visibility') === 'visible') { $('#divFiltros').css('visibility', 'collapse');…
-
0
votes2
answers211
viewsQ: Checking if element is visible with jQuery
I need to check the attribute visibility of a div. if ($('#divFiltros').css('visibility', 'visible').val() == true) { alert(true); } else { alert(false); } How do I check and get into this if of the…
-
1
votes1
answer32
viewsQ: URL checking independently of the server
I need to check the URL from a Javascript page. I am displaying the following Alert: alert(window.location.href.toString()) The following ULR is displayed on Alert :…
-
2
votes2
answers657
viewsA: How to list NULL on a LEFT JOIN even if it returns joins?
Use the INNER JOIN SELECT r.cod as cod_representante, v.cod_vendedor FROM representantes r INNER JOIN vendedores v ON v.cod_representante = r.cod
-
1
votes1
answer223
viewsA: How to select a larger number of records based on another SQL table
SELECT i.Tipo AS Tipo, COUNT (i.Tipo) AS Quantidade FROM IMOVEIS i INNER JOIN Vendas v ON i.ID = v.ID_do_Imovel GROUP BY i.Tipo …
-
4
votes2
answers1132
viewsA: Select too slow, how to improve?
Tense using the INNER JOIN at the junction of the tables instead of this heap of AND in the WHERE: SELECT coordenacao.descricao AS nome, COUNT(artesao.codigo) AS qtde FROM municipio INNER JOIN…
-
2
votes1
answer38
viewsQ: Error when grouping table field
I need to group the data of a SELECT across the countryside a.afo_vch_NmrCtf, because the data is being returned as follows: When I use the GROUP BY the following error is returned : Msg 8120, Level…
-
1
votes2
answers179
viewsQ: Checking date within a range in SQL
I need to check in my SELECT if the field e. Dating back to is between 30 and 90 days from today’s date. How to make the condition in CASE ? SELECT e.NmrCnt AS [Contrato] ,e.NmrSerie AS [Serie]…
-
10
votes2
answers49607
viewsQ: How to format a Datetime field in Brazilian dd/MM/yyyy format?
I would like to format the fields DataAfr and DataTrm of the kind DATETIME, in the Brazilian date format dd/MM/YYYY instead of the American format yyyy-mm-dd hh:mm:ss SELECT e.NmrCnt AS [Contrato]…
-
1
votes2
answers358
viewsQ: Ping on server with C#
Is there a . Net class with the ping feature? I have the server IP in a string type attribute and would like to drip the server to see if it is online or offline. Does anyone know ?
-
1
votes1
answer2175
viewsQ: Aligning buttons on the NAVBAR
I have the following buttons on my navbar: <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <a…
-
1
votes1
answer222
viewsQ: Validating Empty Dropdownlist
I have the following Dropdownlist: @Html.DropDownList("HorasPendenciaID", null, new { @class = "dropdown-custom" }) When seventh '0' in his value it is empty. I would like to validate whether…
-
2
votes1
answer79
viewsQ: Null attribute check in @Html.Displaynamefor
I need to check if the attribute of a class is null. If it is null, I would like to hide its label. Below is an example of how it is being displayed today: The attribute Dating null came, so it…
-
1
votes2
answers447
viewsA: Return function Boolean via ajax
Solved. The controller method was the same: public JsonResult EquipamentoTemControleFuncionamento(string contratocod, string numeroserie) { ControleFuncionamentoModel cfm = new…
-
1
votes2
answers447
viewsQ: Return function Boolean via ajax
I have the following ajax call on my page: $.ajax({ url: 'EquipamentoTemControleFuncionamento', data: { contratocod: contratocod, numeroserie: numerodeserie }, type: 'POST', dataType: 'JSON',…
-
0
votes1
answer258
viewsA: Accessing Viewbag list via Javascript
Solved. var jsonObj = @Html.Raw(Json.Encode(ViewBag.DadosEquipamentos)); for(i = 0; i < jsonObj.length; i++) { var contratocod = jsonObj[i].contratocod; }
-
0
votes1
answer258
viewsQ: Accessing Viewbag list via Javascript
I am trying to access the elements of a list stored in Viewbag as follows: function equipamentoTemControle() { for(i = 0; i < @ViewBag.qtdEquipamentos; i++) { var contratocod =…
-
0
votes2
answers97
viewsA: Element Span at the front
Actually the color of the letter gave an effect that looked like it was behind. I changed the color of the letter to white with the color:white <span class="badge" style="font-size: 11px;…
-
0
votes2
answers97
viewsQ: Element Span at the front
I have the following column of a table: <td style="font-size:10%"> <p class="list-group-item-text"> <a href="@Url.Action("Cidade", "Cidade", new { cidadecod = item.cidadecod,…
-
3
votes2
answers376
viewsQ: Span inside @Html.Actionlink
I have the following column of a table: <td style="font-size:10%"> <p class="list-group-item-text"> @Html.ActionLink((string)item.cidadenome, "Cidade", "Cidade", new { cidadecod =…
-
5
votes2
answers4659
viewsQ: Comparing only the Datetime field date in C#
I only need to compare the date of two fields DateTime. DateTime aux = new DateTime(2016, 09, 02, 10, 0, 0); if (aux.Equals(DateTime.Now)) { //Alguma ação... } In the code above, I need you to enter…
-
15
votes3
answers15156
viewsQ: List all triggers in SQL Server
Is there any command, that lists all the triggers from a database in SQL Server?
-
2
votes1
answer56
viewsA: Disabling Actionlink CLICK event
Solved. I did it this way: $('#btnEditar').css('cursor', 'not-allowed'); $('#btnEditar').click(function () { return false; });
-
2
votes1
answer56
viewsQ: Disabling Actionlink CLICK event
I have the following link in my view : @Html.ActionLink(" ", "Editar", new { id = item.ID }, new { @id = "btnEditar" }) And when loading the page, I have to block this link, according to the user’s…
-
0
votes1
answer24
viewsA: E-mail validation via Pattern
Solved. I traded ng_pattern to just Pattern. The expression Pattern remained: pattern = @"^/[a-z0-9.]+[a-z0-9]@minhaempresa.com.br$/"…
-
0
votes1
answer24
viewsQ: E-mail validation via Pattern
I would like to define the Pattern of a field so that it always validates the emails typed in the format : [email protected] @Html.TextBoxFor(m => m.UsuarioEmail, new { @class =…
-
0
votes1
answer17
viewsA: Error in Maproute configuration
Solved. I had another Maproute configured that was being referenced. I put this Maproute after the new Maproute: routes.MapRoute( name: "EquipamentosTrafego", url:…
-
0
votes1
answer17
viewsQ: Error in Maproute configuration
The following error is returned to me: The Parameters Dictionary contains a null entry for Parameter 'numerodeserie' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.Actionresult…
-
8
votes5
answers14934
viewsQ: Sort Datatable Datetime Field
Hello. I have the following datatable: success: function (data) { $('#table-controle').html(data); $('#table-controle').DataTable({ "language": { "url":…
-
0
votes0
answers285
viewsQ: Sorting Datatable column by a field of type Datetime
I have the following field in my model: [Required] [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)] public DateTime? DataCadastro { get; set; } I use Displayformat…
-
0
votes2
answers588
viewsA: Reload in Table HTML
I solved it as follows. This is the Javascript function: function reloadNovoEquipamentoTable(index) { $("#tbody-novoEquipamento tr:eq(" + index + ")").remove(); }…
-
1
votes2
answers588
viewsQ: Reload in Table HTML
Good afternoon. I have a table that I carry some equipment in HTML. I would like to reload it when deleting a device from the table. I have the following function in my Javascript page. This…
-
9
votes1
answer51550
viewsQ: Scroll in div if necessary
I have the following div on my page html <div id="divContent" class='content'> Bem vindo ao meu site <br /> 1 index index index index index index index index <br /> 2 index index…
-
3
votes1
answer57
viewsQ: Tag footer at browser boundary
I have a footer tag on my HTML page that calls the Bootstrap panel-footer class. I would like to leave this footer at the browser limit open and compliant and not at the limit of the content on the…
-
1
votes2
answers1325
viewsQ: Master page in HTML
Good morning! I’m trying to make a Master Page in HTML 5. I created an HTML page called master.html with every menu structure I want. I call this page the following way on my index.php page and it…
-
0
votes1
answer137
viewsQ: Syntax error in Mysql database
I am trying to create a Procedure in Mysql and is returning Syntax error. Follow my code for analysis: DELIMITER $$ CREATE PROCEDURE CalculaIdadeCP (IN cpcaminhaoid INT) BEGIN DECLARE…
-
1
votes2
answers117
viewsA: How to take the entire "days" value of a Dateinterval
I did it that way and it worked: $var = $diferenca->days; $var received the 36 value I wanted !
-
1
votes2
answers117
viewsQ: How to take the entire "days" value of a Dateinterval
How do I get the value days of a DateInterval through the method date_interval_format()? I tried it this way, but it didn’t work: $var = date_interval_format($diferenca, '%days');…