Hi. Suppose stackoverflow.com wanted to have an RSS feed per each tag. They would probably have requests like stackoverflow.com/rss?tag=aspnet to return appropriate RSS feeds. This is the easy part.
Now when the user requested stackoverflow.com/rss?tag=aspnet he would see some XML. Instead it would be better to show a page where user can choose which RSS reader he wants to subscribe with (just like feedburner.com).
My question is: is there any ready-made code (html+javascript) that I can copy-paste to create such a subscription page? Basically I want to copy feedburner.com's subscription page onto my own site.
PS - I would be happy using feedburner.com, but it would require me to create a feed for each tag manually, which is impractical.
Hi i'm using this for getting data:
Topic.find(:all, :include => ...,
:conditions => @core ? ["cores_topics.id = ? AND visible = 1 AND (distance < ? OR cores.id IN (?))",@core.id, @user_location[3].to_i, @user_friends] :
["visible = 1 AND (distance < ? OR cores.id IN (?))", @user_location[3].to_i, @user_friends],
...
how can i rewrite the conditions shorter?
thanks
Hi,
I have a .net 1.1 ASP application (domain.com) which has a .net 2 virtual directory (domain.com/v2) beneath it, both applications run within their own app pool on the same machine running IIS 6. The web.config files for both apps are setup for Forms Authentication as described here - http://msdn.microsoft.com/en-us/library/eb0zx8fc(v=VS.80).aspx.
Users would be directed to the domain.com/v2/login.aspx page which would authenticate for both applications, this configuration has been working fine for the last few years until installing one of the recent Windows 2003 security updates today. Now after authenticating under /v2 users keep getting redirected back to domain.com/v2/Login.aspx as domain.com doesnt see them as authenticated anymore.
Any ideas as to which security update would have caused this and if its possible to rollback?
I've looked at a few suggestions on this (e.g. Cross app on subdomain form authentication not working) and other sites but no luck so far
Any help would be appreciated.
Thanks
hello!
i have a little problem...
on win xp, if i write on commandline
shutdown -t 00 -r -f
the reboot works fine.
but if i paste it, as is, in a bat file...the prompt show me an infinite loop.
anyone can say me why?
thanks a lot for any suggestion :)
I have this linq query:
var segreterie = from s in db.USR_Utenti join h in db.USR_Accounts
on new {s.ID, settings.GruppoSegreteria}
equals new {h.USR_UtentiReference,h.ID_Gruppo} select s;
that has this problem:
The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'.
how can i do to solve it?
This query generates an error because table2 doesn't exist:
Select * FROM table WHERE table2.id IS NOT NULL
Is there anything like this for check the table2 before apply the check on the id?
Select * FROM table WHERE (EXIST(table2) AND table2.id IS NOT NULL) or not EXIST(table2)
Thanks
I'd like to know if is there a way to "skin" a Form and every widget used inside it. Images should be on background and other elements shall be setup accordingly.
In short, a way to implement a way to display the same Form in different flavors (i.e.: theme and eyecandy UI).
Hi all,
I have a Sites table that has columns name, and time. The name does not have to be unique. So for example I may have the entries 'hi.com, 5', 'hi.com, 10', 'bye.com, 4'.
I would like to sum up all the unique sites so that i get 'hi.com, 15' and 'bye.com, 4' for plotting purposes. How can I do that?
(For some reference I was looking at http://railscasts.com/episodes/223-charts but I couldn't get the following (translated to my table) to work
def self.total_on(date)
where("date(purchased_at) = ?", date).sum(:total_price)
end
nor do I really understand the syntax of the 'where("date(purchased_at) = ?", date)' part.
Thanks for helping a rails newbie!
hi, i have 2 object: user, group that have a relationship many to many
i want create a user and associate some groups to it.
How can i do it?
thanks
I've tried with this. but it's wrong:
user = new User();
List<int> gruppi = new List<int>() {1,2};
utente.Group =db.Group.Where(p => gruppi.Contains(p.GruppoID)
Hi! I Created a grouped table view, and I noticed that placing an image in the imageView results in an image that is too large. It overlaps the rounded borders of the cell, which is horrible. I tried looking for a way to resize it, but I found many answers that didn't quite satisfy me. How would you do this? Which is the simplest way to go? The solutions I found where strangely complicated.
Thanks!
I would like to change the value of a textarea when hovering over a link. I am not very proficient at javascript and do not quite understand the intricacies of 'this.' and 'document.' etc..
Currently I have a textarea 'info' that on page load is unpopulated and two links that should change its value. I can not seem to get it to work..
<textarea name="info"></textarea>
<a href="foo.com" onmouseover="document.info.value='foo.com is a great site'">Foo.com</a>
<a href="bar.com" onmouseover="document.info.value='bar.com is a terrible site'">Bar.com</a>
I'm sure there is a way to accomplish what I need to do but I can't find it.
Thanks in advance.
My class inherit from UITableViewCell, i have make some custom transitions to push a new detail view when an image get selected.
[UIView transitionWithView:self.masterView duration:0.5 options:UIViewAnimationOptionShowHideTransitionViews
animations:^ {
[self.masterView addSubview:self.detailImage];
}
completion:nil];
My code works fine, the detailImage subview is shown with a transition, but this transition is not what i want exactly. What i want to perform is a simple transition from bottom to up. The list of UIViewAnimation doesn't contain such animation.
Is there any way to use that transition without changing my class inheritance to UINavigationController ?
My URLs
http://www.mysite.com/folder1/page1.aspx
http://www.mysite.com/folder1/page1.aspx?id=1
http://www.mysite.com/folder1/page1.aspx?id=1&dt=20111128
Redirecting Page
http://www.mysite.com/folder1/page2.aspx
I want to redirect from page1.aspx to page2.aspx
How to write a javascript in page1.aspx?
window.location.replace("/page2.aspx");
window.location.replace("../page2.aspx");
window.location.replace("~/page2.aspx");
First 2 gave me this.
http://www.mysite.com/page2.aspx
Last 1 gave me this.
http://www.mysite.com/folder1/~/page2.aspx
What is the correct way to use?
Let's say I have a page, http://mydomain.com/mypage.html, with a "Back to page" link. This link should take the user back to the page where they came from only if the previous page URL matches one of the following: http://mydomain.com/one.html, http://mydomain.com/two.html, and http://mydomain.com/three.html. Otherwise, it would take the user back to the homepage, http://mydomain.com. I would like the "Back to page" link to also take the user back to the homepage when http://mydomain.com/mypage.html is pasted onto the browser. How can i accomplish this with Javascript. Thanks!
Is it possible to have a conditional installation configuration, slaved wth the Visual Studio configuration environment?
For example, selecting DEBUG or RELEASE configuration, Wix selects different executables in the built installation.
I have an XML feed that looks something like this (excerpt):
<channel>
<title>Channel Name</title>
<link>Link to the channel</link>
<item>
<title>Heading 1</title>
<link>http://www.somelink.com?id=100</link>
<description><![CDATA[ Text here ]]></description>
<publishDate>Fri, 03 Apr 2009 10:00:00</publishDate>
<guid>http://www.somelink.com/read-story-100</guid>
<category domain="http://www.somelink.com/?category=4">Category 1</category>
</item>
<item>
<title>Heading 2</title>
<link>http://www.somelink.com?id=110</link>
<description><![CDATA[ Text here ]]></description>
<publishDate>Fri, 03 Apr 2009 11:00:00</publishDate>
<guid>http://www.somelink.com/read-story-110</guid>
<category domain="http://www.somelink.com/?category=4">Category 1</category>
</item>
<channel>
That's the rough of it. I'm using this piece of PHP (excerpt):
$xml = simple_xml_load_file($xmlFile);
$xml->xpath($pattern);
Now I want to get all ITEM-nodes (with their children) based on that pesky "domain" attribute in the category node, but no matter what I try it does-not-work.
The closest I got was "//category[@domain= 'http://www.somelink.com/?category=4']"
The expression I tried gave me this result:
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.somelink.com/?category=4
)
[0] => Category 1
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.somelink.com/?category=4
)
[0] => Category 1
The expression should contain all childrens of the two items in the example, but as you can see only the info in the category node is present, I want all the item nodes.
Any help would be highly appreciated.
I have a subdomain m.example.com that I want to point to the same location as example.com/mobile running on an apache2/django1.3 installation.
example.com is the landing page, and I have the urls.py configured such that urls that match /^mobile$/ will be served the mobile version of the page. I looked into <VirtualHost>, but I think it requires a physical location for me to point m.example.com at and with the django urls there is no physical location except for the root of the project directory.
I am unsure if the configuration change is made on the apache side or the django side.
I've also looked into the mod_rewrite module for Apache, but I would prefer if I didnt have to redirect m.example.com to example.com/mobile
Hi, i have a table like this:
Table(MissioneID, Type)
Type can be 1,2 or 3
i have to count missions by type value:
ex. if table's content is:
MissioneID Type
1,1
1,2
1,1
2,3
1,2
The result of query is
MissioneID,Count1,Count2,Count3
1, 2,2,0
2,0,0,1
How can i do?
thanks
hi! :)
anyone know if is possible to reproduce this effect
background-image: -moz-linear-gradient(top, #666666, #000000);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #666666));
also on ff < 3.6?
im tryin' to generate a gradient background without images!
thanks a lot in advance for any advice.
I'm interested to know your opinion on why Apple uses a language such as Objective-C for app development. Does Apple's app store allow apps written only in this language? Does apple even look at your source-code or does it just care of the binary output?
I learned that most of their app rejection (in the app store) is based upon apps crashing (probably memory leaks in which Objective-c is not very efficient unless you use a GC).
Why not let developers use a safer language, like a scripting language?
I think these are important questions for a developer (I don't even use Apple's products) because it seems like Apple's app store is the MOST successful app sale place on the web.
1- Does mod_rewrite means that if I make this url:
domain.com/ad.php?id=8498292
INTO
domain.com/8498292
that all links on my website will have to be changed to the later above?
example the link: domain.com/ad.php?id=8498292 wont work now, unless I replace it with domain.com/8498292 ?
Or will the server know that they are the same still?
2- Will the rewritten link appear rewritten in the browsers adress bars also, so if I enter domain.com/ad.php?id=8498292 it will actually appear as domain.com/8498292 in the adress bar itself?
3- Will images and all other related links and material on the page whose link is rewritten remain intact? ie will pictures and links still work FROM that page which are relative?
Thanks
I have a folder on my server that I'd like to copy to another directory. However, after I copy it and navigate to the new folder, some of the directories are RED and I can't navigate into them. I think this has something to do with them creating links instead of actually copying the folders.
cp -a site2.com/httpdocs site1.com/httpdocs
But then some of the sub folders from site2.com/httpdocs are setup as invalid links into site1.com/httpdocs and I cannot navigate to them nor can the webserver display them.
Additionally, I have a permissions error where the copied files have their user set to site2.com but even after CHOWN I cannot get site1.com to display them.