Posts by Icaro Bombonato • 374 points
9 posts
-
3
votes1
answer53
viewsA: Create new DF based on text criteria of a certain column
Just use the grepl command # Dados de exemplo df <- data.frame(coluna1 = 1:5, coluna3 = c("abc", "abd", "abc_abc|1234", "abd_abd|1235", "avc-abc|1239")) With R Base: df_nova <-…
ranswered Icaro Bombonato 374 -
2
votes2
answers576
viewsA: Notice: "Possible Multiple enumeration of Ienumerable"
The problem with Enumerable.Range, is that every time you have some iteration this code will be called and the query executed. If you convert to list, after the first run the result will be curled…
-
4
votes2
answers1739
viewsA: In R, sort a data frame by column and by groups
You can also use the function arrange package dplyr, which particularly I find easier both in reading and writing than the "normal way". I highly recommend learning the dplyr package for data…
ranswered Icaro Bombonato 374 -
1
votes1
answer50
viewsA: Including string from a position
If you already have the position and want to insert the text2 inside the text1, at position X, you can use: var texto1 =…
javascriptanswered Icaro Bombonato 374 -
1
votes1
answer505
viewsA: Is it possible to use Razor inside Javascript file?
Straight into the . js has no way, what you can do is instantiate your class in html/Razor, so you can set values in javascript and pass as class parameter for example... There’s a downside, you…
-
1
votes3
answers825
viewsA: Method parameter with abstract class
Thinking only about Object Orientation, this is not possible. The Mething method receives the Animal class, so this method has to know what to do with this type of class, the bark() method, belongs…
-
0
votes2
answers2944
viewsA: How to use the string created string.xml via code
String mensagem = getResources().getString(R.string.hello_world); http://developer.android.com/guide/topics/resources/string-resource.html…
-
2
votes1
answer3039
viewsA: How to remove specific lines from a data frame?
One of the ways I see it is to check if the minute is equal to 0, so it would be an exact time. You can use the lubridate package to make this easier. ##install.packages("lubridate") #É necessário…
ranswered Icaro Bombonato 374 -
5
votes2
answers605
viewsA: What better way to organize and work with ASP.NET MVC routes?
To organize your routes, you should always put the most specific first and then the more generic ones. Because once Asp.net finds a route that satisfies its parameters, it will use it and ignore the…