Most voted questions
150,413 questions
Sort by count of
-
6
votes1
answer2820
viewsCompares Datetime field in a lambda only part Date
In this lambda, result will almost always be null, because I gave a Getdate() straight at the bank and when this happens, I record Date and Time. How do I make this lambda pass only Data and compare…
-
6
votes1
answer156
viewsError while using Random
I set a random number to fill a fictitious table and did so: foreach (var usuario in LstUsuarios) { htmlUsuarios.AppendLine("<tr>"); htmlUsuarios.AppendLine("<td>" + usuario.Nome +…
-
6
votes1
answer7747
viewsHow to resolve the medium trust issue in Asp.net
I’m developing a website on Asp.Net MVC5. When posting the site on Locaweb and trying to log in with my user I received the message: Attempt by security transparent method…
c# asp.net-mvc asp.net asp.net-mvc-5 asp.net-identityasked 10 years, 9 months ago Renatto Machado 715 -
6
votes1
answer13850
viewsJoin with three or more lambda tables
I made this expression using Lambda and 2 tables. var resultado = db.T_TarefaParceiro.Join( db.T_OsParceiro, t1 => t1.IDTarefaParceiro, t2 => t2.IDTarefaParceiro, (t1, t2) => new { t1, t2…
-
6
votes4
answers438
views"Clean" way to modify the "Visible" attribute of a Picturebox
I have 5 background images for my application and that will be visible to the user’s taste. What is the simplest way (clean code) to get the user to choose? private void…
-
6
votes1
answer2258
viewsHow to fix the unrecognized Attribute 'name' error in Webconfig?
I am developing a web project in VS 2012, this application connects with a Mysql database developed in Mysqlworkbench 60 CE with Mysql server 5.6, I have referenced in the project the…
-
6
votes0
answers1367
viewsReportviewer Generic error GDI+
In Reportviewer, some generated requests are generating an exception, and when this happens, I can’t even export to PDF, but to DOC it works. Does anyone know what’s going on? I use C# with VS2010…
-
6
votes2
answers895
viewsRemove "/" from a Datetime.Toshortdatestring();
I am implementing a program using C# with . net 3.5 I have the following code: StringBuilder sb = new StringBuilder(); sb.Append(caminhoSalvarCobranca); sb.Append(@"\Boleto ");…
-
6
votes5
answers14983
viewsHow to merge multiple dates frames into one
I want to create a data frame as a junction of 4 other data frames. I was able to do this using such commands: ZHO<-as.data.frame.matrix(zho) ZHO ZES<-as.data.frame.matrix(zes) ZES…
-
6
votes3
answers13945
viewsHow to compare the difference between two dates in Delphi?
I need to compare 2 dates to know if the due date is Greater that the current date, if it is Minor it returns an error, follows the code I did and did not work. var Data_Atual: String;…
-
6
votes1
answer817
viewsFortesreport at Delphi
Someone would have some mini application to let me know how Fortes Report works? I’ve already made a report with the strong report, but what I’m getting wrong, is that I have to put a Bane…
delphiasked 10 years, 9 months ago Ramon Ruan 1,018 -
6
votes1
answer1009
viewsWhat is the difference between `filter_var`and `filter_input`?
What’s the difference between filter_var and filter_input? I can’t find it anywhere, at least not in a way I understand. And how can I replace mysql_real_escape_string by one of them? $password =…
-
6
votes2
answers874
viewsHide different options (actions) for different user profiles
I am in a project where I have 3 different levels of profiles: Administrator, Professor and Coordinator. I already have the login module, registration and such. What happens is that I wanted for…
c# asp.net-mvc asp.net-mvc-5 razor visual-studio-2013asked 10 years, 9 months ago Érik Thiago 2,338 -
6
votes4
answers18454
viewsHow to replace a certain string within another string in Javascript?
How can I replace only a certain part of a string? Example: var linha_nova = "EU TENHO UM CACHORRO"; I want to replace only the word "UM" on the other. How should I proceed? I also need to replace…
-
6
votes3
answers18812
viewsRunning command with another user within a shell script
I have a shell script that I need to run some commands with a linux user, and some other commands with another user. Something more or less like this: #!/bin/bash echo 'rodando com usuário A'…
-
6
votes1
answer11317
viewsFloat rounded in C
I need to return a value float with 1 decimal place, but is returning with the rounded value. I have the following code: float n1 = 4; float n2 = 9; float total = n2 / n1 ; printf("Media: %.1f ",…
-
6
votes3
answers977
viewsHow to make Divs with same height and 100% height
I need the three Ivs I have to be the same height, and in case the height isn’t 100%, turn 100%. Example: I have 3 Ivs <div class="menuEsquerdo"></div> <div…
-
6
votes3
answers156
viewsWhat name is given to code modeling/notation?
I know the question got a little weird, but here’s the thing: It has a type of notation that is no language, but it serves as a basis to implement in some language. for example the algorithm of…
pseudocodeasked 10 years, 9 months ago anisanwesley 2,280 -
6
votes3
answers1328
viewsReturns Json of object in C# with Entity Framework
I’m having a problem returning a Json using Entity Framework. The code I’m using is: [AcceptVerbs(HttpVerbs.Get)] public JsonResult Item(int agendaHorarioID) { using (var db = new ERPContext()) {…
-
6
votes1
answer1248
viewsSQL Query count
I need to make a query in which the result is the medals (gold, silver, bronze and total (sum of 3)) obtained by each country in all editions of the Olympic Games. So far so good, the query below…
-
6
votes1
answer1808
viewsRun another application as soon as you receive an SMS
I need to call an app already installed on my mobile as soon as I receive an SMS from a certain number. All the code of this application is already ready, but I do not know how to call it from this…
-
6
votes3
answers666
viewsFunction with variable amount of parameters, what better way to do?
I would like to do a function without defining the amount of parameters needed. What ways or alternatives can I use to get this result?
javascriptasked 10 years, 9 months ago Joao Paulo 11,760 -
6
votes1
answer913
viewsCorrect Statement Classes Model MVC Ninject
I started using OO a short time and in all projects I see on the net, I see the following way of statement. public class Trabalhador { public int Id { get; set; } public string Nome { get; set; }…
-
6
votes2
answers1395
viewsDoubt in inheritance exercise in C#
I’m trying to solve an inheritance exercise and I found a question that I saw that you have a chance to show up in other places and so I thought I should ask here. The exercise asked to first create…
-
6
votes3
answers13356
viewsHow to fix the position of an element inside a div with scroll( With css )
It is possible to fix an element( div, img, p ) in a div with scroll and with position:relative and using only css? *Currently reposition the div using the function $('elemento').scroll() and…
-
6
votes1
answer4745
viewsRun shellscript on an android mobile
Does anyone know if there is a default app that reads shellscript on android mobile? Has anyone ever tried something like?
-
6
votes2
answers5023
viewsFill in a Word document from Delphi
I want to create a system in Delphi, where I fill in the labels and then creates a word document with the information I typed... I put an example below where I will type the information and when I…
-
6
votes1
answer1449
views -
6
votes1
answer5097
viewsHow to group by month with SQL?
I have a table, for example, with an attribute nome and data (for example only). I would like to generate a query that returns the amount of each row grouped by name and month: Nome Janeiro Fev…
-
6
votes3
answers1183
viewsHow to Dropdown ASP NET MVC
I have a DTO class [Serializable] public class PerfilDTO { public int Codigo { get; set; } public string Descricao { get; set; } public SituacaoEnum Situacao { get; set; } public…
-
6
votes2
answers2534
viewsRendering Partials in ASP.NET MVC
I’m having a problem in my application where I wanted to use partial to render one page inside another. That is, one controller within another. Only, what happens is the partial does not render at…
-
6
votes2
answers4044
viewsTheme only on a Wordpress page. Is it possible?
Has a site in Wordpress that is with a specific theme. IE, all posts and pages are with the appearance of this theme. It turns out I need to create a new page, and that page has to have the…
wordpressasked 10 years, 9 months ago morphinduction 473 -
6
votes2
answers234
viewsHow to handle frameworks and ready-made technologies?
I’ve been having a question for a while and I think it may even be a common question. I don’t quite know how to put the question, but I’ll try. When I started programming I dealt with languages like…
-
6
votes2
answers282
viewsConflict between Simple_html_dom and Nonobject-Oriented functions
I’m developing an app that has to access a list of websites stored in a database, upload all their links. It’s a test application but I’ve found a difficulty. The routine is this one: function…
-
6
votes1
answer5290
viewsMethod that returns a class
I am trying to create a method that takes a string and returns an instance of the class with the name passed, example: "Calculator", will return me an instance of the class "Calculator" (If it…
-
6
votes3
answers4918
viewsCreate table html and zebrar the same
I wonder, how do I zebrar an HTML table? It has only two columns and information is populated dynamically from the controller and BD.
-
6
votes2
answers7033
views -
6
votes2
answers277
viewsProblem with Animate.css in fonts in Safari
I’m having problems with font rendering that have effects from the Animate.css plugin And that only happens on Safari. Website link. As an example, the first three links of the menu are without any…
-
6
votes2
answers257
viewsAsynctask x Multithreading
When it is most advantageous to use Asynctask, and when to use Threads. For example: Download a file (e.g., JSON). Which would be more advantageous in this case and why??…
-
6
votes1
answer3804
viewsHow to select categories and count the number of products in each category?
I am trying to select the categories of the database and count in the same query the number of products registered in that category. So far so good, the problem is that I can not return to the…
-
6
votes5
answers27365
viewsRemove jquery field mask
I have this code to put mask on the field: (function ($) { $(function () { $("#txtCnpjPesquisa").mask("99.999.999/9999-99"); }); })(jQuery); Now here I must pass the field…
-
6
votes2
answers1559
viewsImage distortion with CSS?
I am in a project where the responsible designer gave me the following layout to pass to HTML + CSS: Can anyone tell me if there’s a way to do this with CSS3? I initially thought of a box-shadow,…
-
6
votes3
answers2852
viewsHow to force a download with ajax?
I am using PHP’s DOMPDF class to generate reports of accounts receivable with dynamic filters. The user selects the filters in a form and asks to generate, so far so good. But he will have the…
-
6
votes1
answer363
viewsDetect Caps Lock C#
I made an application to detect the state of caps lock in C#, but I found a problem, when the application loses focus events can no longer be triggered causing notifications to no longer be…
-
6
votes2
answers99
viewsHow to get the code from a Unicode General Category?
Java has the method Character.getType(char) to obtain the Category General Unicode of a character, but the return value is a int - corresponding to a constant defined in the class itself Character…
-
6
votes3
answers285
views"Gambiarra" in C# with XML, I would like suggestions for improvement
I have this code without the "gambiarra", which returns the list with the repeated values: var s = (from p in xmlDoc.Descendants("pais") let Nomepais = p.Element("nome-pais").Value let nomeconsulado…
-
6
votes4
answers22316
viewsSubtract two TIMESTAMP and receive the value in minutes on Oracle
Like subtrair two fields TIMESTAMP and receive the value in minutos in the oracle? DATAFIM - DATAINICIO = 2880 minutos (ou dois dias)…
-
6
votes5
answers6659
viewsBrowserify + Nodejs [Node: File or directory not found]
Situation I’m developing an extension for Google Chrome, and I need to use some Nodejs modules so I found the Browserify tool so I can add modules to use it in the browser Ambience I own Nodejs, NPM…
-
6
votes2
answers182
viewsDoubt about constant-time sorting algorithms
I need to solve a exercise with the following statement: As input we have a vector of n elements, where each element has a value between 0 and k. In addition we have two integer values to and b. We…
algorithmasked 10 years, 10 months ago Gustavo Nunes 167 -
6
votes4
answers6284
viewsHow does an empty constructor work?
Definition: Creating an empty constructor attributes if not set will be set to the default value of guy, example: int default value is zero. Context: Use a structure that returns entities from the…