Is it possible to determine this at runtime?
contents of external.js:
function x() {
//can i get the path/name of the html file that included this js file?
//which is test.html
}
contents of test.html
script src="external.js"
I've just published my site, created with codeigniter.
the entire directory is in my public folder, including the config file (in public/system/application/config).
I just wanted to double check: do I have to move this file to another, non public, directory? I think codeigniter doesn't allow any direct access, but I am not 100% sure..
thanks,
P.
I'm using Topsy plugin for wordpress, but i wnnat to customize with more option like change background.
how can i replace the topsy css file?
the css file is loaded after my css and use many !important and replace my customization.
tks!
can somebody help me, how can I filter my file, inside the file I have rows with 3, 4, 5 elements, I want print using echo only these which have 5 elements, thanks in advance (I'm talkin about scripts)
Can anyone help me? I want to create a search button that will search a word in more than one text file stored on the disk and want to dispaly the corresponding text file in a jsp page.
Hi,
What is the correct jQuery syntax to only select certain file types?
e.g.
$("#fragment-1 a[SELECT ONLY ANCHOR TAGS WITH FILE TYPE OF MP3]").hide();
Thanks.
Hi
I am trying a simple move as shown below and get the following error: "The process cannot access the file because it is being used by another process." How do I fix this? Thanks.
FileInfo file1 = new FileInfo(srcFile);
if (file1.Exists)
{
FileInfo file2 = new FileInfo(destFile);
if (!file2.Exists)
{
try
{
File.Move(srcFile, destFile);
}
catch (System.IO.IOException e)
{
Console.WriteLine(e.Message);
}
}
}
Hi:
I'd like to make a scene that uses meshes and primitives (such as spheres, cylinders, boxes, etc). I was wondering if there are any recommendations with regard to where I can go to find .off files that describes complex meshes, such as mountains, rocks, trees, animals, etc.
Thanks.
Hello Guys,
How to create .htaccess file for 301 permanent redirect. I am looking for exact code that we would put in the file.
Looking forward to hear from you all.
Thanks in advance.
I need to get the symbols defined in .so file. I use latest Mac OS and I do this:
/usr/bin/nm -gC libs/armeabi/libhello.so
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: invalid argument -C
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm [-agnopruUmxjlfAP[s segname sectname] [-] [-t format] [[-arch ] ...] [file ...]
As I understand this is another nm utility? It is connected with XCode? How to fix this issue?
I want to load a pdf file on the click of a button.
In the OnClickButton() implementation I am writing the function which open the PDF file
ShellExecute(0,
"Open",
"%s\\HELP\\RiverCADPro_User_Manual.pdf",
NULL,
NULL,
SW_MAXIMIZE);
The above code is not working.What else is to be needed so as to run the above code
Erm.. I'm working with a switches parsing in BAT files, which goes like this:
<commands> -a -b -x -y -z -u abc ......
The user may input a lot of switch, or none. So I used looped shift to make parsing infinite switches possible:
:loop
IF "%1"=="-a"
...
SHIFT
GOTO loop
But when the script ends, I always get cmd executing the switches and showing up error like
'-n' is not recognized as an internal...
So, someone got any idea? Thanks a lot...
P/S: Make solution sticks with BAT script if possible as using other language may cause dependencies problem as this script is aimed on ANY computer with Windows.
Finally, thanks again =)
EDIT: Tried shf301 suggestion, i found out that I used DEL %0 to delete itself but it seems the %0 is shifted into the arguments because of the SHIFT command.
I need to put copyright message one every file. It will be done only for files going to client. Is there some unix script that will slap copyright message at the very top of every file.
I am using ofstream() to write data into file, i want to program to perform such a way that it should be keep on writting the string into the file as soon as the value gets assingned to string variable, and it should be writting before calling the close() for the buffer and while the program runs itself.
can anyone help me to do that in c++.........
Hello I build a script that does image uploading and resizing and it all works well, but how can I get the URL from image afterwards? I don't want my Image Source in HTML be like "../img/cat/1.png/" I want it to be like "http://MyIP/img/cat/1.png" I understand that I can just make a variable like $myHost = "http://blabla.com"; and add strip the ".." at the beginning but then it's not so good if I want to use it on other site because I need to replace this all the time. Maybe there is any other way?
Hi,
How to read live text from a text file into textbox in C#? The file is being updated all the time by another process, and we need to keep displaying the updated text in the textbox.
Any hint will be appreciated,
Thanks,
Dear all,
I wan to read a file and then write using java.nio and return it to servlet.i also want to check whether file has been downloaded or not.plz suggest.
@echo off
color 0a
title Horror Game
echo.
echo.
echo.
echo.
echo Welcome to the game
echo If you get scared
echo Feel free to leave
echo.
echo.
echo You are in a dark room.
echo It is cold.
echo All you hear is a scratching sound
echo near your feet.
echo What do you do?
echo.
echo.
echo 1.) Feel around you
echo 2.) Listen for anything else
set/p input = Command?
if %input% == "1" goto Feel
if %input% == "2" goto Listen
echo.
echo.
:Feel
echo You feel around and hear a growl.
echo As you realize the scratching was
echo on your leg.
echo.
echo You remember nothing else.
pause
end
I am trying to make a text based game for cmd and whenever i try to enter a response is instantly closes and i can barely read out "goto was unexpected at this time"
Hi All,
I have a folder structure, as shown below:
I need to create a bash script that does 4 things:
It searches all the files in the generic directory and finds the string 'generic' and makes it into 'something'
As above, but changes "GENERIC" to "SOMETHING"
As above, but changes "Generic" to "Something"
Renames any filename that has "generic" in it with "something"
Right now I am doing this process manually by using the search and replace in net beans. I dont know much about bash scripting, but i'm sure this can be done. I'm thinking of something that I would run and it would take "Something" as the input.
Where would I start? what functions should I use? overall guidance would be great. thanks.
I am using Ubuntu 10.5 desktop edition.
Is there a way to add files to a zip file from another server with php's zip extension? ie. addFile(array('localfile.txt,'http://www.domain.com/remotefile.txt')) (that obviously does not work)
I suppose I can download the files to a temporal folder and then add them to the zip file, but I was looking for a more automated solution or a function already made