What is the best way to export a gridview into an Excel spreadsheet? This seems easy
except that my Gridview doesn't have an export attribute. What is the quickest way to do this?
I'm creating a new plugin for a jruby on rails application that will eventually be turned into a gem. Inside my plugin I have controllers, helpers and views. For my views I'd like to use Haml. The problem is that I can't seem to get it to recognize that they are haml templates. Is it even possible to do this? Is there a way for a plugin to have…
If I have a cube divided into 8 smaller cubes, each of which may be subdivided into a further 8 cubes, ad infinitum, what is the name of my system?
I know that it's a special case of a tree, where each brance contains exactly 8 other leaves/branches.
I remember the name starting with "Oct", and there was a wikipedia article on it, but I…
I am trying to print the contents of a python tkinter canvas. I have tried using the postscript method of canvas to create a postscript file, but I get a blank page. I know this is because I have embedded widgets, and these do not get rendered by the postscript method.
Before I rewrite my program to create a more printer-friendly…
I'm trying to pass a form field of type "file" to a CFFUNCTION. The argument type is "any". Here is the syntax I am trying to use (pseudocode):
<cfloop from="1" to="5" index="i">
<cfset fieldname = "attachment" & i />
<cfinvoke component="myComponent" method="attachFile">
<cfinvokeargument…
Is there a tutorial/reference for creating an ActiveX DLL in Visual Studio 2008 C++ ?
I've got a DLL built with the DLLRegisterServer/UnregisterServer, and it's registered, but I'm having a little trouble figuring out what name to use to reference it (from a vbscript) and how to make sure my functions are exported correctly. Do I…
I'm designing a system for mobile devices that can be assigned only to one job at a time. So I need to be able to know which mobile device is being used by accessing it's own unique static IP address or its device ID. I don't want to assign an ID myself for every machine that comes in which is why a static IP would work great.
…
I am using the following to check if links exist on file.php:
$fopen = fopen('file.php', 'r');
$fread = fread($fopen, filesize('file.php'));
$pattern = "/^<a href=/i";
if (preg_match($pattern, $fread)) {
echo 'Match Found';
} else {
echo 'Match Not Found';
}
if I echo preg_match($pattern, $fread) I get a boolean…
In my app, I made a BookViewController class that displays and animates the pages of a book and a MainMenuViewController class that displays a set of books the user can read.
In the latter class, when the user taps on one of the books, a function is called that should create a completely new instance of BookViewController, but…
When searching online for object oriented concepts such as the composite design pattern I often found them represented in the LePUS3 notation. I am not really familiar with this
modeling language.
Is it something I should prefer over UML?
I am tasked to create a web site using Django. It will be a 'sister' site to an existing Plone site. The same Apache instance will be the front end to the sites which allows me to use the same domain name.
However, the owners want the users to be able to log into one and still be logged into the other one.
How can this be…
What is more efficient - handling with case statements in sql or handling the same data using if statements in code. I'm asking because my colleague has a huge query that has many case statements. I advised her to take stress off of the DB by coding the case statements. I've found that it is more efficient...but why?
I'm making a bookmarklet, but I've encountered some wierd behaviour in IE8. The code causing the problem is this:
var els = document.getElementById("my_id").getElementsByTagName("*");
for(var i in els)
{
alert(i+","+els[i])
}
The first thing that is alerted is "length, n". This isn't the case in chrome: just in IE8.
…
Not sure how to explain. Let's use an example. Say I want to split the sentence
"Today is a great day."
into
today
today is
today is a
today is a great
today is a great day
is
is a
is a great
is a great day
a
a great
a great day
great
great day
day
The idea is to get all the sequential combination in a sentence.
I…
Why wont this print "success" when i submit the form?!?! Im pretty sure it should work.
<?php
if (count($_POST) > 0) {
echo "success!!";
}
?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="userfile" />
<input type="submit" value="upload" />
</form>
I'm trying to make a function that merges arrays. The reason is, I have a function that supposed to get the settings of an entity, and merge them with the global defaults.
//So for example, let's say globalOptions is something like this
var globalOptions={opt1:'foo',opt2:'something'};
//and this is entityOptions
var…
I have a PHP file that I need it to detect it's directory it's in. In my case I want it to return C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\
I think that this is pretty straightforward but if there is something you don't understand just comment
The CSS Grammer as following works well under firefox but doesn't work under IE browser,Why and how to let the css only be affect on the elemnts directly under the parent element?
CSS:
div{font:18px}
.boxdivdiv{font:12px;}
--------------------------
--
HTML:
level1
level2
level3
level3…
I'm using a Java class library that is in many ways incomplete: there are many classes that I feel ought to have additional member functions built in. However, I am unsure of the best practice of adding these member functions.
Lets call the insufficient base class A.
class A
{
public A(/*long arbitrary…
All of the SVN shops I've worked in have a strict rule - replace all tabs with spaces, to avoid whitespace conflicts and variations of tabs in different editors.
Is this a very common standard? Does it really make a huge difference, and is it worth the trouble to push this standard to a group of developers…
In Blackberry's Application class what is the difference between hasEventThread() and isHandlingEvents(). I'm just curious, because I have only found hasEventThread useful.
From BB's docs for Applicaiton:
public boolean hasEventThread()
Determines if this application has entered the event dispatcher.…
So far in my .Net coding adventures I've only had a need to save information to files. So I've used XmlSerializer and DataContractSerializer to serialize attributed classes to XML files. My next project, however, requires that I save and retrieve information from a SQL server database. I'm wondering what…
I would like to disable client side validation on certain fields in my user form. Currently I have two sets of fields that are displayed depending on the value of a previous drop down list. i.e. if the drop down list is set to value "A" 1 new field appears in the form. If the drop down list is set to…
I'm writing an application that catalogs files, and attributes them with extra meta data through separate "side-car" files. If changes to the files are made through my program then it is able to keep everything in sync between them and their corresponding meta data files. However, I'm trying to figure…