Most voted questions
150,413 questions
Sort by count of
-
7
votes1
answer1002
viewsSemantically, which tag should I use for icons?
I have a navigation menu with some icons using @font-face. Each item in this menu has: the icon (with ::before); text, explaining the function of that link. .It turns out that when the page is…
-
7
votes1
answer9080
viewsMoving and removing HTML elements with jQuery
I’m having problems with the code below. In case I have two menus, the menu menuAprendido and the menu menuAprender and I have to add objects to menuAprender and move them to the menuAprendido, so…
-
7
votes1
answer867
viewsElement moves out of place in "out-zoom"
On this website, the menu is a ul inline, is inside the div with indefinite dark-colored width. In ul placed margin-left to align with the blocks below... It turns out that at another resolution or…
-
7
votes2
answers59
viewsAdditional field in a Database table for removal
I created a database, in which I have some problems when I remove some data from the table. Example Sales stand: I have a salesman who’s been fired and I want to remove him from the comic book but I…
-
7
votes2
answers5492
viewsRelationship 1 to 1 with Entity Framework
I have 2 entities: Equipamento and Databook. A Equipamento can only have one Databook and a Databook is only for a Equipamento. How can I make this relationship with Entity Framework? Follows the…
-
7
votes2
answers1160
viewsHow to develop a private Restfull API?
I need to develop a Restfull HTTP API in PHP to serve as authentication for users of an Android application, the problem is that as it is a public distribution application I can not define any key…
-
7
votes1
answer402
viewsPercentage of Equality of Texts?
Is there any method to know the percentage of equality of two texts (Strings) in Java? An abstract algorithm would also serve.
-
7
votes1
answer976
viewsHow to move files read by Streamreader in C#?
I am trying to move some files. For each file containing the word "TEST" in its body, my application indicates being a found item. The goal is to move them to another directory. Follow the code…
-
7
votes1
answer117
viewsInclude tag in the first word of a string
I don’t have much knowledge of regex, so I got this rule ready. $break_title = preg_replace('/(?<=\>)\b\w*\b|^\w*\b/', '<span>$0</span>', $title); return $break_title; The problem…
-
7
votes1
answer2867
viewsBackup all tables except one
In Mysql we can perform backups via terminal as follows: Database mysqldump nomeBaseDados > meuFicheiroBackup.sql Table mysqldump nomeBaseDados nomeTabela > meuFicheiroBackupDaTabelaX.sql How…
-
7
votes1
answer279
viewsCluster of servers on different networks
I am configuring a cluster of Tomcat8 servers. The servers are already doing load balancing (mod_jk), but I need to implement high availability (session replication). In the documentation I have,…
-
7
votes2
answers269
viewsImporting Packages Pycharm
Guys, I have a problem trying to use a project in pycharm.. I use xhtml2pdf and when trying to debug this error appears : However I already have the added Packages in the project: Does anyone have…
-
7
votes4
answers9003
viewsInvert a 3-digit number in C
I need to make a program that the user type a three digit number and the program reverses that number for example 123 -> 321, I’d like to know the logic to do that, because I can’t think of…
-
7
votes4
answers1357
viewsMargin in percentage is relative to what?
I’m currently seeing a youtube video on how to create a responsive website. It, at a certain moment (minute 24.55), establishes the margin of an image in percentage, instead of using normal pixels.…
-
7
votes4
answers28233
viewsHow to know the highest value of an Array?
I am making 1 calculator that adds values typed by the user and when the values of sums arrive in 1000 or exceed, the loop ends. So far so good, the problem is to be able to identify the largest…
-
7
votes4
answers23882
viewsHow to create a permissions control system
I have a PHP/HTML system and want to deploy a permission system. It would work as follows: 1) I have some pages that some features can only be seen for higher positions. Example: I have a search…
-
7
votes2
answers175
viewsLine size of a drop box down when we click on the "down" button
I have a list of Brazilian states created with the command select/option HTML5, When I click to choose the state, 20 lines(states) appear and overtake my text box down. I want to restrict the number…
-
7
votes2
answers218
viewsQuit two PHP Foreachs
I need to iterate several Collections and if I find a condition I should leave more than one iteration loop. Ex.: foreach ($order->getItemCollection() as $item) { foreach…
-
7
votes1
answer1025
viewsHow to turn hours into seconds in R?
I have the following schedules: 2:00:00 3:00:00 6:00:00 4:00:00 4:00:00 3:00:48 1:00:00 3:00 2:00:00 4:00:00 1:30:00 2:00:00 1:00:00 3:00:00 4:00:00 4:30:00 5:00:00 1:00:00 1:30:00 2:00:00 3:00 3:00…
-
7
votes2
answers2420
viewsChecking nearest branch of a zip code
I am working on a course system that has several branches. Within the register I have a zip code field and I would like him, through this zip code, to find the nearest branch. Is there an API or…
-
7
votes1
answer7986
viewsHow to make return with Ajax Beginform
I have my Form with the following statement: @using (Ajax.BeginForm("Novo","Cliente", new AjaxOptions { OnSuccess = "OnSuccess", OnFailure = "OnFailure" })) { } My duties in the js: function…
asp.net-mvcasked 10 years ago Rod 9,412 -
7
votes3
answers4546
viewsHow to make a foreach for an array of arrays?
How can I make one foreach for an array of arrays like this: array ( [option1] => 2 [option2] => array ( [name] => "ola mundo" [id] => "123456" ... ) ... ) The array can vary from…
-
7
votes2
answers290
viewsCenter a Div between two others, one at each end
Despite the tag discontinuation <center>, she still solved this my problem d eforma simple, but would like to know how to solve it just using css. The idea is to put two buttons (or div's) at…
-
7
votes2
answers455
viewsJAX-RS Resource as Session Bean or CDI Managed Bean?
Today I ran into an interesting problem trying to inject an EJB into a JAX-RS feature (in Glassfish 4.1, running the pre-installed version of Jersey). @Stateless public class MeuEJB implements…
-
7
votes4
answers2028
viewsIdentifying common snippets in two PHP strings
I need to compare non-standard strings in PHP. I have 2 strings as below: $primeira = 'asdasdasdTESTEasdasdasdasd'; $segunda = 'lkijlikjTESTEilkjik'; How do I dynamically know if the first and…
-
7
votes4
answers1550
viewsHow to make an external login authentication?
I need to develop a system to be used by the user. The user will be registered in another system, where we will have the registration, contracted plans and financial control of the same... The idea…
-
7
votes1
answer20429
viewsXML file with no associated style information
What is the meaning of this message? This XML file does not appear to have any style information Associated with it. The Document Tree is Shown Below. I have this message in a dynamically generated…
xmlasked 10 years, 1 month ago Marcos Vinicius 7,188 -
7
votes1
answer1894
viewsDynamic bind with prepare()
I am doing a function using PDO, when I try to use the PREPARE method the function does not end successfully, replace PREPARE with QUERY changing some arguments and worked. But my question is this…
-
7
votes5
answers5323
viewsHow to center a div with position:Fixed?
I wonder if it is possible to centralize a div with the position:fixed ? Currently I tried to centralize using the margin:0 auto but it didn’t work... unfortunately as the width of my div Fixed will…
-
7
votes2
answers142
viewsHow does the file receive the $_POST?
Good morning guys, I have to do a maintenance on an old form and I’m trying to understand how it works... Below the form_proposta.php file <? $msg = "Mais informações de imóvel enviado em " .…
-
7
votes1
answer16087
viewsHow to return vector size with sizeof()?
This is the code I’m using, but the return of the tamVet function is not the vector size, but the pointer size on itself. #include <stdio.h> int tamVet(int *vet){ int tam; tam = sizeof(vet) /…
-
7
votes2
answers19648
viewsLine break encoding ( n) in Javascript Alert()
Hello, I need to replace the string </script> transforming it into the string \n. The problem is that unfortunately my PHP project is with charset=ISO-8859-1, while javascript runs with UTF8.…
-
7
votes2
answers883
viewsWhen to convert a bitmap to string Base64?
I know that in the past it was necessary to convert an image to string, because of limitations with SMTP. My doubts are: What is the use of this practice today? Is there any performance gain…
base64asked 10 years, 1 month ago Felipe Avelar 9,507 -
7
votes3
answers176
viewsHow to get the line separation of the system
Some operating systems (i.e.: Windows and BSD) like to break lines with Carriage Return (CR) followed by Line Feed (LF), or \r\n. Already GNU/Linux, OS X and other Unix-like usually break only with…
javascriptasked 10 years, 1 month ago Oralista de Sistemas 23,115 -
7
votes1
answer581
viewsHow do I know if a resource is in the browser cache?
Is it possible to find out, via Javascript and without any additional HTTP request, whether or not a particular resource is in the browser cache? And if you are, get it too without that requisition?…
-
7
votes1
answer2089
viewsQueries in Asp.net mvc with Entity framework
I’m starting a project in ASP.NET MVC 5 with Entity Framework 6, along with studies in mvc. This to have a better learning, and I came across the following doubt. In the controller have the method…
-
7
votes1
answer898
viewsWhat is the difference between puts() and fputs()?
I know both functions are for display strings on screen. But what’s the difference between them? Which one is better to use?
-
7
votes2
answers2337
viewsHow to make "Replace" replace all occurrences of a word without taking uppercase or lowercase?
The function Replace supersedes all occurrences of a word or expression, but taking into account uppercase and lowercase: string str = "Hello WorLLd";//Substitui só os 'l' e não o 'L' str =…
-
7
votes3
answers233
viewsnullable on the models?
What is nullable for in a model? For example: public int? ProjectId; If I put it this way I’m accepting null values, right? And if I put the required Annotation in the property, being required it…
-
7
votes2
answers181
viewsWhy does date_diff count my date range wrong?
In that code of mine: date_default_timezone_set('America/Sao_Paulo'); $DataEntrada = new DateTime('19-10-2014');//data no formato d-m-Y $DataSaida = new DateTime('21-10-2014'); $interval =…
-
7
votes4
answers10471
viewsHow to capitalize the first letter of each word?
I would like to manipulate the way the person type their name when registering, to get only the first letter of their name in the upper box. The examples I found don’t do exactly what I need. In my…
-
7
votes2
answers3229
viewsHow to do this using @Renderbody from Asp.net MVC?
All screens in my system are Views and are rendered in @Renderbody in _Main layout I would like to change my layout and make it look like this: So, basically it’s like I explained in the image,…
asp.net-mvc-5asked 10 years, 1 month ago Rod 9,412 -
7
votes1
answer758
viewsSimple data replication in Postgresql
I created two tables with primary key and needed to replicate them, database but all on the same machine. How should I do this? The tables created are these: CREATE TABLE cities1 ( city varchar(80)…
-
7
votes1
answer9060
viewsHow to take the height of the div, leasing it to the nearest multiple of 24 and apply the result in the style="height" of the div itself?
I need a script that does just that: get the height of the div, round it to the nearest multiple of 24 and apply the result in the style="height" of own div. It needs to be pure Javascript, no…
javascriptasked 10 years, 1 month ago Boni 170 -
7
votes3
answers392
viewsString contains a certain word
I’d like to check if a string contains a certain word. String = "oi\ntchau\nhi\nbye" To string is divided by \n (jumps line), I would like to check between each line, if it contains the whole word,…
-
7
votes2
answers10050
viewsHow to use power notation in HTML?
How to format 2 numbers in power? Example: 2, 2 = 2² 3, 2 = 3² 5, 3 = 5³ 6, 2 = 6²
-
7
votes2
answers3994
viewsHow to calculate total table value with Javascript?
Imagine that I have a table with a number of rows that varies dynamically (that is, the user can insert more rows) and each row has two columns with two text fields: quantidade and valor. What would…
-
7
votes2
answers132
viewsHow to create a pop-up warning that the script has come to an end?
I would like to display on screen one pop-up notifying that the code just ran. The only script I have, follows below, is the one that opens a command window. system('CMD /C "ECHO O seu script chegou…
-
7
votes2
answers5639
viewsRescuing the last insertion in the bank with lastInsertId PDO
I’m trying to rescue the last id in the bank with lastInsertId() of the PDO, but nothing appears. OBS: I’m using the Postgre. <?php try { $dbh = new…
-
7
votes2
answers468
viewsWhat is the equivalent of if($_POST) on . Net (ASP.Net MVC)?
I’m coding a page in Visual Studio, in ASP.Net MVC and I need to display one div only when there is a POST on this page. This is a form that will make the POST on the page itself. When POST, I will…
asp.net-mvcasked 10 years, 1 month ago Felipe 427