For example:
(function() {
var proxied = window.eval;
window.eval = (function() {
return proxied.apply(this, arguments);
});
})();
But this code is not working.
i know & is used to create references.
but i wonder what having a & before a function name means:
function &DB($params = '', $active_record_override = FALSE) { // code }
I have a module called nbemail.py and in this module I want to use the function package_post defined in the module main.py. I am using this statement:
from api.main import package_post
But I am getting this error:
ImportError: cannot import name package_post
I really don't know why I am getting this error! I do have _init_.py files in the api directory (which contains the files nbemail.py and main.py) and I do have the function package_post defined in main.py.
Any idea to help fixing this problem?
Hello everyone! I try to learn java for android devices..
i have to create the update function. But still have one question: How????
in class root
public void update(){
maindebug("update"); // This is my debug function
}
public void run(){
while(isRunning){ // isRunning is a boolean variable
SystemClock.sleep(100);
update();
}
}
and inside onCreate
run();
but it doesnt work :(
I know that php has md5(), sha1(), and the hash() functions, but I want to create a hash using the MySQL PASSWORD() function. So far, the only way I can think of is to just query the server, but I want a function (preferably in php or Perl) that will do the same thing without querying MySQL at all.
For example:
MySQL hash - 464bb2cb3cf18b66
MySQL5 hash - *01D01F5CA7CA8BA771E03F4AC55EC73C11EFA229
Thanks!
I want to create a hierarchy in my wiki like so:
General
FooPages
Foo1
Foo2
Foo3
ODP
Bar
Baz
I would like to create these pages, and use <<toc>> table of contents macros to organize them.
How can I do that? Do I need to clone and edit the wiki on my own machine, or can I do that exclusively through the web interface?
Does DataMapper provide a convenient way to create a new record when none exists or update an existing one? I couldn't find anything in the API documentation.
This is what I have at the moment which doesn't seem very elegant:
foo = Foo.get(id)
if foo.nil?
foo = Foo.create(#attributes...)
else
foo.update(#attributes...)
end
foo.save
this is a totally unfamiliar area for me. can anyone point me in the right direction on how to create a social graph and the best way to represent it? i'm building a website in C#/asp net and need to create a "friends" feature... is this type of thing usually stored entirely in the DB? if so, how?
I have a function that I use on index.php page and I would like to call it from other php page (other.php). How to make this function available without redeclaration? I think it's achievable using sessions, but I am not sure how to do it exactly.
I wont to create a User Control based in gridview that have the edit add delete incorporate,
the problem is these:
In the admin part of my web site i have to repeat the same action for view add delete update the data for different datasource.
I wont to create a generic gridview that have incorporate these action.
The gridview can take a xml file for configure him self dependently of the request for desplay the data.
Any ideas how i can do it?
I'm trying to use Reactive Extensions from Boo and am running into type problems. Here's the basic example:
def OnSubscribe(observer as IObservable[of string]) as callable:
print "subscribing"
def Dispose():
print "disposing"
return Dispose
observable = System.Linq.Observable.Create[of string](OnSubscribe)
observer = System.Linq.Observer.Create[of string]({x as string | print x})
observable.Subscribe(observer)
The Subscribe here gives a System.InvalidCastException: Cannot cast from source type to destination type. The issue appears to be with how I'm creating the observable, but I've struggled to see where the type problem arises from.
Ideas?
I'm developing an Android application and I would like to display an internal (indoor) map of some buildings, but I don't know where to begin: I want to create a custom kml file (how it's possible to create it? with which tool?) and display it in a fragment.
I already have it working with external maps (simple GoogleMap in MapFragment), so it would be super to have the kml file placed 'over' the GoogleMap, like real indoor maps.
Thanks
In the process of automating some code, I am looking to call upon a function based on what a string is.
For example, I have a variable $somevar which is set to the string "This". Now I want to run a function doThis();
So, I was hoping I could write do.$somevar($var,$var2) . I want it to run doThis($var1,$var2).
Is this possible?
CREATE FUNCTION foo() RETURNS text
LANGUAGE plperl
AS $$
return 'foo';
$$;
CREATEFUNCTION foobar() RETURNS text
LANGUAGE plperl
AS $$
return foo() . 'bar';
$$;
I'm trying to compose results using multiple functions, but when i call foobar() i get an empty result.
Hi all
I am creating a set of item template using Vsix Package.
I have created my templates
Created a VSix Packages and added my
templates as content
However I want to create a new Folder/SubFolder and Create the templates there.
I can do it manually but that defeats the point.
How do you do it?
Thanks a lot
I want to create my own media player. There is so much restriction with default media player control on iphone. I have written lots of applications using default media player.
Now i want to write my own media player.If any one can give pointer from where to start to create custom media player.
Thanks in advance.
Jim.
im moving from a c# VS2008 world into the mac world and I just wanted to know how I can create a quick little command line based application so that I can write many little objective-c apps without worrying about creating an iPhone app or whatever.
Which projects do I create in xcode? I can see the Command Line Tool under "Mac os x" but the only options for the type is "C", "C++", "Core Data", "Core Foundation", "Core Services" and "Foundation"
but no simple objective c project?
Thanks
is it possible to create "Mail Contact" in Exchange with C#?
any tips in where to start
there is allot of info on how to create a mailbox (which is good), but I do not need it now I need to do that for the "Mail Contact" that everybody in the company has access to!
so basically the "mail contacts" can be for people with external email addresses that all our users can see and send email too (GAL)
oh and we have Microsoft Exchange 2007
I am trying to redirect to the create method of another controller. However, I can't find a way to set the method to POST. This results in the index method to be called. Using :method => :post just creates a new parameter, but doesn't change the http method.
Any ideas how to redirect to the create method?
My script.php accepts $_POST input and echos a string.
$theinput = $_POST['theinput'];
$output = //some processing;
echo $output;
I would like to use this script inside a function where the same input is now a $_POST
function processinput($someinput){
//I need to call the above script and give it
//the same input `$someinput` which is not a `$_POST` anymore
}
Any ideas how to do that?
i have line
new_element.innerHTML ="";
which will call the function addWidget as
function addWidget(url) {
alert(url);
var main= document.getElementById('mainwidget');
main.innerHTML = "";
}
but its not working whats the problem...
How to create a script to :
compare two trees,
in c/c++ in a non recursive mode?
also,
How to create a script in c/c++ to verify if a tree is binary, in a non recursive mode?
thanks in advance.