I need to apply/remove to an input field according to a user's selection in a separate drop down form - but I can't figure out how to target the input's class.
I need to add/remove the 'pageRequired' class from this input:
<input type="text" title="Company Required" name="customfields-tf-2-tf" class="inputclass pageRequired textInput"…
I have the following:
public interface ICartItem
{
string Name { get; set; }
}
public class CartItem : ICartItem
{
public string Name { get; set; }
}
I then create a List and cast it to an interface:
IList<CartItem> items = new List<CartItem>()
{
new CartItem() { Name = "MyItem" }
};
IList<ICartItem>…
I have some form on the website where users can add new pages. I must generate SEO friendly URLs and make this urls unique.
What characters can I display in url, I know that spaces I should convert to undescore:
" "-"_" and before it - underscores to something else, for example:
""-"()"
It is easy make title from url back.
But what…
I have a custom module for displaying all the product details from the database..How i can integrate the votting api for rating each product using fivestar rating
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?
EDIT: Greatest integer function is integer less than or equal to X.
Example:
4.5 = 4
4 = 4
3.2 = 3
3 = 3
What I want to know is 5/3 going to produce a double? Because…
Hi,
I have a class
class foo {
public:
foo();
foo( int );
private:
static const string s;
};
Where is the best place to initialize the string s in the source file?
In my website everybody can send some links to other nice websites.
All links in my database must by unique, but some links are with 'www.' prefix, and some without.
Some ends for '/', some not.
For example:
|http://www.domain.com
|http://domain.com
|http://domain.com
|http://domain.com/
and other problems can be…
I have a bug in my code caused by a premature freeing of a ObjC object. I seem not to be able to find it by just looking at my code.
There's usually a simple trick to track the dealloc to any class: Implement dealloc, and set a breakpoint. This even usually works with standard objects, by subclassing them and making sure I…
I'm trying to build a database of urls(links). I have a Category model that has and belongs to many Links.
Here's the migration I ran:
class CreateLinksCategories < ActiveRecord::Migration
def self.up
create_table :links_categories, :id => false do |t|
t.references :link
t.references :category
end…
We are currently discussing the Best Practice for placing the @Transactional annotations in our code.
Do you place the @Transactional in the DAO classes and/or their methods or is it better to annotate the Service classed which are calling using the DAO objects? Or does it make sense to annotate both "layers"?
Sharepoint's lists functionality is powerful. Because I don't want all the other functionality of Sharepoint, I have been looking for an alternative (preferrable open source) without much success.
Basically I want to have a platform or web application that:
allows us to define custom datatypes (for different kinds of…
How do I find the MAC address of a network card on IRIX? I'd rather not shell out to something that displays it and parse the output.
I'm coding C.
Methods that require root access are acceptable.
In a small Ruby application, I'd like user input to be accepted without having to wait for a carriage return. My understanding is that cbreak mode needs to be enabled in order for the terminal to feed user input directly into the script.
I tried simply running x%[cbreak()] at the top of my script but that didn't work.…
Usually, when a View requires a lot of bindings, or some UI Elements like a Bing Map, it takes a "while" to load (like between half a second and a second).
I don't want a delay between a "tap" action (like tapping an element on a ListBox) and the navigation action (displaying a new page).
I don't mind displaying the…
suppose i have div and i want to fetch data and push data into that div. when user will drag scroll bar of div then next set of data will be fetch and pushed into div. how to detect when scroll bar of div drag to end by jquery. i don't want to use any plugin rather i need jquery code. here is the sample link i like it…
We unfortunately find ourselves having to support our product in IE 6 because some of our largest users use it. One of them called today and told me that one of the dropdowns doesn't work when he clicks on it - it simply selects the first item.
I checked the markup and the entire contents of the select control are…
I have some structure in Python:
gender=( ('0','woman'), ('1','man') )
I want translate it before I will display it in Django template.
Unfortunatelly below sollution don't work:
from django.utils.translation import
ugettext_lazy as _
gender=( ('0',('woman')),
('1',('man')) )
What I must do to…
A table can only store 10 records in a particular state, 10 users over 30 years for example, the others must be less than 30 years. It is a business rule and as such should be respected. How to ensure that state? Think: multiple users accessing this table.
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?
Hi,
I am writing a function that takes a string, string pointer and an int.
The function splits the string based on a set of rules and puts each token into an array. I need to return the array out of the function with the number of elements in the int variable etc. I am stuck as to how I return the array as I can…
I was looking at this posting: Android: How to get screen dimensions when I was trying to determine the size of the device's screen while in a fragment class. One answer was close to what I needed but the only code that ended up working for me was:
WindowManager wm = (WindowManager)…
I like to display textView when there are no items in the listView whereas the textView will not display when there are items in the listView. My problem is even there are items in the listView, the textView still will be displayed in a short time and then load the items into listView.…