Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer1081
viewsDeclaration of key variables in Javascript
I recently saw a type of Javascript code, in some examples of Electron, which I believe is part of ES6. These are variable statements in the following format: const electron = require('electron');…
-
4
votes1
answer70
viewsError saving marked data in a query
I’m creating a Survey that will save the vehicles. For this I have to make a form divided into several pages but when I change the page the data marked on the radio Buttons are lost Controller def…
ruby-on-railsasked 8 years, 4 months ago C Junior 43 -
4
votes1
answer566
viewsHow to assign 60 more days in a date compared to today’s PHP date?
I am assigning today’s date in a variable, I would like to know how to assign today’s date plus 60 days. How would the syntax ? $dateIni = date('Y-m-d');
-
4
votes2
answers6935
viewsConcatenate values from the same column
How to concatenate the values of the same table Table example | Usuario | Formulario | Acao | Permitir | | Admin | Contrato | Imprimir | 1 | | Admin | Contrato | Consultar | 1 | | Admin | Contrato |…
-
4
votes1
answer105
viewsTyping box
I want to implement in my application the similar model of google Contacts. I’ve tried to put app:civ_border_width="1dp" in xml but also failed. I would like to do the same image below:…
-
4
votes2
answers331
viewsReading HTML pages with . NET Core
Next, I have a code that performs reading of a particular web page: private string GetCodePage() { WebRequest request = WebRequest.Create(URL); WebResponse response = request.GetResponse();…
-
4
votes2
answers2215
viewsChange Fragment by clicking on a button inside another Fragment
I have a button inside my Ragment that I want it to call another Ragment that is over the current one when it is clicked. follows the code of Fragment: @Override public View…
-
4
votes3
answers763
viewsI need to validate a TXT layout in C#
I have a TXT file where I need to validate the number of characters of each column according to the layout of each document. Note: Documents are all in one file *.txt In the second column is the…
-
4
votes2
answers3911
viewsWhat is the difference between data types Enum, struct and Union in C?
I am reading the GNU’s C manual and I’m in the data types section and I notice a certain similarity between the types enum, struct, and union. Is the syntax the same, or is there something that…
-
4
votes1
answer2366
viewsSQL Count and sum
I have 6 SQL codes and all search in the same table, it looks like this: +-----+-----+-----+ | A | B | C | +-----+-----+-----+ | 1 | 1 | 1 | +-----+-----+-----+ | 2 | 1 | 5 | +-----+-----+-----+ | 3…
-
4
votes1
answer92
viewsHow does one method work within another? E.g: service.metodo(arguments). execute();
I’m not understanding this method within another method someone explains it to me? Another example of my doubt: ImageKeywords keywords = service.getImageKeywords(image, forceShowAll,…
-
4
votes1
answer87
views -
4
votes1
answer51
viewsWhat does this piece of sql statement mean?
I have this instruction in the database modeling archive and would like to know what it is. 'price_type' enum("S" "M")
-
4
votes1
answer1052
viewsParameters of the scanf function
When studying the function scanf with a little more depth I arose a doubt about the arguments I put before the % when reading a string, ie scanf("argumentos...%s",minhastring), in the following…
-
4
votes1
answer291
viewsHow to model in a correct way
I have the following table structure: First: it is right this modeling? Second: is there any way to improve? Reduce the number of tables? The system will work as follows: Each Candidate has a…
-
4
votes1
answer150
viewsCreate an instance of jQuery from an array
I have the following array: var elementos = [$("#elemento1"), $("#elemento2"), $("#elemento3")] I need to create a function that "converts" this array into a jQuery instance, so I can use jQuery…
-
4
votes1
answer69
viewsPHP - Mysqli correct way
I’m starting to use mysqli in my projects, however I saw two ways to make a connection: One of them is simple and equal to mysql_connect $db = mysqli_connect(...); I saw in w3schools. Another is the…
-
4
votes1
answer1158
viewsDropdown dependent on each other
I’m using a function taken from this site: https://github.com/nodet07/Django-Related-DropDowns The function works perfectly, when I select an option in a dropdown, in the 2nd Dropdown already brings…
-
4
votes2
answers62
viewsCan only use get without the set in Object.defineProperty?
I need more information about attributes get and set of the method Object.defineProperty(). I understood that get calls a function when a property is read and that set calls a function when a value…
javascriptasked 8 years, 4 months ago Alef Rodrigo Pereira 81 -
4
votes1
answer153
viewsHow to write fields with sqlite3 accent via Python?
Hi, guys! I’m making a small program in python and using sqlite3 to save the database. The program is entering, reading and deleting data in the database called "position". I wonder if there’s a way…
-
4
votes2
answers231
viewsQuick search for a string or part of it in an Array
I have the following array: images = %W( droido 7midias vigilantes sebrae_mei dpe_saed websat ferpamweb dpe_chronus dpe_plantao promocast lolitaface dpe_intranet cha_bar clinica_sorriso…
rubyasked 8 years, 4 months ago Luiz Carvalho 3,644 -
4
votes1
answer290
viewsWhich regular expression would be more appropriate to validate a Cronjob expression?
I’m looking to learn a little bit more about regular expressions. I thought of a good exercise that will be validating whether a cronjob expression is correct or not. Therefore, the possible…
regexasked 8 years, 4 months ago Wallace Maxters 102,340 -
4
votes1
answer37
viewsProblem endpoint function R
I’m working with this date.frame: St <- data.frame(read.csv2("interest_LastMonthDay.csv")) Date AAA_S.t. Date.1 BBB_S.t. Date.2 CCC_S.t. 1 27/12/88 1,80400 28/12/88 0,8368 28/12/88 0,0080 2…
-
4
votes1
answer263
viewsPassing model via dynamic form parameter in . NET MVC
I created this function to generate a handle (or slug, how to prefer) for the model users, the problem is that I would like to make it more "modular", so that I can easily implement in any other…
-
4
votes1
answer140
viewsCheck errors in PHP file run by external url
Good morning, I am working with the service of checkout of Cielo and I’m having trouble getting treatment from url return, ie the file is called when there is an update in the payment, so I never…
-
4
votes1
answer954
viewsConnection Progress database by PHP (Laravel framework), PDO
I need to connect to a Progress database via php I am using the framework Laravel 5.2 however the same according to the documentation only has support for Mysql, Postgres, Sqlite and SQL Server…
-
4
votes1
answer1058
viewsData gets wrong when converting to Date in Javascript
Hello, I have an API in . net that returns the data, the date comes in format: 2016-06-17T00:00:00 and I try to convert it to date in Javascript, so I do the following: var data = new…
-
4
votes5
answers12363
viewsOne component on top of the other
I’m in trouble that I do not think how to solve, I have an Activity as in the photo below, the problem is, that when I emulate the application, the Button and the textView go down the two colored…
-
4
votes2
answers78
viewsFunctions with a number of "dynamic" arguments
want to construct a function that can have the number of variable parameters, as the function c, and how to access their addresses, for example: c(a = 1, b = 2, d = 9) #acessar a, b e d Has…
rasked 8 years, 4 months ago Wagner Jorge 1,377 -
4
votes1
answer2121
viewsFPDF - Bold only part of the string in Multicell
My problem is this, I’m doing an FPDF certificate, and there are parts of strings that have to be bold for ex: CODE: $nome="Marco"; $string1="Certifica-se que ".$nome;…
-
4
votes1
answer329
viewsHow to filter an array within a Collection in MONGODB - C#
I have the Collection PESSOA with a list of Languages as below: { "_id" : ObjectId("576be476ab76191bec2ff38c"), "Nome" : "Nome um", "Idiomas" : [ { "idioma" : "pt-BR", "descricao" : "Brasil" }, {…
-
4
votes1
answer3517
viewsDefault error for datetime field in Mysql
I had a problem trying to run my database script on the server. The error already gives in the first table that the script generates: CREATE TABLE IF NOT EXISTS `categoria` ( `cd_categoria` int(255)…
-
4
votes3
answers714
viewsIs filter_var() sufficient to avoid SQL Injection?
Handling input variables in a Mysql query using filter_var is sufficient to avoid Injection?
-
4
votes2
answers2630
viewsSee total records in Laravel
In certain part of my application written in Laravel I have this consultation: $counts = User::select(\DB::raw('count(*) as status_count, status')) ->groupBy('status') ->get(); It returns me…
-
4
votes1
answer114
viewsTime Usage with EF 6
I have a class with the following property. public TimeSpan TempoIdeal { get; set; } Estou atribuindo esta propriedade com TempoIdeal = new TimeSpan(days: 3, hours: 15, minutes:10, seconds: 0);…
-
4
votes2
answers605
viewsField format for saving time
Which field should I use in SQL Server to save a duration? Ex.: 2days 23H 47min 00Sec. If you have an example with Fluent API it will help a lot.
-
4
votes2
answers1829
viewsHow to print a decimal number with a dot, not a comma?
If I do: float a=5; System.out.printf("%d", a); His exit will be: 5.000000 How do I print 5.000000? I mean, I want to replace the comma with the dot.…
-
4
votes2
answers2568
viewsHow to use Materialize with Angular?
I’m developing a project, but even importing all the CDN, the angular and the materialize, the materialize Javascript does not want to work together with the angular, there is some kind of conflict…
-
4
votes1
answer421
viewsandroid - Image cache and display listview
Good afternoon, my friends, The thing is, I’m going to use Volley to get the data from the webservice, and so I write the list to my local BD with Sqlite. In this webservice will come a JSON with…
-
4
votes1
answer54
viewsTransactions does not work in structure creations/modifications?
I was looking on the internet if there was any way to run Transactions for operations of the type ALTER TABLE or CREATE TABLE in the Mysql. This is because in one of our systems, we used Migrations…
-
4
votes1
answer157
viewsLibrary equal to C# 6.0 runtime Interpolation string
Does anyone know of a library that interpolates at runtime on strings? I know it could be done using Replace(), but I don’t want to pass the list with all the variables. For example: Programa de…
-
4
votes2
answers4751
viewsHow to do Table Test for a particular algorithm?
I have this algorithm, in a pseudocode: Knowing that n1 receives the value 20. inicio inteiro: n1,n2,n3; leia (n1); n2<-n1*3; n3<-n1-1+n2; imprima("O resultado final será n3=",n3); fim.…
-
4
votes2
answers756
viewsProblems with calculating "TREE OF LIFE"
Good afternoon, I have a problem I need to do the following: Create a program, in C language, that calculates the size of the tree of life, after a certain number of growth cycles, taking into…
-
4
votes3
answers932
viewsError comparing numbers and checking if they are equal
I’m doing a simple C# exercise in which I have to receive two numbers, compare them and print out which is the largest or whether they are equal. When I start the program, I can only put the first…
-
4
votes3
answers563
viewsWhat does <!-- //--> mean in html / javascript?
I went through a problem where was presented a tag <script> and contained these HTML comment characters. Function example <html> <head> <script type="text/javascript">…
-
4
votes1
answer264
viewsCreate select with multiple fields
How to create a select that lists at least 03 tables and presents a field from each table at least ?
-
4
votes2
answers336
viewsWidth Search - error: 'str_no' undeclared (first use in this Function)
I have the following code on C, for a wide search: #include <stdio.h> #include <stdlib.h> #include <conio.h> //Variáveis globais int id = 0; int proximo = 0; //Função de Busca em…
-
4
votes4
answers1102
viewsHow to show data from 2 tables in a grid?
I am developing an application using Windows Forms and I wanted to be able to show the data of 2 tables in a gGrid, by SQL command I can do this SELECT SU.SUBCATEGORIAID, SU.NOME, SU.CATEGORIAID,…
-
4
votes2
answers1768
viewsTag caption on google maps
I created a dynamic map that displays multiple markers as per the user-specified query. When I cling to the marker, the information balloon usually appears with the data I requested to appear. So…
-
4
votes0
answers72
viewsApply a Transform with perspective
I would like to make the selection by perspective in a imageview. Where I select the 4 corners of the image and cut, following this idea: I searched all day and found little thing, I found this link…