Posts by Carol • 119 points
4 posts
-
3
votes1
answer419
viewsQ: How to select Count(*) with Python and mysql.Nector
The library I’m using is that one. That is the code: cur.execute("""SELECT COUNT(*) as total FROM tabela as t WHERE ... """, (v1, v2)) for (total) in cur: if total > 0: print('Existe') The…
-
0
votes1
answer3029
viewsQ: How to compare the last character of a string with some letter or accent
I need to compare the last letter of a string with a question mark. I already did and the code works, only I’m getting the last letter with Substring, using Length and it’s an ugly code. I want to…
-
6
votes1
answer1327
viewsQ: Can’t find Httpcontext.Current
I’m trying to create a Urlhelper as follows: UrlHelper urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext); I already made the reference to System.Web, as I saw as solution in…
-
2
votes1
answer236
viewsQ: How to use in @Html.Checkbox?
I have the following code: @{ var st = //(minha lógica q retorna bool); } @Html.CheckBox("MeuNome",st,new { id = "MeuID", value = "MeuValor" }) I can’t use the variable st in the second parameter of…