Most voted questions
150,413 questions
Sort by count of
-
5
votes2
answers14521
viewsSort dictionary by Python value
I have a dictionary with the following format dic={759147': 54, '186398060': 8, '199846203': 42, '191725321': 10, '158947719': 4} would like to know if there is how to sort it by value and print on…
-
5
votes1
answer126
viewsShow information of a dataframe on a shapefile map
I have a table. dta that I already imported into the R. One of the columns of this file is called "Mun" and has the code of the municipalities of Brazil, a number of 7 digits. I lowered the…
rasked 7 years, 10 months ago Gabriel Herrera 51 -
5
votes3
answers414
viewsClose connection in another method
I have a class called JavaConnect and in it I have two methods: ConnectDB and DesconnectDb. Connection class: public class JavaConnect { Connection conn = null; public static Connection ConnectDb(){…
javaasked 7 years, 10 months ago Leo Bufalo 333 -
5
votes1
answer1182
viewsStatic functions in C
I noticed that some libraries use functions and static variables, for example static int sum(lua_State *state). This function belongs to a library that will be compiled into the language Moon. But…
-
5
votes2
answers124
viewsPython: How to store the documentation(help) of a class in a String?
I’m doing a Python class explorer. I can store class methods and attributes with dir(obj) and place them in a Treeview. I would like to display the references of this when clicked. For this I would…
-
5
votes2
answers894
viewsUpload/upload images with php
Form <label>Imagem do produto:</label> <input type="file" name="imagem-produto"> Script $foto = $_POST["imagem-produto"]; $tamanhoMax = 1024 * 1024; # 1MB if…
phpasked 7 years, 10 months ago Murilo Melo 2,272 -
5
votes2
answers110
viewsWhy is the output coming out like that?
I’m trying to make a program in which I use a list and this program returns 2 lists with pairs other with the odd. lista = [0,1,2,3,4,5,6,7,8,9,10] def par(numero): if numero % 2 == 0: return numero…
-
5
votes2
answers1518
viewsAPI of Mercadopago
I’m making a trolley system here to test the API of the marketplace. Everything is working, except the part about creating the payment that I have no idea how to get started. API Mercadopago I’m not…
-
5
votes1
answer28
viewsI cannot return another field other than the primary key using $project
I’m starting in Mongodb and would like to perform a consultation in my database of type: Which animals got sick in the year 2016? Using $group and $project: db.animais.aggregate([ {$unwind :…
-
5
votes2
answers3911
viewsHow to create local domains to test my websites and apps?
For my tests I would like to create a redirect from any domain to localhost:porta on a local computer, in Windows. I thought it would be possible by the hosts file on…
-
5
votes2
answers572
viewsDifference between Compact function and literal array assignment
According to the PHP documentation, the function compact. For each of the parameters passed, compact() looks for a variable with the name specified in the symbol table and adds it in the output…
-
5
votes1
answer338
viewsOpen text file in Python package
I’m creating a Python package where one of my programs needs to open a text file to read some information. This file is in the same directory as my source. When I run the program in the interpreter…
-
5
votes2
answers256
viewsSort the k highest results using dplyr
I can select the k greatest results from a table in R. For example, if k equals 5, I get the following result: library(dplyr) library(ggplot2) top_n(mpg, 5, wt=displ) # A tibble: 5 × 11 manufacturer…
-
5
votes1
answer192
viewsBug when reordering React component list
I have a component that loads a list of components <ComponenteReordenavel> which is reordered according to the user’s taste. The bug happens when I modify the style of that component and…
-
5
votes1
answer1657
viewsWhat does code 201 of a Request mean?
In research I saw that the code 201 of a Request means : The request was fulfilled and resulted in a new resource being created. But I didn’t really understand the meaning of it. What would be an…
-
5
votes1
answer138
viewsI can’t install the stringi package on Centos
I’m trying to install the package stringi in a cluster that rotates Centos 7, but I am failing miseravelvente. The error that occurs is below: ** testing if installed package can be loaded Error in…
rasked 7 years, 10 months ago Marcus Nunes 17,915 -
5
votes1
answer282
viewsinclude missing data
Good afternoon, i have the following problem. I need to put together two datasets that have 2 variables in common, "uor" and "mes". Only 1 variable has no values for a given month. And what I wanted…
rasked 7 years, 10 months ago Rafael Cunha 4,954 -
5
votes1
answer94
viewsUpgrade to PHP 7 Ubuntu
After updating PHP on my Ubuntu server my phpinfo() continues showing the previous version 5.5 even when executed php -v (returns to version 7.0). I’ve tried Re-start on apache and on php7.0-fpm and…
-
5
votes1
answer79
viewsType modifier: Type modifier
The type modifier register I have instructed the compiler to store the variable directly in the registers, however I do not see much its use in codes, this put, I have the following doubts: In what…
-
5
votes1
answer87
viewsWhy can I access normal functions before the declaration, but not anonymous functions?
In Javascript, you can use/use a function before its declaration. MyFunc(); function MyFunc() { return console.log('blah!'); } However, when it comes to anonymous and closures functions, it is not…
-
5
votes1
answer302
viewshow to increase the limit of ifelse in R?
I need to calculate the years of study from the Pnad questionnaire. I did a programming similar to this one below, but I have many ifelse within the other (121 to be exact), because I have a larger…
-
5
votes1
answer499
viewsPython "Attributeerror: __exit__" problem
In a group, I asked them to give me tips on some program to test my knowledge. He told me to create a program that reads a file called "arquive.txt" and manages files CHAR and STAGE, with the file…
-
5
votes2
answers80
viewsError in build Ionic framework
Gentlemen, I have migrated to linux and I have a question/problem. I already have the android sdk installed with their respective dependencies installed, I run the android command and open me the…
-
5
votes1
answer5696
viewsDownload failure when trying to update plugins in Wordpress
I did the installation of Wordpress locally, installed some plugins and now I’m trying to update the translations. What happens is that it does not update. Obs: use Easyphp and WP 4.6.1 It displays…
-
5
votes1
answer433
viewsAutomapper Entities Viewmodel
I am with a scenario where my context returns a query referring to two entities User and Cartaocreditousuario, as the following scenario below. During automapper action on my Viewmodel, is not…
-
5
votes1
answer152
viewsSharing JSON object between different clusters
Good afternoon, I would like to know how to share a JSON object between different clusters. I currently have 3 clusters listening to three different doors. And I need to have an object saved in…
-
5
votes1
answer739
viewsDeserialization of Object JSON morMot
I am trying to deserialize a JSON Object with an objectlist, following the example of the forum mormot does not work, someone can help me: Memo.Text :=…
-
5
votes1
answer3670
viewsWhat is savedInstanceState?
I’m new on android and want to learn more so I’m in github seeing some projects ready and I’d like to know what this is: @Override protected void onCreate(Bundle savedInstanceState) {…
-
5
votes1
answer3076
viewsHow to create text in a python image?
I wanted to create a text in an image, with python, to show a variable (whatever the format), e.g.: i have an image showing an A = 0, then I change a variable, refocus the image and it appears A =…
pythonasked 7 years, 11 months ago DoutorWhite 111 -
5
votes1
answer821
viewsReduce a string in C language
How do I reduce the size of a string in C? In my program it is implemented as follows: char nomeString[] = "nomedoarquivo.txt"; I intend to cut the ". txt" of the end of the string.…
-
5
votes1
answer1828
viewsHow to present the correct accent on the return of cmd?
Considering a method to list files from a folder using ProcessBuilder I have the incorrect return of the accented words. Code import java.io.BufferedReader; import java.io.IOException; import…
-
5
votes2
answers474
viewsValidation without "Modelstate.isValid"
I have the following scenario: [HttpPost] public PartialViewResult Create(string dados) { var clienteViewModel = DeserializeJson<ClienteViewModel>(dados); if (ModelState.IsValid) { } // Não…
-
5
votes2
answers5281
viewsBackup sql server express database using . bat
I created a file .bat with the content: USE T4FAT; GO BACKUP DATABASE T4FAT TO DISK = 'C:\Dropbox\MF-YCORN\BK_MF\T4FAT.Bak' WITH FORMAT, MEDIANAME = 'T4FATBackups', NAME = 'Full Backup of T4FAT'; GO…
-
5
votes1
answer315
viewsWhat is the difference between SCRIPT_FILENAME and REQUEST_FILENAME?
I am studying URL friendly, and in many examples I came across these two forms of writing: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d and RewriteCond %{SCRIPT_FILENAME}…
-
5
votes2
answers681
viewsDownload during installation by Inno Setup
I work with a company that uses Inno Setup to create the installers of its products, recently I was tasked with creating a better installer, one of the improvements that were suggested would be to…
-
5
votes2
answers134
viewsWhen do I need to use a class that inherits from an Arraylist of a kind? I don’t understand what that’s for
Example: public class ListaAdapterItem extends ArrayList<Item>{ } And I got a class Item: public class Item { private int imagem; private String nome; private String descricao; public Item(int…
-
5
votes1
answer358
viewsWhat is the amount of $_POST records of a dynamic input form?
I have a form with dynamic fields but I realized that when sending it limits to 166 records. In my form the fields are inside a WHILE so: <input name="contagem[]" type="hidden" value="<?php…
-
5
votes2
answers1043
viewsWhat is the default value for the "position" attribute?
In CSS, I know the property position can receive the values fixed, absolute and relative . Each has a different effect on the position of the element. But I was in doubt when I was asked the…
cssasked 7 years, 11 months ago Wallace Maxters 102,340 -
5
votes1
answer168
viewsIs it normal for APK made in Xamarin Forms, even empty, to be 60mb?
I have tried turning on the Linker, and be the recommended procedures. I wondered if it is normal an apk made using Xamarin.Forms start from 60mb. And if not, what to do to reduce the size.
-
5
votes2
answers828
viewsAbort Thread through another C#process
I am developing an application in ASP.Net 5.0, where it needs to start a task through a Thread Secondary, as the example below: //Inicia processo de pesquisa var ppBlo = new ProcessoPesquisaBLO();…
-
5
votes1
answer811
viewsMenu with space between li’s
My menu has spaces between the li’s. I’m using a reset css, but even though I didn’t need to already tried to put margin: 0; and padding: 0; na ul and ul li and it didn’t work, if you can help me I…
-
5
votes1
answer289
viewsTag Google Adwords Conversion Actions
Creating a campaign on google Adwords** has the part that needs to validate clicks if they have been effective. In "Conversion Actions" tools creates that script, which says the following that you…
-
5
votes2
answers1969
viewsHow to get the Primary key Identity of an inserted record?
I need to create a stored procedure to insert a game into my database. A game relates to a championship through the table campeonatoJogo. The tables are basically: create table jogo( codJogo int…
-
5
votes2
answers477
viewsCalculation of . scss for . Sass
I am creating a dynamic grid system using Sass and Gulp-Sass to compile. I have this code: $col-margin: 15px .row width: 100% max-width: 1170px margin: 0 auto display: flex flex-wrap: wrap // cols…
-
5
votes4
answers11013
viewsValidate phone number with optional ninth digit
How to validate phone number with the optional ninth digit? in the following formats: DDD + 8 digits = (21) 9876-5432 DDD + 9 digits = (21) 98765-4321
-
5
votes1
answer851
viewsJtable getValueAt() behaving differently than expected
I have a Jframe where there’s a Jtable that displays some data. When the user selects some records and clicks on a certain button, those selected records should be deleted. When only one record is…
-
5
votes2
answers103
viewsHow do I represent this using CSS?
Does anyone have a hint how to represent this using HTML and CSS? Without using Absolute position, just with edge or other thing. (That would be the image of the art I want to transcribe in css)…
-
5
votes2
answers13078
viewsrun git pull without asking for a password
I wonder if there’s a possibility that I can cache my password for my git user so that I’m not prompted for the password every time I perform a git pull from the server, remembering that I’m not…
gitasked 7 years, 11 months ago Jaison Pereira 53 -
5
votes2
answers689
viewsDo not send via POST elements within div "display None"
I want to remove the Ivs that are left with display:none with the function remove() jquery and when they are selected as display:block they come back.... because I want to send a form via POST that…
-
5
votes2
answers3089
viewsJS node - Mongodb x Mysql
Why every JS Node tutorial we see, is always shown example in Mongodb. What you both have that are so used? Why not use Mysql with Node?