input stringlengths 51 42.3k | output stringlengths 18 55k |
|---|---|
Actionscript 2 code stuck in memory? <p>I have noticed that the output from my trace statements & dynamic text fields (for testing) has been getting stuck in memory. Each time I publish, unless I have made a lot of changes to my code, the published SWF does not reflect my latest edits -- making my debugging process... | <ul>
<li><p>when working with classes, select "Delete ASO files and Test Movie" instead of just "Test Movie". Flash makes a cache of compiled class files called ASO files, and these can confuse things</p></li>
<li><p>Try deleting the SWF file you think you are viewing and check in the browser that it doesn't load - jus... |
difference of variable in placement of private keyword in a MFC class <p>Using the following code snippet as an illustration to my question:</p>
<pre><code>// #includes and other macros
class MyClass : public CFormView
{
private:
DECLARE_DYNCREATE(MyClass)
bool privateContent;
...
public:
bool ... | <p>If you look at the definition of <code>DECLARE_DYNCREATE</code>, you will see that it uses another macro:</p>
<pre><code>// not serializable, but dynamically constructable
#define DECLARE_DYNCREATE(class_name) \
DECLARE_DYNAMIC(class_name) \
static CObject* PASCAL CreateObject();
</code></pre>
<p>And if yo... |
In ROWLEX is there a way to remove "rdf:datatype" from serialized object? <p>In ROWLEX is it possible to remove "rdf:datatype" attribute of each property and/or use common RDF Schema instead?</p>
<p>Example:</p>
<pre><code><MyOntology:Channel>
<MyOntology:title rdf:datatype="http://www.w3.org/2001/XMLSche... | <p>The question is quite unclear, so you get a generic answer :) Every OWL property must be either data type or an object type. </p>
<ul>
<li>Object type properties connect two nodes of the graph, namely not only the subject but the object of the triple is an URI (or blank node), too. </li>
<li>Data type property: the... |
C#: What would you name an IEnumerable class? <p>When reading <a href="http://stackoverflow.com/questions/1126256/net-collection-naming-convention">this question</a> I started to wonder a bit. Say you have these two:</p>
<pre><code>class ProductCollection : ICollection<Product>
class ProductList : IList<Produ... | <p>You generally do not base the name of a class off any <em>interface</em> it implements. (Which one do you choose when there are multiple ones, for a start?) It is quite typical to base it off an <em>inherited class</em>, but more often simply on the purpose of the class, and certainly not the interface. (The interfa... |
Sphinx searcing related has_many with thinkingsphinx <p>Hypothetically, I have a Room model that belongs to a Building model. Buildings has a has_many relationship with categories.</p>
<p>I'm trying to figure out how to index the Room model so that a search for category_id = 1 will return any room, in any building th... | <p>Firstly, you'll want to set up your index something like the following in your Post model:</p>
<pre><code>define_index do
# fields go here
# the important attribute for your filter:
has building.categories(:id), :as => :category_ids
end
</code></pre>
<p>As for searching:</p>
<pre><code>Room.search 'quer... |
How to "add reference" in C++ <p>I'm new to C++ and there's something I just completely don't get. In C#, if I want to use an external library, log4net for example, I just add a reference to the log4net DLL and its members are automatically available to me (and in IntelliSense). How do I do that in non-managed C++?</p>... | <p>Often, the library comes with 1) a header file (.h) and 2) a .lib file in addition to the .dll.</p>
<p>The header file is #include'ed in your code, to give you access to the type and function declarations in the library.</p>
<p>The .lib is linked into your application (project properties -> linker -> input, additi... |
Use right-click with Windows Forms Button <p>I am writing an app where the user should be able to alter the action of a button.</p>
<p>The user should right-click a button, and choose an option from a pop-up context menu. Once the choice has been made the button will perform a different action when the user uses a no... | <p>I'm sorry to say that this would be a serious UI blooper. Perhaps it would make more sense to add a small combobox next to the button.</p>
<p>Perhaps something like this?<br />
<a href="http://www.codeproject.com/KB/buttons/SplitButton.aspx" rel="nofollow">http://www.codeproject.com/KB/buttons/SplitButton.aspx</a><... |
Tomcat6 won't start on Windows and Java6 <p>I just downloaded a fresh copy of Tomcat6 to install on a development server. The server is running Win2k3 SP2 and Java6.</p>
<p>When I go to start Tomcat6 it reports the following:</p>
<pre>
D:\>d:\tomcat\bin\tomcat6.exe //TS/Tomcat6
[2009-07-14 15:26:38] [427 prunsrv.c] ... | <p>Just curious if your CATALINA_HOME and JAVA_HOME set? Those environment variables are prerequisite to run Tomcat. Go to Start-->My Computer (right click on it) -->Properties-->Advanced-->Environment Variables (button) and then set CATALINA_HOME to the path of your Tomcat and JAVA_HOME to the location of your JDK, al... |
Controller test fails for rails user authentication <p>--preface: ignore if you want.<br />
I'm new to rails, and working on a project that will require user authentication.
I found <a href="http://www.aidanf.net/rails_user_authentication_tutorial" rel="nofollow">this tutorial</a> and have been trying to go through it ... | <p>Is it possible that there's a filter that is preventing your action getting called? If there's a general <code>:before_filter => 'login_required'</code> then you might not be reaching your login functionality at all. (Though admittedly the register action would have to be excluded for that test to pass)</p>
<p>I... |
How can I preserve session information when redirecting from one subdomain to another? <p>I'm programming with PHP. </p>
<p>I want to redirect ht<i></i>tps://abc.example.com/blah1/blah2 to htt<i></i>ps://w<i></i>ww.example.com/blah1/blah2 but I don't want to redirect htt<i></i>ps://abc.example.com redirect to ht<i></... | <p>You can continue using the redirects as you have them now, but adjust your <code>session.cookie_domain</code> to use the top-level domain (e.g. example.com). You can do this by using <a href="http://us3.php.net/manual/en/function.session-set-cookie-params.php" rel="nofollow"><code>session_set_cookie_params</code></... |
Problem getting the response from php in a new location <p>Currently the location of my Html is
<a href="http://severname.com/qotw.html" rel="nofollow">http://severname.com/qotw.html</a>. Onclick of a button i call the login();</p>
<p>the login() javascript function, looks like this:</p>
<pre><code>function login()
... | <p>With</p>
<pre><code>document.location="http://servername.com/login.php";
</code></pre>
<p>you advise the browser to request another document from the given url. This new document will replace the current document and your javascript "within" the current document cannot affect the new document (any more).<br />
You... |
Why use a using statement with a SqlTransaction? <p>I've been running into some problems concerning a SqlTransaction I'm using in my code. During my Googling I see many people using a using statement with a SqlTransaction.</p>
<p>What is the benefit and/or difference of using this type of statement with a SqlTransacti... | <p>A <code>using</code> statement should be used every time you create an instance of a class that implements <code>IDisposable</code> <em>within the scope of a block</em>. It ensures that the <code>Dispose()</code> method will be called on that instance, whether or not an exception is thrown.</p>
<p>In particular, yo... |
XmlReader DTD Validation Error on an Attribute <p>I am trying to use XmlReader to parse a file and set each element's attributes to variables using reader.GetAttribute("atrribute_name"), but the elements may or may not actually have that attribute present, so some elements give me an error...I would have expected it wo... | <p>Yes. Read the documentation for <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx" rel="nofollow">XmlReader</a>. You'll find it has many <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlreader%5Fmethods.aspx" rel="nofollow">methods</a> and <a href="http://msdn.microsoft.com/en-... |
How to suppress Java warnings for specific directories or files such as generated code <p>I'm using a parser generator that creates somewhat ugly code. As a result my Eclipse project has several dozen warnings emanating from generated source files. I know I can use the <code>@SuppressWarning</code> annotation to suppre... | <p>Starting with version 3.8 M6, Eclipse (to be exact: the JDT) has built-in functionality for this. It is configurable through a project's build path: <em>Project properties > Java Build Path > Compiler > Source</em></p>
<p><img src="http://i.stack.imgur.com/wLmKq.png" alt="enter image description here"></p>
<p>Anno... |
hosting asp.net pages within the app <p>The goal is to generate some html reports and html emails using templates hosted within the app perhaps using cassini</p>
<p>so the report files will be saved in
app_home\Report\Templates*.MyReport
file</p>
<p>The app would allow a report (.aspx) page to be selected, loads it... | <p>It is better to use xslt for such tasks - you can serialize you data model into an xml document then you can transform xml document with an xsl template into html.</p>
|
Ruby on Rails - render layout <p>I'm trying to split up a web site into two sections. One which should use the application layout and one that should use the admin layout. In my application.rb I created a function as follows:</p>
<pre><code>def admin_layout
if current_user.is_able_to('siteadmin')
render :layou... | <p>The method <code>render</code> will actually attempt to render content; you should not call it when all you want to do is set the layout. </p>
<p>Rails has a pattern for all of this baked in. Simply pass a symbol to <code>layout</code> and the method with that name will be called in order to determine the current l... |
lc.exe has problems running from a service (CC.NET) in Vista x64 <p>When running CC.NET as a service I get the following error:</p>
<p>LC0004: Exception occurred creating type 'C1.Win.C1Command.C1CommandHolder, C1.Win.C1Command, Version=1.0.20044.97, Culture=neutral, PublicKeyToken=e808566f358766d8' System.TypeInitial... | <p>this issue will be fixed in the next build of C1Command.</p>
<p>-AlexeyS, C1</p>
|
Win32 API to enumerate dll export functions? <p>I found similar questions but no answer to what I am looking for. So here goes:</p>
<p>For a native Win32 dll, is there a Win32 API to enumerate its export function names?</p>
| <p><code>dumpbin /exports</code> is pretty much what you want, but that's a developer tool, not a Win32 API.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms684179.aspx" rel="nofollow"><code>LoadLibraryEx</code></a> with <code>DONT_RESOLVE_DLL_REFERENCES</code> is heavily cautioned against, but happens to be... |
Split String into Array in Flex <p>I am getting the output as 0,1,2,3. I need this to be split into array</p>
| <pre><code>var a:Array = s.split(",")
</code></pre>
|
How do I write a KEY_DOWN Handler in ActionScript 3? <p>Okay, I've tried about 8 different ways to get a key event into my code, and none of them seem to work. Can someone please tell me how I can move this ball when I press shift? Thank you in advance</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<... | <p>you need to add the listener to the stage, and ad it after the applicationComplete event has occured (or in its handler)</p>
<pre><code><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()">
<mx:Script>
<![CDATA[
public function init():void... |
parsing unknown attributes of elements within an xml file using jquery <p>Is it possible to get both the attribute name and the value of an element?</p>
<p>Basically i want to get the name and the values of all attributes of a single element, in order to write them into a Javascript Object like this:</p>
<pre><code>o... | <p>Using jQuery you can get name and values of all attributes for specific element like that:</p>
<pre><code>var obj = {}; // this object will hold key-value pairs of elem attributes
var attribs = $('#elem')[0].attributes;
for (var i = 0; i < attribs.length; i++) {
obj[attribs[i].name] = attribs[i].value;
}
</c... |
Unit testing an Asp.net MVC controller action <p>I have a controller action that checks</p>
<pre><code>this.User.Identity.IsAuthenticated
</code></pre>
<p>What do you suggest how to tackle unit test on such an action?</p>
| <p>I would suggest mocking the IsAuthenticated property. There are a number of other posts on SO about this, you could do a search for them.</p>
<p>Here is an example of mocking the request using Moq:</p>
<pre><code>var mockRequest = new Mock<HttpRequestBase>();
mockRequest.Setup(x => x.IsAuthenticated).Ret... |
Properly disposing resources used by SmtpClient <p>I have a <strong>C# service</strong> that <strong>runs continuously</strong> with user credentials (i.e not as localsystem - I can't change this though I want to). For the most part the service seems to run ok, but ever so often it bombs out and <strong>restarts for no... | <p>I know this question is pre .Net 4 but version 4 now supports a Dispose method that properly sends a quit to the smpt server. See the <a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.dispose.aspx">msdn reference</a> and <a href="http://stackoverflow.com/questions/2781103/c-how-to-correctly... |
Zendx JQuery Autocomplete <p>I've been trying to get the Zend Jquery autocomplete function working, when i noticed this section in the <a href="http://framework.zend.com/manual/en/zendx.jquery.view.html" rel="nofollow">Zend documentation</a>. </p>
<blockquote>
<p>The following UI widgets are available as form view h... | <p>Last time I checked, it was in the <a href="http://jquery-ui.googlecode.com/svn/branches/dev/autocomplete/" rel="nofollow">dev branch</a>.</p>
<p>The only issue is that I'm not sure how complete and ready this is, <strong>and</strong> if it even works with ZendX_Jquery. You can stay up to date on <a href="http://jq... |
Selenium IDE and Drupal <p>Can I use Selenium IDE on a Drupal system?</p>
<p>I found <a href="http://drupal.org/project/selenium" rel="nofollow">http://drupal.org/project/selenium</a> but that involves downloading Core and not using my current machine. </p>
<p>Does anybody know of a way to use the IDE with Drupal, or... | <p>You can, in the same way that you can use selenium on just about any web page. </p>
<p>From what I can see (though I havenât' used it) the selenium module seems to be more about using Drupal to store and run selenium tests, which is useful, but will not explicitly test your Drupal site. (<em>edit: this module dos... |
How to add Disclosure button to Custom UITableViewCell <p>Can I render the Disclosure button graphic with it not being a button. I want to add the image to the custom rendered cell, but am not sure how to get the image.</p>
<p>How do I render the image alone.</p>
| <p>Here's a <a href="http://www.teehanlax.com/blog/?p=1628" rel="nofollow">Photoshop template file</a> with most of the iPhone UI elements. You can extract the image and use it for a custom cell view. </p>
|
How can I use FluentFile in Rhino ETL DSL? <p>I have been playing around with the Rhino ETL library and really like the direction that it's going. However I have found that the bad part about it is the documentation is sparse and there doesn't seem to be enough good information on how to create these pipeline processes... | <p>The <a href="http://fisheye3.atlassian.com/browse/filehelpers/tags/stable/FileHelpers/Attributes/DelimitedRecordAttribute.cs?r=617" rel="nofollow">DelimitedRecordAttribute</a> is in the <a href="http://filehelpers.sourceforge.net/" rel="nofollow">FileHelpers</a> assembly, FileHelpers namespace.</p>
|
How to implement an email dropbox feature for web app? <p>You've probably seen web apps that have an "email dropbox". Users can send email to a special address like 'dropbox@123232.wepapp.com' and the message will be parsed and inserted into their account as a comment, to-do, etc.</p>
<p>We're trying to build somethin... | <p>I suggest creating a catch all email address with a wild card alias for the subdomain of the account. DropBox@*.yourdomain.com </p>
<p>The subdomain is an alias in your mail server which points to an actual account on your email server DropBox@yourdomain.com. </p>
<p>Then users can send emails to something like... |
Precompiling asp.net solutions for deployment <p>I'm using aspnet_compiler.exe to precompile my application for deployment.</p>
<p>However, I don't think it's working, for two reasons:</p>
<ul>
<li>I see my applications assemblies under C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files, even if i ... | <p>Your two points are moot:</p>
<ol>
<li><p>ASP.NET precompilation doesn't result in native image generation so JIT overhead will still be there. There might be a worker process creation overhead too.</p></li>
<li><p>ASP.NET precompilation has the option to compile everything (incl. ASPX stuff, ...) or just source co... |
Jeditable CANCEL callback from AJAX callback? <p>I see some answers for the Jeditable plugin to use a callback function from AJAX using complete callback function.</p>
<p>I know that the Jeditable has a callback function for the SUBMIT button, so I would like to know if there is a way to have a callback for the CANCEL... | <p>Yes, there is a "onreset" parameter that is called when clicking cancel, or more generally, before jEditable resets the control back to the state before it was clicked. Add this to your code:</p>
<pre><code>$("#editable_text").editable(submitEdit, {
//...
onreset: jeditableReset,
//...
});
function j... |
Develop In C++ For Windows CE In Linux <p>How i can develop and compile command line C++ programs in my Linux Ubuntu, for my Jornada 720 that have a Windows CE 3.1(HPC 2000), something like a compiler like that for Palm or something like <em>gcc</em>, and a tutorial of development and compiling will be very nice, remem... | <p>Try <a href="http://gizguides.wikidot.com/linuxcegcc" rel="nofollow">CeGcc</a>.</p>
|
.NET Data Provider that can Insert 300,000 Records Really Fast? <p>I am making an application that is able to display log files and search throught them, in C#. I need data provider that can insert 300,000 records really fast. Does anybody have any sugestions? I am currently using Microsoft Compact server 3.5 and that ... | <p>I don't know if it is available in the Compact Server, but if you want fast upload into the database, performing a BULK INSERT is usually the way I go.</p>
|
Shorter way to access name of class in static method? <p>Is there a better/shorter way to write the <code>whoAmI</code> method in the following code? It seems a bit unnecessary to create a new object just to get the static class' name.</p>
<pre><code><?php
abstract class baseClass {
static function whoAmI() {
... | <p>Try <code>get_called_class()</code>.</p>
<p><a href="http://php.net/manual/en/function.get-called-class.php" rel="nofollow">http://php.net/manual/en/function.get-called-class.php</a></p>
|
Data analysis tool like MS excel <p>I have a large number of data that needs to be compared,
We are using Microsoft EXCEL, it costs, and it is slow, besides the graph that it generates is also not up to the mark.
Now, is their any other tool, that is free, and has good graph's facility.</p>
<p>Thank you.</p>
| <p>If you need good data analysis toolkit, you can spend some time and try <a href="http://www.r-project.org" rel="nofollow">R</a> --- free software statistics/data analysis toolkit. It has pretty good graphic capabilities, especially via <a href="http://had.co.nz/ggplot2/" rel="nofollow">ggplot2</a> package for stati... |
Why doesn't my decrypt function work? <p>This was not written by me; it was written by someone who passed it down to me. I lost contact with the author of the code. I have been using this code for a few years and just now realized this error. It seems that the letter sequence <code>rkey1</code> messes up the output. </... | <p>Your problem is that your decode_escaped does not exactly undo what encode_escaped did. Replace it with the following and that should fix your problem.</p>
<pre><code>sub decode_escaped
{
$_[0] =~ m/\"(.*)\"/;
local @str = split /(\\\\)/, $1;
foreach (@str) {
s/\\"/"/g;
s/\\(..)/chr(hex(... |
What does a working example of dealing with packet fragmentation in C# look like when using the Begin* End* method? <p>After enough playing with asynchronous socket programming I noticed that the server was receiving chunked payloads (ie: more than one complete payload sitting in the same buffer). So I came up with the... | <p>This may or may not have anything to do with fragmentation.</p>
<p>In general, the socket will pass you as many bytes at a time as it feels like. Your job is to know how many bytes are in your overall message, and to read them all. Just keep looping until you have all the bytes you need, or until there's an excepti... |
SSL WCFs with custom binding <p>Has anyone ever tried to use custom binding with SSL in a WCF web service? I've seen a number of examples on how to do this with basicHttpBinding and wsHttpBinding but the equivalent always fails for customBinding. Specifically what I'm currently working with (the most successful confi... | <p>So it turns out the problem wasn't with our web.config at all, it had to do with an issue with IIS 7 and Wildcard SSL certificates. </p>
<p>Namely, IIS 7 doesn't allow you to specify the hostname when binding an IP to an SSL connection and certificate. I'd guess that this is because it expects a non-wildcard SSL ... |
asp .net mvc authorization <p>What is the best way to protect certain areas of your web application in asp .net mvc. I know we can put <code>[Authorization]</code> attribute at each action, but this seems very tedious since you have to put it all over the place. I'm using membership provider and trying the way I used t... | <p>I'd highly recommend against putting it in the web.config. Actually, so do Conery, Hanselman, Haack, and Guthrie -- though not highly (p223 of Professional ASP.NET MVC 1.0)</p>
<p>Routes are subject to change, especially in MVC. With the WebForm model, routes are physically represented on the file system so you d... |
convert auto height of TR to pixel or percentate <p>Is anyone know how to convert the height of TR element which is in AUTO to pixel or percentage?</p>
| <p>Do you mean at run time using JS or in the development phase?</p>
<p>You could always use the <em>ruler</em> made available in the Web Developer tool bar to measure it, and then use that value in your CSS.</p>
<p>Or, any calculating using JS for the height of a tr element should return it in pixels.</p>
|
How can I make setuptools ignore subversion inventory? <p>When packaging a Python package with a setup.py that uses the setuptools:</p>
<pre><code>from setuptools import setup
...
</code></pre>
<p>the source distribution created by:</p>
<pre><code>python setup.py sdist
</code></pre>
<p>not only includes, as usual, ... | <p>I know you know much of this, Brandon, but I'll try to give as a complete answer as I can (although I'm no setuptools gury) for the benefit of others.</p>
<p>The problem here is that setuptools itself involves quite a lot of black magick, including using an entry point called setuptools.file_finders where you can a... |
Configuring project report generation for Hudson within Hudson <p>There are a number of plugins for Hudson to create coverage, test result, metrics and other reports.</p>
<p>It seems that all of them require you to add extra configuration to your build scripts (or Maven POM) for every project that you want to have the... | <p>This is not possible - the Hudson philosophy is that your build tools should generate the reports. Hudson will pick those up and render them in the UI.</p>
|
creating non-reloading dynamic webapps using Django <p>As far as I know, for a new request coming from a webapp, you need to reload the page to process and respond to that request. </p>
<p>For example, if you want to show a comment on a post, you need to reload the page, process the comment, and then show it. What I... | <p>You want to do that with out any client side code (javascript and ajax are just examples) and with out reloading your page (or at least part of it)?</p>
<p>If that is your question, then the answer unfortunately is you can't. You need to either have client side code or reload your page.</p>
<p>Think about it, once... |
Checking for existance of Windows API Functions <p>I am new to Windows programming and I'm trying to discover the best way to check for the existence of Windows Shell API functions. I want to use some of the new taskbar features in Windows7.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/dd378460%28VS.85%29.a... | <p>It depends on the kinds of the functions.</p>
<p>For plain (non-COM) functions, the only way is to use <code>LoadLibrary</code> and <code>GetProcAddress</code>. If either fails, you know the OS is missing that function. Writing those function pointer type declarations for function pointers duplicating existing func... |
Malloc, string pointers, and Valgrind <p>My program is like this (<strong>main.c</strong>):</p>
<pre><code>#include <stdlib.h>
#include <stdio.h>
void main(){
char *first="hello ";
char *second="world!";
char *seq=(char *)malloc((strlen(first)+1)*sizeof(char));
strcat(strcpy(seq,first),second);
p... | <pre><code> char *seq=(char *)malloc((strlen(first)+1)*sizeof(char));
</code></pre>
<p>You are allocating memory for a string the size of just 'first'.</p>
<pre><code> strcat(strcpy(seq,first),second);
</code></pre>
<p>And then you try to fit both first and second in it. That's never going to work. <code>strcat</co... |
Format from ticks to date <p>I am needing to transfer some logs which were timestamped in ticks to an XML document. I would prefer the timestamps to be more Specific such as "July 14, 2009 10:18:04 pm"</p>
<p>I was planning to using something along the line of:</p>
<pre><code>DateTime logDate = DateTime.Parse(logText... | <p>If <code>logText</code> is a string, you can convert it to long (Int64) and use <a href="http://msdn.microsoft.com/en-us/library/aa326681%28VS.71%29.aspx">this constructor</a>: </p>
<pre><code>DateTime date = new DateTime(long.Parse(logText));
</code></pre>
|
Storing data in Spreadsheet instead of any database <p>Is it possible to use Spreadsheet has a database to store data...I don't want to use any database externally, I want to use Python, Google Apps and spreadsheet only.</p>
<p>For Example: using Python and Google Apps I have developed leave application form, on subm... | <p>Whilst storing data in a spreadsheet might seem like a good idea at first, as your application gets more complicated you may come to regret it. If your data structures become more complicated - especially if you need relationships between tables - you'll be much better off with a database.</p>
<p>My advice would b... |
Where do I start when I want to setup an new information portal? <p>Its easy to find a standard CMS system - but what do you recommend to setup a web page that is 70% www.tripadvisor.com and 30% www.hostels.com ? (The page I'm working on is not going to be a competitor to any of those pages) But it is to give an Idea a... | <p>Did you look at the Hippo CMS & Jetspeed combination?</p>
<p><a href="http://onehippo.org" rel="nofollow">http://www.onehippo.org/</a></p>
|
Single character input with wake state <p>Back in college I wrote a game where the computer would sleep for 1 second, wake up and check to see if anything needed to be processed.
Of course, if the user entered a single character command, it would respond immediately.</p>
<p>Is there a way to do that with JavaScript?</... | <p><code>setTimeout()</code> and <code>setInterval()</code> will allow you to execute some code at regular intervals.</p>
<p>You can also monitor key press events in the DOM. Libraries like jQuery make this really easy with built in support for keyDown, keyUp and keyPress events. You can see these here: <a href="http:... |
User-defined cast to string in C++ (like __repr__ in Python) <p>How do I make something like user-defined <code>__repr__</code> in Python?</p>
<p>Let's say I have an <code>object1</code> of <code>SomeClass</code>, let's say I have a function <code>void function1(std::string)</code>. Is there a way to define something ... | <p>Define a conversion operator:</p>
<pre><code>class SomeClass {
public:
operator std::string () const {
return "SomeClassStringRepresentation";
}
};
</code></pre>
<p>Note that this will work not only in function calls, but in any context the compiler would try to match the type with <code>std::strin... |
Migrating From SQL Server Server 7 To 2005, What should I get excited about? <p>The company I work for has decided to join the 21st century and upgrade our main database cluster from SQL Server 7 to SQL Server 2005. As a web developer what new whiz-bang features of SQL Server 2005 should I get excited about or get to k... | <p>One that comes to mind is that you can integrate CLR / .NET code into SQL Server.</p>
<p><a href="http://www.devx.com/codemag/Article/27092" rel="nofollow">Here</a> are some others.</p>
|
how to take backup to a network share? <p>when i tried to back up the database to a shared network i am getting the following error can any one help me?</p>
<p><strong>*Msg 3201, Level 16, State 1, Procedure Full_BCK, Line 21
Cannot open backup device '\prabha\Rajniprabha\SivaBaba2008_Full.bak'. Operating system erro... | <p>Error 5 means Access denied. Are you sure the user running SQL Server has access to that folder?</p>
<p>Also you seem to be missing the first backslash (which could translate to an access denied error), it should be</p>
<pre><code>\\prabha\Rajniprabha\SivaBaba2008_Full.bak
</code></pre>
|
Storing UIImages with ObjectiveRecord and ObjectiveSync <p>Does anyone know how I should go about storing a UIImage with the version of ObjectiveRecord packaged with ObjectiveSync? (Note that the version of SQLPersistantObjects in ObjectiveRecord is older than the current version) At the moment, I am attempting to stor... | <p>If you want to store the image in the sqlite database then , the image should be stored as BLOB type in the sqlite database</p>
<p>see the example :</p>
<p><a href="http://www.iphonesdkarticles.com/2009/02/sqlite-tutorial-saving-images-in.html" rel="nofollow">http://www.iphonesdkarticles.com/2009/02/sqlite-tutoria... |
In ASP.NET MVC, should OnException be used for application exceptions? <p>I'm building a small application in ASP.NET MVC. I'm still trying to find my way around some of the design problems that I encounter.</p>
<p>One of them is the use of exceptions. I've built my model so that it throws an exception whenever an obj... | <p>You should check out the HandleError attribute. You can specify which view should be shown for which exception. <a href="http://stackoverflow.com/questions/183316/aspnet-mvc-handleerror">http://stackoverflow.com/questions/183316/aspnet-mvc-handleerror</a> It's MVC-specific and feels much "cleaner" to me than using t... |
How to handle dynamic GUIs in .net <p>I've come accross a problem, that is probably seen pretty often, but has never really been discussed here.</p>
<p>In my Gui, I'm adding Controls in a for loop to a Flowpanellayout. The point is to display "reports" from a database. It has to be dynamic, because the number of repor... | <p>You can use the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.tag.aspx" rel="nofollow"><code>Tag</code></a> property of the controls, for instance. In your loop, you can assign the <code>Label</code> to the <code>Tag</code> property of the <code>TextBox</code> like this:</p>
<pre><co... |
Delphi 2009 Handling of With <p>Anybody know what is different about Delphi 2009's handling of "with"?</p>
<p>I fixed a problem yesterday just by deconstructing "with" to full references, as in "with Datamodule, Dataset, MainForm". Delphi 2006 and earlier applied "Close" to the Dataset. Delphi 2009 applied "Close" t... | <p>Nothing has changed. Your previous observation was wrong. The objects mentioned in a <code>with</code> statement are considered "right to left," so in your example, <code>MainForm</code> would be searched first, then <code>Dataset</code>, and then <code>Datamodule</code>. That's how it's always been. It's the same a... |
How to Display Parent-Child Relationship in a single datagrid Windows Forms .Net <p>I need to know is there a way to dispaly parent-child relation in a single datagrid in Windows Forms .Net C#</p>
| <p>After a little bit of googling I came up with a post on the msdn forums where they where looking for the same functionality.</p>
<p>Basically what you can do is host a datagridview inside a templatecolumn of your datagrid.</p>
<p>you can find this post here: <a href="http://social.msdn.microsoft.com/Forums/en-US/w... |
Is there a way to configure TFS to allow inclusion of only specific extensions for a folder? <p>Is there a way using TFS (Microsoft Team Foundation Server) to configure a folder for a project so that it allow the adding of files with just a specific extension to a project?</p>
<p>The scenario is:</p>
<ul>
<li>I have ... | <p>Not really. The closest you can come is by writing a custom checkin policy. This has some downsides:</p>
<ul>
<li>Developers can override policies. (though you can be notified / audited)</li>
<li>Checkin policies must be installed on each client machine that uses the team project. No automatic deployment; no ex... |
Warning: imageftbbox() [function.imageftbbox] - what is this error <p>I got this error on my image generation script :</p>
<blockquote>
<p>Warning: imageftbbox() [function.imageftbbox]: Problem loading glyph:</p>
</blockquote>
<p>I think because of this I can't generate images from text properly - how do I fix thi... | <p>there was a problem loading a font file. check the path, filename etc.</p>
|
Parsing FxCop logfile - how would you do it? <p>I'm currently writing a tool that parses the FxCop logfile on a large codebase. My goal is to provide graphical information about the most common warnings, sorted by namespace (subsystems of the application).</p>
<p><a href="http://tinypic.com/view.php?pic=281em9z&s=... | <p>Run FxCop so that you get an XML report, pair it with an XSL and you got your graphical presentation. I think that there are a few XSL sheets to choose from, but <a href="http://blogs.sqlxml.org/media/p/4881.aspx" rel="nofollow">I think this one does the trick</a>.</p>
<p>Typically I let <a href="http://confluence.... |
Custom Form validation in CakePHP <p>This is my form: I want to make sure that AT LEAST one of the name/email pairs are filled in, so I'm working on a custom validation rule in my model.</p>
<p><img src="http://files.getdropbox.com/u/240752/formfields.png" alt="alt text" /></p>
<p>I originally thought it would a simp... | <p>I would write a custom validation method for this purpose: <a href="http://book.cakephp.org/view/150/Custom-Validation-Rules#Adding-your-own-Validation-Methods-152" rel="nofollow">http://book.cakephp.org/view/150/Custom-Validation-Rules#Adding-your-own-Validation-Methods-152</a></p>
|
Thread pool sizing for network-bound tasks <p>What are the basic rules for sizing a thread pool which contains tasks that:</p>
<ul>
<li>are always network-bound;</li>
<li>access external services with different throughput and latency.</li>
</ul>
<p>My main concern is using the bandwith optimally ( <em>i.e.</em> don't... | <p>Is your network access synchronous or asynchronous?</p>
<p>If your network access and request processing is asynchronous, then the thread pool size can be => Number of available cores + 1.</p>
<p><strong>UPDATE:</strong> By available cores, I mean the number of physical processors available on the system. A thread... |
Run with administrative permission issue <p>I am using Windows Vista and I find something strange, </p>
<ol>
<li><p>I programatically invoke IE to open IE to access some local html page, the current user belongs to administrator group;</p></li>
<li><p>I programatically invoke IE with RunAs parameter, and let IE to acc... | <p>Even when the user is in the Administators group, they won't be able to undertake privileged operations without an application requesting elevation via a UAC prompt.</p>
<p>Hence the availability of the right-click, "run as administrator" context menu item.</p>
<p><a href="http://technet.microsoft.com/en-us/librar... |
What is Mysql Link? <p>I am debugging a php application.</p>
<p>In the Local Debugging window, it shows the following information</p>
<ul>
<li>Name value Type </li>
<li>LinkID 15 <strong>mysql link</strong></li>
</ul>
<p>The value of LinkID change within the program</p>
<p><strong>What is mysql link typ... | <p>A MySQL link is the type of <a href="http://php.net/manual/en/language.types.resource.php" rel="nofollow"><strong>resource</strong></a> returned by <a href="http://php.net/mysql_connect" rel="nofollow"><code>mysql_connect()</code></a>.</p>
<p>There's not much you can do with it except pass it around to other MySQL ... |
C coding practices for performance or code size - beyond what a compiler does <p>I'm looking to see what can a programmer do in C, that can determine the performance and/or the size of the generated object file.</p>
<p>For e.g,<br>
1. Declaring simple get/set functions as inline may increase performance (at the cost o... | <p>One thing I can think of that a compiler probably won't optimize is "cache-friendliness": If you're iterating over a two-dimensional array in row-major order, say, make sure your inner loop runs across the column index to avoid cache thrashing. Having the inner loop run over the wrong index can cause a huge performa... |
Checking digital signature programmatically <p>I have the exe for the project im working on signed by a digital signature which means when it asks for admin rights it shows the company name. This works very well but if you modify the exe it will still work and show unknown there instead. </p>
<p>Is there a way to chec... | <p><a href="http://msdn.microsoft.com/en-us/library/aa382384%28VS.85%29.aspx">Here</a> is a sample program(it uses <a href="http://msdn.microsoft.com/en-us/library/aa388208%28VS.85%29.aspx"><code>WinVerifyTrust</code></a> function) that verifies signature, but I'm not sure that it will work under Windows 7. You should ... |
Shipping MYSQL Dabatase with product <p>Can anyone help me understanding what can I do if I want to ship a MYSQL database along with a web based software I have. I am using a free version of MYSQL 5.1. All I want is the client should not able able to get the access to my database/tables, but my application should be ab... | <p>you can run the database on the client machine or host it yourself, depending on the circumstances, but if you have a php application or something then the client could just take the connection details out of it, so it doesnt matter, he can access the database anyways.
If its not like that, you can do it as you like... |
Eclipse classpath entries only used for tests <p>In Maven, you can have <em>compile-time</em> dependencies and <em>test</em> dependencies. This is a feature I love, and the M2Eclipse plugin makes this available in Eclipse, too, which is great. So if I add <code>jmock.jar</code> to my project as a test dependency, it wi... | <p>You could separate all your tests into another project and add the main project as a dependency (<strong>Project->Properties</strong>-><strong>Java Build Path</strong>-><strong>Projects</strong>-><strong>Add...</strong>)</p>
<p>Update: To avoid changing the original project structure, your test projects can use lin... |
Creating a SOAP Request with ASP.Net 2.0 <p>I am talking to a technical contact at the Server Website who expects me to be using Visual Studio while I just want to hand write script. See below for the SOAP request I need to generate. (I have replaced the actual URL with a dummy one) . I am pretty new to ASP and SOAP as... | <blockquote>
<p>I am talking to a technical contact at
the Server Website who expects me to
be using Visual Studio while I just
want to hand write script</p>
</blockquote>
<p>You should get over that. You're not working with Classic ASP here.</p>
<p>Don't Google it. You won't find any good examples of sending... |
Is it possible to assign object to int? <p>I have a CCounter class which holds and integer value protected by mutex. I've defined several operators like post/pre inc/dec returning an integer so I can do:</p>
<pre><code>CCounter c(10);
int i = c++;
</code></pre>
<p>but what do I do with a simple assignment like <code>... | <p>You need to define a casting operator that casts from CCounter to int. Add this member to your class:</p>
<pre><code>operator int() const {
return ...;
}
</code></pre>
|
remove index.php from cakephp url <p>how to remove the index.php from the cakephp url? In order to access my forms folder, I have to give the url : <a href="http://localhost/cake_1_2/index.php/forms" rel="nofollow">http://localhost/cake_1_2/index.php/forms</a>.</p>
<p>how do i remove that index.php?</p>
<p>I removed ... | <p>If you're using CakePHP with mod_rewrite on (to get pretty URL's) you can create new folders within <code>WEBROOT</code> and access files just fine.</p>
<p>Example:</p>
<pre><code>Site/webroot/forms/form.php = http://www.sitename.com/forms/form.php
</code></pre>
<p>CakePHP's mod_rewrite is setup to check for exis... |
How to change the Center-of-Rotation in OpenGL <p>I have a 3D Model <em>(OpenGL ES 1.1 iPhone SDK v3.0)</em> that is somewhat complex (<em>i.e. Thousands of Vertexes and Faces</em>) and I'd like to rotate this model around the Y-axis at or near the center of the Model. The problem is that glRotate rotates my model arou... | <p>Sure. Translate the object down. THEN rotate it.</p>
|
Connecting to MySQL with PHP <p>I have MySQL running such that I can open a client command line and log on and make databases, tables, etc.</p>
<p>I wanted to do some AJAX. Doing AJAX with ASP, SQL Server, etc is not advisable since both places where I am hosting my websites do not use the Microsoft products. So I a... | <p>It looks that your php is missing mysql module</p>
<p>in php.ini make sure that you have correct extensions path eg.:</p>
<pre><code>extension_dir = "C:\php\ext"
</code></pre>
<p>and make sure you have commented out:</p>
<pre><code>extension=php_mysql.dll
extension=php_mysqli.dll
</code></pre>
|
Get full path of a file with FileUpload Control <p>I am working on a web application which uses the FileUpload control. I have an xls file in the full filepath 'C:\Mailid.xls' that I am attempting to upload.</p>
<p>When I use the command </p>
<pre><code>FileUpload1.PostedFile.FileName
</code></pre>
<p>I cannot get t... | <p>It's <em>currently</em> true that "when you upload a file the browser will only send the source filename and not the full path" - it makes perfect sense that the server has no business knowing whether the file was in "C:\WINDOWS\" or "F:\SOMEDIR\OTHERDIR\PERSONALINFO\". The file*name* is always sent, and is useful b... |
How to list available instances of SQL Servers using SMO in C#? <p>Can anybody explain me what I wrong I am doing in the following piece of code:</p>
<pre><code>DataTable dt=SmoApplication.EnumAvailableSqlServer(true);
Server sr = new Server("Test");
foreach(DataBase db in sr.DataBases)
{
Console.WriteLine(db["na... | <p>Take a look at the following links they may be helpful:</p>
<ul>
<li><a href="http://www.codeproject.com/KB/database/SubmitSQLInfoEnumerator.aspx">Enumerate SQL Server Instances in C#, Using ODBC</a></li>
<li><a href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/fda283ef-5a8b-424d-b54... |
How to check if a private method was called with expected argument in unit test? <p>I am writing unit for a class which looks like following using nunit and Rhino mock. </p>
<pre><code>Class MyClass
{
private void M()
{
N("Hi");
}
private void N(string text)
{
........ do something
}
}
</code></pr... | <p>It seems to me that from the point of view of testing, you're delving into the implementation details of your object. Can't you perform your tests by checking the ultimate result of your method call ? That is, presumably these method calls have some effect. So rather than checking the arguments being passed, you sho... |
Announcments Control in WPF <p>What is the recommended way to implement an announcments (or news) control in WPF?</p>
<p>Thanks.</p>
| <p>The simple solution is just to use a <code>ListBox</code> control and style it accordingly. If you don't want items to be selectable, then a vertical <code>StackPanel</code> would probably do the job. The beauty of WPF is that this using any control of the right form as your base still provides a high enough degree ... |
Portable way of finding total disk size in Java (pre java 6) <p>I need to find the total size of a drive in Java 5 (or 1.5, whatever). I know that Java 6 has a new method in java.io.File, but I need it to work in Java 5.</p>
<p>Apache Commons IO has org.apache.commons.io.FileSystemUtils to provide the <em>free</em> di... | <p>Update:</p>
<p>I apologise for misreading the question, I recommend copying the FileSystemUtils approach, but modifying the commands it runs slightly.</p>
<p>In dos you can get the free and total bytes with the fsutil command:</p>
<pre><code>fsutil volume diskfree [drive letter]
</code></pre>
<p>on my box this g... |
Does a .net bool[] use one bit or one byte per item? <p>In .net, does a bool[] use one bit or one byte per array item? ie, does it automatically pack the bool values? I know a single bool uses 1 byte, but maybe the CLR has a special case for bool[]...</p>
| <p>Concerning size, it stores an array of bools as an array of bytes, no special case there.</p>
<p>You might want to check the <a href="http://msdn.microsoft.com/en-us/library/system.collections.bitarray.aspx" rel="nofollow">BitArray</a> class if you want to pack data.</p>
|
Javascript Overriding issue <p>I struck up in a Javascript method overriding problem for a while. the problem is i got onclick event handler on one of my controls and i need to to do inject some method before the event handler triggers the actual method.</p>
<p>assume DGrid.Headerclik is actuall assigned to onclick ev... | <p>You should store the previous handler in a (closure) variable:</p>
<pre><code>(function() {
var oldHandler = DGrid.Headerclik;
DGrid.Headerclik = handleInLocal;
function handleInLocal() {
// ...
oldHandler();
// ...
}
})();
</code></pre>
|
What is in your .emacs file? <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/154097/whats-in-your-emacs">What's in your .emacs?</a> </p>
</blockquote>
<p>I've started to use Emacs and I've been looking up ways to improve my .emacs file. Some of the stuff ... | <pre><code>(setq visible-bell t)
</code></pre>
<p>Nothing irritates me more than that god forsaken beep.</p>
|
Deleting all files of a directory over a given file size each <p>I have a bit of script that deletes all .png files in a directory:</p>
<pre><code>foreach (glob("*.png") as $filename) {
echo "$filename size " . filesize($filename) . "\n";
unlink($filename);
}
</code></pre>
<p>How do I take this one step furth... | <p>You can use an <a href="http://php.net/manual/en/control-structures.if.php" rel="nofollow">if</a> statement to check whether the size is above the threshold:</p>
<pre><code>$threshold = 1024;
foreach (glob("*.png") as $filename) {
$size = filesize($filename);
if ($size > $threshold) {
unlink($fi... |
Does Ruby CAS server provides restful interface for opening sessions, obtaining service tickets? <p>I have installed Ruby CAS server and my application is a simple Restful Authentication User Management Application , i would to like experiment my application by providing a Central Authentication for my User Management... | <p>RubyCAS implements <a href="http://www.jasig.org/cas/protocol" rel="nofollow">the CAS protocol</a>, which is sort of RESTful (at least, it uses plain HTTP calls and not SOAP or XML-RPC). While restful_authentication doesn't support talking to a CAS server, there are several Rails solutions that do. I wrote <a href... |
How are regular and composite indexes implemented in RDBs? <p>In databases like MySQL or Oracle, how are indexes implemented? I think regular indexes are stored as B-trees, but couldn't find anything about composite indexes that index on multiple columns. I'm looking for the names of the data structures used so I can r... | <p>Composite indexes also use B-Trees, they just concatenate the indexed columns to determine the key. As a side node, Oracle also knows other index types, i.e. bitmap indexes. But that doesn't depend on the number of columns indexed.</p>
|
Are there frameworks or customizable tools to make a visual editor for my .NET app? <p>I have an application, which performs some custom data gathering, transformation and reporting.</p>
<p>Currently, the only way to set up and configure all the steps is to fill some large and cumbersome WinForms screens. What I'd lik... | <p>If it's ok that the users of your tool will have to have Visual Studio Standard or higher, then look into the <a href="http://msdn.microsoft.com/en-us/vsx/cc677260.aspx" rel="nofollow">DSL Toolkit</a>. It allows you to create a graphical editor for creating instances of a domain model. These instances may be used as... |
Setting ViewData item in a Partial to be read in a View <p>I have a View which I call RenderPartial.</p>
<p>In the Partial usercontrol I set <code>ViewData["IsTextAreaVisible"] = true;</code></p>
<p>In my View after the call to <code>RenderPartial</code> I check the value of <code>ViewData["IsTextAreaVisible"]</code>... | <p>That is working as designed.</p>
<p>Each partial view gets it own copy of the view data so that any changes it makes don't taint the original. What you want to do, we've expressly prohibited.</p>
|
Is there a way to use functions in NSPredicate predicateWithFormat: <p>I have store with entities that have coords (x, y, z).
I want to fetch them by using predicate like @"sqrt(x*x + y*y + z*z) < distance".</p>
<p>Is there any way to do this?</p>
<p>I've tried to do thi with predicateWithFormat:</p>
<p>I even w... | <p>I don't think what you're trying to do is possible, however you could implement a generic mapping function and rewrite your <code>@"sqrt(x*x + y*y + z*z) < distance"</code> predicate as a function returning a <code>BOOL</code> which you would pass in as a selector:</p>
<pre><code>@implementation NSArray(Filterin... |
Repaint of panel <p>My problem is that I have a panel in panel. Inside i have the <code>AutoScroll</code> property set to true. When I open a new window this panel is scrolled to begining. </p>
<p>I do that, I save the position before open new window, and I set it after close it. It works but it jumps to the beginning... | <p>The AutoScrollPosition property is a bit funny. When you read it, it will return the current scroll offset, but when you assign it you will need to invert the values:</p>
<pre><code>private static Point GetAutoScrollPosition(Panel panel)
{
return panel.AutoScrollPosition;
}
private static void SetAutoScrollPos... |
Work around for the same origin policy problem <p>I have a problem where I have a frameset consisting of a parent frame loaded from one domain and a contained frame from a different domain. The contained domain also sets a cookie before the frameset is loaded. However, because of the 'same orgin' policy, enforced by mo... | <p>There are a couple of methods of getting around the <a href="http://code.google.com/p/browsersec/wiki/Part2" rel="nofollow">Same Origin Policy</a> that is preventing your iframes from speaking to each other. If you control both servers then you can use <a href="http://www.adobe.com/devnet/articles/crossdomain_polic... |
Get MD5 hash of big files in Python <p>I have used hashlib (which replaces md5 in Python 2.6/3.0) and it worked fine if I opened a file and put its content in <a href="https://docs.python.org/2/library/hashlib.html"><code>hashlib.md5()</code></a> function.</p>
<p>The problem is with very big files that their sizes cou... | <p>You need to read the file in chunks of suitable size:</p>
<pre><code>def md5_for_file(f, block_size=2**20):
md5 = hashlib.md5()
while True:
data = f.read(block_size)
if not data:
break
md5.update(data)
return md5.digest()
</code></pre>
<p>NOTE: Make sure you open you... |
visual studio compile time plug-in <p>Is there a visual studio plug-in that will track how long it takes to compile and run a project?</p>
<p>Basically I'm trying to make a case to get faster computers for the development department. It seems like it takes a minute or so every time I want to run/debug, so I want a way... | <p>For C++, you can turn on build timing, in VS2005, this is under Tools > Options > Projects and Solutions > VC++ Project Settings > Build Timing. Not sure if this applies to other languages. This only times each individual build and spits the result to the output window. If you want to track statistics, then you'd... |
server side marker clustering in django <p>I am creating a mashup in django and google maps and I am wondering if there is a way of clustering markers on the server side using django/python. </p>
| <p>I have implemented server side clustering in Django on my real estate/rentals site; I explain it <a href="http://forum.mapaplace.com/discussion/3/server-side-marker-clustering-python-source-code/" rel="nofollow">here</a>.</p>
|
Are Generators Threadsafe? <p>I have a multithreaded program where I create a generator function and then pass it to new threads. I want it to be shared/global in nature so each thread can get the next value from the generator.</p>
<p>Is it safe to use a generator like this, or will I run into problems/conditions acc... | <p>It's not thread-safe; simultaneous calls may interleave, and mess with the local variables.</p>
<p>The common approach is to use the master-slave pattern (now called farmer-worker pattern in PC). Make a third thread which generates data, and add a Queue between the master and the slaves, where slaves will read from... |
Add a style to a particular word in a textField data in JasperReports <p>How do I add a specific style (like bold, strike-through) to a word or a sentence in the <code>textField</code> data in <code>JasperReports</code></p>
| <p>Set <code>Markup=styled</code>. Text field has to be a string, so you need to input your style opening tag, concatenate dynamic data and finally concatenate the closing tag.</p>
<p>Examples:</p>
<pre><code>"<b>" + $P{parameter_name} + "</b>"
"<font face='DejaVu Serif'>" + $R{resource_name} + "&l... |
Good resources on e-shop, e-commerce store Software Design? <p>I'm designing an online store myself from scratch and I'm really missing some valuable resources about the common problems and solutions found in designing and implementing a s-shop/e-commerce system</p>
<p>Do you know any valuable resource about this I co... | <p>You might read some of <a href="http://www.paulgraham.com/articles.html" rel="nofollow">Paul Graham</a>'s articles. After all, he <a href="http://www.paulgraham.com/road.html" rel="nofollow">wrote</a> the first e-shop application, Yahoo Store.</p>
|
Using relative directory path in Java <p>I am trying to use a relative path to locate an executable file within a Java class instead of hard-coded lines which worked, but using something like:</p>
<p><code>final static String directory = "../../../ggla/samples/obj/linux_x86"</code></p>
<p>fails... what is the proper ... | <p>The most likely explanation is that your current directory is not where you think that it is. You can inspect the system property of user.dir to see what the base path of the application is, or you can do something like this:</p>
<pre><code> System.out.println(new File(".").getCanonicalPath());
</code></pre>
<p>ri... |
Running Sinatra app with Mongrel on Windows <p>I'd like to start a Sinatra app from Mongrel on Windows, rather than Sinatra starting Mongrel in the background.</p>
<p>Is there a simple way to use Mongrel for Sinatra? It's looking for a rails app by default.</p>
<p>Edit: Suggested solution is to simply run a VMWare o... | <p>Check out <a href="http://sinatra-book.gittr.com/" rel="nofollow">http://sinatra-book.gittr.com/</a>.</p>
<p>FastCGI is the chapter you're looking for within the page, because that's what mongrel is </p>
|
Dynamically Changing UITableView's Contents <p>I have an NSURL object which gets data from my site, based on a variable entered by the user into the search bar.</p>
<p>I split this data into an NSArray.</p>
<p>Once I have done that I wish to display the data in a UITableView.</p>
<p>My question is this. Is it possib... | <p>Sure the method reloadData on UITableView will do the trick </p>
|
The $.param( ) inverse function in JavaScript / jQuery <p>Given the following form:</p>
<pre><code><form>
<input name="foo" value="bar">
<input name="hello" value="hello world">
</form>
</code></pre>
<p>I can use the <code>$.param( .. )</code> construct to serialize the form:</p>
<pre... | <p>You should use <a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ</a>'s <a href="http://benalman.com/code/projects/jquery-bbq/examples/deparam/">deparam</a> function. It's well-tested and documented.</p>
|
Add insmod Kernel HID module <p>I made certain modifications in hid module.</p>
<p>I can make it and load (insmod) it on kernel v 2.6.27.14 sucessfully </p>
<p>Now I am willing to load the same kernel module on kernel v 2.6.27.11</p>
<p>As there is no differance in the kerbel source files for both the kernel version... | <p>You can't load a module compiled for another kernel version. That the source code of the module did not change does not mean that the binary will be the same for another kernel version. Any interface change of kernel internal APIs (even when not directly visible) will break the module...</p>
<p>Therefore, the kerne... |
Position Fixed in Chrome <p>I have a little problem with my site, I have a bar and on it a box that float above the bar, everything works fine in IE, Firefox, Opera, but in Chrome and Safari the box that must be above the bar float by the bar side no above it.</p>
<pre><code> #barraDerecha
{
width:240px;
b... | <p>Just in case someone is getting the same chrome behaviour.</p>
<p>It looks like chrome considers that the viewport of an element added to the DOM after the page is loaded (for instance, using jQuery.load()) is restricted to the containing div of this element.</p>
<p>I guess .asp is injecting your barraDerecha afte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.