my js files are included through header. i dont want to have some .js files included in certain pages, while that particular page is loading. is it is possible.??? help me please.....
Hi,
Is there a built-in way to create vCard files in the .NET Compact Framework?
If not, what is a good library for this?
I have found this one which after some adaptations would seems to be able to do the job on the Compact Framework:
http://thoughtproject.com/Libraries/vCard/index.htm
But I'm not sure if there is not a build-in or more standard way to do it.
Regards,
Will
i create .htaccess and when run the page all images in my site not display and css not run.
images in the folder (images/) and css in(css/).
another problem the url now is http://localhost/mysite/progams/4
and when click link inside this page will be http://localhost/mysite/progams/program/6
please any one have a solution?
.htaccess code
Options +FollowSymLinks
RewriteEngine On
# Turn on the rewriting engine
RewriteRule ^program/([0-9]+)/?$ get_programs.php?pack_id=$1 [NC,L]
RewriteRule ^El-Mensajero/?$ home.php [NC,L]
RewriteRule ^Daily-Tours/?$ daily_tours.php [NC,L]
RewriteRule ^page/([0-9]+)/?$ get_pages.php?page_id=$1 [NC,L]
thank you
Something odd I recently encountered, running file --mime-type on a collection of MP3 gets the mime-time wrong a third of the time:
$ for i in */*.mp3; do cat "$i"| file --mime-type -; done | sort | uniq -c
140 /dev/stdin: application/octet-stream
309 /dev/stdin: audio/mpeg
There doesn't seem to be any obvious reason, as even MP3s from the same source, will sometimes fail and sometimes not.
Bug, feature or anything obvious I am missing here?
hi,
I am using php session for a basic login without encryption for my site. I want to prevent a user from directly accessing a php page by typing the url when he/she is not signed in. But this is not happening. I am using session_start(), initializing session variables and aslo unsetting and destroying sesssion during logout. Also if I type the link in a different browser the page is getting displayed.
I am not very well versed with php , only a beginner. I googled for such problem and found few alternatives as keeping all files in a seperate folder from the web root, using .htaccess etc. Can someone explain in simple terms what could be a good solution.thanks in advance.
I writing a webapp which uploads images to imgur directly. Since all older version of their APIs have been deprecated i am forced to use v3 of their APIs. Unfortunately I am unable to get the API to work. I am using curl to access the API.
$pvars = array('image' => base64_encode($data));
$timeout = 30;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.imgur.com/3/upload');
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $pvars);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Client-ID xxxxxxa61xxxxxx'));
$xml = curl_exec($curl);
$xmlsimple = new SimpleXMLElement($xml);
print gettype($xml)."<hr>";
echo '<img height="180" src="';
echo $xmlsimple->links->original;
echo '">';
curl_close ($curl);
The "Xml" variable always return as "false", no server error is displayed. Can someone guide me to what I am doing wrong ? Unfortunately I am also unable to find any proper example in the documentation nor around to guide me.
Consider something like:
cat file | command > file
Is this good practice? Could this overwrite the input file as the same time as we are reading it, or is it always read first in memory then piped to second command?
Obviously I can use temp files as intermediary step, but I'm just wondering..
t=$(mktemp)
cat file | command > ${t} && mv ${t} file
* * * * * php /home/admin/public_html/domain.com/public/cron/route.php &>> /home/admin/public_html/domain.com/log/cron.log
I have that cron running every minute.
I want to store the errors that occur in route.php in cron.log
This works wonderfully when I run :
php /home/admin/public_html/domain.com/public/cron/route.php &>> /home/admin/public_html/domain.com/log/cron.log
through the command line manually. But when crontab runs it no errors gets stored in cron.log
the cron.log is owned by admin:admin and the permissions are set to 777 just to be sure.
anyone?
Hello all
I am looking for compare utility similar for "win merge" or "beyond compare" .
That in addition for gui comparison will have api that i will be able to run on my files via my code and see if the files are the same or not and also use it in gui mode to show graphically the differences .
Any recommendations ?
thanks
I'm having some issues in playing .swf files on my application.
On my PC, using Media Player Classic, they work normally, but on my phone they dont, all I hear is weird sounds.. the code I use to play:
mediaplayer = MediaPlayer.create(getBaseContext(), Uri.parse(CurrentAyaSoundPath));
Can anyone tell me why I cant play .swf files normally? Is there another way to play them?
Edit1: the .swf are sound only.. no video
I'm upgrading my static website that had .php extensions on the content pages. I've created my own simple cms which will start retrieving data from mysql database from now on, keeping the url structure same as the old once.
The cms has get function to retrieve url structure from the database. Overall it started working fine with .html when i tested. But when i change the .html extension to .php in my .htaccess code the content pages starts reflecting "Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request."
Here is my .htaccess code which i've used:
RewriteBase /
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^?]*).php$ content.php?pid=$1
Perhaps there is a conflict, here is the code with .html extension that actually works fine.
RewriteBase /
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^?]*).html$ content.php?pid=$1
So basically, content pages with .html are working & .php are not working. But i need my content pages to be with .php
Please help. Thanks in advance... :)
i try to check the permission granted to a directory in linux, i mean i have a directory with permission 755
berty@berty-laptop:~$ ls -l / |grep directory
drwxr-xr-x 3 root root 4096 2011-01-10 12:33 directory
how can i read that permission with java? I've tried using FilePermission but though i have a directory with all the permissions (777) the FilePermission class always returns an exception
java.security.AccessControlException: Access denied (java.io.FilePermission /home/directory read)
at java.security.AccessController.checkPermission(AccessController.java:103)
at com.snippets.Check4DirectoryPermission.checker(Check4DirectoryPermission.java:50)
at com.snippets.Check4DirectoryPermission.main(Check4DirectoryPermission.java:70)
is there another way to do this?
i have some picture files that were included in a vb.net project
how do i reference those files in my code?
what it be just filename.ext
or would it be project/filename.ext
or would it be something like environment.getfolderpath.project/filename.ext??
the build action is NONE, and it is to be copied to output folder
For deubgging some process I will need to download the PDB files for some operating system dll files (OLE32, NTDLL, etc.)
That server is not connected to the internet.
I know the following method to get the PDB.
Get full dump of the process
Copy the dump to another machine where internet connection is available
Use .reload to download the PDB files
Copy the PDB files from the local PDB store
Is there any thing more simple or do I have to go through the dumping process?
Thanks
Saar
Seeing as you can convert any document to a byte array and save it to disk, and then rebuild the file to its original form (as long as you have meta data for its filename etc.).
Why do you have to mark a class with [Serializable] etc? Is that just the same idea, "meta data" type information so when you cast the object to its class things are mapped properly?
I need to program a simple Windows Explorer that only lists all files inside a folder recursively.
The only solution I found up to now is using an ActiveX controller.
So, I installed Visual Studio 2010, but I don't know really how to use it to make an ActiveX.
I tried to create a Class Library then add a Explorer module. It compiles, but I don't know what to do now.
Is there an easier way to do this or am I missing something ?
Hello,
Is there Any way I can direct display pdf files in modal boxes?
I am using CodeIgniter PHP frameword and jquery as javascript framework.
Thank You.
Hi, I just published this simple console application that is supposed to show a textbox with the value of a setting called "userID" with value 1001. This works like a charm. Now what I need is to change this value outside the editor, from notepad etc.
When I open the application a lot in there is non-sence (& o! -å Þþþ,o" Ü+) etc. but with a quick (ctrl + F) I found the value 1001, and changed this to some other integer. I ran the application again, and it failed, didn't even give any userful error-message. At a point I tried just opening a newly published non-corrupted version of the application, didn't change anything, then saved from notepad, and it were also corrupted. It seems like notepad can't open some characters or something. Do I need to publish the application in some specific text-unicode language or something?
Help much appreciated :) I know it sounds like a stupid application, but it is just a test of concept :)
I use vb.net for this
HI. I created two files 'hello.pl' and 'hello.cgi' with the code below.
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "hello world";
I can view the page via both
http://www.mydomain.com/cgi-bin/hello.pl
and http://www.mydomain.com/cgi-bin/hello.cgi.
Which one is more sense in Perl web dev?
BTW, the directory of 'cgi-bin' created by my VPS server, Do I need contact with my VPS support to remove it or just remain it like this URL style? Maybe http://www.mydomain.com/perDev/hello.cgi is better?
hi ,Can anybody help me out with traceview!
I created sdcard and mounted it on my emulator , after closing my app , when i try to pull to copy the files (using command:adb pull /sdcard/calc.trace /tmp)i get this error:"remote object /sdcard/calc.trace does not exist".I am listin gdown the commands in sequence.
1)f:mksdcard 1024 ./myimage
2)f:emulator -sdcard ./myimage -avd 1
3)(After running my app and exiting the app)adb pull /sdcard/calc.trace /tmp
in my activity i have start/stop method tracing with fiename calc.trace.
n ya i am running windows --"\"
regards
Weired but I am investigating the Oracle Coherence as a substitue for distribute cache. My primarr problem is that we dont have distribituted cache as such as of now in our app. Thats my major concern. And thats what I want to implement. So, lets say if I take up a machine and start a new (3rd) reading process, it will be able to connect to the cache and listen to the cache and will have a full set of cache triplicated (as of now its duplicated) Now thats waste from a common person stanpoint too. The size of the cache is 2 GB and without going distibuted its limiting us.
Thats bring me to Coheremce.
But now, we dont have database as persistent store too. we have the archival processes as our persistent store. (90 days worth of data) Ok now multiply that with soem where around 2 GB * 90 (thats the bare minimum we want to keep).
Preliminary/Intermediate analysis of Coherence as a solution.
And a (supposedly) brilliant thought crossed my mind. Why not have this as persistant storage with my distributed cache. Does Oracle Coherence support that. I will get rid of archiving infrastructure too (i hate daemon archiving processes). For some starnge reasons, I dont wanna go to the DB to replace those flat files.
What say?, can Coherence be my savior? Any other stable alternate too.
(Coherence is imposed on me by big guys, FYI)
In this program when I debug, it is showing the nil for fileNameString. I could not understand what is the problem. Please help me ?
@implementation fromFileRead1
NSString *fileNameString;
-(id)init
{
if( (self = [super init]) )
{
fileNameString = [[NSString alloc] initWithContentsOfFile: @"enemyDetails.rtf" encoding:NSUTF8StringEncoding error:nil];
NSArray *lines = [fileNameString componentsSeparatedByString:@"\n"];
for (id *line in lines)
{
NSLog(@"Line1%@", line );
}
}
return self;
}
@end
Thank You.
Hi Guys,
This is probably a simple one to answer, but im stuck, so here goes
sed '3d' filename (or something like tht)
Im having trouble try to use a $VARIABLE instead of the number
Any1 know how to get this to work , or any alternative options
Regards
Paul
I have a binary files which needs to be sent as a string to a third-party web-service. Turns out it requires that it needs to be base64 encoded.
In ruby I use the following:
body = body << IO.read("#{@postalcard.postalimage.path}")
body is a strong which conists of a bunch of strings as parameters.
So...how do I base64 encode it into this string?
Thanks.
<system.net>
<mailSettings>
<smtp from="[email protected]" deliveryMethod="Network">
<network clientDomain="www.domain.com" host="smtp.live.com" defaultCredentials="false" port="25" userName=" [email protected] " password="password" enableSsl="true" />
</smtp>
</mailSettings>
</system.net>
This is the case where I need encryption for my password. I searched and googled much on the web but I can’t be able to encrypt anymore.
Can anyone help me do this in a simple but secure way.