Posts by rLinhares • 7,797 points
331 posts
-
4
votes3
answers590
viewsA: How do I know if one string contains another?
To check whether a string is contained in the other, just use the Contains: if (linha1.Contains("LFCES004"))…
-
0
votes2
answers394
viewsA: How to bring two columns with different results
Usa group by for that reason: SELECT ativo as 'Situacao', COUNT(*) as 'Total' FROM projetos GROUP BY ativo How do you have two possible situations ativo ('S' and 'N'), it will return the total of…
-
3
votes3
answers497
viewsA: Separation of string text into an array
From what I understand you want to break the string no " ", that would be the interval. You can use the split function: String[] strRetorno = "0.1253729 09863637 02937382 029828020".split(" ");…
-
3
votes2
answers2426
viewsA: Displaynamefor and Displayfor
I went through that example: public class Teste { [Display(Name = "current name")] public string Nome { get { return "teste"; } } } Using @Html.DisplayNameFor(model => model.Nome) would display…
-
11
votes3
answers649
viewsQ: What is the Target Framework and what is it for?
I work for a while with .NET and I was asked about the target framework of my projects. I understand what it’s for but I couldn’t explain it simple and clear what exactly is.…
-
0
votes4
answers1722
viewsA: How to recover a value from within a tag in XML?
From what I understand you want the return of the query to be just what is inside the tag; therefore, I believe that the simplest way is to use replace to remove the tags of the result: select…
-
3
votes1
answer529
viewsA: Mysql SHOW COLUMNS
Try to use INFORMATION_SCHEMA: SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='yourdatabasename' AND `TABLE_NAME`='yourtablename';…
-
2
votes2
answers234
viewsA: How to make a query using SUM correctly SQL
If you want to group by month you need to select only the columns group by, without grouping by quantity: SELECT YEAR(NFDtEmis) AS 'Ano', MONTH(NFDtEmis) AS 'Mes', ItProduto AS 'Produto',…
-
1
votes2
answers2462
viewsA: Select Chained
By the name of the fields I believe Tabela1 and table 2 are the same table. So you need to define an alias for them so that sql can differentiate the field from one to another. SELECT T1.campo1,…
-
1
votes5
answers1258
viewsA: How to open a new background tab and redirect the current tab?
Try that code: $('a.seulink').click(function(e) { e.preventDefault(); window.location= 'http://pagina1.com'; window.open('http://pagina2.com'); });
-
1
votes2
answers1639
viewsA: How do I add bookmarks to the google map when I click it? - Javascript
In fact what you need is just control the user click. At the time of the click you already get that data. Add that Listener at map initialization: mapa.addListener('click', function (e) {…
-
0
votes2
answers49
viewsA: Json with C# with node numbered
Actually in the json is always the combination chave:valor Note that the node you say is numbered is a string: "1":{ So the access form is the default: string id =…
-
5
votes4
answers7010
viewsA: jQuery delete the last character typed in an input
takes the input value, removes the last character and updates the input. var texto = $("#input_id").val(); $("#input_id").val(texto.substring(0, texto.length - 1));
-
1
votes2
answers62
viewsA: Doubt in the method declaration
You’re in the class Program referencing the static variable maxmarx; that is, within the class he sees the variable without having to reference the class. So much so Program.maxmarx how much maxmarx…
-
1
votes1
answer237
viewsA: Google maps warning: getCurrentPosition() and watchPosition() no longer work on insecure Origins
I’ve been through this problem in some tests I did and needed to change to access the screen (the whole site, actually) via https. reference: https://github.com/stefanocudini/leaflet-gps/issues/15…
-
1
votes1
answer230
viewsA: Fill table column with Object Json (using Footable)
[{ "pessoa": { "id": 1, "tipo": "J", "razao_social": "INTELIDER", "nome_fantasia": "INTELIDER LTDA", "cpf_cnpj": "10999558000186", "rg_insc_estadual": "132456789" }, "id": 1, "login": "gleyson",…
-
3
votes3
answers1085
viewsA: How to insert row at the top of a table using JS?
I remember I used to insertBefore. var linha = "<tr>"; linha += '<td class="cnes">' + cnes + '</td>'; linha += '<td class="cbo">' + cbo + '</td>'; linha += '<td…
-
3
votes2
answers68
viewsA: Why doesn’t the array value 1 appear in the explode?
In itself php.net has an example similar to what you do. It recognizes a / after the / and prints empty…
-
3
votes3
answers17188
viewsA: Apply CSS when two classes are together
You almost got the answer.. instead of declaring the two classes separately (.nome1 .nome2), join them in the css statement: .nome1.nome2 { color: red; font-size: 18pt; }…
-
2
votes3
answers1521
viewsA: Cannot implicitly Convert type 'string' to 'int'
Using c# just use the system conversion class. ee.Dia = System.Convert.ToInt32(this.lblDay.Text); Detail: this conversion is if Diais an int. If it is a long, uses the ToInt64; if it’s a short, use…
-
1
votes2
answers127
viewsA: Which event runs first, javascript or Asp.net?
You can take control of the .cs and do it just for .js. Transforms the method Private Sub cmdAvancarEndereco_Click(sender As Object, e As EventArgs) in a normal method Public Sub…
-
0
votes3
answers48
viewsA: Doubt regarding CSS selectors
The simplest way to understand is that this command works like a if. That is, if the screen has a minimum size 10px it will occupy the maximum size allowed (max-width:none) ref:…
-
0
votes1
answer447
viewsA: Google Maps Event - Addlistener
After I commented I was thinking of a better solution.. you can use the idea of cleaning/redesigning but using a timeout to decrease the number of redesign. var EventoDisparado = false;…
-
0
votes1
answer134
viewsA: Google Maps - After doing new search, remove old Marker
The problem is that you’re storing the markers in the local variable var markers = []; within the initAutocomplete(). In this case I recommend you create this global variable to not lose the…
-
0
votes2
answers1315
viewsA: How to remove specific markers from a Googlemap
I have a screen that displays some points on a map; according to the user’s action it is necessary to update this map by hiding/displaying some markers. What we did was keep the dots already loaded…
-
1
votes1
answer1393
viewsA: call action method in the controller via a view script
I believe the best way is to make the call via javascript same. Something like $("#btnDownlaod").click(function (e) { callPostBack(e, this, @Url.Action("Export", "Nome_Controller", new { id =…
-
1
votes2
answers414
viewsA: How to reference an html button in C#
You can try to grab this "button" by the type.. var inputs = document.getElementsByTagName('input'); In that case you have the inputs screen. This can go wrong if you have more inputs besides what…
-
1
votes2
answers59
viewsA: Problem saving Arabic text in mysql
ini_set('default_charset', 'UTF-8'); I used it once and it worked (reference)
-
2
votes3
answers82
viewsA: Add numbers respecting formatting R $ 00,00
Just you call the toFixed(2) at the exhibition. This way your calculation is made independent of the decimals and displayed in a rounded form with as many houses as you want.…
-
0
votes1
answer616
viewsA: How to capture camera photo and delete from gallery
I see two alternatives: 1) you create a unique directory for your application and store all the photos, keeping the history on the device - this is nice when the photos can be consulted (storage on…
-
-3
votes1
answer125
viewsQ: It is possible to make Dropdownlist "readonly" equal to Textfield
I understand that the DropDownList already is readonly, since I can not change the values of the options, however I need to maintain the uniform behavior of the screen. In query mode I can assign a…