Most voted questions
150,413 questions
Sort by count of
-
7
votes2
answers483
viewsLike taking multiple groups in a Regex?
public string site = "http://www.tibia.com/community/?subtopic=worlds&world=Aurera"; private Regex nomedochar = new Regex("subtopic=characters&name=(?<player>.*?)\" >"); public…
-
7
votes1
answer1041
viewsHow to customize a 404 error page in Codeigniter 2.1.4 using base_url()?
I would like to use a página de erro 404 but when accessing an image using the function base_url() does not work. How to solve?
-
7
votes3
answers12698
viewsDifference between dates
Every time I pass the difference in dates in the same month, it works, but when it’s between different months, a negative value comes. How do I make a difference between dates? See my code. The…
-
7
votes1
answer526
views503 redirect across multiple Urls with the exception of one
How to make a 503 redirect (maintenance code) throughout the site, but leave only one URL with access? Server: Linux (Apache) with PHP 5.5 and Mysql.
-
7
votes1
answer244
viewsHow to support user-added columns without updating the EF model?
I have an app C# with a model Entity Framework 6 "Database First" created from the basic structure of a database SQL Server, which belongs to a third party software. Users of this software can add…
-
7
votes1
answer275
viewsConfigure user.name
When I write the command git config --global user.name error occurs: could not lock config file z://. gitconfig No such a file or Directory. The installation was done by default on C: but when I…
gitasked 10 years, 6 months ago Carlos Ruy 73 -
7
votes1
answer1593
viewsRelationship between state, city, municipality and district
I downloaded an IBGE xml file with data from states, cities, municipalities and districts. I separated it into 4 tables and made their relationships. Follow the Sqlfiddle My question is: It’s right…
-
7
votes3
answers7057
viewsSystem of infinite categories and subcategories/children
I’m putting together a system of infinite categories and subcategories, simple to begin with. I found a script on the internet that meets the requirements, but its customization and adaptation to my…
-
7
votes2
answers402
views"Variable system" with regular expressions
I have a file like this: %usuario: 'Anônimo' Olá <b>%{usuario}</b> (This is just an example and this is not the real case), but I believe that if I were to explain the real problem it…
-
7
votes2
answers181
viewsHow to show the changes made in a SVN review?
I have a review number on svn. How do I (command line) show the changes that have been made in this revision? As far as I could: svn log -r XXXXXX But that way it only shows the text of Commit.…
-
7
votes1
answer1002
viewsHow to pass variables between PHP pages via Javascript?
I was doing a search in PT and EN on how to pass variables from one page to another via Javascript, although I found a lot of information continued with the doubt of which is the best way to do it.…
-
7
votes3
answers4237
viewsDate field 01/01/0001
I’m with a project Asp.net-mvc3 who owns a View that has a field to receive a type DateTime. In the database this field is required. The problem is that whenever I access the respective View, this…
-
7
votes2
answers315
viewsWhy are you giving Segmentation fault in my Assembly inline?
I’m trying to call the job execve("bin/sh"...) using Assembly, but in instruction: mov %rsi,0x8(%rsi) i carry a segmentation error. This is the 64bit version of the article code "Smash the stack for…
-
7
votes2
answers664
viewsHow to effect "cascade" with Javascript / jQuery?
Imagine I have a list of 20 blocks <li>, and that when the page loads, each of them should be shown within milliseconds of each other (this would be done with CSS3, so the code would only have…
-
7
votes2
answers969
viewsHow to do an optimization with inequality restriction?
Suppose I want to minimize the following function: -(5-(x1-2)^2-2*(x2-1)^2) s.a. x1+4*x2 < 3 For optimization problems without restriction I can use the following code. fr <- function(x){ x1…
-
7
votes4
answers1502
viewsDivs floats in a container with height auto
I’m having a problem structuring a layout with some divs one side of the other and when no more box fit they pass down. And the container main need to increase according to how many box you have.…
-
7
votes1
answer731
viewsIncrementing the Assemblyversion
I am creating an upgrade solution for an application I have and needed the Assembly version When placing an * on Assembly. [assembly: AssemblyVersion("1.0.0.*")] it started incrementing…
-
7
votes2
answers302
viewsConnecting the points to the regression line
Suppose the following database: Income <- structure(list(X = 1:30, Education = c(10, 10.4013377926421, 10.8428093645485, 11.2441471571906, 11.6454849498328, 12.0869565217391, 12.4882943143813,…
-
7
votes2
answers4328
viewsUse of multiple classes in a single CSS declaration
I’m learning a little bit about CSS and I’ve come to a question, so .header .menu .style-fonte {} Because it has the 3 names of a class header menu and style-fonte?…
-
7
votes1
answer3070
viewsTo sort a list of objects by TWO properties
On this topic: How to sort list with complex object by one of its properties? is explained as ordering by a property, but as ordering by two? Taking into account the following product class:…
-
7
votes3
answers16195
viewsHow to replace src of an img tag?
I have an html page that shows an image for each day of the year. Images are organized in folders for example /img/o1/o1.jpg (for January 1) and so on. My html is simple I want you to take today’s…
-
7
votes2
answers338
viewsHandle price in stock control
I’m making a stock control system in Java and came across a question about how to store prices. I’ve been reading that double and float are not good to store this kind of data and about a data loss…
-
7
votes1
answer25983
viewsHow to run PHP file from Javascript function?
I have the following structure for registering a new Mysql database account (Register.php): <?php $con = mysqli_connect("meu_host","meu_user","minha_senha","banco"); mysqli_query($con,"INSERT…
-
7
votes2
answers360
viewsTheoretical doubt - Interface, unique responsibility
Presentation: I created a photo.Cs class that should be responsible for: Calculate the angle of view of the lens; Receive lens zoom (in mm) Receive the cut factor (value multiplied by the lens zoom…
-
7
votes1
answer473
viewsHow to generate correlated variables in R?
I managed to create the uniform variables X and W, both with normal distribution, using the formula rnorm in the R. However, I wanted to create variables so that they had a -0.8 correlation value.…
-
7
votes7
answers6999
viewsSplit() integer with Javascript
Valor = 19.90; MyArray = valor.split("."); the code hangs , whole variable, however if, Valor = "19.90"; MyArray = valor.split("."); alert(MyArray[0]) = 19; alert(MyArray[1]) = 90; I would like to…
-
7
votes2
answers5079
viewsHow to count records (SELECT COUNT) in Linq
How to count records that a query would return in Linq (Entity Framework) in C#? The equivalent in SQL is to do a SELECT COUNT(*). Note that I want to receive the count of records straight away,…
-
7
votes2
answers1564
viewsCSS/jQuery selector for a table column
Is there a CSS or jQuery selector that takes a column from a table (each td column)? Or, if there isn’t a simple selector that can do it, you can do it with a little code in jQuery/Javascript?…
-
7
votes1
answer3943
views -
7
votes1
answer3147
viewsHelp with setting up Dbcontext with Entityframework using good practices
I have my application divided into layers with Class Library and my layer with the Entity Framework, where I set up the DbContext, is the Repository. My inherited Dbcontext class: public class…
-
7
votes1
answer6370
viewsHow to clone an element with jQuery and add a new name?
I’m using the plugin jQuery Cloneya to clone elements of a form with jQuery, but it is a little limited, wanted to clone the inputs but I need to increment the name when this is done, for example:…
-
7
votes3
answers3657
viewsHow to group records by time range?
I have a table in Mysql, which stores visits on my site, having as fields: id | ip | date, being the date of the kind DATETIME. What I need is to separate these visits by peak hours. Example: Das…
-
7
votes3
answers232
viewsChange CRT file to byte
I need to convert a file .crt byte to be able to send by socket. This code works in Java, but how would I write it on Android? Path path = Paths.get("sdcard/certificado.crt"); byte[] certificado =…
-
7
votes1
answer462
viewsUsing Cookies or Databases?
I need to create a cart where you store more than one data Example: ID_PRODUTO, ID_VENDEDOR I would like to use Cookies pro system get lighter, but I found a big problem, the Cookie stores the data…
-
7
votes2
answers358
viewsReference in Flyweight design pattern
There’s something about Desing Pattern Flyweight that’s really getting me confused. Briefly, the pattern says that to save memory in a situation where you use several similar objects, you use a…
-
7
votes2
answers1259
viewsDifference in performance and use situation of numerical types
I’d like to know the difference between the guys Long, Double, Float, Decimal and Int, taking into consideration when is the best use in real cases. Ex: "uses float in interest as it is...". And…
-
7
votes1
answer233
viewsTrack navigation with Analytics from single pages that have Javascript navigation
I recently created a personal page and would like to track the most visited areas of the site. The problem is that the page is composed of a single file (ex: index.html) and the navigation is all…
-
7
votes1
answer541
viewsCustom Roleprovider
I am implementing an authentication with RoleProvider Custom. I have a class Usuario and a class Role with Many to Many relationship. I created a folder in the project called Security and inside the…
-
7
votes2
answers20732
viewsStatic search list using Javascript instead of PHP
In my work, I created pages as a static phone book to facilitate the search for them, but since there are many names, I would like to create a search field, but it is not possible to do this without…
-
7
votes3
answers408
viewsHow to index and update a user comparison system?
I have 2 tables with user characteristics and interests in a Mysql database with innoDB Tabela Carateristica id nome sobrenome cidade estadocivil altura peso fisico pele olhos filhos querofilhos…
-
7
votes1
answer339
viewsHow to declare constants in R
when I went to reproduce the example of the question "How to turn a string into Date format in R?" the command tab<-readHTMLTable(u,header=T,skip.rows=1) failed. The error happened because in my…
-
7
votes3
answers546
viewsRun program inside Try/Catch
Working with Visual Studio, when an error occurs while the program is running the program hangs and you can’t see where the program crashed and only appeared that error screen. To catch where these…
-
7
votes2
answers4567
viewsHow to turn a string into Date format in R?
In the code below the dates are in the format: Mes Dia Ano. I need R to recognize the variable as date. #importa os dados library(XML)…
-
7
votes3
answers1552
viewsHow to download an image from the internet with C#?
For example, I need to download a sequence of images: http://www.simepar.br/site/fragmentos/radar/simepar_24.gif http://www.simepar.br/site/fragmentos/radar/simepar_23.gif…
-
7
votes1
answer765
viewsHow do I search for profiles with characteristics similar to the interests of another profile on a relationship site?
I need to select several clients from a site of relationships that I am developing and sort by compatibility with the person’s profile IE, the more similar characteristics the greater the…
algorithmasked 10 years, 7 months ago RodrigoBorth 4,475 -
7
votes2
answers1163
viewsWhen to use instance variables vs parameters?
Assuming that a class A use a class B (directly or through an interface C to uncouple A of C). Making it clear that A and B are independent parties, i and.., the relationship between the two classes…
-
7
votes2
answers4310
viewsHow to prevent a property from being mapped to an entity in the Entity Framework?
I need to enter a property in the model class, but when I enter the code first, it says the table already exists and changes have been made. My code: public class Data { [Key] public int Id { get;…
c# entity-framework asp.net-mvc-4 property code-firstasked 10 years, 7 months ago Luciano Azevedo 402 -
7
votes1
answer4778
viewsHow to read content from a Javascript site?
I would like to know how to read content from other web pages using javascript or some library only. For example, from a remote news site, in this case: www.terra.com.br. And I would like to create…
-
7
votes3
answers1689
viewsHow to read file passing part of the name in Java
Example.: The name of my file would be 001nome.txt, this file will have a varying action on the name depending on the entity, ie one time it may be 001nome.txt another time it may be 999nome.txt.…
-
7
votes2
answers787
viewsHow to build a complete XML in T-SQL?
I am working on a project that returns an XML field, so far not bad. The problem arises when I have initial data coming from a query and intermediate data coming from another query. I tried to solve…