Hey all,
So I have this php web app, and one of my folder contains some files that can be downloaded.
I have a download script that modifies the headers, in order to always offer a download link. (instead of showing a picture for example, when you click on a link, a download box pops out)
Right now, if you enter a url like: http://www.mywebsite.com/content/
You get the listing of all the downloadable files, and of course, you can just download them all, without going through the website interface.
Personally, I don't think it's a problem, since I often use downthemall or other downloading tool, and this type of access is a great time saver....
But of course my company does not think so :-p They want people to use the interface in order to view the Ads...
Would they be a way, maybe with a protected .htaccess, to leave the folder access to my download script, but deny access to the users...?
I hope I am making sense and you know what I mean :)
All help/remarks appreciated!
I'm having some trouble figuring out how to make a reference to a subroutine in an external .pm file.
Right now, I'm doing this :
External file
package settingsGeneral;
sub printScreen {
print $_[0];
}
Main
use settingsGeneral;
my $printScreen = settingsGeneral::printScreen;
&$printScreen("test");
but this result into an error:
Can't use string ("1") as a subroutine ref while "strict refs" in use
How can I load a pre-existing .txt file as a .rtf file in my C# code if
I want to display it on a richTextBox? I am running Visual Studios Windows
Application.
Thank you very much.
I have a text file sitting on client machine and want to move it to the database server (MS SQL 2008) but I don't have any access to the server except MSSQL client. Can I transfer this file to the server using SQL client connection?
I am attempting to write a LaTeX package which leverages the minted package's \inputminted command. My \mycommand command takes two parameters, the first being a path to a file, and I want to pass the file's extension to the \inputminted command:
\newcommand\mycommand[2]{
\inputminted{#1}{...}
}
Note that the above won't work since the full path is passed to \inputminted.
Example:
\mycommand{/path/to/Test.java}{blah}
should invoke
\inputminted{java}{...}
Hello,
i have a silverlight app which calls a webservice. that webservice encodes a wav file to mp3 format. how should be the best way to wait for full mp3 file creation?
regards
How to check in C# if a javascript file is already loaded on to the page? Let's say I have a user control in a different namespace that I load on to a page. I would like to see if a script file doesn't exist before I register it with the scriptmanager.
Hi,
I am working on an iphone application in which I am consuming a webservice.
So i am parsing the XML file data. any idea about how to parse self closing tag
like: State/ and how to read data of self tag like: Contact Email="[email protected]" Name="PhD" Phone="123-521-3388" Source="location"/
I am parsing xml file using NSXMLPARSER class methods and library
Thanks,
How can I view the change history of an individual file, complete with what has changed ?
I have got as far as : git log -- filename
which shows me the commit history of the file, but how do I get at the content of each of the changes ?
Thanks - I'm trying to make the transition from MS SourceSafe and that used to be a simple right click / show history.
Hi,
I've made a .net 2.0 librabry project, that results in a dll. I've made an app.config file in my project, with settings used in the dll, with the intention that they can be changed later.
I'm attempting to use the dll in an asp.net web application now, so I made the reference to my other project's output, and I see that the dll is copied over to the site's bin folder, and everything works. However, the configuration file is not copied. When I manually copy the app.config and rename it to myDll.config, it has no influence.
The contents of the config file is approximately this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="myDLL.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<myDLL.My.MySettings>
<setting name="myDLL_webservice_Service" serializeAs="String">
<value>https://myhost/Service.asmx</value>
</setting>
<setting name="ID" serializeAs="String">
<value>6</value>
</setting>
</myDLL.My.MySettings>
</applicationSettings>
</configuration>
And I use its settings in the dll with this (vb.net code):
Private _id As Long = My.Settings.ID
How can I put my config information somewhere so it can be used?
In the web.config of the site application?
That has only the appSettings section, and it uses the syntax. It doesn't appear to work though.
In a custom file format that I create and use?
Not that pretty..
I am using Git Version Control on an remote server and I have set up a repository that multiple people will be using to push/fetch from. I have put the repo under
/srv/subdir/git/.git
I have been experiencing problem after problem it seems like.
a) Is this location suitable for handling a project that will need to be accessed/modified by multiple developers and a designer? Or is there a better location?
b)Do I need to modify the permissions on the subdir/ and git/ directories in order to allow remote access? If I do what is the appropriate permissions I should allow?
I know this is a faily long request/question, but unfortunately like many other topics with well covered documentation, documentation does not always cover best practices.
I would appreciate anybodies advice and suggestions?
Thanks
Anyone have experience parsing the RealLegal PTX file format? I'm interested in creating a Mac reader client for this proprietary format.
The PTX file format is in wide use for storing court and deposition transcripts.
I'm trying to download the contents of a web page using PHP.
When I issue the command:
$f = file_get_contents("http://mobile.mybustracker.co.uk/mobile.php?searchMode=2");
It returns a page that reports that the server is down. Yet when I paste the same URL into my browser I get the expected page.
Does anyone have any idea what's causing this? Does file_get_contents transmit any headers that differentiate it from a browser request?
I'm reading about Red Gate SQL Backup, and I liked the concept of creating a database backup compressed and writing on disk the compressed backup directly without an intermediate SQL Server native backup.
And I'm wondering how this type of software make backups. It accesses the database files directly? It uses some sort of SQL Server or Windows API? Windows Shadow Copy?
Hello,
Im tring to create a manifest for my own.dll, i took the manifest file from C:\WINDOWS\WinSxS\Manifests for example. In that, below tag was one of the line.<file name="msvcr90.dll" hashalg="SHA1" hash="e0dcdcbfcb452747da530fae6b000d47c8674671">
In above tag, hash value was assigned with 40 character.
Here comes my doubt,
1) hash value was auto generated, if not, whats it points to?
For my project(in asp.net) i wrote near 1000 lines of c# code for one asp.net page.It includes so many functions.The problem is,it is going complicated while i am writing more codes on one page.How can i make multiple c# files for one asp.net page?? I tried by adding new class in VS2008.But calling a function from one file to other is making error(item is not present in current file).How can i do that??
I have lost all file/folder security permissions of a SBS 2003 installation and was wondering is there some command I can run to restore system file/folder permissions to there default values.
I lost the permissions when I had boot error and had to restore the primary boot sector from backup primary boot sector and had to tun fixboot to get the system booting again.
Many Thanks
Floris
Hi,
During my file upload process, I found illegal character getting saved in Table. zurück.pdf, C _Word.doc were the file names. Here ü, space between C and _Word was found as ? in the Table Column. I have validate the filename in client side by replacing non-alpha numeric values by _ (underscore), but still it escapes and persist into DB. How can these handled in Client side?
I want to create a hgrc file to set the username and password for all paths on some machine, e.g no matter in which directory I am in, hg clone some_path will always work without prompting for a username and a password (this is for an auto-deploy script).
I followed the instructions and created a file: /etc/mercurial/hgrc.d/deploy.rc
it's contents:
[auth]
default.prefix= http://myrepo
default.username = myuname
default.password = pwd
But when I do
hg clone some_path I get abort: error: Connection refused.
What Am i doing wrong?
I have a huge plain text document, about 700kb which is very big for plain texts and I need to format it on cloud converting it to HTML, but the only things that I need to replace, format to HTML so it can be displayed by the browser, are bold and italic. For bold at the plain text they are like this:
Not on bold... **bold text here** not bold here
And italic like this:
Not italic... *italic text* no italic
Just like StackOverflow does for their formatting, but the problem is that I need to make it a lot faster, since the text is so big... One of my ideas was to add a page slide, so I the script just need to format some part of the text, not it all, then after the user changes the page the script would be called again, but the problem is how I can make the code for this all?
Hi,
I have a jar-file, which I want analyze with findbugs through build.xml. I use "class location =....jar" - pattern. The jar-file contains several folders, but I need to analyze only one folder. How can I specify that ? Thanks in advance !
I need to Pass some data to a text file and save that text file in a SQL Server 2005 database.
Then I'll need to be able to load that textfile into a C# WinForms DataGrid.
How do I do that in C#?
I'd like to write a short powershell script for renaming files like:
abc(1), abc(2), .., abc(10), .., abc(123), ..
to
abc(001), abc(002), .., abc(010), .., abc(123), ..
Any idea? :)