Hi,
I am new with thesis theme.How can we display category filter or month filter archive vertically in my blog instead of showing in navigation bar using thesis..
I'm implementing a table per subclass design I discussed in a previous question. It's a product database where products can have very different attributes depending on their type, but attributes are fixed for each type and types are not manageable at all. I have a master table that holds common attributes:
product_type
============
product_type_id INT
product_type_name VARCHAR
E.g.:
1 'Magazine'
2 'Web site'
product
=======
product_id INT
product_name VARCHAR
product_type_id INT -> Foreign key to product_type.product_type_id
valid_since DATETIME
valid_to DATETIME
E.g.
1 'Foo Magazine' 1 '1998-12-01' NULL
2 'Bar Weekly Review' 1 '2005-01-01' NULL
3 'E-commerce App' 2 '2009-10-15' NULL
4 'CMS' 2 '2010-02-01' NULL
... and one subtable for each product type:
item_magazine
=============
item_magazine_id INT
title VARCHAR
product_id INT -> Foreign key to product.product_id
issue_number INT
pages INT
copies INT
close_date DATETIME
release_date DATETIME
E.g.
1 'Foo Magazine Regular Issue' 1 89 52 150000 '2010-06-25' '2010-06-31'
2 'Foo Magazine Summer Special' 1 90 60 175000 '2010-07-25' '2010-07-31'
3 'Bar Weekly Review Regular Issue' 2 12 16 20000 '2010-06-01' '2010-06-02'
item_web_site
=============
item_web_site_id INT
name VARCHAR
product_id INT -> Foreign key to product.product_id
bandwidth INT
hits INT
date_from DATETIME
date_to DATETIME
E.g.
1 'The Carpet Store' 3 10 90000 '2010-06-01' NULL
2 'Penauts R Us' 3 20 180000 '2010-08-01' NULL
3 'Springfield Cattle Fair' 4 15 150000 '2010-05-01' '2010-10-31'
Now I want to add some fees that relate to one specific item. Since there are very little subtypes, it's feasible to do this:
fee
===
fee_id INT
fee_description VARCHAR
item_magazine_id INT -> Foreign key to item_magazine.item_magazine_id
item_web_site_id INT -> Foreign key to item_web_site.item_web_site_id
net_price DECIMAL
E.g.:
1 'Front cover' 2 NULL 1999.99
2 'Half page' 2 NULL 500.00
3 'Square banner' NULL 3 790.50
4 'Animation' NULL 3 2000.00
I have tight foreign keys to handle cascaded editions and I presume I can add a constraint so only one of the IDs is NOT NULL.
However, my intuition suggests that it would be cleaner to get rid of the item_WHATEVER_id columns and keep a separate table:
fee_to_item
===========
fee_id INT -> Foreign key to fee.fee_id
product_id INT -> Foreign key to product.product_id
item_id INT -> ???
But I can't figure out how to create foreign keys on item_id since the source table varies depending on product_id. Should I stick to my original idea?
I'm using the following JQUERY to attach an even to a link in the header, which essentially scrolls to the bottom of the page:
$('#comment-count-btn').click(function(){
$('html,body').scrollTo('#comment-wrapper', 500);
});
Problem is, that it scrolls all the way to the bottom of the page (which is correct), but then when I try to scroll up a tad, the scroll bar jumps, as if it's locked for a little bit.
Any ideas?
Here is my problem:
Given x, y, z and ratio where z is known and ratio is known and is a float representing a relative value, I need to find x and y.
I know that:
x / y == ratio
y - x == z
What I'm trying to do is make my own scroll pane and I'm figuring out the scrollbar parameters.
So for example,
If the scrollbar must be able to scroll 100 values (z) and the thumb must consume 80% of the bar (ratio = 0.8) then x would be 400 and y would be 500.
Thanks
I want to create a hierarchy in my wiki like so:
General
FooPages
Foo1
Foo2
Foo3
ODP
Bar
Baz
I would like to create these pages, and use <<toc>> table of contents macros to organize them.
How can I do that? Do I need to clone and edit the wiki on my own machine, or can I do that exclusively through the web interface?
I have a DataGrid and I set the DataProvider to my data. When my data changes the DataGrid loses the selected row and the scroll bar jumps back to the top. How do I maintain the selection and scroll position?
Im a beginner for C# language.So i need a help from who genius from this scheme.i need to add a radio button for menu strip. i already change "clickonclick" property to "true".but i need a option like radio button selection. you can see it from windows calculator menu bar.(click View)
how can i get to it via using menustrip peoperty.
I have some nested datastructures, each something like:
[ ('foo', [ {'a':1, 'b':2},
{'a':3.3, 'b':7} ]),
('bar', [ {'a':4, 'd':'efg', 'e':False} ]) ]
I need to compare these structures, to see if there are any differences. Short of writing a function to explicitly walk the structure, is there an existing library or method of doing this kind of recursive comparison?
CREATE FUNCTION foo() RETURNS text
LANGUAGE plperl
AS $$
return 'foo';
$$;
CREATE FUNCTION foobar() RETURNS text
LANGUAGE plperl
AS $$
return foo() . 'bar';
$$;
I'm trying to compose results using multiple functions, but when i call foobar() i get an empty result.
When I use Server.Transfer the browser keeps the Previous Page on the URL bar. Also, when I try to view the source code of the page, shows the previous page code. I need to see the current page code. Any help?
Thank you
How to stop browser load animation. I use hidden i frames and refresh them very often, and I don't want users to see annoying load animation and progress bar.
Is there a way to show the structure of a javascript class declared using Prototype's Class.create function in the Eclipse outline view?
The declarations look like:
var Foo = Class.create({
bar: function() {
...
},
baz: function() {
...
},
});
At the moment all I get is "Foo:".
(A google search turned up http://marketplace.eclipse.org/content/prototypewtp, but the link to the plugin homepage is dead)
When I submit a form, I can see my browser's progress bar slowly increased, it takes 4-6s to submit a form.
It was a generic form like :
<form id="someid" name="someName" action="someAction.do">
...
</form>
I test it in IE8 and Firefox 3,both are very slow.
My network condition is fine, my server works great.
What could be the problem?
I have a input that the user types a search parameter into, at the moment i have it on keyup to do a POST ajax request to a PHP script that returns search results. however its firing off 50 billion (not literally) post requests in about 10 seconds (as the user types) which slows the whole experience down. Can i use jQuery to detect a "wordup" rather than "keyup" by detecting the use of the space bar?
Does this make sense?
Hi guys,
I have noticed that in most google maps you can not drag the marker icon into your address bar and see or download the icon .png file itself. Rather then you hover your cursor over the marker, you can see javascript:void(0).
How is that achieved? Thanks!
I wanto to match the last occurence of a simple pattern in a string, e.g.
list = re.findall(r"\w+ AAAA \w+", "foo bar AAAA foo2 AAAA bar2)
print "last match: ", list[len(list)-1]
however, if the string is very long, a huge list of matches is generated. Is there a more direct way to match the second occurence of "AAAA" or should I use this workaround?
I know in Jython you can do
import java.util.Random as Random
Random().nextInt()
But if I have a class I wrote myself, how can I import it into Jython without putting the class itself in a package? If I have a testclass Test:
public class Test {
public void foo() {
System.out.println("bar");
}
}
that's not inside a package. Can I even import that into jython by using something along the lines offrom Test import Test?
I have built a class in PHP and I must declare a class variable as an object. Everytime I want to declare an empty object I use:
$var=new stdClass;
But if I use it to declare a class variable as
class foo
{
var $bar=new stdClass;
}
a parse error occurs. Is there a way to do this or must I declare the class variable as an object in the constructor function?
PS: I'm using PHP 4.
In my RCP application, I'm trying to use the Eclipse preferences dialog. I'm adding extensions to the "org.eclipse.ui.preferencePages" and preparing related IWorkbenchPreferencePage implementations.
My preference page names are a bit long, so that they are not totally visible on the left side tree of the preferences dialog. Dragging the sash bar to the right increases the width of this tree, but it is resetted after the program is closed and reopened. Is it possible to increase the default width of this tree?
As the title says, I'm trying to use a class declared in a namespace which contains "base" in its name.
Think of a situation like the following:
open Foo.base.Bar
In C# I'd just use @ before base but F# seems to ignore that and to think that @ is the infix operator used for list concatenation.
Since the namespace belongs to a third-party library which I cannot modify, is there a way I can still access it from F#?
Hi, I need to know how to detect the position of a dragged item as opposed to other divs. I need to detect whether an item is dropped outside of two different divs. (I am building a mac dock type start page and I need to know how to do this so I can delete icons by dragging them off the bar.)
Any help would be greatly appreciated.
Using only keyboard, how can I select non-consecutive options of a multiple select element. On Firefox or Windows explorer, I can simply ctrl+Arrow to move the focus and then space bar to select. But I don't see any way to make it work on IE.
Thanks
When writing a question in Stack Overflow, it will give you a red bar with a warning if the question looks subjective.
Subjective or non-programming questions (e.g., What is your faviourite programming language?) seem to be easily recognized.
How, exactly, isthis done? Heuristics, algorithms, machine learning?
I'm amazed!
Hi,
Is it possible to set multiple properties of an NSManagedObject and have the NSFetchedResultsController call controllerDidChangeContent: only once?
In other words, is it possible to say something like:
[managedObject beginChanges];
[managedObject setPropertyA:@"Foo"];
[managedObject setPropertyB:@"Bar"];
[managedObject commitChanges];
and then have the NSFetchedResultsController call controllerDidChangeContent: (and the other methods) only one time?
Thanks!
hi all i have a question about hiding records in crystal report
and i am using cyrstal report in vs 2008 ,i dont know its version as i am new in crystal reporting
lets say i have report like that
customer_Id customer_name OrderAmount Order_date
0 xyz 5 03/02/2010
1 abc 6 04/02/2010
3 dre 7 07/02/2009
4 kila 3 08/02/2009
i wana ask is there a pssibilty to hide the record if Order_Date year in 2009 and show only the records where Order_date year in 2010
to be like that :
customer_Id customer_name OrderAmount Order_date
0 xyz 5 03/02/2010
1 abc 6 04/02/2010
**note i do need the data of 2009 to make a bar chart for this year
thanks in advance