Hello,
I want to check if an URL exists using PHP. for eg. If someone enters www.adflkjweoifj123912873.com, I want to check if this domain has a website, or its live on the web.
Thanks
Jean
I am trying to encrypt a string in php using AES-128 and CBC, but when I call mcrypt_generic_init() it returns false.
$cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '',MCRYPT_MODE_CBC, '');
$iv_size = mcrypt_enc_get_iv_size($cipher);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$res = mcrypt_generic_init($cipher, 'aaaa', $iv); //'aaaa' is a test key
Can someone tell me why is returning 0/false? I read the php documentation and seems correct
(http://us.php.net/manual/en/mcrypt.examples.php)
A have a large div (a map) that is draggable via jQuery UI draggable. The div has child divs which are clickable.
My problem is that if you drag the map, on mouse up, the click event is fired on whatever child div you started the drag from.
How do I stop the mouse up from triggering the click event if its part of a drag (as opposed to someone just clicking without a drag, in which case the click event is desired).
Are there any known flaws with htaccess protected pages?
I know they are acceptable to brute force attacks as there is no limit to the amount of times someone can attempt to login. And a user can uploaded and execute a file on the server all bets are off...
Anything other .htaccess flaws?
Can someone point me towards a resource or show me an example of a good way of writing sql statements in php.
Most statements seem so ugly and unreadable.
I know that this is a subjective question...
Typemock is $799 per developer. Licences for 5 devs comes up to a pretty large sum. If someone here used Typemock and given that there are open source mocking frameworks, is it worth the money? Why?
Hi there,
This might be a stupid questions but I wanted to know what happens if two users edit some data at once and then both click submit at the same time, I assumed Rails handled requests one after the other and so someone would get an error message but is this correct?
Thanks
(Once one person has edited data I dont want it to be accessible or editable anymore)
I guess this should be straightforward but my host got me to switch server from zeus to apache following which the .htaccess file with existing individual 301 redirects failed to work causing an internal server error, so have commented them out for the time being. Could someone explain how to set these up to work in their new apache context? Have no apache experience
Example redirect:
Redirect 301 /pages/exhibitions/thegreatindoors.html http://www.klassnik.com/pages/thegreatindoors.html
Read a lot about mod rewrites etc but not sure what to write. Thanks
Hey,
I kind of understand what's retain counts for. But not totally. I looked on google a lot to try to understand but still I don't.
And now I'm in a bit of code (I'm doing iPhone development) that I think I should use them but don't know totally how.
Could someone give me a quick and good example of how and why using them?
Thanks!
I have a strange problem in C++. An address of a Boolean gets "destroyed" but it doesn't get touched. I know that there are beater way's to accomplish what I try to do, but I want to know what I do wrong.
I have a main class; this main class contains a vector of another class. There is a strange problem when a new instance gets created of this object.
This is how my code works:
There will start a thread when the constructor gets called of the “2nd”object. This thread gets as Parameter a struct. This is the struct:
struct KeyPressData
{
vector<bool> *AutoPressStatus;
vector<int> *AutoPressTime;
bool * Destroy;
bool * Ready;
};
The struct gets filled in the constructor:
MultiBoxClient::MultiBoxClient()
{
//init data
DestroyThread = new bool;
ReadyThread = new bool;
AutoThreadData = new KeyPressData;
//Reseting data
*DestroyThread = false;
*ReadyThread = false;
//KeyPressData configurating
AutoThreadData->AutoPressStatus = &AutoPressStatus;
AutoThreadData->AutoPressTime = &AutoPressTime;
AutoThreadData->Destroy = DestroyThread;
AutoThreadData->Ready = ReadyThread;
//Start the keypress thread
CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)AutoKeyThread,AutoThreadData,NULL,NULL);
}
As long as the constructor is running will the program run fine. But when the constructor closes the address of the “AutoThreadData-Destroy” will get corrupted. The program will crash when I call the value of the pointer.
void WINAPI AutoKeyThread(void * ThreadData)
{
KeyPressData * AutoThreadData = (KeyPressData*)ThreadData;
while(true)
{
if(*AutoThreadData->Destroy == true) //CRASH
{
*AutoThreadData->Ready = true;
return;
}
Sleep(100);
}
}
What did I test:
I logged the address of the AutoThreadData and the AutoThreadData-Destroy when the constrcutor is running and clossed; the AutoThreadData address is equal to AutoThreadData when the constructor is closed. So there is no problem here.
The address of AutoThreadData-Destroy gets destroyed when the constructor is closed. But how can this happen? The Boolean is on the heap and the KeyPressData struct (AutoThreadData) is on the heap.
Destroy before: 00A85328
Destroy after: FEEEFEEE
Can someone maby explain why this crash?
I know that I can send a pointer to my class to the thread. But I want to know what goes wrong here. That way I can learn from my mistakes.
Could someone help me with this problem?
Thanks!
hi i'am begginer in pYthon and openerp , i want to call a function exists in another class
for example:
i have 2 class :
class a:
def notif_personne_event(self, cr, uid,ids,context=None):
and
import a
class b:
notifier(self, cr, uid,ids,context=None):
self.notifiernotif_personne_event()
but when i do this an error is displayed telling me that class b have not an attribute notifiernotif_personne_event()
someone help me please
I'd like to have dired show a little icon next to each file, similar to what you'd see in "list" or "details" view on a graphical file browser. Someone posted a similar question but the only answer was for Windows only; I want to be able to do this on Linux or Mac.
Could someone tell me the difference between those two. The first one is working on FF and not in IE (6) and second one is working in IE (6) and not in FF (I am using the Jquery 1.4.2). We had to detect the browser and write the script accordingly.
Hi
http://wiki.apache.org/couchdb/Document_Update_Handlers
CouchDB ( 0.10 and above ) supports in-place updates now. I'm having trouble understanding how it works. I tried to use the example provided but I couldn't get it to work.
Can someone provide some examples and uris used to access the in-place updates.
Thanks
We have an API proxy configured with cache ttl of 2mins. Is it possible to configure apigee to serve stale cached content if the backend goes down so that our end users don't see errors?
We would rather have our end users get copies of stale cached content (even after the configured ttl of 2mins expires) instead of errors when the backend goes down.
Would appreciate if someone could point me to the relevant documentation if this is possible.
Hi Alsways uploading made web-sites , projects, I want to make such thing
make zip file,
upload one file
and then extract with default CHMOD for folders lets say 755 and for files 664
With Cpanel hostings its OK, I can do it via file manager... But for hostings without I can't.
Baybe someone can give a hint how...????
Hi,
Can someone provide a reference which show statistics on how many hi-tech startup companies have been established in 2007, 2008, 2009 worldwide?
Regards
Hi,
I love my Mac. But I have always found that my DNS lookups are as slow, even while flushing caches and I travel over know roads on the Internet. I was wondering if someone would know something a bit more automatic/intelligent than /etc/hosts and less complex and iron forged as BIND.
Thank you for your feedback and answers!
When I tried to install the openid plugin, I do not get any confirmation msg about the installation.Even I specify some random .git plugin name, It does not give out any error.
Can someone please tell me what about to do to rectify the problem?
I used the following syntax
ruby script/plugin install git://github.com/rails/open_id_authentication.git
Hi,
I have an app killing feature in one of my apps but up to API 7 i always worked with restartPackage(String PackageName); but since API 8 its deprecated so I tried killBackgroundProcesses(String PackageName); but that didn't work either.
Both are methods are in the ActivityManager class
I hope someone can help me.
iam trying to open a child window with disabld toolbar in IE.
Everytime i have to set the pop up blocker as off and ten work on it.
can someone help with a piece of code to disable the pop up blocker using javascript for all IE versions.