I accidentially discard my changes on files in my local working tree via git checkout. The files aren't staged at this time. Is it posible to "undo" this checkout?
My understanding of printf-like format strings is that you can prefix any conversion specifier with a minimum field width. This does not seem to work for Cocoa’s %@ specifier.
Example:
NSLog(@"'%5@'", @"foo");
NSLog(@"'%5s'", [@"foo" UTF8String]);
Output:
… 'foo'
… ' foo'
Is this the intended behavior?
i Want to import a given css or javascript file depending os some conditions, in my Servlet i have:
protected void doPost(...)
{
if(condition)
{
//import some javascript or css file here
}
}
I need this behavior since i have too many files to import and the files name may vary according to the condition
Is it possible?
Hi,
I have a Perl script running in mod_perl that needs to write a large amount of data to the client, possibly over a long period. The behavior that I observe is that once I print and flush something, the buffer memory is not reclaimed even though I rflush (I know this can't be reclaimed back by the OS).
Is that how mod_perl operates and is there a way that I can force it to periodically free the buffer memory, so that I can use that for new buffers instead of taking more from the OS?
When I use my regular client and send email through SMTP for an IMAP account, that outbound email gets saved in the IMAP "Sent" box.
How can I have the same behavior when I send email using Ruby on Rails ActionMailer?
I'm looking for a password-protected information sharing tool that has the following constraints:
Two or more users can upload their ideas and discuss on that idea (like a blog)
The discussed things will be shown in a tree kind of structure
Should be password protected.
Ideally open source and web-based
When I put nested updatepanels in outer updatepanel, then in code, it shows that outer panel is around the code of all nested panels while design mode shows outer updatepanel is drawn like one row on top of page and nested updatepanels are drawn below that outside of outer updatepanel. Is this normal behavior or there is some problem in my implementation?
It seems that padding style applying to <td /> doesn't work on IE7 in my computer, but is okay on FireFox3.5.
Is this a correct behavior? Or I get wrong.
Thanks.
I like the visual behavior of the DOJO TitlePane widget, but it has too much other bunk for my purpose. http://dojotoolkit.org/reference-guide/dijit/TitlePane.html#dijit-titlepane
Is anyone aware of a jQuery widget that provides the same ability to expose and hide content in a stacked manner with the little flippy-arrow, pane highlighting on mouse over, etc? An accordion does not accomplish my goal being able to have multiple panes open at the same time.
Thanks in advance.
We have following code:
try {
// some code throwing MyException
} catch (MyException ex) {
// [1]
// no (re)throw here
} catch (Exception ex) {
if (ex is MyException) {
// [2]
}
}
If we run the code without a debugger attached, everything runs fine. However, IF we debug the code, we don't get to point [1] but [2]. As far as I understand the language specification this should not be possible.
Even weirder, this code used run fine even while debugging. The strange behavior started only a few days ago.
Is it possible to use a Perl hash in a manner that has O(log(n)) lookup and insertion?
By default, I assume the lookup is O(n) since it's represented by an unsorted list.
I know I could create a data structure to satisfy this (ie, a tree, etc) however, it would be nicer if it was built in and could be used as a normal hash (ie, with %)
Hi,
I've seen in (Apple) sample code two types of ways of allocation memory, and am not sure I understand the difference and resulting behavior.
// FAILS
NSMutableArray *anArray = [NSMutableArray array];
[anArray release];
// WORKS
NSMutableArray *anArray1 = [[NSMutableArray alloc] init];
[anArray release];
By "FAILS" I mean I get crashes/runtime warnings etc., and not always as soon as I call the release...
Any explanation appreciated.
Thanks
I'm making a new Mac OS X application. (not an iPhone app)
This is document-based application.
It shows a new "Untitled" document instance automatically when it starts up. How can I block this behavior? I wish my application show no window at start up.
Hi there,
I'm loosing my hair trying to figure out why net.sf.json.JSONObject add extra backslash where it shouldn't on my java code :
JSONObject obj = new JSONObject ();
obj.element ("column_name", "<a href=\"#\" title=\"test\">Test !</a>");
will output :
<a href=\"#\" title=\"test\">Test !<\/a>
with an extra "\" near <\/a.
How can I avoid this behavior ?
Thanks for your help !
Hi,
What mysql query should i use to select root elements? Let's say i have tree structure like this:
http://www.ipix.lt/desc/18496369
And i want to select (Vaisiai, Daržoves) elements.
sorry if this is a repeat, i looked around some and didnt find what i was after so here goes
SELECT * FROM trees WHERE trees.`title` LIKE '%elm%'
this works fine, but not if the tree is named Elm or ELM ect... how do i make sql case insensitive for this wild-card search?
again apologies if this is repeated.
oh, using MySql 5 on apache
The PageContent element implements IAddChild but doesn't implements IAddChild methods so I can't call AddChild method on PageContent..
How can it be?
And if i cast PageContent to IAddChild i can call AddChild method on it - So it does implement it somewhere...
I am confused with this behavior. Can someone shed some light on this?
I'd like to ask another question how to handle Windows' events in Java. To be specific, I'd like to know how to handle events such as mouse moved or mouse clicked in Windows XP and Vista. I want to wire my own custom behavior in my application to these events, even when my application is inactive or otherwise hidden.
All help is appreciated!
Suppose I decide to call acknowledgment() on a JMS message several times. Say the first call fails (for non-permanent reason). Does the success of the second (or any subsequent) call guarantee that the message is now acknowledged? Is the exact behavior of acknowledgement() specified anywhere?
I have a strange issue in which on rotating the Screen to Landscaped mode the Views present inside Remain at the same place But I cannot scroll them inside the screen.
How can I make them Scroll so that every thing that move out should be displayed properly to the user.
Should there be any more attribute to be set for allowing such kind of behavior.
Hello,
Suppose we have 3 apps - appMain, app1 and app2.
Applications 1 and 2 are protected, they have is_secure: true and everything works fine with sfDoctrineGuard plugin.
A behavior I want to achieve is when a user is not authenticated, current application to forward him to another one, say appMain with defined module and action.
Is that possible? Or can someone tell me where to dig about security mechanisms in symfony?
What I want to do is provide some public static fields that will be used as instances of an interface implementation and have intellisense pick them up when the interface is a method argument.
The idea is to have it look like an enum to the developer. I reference Color because basically this is the behavior I want, I just don't know how to replicate it.
Are there any good tutorials out there to develop a selectable TreeView in Visual Studios?
What I am searching for is for something that would display my drives in a tree view and have a checkbox next to each drive, folder and file. This will be used in a replication program. Thanks a million.
I know 'this' can be a problem when you don't understand Javascript well but this one got me a little puzzled.
var ControlTypes = {
TextBox: function () {
console.log(this);
this.Name = "TextBox";
console.log(this);
}
}
ControlTypes.TextBox();
Firebug gives the following result:
Object {}
Object { Name="TextBox"}
The first object is ControlTypes and the second one is Textbox. Could anybody explain the behavior behind this?
Apparently, the bug where git follows and track files beyond symlinks (git add symlink/) has been fixed around v1.6. Now this was a bug that works in my favor. Now that we've upgraded to v1.6.3.3, is there any way to reproduce that behavior without downgrading?