Questions tagged [path]

A standard format of a file or directory name used to identify a distinct position within a file system. In numerous Linux and Unix-like operating systems, the PATH variable (all in uppercase letters) designates the folders in which executable programs are looked for.

Create a layered structure using a specified path

I am aiming to create a function that can accept an object path, like { 'person.data.info.more.favorite': 'smth' } and then output a nested object: { person: { data: { info: { more: { favorite: 'smth', }, }, ...

Issue with IIS due to incorrect file inclusion

Here is the directory-file structure I am currently working with: /index.php /head.inc (upper) /subdir/page.php /subdir/head.inc (lower) Within /subdir/page.php, there is a redirection to the upper level index.php: header("location: ../index.php"); In ...

error message: sendFile function not recognizing basename and dirname parameters

My current dilemma involves sending a file located at '/x/y/file.pdf' to be opened in the browser. I am utilizing nodejs Express as my server-side platform, and for file transmission, I am using the sendFile() method. By leveraging the path.relative() func ...

I'm encountering an issue where the command "node" is not found, even though the full path is working. How can I get the command "node -v" to work properly?

After recently installing node.js, I encountered an issue when trying to confirm the installation by running 'node -v' in my command shell. Instead of getting the version number, I received a "bash: node: command not found" error message. Searching for sol ...

Encountering an issue with npm installation in the angular-phonecat tutorial: Module 'update-notifier' not found

Having trouble running npm install in the angular-phonecat directory. Could be a problem with my paths, but I'm not certain. Any help would be greatly appreciated. Keep running into Error: Cannot find module 'update-notifier'. If I try to in ...

PHP download feature enhancement using underscores

My goal is to retrieve and download a file based on the value passed in through POST. However, I'm encountering an issue where if the file name is "Functional requirements example," it gets downloaded as "__Functional." Am I making a mistake here? Th ...

Why doesn't setting the SVG viewBox to "0 0 100 100" scale my path to 100%?

My current dilemma involves an SVG path that is only displaying at 50% of its intended size. How can I adjust it to show at 100%? Below is the code snippet in question: <div className="svgPathContainer"> <svg width="100%" he ...

URL Rewrite Causing Path Problem

Encountering an issue with URL REWRITING on my Debian/Nginx/PHP server. Screenshot of the image issue Facing problems with displaying images. My Project Structure Class css img ... and the file.php here Non-functional Approach / Functional Approach Th ...

My server.js paths are not being recognized by Nodejs

Trying to execute the yarn start_dev command within my main directory C:\Users \THIAGOSAAD\Documents\DEVELOPMENT\NEORIS\ALIANSCE\aliansce-app-analyticals-panel However, when I do this, errors start appearing in my "proce ...

Troubleshooting Rpy2: Missing R.dll File

Operating on Windows 7 64bit with Python version 2.7.9, I have successfully installed R-3.2.0. Despite trying previous versions such as R-2.12.2 and R-3.1.3, the result remains the same. To ensure compatibility, I added C:Program FilesRR-3.2.0ini386 ...

Update the Python version within the system's path variables

Currently running macOS 10.14 and looking to eliminate the 3.7 version of python from my path in order to compile an angular application. When I check my $PATH, here's what I have: /Users/my_usrname/.nvm/versions/node/v10.15.3/bin:/Library/Frameworks/Pyth ...

Working with relative paths in React Native TypeScript using WebStorm

My variable color is located in the path app/theme. To set it up, I created a package.json file in app/package.json with the following content: { "name": "app" } Now, to import color in TypeScript files, I use the following syntax: import { color } fro ...

Can we create an alias for the import path in TypeScript?

import A = require('../../distant/PathToA'); import B = require('./different/path/PathToB'); I am utilizing external modules (commonJS) and browserify, with WebStorm as my editor. If this were just regular javascript, there are severa ...

How can I save files to the ~/Documents directory using Node.js on my Mac computer?

Trying to work with the user's Documents folder in Node.js on macOS: var logger = fs.createWriteStream('~/Documents/somefolderwhichexists/'+title+'.txt'); Encountering an error without clear cause. Error message received: Unca ...

Navigating through filenames using Python

With a collection of 200 JSON files in Python named "1.json", "2.json", "3.json" and so on, I set out to apply modifications using a loop. Unable to achieve the desired result using "for i in range(1, 200):", I decided to pursue an alternative method. my ...

Harness the power of the Node.js Path module in conjunction with Angular 6

I'm currently facing an issue with utilizing the Path module in my Angular 6 project. After some research, I came across a helpful post detailing a potential solution: https://gist.github.com/niespodd/1fa82da6f8c901d1c33d2fcbb762947d The remedy inv ...

Is there a way to display and output the data from a file?

I'm currently working on a program that opens a file and displays its contents. I'm running into issues with defining it, I think? Either I get an error saying "path" is not defined or "new_dir" is not defined. Below is the code: import pathlib def prog_ ...

A guide to generating numerous SVG paths using a JavaScript function

Creating strokes with similar length but different angles of rotations can be achieved efficiently using JavaScript instead of writing redundant lines of code. The following code snippet demonstrates one way to achieve this: function stroke(rot) { var d ...

What is the best way to create operating system-neutral file paths in Node.js?

I'm currently fixing issues with my code while running integration tests on an EC2 instance of a Windows machine. Despite resolving the filenames-are-too-long problem, several paths remain unresolved due to being hardcoded for UNIX systems. I've ...

Utilize Relative Paths when working with node.js and express

Can someone help me troubleshoot an issue with running my node server on localhost? Currently, I am only able to run it using a static path: app.get("/", function(req, res){ res.sendFile("/Users/name/Documents/_privat/dungeon/index.html"); }); Obviou ...

What is the most effective method for animating an image to move along a circular path using JQuery?

Looking to have an image (colored red below) move along a circular path, returning to its original starting point. Important Points: The circular path is represented by grey lines for reference. What method or library would be recommended for achieving ...

Retrieve the route.js directory using Node.js

My server.js file is located in the directory: /dir1. To start the server, I use the command node server.js. In the directory /dir1/app/, I have my file named routes.js. I am trying to find out the directory path of the server.js file. However, I am unc ...

Updating the log file location for electron-log in an Angular application integrated with Electron

I am currently developing a project using Angular 6 integrated with Electron. I have managed to successfully incorporate the electron-log library using ngx-electron. As a result, my application is functioning well and logging data to the default path: C:&b ...

Python tutorial: Calculate the occurrence rate of a list of words in multiple text files

I have a list of 450 keywords stored in a csv file. My goal is to analyze the frequency of these keywords across multiple text files that are located in different folders. Here is a snippet from the csv file: Keyword1 Keyword2 The desired output should ...

The required keys [:id] are not included in the route matches

As a beginner in Rails, I've encountered similar issues that I can't seem to resolve. Here are my routes: resources :users do resources :items end My model setup is as follows: class Item < ActiveRecord::Base belongs_to :user end class User & ...

Despite being in the right directory, a FileNotFoundError still occurs

I'm trying to open a file using Python in Visual Studio Code, but I keep getting a FileNotFoundError. The text file is located in the same directory as the Python script. Even after deleting and rewriting the file in the correct directory, the error p ...

Incorporate features into route - Programming in Python

Recently, I've just started exploring Python after being accustomed to MATLAB. One thing that confuses me is how to add a function to the path. In MATLAB, you simply right-click on the function and can easily add or remove it from the path. For examp ...

Converting query strings to paths in CodeIgniter using Apache's .htaccess configuration

Need help with converting URLs on a CodeIgniter based website from index.php?option=test&controller=con1 to /test/con1 using .htaccess. I've tried various examples found online but none of them seem to work, as the site keeps redirecting to the ho ...

Having trouble with Firefox not displaying the image source with an absolute path

ASP.NET Application I am experiencing some confusion with displaying images. While Internet Explorer shows the images correctly, Firefox is not showing them on the production server. The image url generated on the server is: \chartings\charts& ...

Accessing the path to an imported file in Node.js

Currently, I am working on a parser and encountering imports such as ../modules/greeting.js. Additionally, I have an absolute path to the file from where I performed the import: C:DesktopFoldersrcscriptsmain.js. I am seeking guidance on how to obtain ...

JavaScript: Creating an array of images from a directory

I've encountered a problem that has proven to be more complex than expected - I am struggling to find resources related to my specific question. My goal is to store 36 images from a folder on my computer into an array using Javascript. Below, you will ...

Please eliminate the forward slash (/) from the end of my route

Could anyone help me figure out how to remove the trailing slash at the end of routes in Nuxtjs? I attempted using the @nuxtjs redirect-module and setting the trailingSlash property to false, but instead of removing the slash, it adds multiple slashes at ...

jquery is in motion while svg paths are at a standstill, waiting to

i have been attempting to incorporate a css-animated svg into my project. initially, the animation would start automatically, which was undesirable. after some research, i discovered that by declaring it as paused and then triggering it using jQuery with $ ...

Access the folder in Command Prompt along with the directory of the present folder

Whenever I click on the "Open in Command Prompt" option within Visual Studio Code for the selected folder (C:playground g2app), it should open up in the command line. However, when I check the path in the command prompt, it only displays C:. Here is ...

Obtain the file path relative to the project directory from a Typescript module that has been compiled to JavaScript

My directory structure is as follows: - project |- build |- src |- index.ts |- file.txt The typescript code is compiled to the build directory and executed from there. I am seeking a dependable method to access file.txt from the compiled module without ...

Deleting all JSON files in a directory using NodeJs

Is there a way to delete only the json files within a directory (multiple levels) without specifying each file name individually? I thought fs-unlinkSync(path) might work, but I haven't found that solution yet. I attempted to use the following method: fs. ...

How come we have located the executable file?

After running the command npm install grunt -g, a folder is created at C:UsersmynameAppDataRoaming pm ode_modulesgrunt-cli. However, in my path variable, only the C:UsersmynameAppDataRoaming pm part is added. Despite this, when I type grunt i ...

Node.js unable to serve static files due to path issue (unable to access directory "/../")

Seeking Help with Serving CSS Files in Express In my routes.js file, I am trying to figure out how to serve all the files located inside the css folder as static files. Can anyone assist me with this? Screenshot of path structure (Please edit and display ...

Obtaining data from JSON using JSON path

Attempting to retrieve the id value tied to an email value from the given JSON data has been a challenge for me: [ {"id":11,"username":"John","address":"London","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="84eeebece ...

npm is unable to locate the npm-cli module following the upgrade to Yosemite

After updating my OS X to Yosemite, I encountered an error when trying to run npm: module.js:340 throw err; ^ Error: Cannot find module '/usr/local/lib/node_modules/npm/bin/node_modules/npm/bin/npm-cli.js' at Function.Module._resolveFilen ...

I need to obtain the URL pathname on a server component in Next.js version 13 - how is this achieved

I'm facing an issue with retrieving the pathname of a server component located in the app directory. Despite attempting to obtain it through window.location, I haven't been successful. Is there an alternative method I can use to achieve this? ...

The pathway to the Angular JS application on the local server

I have an Angular application called 'someApp' located in a directory. The URL on the server is http://example-domain/someApp/#/. However, my localhost application runs at localhost:8000/#!. Now, I want my localhost application to run the same way as it d ...

Is it possible for Python to perform in a similar manner in a bash script?

Is there a way for Python to create paths with multiple sub-paths using shortcut syntax similar to this? vars=project/{DEBIAN,usr/{bin,usr/{applications,icons,share}},computer} ...

Unable to render image despite being located in the identical directory

I'm currently working on an Angular component and facing some issues with displaying an image. I've tried hardcoding the img src for now, but eventually, I want to implement it dynamically. Both my component and the image files are located in th ...

Function in Node.js/JavaScript that generates a new path by taking into account the original filepath, basepath, and desired destination path

Is there a custom function in Node.js that takes three arguments - filePath, basePath, and destPath - and returns a new path? For example: Function Signature Example var path = require('path'); // Could the `path` module in Node be useful here? /** * R ...

Changing the direction in Spyder

Currently, I am using Python 3.6 in Spyder within an Anaconda setup. In my quest to enhance my knowledge on how to manipulate the file path known by Spyder, I took a dip into the PYTHONPATH manager and appended /Users/ericauld/Desktop to it. Over on my de ...

launch various chrome profiles using selenium

Upon running this code with Chrome already open, an error message is displayed: Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir I require the abilit ...