I have a variable containing:
<col p1="Newman" p2="Paul"/>
...
<col p1="Newman" p2="Paolo"/>
<col p1="Newman" p2="Paul"/>
i wold in output a table with in the first column the value of p2 and in the second the number of time it appear. For each value of p2 should i have only a row.
<table>
<tr><td>p2</td><td>num</td></tr>
<tr><td>Pau...
I have a variable set to retrieve the id of a specific element which is "PubRecNum-1" (the number is also variable and will change depending on the record number). What I'm needing is a way to only take the first 3 letters of the variable "Pub" (needed for comparison purposes).
Any ideas?
...
Definitions:
Files:
Having the localization phrases stored in a physical file that gets read at application start-up and the phrases are stored in the memory to be accessed via util-methods. The phrases are stored in key-value format. One file per language.
Variables:
The localization texts are stored as hard code variables in the ap...
Hi friends,
I'm a drupal newbie...
I researched but couldnot find :/ is there any predefined variable that gives my CCK field value count?
for example; I have field_logo_sponsor and I need to display all logo items. Now I have 5 item
<?php print $node->field_logo_sponsor[0]['view'] ?>
<?php print $node->field_logo_sponsor[1]['view']...
I had the bright idea of using a custom error handler which led me down a rabbit hole.
Following code gives (with and without custom error handler): Fatal error: Only variables can be passed by reference
function foo(){
$b=array_pop(array("a","b","c"));
return $b;
}
print_r(foo());
Following code gives (only with a custom err...
Hi, I'm having an issue with PHP losing data in a variable. There is quite a bit of data in the variable, because it basically contains a binary file, but I'm wondering if this is cause for it to completely lose it's information.
Looking at a snippet from my code which is used to deal with email attachments:
var_dump($data);
if (ar...
I'm currently working on a very large project, and am under a lot of pressure to finish it soon, and I'm having a serious problem. The programmer who wrote this last defined variables in a very odd way - the config variables aren't all in the same file, they're spread out across the entire project of over 500 files and 100k+ lines of cod...
hello,
i want to make a notification function, and i need fields from 2 different models.
how can i access those fields?
in my notification view i wrote this
data = Notices.objects.filter(last_login<date_follow)
where last_login belongs to the model class User , and date_follow to Follow
but it is not a proper and correct way of acc...
Hi
I'm currently working on a project involving a form generator.
The user can switch on different databases and add some information from these databases in the form he is building.
I'm working using AJAX, at anytime the user can choose the database using a select, and on change, it refreshes the list of the database's tables.
Wh...
I'm trying to define variables within a loop. I'll drop the code here and then try and explain some more:
for (var k=0; k<nodes.length; k++){
this[node+k] = new google.maps.Marker({
position: new google.maps.LatLng(array1[k], array2[k]),
map: map,
title: node[k],
icon: "some image file"
});
}
I ...
I have an array set with the heights of each hidden div, but when I use it, the div instantly jumps down, rather than slowly sliding as when there is a literal number.
EDIT: testing seems to reveal that it's a problem with the push method, as content_height.push(item.getElement('.moreInfo').offsetHeight);alert(content_height[i]);gives...
Ok so, Im using jQuery to do username and email checks before a signup...
this sets a variable true or false depending on the response from php.
$(document).ready(function() {
if (usr_checked == true) {
if (em_checked == true) {
$("#registerbttn").removeAttr("disabled");
...
Hi all,
I need to make a variable with similar behaviour like in C lanquage.
I need byte or unsigned char with range 0-255.
This variable should overflow, that means...
myVar = 255
myVar += 1
print myVar #!!myVar = 0!!
...
So basically what I want to do is have my routes.php setup so that if the route is defined then it uses that routing rule else it does something like this:
domain.com/VAR/controller/method/(vars) to domain.com/controller/method/var/(vars)
I think it can be done with a regex, but my regex-fu is very weak. Any tips would be greatly appre...
Lets say i have a variable that contains the number of search engine names in a file, what would you name it?
number_of_seach_engine_names
search_engine_name_count
num_search_engines
engines
engine_names
other name?
The first name describes what the variable contains precisely, but isn't it too long?, any advice for choosing variable...
I have a class called 'Constants' that I am storing a String variable in. This class contains a few global variables used in my app.
I want to be able to reference this class and call the variable (called profileId) in other Views of my app.
I looked around and found a few examples, but am not sure how to do this. Currently my setup is...
Before I delve into it, I'm very new to Android and I have just started learning Java last month. I've hit bumps while trying to develop my first simple app. Most of these hurdles were jumped thanks to random tutorials online. MY CODE IS VERY MESSY. Any tips are appreciated.
The question above is quite broad, but this is what I want to ...
Let's say you have two objects (for example, a UITextviews, but it could be any type) in your class. When the text view changes, you have a delegate method that catches the change.. but how can you tell programatically WHICH object was changed and called the delegate ??
(Possible thought) Basically how to you get the variable name of a...
How can I get a specific value from an object?
I'm trying to get a value of an instance
for eg.
ListOfPpl newListOfPpl = new ListOfPpl(id, name, age);
Object item = newListOfPpl;
How can I get a value of name from an Object item??
Even if it is easy or does not interest you can anyone help me??
Edited: I was trying to build a binary...
Possible Duplicate:
When to use std::size_t?
I have a lot of constants in my code that are unsigned numbers, e.g. counters, frequency cutoffs, lengths, etc. I started using std::size_t for all of these, instead of int or unsigned int.
Is that the right thing to do? I started it because the STL containers use it for their siz...