Posts by Guilherme Lima • 3,129 points
137 posts
-
0
votes0
answers14
viewsQ: Permision Dennied Pycharm Docker
I am trying to run Docker from inside Pycharm and get the following error: Permissionerror: [Errno 13] Permission denied:…
-
0
votes2
answers102
viewsA: My function only returns None
The indentation of your code is wrong. The IF It should be inside your go. The None was being returned because the IF had never been executed. In case the IN would only work if your line was of the…
-
0
votes0
answers35
viewsQ: Function being called before being called by GUI
I have a software that I am using Tkinter as GUI, to receive some parameters that the user will pass me. In this software I have 1 problem and a doubt. the problem is this, just when I run the…
-
0
votes2
answers639
viewsQ: Zipping files with the same name inside a folder
I would like to know if there is the possibility of the following scenario being done in Delhpi: I have a briefcase and inside it I have the following structure: foto.jpg foto.png imagem.jpg…
-
1
votes2
answers81
viewsQ: Problem when computing average of a grid with empty numbers
I have a Stringgrid1 that I fill in the data and from that I calculate the total and the average. In image 1, I demonstrate working correctly. However I may not want to put a number in one of the…
-
0
votes1
answer235
viewsQ: Add values to cells in Stringgrid
I would like that when I click on a cell of StringGrid I could add a number and press to the side it was jumping from cell to cell, much like the excel, it is possible to do this with this…
-
1
votes1
answer609
viewsQ: How to get HTML from another page
I am trying to make an extension for the chorme, that when finding a field with the html element of Cpf, it generates a Cpf and adds to the field and I have the following problem: How can I get the…
-
0
votes1
answer325
viewsQ: Accessing different objects within an array
How can I access this object the right way? I have these two scenarios Object Array[2] Object: {"code": "a", cor: "vermelha"} Object: {"code": "b", cor"azul"} and Object Array[1] Object: {"code":…
javascriptasked Guilherme Lima 3,129 -
5
votes3
answers4761
viewsQ: Restrictions in the React text field
It is possible for a text field to receive only the characters below? numeros | espaço | barra (/) | traço (-) The kind field number does not help me in this case, it would be nice to use the type…
-
0
votes0
answers57
viewsQ: Error starting Django
When trying to start the project on Django 1.9.5, it gives this error : Unhandled exception in thread started by <function wrapper at 0x7fb7346bfc08> Traceback (most recent call last): File…
djangoasked Guilherme Lima 3,129 -
1
votes0
answers35
viewsQ: Slugfy in FLASK query
I am trying to give a Slug in a given, I tried to use Lower and replace to swap some characters, my query is similar to this: return…
-
0
votes2
answers171
viewsQ: Check the status of a service on Amazon
Well my doubt is not exactly about code but how to start a project. My doubt is the following, having a machine in Amazon, within it there are several services that are running...my problem is that…
-
5
votes1
answer288
viewsQ: Start and Take down bank in flask test
I’m doing an api test, which I pass a json it validates me if it came back all ok: my base class: # -*- coding: utf-8 -*- # base.py import os import unittest from app import initialize from mock…
-
1
votes0
answers99
viewsQ: Test API Python
How can I test an api url using nosetest for example: I have the following api: /api/user how to ensure that calls at this url are being called? make a GET... one POST passing the parameters on the…
-
3
votes1
answer99
viewsQ: Problem when unzipping file
I have a zip that, inside it there are several files to be uncompressed. So far so good, I’m using the following method to twelve the same:? with closing(z), zipfile.ZipFile(io.BytesIO(z.content))…
-
2
votes2
answers257
viewsQ: string formatting
I have the following string: JOSÉ CARLOS ALMEIDA (0-2) 1 need to remove text and spaces and leave (0-2) 1 this way I can deal with the trim, split etc... but this my string will not always be the…
pythonasked Guilherme Lima 3,129 -
1
votes1
answer492
viewsQ: Why use Selenium Webdriver?
I have this doubt, why use Selenium as a "test", hear that many do not use because it is laborious to write...but in several job vacancies I see that knowledge is requested knowledge. The question…
seleniumasked Guilherme Lima 3,129 -
0
votes1
answer1016
viewsQ: Problem running android app on Delphi
When trying to run an app in Delphi: [Paclient Error] Error: E2312 E: Firemonkey-Mapview-master Android Release Jsonmaps Androidmanifest.xml:39: error: Error Parsing XML: not well-Formed (invalid…
-
0
votes0
answers23
viewsQ: Add an HTTP response to a dashboard
My doubt is the following, Gero 6 determined panels in the script.js file that is with names defined as Paineis1, Paineis2... what would you like, do a get in a url, and for every url I call it add…
-
1
votes1
answer268
viewsQ: Panels in Angular
I would like to make a page in Angular that looks like the image below: which is nothing more than a page with multiple panels, which I will add a list of information within them... Which component…
-
3
votes1
answer485
viewsQ: Compress and unzip file in memory
I have a few functions that read the file directly from a cache path, but eventually it will cost a lot of space in the filesystem, there is some way to generate that file in memory and already save…
pythonasked Guilherme Lima 3,129 -
4
votes1
answer127
viewsQ: Mock a raw_input
I have the following functions with raw input, which should receive a list [x,y] def input_origem(): origem = raw_input("Entre com o valor de x: ") origem = eval(origem) return origem def…
-
4
votes2
answers3252
viewsQ: How to use sys.Arg for data entry
I have the function as follows: def minha_funcao(x, y ) my code . . . end of my code e a a entrada de dados eu utlizo da seginte maneira print my_func([uma lista], [outra lista]) I’d like to use the…
pythonasked Guilherme Lima 3,129 -
5
votes1
answer119
viewsQ: Error installing R packages in Gitlab CI
When I try to install R packages using shell, the following error occurs: My code from the archive gitlab-ci.yml is as follows: before_script: - export DJANGO_SETTINGS_MODULE= ---- - pip install -r…
-
1
votes8
answers3166
viewsA: Fewer moves from a horse to a given house in Chess
Taking into account a little of what everyone said I came to this: I would like the opinion and if it would be correct the logic I used: distancia = {} caminho = {} def movimento(): inicio = 3,2 fim…
-
41
votes8
answers3166
viewsQ: Fewer moves from a horse to a given house in Chess
On a chessboard in any house I have a Horse (represented in red) and I will have only one other piece (represented in green) that the horse must go to it: I must use the simplest path and take into…
-
0
votes1
answer36
viewsQ: Error while doing Reverse:
in Eat.txt there is the following content: 02:26:31 14:44:45 09:53:27 14:17:35 12:33:44 09:30:12 I’m reversing the order of the elements ad following way: import sys with open 'eat.txt as f: lines =…
pythonasked Guilherme Lima 3,129 -
1
votes3
answers8705
viewsA: How to pick up the text from a span?
If you are using python for example you can use . text: name = driver.find_element_by_id("task201").text print (name) x+10=10
-
1
votes1
answer498
viewsQ: Elementnotvisibleexception Selenium
I’m trying to log in to www.pactpub.com using the following idea def setUp(self): self.driver = webdriver.Chrome(executable_path='C:\_workspace\projects\Packtpub\chromedriver')…
-
1
votes4
answers25024
viewsQ: Difference between If and Elif
What is the difference between the two code snippets if variavel < 10: variavel = 1 if variavel >= 10 and <15: variavel = 2 . . . else variavel = 0 if variavel < 10: variavel = 1 elif…
pythonasked Guilherme Lima 3,129 -
3
votes1
answer2570
viewsQ: How to turn a . py into an . exe?
I have the following code : #coding-utf-8 from Tkinter import Frame, Tk, BOTH, Text, Menu, END import tkFileDialog from tkinter import filedialog as fd import dbf class Example(Frame): def…
-
1
votes1
answer1096
viewsQ: Function Returning None
I am trying to calculate the area of a file using Python with the following function: from __future__ import division import ogr import osr def transform_geometries(datasource, src_epsg, dst_espg):…
pythonasked Guilherme Lima 3,129 -
0
votes1
answer105
viewsQ: How to add a value to DBF
To read the file . DBF works as follows: I use a Tadoconnection, being the Connectionstring for: Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=C:\_workspace\projects\DBFEditor\temp To…
-
1
votes0
answers80
viewsQ: What are Abstract Classes
Why should we use an abstract class? in what situation? is the same thing as interfaces? What are the advantages and disadvantages of using?
-
4
votes1
answer506
viewsQ: I cannot insert into Mongodb using Java
I’m new in Mongo, I’m trying to make an Insert in the bank but it’s a problem when inserting import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBCollection; import…
-
2
votes3
answers1209
viewsQ: Extract numbers from a list using Regex
I have the following list <type 'list'>: [u'1',u'2'',u'3',u'4',u'7'] The result I hope is: 1 2 3 4 7 I tried to use the re.findall(r'\d+', variavel) But it doesn’t work, note that I also need…
-
1
votes1
answer26
viewsQ: error using Django.setup()
I’m trying to call the job django.setup() in version Django. 1.4, I saw that it was implemented only in 1.7. Is there any function like this that I can update, the solution would only update Django?…
-
1
votes1
answer127
viewsQ: Remove part of a text in the combobox
I have a combobox that I read a directory and bring the names of the found files: exit: demons.txt arch.txt elo.txt So far so good, but I would not like the extension to appear in the combobox .txt,…
-
2
votes2
answers430
viewsA: Delete Tedit created at runtime
procedure TForm2.Button1Click(Sender: TObject); var i: Integer; begin for i := ComponentCount - 1 downto 0 do begin If (Components[i] is TEdit) then TEdit(Components[i]).Destroy; end; end;…
-
0
votes0
answers45
viewsQ: Error committing to Webstorm
Trying to commit a project to push brings the following message: what may be happening?…
-
1
votes1
answer144
viewsQ: Corrupted file while copying from one folder to another
I am locating and saving the files in a listbox1, as follows: procedure Localizar(DIR,ARQ: string; LIST: TStrings); var SR: TSearchRec; begin {Garante a barra no final do diretório} if…
-
2
votes1
answer1011
viewsQ: Move all files with the . prj extension to a folder
I would like to know whether the following situation is possible: There are several folders inside each other... and within them there are files with the extension .prj. It is possible to read all…
-
0
votes1
answer110
viewsA: Problem running application in R
To help someone, I added this line above the field = Area and worked as I needed to: Area = readOGR(dirname(Area), gsub('.shp','',basename(Area)))
-
1
votes2
answers816
viewsA: Rotate Canvas in Delphi
I did once the following way, I add a text to it and rotate the image. procedure TForm2.ConvTextOut(CV: TCanvas; const sText: String; x, y, angle: integer); var LogFont: TLogFont; SaveFont: TFont;…
-
1
votes1
answer110
viewsQ: Problem running application in R
While Trying to Run the Script Below: Area="C:\Users\user\Desktop\shape.shp" Pasta="" library(raster) library(rgdal) library(rgeos) library(maptools) long2UTM <- function(long) {(floor((long +…
-
9
votes1
answer810
viewsQ: The Joel Test, how does it work?
I came across the following sentence below. "We scored 11/12 points on "The Joel Test", which measures the quality of software development within our company. " What’s this about? How does The Joel…
software-engineeringasked Guilherme Lima 3,129 -
0
votes1
answer214
viewsQ: Sum occurrences in a Memo
I have the following items in a memo: ns ns basica+textura+Al ns ns ns ns basica+textura+Al basica+textura+Al basica+textura+Al basica+textura+Al ns ns ns I wish he’d add up how many times ns…
-
-1
votes2
answers1829
viewsA: How to print a decimal number with a dot, not a comma?
I believe that using replace() solves your problem an example below: import java.io.*; public class Test{ public static void main(String args[]){ String Str = new String("Welcome to…
-
6
votes4
answers4928
viewsA: How to estimate development time?
Software estimation is critical to any project. Cost, effort and time estimates are usually demanded by customers and the project manager needs to have a basis for planning and making decisions…
software-engineeringanswered Guilherme Lima 3,129 -
2
votes1
answer1070
viewsA: how to remove.php with . htaccess
I think this might be the way: RewriteEngine On # Unless directory, remove trailing slash RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ http://example.com/folder/$1 [R=301,L] # Redirect…