I'm doing custom-rolled view tracking on my website, and I just realize that I totally forgot about search bots hitting the pages. How do I filter out that traffic from my view tracking?
Basically I'd like to make a Dictionary work with duplicate keys without going into custom comparer implementations. There is an idea of:
Dictionary<key, List<value>>
but it still has some overhead. I wish Dictionary had "AllowDuplicates".
I want to add some custom javascript functions to my design document, I can't find any examples of how to actually add these functions to the "lib" section of a design document. Can someone show me an example of how to add a function definition to the "lib" section?
As an ASP.NET developer, I'm used to working with how VS/C# transparently autogens proxy classes for web references (yes, I know, we're spoiled), but now that I'm creating documentation for more than one coding platform I'm trying to discover what the equivelant to that is in any other framework.
So is there a similar way to work transparently with web reference proxy classes for say, RoR, PHP, and Python?
And if there's nothing integrated, are there tools you recommend to autogen the proxy classes, or do you recommend to roll custom classes?
I have a custom tableviewcell with a label and a textfield. Right now if I click on the cell to exit the textfield, it only focuses on it if I click within the bounds of the textfield. Is there a way for me to click anywhere in the cell and immediately have it focus on the textfield?
Thanks
I was wondering if there is a way to do an effect similar to this, except that instead of using images, I would use custom divs? I tried, replacing the img tag in that page to a div tag but it stops working. Any suggestions?
Hi,
I have created a user control ( custom data grid view control). I have used the code specified at MSDN [site][1]
[1]: http://support.microsoft.com/kb/316574 to set the border style .
I am able to see the selected border style in designer. Like None, FixedSingle or Fixed3D.
But when I set the border style to FixedSingle, the border does not appear at runtime. Do I need to draw it manually in the OnPaint method?
Have a product that belongs to a category. Want to create a promotion for a short period of time (lets say a week or two), but their can be only one promotion per category during that time.
How can I create a custom validation for this?
product class
belongs_to :categories
name:string
desc:text
reg_price:decimal
category_id:integer
promo_active:boolean
promo_price:decimal
promo_start:datetime
promo_end:datetime
end
category class
has_many :products
name:string
end
Hi All
I have a custom query in dripal, this query is:
select count(distinct B.src)
from node A, url_alias B
where concat('node/',A.nid)= B.src;
now, nid in node is primary key and i have made src as an index in url_alias table.
after waiting for more than a minute i got this:
+-----------------------+
| count(distinct B.src) |
+-----------------------+
| 325715 |
+-----------------------+
1 row in set (1 min 24.37 sec)
now my question is: why did this query take this long, and how to optimize it??
Thanks for your help
Hi all,
Currently I'm stuck on this problem of showing multiple lines of subtitles on a map annotation callout. I've found some tutorials that provides a custom callout, however, I'd prefer to use the default callout view, but with multiple subtitles (2 lines of subtitles, for example). Thanks in advance!
Hi Guys,
How do you specify a custom view script for a given Controller Action method?
For example:
Class UserGalleryController extends Zend_Controller_Action
{
public function fooAction()
{
$this->view->actionMsg = 'foo';
// (uses foo.phtml automagically)
}
public function barAction()
{
$this->view->actionMsg = 'bar';
//use foo's view script ?????
}
}
I basically want to have one view script (foo.phtml)
Thanks :-)
I am going to develop an Iphone application which will parse the RSS feeds and display the items in my custom cell.(Cell containing the image, label, description, etc).
Can somebody please help me?I would be sooo happy if somebody can help me!! Thanks so much!
My application is a dotnet 4 hybrid - MVC in some areas, web forms in others. This application was recently upgraded to dotnet 4 and includes a lot of older code and some mismatched parts. Unfortunately it includes a telerik component that requires me to run the Application pool in classic mode.
In order to fix this (in IIS7) I have to add a handler mapping to the IIS configuration. This mapping is basically a wildcard mapping that points the wildcard path "*" to the %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll.
The problem I am running into is this: For some reason this mapping gets dropped when deploying the site. So, can I add the functionality of this mapping to the web config? If so, How?
Or is there another solution to make this manually added mapping "sticky" so that it remains in place during and after a deployment? (I am also asking this on StackOverflow, as I'm not sure if this should be a coding question or a Server question)
I'm moving my application from 3.x to 4.x as I prepare for the app store and found that I need to have 2 copies of all my custom pngs - my question is how can I determine what img to show and when. Example - how do I know to show the Find.png vs the [email protected]
Is it "safe" or "correct" to look for 4.x specific apis or does the iphone have a way to determine what platform you are on at runtime?
Thank you in advance
In our oroject we already have a lots of tables (100+). Some of them contains a lot of columns (50-100) and we are facing the need of adding more columns from time to time.
What do you think is best - from maintenance and performance point of view - to split these huge tables in smaller entities or to keep the tables the way they are ?
We are using an ORM tools, so we don't need to write custom request.
We used to be a Coldfusion development shop before hopping over to PHP in 2008, now we primarily develop custom Drupal websites.
I enjoyed going from CF to PHP, but I feel like I am getting a bit stale.
I have been looking at different things like Ruby, Python, Obj C (iPhone). The problem is, there just isn't enough time in the day.
What would be a fun new thing to learn that would refresh me a bit and challenge myself to learn more?
Hi, how do most of antivirus software block file system io in case of an infected file? I suppose all the magic resides in some custom kext to do that. Can anyone point me to some topics on this? Some working example would also be great. I've read apple docs about kext development, but mostly it's all about hardware drivers and i could not find what i need.
Thanx.
As an ASP.NET developer, I'm used to working with how VS/C# transparently autogens proxy classes for web references (yes, I know, we're spoiled), but now that I'm creating documentation for more than one coding platform I'm trying to discover what the equivelant to that is in any other framework.
So is there a similar way to work transparently with web reference proxy classes for say, RoR, PHP, and Python?
And if there's nothing integrated, are there tools you recommend to autogen the proxy classes, or do you recommend to roll custom classes?
I've got a custom colour set in Visual Studio and one of the colours when debugging is making things a bit of a misery. Unfortunately I can't figure out which one it is, and when going through and changing all the light background ones, it still remains.
Can anyone point me in the right direction? In this screenshot the current line is yellow, and the caller is the white/cream sort of colour which is the one I want to change...
Thanks very much! :)
Is there an easier/better way to access the RequestContext from within a custom Membership Provider than the following (and further, will this method even work):
private static RequestContext GetRequestContext()
{
HttpContextBase contextBase =
new HttpContextWrapper(HttpContext.Current);
return new RequestContext(
contextBase,
RouteTable.Routes.GetRouteData(contextBase));
}
I have the following problem:
I make a custom hosts file to test some features of my application and then push it to my android emulator.
The thing is that these settings do not take effect immediately. I have to wait about 10 minutes before they become active.
So my question is: how to make the new hosts file active instantly? I have many different settings to test and I can't wait 10 minutes every time.
I'm currently putting the finishing touches to an application for a client, this application sends daily emails to subscribers, is it possible to add custom headers to the email so that certain variables can be tracked, like day number (X-Day-Number) etc...
is there a way to make mod_rewrite redirect all urls contain the following request:
?do=page&f=*
to a specific page? for example:
http://example.com/index.php?do=page&f=2
http://example.com/index2.php?do=page&f=4
http://example.com/page.php?do=page&f=22
to:
http://example.com/custom.php
I've added a class for the HTML Custom Extensions:
using System;
using System.Linq.Expressions;
using System.Text;
using System.Web.Mvc;
using System.Web.Mvc.Html;
namespace App.MvcHtmlHelpers
{
public static class HtmlHelperExtensions
{
public static MvcHtmlString ComboBox(HtmlHelper html, string name, SelectList items, string selectedValue)
{
var sb = new StringBuilder();
sb.Append(html.DropDownList(name + "_hidden", items, new { @style = "width: 200px;", @onchange = "$('input#" + name + "').val($(this).val());" }));
sb.Append(html.TextBox(name, selectedValue, new { @style = "margin-left: -199px; width: 179px; height: 1.2em; border: 0;" }));
return MvcHtmlString.Create(sb.ToString());
}
public static MvcHtmlString ComboBoxFor<TModel, TProperty>(HtmlHelper<TModel> html, Expression<Func<TModel, TProperty>> expression, SelectList items)
{
var me = (MemberExpression)expression.Body;
var name = me.Member.Name;
var sb = new StringBuilder();
sb.Append(html.DropDownList(name + "_hidden", items, new { @style = "width: 200px;", @onchange = "$('input#" + name + "').val($(this).val());" }));
sb.Append(html.TextBoxFor(expression, new { @style = "margin-left: -199px; width: 179px; height: 1.2em; border: 0;" }));
return MvcHtmlString.Create(sb.ToString());
}
I've also registered it in my site web config:
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
<add namespace="App.MvcHtmlHelpers"/>
</namespaces>
In my view, I import the namespace:
<%@ Import Namespace="RSPWebApp.MvcHtmlHelpers" %>
But when I go to call it in the view, it doesn't recognize the custom extension. Can someone help me by telling me what I might have missed? Thanks so much in advance!
<%:Html.ComboBoxFor(a => a.Street2, streetAddressListItems) %
I know how to add to clipboard with JavaScript, but what I want now is TechCrunch clipboard trick;
when someone copies some text ( ctrl+c, right click copy, clicking on a copy link on-site ), additional text is added to the clipboard ( like "this text was copied from ... ).
I know they use Tynt, but don't really know is this a feature you get with it or custom coded?