|
Question regarding how to setup dbase relationships (newbie, this may be trivial)
Followed the django tutorial (Poll, Choices); understood that 1 Poll has many Choice(s), therefore many Choice(s) point to a single Poll.
class Poll(models.Model): question...
Started by jd on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Basically, you store both the type and id of the person/place object on the PhoneNumber object. .
Also here
check ContenType app, and specifically Generic Relations.
I think you're looking for Generic Relations.
|
|
I have the following (returning two separate result sets) being successfully executed from a proc but cannot do the same when executing this as a basic query.
SELECT * FROM persons; SELECT * FROM addresses;
Possible? What's the syntax?
EDIT:
I am using...
Started by Mario on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If the two queries aren't related, why would you want them together?
are you talking about from the mysql cli? works fine for... .
JOIN persons and addresses, and you can get a big result table, assuming addresses correlates to persons with some identifier .
|
|
What is considered the best way of enabling or disabling multiple controls in Silverlight at the same time (textbox, combobox, autocompletebox and the like)?
I suppose I could bind the "IsEnabled" property of each control to a boolean property. That property...
Started by Traples on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
All control-related data logic....
(Just to separate concerns)
Recently we had to reset all controls on the form and didn't want to loop through every single control .
Usually I always create a ControlHandler Class that does all the updates on my controls .
|
Ask your Facebook Friends
|
Hi,
I have multiple reports that take the same parameters.
Need to create a master report with all the reports merged together. I dont want to copy paste the rdlc files into one large file.
found a control by Telerik called ReportBook but it costs money...
Started by Yash on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It is a little complicated to....
Like you suggested, you can purchase the module from Telerik, or another company - or - you could write something that will handle this for you .
The functionality doesn't exist in the base Microsoft Report Viewer control .
|
|
Hi,
I have a python script, which is executing again 4-5 python scripts. For performance reasons i want to use same interpreter for executing all the script.
Is it Possible to do that, if yes please help me out.
Thanks
Kamal
Started by Kamal on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The obvious solution (which may require a little tweaking) is to... .
You can just pass that explicitly to subprocess.Popen as the first argument, or pass it as the 'executable' argument .
The currently executing interpreter is available in sys.executable.
|
|
In flex, I want to return multiple tokens for one match of a regular expression. Is there a way to do this?
Started by Ebu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Why'd you want that? As an....
You test for a match with one pattern at a time so that's probably out of scope .
As for GNU flex, I don't think you can do that .
Do you mean all matches? Are you using regex functions or string functions? Use the global flag .
|
|
I am writing a script in php, which is quite similar to a shopping cart. what i want to do is when a users adds a certain product i need to add the productid to a session variable,without storing in a database. so each time the user adds a product the...
Started by LiveEn on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You....
$_SESSION['cart'] = array(); $_SESSION['cart'][] = $apples; $_SESSION['cart'][] = $oranges; $_SESSION['cart'][] = $pears;
Note: replace $apples , $oranges and $pears with your product ids .
Add the items to the array.
Place an Array in the Session.
|
|
Short description of the page: user searches for an account (first form is to search for an account), account information gets displayed below and you can make changes to that account (second form).
I currently have this feature in only one form, but ...
Started by Alejandro on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Or you could use a custom validator like this
<asp:TextBox ID="TestBox" runat="server"></asp:TextBox> <asp:CustomValidator ErrorMessage="Not" ID="CustomValidator1" Enabled... .
What about using the CausesValidation attribute on your search button .
|
|
I'm having to store a Data set in cache for X min and when it expires i have it so that the next request will check if the cache exist and then goes and fetches updated data and set the Cache. The issue is that another user will come-in at this time and...
Started by BlackTea on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Here is a simple class which demonstrates....
Put the lock around code that updates or retrieves the cache object .
You need an object variable that is used as a "lock" so only one thread can access it at a time .
You can do this using the lock statement in C# .
|
|
Given the following fragment where links is a sequence of unbounded imagelinks and documentlinks, what should the deserailized class be?
<Values> <Links> <ImageLink>http://#</ImageLink> <ImageLink>http://#</ImageLink>...
Started by Jaimal Chohan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You should have a base class Link as follows
public class Link { public string Href { get; set; } } public class ImageLink : Link { } public class DocumentLink : Link { }
And your values class would look like:
public class Values { public Link[] links... .
|