iam using ruby on rails
i have models
-category
-subcategory
-city
-firm
when i click on category it will show sub categories and permalink should be: xxx.com/category
when i click subcategory it will show firms and city names. xxx.xom/category/subcategory
when i clikc on city name it will filter firms belongs to that city…
How to dynamically create urls/links like:
www.restaurant.com/restaurant/restaurant-name-without-some-characters-like-space-coma-etc/132
what are the keywords i can use to google some articles on this topic? (how to genererate and handle this kind of urls inside asp.net mvc)
There are some questions:
How to generate links?…
Hello,
I think this script is of big interest to any noob around here :) including me :)
What I want to create is a little code that I can use in any file and will generate a breadcrumb like this:
If the file is called "website.com/templates/index.php" the breadcrumb should show:
Website.com Templates
^^ link …
First off i know the multiplying part is wrong but i have some questions about the code.
1. When i am overloading my operator+ i print out the matrix using cout << *this then right after i return *this and when i do a+b on matix a and matix b it doesnt give me the same thing this is very confusing.
2. When i make…
Following code always fails
URL url = new URL("http://userserve-ak.last.fm/serve/126/8636005.jpg");
Image img = ImageIO.read(url);
System.out.println(img);
I've manually checked the url, and it is valid, and contains a valid jpg image.
The problem I get is;
Exception in thread "main"…
Hi
I load my self-made webuser controls dynamically. A user chooses a template and depending on that template I load some self-made webuser controls (.ascx) that are defined in a sql server database. When the user fills in the TextBoxes and clicks on the submit button, the entries in the TextBoxes…
I would like to create a non-VBA based solution to the following question:
How do I create a multi-series chart that will allow a user to select from a dropdown to change the data being graphed? I can do this already when the data series is contiguous; however, I'd like to be able to do it for…
My site was under example.com/waha/
Now I move the site right under the root example.com
I want to 301 redirect all the old links like example.com/waha/notice/5803 to example.com/notice/5803
How can I do it?
My current .htaccess file is below.
<IfModule mod_rewrite.c>
RewriteEngine…
Hello,
I am trying to make my site look more professional by removing the html endings from the pages..
ex. just leaving at http://33tpm.com/es/tienda
All the answers Ive found so far are so confusing that I don't really understand anything..
Can someone please help me out?
Thank you …
Apache web hosts have a user-configurable ~/.htaccess file that allows local redirects, for example, www.awesomesite.com = www.awesomesite.com/launchmyawesomeapp.cgi
In lighttpd I know there is a global /etc/lighttpd.conf file, but is there something local like the Apache htaccess file?
…
If I have a parent-child that defines some method .foo() like this:
class Parent {
public void foo(Parent arg) {
System.out.println("foo in Function");
}
}
class Child extends Parent {
public void foo(Child arg) {
System.out.println("foo in ChildFunction");
}
}
When…
I am trying to insert a user control dynamically into my default.aspx page via the following method in the page_init:
Dim control As UserControl = LoadControl("~\Modules\Content.ascx")
Controls.Add(control)
When I run the page there is no sign of the usercontrol.
Am I…
I am trying to see a list of tables from Adventureworks DB from "Person" schema in Sql Server 2008. I developed teh following SP, but after running it as follows it gives me error "Incorrect syntax near ')'". Do you know how I can revise this SP or exec statement?
CREATE PROCEDURE…
I'm attempting to setup a retweet button with some pre-written post text.
However I need to place a pound sign in like so:
£50k
I've search the web and for the UK currency sign I've been told it is supposed to be replaced with the code: %a3
However when I attempt to click on the…
DROP PROCEDURE IF EXISTS HaveSomeFun;
CREATE PROCEDURE HaveSomeFun(user_id CHAR(50),house_id CHAR(50),room_id CHAR(50),fun_text TEXT,video_url CHAR(100))
BEGIN
DECLARE query_full TEXT;
SET @fields_part = 'INSERT INTO fun(FunKey,UserKey,FunBody,LastModified';
SET @values_part =…
I have a website in three languages with a directory for each: i.e. /en-US/, /de-DE/ and /fr-FR/. I would like the web server to use the browser's accept-language string to return content in the language of the user.
Examples:
(a) "pl-PL;fr-FR;en-US" should redirect to /fr-FR/.…
Hey all,
I'm looking for some ANTLR examples, I tried googling a bit but I found certain things which didn't fit my requirments. I found the Mantra project, but it's statically typed and is 'too' big for me at this moment, then I found 'pie' as interpreter, which is dynamically…
I'm building a user content parser and am adding an automatic link parser. I'm adding a dialogue, that confirms that the user wants to go to the particular site being linked to. This is for two reasons. Anti phishing and spam combating. However I want to be able to disable both…
I want to do something like that:
for (v=1;v=150;v++) {
for (h=1; h=250;v++) {
tile_0%i_0%i.image = [UIImage imageWithData:tmp_content_of_tile]; //1st %i = v; 2nd %i = h
}
}
In the %i should be inserted the current value of "v" or "h"? Is it…
I'm trying to write a rule to make that one can generalize, since multiple pages to pass the values are different. Right now I could do:
RewriteRule ^forum/([^/]{1,255})/([\+]{1})/((([a-z]+)([_]{1})([a-zA-Z0-9]+)([/]?))+)$ forum.php?name=$1&$5=$7 [L]
To address such…
Hello,
I got this code from someone and it works very well, I just want to remove the link from the last element of the array:
//get rid of empty parts
$crumbs = array_filter($crumbs);
$result = array();
$path = '';
foreach($crumbs as $crumb){
$path .= '/' . $crumb;
…
hello
I'm working with .NETCF framwork in c#, and I want to know if I can access the controls somehow like this:
string field="txtName";
this.Controls[field];
or is this impossibile?
I have a problem here, when I select any of the 'father' checkboxes all the child checkboxes are getting enabled or disabled. So I need each father checkbox to affect it own child fieldset. Could someone help me with this.
Thank you
<!DOCTYPE HTML PUBLIC "-//W3C//DTD…
Hi everyone,
I'm implementing a Logger, based on a XML declaration (path to class, method name, custom log message). There is also a Logger interface that defines the function __call, the latter logs what's needed and then relays the call to the target method.
The only…