Getting Ahead of an Apartment Crunch
In the face of record vacancies and plunging rents, AvalonBay is starting to put up new buildings. Crazy or crazy-smart?
View original story : weekly+general+audience+paul+vi+hall
Feed : BusinessWeek.com -- Magazine
Netflix 28-day holdback draws lawsuit
If you want to rent a new release from Netflix, you'll
View original story : weekly+general+audience+paul+vi+hall
Feed : Yahoo! Tech Advisors: Christopher Null
Fixing Firefox 3.6’s tab blunder: Blogs – Null Pointer – ZDNet Australia
I’ve been playing around with a beta build of Firefox's 3.6 browser for some time, and while it’s been completely stable, its new tab behaviour has annoyed me.
via Fixing Firefox 3.6’s tab blunder: Blogs – Null Pointer – ZDNet Australia.
It’s the one think I don’t like about the newest Firefox release (3.6), opening a link [...]
Related posts:
Backpacker Blogs – Hallelujah: Beer Hydrates Better Than Water Backpacker Blogs – Hallelujah: Beer Hydrates Better Than Water Our...
Grand Rounds Vol 6, No. 19 | A Groundhog’s Perspective on Med Blogs | More iPad Grand Rounds Vol 6, No. 19 | A Groundhog’s Perspective...
Dead Blogs, Medical Edition. Yes, it’s that time. As a general rule either no...
Related posts brought to you by Yet Another Related Posts Plugin.
View original story : weekly+general+audience+paul+vi+hall
Feed : GruntDoc
'null' is null or not an object - DragPanelExtender
Ok, I've been banging my head for hours with this... I have a bunch of ajax controls on my aspx page: a dragpanel and a few accordions. The dragpanel has dynamic content (an image) and appears (visible = true) upon clicking on the link buttons listed in the accordions (no update panel used). On page postback, when one of the buttons is clicked, the drag panel pops up and is positioned over another larger image. Here's what the code looks like:
<asp:Panel ID="MyHandle" runat="server" Visible="false">
</asp:Panel>
<asp:Panel ID="odragpanel" runat="server" Visible="false">
<asp:Image ID="myoimage" runat="server" ImageUrl="" />
</asp:Panel>
<ajaxToolkit:DragPanelExtender ID="DragPanelExtender1" runat="server" DragHandleID="MyHandle" Enabled="false"
TargetControlID="odragpanel" BehaviorID="myodragpanel">
</ajaxToolkit:DragPanelExtender>
When a user selects a link button from the accordion, the visible properties are set to "true" and the drag panel extender is enabled. This is the next block of code that runs on client side:
<script type="text/javascript">
jQuery.noConflict();
window.onload = function() { positionme() }
function positionme() {
imageId = "<%=myoimage.ClientID %>";
image = document.getElementById(imageId); //just to preload the image for all browsers
var leftval = jQuery("#dragdiv").position().left;
var topval = jQuery("#dragdiv").position().top;
var myvarw = jQuery("#<%=myoimage.ClientID %>").width();
var myvarh = jQuery("#<%=myoimage.ClientID %>").height();
var loadlocation = new Sys.UI.Point(leftval + 160 + parseInt(((236 - myvarw) / 2)), topval + 80 + parseInt(((190 - myvarh) / 2)));
$find("<%=DragPanelExtender1.BehaviorID%>").set_location(loadlocation);
};
</script>
In this code, I take a bit of help from jQuery to position the server generated "odragpanel" div over the "dragdiv" div. I'm not a JavaScript expert, so that above JS might look weird to you all but I've just been trying to get the code to run across all browsers. Anyhow, the problem occurs at the last line "$find("<%=Drag........."
Sometimes it works like a charm, the other time, I run into the error message "'null' is null or not an object" with my odragpanel div unpositioned!
Any help would be much appreciated!
View original story : weekly+general+audience+paul+vi+hall
Feed : ASP.NET Forums
Association between phthalate exposure and glutathione S-transferase M1 polymorphism in adenomyosis, leiomyoma and endometriosis
BACKGROUND
Phthalates are known to have estrogenic effects in cell models and experimental animals. However, the evidence regarding the effects of phthalates on human reproduction is still limited. We conducted a case–control study to determine whether estrogen-dependent diseases are associated with phthalate exposure and how the glutathione S-transferase M1 (GSTM1; a major detoxification enzyme) genotype modulates the risk.
METHODS
We recruited subjects who underwent laparotomy and had pathologic confirmation of endometriosis (EN) (n = 28), adenomyosis (AD) (n = 16) and leiomyoma (LEI) (n = 36) from the Department of Obstetrics and Gynecology at a medical center in Taiwan between 2005 and 2007. Controls (n = 29) were patients without any of the three aforementioned gynecologic conditions. Urine samples were collected before surgery and analyzed for seven phthalate metabolites using liquid chromatography–tandem mass spectrometry. Peripheral lymphocytes were used for GSTM1 genotype determination.
RESULTS
Patients with LEIs had significantly higher levels of total urinary mono-ethylhexyl phthalate (MEHP; 52.1 versus 18.9 µg/g creatinine, P < 0.05) than the controls, whereas patients with EN had an increased level of urinary mono-n-butyl phthalate (94.1 versus 58.0 µg/g creatinine, P < 0.05). Subjects with GSTM1 null genotype had significantly increased odds for AD relative to those with GSTM1 wild genotype [odds ratio (OR) = 5.30; 95% CI, 1.22–23.1], even after adjustment for age and phthalate exposure. Subjects who carried the GSTM1 null genotype and had a high urinary level of MEHP showed a significantly increased risk for AD (OR = 10.4; 95% CI, 1.26–85.0) and LEIs (OR = 5.93; 95% CI, 1.10–31.9) after adjustment for age, compared with those with GSTM1 wild-type and low urinary level of MEHP.
CONCLUSIONS
These results suggest that both GSTM1 null and phthalate exposure are associated with AD and LEI. Larger studies are warranted to investigate potential interaction between GSTM1 null and phthalate exposure in the etiology of estrogen-dependent gynecologic conditions.
View original story : weekly+general+audience+paul+vi+hall
Feed : Human Reproduction - current issue
Commented Issue: Inherit permissions from parent when creating new items [25114]
Hey guys,
Been using N2 for a good while now but just stumbled across a issue (more of a question maybe):
I've not really touched the security model a great deal beyond just having admin roles with CRUD permissions... I've just setup a fairly large site that has finely graded permissions for each Parent/Child in the tree, and I'm using ASP.NET membership for role management...
So to start:
A parent container has specific permissions for each Role
The Default permissions on the parent are set to Read only
A role member can create a new child in a Parent
Problem:
When the same role member comes to edit the same child they have just created, they can't save it (it lets you edit).
Question:
I would expect a child to inherit the permissions from it's Parent, this isn't the case... have I missed something/done something stupid or is this correct functionality? (it doesn't seem to at the moment, just sets the standard Default permissions... which don't let a specific role save without going in as Admin and changing the child permissions manually)
Cheers,
Comments: ** Comment from web user: jeanfpoulin **
I needed this for the project I was working on however I did not have the time to make a proper implementation of this (ideally it would need it's own config section to turn on and off). Therefore, here is my good-enough for most-folks implementation... Quick and dirty hack to accomplish this:
1) Open the DefinitionManager.cs file in the N2/Definitions directory
2) Add following code in OnItemCreating function (somewhere in the middle):
Permission[] Permissions = GetAvailablePermissions();
for (int i = 0; i < Permissions.Length; i++)
{
Permission permission = Permissions[i];
List
roles = (List)DynamicPermissionMap.GetRoles(parentItem, permission);
if(roles != null) DynamicPermissionMap.SetRoles(item, permission, roles.ToArray());
}
3) copy in GetAvailablePermissions function from N2/Content/Security/default.aspx.cs
4) copy in Engine variable declaration from N2/Edit/Web/EditPage.cs file (under #region Properties)
5) go in N2/Security/DynamicPermissionMap.cs and make GetRoles public
View original story : weekly+general+audience+paul+vi+hall
Feed : n2cms Work Item Rss Feed
Characteristic extraction in numerical relativity: binary black hole merger waveforms at null infinity
Author(s): C Reisswig, N T Bishop, D Pollney and B Szilagyi
Affiliation(s): Max-Planck-Institut fur Gravitationsphysik, Albert-Einstein-Institut, 14476 Golm, Germany; Department of Mathematics, Rhodes University, Grahamstown 6140, South Africa; Theoretical Astrophysics, California Institute of Technology, Pasadena, CA 91125, USA
View original story : weekly+general+audience+paul+vi+hall
Feed : Classical and Quantum Gravity latest papers
UserControl in a DataForm - changes don't trigger OK and Cancel buttons availability
Hi,
I have created a 'DateTimePicker' usercontrol consisting of a datepicker and a timepicker.
I have a dependancy property, 'SelectedDateTime' that builds its value from the two controls.
I have used the DateTimePicker usercontrol in a dataform and bound the selectedDateTime dependancy property via TwoWay binding;
<appControls:DateTimePickerControl Name="dtpScheduledDateTime"
SelectedDateTime="{Binding ScheduledDateTime, Mode=TwoWay}" SelectionChanged="dtpScheduledDateTime_SelectionChanged" />
Populating the vaues via the binding works fine, but unlike other standard bound controls on the dataform, when I change a value in either the datepicker or the timepicker within the dateTimePicker usercontrol, the OK and Cancel buttons of the dataform do not become active.
E.g. I also have a two-way bound textbox on the dataform and if I update the text within, then the dataform enables me to either accept or cancel the changes with buttons.
When i make a change to the values in my usercontrol these OK and Cancel buttons remain disabled.
I'm assuming i need to somehow trigger the dependancy property to raise a notification that it has been changed but jsut updating the value of the dependancy property within the code behind of the usercontrol does not seem to make any difference.
I have tried various approaches but could someone please point me towards an example of how this should be done within a usercontrol that is to be two-way bound within a dataform???
In the example code below, I call the 'UpdateSelectedDateTime()' method from within the selection changed event handler or the date or time picker controls withing the userControl;
public static DependencyProperty SelectedDateTimeProperty = DependencyProperty.Register(
"SelectedDateTime", //Property name
typeof(DateTime), //Property type
typeof(DateTimePickerControl), //Type of the dependency property provider
new PropertyMetadata(SelectedDateTimeChanged));//Callback invoked on property value has changes
private static void SelectedDateTimeChanged(DependencyObject o, DependencyPropertyChangedEventArgs args)
{
if (args.NewValue != args.OldValue)
{
((DateTimePickerControl)o).OnSelectedDateTimeChanged(args.NewValue);
}
}
private void OnSelectedDateTimeChanged(object newValue)
{
DateTime value = (DateTime)newValue;
dpDate.SelectedDate = value;
tpTime.Value = value;
}
public Nullable<DateTime> SelectedDateTime { get; set; }
private void UpdateSelectedDateTime()
{
int year = 0;
int month = 0;
int day = 0;
int hour = 0;
int minute = 0;
Nullable<DateTime> tmpDt = null;
if (dpDate.SelectedDate.HasValue)
{
year = dpDate.SelectedDate.Value.Year;
month = dpDate.SelectedDate.Value.Month;
day = dpDate.SelectedDate.Value.Day;
}
if (tpTime.Value.HasValue)
{
hour = tpTime.Value.Value.Hour;
minute = tpTime.Value.Value.Minute;
}
if (year > 0)
{
tmpDt = new DateTime(year, month, day, hour, minute, 0);
}
else
{
tmpDt = null;
}
SelectedDateTime = new Nullable<DateTime>(tmpDt.Value);
}
Thanks in advance,
Matt
View original story : weekly+general+audience+paul+vi+hall
Feed : The Official Microsoft Silverlight Site
Media player object blues... posted by Ed Burnette @ Sat, 13 Mar 2010 02:36:35 -0000
You can’t have very many of them. Android doesn’t tell you what the limit is but it seems to be around 4. You’re probably getting a null returned from the MediaPlayer.create sometimes.
I recommend the following best practices:
- Don’t create your media players in the constructor. If you do it there, then there’s no place for you to call player.release, which is very important or you’ll run out of resources. You could create them in onSurfaceCreated and release them in onSurfaceDestroyed, but as a best practice I think it’s better if you do anything not related to the graphics in your Activity instead of your View. So, do it in onResume and onPause in your Activity.
- Likewise, start your thread in on(Something)Created or onResume and stop it in on(Something)Destroyed or onPause. Do everything that you create or initialize in matched bookend pairs like this.
- If you want overlapping sounds, and sounds that happen instantly because of some event like a button press or a ball hitting a wall, then use SoundPool instead of MediaPlayer. Also use .ogg format because it’s quicker to decode and play without pauses.
Hope this helps, and good luck.
View original story : weekly+general+audience+paul+vi+hall
Feed : Recent Posts | Pragmatic Forums
Commented Issue: Provide an opportunity to change HelpText values at runtime [10426]
Hi,
is it possible to add a feature that would allow users of your CommandLine library to modify HelpText values at runtime before they are included in the argument list by the HelpText class?
Like this, it would be possible to manually localize these values, for example. (In my case, I'd use the HelpText property of the attribute to store the string identifier which is used to read the localized string from a file.) More generally, the help texts could be adapted based on some settings (provided in configuration files, for example) - obviously, translating them to a configured language would be one special case of this, but displaying default values that are set in a configuration file would be another.
My suggestion on how to incorporate such a feature with the least possible changes in the code would be modifying HelpText as follows:
1) Add an event like "AdaptHelpText" that provides the help text string as read from the attribute in its EventArgs (let's call the class "HelpTextEventArgs"), where event handlers may change it.
2) Change HelpText.AddOption(string, int, BaseOptionAttribute, int):
Right before the lines
if (option.Required)
{
option.HelpText = String.Format("{0} ", requiredWord) + option.HelpText;
}
insert something like:
if (AdaptHelpText != null)
{
HelpTextEventArgs evtArgs = new HelpTextEventArgs; // create the event args
evtArgs.HelpText = option.HelpText;
AdaptHelpText(this, evtArgs);
option.HelpText = evtArgs.HelpText;
}
(feel free to use these lines of code, I hereby declare them public domain)
It would be really helpful if you could add such a feature :-)
Thank you & regards,
Florian
Comments: ** Comment from web user: gsscoder **
Dear fhaag,
thank you for using this library.
In my opinion a useful feature for one person has often been appreciated by others.
So thank you for your suggestion!
Give me some time to study the problem and you will have here news about this thing.
Regards,
Giacomo
View original story : weekly+general+audience+paul+vi+hall
Feed : Command Line Parser Library