Most voted questions
150,413 questions
Sort by count of
-
4
votes2
answers151
viewsFilter filenames in uppercase and with a particular snippet at the end
I have some files named with person names, but some are completely uppercase, others completely lowercase and some even mixed case. I would like to set up a regex to, from a list, filter only the…
regexasked 7 years, 3 months ago user28595 -
4
votes1
answer528
viewsDetect proxy configuration in webrequest
Good afternoon my dear, I need to make a request for an api that stays in an external domain the local network, I perform this through a webrequest that was created this way: WebRequest myWebRequest…
-
4
votes0
answers40
viewsWhat is the purpose of using "{ }" keys to access the property of a class?
I was doing some tests with the magic method __get PHP and discovered a different way to access class properties, which is by using keys { }, see: return $this->{$bar}; I can also access the…
-
4
votes2
answers76
viewsHow to instantiate $Pdo = connect() without repeating?
For example I have a class called user: class User { public $nome; private $email; protected $senha; public function __construct(){ } public function insert($email, $senha){ require_once…
-
4
votes2
answers5747
viewsDisplay whether a person is of legal age or not
Can anyone help me with an exercise in visualg? is the following: the exercise asks so: Write a program that reads a person’s age. At the end, show whether that person is of legal age or not.…
-
4
votes1
answer86
viewsHow to handle ids with php?
while ($row = mysqli_fetch_array($result)) { echo "<li class='list-inline-item'><a href='news.php?id=" .$row['id']. "'>". $row['titulo'] ."</a></li>"; echo "<br>"; } I…
-
4
votes3
answers4235
viewsDifference between Console.Write() and Console.Writeline()?
What’s the difference between Console.Write() and Console.WriteLine()?
c#asked 7 years, 3 months ago who who who who 653 -
4
votes1
answer421
viewsHow to copy integer matrix for Mat type in Opencv?
Would you like to know how to copy an integer array to an Opencv Mat type data ? The following is an example I created to illustrate my goal, which corresponds to a given user generated matrix (…
-
4
votes2
answers197
viewsCheck if it is the class
How do I check with Javascript if it’s really that class in CSS? Example: if(é a class) { } or another example, if it is not the class if(!.minhaClasse) { } Is there any way to do this, with pure…
-
4
votes1
answer346
viewspreventDefault does not work
The next form: <form id="form_id" method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" autocomplete="off" onsubmit="valida_form()"> I have a function that checks…
javascriptasked 7 years, 3 months ago MagicHat 12,262 -
4
votes2
answers851
viewsSort items from a Collection from a preset value
I have a Collection of the Eloquent and I would like to order it through two fields at the same time being one of them a predefined value. Ex.: this one Collection has several objects of the type…
-
4
votes1
answer72
viewsPDO without JSON support
I need to return a line in JSON, but the PDO does not seem to give full support to operations. Always the error message type 245. PDO::prepare(): Unknown type 245 sent by the server. Please send a…
-
4
votes1
answer882
viewsHow to read a local txt file in Javascript
Hello I’m a beginner in Javascript and I’m watching some videos on youtube about reduce and my question is, in the video it puts a code at the top of the file. import fs from 'fs' But when I put…
-
4
votes2
answers151
viewsGPS still on after closing Activity
I’m using in my app, GPS and Google Direction. It’s working, but I noticed the following. After I return from Activity where you have the map, the GPS icon of the smartphone does not come out, it is…
-
4
votes1
answer7278
viewsCheck if a key exists in a dictionary
How can I check if a key exists inside a Python dictionary?
-
4
votes2
answers68
viewsWhy doesn’t the array value 1 appear in the explode?
When I create the code: $urlAtual = "https://www.meusite.com.br/customer/account/create/"; $parteurl = explode('/', $urlAtual); for($i=0;$i<=6;$i++){ $parteurldesejada = $parteurl[$i] .…
phpasked 7 years, 3 months ago Lucas de Carvalho 6,427 -
4
votes3
answers4922
viewspython recursive function to compute sum of the elements of a list
I’m having difficulty in an exercise where I have to show the sum of all the elements of a list recursively. The code I arrived has only the basis of the recursion, the recursion itself did not do,…
-
4
votes4
answers14424
viewsValidate form before sending
I have an HTML page with an email submission form. I need to check on the same page if the fields were filled in or not at the moment the user clicks the Submit button. Apparently he is ignoring the…
-
4
votes2
answers5956
viewsHow to run a Python command with JS?
I have a button and when clicking it I want js to execute a . py command on the server side. How do I do it?
-
4
votes3
answers280
viewsHow do I block access to setting parameters in a class?
import math class Circulo(): def __init__(self): super() self.__raio = None def get_perimetro(self): return 2 * math.pi * self.raio def get_area(self): return math.pi * self.raio ** 2 @property def…
-
4
votes1
answer186
viewsSchedule automatic updates on R
I have an algorithm on designed in R that retrieves data from a database, does some statistical calculations and produces a Dashboard with kpis and graphs generated from these calculations. But…
rasked 7 years, 3 months ago Bruno Rigueti 305 -
4
votes4
answers806
viewsAssignment of Java Arrays
I have two String Arrays and I have to compare them. After the comparison I must assign the repeated values in another Array. My problem is that I wish to assign only the Strings repeated without…
-
4
votes2
answers105
viewsinterpret string C#
hello, needed to resolve a string with an account (e.g. 2 + 2) in C# and return an integer (e.g. 4) static void Main(string[] args) { string str = "2 + 2"; int resultado = Calcular(str);…
c#asked 7 years, 3 months ago Jackson José Gomes Do Valle 85 -
4
votes1
answer1925
viewsCan I apply HTML/CSS to a pure C program?
The programming club I’m attending has completed a program that works as a stock controller and shows things that are available and things borrowed. It was made in pure C, so the display is quite…
-
4
votes1
answer280
viewsDoubt about Design Patterns - Idempotency Messages
I’m trying to create an application example that can call a function/method and that after a certain time it checks if the process has already been executed, if not, call the same function/method…
-
4
votes2
answers6058
viewsHow do I clean fields with angular?
I want to be able to clear the fields after Submit and also apply the action at other times, for example when clicking the "back" button used delete $scope.NomedaNgModel; But he doesn’t clean…
-
4
votes1
answer388
viewsWatermark with Wideimage With png
I’m trying to add a watermark via php with the library Wideimage. include 'WideImage/WideImage.php'; $img = WideImage::load($targetFile); $watermark = WideImage::load('../images/logowater.png');…
-
4
votes3
answers634
viewsHow to make my program consume less CPU without disturbing its execution?
I have a program that reads the memory of a computer process continuously (with the while (true)), but it ends up requiring a lot of CPU, arriving at 20% used, my question is, how to decrease CPU…
-
4
votes1
answer471
viewsHow does Polly’s Fallback work?
I’m trying to understand how it works Fallback by Polly, but I’m not getting the implementation right. From what I understand he executes another action if the first fails, but that’s not what is…
-
4
votes0
answers318
viewsI make a change in CSS but after Reload it goes back to normal
I have the following View: I want to, change the position of CheckBox, then on View we have a div: <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <div…
-
4
votes1
answer670
viewsUpload Image from Datasnap
I need to transfer images from Android to Server, I tried the code below but is giving the error, use Delphi Berlin: Exception class Ejniexception with message 'java.net.Socketexception: sendto…
delphi-berlinasked 7 years, 3 months ago Rodrigo Galvan 41 -
4
votes3
answers156
viewsHow to know the most used word in all records
I’m doing a top trendig system, but I’m very confused: How do I select to pull only the 10 most commonly used words on all records. However, the words are in a column and separated by a comma. NOTE:…
phpasked 7 years, 3 months ago Gabriel Henrique 61 -
4
votes3
answers7927
viewsDoubt about Struct and Pointer for Struct
I’m having doubts in my code about structs and pointers for structs, the doubts are as follows: 1) Because I don’t need to put (->) before speed, for example ( p->attributes->speed) in…
-
4
votes2
answers6999
viewsWhat is generalization and specialization?
In POO, what is generalization and specialization? Would there be some explanation in some technical way and a not so technical way? Simpler to understand, etc.
oopasked 7 years, 3 months ago Lucas de Carvalho 6,427 -
4
votes2
answers94
viewsHow to perform a Where using Entity Framework
I have a web application that I need to present a list containing some data, for that, I created the Model: Crm_Analise: public class Crm_Analise { [Key] public int id { get; set; } public string…
c# sql-server entity-framework asp.net-mvc-5asked 7 years, 3 months ago Thomas Erich Pimentel 3,059 -
4
votes0
answers2555
viewsHow to generate Banco do Brasil tickets with PHP registration?
I have a health plan management system that, among other things, has a sales module where new customers register and the system generates 12 tickets for the one-year contract. These billets are…
-
4
votes5
answers3695
viewsRegular expression to find bar
I need to validate a field and it must have the following format: two letters/numbers. Ex.: RN/1234567. The two letters will always be uppercase and the number quantity has no limit.
-
4
votes2
answers112
viewsWhat is the best way to monitor a value in a database?
I am working on an item management system, in which I need to constantly monitor the amount of items available. Upon reaching a predefined minimum threshold, the system shall issue the item in an…
-
4
votes1
answer1944
viewsIs it possible to delete a folder inside a repository directly from the Github site without using Git?
Delete a folder inside a directory directly from the Github website without using Git? I’d like to delete a folder, but I don’t know if it’s possible without Git.
-
4
votes1
answer850
viewsHow to put special characters with ::after?
Here’s the code, I want to put the character : h1::after{ content: © }…
-
4
votes2
answers4812
viewsHow do I check if there is a special character or number in a string in C?
I am confused in logic to check if it has other characters than alphabetic ones. I thought of the following logic, but I think it is wrong: char nome[30]; scanf("%s", nome); int especial = 0;…
-
4
votes1
answer303
viewsCurl Friendships/create, bad Authentication data
Good with the help of the Inkeliz, made in this question, i got authentication with Twitter via form. Filing cabinet login.php: <?php require_once '../modules/config.php'; require_once…
-
4
votes2
answers291
viewsSelecting part of a data frame and saving in loop
I have a date frame of more than 1000 rows and two columns (col1 and col2). How do I select n data frames (subsets of the original data frame) based on column 2 (only the same elements) by means of…
-
4
votes1
answer386
viewsIs it possible for a program to modify its own code?
I was developing an artificial intelligence program with neural networks, but what always left me chained is that every time I open the program, it will have to repeat the entire learning path to…
-
4
votes2
answers246
viewsAWK regular expression print inside brackets
look, inside my.txt file has the following description: Flags: X - disabled, E - established 0 E name="peer1_cymru" instance=default remote-address=38.xx.xx.xx remote-as=65555 tcp-md5-key="WUf4f8"…
-
4
votes1
answer173
viewsInitialization of attributes
Is there any difference between initializing an attribute like this: public class Turma { private List<Aluno> alunos = new ArrayList<Aluno>(); } Or so: public class Turma { private…
-
4
votes1
answer339
viewsUse IN or multiple OR? Which one performs better?
I have the following queries in Mysql: 1º: Using multiple devices OR SELECT SUM(qtd) FROM produtos WHERE qtd > 10 and (status = '0' or status = '4' or status = '7') 2º: Using IN SELECT SUM(qtd)…
-
4
votes2
answers2552
viewsClaims Identity MVC
I’m having difficulty implementing Claims to make user authorizations in my project, I’ve read a lot but I can’t execute it. I’m using in the project the Nhibernate.AspNet.Identity may be that for…
c# asp.net-mvc asp.net-mvc-5 asp.net-identity fluent-nhibernateasked 7 years, 4 months ago Eluander J. F. Lopes 400 -
4
votes0
answers96
viewsModem layout, is it possible to change?
When entering the configuration page of my modem 192.168.0.1 I have the following layout: I would like to reformulate this page, but I do not know if it is possible, I searched the internet and…
-
4
votes2
answers224
viewsDeployer of a Spring Boot Project
I’m deploying my first project in Spring Boot + Angular. I have a linux server (centos) where I took a tutorial to install Tomcat: tutorial The Tomcat is configured according to the tutorial, I’ve…