Posts by Paulo Luvisoto • 907 points
33 posts
-
0
votes1
answer29
viewsA: PHP with Mongodb - How to sign in to Mongodb and run command anyway?
I ended up finding another way to do it. I found that you can specify the session when performing the executionQuery(). But I still find it strange, in my previous attempt, the getServer() return…
-
0
votes1
answer29
viewsQ: PHP with Mongodb - How to sign in to Mongodb and run command anyway?
I created a connection with mongodb and created a session from it: $manager = new MongoDB\Driver\Manager("mongodb://127.0.0.1:27017"); $sessao = $manager->startSession(); $id_sessao =…
-
-2
votes1
answer23
viewsQ: Python Basehttprequesthandler - How to insert correct image path
When I create a Web application in python, but without using Frameworks, just using the Httpserver and Basehttprequesthandler classes, how do I insert an image? That is the code:…
pythonasked Paulo Luvisoto 907 -
8
votes1
answer97
viewsQ: Linux Shell Script - Difference between $(()) and (())
I’m studying shell script and learned to use $(()) and (()) to make calculations. I understood the difference: while $(()) serves to make a calculation and return the result of it, (()) serves to…
-
0
votes1
answer54
viewsA: Linux Shell Script - Doubt about variable scope
I already understand what happens. In the first example, the two variables are visible within the pipe. However, by modifying the variables inside, the modifications are only valid there. That is,…
-
-2
votes1
answer54
viewsQ: Linux Shell Script - Doubt about variable scope
Num script shell, I want to make an array containing the files of a certain folder. I tried so: declare -a array_arquivos i=0 ls -1 /caminho/minha_pasta | while read file; do…
-
1
votes2
answers76
viewsA: Libreoffice Calc Macro - How to capture selected ranges
I managed to do it. If anyone is interested, follow the implementation: https://pastebin.com/3EX0f2yA
-
0
votes2
answers76
viewsQ: Libreoffice Calc Macro - How to capture selected ranges
I am creating a macro in Libreoffice Calc and need a way to select some non-consecutive cell ranges, and capture which are these selected ranges. For example, I want to select the ranges "A1:A10",…
-
0
votes0
answers43
viewsQ: Problem with Javafx on Linux
Javafx Alert on Linux. I am testing the Javafx technology, but I have noticed some things that work well in windows but not in Linux. For example, the class javafx.scene.control.Alert, to display…
-
1
votes1
answer388
viewsA: SFTP - Limit users
I managed to solve: 1- All Git users must be in the git group'. 2- Under /etc/passwd, leave the default git user prompt as /bin/bash itself, instead of /usr/bin/git-shell. 3- In the file…
-
1
votes1
answer388
viewsQ: SFTP - Limit users
I am testing an SFTP server. In my sftp configuration, there is the line "Match Group sftponly". That is, from what I understood only users who are from the group 'sftponly' could access the SFTP.…
-
1
votes0
answers105
viewsQ: Linux SFTP - Certificate requesting password
I need to access an FTP server, from which I have already been sent a certificate called "company.cert". In Windows, using Winscp, I create a connection using this certificate file, and the…
-
2
votes2
answers1682
viewsA: How to make a "JOIN" in two Colections in Mongodb?
Adding that from its version 3.4, mongodb brings the $lookup operator, which allows uniting records of two collections, from some common value between the two. But it’s just that. Complex joins like…
-
0
votes1
answer154
viewsQ: Mongodb - Mmapv1 or Wiredtiger?
We started a project with mongodb, at the time testing the Wiredtiger engine. This engine proved to be more interesting due to compressing the data much more than mmapv1. However, sometimes mongodb…
-
4
votes1
answer410
viewsQ: Golang - Doubt about pointers
I have a struct called Calculator, with two properties: version and author. To be able to instantiate this struct already initiating these methods, since Golang has no constructors, the various tips…
-
0
votes1
answer32
viewsQ: Vmware Vsphere - Multi-machine Cluster
I’m trying to understand the concept of Vmware Vsphere. As far as I can see in the documentation and in video-lessons, for example I have a 5TB HD machine and 32 GB of RAM. On this machine I install…
vmwareasked Paulo Luvisoto 907 -
10
votes1
answer3809
viewsQ: Why use "git branch --unset-upstream"?
I created a project and left it hosted remotely. Dai clone it locally, create the remote (remote), create a test.php file and then add/commit/push. So far so good. Now I make a branch called test,…
gitasked Paulo Luvisoto 907 -
1
votes1
answer91
viewsQ: Split Mongo data into more than one folder. Possible?
I have mongodb running on a 500GB primary drive. As the base started to grow a lot, I put a 1TB slave disk and changed to it the folder date. I know that in time, this 1TB record will also be…
mongodbasked Paulo Luvisoto 907 -
5
votes1
answer1177
viewsQ: Speed difference in HD Sata/SSD
I have Mongodb running on a 500GB SSD HD. But as the folder /date started to get too big, we put a HD slave 3TB, but this being SATA and not SSD as the first. But after changing the date folder to…
-
1
votes1
answer167
viewsQ: Blender 2.7 - Shortcut to running game engine
I open Blender 2.7 and I have a cube. I select the cube and, using the logic buttons, I give actions to this cube according to the keys I press on the keyboard. But now how do I run the game engine…
blenderasked Paulo Luvisoto 907 -
8
votes1
answer1408
viewsQ: Webservice returns to Soapui, but does not return to PHP
I am consuming a SOAP Webservice and I am found the following problem: Webservice has two functions. In PHP, using the Soapclient class, I created the client and consumes the first function without…
-
1
votes2
answers1431
viewsA: Remove duplicate Mongodb records
This example below will group the collection documents clientes across the fields nome and cidade. Then it will delete duplicates. You can do it without error.…
mongodbanswered Paulo Luvisoto 907 -
0
votes0
answers125
viewsQ: Application can not access URL via Ajax when on android
I’m trying to learn how to use Phonegap Build. I developed a small application with a simple button, which when clicked, will execute the ajax function of jquery. This function will call an external…
-
3
votes1
answer38
viewsA: Java+Database - Add Scroll to existing user via Java
I found the answer: MongoClient client = new MongoClient(new MongoClientURI("mongodb://127.0.0.1:27017")); MongoDatabase adminDatabase = client.getDatabase("admin"); adminDatabase.runCommand(new…
-
4
votes1
answer38
viewsQ: Java+Database - Add Scroll to existing user via Java
Mongodb use with Java and accurate, through Java run the following command on mongoDB: db.grantRolesToUser( "joao", [ {role:"dbOwner",db:"loja"} ] ) That is, I need to add a scroll to an existing…
-
1
votes1
answer880
viewsA: How to access Virtual Machine (made in qemu-kvm)
Guys, I already got it... just change the option --Graphics to "vnc". With this I was able to access from another windows station using virt-Viewer.
linuxanswered Paulo Luvisoto 907 -
0
votes1
answer880
viewsQ: How to access Virtual Machine (made in qemu-kvm)
I have a Centos7 Linux server, with no graphical interface. Using Qemu-KVM I was able to install a virtual machine with windows2008server inside it. I used the following command to create the…
linuxasked Paulo Luvisoto 907 -
3
votes0
answers111
viewsQ: Mongodb stopping to work
We are in the company testing a project using Mongodb database. The database is installed on a Linux server (Centos), with 32GB of RAM, but sometimes the database para de funcionar and needs to be…
-
6
votes3
answers5677
viewsA: How to create input masks in a Textfield?
For those who might be interested, I have also developed a solution. I have created a class with functions that generate the most common masks: import javafx.beans.value.ObservableValue; import…
javafxanswered Paulo Luvisoto 907 -
6
votes3
answers5677
viewsQ: How to create input masks in a Textfield?
A few weeks ago I have been studying Javafx as an alternative to Swing, but I noticed that it does not bring any kind of TextField which allows entry masks to be placed, as we do for example in the…
javafxasked Paulo Luvisoto 907 -
2
votes1
answer761
viewsQ: C++ class with multiple constructors - Header and cpp file
I have a C++ class where I have two constructors. In the file minhaclasse. h: public: MinhaClasse(int x1); MinhaClasse(int x1, int x2); Then in the.cpp file I create normally the constructors I…
-
7
votes2
answers4418
viewsQ: What does it mean to create an object with that asterisk?
Although I knew programming for a reasonable time, learning C++ with QT, I came across something I hadn’t seen in other languages. I noticed that some objects (not all) need to be created with an…
-
2
votes1
answer652
viewsQ: Visual Studio 2012 MVC 3 - Action button does not work
I didn’t use the visual studio for a few years. Now I tried again and came across a problem. I created a new web project in visual studio 2012, using the ASP.NET MVC 3 Web Application option. I…
asp.net-mvcasked Paulo Luvisoto 907