I got this from for a login form tutorial:
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
Could some one explain exactly what this does? I know that the 'clean' var is called up afterwards to sanitize the fields; I.e. $email = clean($_POST['email']);
Hi all
I have encountered this topic lately and couldn't understand why they are needed ...
Can you explain me why i should use them in my projects and how they can ease my life .
Examples will be great, and where from i can learn this topic little more .
Thanks.
I see this:
using (StreamWriter sw = new StreamWriter("file.txt"))
{
// d0 w0rk s0n
}
Everything I try to find info on is do not explain what this doing gives me stuff about namespaces ??????????
What is the meaning of ": base" in the costructor of following class(MyClass) ? Please explain the concept behind constructor definition given below for class MyClass.
public class MyClass: WorkerThread
{
public MyClass(object data): base(data)
{
// some code
}
}
public abstract class WorkerThread
{
private object ThreadData;
private Thread thisThread;
public WorkerThread(object data)
{
this.ThreadData = data;
}
public WorkerThread()
{
ThreadData = null;
}
}
I have to create reports from my application (java, swt). For reports i am using crystal reports, but i have problem, i can't find SWT code that enables me to open (create) and save report. I have found Swing code that enables me to do that, but i cant find SWT code. So can somebody explain me, or give me code, or tutorial that will help me to to that.
Tnx.
Hi,
I am passing the email address as part of the url,
for ex. http://example.com/hello/[email protected]
but, when being passed to the application controller it is changed to " user%40hotmail.com ".
I can't seem to understand this special character escaping; confusion.
please help me explain the problem here, and also what can I do to fix it.
I am using python's "webapp" web application framework.
I am unclear about the differences between international, national, regional and local ISPs. Please explain the differences and their importance, with examples. I am new to this site, so please forgive me if my question is not up to your expectations.
Why are Python exceptions named "Error" (e.g. ZeroDivisionError, NameError, TypeError etc)
and not "Exception" (e.g. ZeroDivisionException, NameException, TypeException etc).
I come from a Java background and started to learn Python recently, as such this is confusing because in java there is a distinction between error and exception.
Is there a difference in Python also or not? Can someone explain or point me to some documentation explaining it?
Thank you!
Hi,
Here are my few questions
Can anyone explain what are the LINQ, Lambda, Anonymous Methods, Delegates meant?
How these 3 are different for each other?
Was one replaceable for another?
I didn't get any concrete answer when i did Googling
I'm seeing behaviour on my iPhone where debug builds immediately exit after a call to
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert];
The debugger reports it exited with the message
Terminating in response to SpringBoard's termination.
This behaviour doesn't happen on my ad hoc distribution builds. Can anyone explain this behavior?
I have a .swc file and I learned how to add that swc file into the library. I will be happy if any one explain how to use this .swc file into my flex project and run that with an example .
$fp = fopen("http://feeds.reuters.com/Reuters/PoliticsNews?format=xml","r")
or die("Error reading RSS data.");
The above coding working correctly in localhost;;;
but in server display "Error reading RSS data."...
i dont know why....
anybody please explain me...
i am waiting...
thanks
path fill="none" stroke="#000000" d="M151.5,85.5c0-36.48,29.52-66,66-66"
can anyone explain d="" in detail Im able to understand M tag but i can understand what C tag is? and their details
c0-36.48,29.52-66,66-66
I have a wordpress installation. When the ownership of the folder is root, the memory consumed is okay. However, when I change the ownership to www-data user, it starts consuming a lot of memory and starts throwing a lot of out of memory error. I have changed the ownership to root. However, Can anyone explain why this happens?
Hi,
Can you please explain the below lines, with some good examples.
A left arithmetic shift by n is
equivalent to multiplying by 2n
(provided the value does not
overflow),
while
a right arithmetic
shift by n of a two's complement value
is equivalent to dividing by 2n(2 to the power n) and
rounding toward negative infinity. If
the binary number is treated as ones'
complement, then the same right-shift
operation results in division by 2n
and rounding toward zero.
Thankx..
Say I have this url:
http://site.example/dir/
In this folder I have these files: test.ascx.cs and test.ascx
Just to be clear, I am not a .NET developer.
From a security point of view - why can't I access http://site.example/dir/test.ascx.cs and how secure is it to keep those files there?
I assume IIS filters out request that query these kind of files, but can someone explain me this?
Thank you.
This a NP Complete problem. More info can be found here
http://en.wikipedia.org/wiki/Subgraph_isomorphism_problem
The most widely used algorithm is the one proposed by Ullman. Can someone please explain the algorithm to me. I read a paper by him and couldn't understand much.
Also what other algorithms for this problem. I am working on an image processing project.
Explain which algorithm you would use to implement a function that takes an array of integers and returns the maximum integer in the collection, assuming that the length of the array is less than 1000. Would you use Bubble Sort or Merge Sort and Why?
Also, what happens to the above algorithm choice, if the array length is greater than 1000?
why does the following js expression:
"test1 foo bar test2".replace(/foo.bar/, "$'")
result in the following string?
"test1 test2 test2"
is the $' in the replace string some sort of control code for including everything after the match???
this behavior was screwing with me most of the day. can anyone explain this?
thanks a lot
ps- this is the case in all browsers i've tested
I can't really explain why exactly, but I really hate the .net DateTimePicker control built into C#.net and VB.net. Is anyone aware of a good alternative to either of these controls which is freely available? I'm sure I'm not the only one who doesn't like the control.
The date picker in Google Calendar is one which I really like, so I'd love something like that which I can use in a .net app.
Hey,
For some time i see that employers demand from programmers knowing Sharepoint, but I have problem with understand what it is :/
But today I was at IT training, and main guy told something like that:" Sharepoint is platform for commit code for programmer, control of version etc..."
It is true? It looks like SVN tool... Can someone explain me what advantages it have for c# programmer?
Thanks ;)
Got this code snippet from some website:
int num = 1;
if(*(char *)&num == 1)
{
printf("\nLittle-Endian\n");
}
else
{
printf("Big-Endian\n");
}
Can anyone explain this step-by-step?
&num - Adress of a
(char *)&num - Type-cast address of a into a string
*(char *)&num - Points to the first character of the string
Am I missing anything here?
I'm using restful authentication in rails. Now I just want to change it to Authlogic.
I used
acts_as_authentic do |c|
c.transition_from_restful_authentication = true
end
and changed the password and salt field to 128 characters.But, if I create a new user crypted password length is 40 characters length(Its not changing to 128 as in authlogic).
Plz suggest me, how to change from restful to Authlogic from the start.
i.e I have restful authentication now.(how to change it to authlogic..plz explain from start)