In Windows 10 I'm trying to use the hosts file to redirect to an html file on my local machine:
'''c:\Windows\mystuff\index.html www.somesite.com'''
I know when I click on "index.com" it opens in the browser, but doesn't work from the hosts file. What's wrong?
Related
I started working with Jupyterlab to analyse bunches of CSV files.
It is installed and run within an virtual environment on a windows PC (Windows 10, Python 3.9, JupyterLab 3.5.2).
As the filenames often change and our paths are quite deep I thought a file dialogue would be a good starting point to get data in.
I searched a while and found that ipyfilechooser could be my friend.
So I created a Jupyter Notebook and started with this code block:
import ipywidgets
from ipyfilechooser import FileChooser
chooser = FileChooser(
accept='.csv', # only show CSV files
multiple=False, # allow only one file
# optional starting path
start_path=r'\\sglx-srv1\geschaeft\MESSPLATZ'
)
display(chooser)
After executing this block a chooser widget appeared and I could select a folder or file, also from a UNC path (network drive).
But the setting of the start_path was always ignored and the dialogue always started from the folder the notebook itself is stored in.
I tried any variant I could find to quote the path, but with no luck.
It was not possible to let the file chooser start from any specified path neither local nor UNC.
What is wrong here? Is it a bug in my code or elsewhere?
I have an app that downloads html pages, css, js and images to its cordova.file.dataDirectory.
I have installed the httpd and the server is starting and running. But I do not seem to able to correctly target the files to display them.
How do I set the default directory to point to cordova.file.dataDirectory?
This does not work:
httpd.startServer({
'www_root' : cordova.file.dataDirectory,
'port' : 8080
}
Once I have started the server my goal is to display content like so:
<img src="http://path/named_folder/resource.jpg">
Or create a link like so:
Link to resource
But I cant seem to set the correct root path.
Currently the issue is in iOS but I will need to do the android path too
I am trying to move Hosted Opencart to XAMPP.
I have changed domain name to localhost/opencart but don't know how to change these URLs to localhost URL
/home/opencart/public_html/opencart
I tried searching in google but didn't found any solution.
It depends on which folder you want to install OpenCart.
You need to find absolute path to your directory. For example if you want to install OpenCart in a directory called opencart, create a find_path.php file in that folder with this content:
<?php
echo __DIR__;
Then run it in your browser:
http://localhost/opencart/find_path.php
You should see something like this on the screen:
C:\xampp\htdocs\opencart
Another way is to install a fresh OpenCart in your localhost, and then look at the config.php file that is filled in by OpenCart.
I made a cocos2d-js project on OSX.
And I debuged it on WebStorm.
It worked well.
So I just clicked index.html file. but it didn't work. just black screen.
I put all files on the web server and tried again.
Web brower console said http://localhost:8080/html5/project.json 404 not found.
but the file was in same folder.
I want to execute it on local server and just click.
What should I do?
Go to the project directory, start new terminal.
Then: cocos run -p web
This will run your game for Web, as -p stands for platform
Also note, that sometimes you will need to clear the browser's cached images and files after changes that affect files or images.
When click 1 and/or 2 WAMP open the web without my configured IP
i.e.
1 open http://localhost/, I need localhost:8080
2 open http://localhost:8080/phpmyadmin/, I need localhost:8080
Is it possible to add the port in WAMP's configuration somewhere? Currently I add it manually.
Thanks to JK suggestion I've try and found that in wampmanager.tpl file, search for localhost will expose the marked-red area which help to add the port.
Navigate to your WAMP installation folder and locate the files wampmanager.ini and wampmanager.tpl. Replace all occurrences of localhost with localhost:8080 within these two files. Restart wampserver.
Actually, #JK, the wampmanager.tpl is the template file used (by wampmanager.exe during start up) to generate wampmanager.ini. So you only need to edit the .tpl file and that solves it.
*TIP: You can also add custom menus to your wamp tray icon by adding entries to the wampmanager.tpl file.
Edit the file C:\wamp64\wampmanager.conf and change the port:
[apache]
apachePortUsed = "8080"
Then exit and relaunch wamp.