Posts by ederwander • 6,431 points
131 posts
-
0
votes1
answer29
viewsA: Sharpened Bar Graph in Matplotlib
Using the data shown, I would make it as simple as possible ... Take a look at how I’m using the append to store the appropriate data in specific lists, I am rudimentary using a replace to remove…
-
5
votes3
answers102
viewsA: How to do linear interpolation on R?
From what you have given me it is possible to apply the linear interpolation equation directly: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1) Based on your first case: To the COHORT = 5, would like to…
ranswered ederwander 6,431 -
3
votes1
answer101
viewsA: How to get microphone frequency in Hertz in Java Script?
I’ve mentioned it a few times here, it may seem silly to want to pick up frequencies, but it turns out it’s not, everything will depend on N factors, how accurate do you need the capture to be, the…
-
3
votes1
answer564
viewsA: How to check if a process is running on the server?
Practically everything has a huahuahua way There’s a protocol called SNMP(Simple Network Management Protocol) we use this protocol to monitor remote machines, with it it is possible to pick up…
-
1
votes1
answer57
viewsA: How to prevent my java application from opening twice or more simultaneously?
There are two ways to do this, the two ways have to return the running processes so you can compare and check if your program is already running... easier way(I don’t know, I don’t like it much, but…
-
1
votes1
answer55
viewsA: Create file from shell
If you’re talking about this line here : grep -R package* ./Javas *.java > teste.txt He must have created the file, but since you didn’t put the full path he must be somewhere else ... It is…
shell-scriptanswered ederwander 6,431 -
1
votes1
answer115
viewsA: Redirect domain only using the BR Record
about your questions: 1- There is some way, only via Registry BR (without server), from redirect the domain without www to the Japan server? A: No problem, in theory just create another CNAME…
-
1
votes2
answers238
viewsA: manipulating csv file
Python has a lib csv that can help you, I think it is native and does not need to install anything, only matter, with it becomes very simple to work with files csv, let’s explain, to test create a…
-
5
votes2
answers59
viewsA: How does R calculate the following code?
In the R the operator %>% is called pipe, it will use the leftmost value to pass to the function, see what would be equivalent library(magrittr) print(2 + 2 %>% sqrt()) print(sqrt(2)+2) Result…
ranswered ederwander 6,431 -
1
votes1
answer39
viewsA: Storing data from a for in a dataframe
Some mistakes are: Look at the line link[j,2] has two )) remove 1 of them... you created a dataframe called links but then he’s trying to feed the link(without "s"), that is to say there are quite a…
-
0
votes3
answers231
viewsA: Problem Solving in Javascript
@Leo-Letto and @hkotsuboi have said it all, I just came here to put another code option ... <script> function maiorAlto(usuario){ if (usuario[1] >= 18 && usuario[2] >=170){…
-
0
votes1
answer235
viewsA: Capture typed key using Python 3
It smells to me like Hackers huahuahua, do not know what is the intention of this, spy ? just know how it works ? I’ll show you how to do it and then you make the decisions about what’s ethical and…
-
1
votes2
answers241
viewsA: How to manipulate audio volume in real time
I scheduled to answer this question a long time ago but never had time (hj had time rsrs)... To work in real time with audios you need to imagine how to change each piece of your file and send to…
-
5
votes1
answer169
viewsA: What does Transition band mean in band-pass filters?
That’s what you’re literally saying, is the amount of frequencies that are between the transition curve of the filter, starting from one state and going to the other state. In this image is easy to…
-
2
votes1
answer179
viewsA: Sending a C++ vector to a Python function
VC will need to compile the code to create a python module... Create a setup.py use the distutils python, this file will be responsible for creating/linking a module written in C/C++ that can later…
-
1
votes1
answer284
viewsA: How to change the tone of an audio with Javascript?
It seems a silly question but the answer is complex ... I’ll try to give you an Overview of how to change the tone of an existing sound, this is complex to do in any language, so I’ll try to give…
-
0
votes2
answers251
viewsA: Error in OCTAVE code
I think there is a syntax error in your function, there is no or I at least have never seen this type of operator in Octave/Matlab -= I think you want to compare if the dimensions of A and B are…
matlabanswered ederwander 6,431 -
2
votes3
answers280
viewsA: Run cmd command with CD
you can use the & to execute single-line commands ex: cd Links & dir you can also use the && in this case it only executes the second command if the first is executed without errors:…
-
1
votes1
answer654
viewsA: How to record speaker and microphone sounds simultaneously with python in windows?
Come on, first install the Numpy via pip one pip install numpy should solve the issue... We’ll need it to do the decode quickly, in this code also use it to convert lists into vectors, also use the…
-
3
votes1
answer167
viewsA: How to calculate the distance of devices over WI-FI using force and signal frequency?
I tested it here on Matlab: Frequency in 2412 signallevel in -57 Your code is missing one abs look there in the image formula: abs(-57) Correct equation for the above data: 10 ^ ((27.55 - (20 *…
-
3
votes2
answers151
viewsA: How does Stdaudio work in java?
@Rafaelguasselli capturing an audio frequency is not something trivial, is trying to do what exactly, guitar tuner or something like that ? The function read of the code only returns the audio…
-
6
votes2
answers285
viewsA: To what extent does hardware affect programming?
Nowadays a "common" programmer does not have the least hardware concern, in theory the limits of memory, processing and storage will not be the heel of Quiles in most projects, of course I am…
-
1
votes1
answer1160
viewsA: How to make dynamic graphics in Python 3?
Using the function animation of matplotlib it is possible to do it in a simple way, using your code I created an example, I’m taking the temperature randomly, random values between 0 and 100 to…
python-3.xanswered ederwander 6,431 -
0
votes1
answer59
viewsA: Sum of several Python lists
The simplest way I can imagine now is for you to use the function sum for each list resultado = sum([0, 0, 0, 0, 0, 1, 1, 1, 0]) + sum([0, 0, 0, 0, 0, 1, 1, 1, 0, 1])+sum([0, 0, 0, 0, 0, 1, 1, 1, 0,…
python-3.xanswered ederwander 6,431 -
0
votes1
answer85
viewsA: Help for Linear Dilation calculations in Python
I don’t know which Python version you are using, but for the Python3.X version I would simply do so: Placa=100 Temperatura=30 L=Placa*(10*1.2) * Temperatura / 10 print(int(L),'^-5 m °C ^-1',sep='')…
-
0
votes1
answer414
viewsA: How Exploits are created?
Want to become a Hacker ? lol To create an exploit you need to find some vulnerability, the breach will be used to create methods that take advantage of the found fault! In linux usually everything…
-
2
votes1
answer2701
viewsA: How does an online game server work?
Damn you’re all confused and mixed up ... DNS(Domain name server)- has nothing to do with programming language, nothing to do with HTML, PHP, Python, etc., the DNS is a service that converts a name…
-
12
votes1
answer751
viewsA: How does a Ddos attack work?
DDOS the name already says it all (Distributed Denial of Service), is a distributed attack coming from several IP’s(sites), this type of attack simply clogs a service making the attacked server…
-
1
votes2
answers235
viewsA: How to convert byte[] to mp3
To MP3 things work differently, files in this format suffer Ncode(encoding), this encoding allows raw data(bytes) suffer compression, this action will cause data loss, the whole process demands…
-
0
votes2
answers69
viewsA: Capture traffic with Wireshark
Being on the same network does not guarantee that it is possible to capture the traffic of your server and other hosts of your internal network, there are illicit ways to do this and I will not go…
-
2
votes1
answer105
viewsA: Handling of MP3 files
Your question will surely be closed rsrs I am the King in answering questions that are closed kkkk Boy The Decoding of Files mp3 is very complex, this process gives a TCC weightless... I do not know…
áudioanswered ederwander 6,431 -
1
votes1
answer180
viewsA: How to calculate the MFCC?
Pre-emphasis Filter - Just as the name suggests, this type of filter tries to emphasize the higher frequencies, it is extremely useful if the signal (voice) is with some kind of noise, in this way…
-
1
votes1
answer425
viewsA: How to Automatically Detect a Captive Portal
As far as I know the OS’s (Android, IOS, Windows, etc), have mechanisms that check if a certain access is being redirected to an IP that should not, if this is true the OS presents an alert…
-
3
votes1
answer239
viewsA: Problem with file reading . WAV
There are some errors going on in your code... Ok you jumped directly to the Byte which contains the audio file data here: fseek(fp, 44, 0); On the next line read 1024 bytes:…
-
1
votes1
answer46
viewsA: Check if a certain value is in the vector
You can use the find to return the index if the number you are looking for exists inside the vector: x = [1 3 5 7 9 11 13 15 17 19] k = find(x==3); if isempty(k) disp('nao achei') else disp('achei')…
-
1
votes4
answers1713
viewsA: Removing lines from a numpy array
Removing line from 1 to 5: >>> a[5:len(a)] array([[ 6, 6, 6], [ 7, 7, 7], [ 8, 8, 8], [ 9, 9, 9], [10, 10, 10], [11, 11, 11], [12, 12, 12], [13, 13, 13], [14, 14, 14]]) removing line from 6…
-
2
votes4
answers3861
viewsA: What are the risks of using permission 777?
For example, when I had a specific file writing problem uploaded to the public/uploads folder of a particular system, I gave the 777 permission in this folder. I love who lives in a dangerous way…
-
1
votes2
answers1051
viewsA: Python Build a multiplate parabola chart with matplotlib
To build parables I like to use exponential function, basically his parable is a gaussian function, pq i like exponential function (exp)? simply because I can control where the parable will be…
-
2
votes2
answers1315
viewsA: Python and Opencv add points and Houghline
It’s a cool TCC project, it doesn’t seem easy lol, I’ll try to put my ideas and perceptions. I kept looking at your processed image and trying to find patterns with the naked eye, the crops cause a…
-
1
votes1
answer458
viewsA: Matlab function for ln(1-x) approach
I wasn’t going to answer, I understand that people need help, I’ll do my part, the formula of the question looks a lot like the Taylor series to find natural logarithm(as far as I remember the…
matlabanswered ederwander 6,431 -
4
votes1
answer917
viewsA: How to store the result of an iteration in a new variable using python?
If I understand correctly, you can add elements in a python list using append x=[] for i in yr: x.append(datetime(yr[i],1,1)) print(x) This will add all loop iterations to the list x, the way you…
-
0
votes2
answers2585
viewsA: How to calculate the percentage of NA in a data frame in R?
Well come on, one of the ways to do it is to create a loop and catch column by column of your data frame. I created a data frame to illustrate df <-…
ranswered ederwander 6,431 -
1
votes2
answers99
viewsA: Image Processing? Doubt on the subject and usability
It is a new field who comes gaining space called Augmented Reality: Azuma defines augmented reality as a system that: combines virtual elements with the real environment; is interactive and has…
-
4
votes2
answers235
viewsA: How can you clone cards on my website?
Come on, based on the information from your comments, we’re outside with no access to the logs, no access to the server, no access to your codes, we can only assume where the problem is happening. -…
-
1
votes2
answers389
viewsA: Python, matrices/vectors and dictionaries
Using the data of your is example can be simple, remembering that this code will only work if the values of the second row of the matrix are in ascending order. I used Numpy to create an array 2x6 (…
pythonanswered ederwander 6,431 -
0
votes1
answer84
viewsA: How to get Windows Primary and Secondary DNS using Python?
I don’t know if it’s on the ground windows or linux, but already done using Windows, you can run a ipconfig /all using python and grab all the settings information from your network interface:…
pythonanswered ederwander 6,431 -
0
votes1
answer39
viewsA: Stop a worker and continue the Parallel pool in Matlab
It’s not very clear to me, but I think you just want to skip to the next iteration if something specific happens, so you can use the continue, he will continue trying the next conditions, a basic…
-
1
votes1
answer912
viewsA: Autocorrelation function in Python
Before I start anything, I need to give you some information... There are two ways to perform autocorrelation, in your example I could observe that you tried to autocorrelation in the frequency…
-
1
votes2
answers3737
viewsA: Save txt file to Matlab
I like to use the function dlmwrite This function has attribute options that can help you define how data is saved in the file, you can determine delimiter, numerical accuracy, skip line, etc, an…
matlabanswered ederwander 6,431 -
0
votes1
answer314
viewsA: How to join audio files with Node js
You don’t want to concatenate you want to mix ... The simplest way I know is to use the web-audio-api Install with: npm install web-audio-api Decode both files and add the values of the two vectors:…