I am using TextMate on a Ruby on Rails project and wonder if you can put the mouse on link_to, and then press a key and it will show the definition of link_to, or does this for any other helper functions?
Or, click open a box and type in a function name and it will show you the definition?
In smarty is it possible or is there any kind of function to render a template and return the result?
for example:
$rendered_content = $smarty->render("content.html")
I am using the function CertCreateSelfSignCertificate (http://msdn.microsoft.com/en-us/library/aa376039(VS.85).aspx) to generate a certificate. I need to specify the key size to be 2048. I do not see how to provide this parameter.
I would appreciate any help in this matter.
Thanks.
Is there any textbox comoponent(control) which is counting back from the maxlength?
I can write it but i would like to find a control which has this function.
I want to implement greatest integer function.
int x = 5/3;
My question is with greater numbers could there be a loss of precision as 5/3 would produce a double?
Here are the GDI functions Chord() provided by MFC:
BOOL Chord( int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 );
BOOL Chord( LPCRECT lpRect, POINT ptStart, POINT ptEnd );
It seems to me that no such method is privided by GDI+ (the Graphics class), so how do I implement my own Chord function (with the exact same prototype) ?
By the way, I just don't understand why does MS just don't provide them.
Thanks.
i am looking an funtion to reverse any string (YYYYMDD,YY/MM/DD,YYMMDD,...) created by the function FormatDateTime to datetime.
example
i have a string-date in format YYYYMMDDcreated by FormatDateTime
mydatestr:=FormatDateTime('YYYYMMDD',Mydate);
now how i can convert mydatestr to DateTime again?
i have a code like
res = doc.evalute(xpathExpr,doc,function(prefix) { return namespaces[prefix] || null;}, XPathResult.ANY_TYPE,null );
here doc is DOM document node
when i run for loop like this
for(i in doc)alert(i);
it gives evalute method
but when i tried to use this method on dom node it giving me error like
xpathResult not defined...
i'm working in android browser
thanks in advance....
Hi, I am writing a custom read function for one of the data types in my module. For eg, when I do read "(1 + 1)" :: Data, I want it to return Plus 1 1. My data declaration is data Data = Plus Int Int. Thanks
Is there a way to have keyup, keypress, blur, and change events call the same function in one line or do I have to do them separately?
The problem I have is that I need to validate some data with a db lookup and would like to make sure that there is no way that the validation is missed weather it is typed or pasted into the box.
I am transitioning to C++ from C. In C++, is there any use for the malloc function? Or can I just declare it with the "new" keyword. For example:
class Node
{
...
}
...
Node *node1 = malloc(sizeof(Node)); //malloc
Node *node2 = new Node; //new
Which one should I use?
How can I set a conditional breakpoint to a function's 3rd line in GDB?
I know I could give the file name + line number but this is not working for me.
I have to store the gdb commands as a script to repeat it later and I don't want to change the script every time the source file is changing.
Hi there,
I have created a usercontrol to capture education details, it contains 5 textboxes and an functionto insert that values into my db. I have added the usercontrol 5 times to a page. I have a button on my aspx page which I want to be able to click and call the function to insert the values.
Can anyone suggest how I can do this?
I want to call this guy
-(void)addFavorite:(NSString *)favoriteToAdd
at, @selector here
action:@selector([addFavorite favoriteToAdd:@"string"])];
But I keep getting syntax error no matter which way I write it.
Can someone point out the appropriate way to call this function? When it had no parameter and was "addFavorite," it worked fine.
I got an IFrame, in the onload event i set the height of the frame:
function resizeFrame() { $("#iframeID").height($("#iframeID").contents().find("body").outerHeight(true)); }
Problem is:
When the content of the frame is increasing without a postback (javascript or Async Postback with Ajax), a scrollbar appears.
I found a solution for Firefox:
document.getElementById("iframeID").contentWindow.addEventListener("overflow", resizeFrame, false);
But i can't find a solution for IE 7+8
Anyone got an idea?
In NHibernate there is a merge function that does the following:
if there is a persistent instance with the same identifier currently associated with the session, copy the state of the given object onto the persistent instance
if there is no persistent instance currently associated with the session, try to load it from the database, or create a new persistent instance
the persistent instance is returned
Is this possible in EF? I mean this part : copy the state of the given object onto the persistent instance. And if i used ApplyCurrentValues it seemes to be as update behavior or not?
Hi there,
I tried to pass a string value into a JavaScript function like below:
<%= "'" + prop.property_description + "'") %>)
But it does not seems to be the best option, is there a better way to do the above without concatenate the string values with "'"?
Thanks
is there a built in function to compute the overlap between two discrete intervals, e.g. the overlap between [10, 15] and [20, 38]? In that case the overlap is 0. If it's [10, 20], [15, 20], the overlap is 5.
thanks.
I have been trying to get this array function to output (non-zero) minimum values in the 'FINAL DATA' AE column. Can you see a structural error in this formula?
=IF($C$4="All EMEA",
MIN(IF('FINAL DATA'!$2:$AE$250000<>0,
('FINAL DATA'!$J$2:$J$250000=$C$4)*('FINAL DATA'!$E$2:$E$250000=$E$4)*( 'FINAL DATA'!$AE$2:$AE$250000))),
MIN(IF('FINAL DATA'!$AE$2:$AE$250000<>0,
('FINAL DATA'!$K$2:$K$250000=$C$4)*('FINAL DATA'!$E$2:$E$250000=$E$4)*( 'FINAL DATA'!$AE$2:$AE$250000)))
)
How can I tell if a given javascript function will work across browsers? For instance, I want to use String.trim() and I see that it works in Firefox, but will it work in all the other major browsers? I imagine there is a good doc online somewhere, but I can't find it.
Windows XP, Python 2.5:
hash('http://stackoverflow.com') Result: 1934711907
Google App Engine (http://shell.appspot.com/):
hash('http://stackoverflow.com') Result: -5768830964305142685
Why is that? How can I have a hash function which will give me same results across different platforms (Windows, Linux, Mac)?
This is too basic I think, but how do both of these work?
return true; // 1
and
return (true); // 2
Similar: sizeof, exit
My guess:
If return was a function, 1 would be
erroneous.
So, return should be a unary
operator that can also take in
brackets... pretty much like unary
minus: -5 and -(5), both are
okay.
Is that what it is - a unary operator?