I'm trying to create a custom route like:search/result/city/p1/state/p2/zip/p3/min/p4/max/p5/bed/p6/bath/p7/cats/p8/dogs/p9/parking/p10 Where search is the controller and result the action p1-p10 are variables.
I'm trying to move all my compilation config (compilation-command and compilation-directory to be exact) to .dir-locals.el file at the top of my project. It is working fine except that I can't find the way to use expand-file-name there and without it I have to use absolute path, which is not really convenient.
So, is there a way (or a dirty hack) to make local directory variables to evaluate values before assigning?
I am using textInput within grid using rendrer. I am populating a suggestion box just below the text input field on the basis of typed character and index of text input.Problem is that if i shrink grid column then suggestion box is not populating at the right place so I want global position of cursor in the text input field .
For a new scalable high traffic global ecommerce website (asp.net) project which technology fits best (max. scalability & performance, min. price & maintenance)?
amazon simpledb, microsoft sql azure, mysql + memcached combo, or your solution...
Problem
String concatenation is slowing down a query:
date(extract(YEAR FROM m.taken)||'-1-1') d1,
date(extract(YEAR FROM m.taken)||'-1-31') d2
This is realized in code as part of a string, which follows (where the p_ variables are integers):
date(extract(YEAR FROM m.taken)||''-'||p_month1||'-'||p_day1||''') d1,
date(extract(YEAR FROM m.taken)||''-'||p_month2||'-'||p_day2||''') d2
This part of the query runs in 3.2 seconds with the dates, and 1.5 seconds without, leading me to believe there is ample room for improvement.
Question
What is a better way to create the date (presumably without concatenation)?
Many thanks!
Is there any way to override the setting of instance variables in Ruby?
Lets say I set an instance variable:
@foo = "bar"
Can I intercept that and do something (like record it or puts, for instance)
I have two variables:
char charTime[] = "TIME";
char buf[] = "SOMETHINGELSE";
I want to check if these two are equal... using charTime == buf doesn't work.
What should I use, and can someone explain why using == doesn't work?
Would this action be different in C and C++?
I'm an Android Developer and as part of my next app I will need to evaluate a large variety of user created mathematical expressions and equations. I am looking for a good java library that is lightweight and can evaluate mathematical expressions using user defined variables and constants, trig and exponential functions, etc.
I've looked around and Jep seems to be popular, but I would like to hear more suggestions, especially from people who have used these libraries before.
How do I stop BP from overriding default parameters passed to the template loop?
For example, on the Activity page, let's say you want BP to "forget" the user's last viewed parameter (like "My Forums" or "@user Mentions") and go right back to All Members or My Friends every time you reload the page.
I tried deleting the contents of ajax.php and global.js, and the overriding behavior still happens. Where do I look next?
Is there way to find out if Java is running on a platform which supports windowing of any kind? I know that you could possibly figure it out by reading in the environment variables, but that might prove to be rather difficult with all the possible combinations.
I have the following code:
$query = "select * from customer where Surname like \"%$trimmed%\" OR TitleName like \"%$trimmed%\" OR PostCode like \"%$trimmed%\"
order by Surname";
However, I have another table which I want to search from with the same paramaters(variables) as that. I know that something like "select * from customer,othertable" might not be possible, Is there a way to do it?
Hi Experts,
Can I override an ActionResult method. Say I have a method Index in AccountController like this
public ActionResult Index()
{
return View();
}
Can I have one more method with same name but with differnt parameters
like
public ActionResult Index(int userid)
{
return View();
}
what will be the entries in the global.asax
Regards
Parminder
Where have you mostly used the initialization block?
Can you use these to assign values to static instance variables?
How is this different from assigning using a constructor?
My book says that the initialization block is executed when the "class is loaded". What does loading a class mean?
R has a useful function pairs that provides nice matrix of plots of pairwise connections between variables in a data set. The resulting plot looks similar to the following figure, copied from this blog post:
Is there any ready to use function based on python's matplolib? I have searched its gallery, but couldn't find anything that resembles what I need. Technically, this should be a simple task, but proper handling of all the possible cases, labels, titles, etc is very tedious.
I have a routing setting in my global.asax file:
routes.MapPageRoute("video-browse", "video/{id}/{title}/", "~/routeVideo.aspx");
My routeVideo.aspx page has caching setting:
<%@ OutputCache Duration="10" Location="ServerAndClient" VaryByParam="id" %>
But when I request http://localhost/video/6/example1 and http://localhost/video/6/example2 after this, the page is created again. So I think VaryByParam works for * but I only want compile when id changes. Is there a way to define routing parameters at VaryByParam?
Hi,
I have a php script that inserts values into mySQL table
INSERT INTO stories (title) VALUES('$_REQUEST[title]);
I checked the values of my request variables before going into the table and it's fine.
But when I add title=john to the table for example,
I get something like this:
title = "[][][][]john"
and when I extract the value, it's a newline then john.
I have my columns set to utf-8, I tried swedish character set as well.
Note: I don't get this error when inserting values from the phpMyAdmin commandline
I'm trying to write some code in bash which uses introspection to select the appropriate function to call.
Determining the candidates requires knowing which functions are defined. It's easy to list defined variables in bash using only parameter expansion:
$ prefix_foo="one"
$ prefix_bar="two"
$ echo "${!prefix_*}"
prefix_bar prefix_foo
However, doing this for functions appears to require filtering the output of set -- a much more haphazard approach.
Is there a Right Way?
Why cant we have static method in an inner class but can have static final members?
Can we access static final member variables of inner class outside the outer class without instantiating inner class ?
I'm using PayPal Website Payments Standard. Whenever the user lands on PayPal with the variables I sent, it shows a PayPal Login form and at the bottom it shows "Don't have a PayPal account? Use your credit card or bank account (where available)."
I want it to default to always ask for credit card and maybe say "Have PayPal? Use that!". Any ideas?
I need to display text along with values of variables in a CEdit controlled Edit Control Box. How do I do it ? Currently I'm using SetWindowText(), but that only takes a string...how do I get a formatted string to display in the edit control?
Example: printf("The answer is %d\n",ans) - how do i print the same message in a Edit Control?
Hi, I am using Latex letter class, and would like the address to be right justified.
The default is for it to be in a right aligned block, justified to the left. I am happy to change the letter.cls file, but haven't been able to figure out the right way to do it.
I have tried using sclttr2 instead but there are too many variables for me.
Thanks!
In Visual Studio debug mode it's possible to hover over variables to show their value and then right-click to "Copy", "Copy Expression" or "Copy Value".
In case the variable is an object and not just a basic type, there's a + sign to expand and explore the object. It there a way to copy all that into the clipboard?
When implementing a microsoft.build.utilities.task how to i get access to the various environmental variables of the build?
For example "TargetPath"
I know i can pass it in as part of the task XML
<MyTask TargetPath="$(TargetPath)" />
But i don't want to force the consumer of the task to have to do that if I can access the variable in code.
http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.task.aspx
I've got some text which needs converting to use HTML entities, but it also contains tags. Here's a sample:
<p>Ofcom issued the warning to Global-owned GWR in Bristol – which is required to operate as a "contemporary and chart music and information station" – for operating outside the music </p>
The (" and -) need to be converted but the paragraph tags must remain HTML. Using something like htmlentities converts everything, how can I convert everything but the tags?
Consider I have an enum, which I have coded today. What are the possible ways to extend its functionality, or perhaps add more variables to it, on a later date?
Will partial enums do the trick?