Consider that I have 100 Perl modules in 12 directories. But, looking into the main Perl script, it looks like 100 use p1 ; use p2 ; etc. What is the to best way to solve this issue?
Looking to use XSLT to transform my XML. The sample XML is as follows:
<root>
<info>
<firstname>Bob</firstname>
<lastname>Joe</lastname>
</info>
<notes>
<note>text1</note>
<note>text2</note>
</notes>
<othernotes>
<note>text3</note>
…
Let's say I have a screensaver website. I want to display the CURRENT top 100 screensavers on the front page of the website.
What I mean is, "RECENT" top 100 screensavers. What would be an example query to do this?
My current one is:
SELECT * FROM tbl_screensavers WHERE WEEK(tbl_screensavers.DateAdded) = WEEK('".date("Y-m-d H:i:s",strtotime("-1…
What I wish I could do in xsl is the following, but unfortunatly parent/position() is not valid.
XSL
<xsl:template match="li">
<bullet>
<xsl:apply-templates/>
</bullet>
<!-- todo: if this is the last bullet AND there are no more "p" tags, output footer -->
<xsl:if test="count(ancestor::div/*) =…
The release notes for Java NIO (in Java 1.4+) state that support for direct ByteBuffers is an optional feature. I am curious which JVM vendors/flavors do not support it? Should a JNI library always code for managed ByteBuffers and relegate direct ByteBuffers as an optimization?
Thanks
In an .obj, file it is possible to specify 3 values for a vt line.
vt 0.769645 0.729072 0.00000000
The .obj spec says its for "depth". What does this actually do and when is it useful?
So Windows Embedded Compact 7 (another classic from the naming department) supports Silverlight for Windows Embedded.
http://www.microsoft.com/windowsembedded/en-us/products/windowsce/compact7.mspx
But this is a C++ only stripped down version of Silverlight 2 XAML.
Does anybody know if Windows Embedded Compact 7 will support real…
I would like to have my code run slightly differently when running on the emulator than when running on a device. (For example, using 10.0.2.2 instead of a public URL to run against a development server automatically.) What is the best way to detect when an Android application is running in the emulator?
I would like to do some fairly heavy-duty reflection in the Ruby programming language. I would like to create a function which would return the names of the arguments of various calling functions higher up the call stack (just one higher would be enough but why stop there?). I could use Kernel.caller go to the file and parse the…
In my Django admin, when I try to view/edit objects from one particular model class the memory usage and CPU rockets up and I have to restart the server. I can view the list of objects fine, but the problem comes when I click on one of the objects. Other models are fine. Working with the object in code (i.e. creating and…
I've searched the AOL Developer network and found a Contacts API page that says "coming soon" and is dated last year.
I've checked the SDK and APIs and found some AIM Buddy references...
I'm looking for documentation on retrieving contact email addresses on behalf of users based on their AOL email login.
Am I…
When I include 'caption', I get an error saying EntryAdmin.fieldsets[1][1]['fields']' refers to field 'caption' that is missing from the form
In the admin.py; I have imported the classes from joe.models import Entry,Image
Is that because my class from models.py is not getting imported properly ?
Need help in…
After researching this online, I've only found solutions that don't apply to my problem, so please bear with me. Code snippet:
typedef my_map_t<int const *, float> _test;
my_map_t::const_iterator not_found = my_map_t::end();
if (_test.find(&iKeyValue) == not_found) {
_test[iKeyValue] = 4 + 5; //…
Is it safe to write data to an NSPasteboard object from a background thread? I can't seem to find a definitive answer anywhere. I think the assumption is that the data will be written to the pasteboard before the drag begins.
Background:
I have an application that is fetching data from Evernote. When the…
I have created a volume controller for iTunes but I would like this app to place an icon on the OS X system menu bar and have my slider controller drop down. I created this because I have to switch to iTunes to change the volume of the music because I am using the digital-out audio and the keyboard keys do…
I'm porting a 2d retro game to iPhone that has the following properties:
targets OpenGL ES 1.1
entire screen is filled with tiles (textured triangle strip
tile textured using a single 256x256 RGBA texture image
the texture is passed to OpenGL once at the start of the game
only 4 displayed colours are…
I am looking to write a few helpers in my own assembly modeled after the helpers in System.web.mvc. My problem is that I cannot use the call to Tagbuilder.ToMvcHtlString since it is internal. So if I return a string it wont be ready for asp.net 4 when it comes.
I dont want to add anything to…
When running the code below in the iphone simulator I get the error : CGContextClosePath: no current point. Why is the current point not being set? Or is the context not set to the correct state?
CGContextBeginPath(ctx);
CGMutablePathRef pathHolder;
pathHolder =…
In PostgreSQL, there is a BLOB datatype called bytea. It's just an array of bytes.
bytea literals are output in the following way:
'\\037\\213\\010\\010\\005`Us\\000\\0001.fp3\'\\223\\222%'
See PostgreSQL docs for full definition of the format.
I'm trying to construct…
I work on a Mercurial repository that is checked out onto an Unix filesystem such as ext3 on some machines, and FAT32 on others.
In Subversion, I can set the svn:executable property to control whether a file should be marked executable when checked out on a platform that…
I have been following the development of the .NET Task Parallel Library (TPL) with great interest since Microsoft first announced it.
There is no doubt in my mind that we will eventually take advantage of TPL. What I am questioning is whether it makes sense to start…
I seek a solution to the age-old problem of managing string resources. My current implementation seems to work well, but it depends on using singletons, and I know how often singletons can be maligned.
The resource manager class has a singleton instance that handles…
I am beginning to build a tool that uses WebDAV. I am having trouble wrapping my head around something here. I think I am missing something conceptual. I can use PUT's to add files to the server. I can use GET's to read files from the server, but when I try to use…
I'm using a wireless modem program from my ISP. This program automatically disconnect when it detects the line is idle. It does so in 2-5 minutes of idle time. Whenever I reconnect, It will automatically fire up my default browser to the ISP portal. I DID NOT pay…