Is it possible to replace a method of a Moose object at runtime ?
By looking at the source code of Class::MOP::Method (which Moose::Meta::Method inherits from) I concluded that by doing
$method->{body} = sub{ my stuff }
I would be able to replace at runtime a method of an object.
I can get the method using
$object->meta->find_meth...
Hi,
In answering my own question, I came across this GreaseMonkey script that automatically converts currency values on a webpage. I would like to modify the script for my specific case, and I want to know how I should modify the script MetaData block to acknowledge the script's original author and respect the (letter and spirit of the...
I am working with MapKit and want to be able to add a (NSString *)itemTag value to each of my annotations. I have created myAnnotiation.m and myAnnotation.h
I tried adding itemTag to the myAnnotation.h/m but when I try to access currentAnnotation.itemTag within my main code, it says "itemID not found in protocols" - so I went to the Map...
Hi,
My problem is that I want to access from a page to the properties of a control (button, textblock, label, or a menuitem of the window....) placed in a window. The page is placed into the window. How can I do this? Is there any method to find controls by name in a specific window or page or entire application?
Thanks.
...
I'm trying to use squid to modify the page content of web page requests. I followed the upside-down-ternet tutorial which showed instructions for how to flip images on pages.
I need to change the actual html of the page. I've been trying to do the same thing as in the tutorial, but instead of editing the image I'm trying to edit the htm...
Hi,
I created an application which has a menu where it's items are created dynamicly. The menu acts as a language menu.
<body runat="server">
<form id="Form1" runat="server">
<table class="TableLayout">
<tr>
<td class="TopNav" align="right">
<asp:Menu runat="server" ID="LanguageMenu" Orientat...
I want to make Java JDialog appear like it is presented in the image (link below) using JDK 6 Swing. Is it possible? if so kindly guide me.
Image Link:
Image
...
Hi everyone,
I implemented the Visitor pattern in C++ using a STL-like iterator for storing the Visitor's current position in the container. Now I would like to change the container while I iterate over it, and I'm especially interested in deleting items from the container, even the one I'm currently visiting.
Now obviously this will i...
I have an array called $times. It is a list of small numbers (15,14,11,9,3,2). These will be user submitted and are supposed to be minutes. As PHP time works on seconds, I would like to multiply each element of my array by 60.
I've been playing around with array_walk and array_map but I can't get those working :S
Thanks.
...
I noticed this situation in my code (unfortunately), and was able to duplicate it in my own JS file. So I have this code:
var date1 = new Date(); // today
var date2 = date1;
date2 = date2.setDate(date2.getDate() + 1);
// what is date1?
After this code executes, date1 is today's date + 1! This harkens back to my undergrad days when I...
Hi, I need replace the same value for variables {place} and {other_place} in the record op.
#op{
action = [walk, from, {place}, to, {other_place}],
preconds = [[at, {place}, me], [on, floor, me],
[other_place, {place}, {other_place}]],
add_list = [[at, {other_place}, me]],
del_list = [[at, {place}, me]...
Hi,
So I'm working on creating a visualization for a data structure in Java. I already have the implementation of the data structure (Binary Search Tree) to start with, but I need to add some additional functionality to the included node class. As far as conventions and best practices are concerned, should I create a subclass of the n...
Sorry for the crappy title I failed to think of a better version for my Java question.
I am right now using Java version: 1.6.0_18 and Netbeans version: 6.8
Now for the question.
What I've done is created a class with only one protected int property and next I made a public method to Set the int property to a given value.
Then I made a...
I use a script for my homepage but I'd like to localize it. Furthermore the CSS uses images from a special folder which does not fit to my folder hierarchy.
Because I don't want to adopt these paths and settings I'll have to modify the original sources.
Currently my repository looks like this:
/3rdParty
/CompanyA
/Com...
Hi
Task: Cut or erase a file after first walk-through.
i have an install file called "index.php" which creates another php file.
<?
/* here some code*/
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "<?php \n
echo 'hallo, *very very long text*'; \n
?>";
fwrite($fh, $stringData);
/*herecut"/
/*here some code */
...
Hello,
I have an MP3 file uploader. I want to add an additional audio track to the file upon upload - via PHP. Is that possible?
Thanks in advance!
...
Hi, guys.
The issue consists of two parts:
What are the best .NET libraries to modify (read/write) existing excel document (should be work with Excel 2003)?
What are the best .NET libraries to modify (read/write) existing pdf document?
They should be able to create new document too.
It's better if they are free (open source) or not...
I have a iterator (ite) created from a set (a):
var a = Set(1,2,3,4,5)
var ite = a.iterator
If I remove 2 element of my set:
a -= 2
Now, if I move iterator for all elements, I get all elements (2 element included). It's ok, but... How I can tell to iteratator to delete 2 element?
...
I have written a program that relies on a proxy to function. I now need a script that will check to see if the browser is set to use the right proxy, and if not, change it to use it. I need this implemented for as many browsers as possible, but is only required for Internet Explorer, Google Chrome, Mozilla Firefox, Safari and Opera. I am...
Hello,
How can I update the value of an xml tag with the value of an xml tag from another related table?
something like this:
UPDATE v2
SET
[xml].modify ('replace value of (//TAG1/text())[1]
with "CAST(v1.[xml].query(''//TAG2'') AS NVARCHAR(MAX))"')
FROM
table2 v2,
table1 v1
WHERE
v2.id = v1.id
Thanks
...