Posts by Wallace Maxters • 102,340 points
1,984 posts
- 
		1 votes1 answer1179 viewsA: How to start ASP.NET Status Service?The solution was very simple: 1 - Open the services.msc through the Windows "Run" command. 2 - Search for the service Asp.NET State Service 3 - Click on Iniciar. 4 - If you want it to run… 
- 
		3 votes1 answer1179 viewsQ: How to start ASP.NET Status Service?I set up mine Web.config with the following instruction: <sessionState timeout="30" mode="StateServer" /> But when I run the application (an ASP.NET site), I get the following error: Session… 
- 
		3 votes1 answer342 viewsA: Receive date and time without separators and convert to date formatUse the method DateTime::createFromFormat. You must pass the date input format in the first parameter. In the second parameter, you must put the string containing the value that will be interpreted… 
- 
		1 votes1 answer1069 viewsA: Paging with ajaxIf you want to make the pagination via ajax, I suggest a small edition in your code. In the section where you place the link with the url number on href, I’d put in a data-href and take this value… 
- 
		4 votes2 answers1543 viewsQ: What is the purpose and how to use Broadcasting in Laravel?The version 5.3 of Laravel has some news, as the Broadcasting, for example. I read the documentation, but I could not understand very well on the subject. I saw that it has some relation (whether… 
- 
		0 votes4 answers115 viewsA: How to avoid the repetition of requires?You can use the Composer. You can create a file composer.json so at the root of the project: { "require": {}, "autoload" : { "psr-4" : { "" : "src" } } } Where "" would be the namespace. However as… phpanswered Wallace Maxters 102,340
- 
		1 votes1 answer781 viewsQ: How to add new domains to Let’s Encrypt SSL certification while maintaining existing certificates?I already have some domains using Let’s Encrypt SSL certificate. Through command certbot-auto, i install a certificate for a particular domain. For example: sudo certbot-auto --apache -d meusite.com… 
- 
		2 votes1 answer781 viewsA: How to add new domains to Let’s Encrypt SSL certification while maintaining existing certificates?To do this, simply use the command certbot-auto combined with the option --expand, and -d, to add the desired domains. sudo certbot-auto --expand -d dominio1.com.br,dominio2.com.br In my case, the… 
- 
		8 votes4 answers3000 viewsA: Equivalent to the conditional or ternary operator in KotlinThere are no proper ternary expressions in Kotlin (until the current version). I think the closest thing to the ternary in Kotlin would be this: val max = if (a > b) a else b There are also other… kotlinanswered Wallace Maxters 102,340
- 
		3 votes2 answers1008 viewsQ: What is " x" in the Python strings?I replied a question here on the site where there was the following string in the Python language:… 
- 
		8 votes1 answer276 viewsA: How to convert Python encryption to PHP?I understand that the excerpt from your Python code "\xf7\x1a\xa6\xde\x8f\x17v\xa8\x03\x9d2\xb8\xa1V\xb2\xa9>\xddC\x9d\xc5\xdd\xceV\xd3\xb7\xa4\x05J\r\x08\xb0" be a salt. So, first, it should be… 
- 
		3 votes3 answers94 viewsQ: How to reference the first loop from the second in a chain of loops?In PHP, how can I reference the first for from the second, as in the example below? for ($i=0; $i < 10; $i++) { for ($j=0; $j < 10; $j++) { // Quero que esse afete o primeiro `for` e não o… 
- 
		2 votes3 answers213 viewsA: What’s a Kotlin label for?It is necessary to understand that, in the exemplified code, the label aims to mark the beginning of the expression, in the case of the for (i in 1..100). The advantage of this is that it is… 
- 
		8 votes3 answers213 viewsQ: What’s a Kotlin label for?In an example of loops in kotlin documentation, we have some codes with the following excerpt: loop@ for (i in 1..100) { for (j in 1..100) { if (...) break@loop } } From what I read in the… 
- 
		4 votes2 answers1264 viewsQ: How to read a file with Kotlin?I have a file .txt with some information I’d like to read to a string through Kotlin. I am a beginner in language and would like to know how to read a file with Kotlin. 
- 
		13 votes2 answers6409 viewsQ: What is a stream?In both PHP and C#, languages I’ve been using in my day to day life, I’ve come across a common term: Stream. Whenever I hear the word Stream, the first thing that comes to mind is Youtube, among… 
- 
		1 votes3 answers130 viewsA: Array listing with start and endYou can use the function array_filter to make the calculation. In PHP, even if it is string it is possible to make comparisons: $horas = array_filter($array, function ($hora) use ($inicio, $fim) {… 
- 
		14 votes1 answer920 viewsQ: What’s the point of double exclamation before the method call on Kotlin?I’m studying Kotlin. I realized that in converting to the type int, it is necessary to place the double exclamation (!!). Example: var input = readLine()!!.toInt(); Generally in other languages,… 
- 
		9 votes3 answers189 viewsQ: What happens in the expression "$a+++(+$a)"?I was playing with PHP to see if I could find something that sounded strange with the syntax, inspiring me in the question What happens in 1...1 in PHP?. I just came across the code: $a = 0;… 
- 
		3 votes2 answers2391 viewsQ: In PHP, is there a difference between Double and Float?In some programming languages, Float and Double, although similar, are not the same. But apparently in PHP there is no difference between these two types. Is there any special reason for this?… 
- 
		4 votes2 answers2274 viewsQ: How to use an angular input checkbox using Array?I’m trying to use a Array in a input[type=checkbox] with Angular 1, but was unsuccessful. angular.module('app', []) .controller("Ctrl", function ($scope){ $scope.campos = [{nome: "Brasil"}, {nome:… 
- 
		4 votes2 answers2274 viewsA: How to use an angular input checkbox using Array?My solution to this was not to use the ng-model. Instead, I set a function executed when there is a click on checkbox and check if the item is selected through the indexOf in the directive… 
- 
		4 votes2 answers4790 viewsA: How to go up and configure a project with Laravel on the serverWhen you upload an Laravel project to the server, you must configure the Virtual Host to point to the folder public of your project, because as the folder name says, this is the folder that should… 
- 
		3 votes1 answer111 viewsQ: How to create metadata (custom data) on an Laravel route?I wonder if in Laravel, beyond the information I already have on a route, as the name, action or uri, there is some way to define metadata. For example: Route::get('/', [ 'uses' =>… 
- 
		3 votes4 answers130 viewsA: How to apply a rule to a specific element?Use a specific selector for id and add the id in your image. <img id="imagem_especifica"> <style> #imagem_especifica { -webkit-filter: grayscale(100%); filter: grayscale(100%); }… cssanswered Wallace Maxters 102,340
- 
		6 votes2 answers1758 viewsA: I can’t clone repository with git bashIf the repository is public and is giving this problem, you can use the HTTPS URL to clone. Instead of using git clone [email protected]:phplegends/sysv.git use git clone… 
- 
		1 votes2 answers2962 viewsA: How to total fields in Lade using Laravel?In Laravel the object returned in the query is the Collection. It has a method called sum, that you can use to add up specific fields (only that the sum is based on the results loaded by PHP, and… laravelanswered Wallace Maxters 102,340
- 
		3 votes3 answers58 viewsA: Why does the use of parentheses affect a mathematical expression combined with a concatenation?In the expression echo "Você nasceu em ". date('Y') - 20, you are subtracting the string concatenation with the date. For you to understand better, it would be the same thing for you to do it: echo… phpanswered Wallace Maxters 102,340
- 
		0 votes1 answer197 viewsA: How to set the line height of an Excel in NPOI?I discovered that there are two properties in IRow which allows the definition of line height: IRow row = row.CreateRow(0); row.Height = 10; row.HeightInPoints = 20; The error was happening when I… 
- 
		0 votes1 answer197 viewsQ: How to set the line height of an Excel in NPOI?I am trying to create a line in an excel file through the library NPOI. The problem is that I don’t know how to set a line size. Currently, the line is covering the text content. How can I set the… 
- 
		2 votes3 answers3678 viewsA: Can I upload folders along with the code on Github?I like to do it the way I learned to do it in the projects at Laravel. When I need to have the folder in production, but I don’t need the files inside these folders to be monitored, I create a… githubanswered Wallace Maxters 102,340
- 
		2 votes1 answer360 viewsQ: How to put the background color in the first line cells using NPOI?I am using the NPOI library to generate an Excel file. It is the first time I am having contact with this library and would like help to put background color in the cells of the first line. My… 
- 
		6 votes1 answer2702 viewsQ: How to extract and compress files with System.IO.Compression.Ziparchive in c#?I’m starting in C#. I saw that there’s class System.IO.Compression.ZipArchive to work with zip files. I have some doubts: How do I unzip an existing zip via Ziparchive? How do I compress to an… 
- 
		5 votes1 answer137 viewsQ: How do temporary folders work?I was wondering about that today. In both Unix and Windows operating systems, we have a specific location where temporary files of all kinds are played. It is obvious to think that if the folder is… 
- 
		3 votes2 answers851 viewsA: Sort items from a Collection from a preset valueUsing the Collection, i replaced the method sort for SortBy. The method sortBy causes Laravel to internally compare values according to types, through the sort (something like what you asked in the… 
- 
		2 votes1 answer676 viewsQ: Incorrect mime for XLS filesI am doing a migration of a particular system written in ASP.NET (site) and in a certain part of that system there is a place where you upload a file XLS. There is a check against the mime type of… 
- 
		1 votes1 answer61 viewsA: What is the purpose of these functions prefixed by "msg_" in PHP?According to the documentation, within the set of specific functions for process control, this function library has the purpose to provide functionalities to work with System V IPC. You can… phpanswered Wallace Maxters 102,340
- 
		45 votes6 answers109646 viewsQ: What does the error "Script execution disabled on this system" mean?I was testing some things from PowerShell ISE so you can build some scripts. I realized that while I was running the script without saving the file, the commands were executed normally. However,… 
- 
		16 votes4 answers4728 viewsQ: How to write values to the Mysql database using PHP?I have a database that I created in MYSQL with the table called publicacoes. This table has the fields id, titulo, conteudo and data_publicacao. I would like to know how to insert values in this… 
- 
		6 votes4 answers1424 viewsA: How to continue incrementing the value of a variable even after a page is reloaded?As was said by David Santos, when reloading the page the values are not saved. They are recorded there only at runtime, after that they are removed from memory. In PHP, there are several ways to… phpanswered Wallace Maxters 102,340
- 
		2 votes2 answers129 viewsA: Why can’t I declare an attribute as an object?Just a complement to the other answer, you can only define values as variables, class instances, and function calls to a class if you use the __constructor method. In your case. class B{ protected… 
- 
		3 votes3 answers106 viewsA: Is there any way to interpret (parser) from a string Connection to an object?I’d also like to give my two cents here. After taking a look at the Stackoverflow, I learned that there is a specific class to do this work: System.Data.Common.DbConnectionStringBuilder. I made an… 
- 
		6 votes3 answers106 viewsQ: Is there any way to interpret (parser) from a string Connection to an object?There is a certain library that I am using where I need to pass separately as parameter, separately, the connection values with the database: Username, Password, Host and Database. I took this… 
- 
		6 votes3 answers2223 viewsQ: How to delete files from a recursively expression-based folder?I’m using a project where there are several temporary files that, for some reason, have not been deleted over time and that are taking up a lot of space. I need to delete all images from this… 
- 
		4 votes3 answers2714 viewsQ: Failure to log in to an IIS application when trying to connect to SqlserverWhen I run an application of the type website in visual studio, database connections work normally. But when trying to run IIS 7 to perform some tests, I get the following message: Unable to open… 
- 
		5 votes1 answer221 viewsQ: Is it possible to use Websocket connections in Apache?With the emergence of Websockets in the browsers, I also had the interest to make some implementations in some applications. Of course with the idea comes the initial doubts. One of the questions I… 
- 
		3 votes4 answers1252 viewsQ: What are ASAX extensions for?Finally, I started working with C#. I am working on a SITE project and I am using Visual Studio. I came across a file where apparently you should put the global settings there, which is the… 
- 
		20 votes3 answers25651 viewsQ: What is the equivalent of the grep command in Windows?Under Linux, when I want to filter by a term when a command will generate giant list, I use the command grep. For example: ls | grep "termo" However, in Windows there is no command grep. What would… 
- 
		4 votes3 answers205 viewsQ: How to get mime from a file through Python?How can I get Mimetype from a file through Python? I’m not just talking about getting through the extension, but also reading the file metadata. How can I do that? Note: I tried to use the… 
- 
		6 votes3 answers1515 viewsA: Is there any nomenclature for variables defined by underline/underscore?I know this separation by the name of Snake Case. According to the Wikipedia reference, the name Snake case was created by the Ruby community. Examples In some languages, it is common to see…