variables

how many character can set for string variable?

i have a variable with string type.for example string test;.how many character i can set for test?thanks. ...

How to pass Post (variable) info to a second page

I have an HTML order form that collects info and then on submission passes that to a PHP form which sends an email. Then I have the PHP form forwarding to a PHP confirmation page. I am using the POST method on my HTML form. I am forwarding to the PHP confirmation page with header() after it sends the email. Everything is working fine...

xcode defining variable problem

Hi there Can someone please explain to me why my variable called activity is 0 when defined as a float, but displays the correct value when defined as an int? I have another float which is used for pretty much the same thing but works perfectly! @implementation AppPrefsViewController float age; int activity; ... -(void) updateAValues...

XAML and local variable/auto property...

Hi all, I try to set a local property through XAML and a trigger. The idea is to "reproduce" the behaviour that exists in most of settings pages with an "Apply" button at the bottom. As soon as the user modify one the the control/settings in the page, I want to set a local variable ("FilterModified") to "true". I tried this, but somehow,...

Saving value as a variable name in database

Database Table company_info ----------------------------- | companyname | companytype | ----------------------------- | Company One | Blah | ----------------------------- | Company Two | Blah2 | ----------------------------- Database Table invoice_template ----------------------------- | Header | bgcolor | -----...

Passing a float between multiple viewcontrollers

Hi Im using tabs to switch between two view controllers. How do I retrieve a float in the secondviewcontroller, thats been initiated in the firstviewcontroller? should i make some sort of global variable? Where and how do I do this? Thanks guys :) ...

append object to another object in php

Hi. I have this object: foreach(range(1,$oc->num_users) as $num) { $user = 'user' . $num; $$user = mysql_fetch_object(mysql_query("SELECT user".$num.", user".$num."_ready, FROM oc_db WHERE leader='".$_SESSION['username']."' ")); This gives objects named user1..X later I have a simular function like this, where I use the $...

IntelliJ: How to auto-highlight variables like in Eclipse

My employer wants me to use IntelliJ for Java development. Previously, I've always used eclipse. One of my favorite features in eclipse was being able to click on a variable, method parameter, class field, etc and see the usage of those variables highlighted throughout the class. Is there a way to enable this feature in IntelliJ IDEA? ...

PHP - read variables from a array string field

Hi I have a array that looks like this: $sites = array('Twitter' => 'http://twitter.com/home?status=$status', 'Digg' => 'http://digg.com/submit?phase=2&amp;amp;title=$title', .... ); $status = 'bla bla'; $title = 'asdasf'; foreach($sites as $site_name=>$site_url) echo '<li...

shorter php cipher than md5?

Hi, For a variety of stupid reasons, the maximum length of a given form variable that we are posting to an external server is 12 characters. I wanted to obscure that value with md5, but obviously with 12 characters that isn't going to work. Is there a cipher with an already-made PHP function which will result in something 12 character...

PHP - replace a string with a variable named like the string

Hi so the string is like this: "bla bla bla {VARIABLE} bla bla" when I use this string somewhere in a function I want to replace {VARIABLE} with $variable (or any other uppercase strings with wrapped within {} charcters). $variable (and any other variables) will be defined inside that function Can i do this? ...

How do I get the address of a certain variable in gdb

How do I get the address of a certain variable in gdb, with the command line that is. Edit : It doesn't work in constructor. ...

Passing int from one Function to another

I really have no idea how this is done, it should be simple but i just cant get it i have an IBAction and void and want to do this: -(IBAction)pass{ int VariableX = 10; [self getVar]; ---> send var to -(void)getVar } -(void)getVar{ get the VariableX if(VariableX=10){ do something } } ...

ASP MVC variable to javascript?

I am trying to get the locations of devices per project. I have a page which shows a google map and a list of all devices that belong to a project. My actions are: public ActionResult GoogleMaps(int id) { return View(Project.Find(id).DeviceLocations); } public ActionResult Map(int id) { var map = Project.Find(id).D...

linux says my ruby program's syntax is wrong. How can I tell what I'm saying? Is there a way to log it?

It tells me I have bad syntax on the line: rsync -a --delete #{DIR_DATA}/ #{todays_folder}/ Here's the entire program: #!/usr/bin/ruby require 'rubygems' require 'fileutils' DIR_DATA="/mnt/apvdbs03/Public" DIR_BKUP_ROOT="/backs/apvdbs03" NUMBER_OF_BACKUPS = 7 def remove_last_backup_folder last_backup_folder = File.join(DIR_BKUP_ROO...

passing variable to view ASP MVC

I have 2 views, one to return all the locations belonging to a project, the other returns a json file containing the locations that used to show them on a google map. Listing the locations works like this as the id is sent with the actionlink, but how do I send the project ID to the Map view? public ActionResult GoogleMaps(int id) { ...

Access local variable from outside the function

I'm using TopUp to make a simple slideshow. Unfortunately they don't expose the image index. Is there a way I can access the local variable "index" without having to modify the original script? TopUp = (function() { var index = null; ... } ...

C++: automatic initialization

I find it sometimes annoying that I have to initialise all POD-types manually. E.g. struct A { int x; /* other stuff ... */ A() : x(0) /*...*/ {} A(/*..*/) : x(0) /*...*/ {} }; I don't like this for several reasons: I have to redo this in every constructor. The initial value is at a different place than the variable...

myVar = !!someOtherVar

Can I get some clarification on why I would want to use this? myVar = !!someOtherVar; ...

Return and save String variable from shell script to Java

Hello I want to save the value in a variable in this script: #!/bin/sh filename=$1 var= $filename | sed 's/\([A-Z]\)/ \1/g'; return var; (Firstable, I am not sure if it is correct), and after thar, get this value and use it in my Java program, like this: Process s = Runtime.getRuntime().exec("./CreateTitle.sh "+filename); OutputStr...