I have a file consisting of a bunch of words, with one word in each line. For example, consider this webpage, or this one, but instead of being online, there is a .txt file is locally on my PC. My aim is to pick a word at random from this list that starts with a specific given letter. Say I want...
hello i would like to ask how to write the solution of this matlab program to an audio file using the audio tool box or any other technique. thanks very much.
function chua_oscillator
%This program is computed by S.Sabarathinam
%Based on: Nonlinear Dynamics: Integrability, Chaos and Patterns,by...
Hi,
So I submitted a picture , a .jpeg file, and, at 5.7 mb, I was told it's too large, I need to shrink it. Just how do I do that? I doubt I can zip it. Should I save it in a paint program? Any other idea?
Edit: I guess it comes down to increasing the compression ratio. Just if it's simple...
Hello everyone,
I have to extract a slice from a nii files and resize it with dimensions 256x256. Once this is done, I have to save it as a PNG image.
This is my code:
def img_from_nii(height, width, n_slice, label, in_path, temp_path):
filenames = os.listdir(in_path)
for i...
There is an input file for a simple 16 x 16 lattice fuel assembly. I have a message blocking the run of the code;
"bad trouble in subroutine newcel of mcrun source particle no 1 random number 6647299061401 zero lattice element hit."
What is wrong?
Triggered by the restore data from a deleted file thread, I was thinking about what improvements have been made in file systems in the last 50 or so years, What was not present in Multics or ITS or early unix..."
I'm not talking about capacity limits. At the birth of the PC, one could have...
Say you have a large text file on your hard drive that you edit such that its content is fully erased and you save it that way. Then you delete the file. Is the content still on the hard drive?
Usually, deleting a file only deletes the address where the file is on the hard drive and the content...
Homework Statement:: PTRAC File - MCNP - Multi-core computing
Relevant Equations:: No equations
My name is Luiz. I am a postdoc at the institute of energy and nuclear research in São Paulo-Brazil.
Our group models a cold neutron source (CNS) for the Brazilian multipurpose reactor project...
I would like to read a specific line of a file. Everything I have seen does it by reading the file from the top, ignoring what is read until the line of interest is reached. Is it possible to move the pointer of the reader to the line directly, say by counting the number of line end sequences...
I have about one hundred folders. Each folder has both .jpg and .mp4 files. I want to delete all the .jpgs but not the .mp4s. I don't want to do each folder by hand. Does anyone know the Windows/DOS command that will do this. Just moving the files depending on file type is enough.
I know data is decentralized in TFS. But how does that makes data sharing difficult?
We've got distributed computing for the similar purpose on different machines as well.
I read a lot on this but failed to find any information regarding why it was not possible to share data in TFS as compared...
I need to read PE file. I need to search word in PE file. Search is required to cover only the sections with the “executable” flag. And I need to specify the section where the word found. How can I do this in C? I hope you can help me. And I cannot use 3rd party libraries. This is my task and...
Hello. Would you please explain the factors that determines the opening time of a program or a big file. For example if you have a large excel file, why would you have a difficulty to open it, if it is very large? If it is in your PC's main storage, that is either HDD or SDD, is it reading...
I am creating a web page that will have several buttons on it. When a button is pressed it will play a tone or combination of tones.
With the Google Web Designer application, I can create a simple page with one button on it. I'm able to associate the clicking of that button with "Custom Code"...
Suppose some program writes its output into a CSV table and is adding new rows to it all the time. How would I write a Python or Bash script that monitors the last element of the last row of this CSV file in real time and makes a warning sound if it exceeds some limiting value? This would be...
Well I just checked out my boy's breed of dog. Not what we expected...But the analysis came with some raw data, 200,000 base pairs on ... 41 chromosomes. They're in a .TPED file, which can be opened in Excel. Apparently, it an also be analyzed using PLINK software.
Wondering what I can do to...
Hi PF!
I am trying to import k.txt file into Mathematica as a list of numbers. The k.txt looks like this:
[5.315967917338153e-06, -3.204321972222162e-08, 3.6041782425371564e-09, -3.853442465663655e-08, 8.699510604529962e-07, -1.4284341965847237e-08, 2.855341882658808e-09...
My Dashcam is telling me the memory card is full. It has done this a couple of times now over the last month or two.
The SD card is a Class (10) 16Gb NEXXTech MicroSD (The class 10 relates to how fast it can record; the Dashcam requires at least a 6 or 8 or something. A 4 is too slow and it...
Hello all, see below for a snippet of a header file, class1.h, and source code file, class1.cpp, adjusted to reproduce the issue I am having. I have declared a series of functions in the .h file and their corresponding definitions in the .cpp file but when I compile I get the error...
I am building up a mesh via defining a background mesh (using blockMesh) and snappyHexMesh
I am dealing with the STL 2D Mesh surface (I cannot uploaded because PF doesn't accept zip files nor STL).
My issue comes when I want to open it. When I run vi constant/triSurface/river.stl in the linux...
In Google File System,hotspots haven't been a major issue because our applications mostly read large multi chunk files sequentially. what it mean?
hotspot-: region of computer program where a high proportion of executed instructions occur
Lazy space...
hotspot-: region of computer program where a high proportion of executed instructions occur
Lazy space allocation-:https://stackoverflow.com/questions/18109582/what-is-lazy-space-allocation-in-google-file-system
With lazy space allocation, the physical allocation of space is delayed as long as...
Hello, I've made a SPK file for asteroid 7482 (1994 PC1) with Horizon. I wan't to change the initial velocity with cspice, because I want to know where it will be in a future time at the speed changed. (now I'm using Newtons calc but is slow an error increases with time). This is for calculating...
Almost all (compiled or interpreted) programming langues store the program source in the form of a series of bytes (using an encoding like ASCII or UTF-8) into a text file, enforcing the grammer of the programming language using a parser (as part of the compilation process or interpretation of...
Hi,
I'm having trouble dealing a "picture-like" object that I copied from a webpage (.html) file. It is the larger white rectangle in rows 194-195, that reads "United StatesStates"
It just doesn't go away when I delet the the row. I tried to scrape the file directly into Excel from the site ...
I'm using Visual Studio Code as my text editor. My ultimate goal is to use PythonTex in a Latex file so that I can generate multiple versions of the same worksheet for my class. As a test, I defined a variable myvar = "hi" but I can't get it to render correctly in the pdf when I use \py{myvar}...
Hello There,
I am studying docking of ligand molecules into DNA using Autodock Vina. Before doing that I optimize the ligand molecule using Gaussian 16. I want to know how can we get the PDB format after optimization. Do I just need to open the .chk file and save it as PDB format or do I need...
Howdy, my fellow nuclear colleagues!
I am new to MCNP5 and currently I am trying to simulate something simple like a sphere of UO2 to calculate its critical size.
Whenever I run my file via MCNP5 or Vised, I get an error message like
bad trouble in subroutine pass1 of imcn...
Hi All,
I may have asked this question earlier. Apologies if I did.
I have a Python .ipynb file in a Jupyter Notebook whose size is 99.3 MB. Thing is most of it is not code:
I wrote some code; specifically a loop incorrectly and it iterated way too many times. I saved the file, which...
Hi all, simple question but I cannot understand what is going wrong. I have a CLASS.hpp file of the form
class CLASS
{
private:
double varA = 5.; //some numerical value
public:
double func(double z);
};
and then in the CLASS.cpp file I have a call to this function func()...
Is it possible to change the icon of a file via python or cmd in windows ?
In my previous post I hava manage to change folder icon but I am not sure how to do that for files. Any ideas ?
I have some personal data then I want to encrypt however, I want to do it via some basic .vbs, cmd or .bat commands. Is there a way to do this and most importantly is there way to store the key via some personalized encryption method, so that I can open it whenever I want but someone else cant...
Hello everybody,
I created this tamplet to upload a file matrix:
#include <sstream>
#include "fstream"
#include <vector>
#include <iostream>
#include <string>
template<class T >std::istream& readMatrix(std::vector<std::vector<T>>& outputMatrix, std::istream& inStream)
{
if (inStream) {...
I am showing a school pupil (over the Internet) how to use EXCEL. He can work with an EXCEL file that he opens himself (on a free version of Microsoft office). However, when I send him a file (either one I opened on my computer or even one that he sent me and I send back to him), he finds that...
I have a DATA.txt file which contains lots of useless info. I get the informations I want typing in my terminal
grep freq DATA.txt
and the output is the following:
freq ( 1) = -0.193719 [THz] = -6.461768 [cm-1]
freq ( 2) = -0.193719 [THz] = -6.461768 [cm-1]...
<moved to General Discussion, posts that ask for thoughts are not hard science>
Summary:: Soon?
I've been thinking whether in the present time if not near future, or even already something common nowadays amongst intelligence agencies would be the use of steganographic data file searches...
I am doing a cosmological work and I need to run a code form this github page
https://github.com/ja-vazquez/SimpleMC
I download the whole repository as .zip file and I inserted into my desktop. Then I opened it through vs code and this is how it looks like
The problem is that, when I run...
public static Region fromFile(String name, String file) {
Region r = new Region(name);
List<String> lines = readData(file);
String[] headers = lines.remove(0).split(";");
Map<String, Integer> h2i = new HashMap<>();
for (int i=0; i<headers.length...
I thought I had a long-term backup of my important stuff when I bought a 1Tb Seagate External Drive. It died and took years of projects and memories with it.
Running Win10 on a laptop.
I think there are three options:
Another (better) external drive
Some newfangled solid-state external drive...
I wanted to move one file from my laptop to an external HDD. Using the file manager, I started the move operation; and after it completed successfully, I unmounted the HDD. When I plugged the HDD to our Windows 7 desktop, I found that the file was corrupt! The 8 GB .mp4 file had reduced to 372...
I have a code like
from random import randint
from string import ascii_lowercase
file = open("data.txt", "w")
numbers = []
for j in range(26):
# generating a list of random number
random_num = [randint(0, 7) for i in range(120)]
numbers.append(random_num)
# matching these numbers...
I want to read values from the ASCII file of GIS by Fortran code. In GIS, an area has meshed. Each mesh has an individual value (e.g. velocity of water). Here is the website that shows how the ASCII file is working in GIS.
https://en.wikipedia.org/wiki/Esri_grid
I want to know if anybody has...
I am trying to call a function declared in a .hpp file and defined in the corresponding .cpp file, from my main.cpp file, but I keep getting an error. From what I have googled it seems as if I am doing this the right way, so I was hoping you guys could help out. Here's my code:
#ifndef CHAP_HPP...
Is there anyway that pdf, html or any other type of files can be linked into a txt file? That is, I would like to click to a link in a txt that will open another file.
Hi, I used to use MATLAB for this kind of thing, but now my pc broke and I need to run some scripts. I have a .txt file structured like this
10 -2.34454
12 -2.34566
14 -2.34677
... ...
and I want to store the data in two variables: the first is the "counting" (10, 12, ...) and the second is...
I am writing a program that I need to create a file the FIRST time the program is run, but not create one every time I run the program and NOT touch the data in the file if the file already exist. I know if the file does not exist, ios::in will not create the file, just give an error message...
Hello,
I am familiar with some of the popular dataset formats. For example, there are tabular dataset formats like CSV, TSV, xls (excel), JSON, html, etc.
For relational datasets, an example is SQL. I guess regular folders work for unstructured data like emails and images.
Is there any other...