Hi:
I'm sure this question is fairly simple to answer... is there any way to make variables and helpers available application-wide on the iPhone, without using the Application delegate?
Thanks!
How to right this syntax correctly:
if (tipoTropaPrioritaria[m] || troopsCount[m] || availableTroops[m]) == ("null" || "undefined") {
...
}
(to check if any of the first 3 variables is null or undefined)
Hi
No thread about use or unuse of obfuscusion please ^^
Just share creative approaches how to obfuscate in php the really smart way plz.
plain md5 and base64_decode is too static ..
what you think regarding hash, salt
what about dynamic Variables (even for the same $var).
Thx for any creative input
Is it possible (and if so how) to redirect the url from a forms get variables into something more url friendly using IIS 7's URL Rewrite module. An example would be
/Catalog/Search/Title=Something&Order=Price
into
/Catalog/Search/Title/Something/Order/Price
Thanks for any suggestions
int* Register = 0x00FF0000; // Address of micro-seconds timer
while(*Register != 0);
Should I declare *Register as volatile while using armcc compiler and -O0 optimization ?
In other words: Does -O0 optimization requires qualifying that sort of variables as volatile ? (which is probably required in -O2 optimization)
Hi,
In android, are using static variables a recommended practice?
E.g, implementing a Singleton pattern in Java, I usually do:
private static A the_instance;
public static A getInstance() {
if (the_instance == null) {
the_instance = new A();
}
return the_instance;
}
Also, when does this get cleaned up by the Android JVM?
Thank you.
I found some sample code from here.
static UIImage *backgroundImageDepressed;
/**
*
*/
@implementation DecimalPointButton
+ (void) initialize {
backgroundImageDepressed = [[UIImage imageNamed:@"decimalKeyDownBackground.png"] retain];
}
is it something like this - +(void) initialize method initialize static variables of a class ( interface ) in objective c ? I have never seen this before.
Please need your guidance on it.
Thanks in advance for sharing your great knowledge.
Sagar
I saw two common approaches for coding standards for private member variables:
class Foo
{
private int _i;
private string _id;
}
and
class Foo
{
private int m_i;
private string m_id;
}
I believe the latter is coming from C++. Also, many people specify type before the member variable: double m_dVal -- to indicate that is is a nonconstant member variable of the type double?
What are the conventions in C#?
Hi there,
I have a piece of text that gets handed to me like:
here is line one\n\nhere is line two\n\nhere is line three
What I would like to do is break this string up into three separate variables.
I'm not quite sure how one would go about accomplishing this in python.
Thanks for any help,
jml
Hello.
I have a question. I need to kwon what is the relationship between a Random Variable with Normal distribuation (N(0,1)) and others continuous random variables.
Can you write to me an example?
Thank You
Hola a todos.
Necesito saber qué relación existe entre una variable aleatoria Normal (0,1) y cualquier variable aleatoria continua. Además, me vendría bien un ejemplo.
Gracias por vuestra ayuda
Is there a list anywhere that lists all the variables I can use in file names for report subscriptions from within SQL Server Management Studio? I currently use @timestamp in my file names, but would like to use other options or even remove parts of the time stamp (for example, just use the date, not the time).
For example, here is a string representing an expression:
var str = 'total = sum(price * qty) * 1.09875';
I want to extract variables (i.e., 'total', 'price' and 'qty' but not 'sum' since 'sum' is a function name) from this expression. What is the regexp pattern in javascript? Variable name consists of letters, digits, or the underscore, beginning with letters or the underscore.
I want to know how to use variables for objects and function names in Python. In PHP, you can do this:
$className = "MyClass";
$newObject = new $className();
How do you do this sort of thing in Python? Or, am I totally not appreciating some fundamental difference with Python, and if so, what is it?
When using Zend Studio to write views for a MVC framework, is there any way of having those variables autocomplete, perhaps using PHPdoc?
For example, I set a variable in a view called $cart which is an instance of my ShoppingCart class. When I type "$cart-", I'd like the IDE to pop up with all of the objects properties.
I am just working on a project where the library has an object with the property color, however being British I always use colour when writing variables and properties.
I also just found some legacy code where the British developer used color in a variable name.
Is American English the default for development now?
I am trying to use Capistrano to deploy to two different roles, using Bundler on both, however the Bundler command and flags will be different. Is it possible to set variables that are specific to a role? Either something like:
set :bundle_flags, "--deployment --quiet", :role => "web"
or:
role :web do
set :bundler_cmd, "--deployment --quiet"
end
Neither of those two options work, of course. Is there a way to accomplish this, or something like it?
Hi can we hide variables in a structure from outside of the given file using static keyword???
similarly can we hide a global variable from outside of the given file using static keyword?
if so please let me know how.
Thanks in advance...
Hi everyone,
Will there be any measurable performance difference when passing data as values instead of as reference in PHP?
It seems like few people are aware of that variables can be passed as values instead of references. Is this common sense or not?
hi, i am a little new to php and although i have managed to pass values of sessionvariables before this piece of code is leaving me puzzled
<form action="team_reg2.php" method="post" name="form1" class="cent" id="form1">
Team Registration
";
print "member$i";
print "\n";
print "\n";
print "Please enter only id\n";
}
?
now this will pass via post to team_reg2.php
echo " please note your team id is 1 ";
echo " your team members are : ";
for($i=1;$i<=$num;$i++)
{
$name='mem'.$i;
echo "$_POST[$name]";
}
}
else
{
$str="select * from $query where (";
for($i=1;$i<=$num;$i++)
{
$name='mem'.$i;
$text="p_id='$_POST[$name]'";
if($i==1)
$str=$str.$text;
else
$str=$str.' or '.$text;
}
$str=$str.')';
$query2=$str;
echo "$str";
// echo "$query2";
$que=mysql_query($query2,$con) or die(mysql_error());
$num=mysql_num_rows($que);
if($num!=0)
{
while($result=mysql_fetch_array($que))
{
echo "$result[p_id] is already registered in team $result[t_id]";
}
//include("reg_team.html");
}
else if($num==0)
{
//echo $query;
$query2="select max(t_id) from $query";
$que=mysql_query($query2,$con) or die(mysql_error());
//echo "$que";
$result=mysql_fetch_array($que);
$max=$result['max(t_id)'];
$max++;
$num=$_SESSION['max_team'];
for($i=1;$i<=$num;$i++)
{
$name='mem'.$i;
if($_POST[$name]!="")
{
$query2="insert into $query values($max,'$_POST[$name]')";
$que=mysql_query($query2,$con);
}
}
echo " please note your team id is $max ";
echo " your team members are : ";
for($i=1;$i<=$num;$i++)
{
$name='mem'.$i;
echo "$_POST[$name]";
}
}
}
?
i have done session_start(); at the beginning of the page itself. The problem is that echoing $_SESSION variables in second file is not printing anything.
someone please explain me whats going on.
thank you
Hi there,
Using Php I would like to extract the current Url of a page including all variables attached to it.
$_SERVER['PHP_SELF'] only return the url without the variable . any idea what function I need.
example : www.site.com/?v1=xyz&v2=123
using $_SERVER['PHP_SELF'] I get only : www.site.com as opposed to the whole url.
using $_GET[] individually is not an opton since I am not sure what variable are attached to the URL.
thank you
Say I got two functions that looks like this:
function main(Index)
{
doStuff();
}
function doStuff()
{
if(Index == 1)
{
document.write("Hello world!")
}
}
And some HTML:
<input type="button" value="Click me" onclick="main(1)" />
I realize this is a very stupid way to use function-specific variables and such, but it's just out of curiosity. So is it possible to pass the variable Index from the main function to the doStuff function?
I am debugging a VB 6.0 program that is using XML methods, etc...
so I wish to be able to see how these XML variables in my program look like when I am debugging it ... How can I do that?
How can I use randomize and rnd to get a repeating list of random variables?
By repeating list, I mean if you run a loop to get 10 random numbers, each random number in the list will be unique. In addition, if you were to run this sequence again, you would get the same 10 random numbers as before.
I need to find out what variables and values are being POSTed to a script that I'm debugging. It's doing something strange to them, and it needs to start a session so I can't ouput them right at the beginning. I'm hoping to find a plug-in for Firefox that will show me what they are directly from the browser. Does anyone know of such a thing?