function

function for list of attribute matching

HI i want to match two lists which consists of concepts attribute i need a fuction for this matching as an example if i want to match two lists of book attribute list1 author title category binding price list2 author brand price i will be thankful for any help ...

Drupal: How to implement a SECOND admin with fewer rights than the normal and own theme?

I'm currently trying to realize a second (lower) admin layer in drupal. I have made an extra section via the module of the same name for those users so they can have their own theme etc. I want to give these second or lower admins a menu in their section of the page where they can access certain admin funtions like administer other users...

Can $_session data be set in a function

hello I have this code in a function $_SESSION['id'] = $id; $_SESSION['pineapple'] = $hashbrown; $_SESSION['username'] = $username; However, the session data never gets set, even on the initial page. Can sessions be edited though a function or not? info on cookies/ect this is the code for starting the session <!-- a bunch of info ...

Preload a bunch of images from an array of file names, do function after 50% are done.

Hay, i'm using this script function preloader(images){ var i = 0; imageObj = new Image(); // start preloading for(i=0; i<=images.length; i++){ imageObj.src=images[i]; imageObj.onLoad = check(i, images.length / 2); }; } and passing a bunch of images into it to ...

Calling a function from a different view controller for iphone

Hi All, I have a problem where I want to call a function defined in one view controller from another controller. I'v try what seems llke a hundred different setups and nothing seems to work. I've posted the basic code and was hoping someone could tell me how they would do it. Basically all I want to do is call the MYBPress function defi...

A function of a slider value suitable for zooming

I'm using the jquery ui slider for zooming. It's supposed to zoom from 25% to %500, and about half of the range is used for the first %100 of the size. The slider has values from 1 to 100. I need some function that can be used to calculate zooming based on the slider value, e.g. function getZoom(sliderVal) { //return number from 25...

Caching functions instead of require_once in php

Hi guys, I've been using APC caching functions and it's been phenomenal. I was thinking, why not just cache all of my functions, and load them whenever I need to (kind of like frameworks actually). function Foo {echo 'bar';} $foo = Foo; apc_store('foo',$foo); And then whenever Foo is needed, I'd just use apc_fetch. Is that more effic...

lists similarity

if i have to list of concepts and i want to find the similarity between these list how can i find how much two list similar? as an example if i have two list that describe book attribute list1(author, brand , isbn, category, amount) list2(author , price , brand) ...

How to create delte function in XQuery

I met a problem when I try to create delete function,my current codes are: Xquery: declare variable $d as xs:string; declare variable $p as xs:string; let $xp := saxon:evaluate(concat("doc('",$d,"')",$p)) return document {for $n in doc($d)/* return qsx10p8:delete($n, $xp)} declare function qsx10p8:delete ($n as node(), $xp as node()...

Java Object Oriented Design Question: Returning multiple objects in java(Updated)

Hi, The below code in Java throws Null pointer exception. public class New{ int i; New(int i) { this.i = i; } public void func(New temp) { temp.i = 10; temp = new New(20); } public static void main(String[] args) { New n = null; n.func(n); System.out.println("value "+ n.i); } } The...

C++ function-like value pass

Hi, first, sorry for the title but I really don´t know ho to summarize what I want to do. I am trying to write very simple "graphic" console game, just to learn basics of C++ and programming generally. When I have a function, I can pass value, or variable into that function while calling it. But I would like to do the same thing to the p...

(function() {})() declaring/initializing javascript function

Possible Duplicate: JavaScript: Why the anonymous function wrapper? Hi Guys, I would like to ask you what is the reason of wrapping everything in (function() { document.write("Hello World!"); })(); function ? cheers ...

Crystal Report Function for converting Seconds to Timespan format.

I have a crystal report where it shows the Agent's activities throughout the day with a pie chart. In the details section it is displaying: Activity [string] StartedAt [DateTime] EndedAt [DateTime] Duration [The difference between EndedAt and StartedAt in seconds - Integer] Report data is GroupedBy Activity and summarized by D...

Help with function in string

I have a variable, emailBody, which is set to a string stored in a database. The email body is set to a string via a dlookup function. emailBody = DLookup("emailBody", "listAdditions", "Id = " & itemType) The string that email body is set to includes an IIf function (which includes a dlookup function). When ?emailBody is entered in...

Removing title from wp_list_categories()

I'm trying to remove/replace the title attribute on the category elements used by WordPress. I'm using WordPress 2.9.1, with the following code: <div id="categories"> <h3>Manufacturers</h3> <ul> <?php str_replace("title=\"View all posts filed under ","",wp_list_categories('use_desc_for_title=0&exclude=1,2,3,4,5&t...

GDB backtrace does not show the function names

I compiled my library (specifically protbuf-2.3.0) using -g -O0 on a SunOS 5.10. A sample line in the make log is this: /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pthreads -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O0 -MT text_format.lo -MD -MP -MF .deps/text_for...

Variable in function from included file - php

Hi. I haven't found a very good answer to my problem so I'm starting a new topic. I have the file english.php which has variables like $lang['fname'] = "First name";. Also I have header.php which includes english.php : include('english.php');. Now, header.php is included in another php page, let say addInfo.php. If I write in addInfo.php...

PHP - move_uploaded_file doesn't work for music/video

Hey, I'm working on a upload script and using move_uploaded_file() function. The problem is, that it only works for .txt, .jpg, .psd and some other file types I've tryed, but not for .mp3, .mov, .avi and maybe others. There is nothing to the script, it's just the function. An interesting thing is, that it doesn't show any error msgs, i...

Get decorated function object by string name

def log(func): def wraper(*a, **kw): return func(*a, **kw) return wraper @log def f(): print 'f' print locals()['f'] # - prints <function wraper at 0x00CBF3F0>. How do you get the real f object (not decorator wrap)? ...

Calling multiple javascript functions on a button click.....

How to call multiple functions on button click event? Here is my button, <asp:LinkButton ID="LbSearch" runat="server" CssClass="regular" onclick="LbSearch_Click" OnClientClick="return validateView();ShowDiv1();"> But my ShowDiv1 Doesnt get called.... My javascript functions, function ShowDiv1()...