I need "loading" animations to import into Flex for a search engine so the person knows something is being searched. I'm not sure how to do this.... Is it through swc files?
My application needs to access files on a remote machine that requires a username and password for accessing it.
I'm trying to find out if a directory exists (using Directory.Exists) to verify I can make the 'connection.
Is there a way to supply the username and password when working with remote directories? Currently Exists returns false.
Cheers,
Hello,
i'm trying to write unobtrusive default/placeholder text in input (actually, relatively placed label over input, which hides on onFocus, and stays hidden if input isn't empty on onBlur), but I don't want to use jQuery, because this is the only javascript used on page - therefore using jQuery seems a bit over the top.
Please, how can I do this without jQuery?
Thank you.
Is there a way to specify, for example 4 distinct values for a varchar column in MS SQL Server 2008?
For example, I need a column called Frequency (varchar) that only accepts 'Daily', 'Weekly', 'Monthly', 'Yearly' as possible values
Is this possible to set within the SQL Server Management Studio when creating the table?
I have been able to get the remote files on a mac, but I am having trouble EDITING, then seeing how to "commit" back to the remote server...
I was able to follow tortoise quite intuitively but do not see where to check out files and then edit, then check back in ...
I want to rename a database, but keep getting the error that 'couldnt get exclusive lock' on the database, which implies there is some connection(s) still active.
How can I kill all the connections to the database so that I can rename it?
hi,
I have the following code inside the .h file and I'm not sure what does the assignment statement do and how is it called properly?
virtual void yield() = 0;
I thought that the function returns a value of 0 by default but since this function returns void I am a little bit confused. Can anyone comment on this and maybe say how can I refer to this assignment, I mean how is it called in C++ jargon?
Thanks.
This is absolutely ridiculous! Visual Studio is able to run (debug) my program just fine, but it won't display my layout in the designer. It just gives this useless error:
Can anyone help explain this? I have not changed the XAML at all, not a single character, since the last time it worked fine. I've only changed some .cs code.
I'm loading a UIViewController into one of my Nav controller's hierarchies, which will contain some text and some images. At the bottom, I will want to create a expandable and collapsable tableview.
First off, is this idea possible? If it is, how do I add it and where do I place the data source and delegate methods?
Can I just make a separate subclass of the TableViewController and then add it to my ViewController as a subview?
I'm always writing tests to check my controller restricts people from certain actions depending on their status i.e. logged in, admin? etc
Regardless of whether its a get to :index or a puts to :create the code is always the same. I'm trying to refactor this so that i have one method such as
should_redirect_unauthenticated_to_login_action(request, action)
and call it like so
should_redirect_unauthenticated_to_login_action(:get, :index) = get :index
But not sure how to dynamically call the various response methods rails provides for functional tests which seem to live in the module ActionController
I mucked around with
module = Kernel.const_get("ActionController")
module::TestProcess.get
NoMethodError: undefined method `get' for ActionController::TestProcess:Module
can anyone help (im very new to dynamic calling in ruby)
I have an form that takes a little while for the server to process. I need to ensure that the user waits and does not attempt to resubmit the form by clicking the button again. I tried using the following jQuery code:
<script type="text/javascript">
$(document).ready(function(){
$("form#my_form").submit(function(){
$('input').attr('disabled','disabled');
$('a').attr('disabled','disabled');
return true;
})
});
</script>
When I try this in Firefox everything gets disabled but the form is not submitted with any of the POST data it is supposed to include. I can't use jQuery to submit the form because I need the button to be submitted with the form as there are multiple submit buttons and I determine which was used by which one's value is included in the POST. I need the form to be submitted as it usually is and I need to disable everything right after that happens.
Thanks!
Hi,
This thing is driving me nuts. I have a UserControl that is called WebUserControl.
I need to cache this control, so I put the following in the WebUserControl.ascx:
<%@ OutputCache Duration="240" VaryByParam="FeedName" %>
Then I have the Default.aspx file in which I have:
<div class="divInnerLeft" id="L1" runat="server">
<uc1:WebUserControl FeedId="a1" ID="a1" runat="server" FeedName=""/>
</div>
<div class="divInnerMiddle" id="M1" runat="server">
<uc1:WebUserControl FeedId="a3" ID="a3" runat="server" FeedName=""/>
</div>
In the Page_Load event I set the FeedName property - according to the user preferences.
The problem is that after initially loading the page, the controls are generated OK. But then, in the Page_Load event they are not available again. So the a1 and a3 are null and I cannot set the FeedName for different user.
How to solve this?
Thanks!
Hey
Is it possible with python to set the timezone just like this in php:
date_default_timezone_set("Europe/London");
$Year = date('y');
$Month = date('m');
$Day = date('d');
$Hour = date('H');
$Minute = date('i');
I can't really install any other modules etc as I'm using shared web hosting.
Any ideas?
When viewing the admin change list for a model, is it possible to make the columns that correspond to foreign keys links to their respective pages? A simple example is I have a Foo object which contains Bar as a foreign key. If I'm viewing the admin change list for Foo (and have it set to include Bar in the display_list columns), the main column would link to the Foo instance's edit page while the Bar column would link to the Boo instance's edit page. I understand I can override the template that's used, but I was curious if there was a solution that didn't require that.
I have a model:
class Example(models.Model):
unique_hash = models.CharField(max_length=32,unique=True)
content = models.FileField(upload_to='source',blank=True,verbose_name="HTML Content File")
I would like to be able to set the content filename to default to a callable, but I don't see any way to have the callable reference unique_hash (or vice versa). Is this possible?
I've created a search with a couple of comboboxes that allow users to filter their search results.
The results are currently using a TileList & itemRenderer to display, and now I'd like to add an animation effect when the user filters their results.
I know that you can use the itemsChangeEffect to create an animation effect when the user drags and moves result itmes.
So I'd like to know if there's a way to create a similar effect triggered by the filtering on the comboboxes?
Thanks.
Sorry for a potentially dumb question, I am still new at this. I really appreciate your help.
Referring to http://stackoverflow.com/questions/1536739/c-get-control-by-name/1536756#1536756
But I don't have a "this.Controls" available. Is there something I am missing here?
In other words, when I type "this." and visual studio populates a list of option, there is no "Controls" option.
Our team has recently been working on a logic and data layer for our database. We were not approved to utilize Entity or Linq to SQL for the data layer. It was primarily built by hand. A lot of the SQL is auto generated. An obvious down fall of this is the need to sanitize inputs prior to retrieval and insertion.
What are the best methods for doing this? Searching for terms like insert, delete, etc seems like a poor way to accomplish this. Is there a better alternative?
I have a process under the Run key in the registry. It is trying to access an environment variable that I have defined in a previous session. I'm using ExpandEnvironmentStrings to expand the variable within a path. The environment variable is a user profile variable. When I run my process on the command line it does not expand as well. If I call 'set' I can see the variable.
Some code...
CString strPath = "\\\\server\\%share%"
TCHAR cOutputPath[32000];
DWORD result = ExpandEnvironmentStrings((LPSTR)&strPath, (LPSTR)&cOutputPath, _tcslen(strPath) + 1);
if ( !result )
{
int lastError = GetLastError();
pLog->Log(_T( "Failed to expand environment strings. GetLastError=%d"),1, lastError);
}
When debugging Output path is exactly the same as Path. No error code is returned.
What is goin on?
I have the following code which loads and html file into a webview
- (void)awakeFromNib{
NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
NSString *htmlPath = [resourcesPath stringByAppendingString:@"/main.html"];
[[self mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
}
How would i dynamically load a css file (in the most efficient manner) as it does not suit to have the css file link in the html file
When you run a Java Servlet Container that you would like to serve both static and dynamic content on port 80 you have the classic question of whether to run the server as:
As root in hopefully a chroot jail if you can (haven't gotten this working yet)
As a non root user and then use IPTables to forward port 80 to some other port (1024) that the container is running on
Both: As a non root user, IPTables, and chroot jail.
The problem with opt. 1 is the complexity of chrooting and still the security problems of running root.The problem with opt. 2 is that each Linux distro has a different way of persisting IPTables. Option 3 of course is probably idea but very hard to setup.
Finally every distro has the annoying differences in daemon scripts.
What do people find as the best distro agnostic solution and are there resources to show how to do this?
I am working on building a Question Classification/Answering corpus as a part of my masters thesis. I'm looking at evaluating my expected answer type taxonomy with respect to inter-rater agreement/reliability, and I was wondering: Does anybody know of any decent (preferably free) Java API(s) that can do this?
I'm reasonably certain all I need is Fleiss' Kappa and Krippendorff's Alpha at this point.
Weka provides a kappa statistic in it's evaluation package, but I think it can only evaluate a classifier and I'm not at that stage yet (because I'm still building the data set and classes).
Thanks.
I have a WPF aplication that is doing some serious work (doing some calcualtions) when a button is hit. I wanted to add a 'busy animation'. However, the aplication is so busy doing its work that the animation is stopped until the calcuations are finished. Any ideas??
Ok so I'm currently working with a set of classes that I don't have control over in some pretty generic functions using these objects. Instead of writing literally tens of functions that essentially do the same thing for each class I decided to use a generic function instead.
Now the classes I'm dealing with are a little weird in that the derived classes share many of the same properties but the base class that they are derived from doesn't. One such property example is .Parent which exists on a huge number of derived classes but not on the base class and it is this property that I need to use.
For ease of understanding I've created a small example as follows:
class StandardBaseClass {} // These are simulating the SMO objects
class StandardDerivedClass : StandardBaseClass {
public object Parent { get; set; }
}
static class Extensions
{
public static object GetParent(this StandardDerivedClass sdc) {
return sdc.Parent;
}
public static object GetParent(this StandardBaseClass sbc)
{
throw new NotImplementedException("StandardBaseClass does not contain a property Parent");
}
// This is the Generic function I'm trying to write and need the Parent property.
public static void DoSomething<T>(T foo) where T : StandardBaseClass
{
object Parent = ((T)foo).GetParent();
}
}
In the above example calling DoSomething() will throw the NotImplemented Exception in the base class's implementation of GetParent(), even though I'm forcing the cast to T which is a StandardDerivedClass.
This is contrary to other casting behaviour where by downcasting will force the use of the base class's implementation.
I see this behaviour as a bug. Has anyone else out there encountered this?