I have a file that I need to "protect" so that it cannot be copied! I am using Python on Windows XP.
I think it may just be changing file permissions??
Consider a simple file upload system written in php. Customer has access only in admin panel.
(Not FTP). He may change folder option from 707 to 755 for security issue.
How can do this? Can we do this from upload script ? If yes is this a secure application?
How can I ensure the contacts I add to an Outlook distribution list are displayed with both name and email address? These contacts may not exist in any other address book, just the distribution list. Currently they show up just as an email address (in both columns).
Here's roughly the VBA we're using:
Do Until RS.EOF
//here's where we want to inject RS!FirstName, RS!Surname etc
objRecipients.Add RS!Email
objRecipients.Resolve
RS.MoveNext
Loop
Set objDistList = contactsFolder.Items.Add("IPM.DistList")
objDistList.DLName = "Whatever"
objDistList.AddMembers objRecipients
objDistList.Save
etc
I am trying to echo a result from xml into my html code form expedia. But I ran into a problem. There text is a little messed up:
<areaInformation>
Distances are calculated in a straight line from the property's location to the point of interest or attraction, and may not reflect actual travel distance. <br /><br /> Distances are displayed to the nearest 0.1 mile and kilometre. <p>La Isla Shopping Mall - 0.5 km / 0.3 mi <br />Yamil Lu'um - 0.5 km / 0.3 mi <br />Acuario Interactivo - 0.6 km / 0.3 mi <br />Luxury Avenue - 1.5 km / 0.9 mi <br />Cancun Golf Club at Pok Ta Pok - 2.2 km / 1.3 mi <br />Nautilus Diving and Training Center - 2.6 km / 1.6 mi <br />Cancun Convention Center - 2.8 km / 1.7 mi <br />Plaza Caracol - 2.8 km / 1.8 mi <br />Playa Tortuga - 3.1 km / 1.9 mi <br />Aquaworld - 3.6 km / 2.2 mi <br />Playa Langosta - 4.1 km / 2.6 mi <br />Museo de Arte Popular Mexicano - 4.6 km / 2.9 mi <br />Playa Linda - 5 km / 3.1 mi <br />Playa Delfines - 6.1 km / 3.8 mi <br />El Rey Ruins - 6.2 km / 3.8 mi <br /></p><p>The preferred airport for ME Cancun - Complete ME All Inclusive is Cancun, Quintana Roo (CUN-Cancun Intl.) - 14.3 km / 8.9 mi. </p>
</areaInformation>
And I echo it in php:
<div id="hotelInfo"><?php echo $areaInfo ?></div>
And of course I get this in the browser window:
Distances are calculated in a straight line from the property's location to the point of interest or attraction, and may not reflect actual travel distance. <br /><br /> Distances are displayed to the nearest 0.1 mile and kilometre. <p>La Isla Shopping Mall - 0.5 km / 0.3 mi <br />Yamil Lu'um - 0.5 km / 0.3 mi <br />Acuario Interac
etc.
How can I fix this??? Any help would be greatly apreciated! Thanks!
I'm looking for cheap SSL certs for running a personal website over https without triggering Firefox's "you may be facing a man-in-the-middle-attack" response that self signed certs provoke. Nothing particularly fancy, no EV, etc. Any recommendations/where do you get your certificates from?
is there any method to get data from excel to sql ? i think that we can do without any writing C#codes. For example : select * from MyExcellFile.xls.Sheet1. Or may be any wizard in sql?
So, it seems one cannot do the following (it raises an error, since axes does not have a set_linewidth method):
axes_style = {'linewidth':5}
axes_rect = [0.1, 0.1, 0.9, 0.9]
axes(axes_rect, **axes_style)
and has to use the following old trick instead:
rcParams['axes.linewidth'] = 5 # set the value globally
... # some code
rcdefaults() # restore [global] defaults
Is there an easy / clean way (may be one can set x- and y- axes parameters individually, etc)?
P.S. If no, why?
Hi Everyone,
I am using a Gem to communicate with FreeagentCentral via their API. I have the following code to display a link to the relevant freeagent project:
<%= link_to "#{image_tag('/images/icons/Spinning Beach Ball.png')} Freeagent Project", "#{Freeagent::Base.site.to_s + Freeagent::Project.element_path(@kase.freeagent_id).gsub(/\A\//, '').gsub!(/.xml/,'')}" if @kase.freeagent_id %>
The problem - There is a / omitted from the URL which makes the url like this:
https://XXXXX.freeagentcentral.comprojects/12345
where it should be:
https://XXXXX.freeagentcentral.com/projects/12345
This may be simple, but to me - it's driving me crazy!
Thanks,
Danny
Are there any online solutions to exercises in that book?
For the C bible, there's http://clc-wiki.net/wiki/K&R2_solutions,
so i tought there may be the same thing for c++ bible but i couldnt really find it.
Hi all, how to read unlimited characters in to a char* variable without specifying the size. For ex: I want to read the address of an employee it may take multilines also. Thanks in advance.
UIButton eventually inherits from NSObject, and NSObject implements NSKeyValueBindingCreation Protocol. So why can't I bind a UIButton's property to another class' property?
[myUIButton bind:@"enabled"
toObject:myOtherObject
withKeyPath:@"otherObjectBOOLProperty"
options:nil];
This results in the warning
'UIButton' may not respond to '-bind:toObject:withKeyPath:options:'
What I'm trying to do is bind the enabled state of my UIButton to myOtherObject.otherObjectBOOLProperty.
may i know how to use javascript onChange on <input type="file"... so that when user selected files, onchange will call flash to return files size and decide what to do next
2nd. how to use javascript to exclude this check,if browser doesnt have flash feature
Hi there,
I have a date format like this :
$date1 = "Sun May 09 20:07:50 +0000 2010";
and I have to convert it to: 09-05-2010
I am using date("d-m-Y", $date1));
When I print this individually it gives proper result but I am using it in loop
it gives me results like: 31-12-1969
I don't understand why this is so?
Can you help, please?
Hi,
May I know the reason of getting the output of the following code as: 1,10,10? Why not it is as: 10, 10?
<script type="text/javascript">
var str="1, 100 or 1000?";
var patt1=/10?/g;
document.write(str.match(patt1));
</script>
Python offers an optional else clause in loop statements, which is executed if and only if the loop is not terminated by a break. For an interesting discussion about this neglected commodity, see this question. Here, I just wanted to know:
if the very concept of this loop-else construct originates from another language (either theoretical or actually implemented),
conversely, if it was taken up in any newer language.
May be I should ask the former to Guido, but he surely is a too busy guy for such a futile inquiry. ;-)
As CrouseControl.net is an open source software and it is a good CI tool, I'm going to create a UI which make configuration easier than tricking XML.
So What are the considerations and necessities. I also need to know about any documentation which may help me to implement UI.
like a XML tag refrences or something else.
any help will appriciated.
I'm trying to do a sparse checkout of a folder containing externals, but none of the externals are being checked out. This issue seems to indicate that this behavior may be by design, or at least that it isn't clear what the behavior should be. From my point of view, the obvious behavior is that externals are treated just as any other directory, and checked out following the same sparse checkout rules.
Is there a way to work around this except manually checking out the externals?
I'm pretty new to lisp, so apologies for what may be a simple question,
Whilst I understand the difference between DEFVAR and DEFPARAMETER (defvar only sets undefined variables), and the LET is for local scope only, what is the is the use of SETF as opposed to the other, previously mentioned assignment functions?
how to get a Dictionary key by value in C#?
Dictionary<string, string> types = new Dictionary<string, string>()
{
{"1", "one"},
{"2", "two"},
{"3", "three"}
};
I want simething like this:
getByValueKey(string value);
getByValueKey("one") must be return "1".
What is the best way do this? may be HashTable, SortedLists?
why we using double pointer like char **p;
are there any purpose ,if there is please tell me
i read some books but none of them tells purpose(s) of pointer to pointer
if we can write char *p; and char **p;
i think we may write char ***p; or char ****p; am i wrong
This may sound weird but i have some css which aligns mys divs. In one place i also use http://www.brunildo.org/test/img_center.html which centers images.
Now i want my divs inside a larger div to go to another line if this one gets full. float: left seems to be the answer. The problem is it ruins my formatting. Including solution in the above link. I have this test code. If i remove the width and float it looks fine except it may take up too much space and not go to another line.
I was thinking i could use float on an outerdiv and center the image within. However float: left is still breaking it. I am hoping there is a way to remove the float so each div does go left but the div inside centers correctly not breaking my formatting.
<style type="text/css">
.wraptocenter {
display: table-cell;
text-align: center;
vertical-align: middle;
width: 200px;
height: 200px;
background: blue;
}
.wraptocenter * {
vertical-align: middle;
}
/*\*//*/
.wraptocenter {
display: block;
}
.wraptocenter span {
display: inline-block;
height: 100%;
width: 1px;
}
/**/
div.c
{
background: red;
overflow: hidden;
min-width: 400px;
max-width: 400px;
}
div.c div
{
float: left;
}
</style>
<!--[if lt IE 8]><style>
.wraptocenter span {
display: inline-block;
height: 100%;
}
</style><![endif]-->
<div class="c">
<div>
<div>
<div class="wraptocenter"><span></span><img src="a.jpg" alt="/a.jpg"></div>
<div class="wraptocenter"><span></span><img src="a.jpg" alt="/a.jpg"></div>
<div class="wraptocenter"><span></span><img src="a.jpg" alt="/a.jpg"></div>
</div></div></div>
Any tips How to figure out where is memory leak in my Facebook app, its ASPX using Facebook toolkit DLL and I am afraid the bug may be in that CS library.
The problem is that after one week uptime, server is running out of memory and needs to be rebooted, there are quite many users and I cannot run debugger on this "production server", so I would need to simulate somehow use on my local PC.
I guess this may be a novice question ( Which I am :) ).
While redirecting user to custom error page, for e.g. 404, to tell that page wasn't found, the type of this redirect is 302.
<error statusCode="404" redirect="/Utility/Error404.aspx" />
<error statusCode="400" redirect="/Utility/Error404.aspx" />
Is it possible to make this redirect 301 through Web.config?
Thanks in advance to you all code maniacs.
If you want to some code to execute based on two or more conditions which is the best way to format that if statement ?
first example:-
if(ConditionOne && ConditionTwo && ConditionThree)
{
Code to execute
}
Second example:-
if(ConditionOne)
{
if(ConditionTwo )
{
if(ConditionThree)
{
Code to execute
}
}
}
which is easiest to understand and read bearing in mind that each condition may be a long function name or something.