Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer1244
viewsInsert array into database with Laravel
I have a form that returns an array with the values: Número: {{Form::text('tel[]')}} Proprietário: {{Form::select('proprietario[]',['Aluno'=>'Aluno','Pai'=>'Pai'])}} Tipo:…
-
4
votes1
answer417
viewsDifference between Listview and Listactivity
I’m having a little doubt, what’s the difference between a Listactivity and a Listview ?
androidasked 8 years, 11 months ago Alan Martins 123 -
4
votes2
answers1077
viewsImplement abstract method in Python inheritance
Be the following class hierarchy, where class "A" has an abstract method called "foo": # -*- coding: utf-8 -*- import abc class A: __metaclass__ = abc.ABCMeta def __init__(self): pass…
-
4
votes2
answers663
viewsHow to change setInterval delay programmatically?
I tried this way but did not succeed. My intention is to make as an effect of the Bézier curve. var count = 0; var times = 100; var fn = function() { count++; if(count === 25) { console.log(count,…
javascriptasked 8 years, 11 months ago Lucas Fontes Gaspareto 3,656 -
4
votes1
answer201
viewsI cannot remove a reference installed by Nuget
I installed the DLL Log4net for nuget. Since it’s in a different version of ours and a colleague gave it to me as usual, I deleted it from the folder and put the current one. When I build the…
-
4
votes3
answers57
viewsProblems with CSS opacity
I’m trying to put an image so it looks like this: but that’s not what happens, but watch my page; <div class="container-fluid"> <div id="conteudo"> <div id="apresentacao"> <div…
-
4
votes2
answers250
viewsHow to join the query string in Laravel 4 pagination?
How do I join query string in the 4-way pagination? For example: I have a data listing and on this screen I have a search filter. When I send a get to request the filter in the list by the url…
-
4
votes1
answer836
viewsHow to read a local json file using retrofit 2.0?
For API testing purposes, I need to read json files that would be my answer in API requests. Well, with Retrofit 1.9 it was possible to implement a "Client" and overwrite the "execute()" method to…
-
4
votes1
answer5292
viewsHow to make an HTTP GET request for a web service with Arduino
With a request via GET to a web service with Arduino, using the following URL and passing a parameter http://192.168. 0.1:8080/automation/Sensor? value=###, where ### is variable and is updated…
-
4
votes0
answers755
viewsWhy don’t government websites have safety certificates?
Why many Brazilian government websites often do not have valid safety certificates? Examples: https://www.ibama.gov.br/ https://www.ibge.gov.br/ https://www.funai.gov.br/ https://www.brasil.gov.br/…
security-guardasked 8 years, 11 months ago Rodrigo 189 -
4
votes3
answers155
viewsWhy should I use the typeof keyword to assign a data source to a Bindingsource.Datasource?
For example: BindingSource bs = new BindingSource(); bs.DataSource = typeof(object); Why should I use typeof(object) instead of just object or even "object"? Edit: As other people have asked,…
-
4
votes2
answers1071
viewsGuess a number, and in attempts, by the percentage show hints
I am trying to create a game in which the user must determine an interval and guess a random number that is generated within this range. When the user inserts a number to guess, the program must…
-
4
votes2
answers1652
viewsSQL Server: how to create range of values based on a column with monetary values
Hello, community! I need an SQL query with the values of a SQL Server 2012 table field shown as frequency distribution. Let’s say I have, today, the field Sales (in R$), type float. The lowest sales…
-
4
votes1
answer683
viewsSort lists with two sort criteria
If I have a list of lists like this: lista = [['ana','1'], ['joao', '3'], ['rita','2'], ['alice','2']] I first want to sort the list according to the numbers, to look like this: lista =…
python-2.7asked 8 years, 11 months ago CSAnimor 731 -
4
votes1
answer140
viewsrequestAnimationFrame, setInterval and setTimeout
I would like to understand more about the nature of these three functions cited above. What is the main objective for each one? In the case of animations, which is the best option for changes in the…
javascriptasked 8 years, 11 months ago Lucas Fontes Gaspareto 3,656 -
4
votes1
answer42
viewsGoogle javascript maps makers. What’s wrong?
I am creating a script to add the values of an array to a map (only positions 0 and 1), but nothing happens. in the console no errors. Script: function marcar(){ var marcacao = function(position){…
-
4
votes1
answer2259
viewsHow to send an object by parameter?
I have the following code snippet: <p:selectOneMenu id="agencia" converter="agenciasConverter" value="#{agenciasMB.agencias.agencia}" style="width:150px"> <f:selectItem itemLabel="Selecione…
-
4
votes1
answer1358
viewsCatch Penultimate record of a table with Entity Framework
How do I get the penultimate record from an Entity Framework table
-
4
votes2
answers1498
viewsHow to preview file . Md during editing?
I would like to create markdown documentation for a library on github. However since I have no way to preview what I am doing, it is common to make mistakes that are only discovered when the file is…
-
4
votes1
answer1504
viewsAdd line to a datatable
I need to add a row in a table at a given position. I have the following methods: public void criarTabela(DateTime dia) { tabela = new DataTable(); switch (dia.DayOfWeek) { //case DayOfWeek.Monday:…
-
4
votes2
answers421
viewsHow to write a recursive function?
I’ve been tasked with making this function recursive, but I have no idea how to do that. int existe (int x){ FILE *arq; int y; char buf[MAX]; arq = fopen ("cliente.txt","r"); fgets (buf,MAX,arq);…
-
4
votes2
answers1679
viewsHow do I generate random numbers and without repeating them in a time interval?
I am creating a 'game' in which it is necessary for the user to choose an interval, and in this interval, he chooses how many random numbers he wants to generate. However, in the random numbers…
-
4
votes1
answer302
viewsCommentary count // and /* */ in C
I’m trying to make a little program in C that opens a file .txt, .c or any other in read mode, to count the comments made with // or /* */. I’m doing it the following way: #include <stdio.h>…
-
4
votes1
answer3986
viewsHow to align checkbox and label with bootstrap
The result of this my form puts the checkbox and Abels in line, which is correct, but I can’t find a bootstrap class that makes the label aligned with the checkbox. How do I do it? <script…
-
4
votes3
answers1189
viewsPython NLTK method that returns a syntactic tree
I’m using the NLTK Forest library and I saw there that has some sentences with parse (syntactic tree) already created. However, I would like a method that from a new phrase it creates the parse in…
-
4
votes1
answer1246
viewsPrint special characters in c that are in a.txt file with locale library. h
My college late semester program has several screens that print large texts from arquivo.txt, however, as I do in c language, some characters do not appear, such as ç, é, ã...And so on and so forth.…
-
4
votes3
answers655
viewsHow to use a dictionary value to call a specific Python function?
I’m trying to use a dictionary to identify each function to a value, and call them over the program. My code is below (example): #!/usr/bin/env python menuOpt = { 1 : "valor", } #Main if __name__ ==…
-
4
votes3
answers1444
viewsList of questions, each question with a list of answers
I’m implementing a question and answer app. For my listing I am using a Recyclerview in which I load several Cardviews (coming from loading a list). Each Cardview shows a question. Below the text of…
android android-layout android-adapter android-recyclerviewasked 8 years, 11 months ago SpammingOff 387 -
4
votes1
answer605
viewsSearch for the option title using select2
I have a select element and I need to search the items (options) not only for the text, but also for the title (or any other attribute), I have already been able to put the title to appear when…
-
4
votes2
answers514
viewsC# how to do database search using parameters
I have the following code public DataTable PesquisarPorNome(string NomePesquisado) { try { DataTable tabela = new DataTable(); SqlDataAdapter adaptador = new SqlDataAdapter("SELECT * FROM…
-
4
votes1
answer8851
viewsHow to center a Modal Box Horizontally and Vertically with CSS3? Is it possible?
Man Modalbox(.modal-fade on Boostrap), is appearing at the top of the page! I can center it on Horizontal and Vertical using only CSS3? If yes, what would be the right way? Follow the code of my…
-
4
votes3
answers63
viewsCharacters " ' " and " f " appear in the textbox, how to correct?
We are using MVC5, I put a @Html.Textboxfor a Jquery function that does not allow the insertion of letters, but whenever the user type the characters " ' " and " f ", they are inserted and deleted…
-
4
votes2
answers84
viewsConflict between Jinja and Handlebars
How do I resolve a conflict between Handlebars and Jinja, since the syntax of both are similar?
-
4
votes1
answer69
viewsWhat are the advantages of passing a Function in jQuery’s "html" function?
I discovered by accident these days ago that in jQuery it is possible to pass a callback function to the function html. Behold: $(function () { $('body').html(function () { return [1, 2, 3, 4, 5];…
jqueryasked 8 years, 11 months ago Wallace Maxters 102,340 -
4
votes3
answers177
viewsCreate a table with dates
I am creating a table and I need the columns to be created as follows: Mon, 23 Nov | Tue,24 Nov | Wed,25 Nov | Thu,26 Nov | Fri,27 Nov | Sat,28 Nov | Sun, 29 Nov To create the Table I pass a date…
-
4
votes1
answer862
viewsRedirect user to Google Maps app
I’m developing a responsive website and using the Google Maps API to generate the company location map. I would like when the usurer was accessing the site by a mobile device and the same clicked on…
-
4
votes1
answer149
viewsWrite list in binary file
The idea of this method is to write all the words of a list of nodes in a binary file. I have a linked list of nodes, where each node has two information, its information, and a reference to the…
-
4
votes2
answers1621
viewsmPDF - Error generating PDF | Message: preg_replace():
I’m using mPDF to generate the PDF: $this->load->helper('mpdf'); $this->data['dadosboleto'] = $this->boleto_model->GerarBoletoCEF($id_cliente, $data_inicial, $data_final);…
-
4
votes1
answer233
viewsSeeking Binaria and Ordination
There is some more efficient way to do that same function and do not know why on my computer is not working the code. #include <stdlib.h> #include <stdio.h> void ordena(int A[],int n);…
casked 8 years, 11 months ago Matheus Francisco 650 -
4
votes3
answers818
viewsValidate Select jqueryValidate with Materializecss
I found a problem that I am not getting solution for a while, I am working with the framework Materializecss. It has validation with some direct notations in the HTML tag, what I’m not able to…
-
4
votes1
answer98
viewsHelp with SQL to find planes that have already done all routes
Assuming that there are 3 aeroplanes (A,B,C) and 5 routes and the Inserts (A-1; B-2,4,5; C-1,2,3,4,5), I intend to select only the aeroplanes that have already flown on all routes, in this case C…
-
4
votes1
answer99
viewsTransform class with static methods into interface
I have a custom class calling for ArrayList, I created to handle objects in a small project of mine, but I’d like to abstract it further, transforming it into an interface. In this way, I could…
-
4
votes1
answer360
viewsDisplay Average in an SQL query
I want to conduct a search in a query So far I have only been able to display the total value of the records. the idea is to show the spending average. Then it would be the (total / quantity)…
-
4
votes1
answer282
viewsMain location in a project with MVC pattern
Within a project guided by the MVC standard where the main() application should be located? Thinking a little I imagined it was the model, because it contains the most "complex" parts of code, but…
-
4
votes1
answer8783
viewsHow to set Grid View column width?
I would like to know how to define the width of the DataGridView manually. My first column has to have a fixed value and the other columns must "fill" the grid so that they are the same size.…
-
4
votes2
answers2019
viewsError while running project in Visual Studio 2015
When compiling gives sucessfull, but when I try to run my project I get this error below. Can someone help me or give me a hint? Use the visual studio 2015. Severity Code Description Project File…
-
4
votes1
answer86
viewsBreak a number into equal parts
I have the variable $peso ranging from 1000 to 50000 (grams) There is a table of freight I have as 1000a2000 => 10,00 2000a3000 => 20,00 ... 9000a10000 => 100,00 kg_adicional => 2,25…
phpasked 8 years, 11 months ago Laércio E. Kelen Crestani 43 -
4
votes1
answer893
viewsFile Exists PHP
I am using this function to check if the file exists: <?php header('Content-Type: text/html; charset=utf-8'); //header('Accept-Ranges: bytes'); $nome_real = $_FILES["Arquivo"]["name"];…
-
4
votes1
answer493
viewsHow to get processing data and memory from Windows system in Java?
How do I show in Java code Windows memory and processing usage?
-
4
votes2
answers185
viewsHow to pass an array as argument with the user defining the column number?
I’ll make a simple program just to illustrate my problem. #include<iostream> using namespace std; void recebeValor( int mat[][col]) // me da erro de comp; { mat[0][0] = 2; cout <<…