Most voted questions
150,413 questions
Sort by count of
-
4
votes3
answers2052
viewsHow to avoid repeating html code?
Good night, you guys. The thing is, I’m using the bootstrap and I would like to know how I avoid repeating the same codes on all pages, because the header and footer are the same, it would make the…
-
4
votes2
answers67
viewsHow to reverse series of denied conditions without affecting logic?
Could someone explain to me why this happens? My apk only works right if I put denial and do something: public class Main2Activity extends AppCompatActivity { private EditText nome, teste, cpf;…
-
4
votes1
answer1938
viewsc# Nhibernate a Different Object with the same Identifier value was already Associated with the Session
I’ve been with that mistake for a while and I can’t find a good solution. Saving objects works normally, but for changes it returns me this message: Additional information: a Different Object with…
-
4
votes1
answer112
viewsAngularjs in "Big" project
I read by the literature that Angularjs is made for single page. And if I use the same for a larger application, with several screens. What would be the negative impacts of using Angularjs? And if I…
-
4
votes2
answers58
viewsSyntax error on another machine
I have a machine on which Python 2.6.6 is installed, in a certain part of a script I do the following command: with open('saida1.txt') as saida: for line in saida: if "]L" in saida: print line In…
pythonasked 8 years, 2 months ago Maurício Salin 251 -
4
votes1
answer4352
viewsHow to access the public Storage directory in Laravel 5.3?
I need to access images saved in the directory /storage/app/public in views, but I can’t, I have a 404. Here’s what I’m doing: <div class="row"> <img src="../storage/app/public/3.jpg">…
-
4
votes1
answer1780
viewsRemove characters from a field in Mysql
I have a table where I have several codes, I would like to get all the codes that start with the following sequence 1170 and remove the same. Example, the following code 11701287871 would be…
-
4
votes1
answer650
viewsInteraction graph in ggplot2
I’m trying to adapt some standard R graphics to the style of ggplot2. One of the graphs for which I intend to do this is the interaction graph in a linear model adjustment study. The following data…
-
4
votes2
answers355
viewsForeign Key does not respect referential integrity
I’m trying to put together tables and add one chave estrangeira, for example, a shopping list has referência of id from the buyers' table. I did it this way: alter table compras add foreign key…
-
4
votes2
answers59
viewsUnusual way to use a jquery function
This answer to a question brought something I didn’t know: a return with two pairs of square bracketsreturn[][] in a role, solving a problem in a simple but unknown way to me. The question called…
-
4
votes2
answers1376
viewsDelphi Berlin slow after migrating from a Delphi Seattle project
I migrated a project made in Delphi Seattle to Delphi Berlin and it became impossible to work on it because the autocomplete started to take about 20 seconds to show some suggestion. How to solve…
-
4
votes1
answer1934
viewsClass Factory Recovery Failure - Console Application
I have a Console Application that performs connection with the SQL. On other machines the application is working normally, but has one that has the version Windows Server Enterprise SP2 who is…
-
4
votes3
answers9438
viewsDelete confirmation with bootstrap
I’m making a web system using php + javascript + bootstrap, I need to make a delete confirmation using bootstrap, like an Alert asking yes or no, but in a beautiful model hehehe, the bootstrap has…
-
4
votes1
answer171
viewsHow to map two equal entities with Hibernate
I have a scenario where I have the entities Pedido and Usuário. The Pedido is composed of some attributes, among them the requester that is mapped as follows: @ManyToOne(fetch = FetchType.EAGER)…
-
4
votes2
answers498
viewsCheck values with 0 included in Count() even if they do not have values
I need to consult the number of banknotes issued with template 55 to create a report. The problem is that I’m needing to put zeroed values in the quantity column even though it has no value at all.…
-
4
votes1
answer1322
viewsHow to change the color of buttons when selecting a radio input?
I have this form When you check the "Bills to Pay" radio input, I need the buttons to turn red. I’m using Angularjs, so I used ng-if, but the code was quite extensive. How could I do it in a simpler…
-
4
votes3
answers216
viewsWhy is there an asterisk left?
I want the number of rows and columns to be equal to input data. Why is this last *? Code: #include<stdio.h> #include<math.h> int row = 0; char column = 0; int n; int main ( void ) {…
-
4
votes3
answers611
viewsVariable variable in php
I need to generate a variable with arbitrary name. I have the following code, which does not work: $vv = mysql_query("SELECT * FROM $tabela ORDER BY rand() LIMIT 3"); $i=1; while($v =…
-
4
votes1
answer2349
viewsWhat is the reference to Httpcontext.Getowincontext() ?
I had to abstract the Controllers of an application ASP.NET MVC for a Class Library because I’m using different technologies in the same application. However, I have the error:…
-
4
votes2
answers353
viewsWhat is the difference between @Url.Content("~/css/bootstrap.css") and only "/css/bootstrap.css"
I am learning to program an application based on MVC4 and Bootstrap. At the beginning of the project I came across a puzzle: In the _Layout.cshtml I had <link href="css/bootstrap.css"…
-
4
votes1
answer918
viewsDictionary reordering, exchanging values for keys
I have the following dictionary: tests_dict = {'test 1': ['Manuel', 'Mariana', 'Filipa'], 'test 2': ['Manuel', 'Filipa', 'Mariana'], 'test 3': ['Mariana', 'Manuel', 'Filipa']} What I need is for the…
-
4
votes1
answer669
viewsDecorating a Jtextfield with an icone
My question is whether it is possible to "decorate" a field, like Jtextfield or Jformattedtextfield, with an icon. An example would be something like this: Following an example, I made the following…
-
4
votes1
answer1327
viewsHelp JSON Delphi
Good afternoon! Could you help me read this JSON file in Delphi. I have tried several classes, including the native Delphi and I was able to read only the data of the first node, as status. I use…
-
4
votes2
answers1947
viewsJoin multiple files from a folder in R
I’m trying to piece together several xlsx files in R. For this, first I open the following libraries and use the programming: library(readxl) library(plyr)…
-
4
votes1
answer119
viewsWhat are Crosscuting Contracts? What is the relationship with Design by Contract?
What are crosscuting Contracts? What is the relationship with Design by Contract?
-
4
votes1
answer131
viewsDon’t send Push to users who no longer have the app?
I have a GSM PUSH panel and it turns out that when user installs the app I record his id to send future notifications. But after it uninstalls I continue with his ID saved in the bank and whenever I…
-
4
votes2
answers54475
viewsPlace Javascript function inside onclick
So it’s kind of a silly question, but I really need... has how I put a Javascript function inside a buttom in this example below it calls the function loadDoc(). more I would like to put the…
-
4
votes1
answer408
viewsSend email by calling Outlook 2013
To send emails use the function Sendemail: function SendEMail(Handle: THandle; Mail: TStrings): Cardinal; type TAttachAccessArray = array [0..0] of TMapiFileDesc; PAttachAccessArray =…
-
4
votes2
answers205
viewsAlert p/o programmer when opening Form (Designer)
When a programmer opens a specific form, I would like to send a notification (ShowMessage()) even for it to pay attention, for example, to the comments that are in the file header .pas in question.…
-
4
votes2
answers4792
viewsCheck if it already exists in the table before entering record
I need to include a record in a table, however before inclusion to avoid duplicity it is necessary to do a check. As I have a column ID with as property AUTO INCREMENT, I can’t use the INSERT IGNORE…
-
4
votes2
answers417
viewsIs using HTML5 tags as CSS3 switches a good practice?
Use the names of tags HTML5 as most CSS selectors is a good practice? Be it because I’m not creative to give names to ids or classes, or by wanting to make HTML code as clean as possible, leaving…
-
4
votes1
answer64
views -
4
votes1
answer78
viewsCheckboxes in Alertdialog always return the same values
I have a AlertDialog with a custom layout with 2 checkboxes. But even if I click one of these checkboxes, by clicking the accept or cancel buttons (alert.setPositiveButton or the…
-
4
votes1
answer214
viewsWhat is the difference between using the Enum Standardcopyoption constants?
I am implementing file copy and decided to use the class Files, and one of the signatures of the method copy() is to receive 2 parameters of type Path and a third of the kind CopyOption and this is…
-
4
votes2
answers1267
viewsVariable declaration before the main() function and after the main() function in C
What is the difference between declaring any variable (in this case number) before function main()? int number = 0; int main() { printf(" The number is %d\n", number); return (0); } and after it.…
-
4
votes2
answers164
viewsTypes of C#Methods calls
I have a question in the following case, not referring to dates, I used only as an example: Convert.ToDateTime("01/01/2016 00:00:00").ToShortDateString(); What is the origin of this method…
-
4
votes3
answers756
viewsGet larger number of items in a Python list array
I have a Python array composed of arrays. But these arrays can have different sizes. For example: matriz = [[1,2,3],[4,5,6,7],[1,2,3,4,5,6]] What I want to know is if there is a medium (some python…
-
4
votes1
answer160
viewsUsing Callable in java runs code sequentially
I am making a server in java wanted to perform certain tasks in parallel. I have a list of a certain type I want 20 threads to deal with elements of the list. for( Item item : result ) {…
-
4
votes1
answer152
views"Output" with special characters
I am using the GCC compiler version 5.3 for the following program, written in Aptana: #include <stdio.h> void main(void) { int positivo = 32767; int negativo = -32768; printf("%d +1 é %d\n",…
-
4
votes2
answers659
viewsKnow idle mouse time
I have an intranet system, which sellers attend some classes. Sometimes they leave the window open in that URL for days. The system via ajax, has a counter, so if the page is open, it keeps ordering…
javascriptasked 8 years, 2 months ago Luhhh 1,351 -
4
votes1
answer395
viewsUML aggregation X composition
Studying associations in UML ( aggregation and composition) I realized that the difference between them would be only the existence or not of the parts without the whole.…
-
4
votes1
answer161
viewsIs it possible to copy files without using a stream buffer?
In my application, I have a class that periodically performs a backup of a file, considerably small (less than 1MB), but I am doing some tests and after reading this answer, it seems to me that it…
-
4
votes1
answer350
viewsHow getTime works
I have 1 cookie script and it has a team system of course.. would like to understand this count: date.setTime(date.getTime()+(days*2*60*60*1000)); How long do I have in this count? *2*60*60*1000 and…
-
4
votes1
answer1902
viewshow to pass an input value with ajax and receive in php with the post method?
I needed to pass a field value html with the ajax and receive it in a variable in php on another page <script> $(document).ready(function(){ $("#botao").click(function(){ site =…
-
4
votes3
answers686
viewsHow to change a text variable to number value?
I have this segment of code, I’d like someone to help me turn the variable P (in which you take the attribute 'value' ) and turn it into number value for the sum. $(document).ready(function(e) {…
-
4
votes2
answers87
viewsScroll down when restarting with JS
I was hoping that when the page was uploaded, it would automatically go to the end of the page. I don’t want to use jquery because the project is relatively simple. It’s not necessary. I used the…
javascriptasked 8 years, 2 months ago Ericki 515 -
4
votes4
answers1390
viewsHow to change the dynamically displayed Layout
I want to do this, I currently have a Listview that is embedded within my activity_main.xml as follows: <include layout="@layout/lista_categoria" /> I would like to know a way to display…
-
4
votes4
answers6187
viewsHow to pick up element above Jquery?
I have the following elements: <p class="id-task">5</p> <p class="status-change"> <i id="test-task" class="fa fa-flask fa-lg" aria-hidden="true"></i> </p> I’m…
-
4
votes3
answers368
viewsHow to align the text in front of another element?
I managed to round the edges of the div I’m just not able to align the text in front of the div. My code is like this: .boxEtapas { overflow: hidden; } .etapas { margin: 0 auto; } .etapas ul {…
-
4
votes2
answers8606
viewsWhat is the difference between the angular foreach and the javascript map function
I would like to know the difference between using the angular.forEach and the function map javascript. ex: angular.forEach(meuArray, function(itens) {...}) meuArray.map(function(itens) {...});…