safe

Need help with a PHP proxy script

I’m currently working on a small web app that allows people to search for music album covers. However, I’m having a problem getting my PHP proxy to work. Right now I’m using a simple PHP proxy script to grab the HTML from Google’s image result page, and parse it to find the first image result (I can’t use the image search API because it ...

Atomic [move to another table, then delete original data]

I have a Data table and an Archive table. A webapp pours data into the Data table, and a cron job pulls the data out every hour and archives it in the Archive table (this keeps the Data table small and quick to work with). As I see it there are two psudo-SQL queries to run: INSERT Archive SELECT * FROM Data; & DELETE FROM Data; H...

gdi+ removable device IO Safe problem

I am using gdi+ for image format checking. It is really surprising that gdi+ Image img(path); does not throw exception when a device is removed. for example, I am checking a list of image files on a removable device. I plug the disk off, Then My Application will crashed. How can I avoid such problem? Many Thanks! I am using c++ gdi+ wi...

Safe placement new & explicit destructor call

This is an example of my codes: template <typename T> struct MyStruct { T object; } template <typename T> class MyClass { MyStruct<T>* structPool; size_t structCount; MyClass(size_t count) { this->structCount = count; this->structPool = new MyStruct<T>[count]; for( size_t i=0 ; i<count ; i++ ) ...

100% safe photo upload script

Question is simple. How can I make 100% safe photo upload script with php? Is there any tutorials which shows all possible safeness's gaps? Do not offer me to look this question http://stackoverflow.com/questions/786507/uploading-photos-how-can-i-keep-our-website-safe-stable, because there they talk only about size. But I want to be sur...

Visual SourceSafe 2005 - How to GET changed files for a certain date range (command line tool)

Here I was trying to perform a GET operation to pull a list of files that have been checked in/changed for a given date range, excluding the ones that have not been changed in that time frame. Here's the command I'm using: ss Get $\MY_PROJECT to . -Vd8/01/10;12:00a~08/03/10;11:59p -R In the beginning it actually seems to do what I wa...

PDO maturity in PHP 5.2.13

How mature is PDO for PHP 5.2.13 for a serious project? (By serious I mean a script that is going to be sold and deployed in different platforms and environments. Something not serious would be for testing or developing, in this case) Currently, most host companies are running PHP 5.2.13 and adoption for 5.3.x seems too far away... S...

Unsafe to throw exceptions from statically linked C++ libraries?

I've heard that throwing exceptions in/from a C++ library could be potentially dangerous, particularly with DLLs, and particularly if the calling code and the library are compiled with different compilers. Is there any truth to this? Is it safe as long as I stick to static libraries? Note that I am not talking about internal use of excep...

Problem with Flex socket and Java server

Hi every one, I am writing a online game with flex and java server and I have a big problem. In normal case, my game run smoothly but some time the clients can't receive the command from server. I found that if server send message too fast or client is doing something when server send message, the game client can't detect for a new mes...

Python, safe, sandbox

Hello, I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts without harming ...

Is there any safe refactoring tool for .net (or at least c#)?

Hello, I recently read Michael C. Feathers' book Working effectively with legacy code and came across the point where he mentioned a way to test the safety of automatic refactoring tools. My question is: Are there any safe refactoring tools for the .net platform?; that means tools which only allow real refactorings and e.g. don't allow ...

How to use VSS for Database management same as for source code?

Hi All, Thanks in Advance.. I want to put a question to solve my problem, the question is that how is the way to use database (Trigger, Sps, and other elements) in VSS same like using source code in VSS and access in Microsoft Visual Studio. like doing check in and out of database elements in VSS or other tool for making database in c...

safe cast by a subclass type id in java

I have a base Entity class: public class Entity { abstract int getTypeID(); } The method int getTypeID() returns a number that is unique to that class: public class OneEntity extends Entity { int getTypeID() { return 1; // Actually defined in a constants class } } Now I want to be able to safely cast it and ...

PHP (external) safe image with cache?

Hello, Is there a way to display external images with PHP having cache? I want display images like: www.domain.com/safe_image.php?url=external.site.jpg Basically like what Facebook does. What's best way to achieve this? Thanks. Edit This is my code now: $image_url = $_GET['url']; $ch = curl_init(); $timeout = 0; curl_setopt ...

When should I use escape and safe in Django's template system?

If I have a box where people put comments, and then I display that comment like this...should I escape? {{ c.title }} ...