Posts by Umo • 324 points
15 posts
-
1
votes2
answers88
viewsA: Display a different video for each visitor
Jonathan, in the specific case of PHP, you will have to store this count somewhere, because after PHP’s process is over, all information is lost. In case I’ll use Redis. Redis is a database in…
-
4
votes2
answers1005
viewsA: Extract only the name of a file from the full path
Only one was missing #: arq=${dir##*/} will be teste.txt ${var#padrão} will remove only until the first occurrence of the pattern. ${var##padrão} will remove until the last occurrence of the…
-
2
votes2
answers88
viewsA: Display a different video for each visitor
Of course, that’s what "Cookies are for": https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies I’ve got part of the code on https://www.w3schools.com/js/js_cookies.asp You just need to create a…
-
0
votes2
answers413
viewsA: How to create batch files with variable
The same solution with Powershell: First you will run Powershell as administrator and enter the command Set-ExecutionPolicy Unrestricted This will allow you to run the scripts on your computer. Then…
-
1
votes2
answers413
viewsA: How to create batch files with variable
Face batch is very old, does not have many features. So recommend you see the Powershell, you will be able to automate a lot of things with this. I’m even using Powershell to catch the day of the…
-
0
votes1
answer1716
viewsA: Search all different elements of a column (pandas)
Usa unique() in the column, base["ip"].unique()
-
3
votes1
answer877
views -
0
votes1
answer37
viewsA: My script looking for a string in another string is taking too long
From what I understand you are making a filter. If so, the problem is that you are putting too much in memory without need. Python is no better for that, then search for an ETL like Kettle…
-
0
votes2
answers2072
viewsA: how to delete a column in a python csv file
The simplest way to work with csv is by using Pandas. Take a look at this tutorial https://medium.com/data-hackers/uma-introdução-simples-ao-pandas-1e15eea37fa1 The code: import pandas as pd…
-
1
votes1
answer4431
viewsA: How to remove a line in python txt file
Your problem is in this while posi in loginAndPass:. You delete the file in users = open("users.txt", 'w') and the code in the while will never run because you are looking for a int on a list that…
-
0
votes1
answer379
views -
0
votes1
answer187
viewsA: Simulation of Monte Carlo
The first-order simulation takes variability into account. And the second-order simulation also takes into account the variability and uncertainty of the parameter. Take a look at this article:…
-
0
votes3
answers122
viewsA: Module Operator invokes special object methods
They’re the same thing. Look at the library code from line 248: https://github.com/python/cpython/blob/3.7/Lib/operator.py # All of these "__func__ = func" assignments have to happen after importing…
-
1
votes1
answer699
viewsA: Function "=SE" with Excel "up" only works in column? but I did not proceed in line
If by =SE(A23:C23=2;$D$20) you mean to say: check if all values are equal to 2. So, this will always be invalid, unless the sequence is in the same column and it will still only check whether the…
-
1
votes2
answers403
viewsA: How to extract only the penultimate character from a sequence and then use auto-refilling in Excel
The formula got kind of big In the specific case of the penultimate value between spaces =SE( NÚM.CARACT(A1) - NÚM.CARACT(SUBSTITUIR(A1; " ";""))<1; ""; SE( NÚM.CARACT(A1) -…