Daily Archives

Articles indexed Wednesday November 30 2011

Page 10/16 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Trying to modify a constraint in PostgresSQL

    - by MISMajorDeveloperAnyways
    Postgres is getting quite annoying lately. I have checked the documentation provided by Oracle and found a way to do this without dropping the table. Problem is, it errors out at modify as it does not recognize the keyword. Using EMS SQL Manager for PostgreSQL. Alter table public.public_insurer_credit MODIFY CONSTRAINT public_insurer_credit_fk1 deferrable, initially deferred; I was able to work around it by dropping the constraint using : ALTER TABLE "public"."public_insurer_credit" DROP CONSTRAINT "public_insurer_credit_fk1" RESTRICT; ALTER TABLE "public"."public_insurer_credit" ADD CONSTRAINT "public_insurer_credit_fk1" FOREIGN KEY ("branch_id", "order_id", "public_insurer_id") REFERENCES "public"."order_public_insurer"("branch_id", "order_id", "public_insurer_id") ON UPDATE CASCADE ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED;

    Read the article

  • Files under Program Files have a split personality

    - by regularfry
    I have a Ruby application I'm installing (along with a packaged ruby interpreter) under Program Files on Windows 7 with an NSIS-built installer. In order to debug it, I edited one of the files to add some debugging statements. After that, I uninstalled the package and ran a new version of the installer which includes a new copy of the edited file, without debugging statements. Now, I can't get the new copy to load into ruby. If I run type <filename> in cmd.exe, or open the file in Notepad.exe or Firefox, I see the new version. If I run ruby -e "puts File.read('<filename>')", or open the file in emacs, I see the old version. If, in Windows Explorer, I copy the file to a new filename, everything can see the new contents at that filename. If I delete the original file and rename the copy to replace the original, the split personality returns. This situation survives a reboot, so it's not a simple matter of a file being accidentally held open. What on earth is going on here? Is there some aspect of the install process that might be checkpointing the file in a way I can revert, or at least switch off while I'm debugging the installer?

    Read the article

  • How do I get the displayname of the logged in user in EWS?

    - by tig
    Exchange Autodiscovery will give me the user's Display Name via the UserSettingName.UserDisplayName property. However, in cases where autodiscovery fails and connection needs to be done manually I can't figure out how to get the DisplayName. I tried this, but I just get the users' email address: _service = new ExchangeService(); _service.Credentials = new System.Net.NetworkCredential(exchangeSettings.EmailAddress, exchangeSettings.Password); _service.Url = new Uri(exchangeSettings.ExternalEwsUrl); NameResolutionCollection resolvedNames = _service.ResolveName(exchangeSettings.EmailAddress); exchangeSettings.UserDisplayName = resolvedNames.First().Mailbox.Name; Thanks

    Read the article

  • How can I build a list of world geo locations and their relative geographical hierarchies?

    - by Nathan Ridley
    I want to build a database of geographical locations and would like to be able to identify locations that fall inside other locations. For example, The Empire State Building is going to have one geo-coordinate, but my database would be able to tell me that it falls inside Manhattan, which falls inside New York City, which is in the state of New York and so forth. I've been looking at OpenStreetMap which seems to have a pretty decent database but as best I can tell, I would need to create a set of polygon structures representing each region and then detect if a coordinate falls inside a given region's polygon. Is there a better way to do this, or is there a data source where all of this has already been calculated?

    Read the article

  • A way to avoid deriving from the provider classes in mvc authentication

    - by Shymep
    Looking for the best practice for authentication in MVC I unfortunately didn't find the clear answer to my question. Thinking of the problem I tried to imagine some priciples that could be useful in my design. Well, I would like to use a base AccountController class I want to place all the tables such as "Users", Roles, Rights etc into my own database. But I wouldn't like to implement the standard aspnetdb design (which can be easy got by using aspnet_regsql) So the main question is can I do this without deriving abstract classes like MembershipProvider, RoleProvider etc? What I would prefer not to do is implement all the abstract methods from these classes. The second question is still about the best practice for authentication e.g. for the small projects, for the large ones?

    Read the article

  • A more elegant way to parse a string with ruby regular expression using variable grouping?

    - by i0n
    At the moment I have a regular expression that looks like this: ^(cat|dog|bird){1}(cat|dog|bird)?(cat|dog|bird)?$ It matches at least 1, and at most 3 instances of a long list of words and makes the matching words for each group available via the corresponding variable. Is there a way to revise this so that I can return the result for each word in the string without specifying the number of groups beforehand? ^(cat|dog|bird)+$ works but only returns the last match separately , because there is only one group.

    Read the article

  • Java Double Array

    - by user1062058
    I'm having trouble setting up and placing values into an array using a text file containing the floating point numbers 2.1 and 4.3 each number is separated by a space - below is the error I'm getting: Exception in thread "main" java.util.NoSuchElementException import java.util.*; import java.io.*; public class DoubleArray { public static void main(String[] args) throws FileNotFoundException { Scanner in = new Scanner(new FileReader("mytestnumbers.txt")); double [] nums = new double[2]; for (int counter=0; counter < 2; counter++) { int index = 0; index++; nums[index] = in.nextDouble(); } } } Thanks, I'm sure this isn't a hard question to answer... I appreciate your time.

    Read the article

  • How can I search for a string in a .txt file for NSScanner?

    - by pixelbitapps
    I currently have the following code to get a certain piece of code from the UIWebView: NSURL *requestTimetableURL = [NSURL URLWithString:@"http://www.dhsb.org/index.phtml?d=201435"]; NSLog(@"Loaded Timetable"); NSError *error; NSString *page = [NSString stringWithContentsOfURL:requestTimetableURL encoding:NSASCIIStringEncoding error:&error]; [webView loadHTMLString:page baseURL:requestTimetableURL]; NSString* Period1; NSScanner *htmlScanner = [NSScanner scannerWithString:page]; [htmlScanner scanUpToString:@"<P align=center><STRONG><FONT color=#c00000>" intoString:NULL]; [htmlScanner scanString:@"<P align=center><STRONG><FONT color=#c00000>" intoString:NULL]; [htmlScanner scanUpToString:@"</FONT>" intoString:&Period1]; How can I scan a .txt file (which contains the string like above) for the code? E.G. [htmlScanner scanUpToString:teststring intoString:NULL]; Thanks!

    Read the article

  • How do I safely destroy a dialog window of a wxPython application?

    - by Akira
    I created a wxPython application which shows some messages on a dialog window. The dialog window is needed to be force-destroyed by the application before I click the dialog OK button. I used wx.lib.delayedresult to make the destroy call. My code is: import wx dlg=wx.MessageDialog(somewindow,'somemessage') from wx.lib.delayedresult import startWorker def _c(d): dlg.EndModal(0) dlg.Destroy() def _w(): import time time.sleep(1.0) startWorker(_c,_w) dlg.ShowModal() This can do what I desire to do while I got a error message below: (python:15150): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed How do I "safely" destroy a dialog without clicking the dialog button?

    Read the article

  • How do record updates behave internally?

    - by redxaxder
    data Thing = Thing {a :: Int, b :: Int, c :: Int, (...) , z :: Int} deriving Show foo = Thing 1 2 3 4 5 (...) 26 mkBar x = x { c = 30 } main = do print $ mkBar foo What is copied over when I mutate foo in this way? As opposed to mutating part of a structure directly. Data Thing = Thing {a :: IORef Int, b :: IORef Int, (...) , z :: IORef Int} instance Show Thing where (...something something unsafePerformIO...) mkFoo = do a <- newIORef 1 (...) z <- newIORef 26 return Thing a b (...) z mkBar x = writeIORef (c x) 30 main = do foo <- mkFoo mkBar foo print foo Does compiling with optimizations change this behavior?

    Read the article

  • Position:absolute

    - by Andrew
    I have I have a div called logo. I want the logo to be on top of other areas and to overlap into the the preface top of a drupal site, the logo currently sits in the header area. I looked up position absolute and I think that what I need to use but when I use position absolute the logo disappears, I can see it if I use position fixed, relative etc. I thought the logo was being hidden because I was not using a z-index but even with that I cant see the logo. What am I doing wrong? #logo { position: absolute; top: 30px; /* 30 pixels from the top of the page */ left: 80px; /* 80 pixels from the left hand side */ z-index:1099; border: 1px solid red; /* So we can see what is happening */ } Also does anyone know of a really good free online css course? Here is some additional information, namely the CSS and the page.tpl.php: <?php // $Id: page.tpl.php,v 1.1.2.5 2010/04/08 07:02:59 sociotech Exp $ ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language; ?>" xml:lang="<?php print $language->language; ?>"> <head> <title><?php print $head_title; ?></title> <?php print $head; ?> <?php print $styles; ?> <?php print $setting_styles; ?> <!--[if IE 8]> <?php print $ie8_styles; ?> <![endif]--> <!--[if IE 7]> <?php print $ie7_styles; ?> <![endif]--> <!--[if lte IE 6]> <?php print $ie6_styles; ?> <![endif]--> <?php print $local_styles; ?> <?php print $scripts; ?> </head> <body id="<?php print $body_id; ?>" class="<?php print $body_classes; ?>"> <div id="page" class="page"> <div id="page-inner" class="page-inner"> <div id="skip"> <a href="#main-content-area"><?php print t('Skip to Main Content Area'); ?></a> </div> <!-- header-top row: width = grid_width --> <?php print theme('grid_row', $header_top, 'header-top', 'full-width', $grid_width); ?> <!-- header-group row: width = grid_width --> <div id="header-group-wrapper" class="header-group-wrapper full-width"> <div id="header-group" class="header-group row <?php print $grid_width; ?>"> <div id="header-group-inner" class="header-group-inner inner clearfix"> <?php print theme('grid_block', theme('links', $secondary_links), 'secondary-menu'); ?> <?php print theme('grid_block', $search_box, 'search-box'); ?> <?php if ($logo || $site_name || $site_slogan): ?> <div id="header-site-info" class="header-site-info block"> <div id="header-site-info-inner" class="header-site-info-inner inner"> <?php if ($logo): ?> <div id="logo"> <a href="<?php print check_url($front_page); ?>" title="<?php print t('Home'); ?>"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a> </div> <?php endif; ?> <?php if ($site_name || $site_slogan): ?> <div id="site-name-wrapper" class="clearfix"> <?php if ($site_name): ?> <span id="site-name"><a href="<?php print check_url($front_page); ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></span> <?php endif; ?> <?php if ($site_slogan): ?> <span id="slogan"><?php print $site_slogan; ?></span> <?php endif; ?> </div><!-- /site-name-wrapper --> <?php endif; ?> </div><!-- /header-site-info-inner --> </div><!-- /header-site-info --> <?php endif; ?> <?php print $header; ?> <?php print theme('grid_block', $primary_links_tree, 'primary-menu'); ?> </div><!-- /header-group-inner --> </div><!-- /header-group --> </div><!-- /header-group-wrapper --> <!-- preface-top row: width = grid_width --> <?php print theme('grid_row', $preface_top, 'preface-top', 'full-width', $grid_width); ?> <!-- main row: width = grid_width --> <div id="main-wrapper" class="main-wrapper full-width<?php if ($is_front) { print ' front'; } ?>"> <div id="main" class="main row <?php print $grid_width; ?>"> <div id="main-inner" class="main-inner inner clearfix"> <?php print theme('grid_row', $sidebar_first, 'sidebar-first', 'nested', $sidebar_first_width); ?> <!-- main group: width = grid_width - sidebar_first_width --> <div id="main-group" class="main-group row nested <?php print $main_group_width; ?>"> <div id="main-group-inner" class="main-group-inner inner"> <?php print theme('grid_row', $preface_bottom, 'preface-bottom', 'nested'); ?> <div id="main-content" class="main-content row nested"> <div id="main-content-inner" class="main-content-inner inner"> <!-- content group: width = grid_width - (sidebar_first_width + sidebar_last_width) --> <div id="content-group" class="content-group row nested <?php print $content_group_width; ?>"> <div id="content-group-inner" class="content-group-inner inner"> <?php print theme('grid_block', $breadcrumb, 'breadcrumbs'); ?> <?php if ($content_top || $help || $messages): ?> <div id="content-top" class="content-top row nested"> <div id="content-top-inner" class="content-top-inner inner"> <?php print theme('grid_block', $help, 'content-help'); ?> <?php print theme('grid_block', $messages, 'content-messages'); ?> <?php print $content_top; ?> </div><!-- /content-top-inner --> </div><!-- /content-top --> <?php endif; ?> <div id="content-region" class="content-region row nested"> <div id="content-region-inner" class="content-region-inner inner"> <a name="main-content-area" id="main-content-area"></a> <?php print theme('grid_block', $tabs, 'content-tabs'); ?> <div id="content-inner" class="content-inner block"> <div id="content-inner-inner" class="content-inner-inner inner"> <?php if ($title): ?> <h1 class="title"><?php print $title; ?></h1> <?php endif; ?> <?php if ($content): ?> <div id="content-content" class="content-content"> <?php print $content; ?> <?php print $feed_icons; ?> </div><!-- /content-content --> <?php endif; ?> </div><!-- /content-inner-inner --> </div><!-- /content-inner --> </div><!-- /content-region-inner --> </div><!-- /content-region --> <?php print theme('grid_row', $content_bottom, 'content-bottom', 'nested'); ?> </div><!-- /content-group-inner --> </div><!-- /content-group --> <?php print theme('grid_row', $sidebar_last, 'sidebar-last', 'nested', $sidebar_last_width); ?> </div><!-- /main-content-inner --> </div><!-- /main-content --> <?php print theme('grid_row', $postscript_top, 'postscript-top', 'nested'); ?> </div><!-- /main-group-inner --> </div><!-- /main-group --> </div><!-- /main-inner --> </div><!-- /main --> </div><!-- /main-wrapper --> <!-- postscript-bottom row: width = grid_width --> <?php print theme('grid_row', $postscript_bottom, 'postscript-bottom', 'full-width', $grid_width); ?> <!-- footer row: width = grid_width --> <?php print theme('grid_row', $footer, 'footer', 'full-width', $grid_width); ?> <!-- footer-message row: width = grid_width --> <div id="footer-message-wrapper" class="footer-message-wrapper full-width"> <div id="footer-message" class="footer-message row <?php print $grid_width; ?>"> <div id="footer-message-inner" class="footer-message-inner inner clearfix"> <?php print theme('grid_block', $footer_message, 'footer-message-text'); ?> </div><!-- /footer-message-inner --> </div><!-- /footer-message --> </div><!-- /footer-message-wrapper --> </div><!-- /page-inner --> </div><!-- /page --> <?php print $closure; ?> </body> </html> CSS /* $Id: style.css,v 1.1.2.11 2010/07/02 22:11:04 sociotech Exp $ */ /* Margin, Padding, Border Resets -------------------------------------------------------------- */ html, body, div, span, p, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, fieldset, input, textarea { margin: 0; padding: 0; } img, abbr, acronym { border: 0; } /* HTML Elements -------------------------------------------------------------- */ p { margin: 1em 0; } h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em 0; } h1 { color: white !important; text-shadow: black !important; } ul, ol, dd { margin-bottom: 1.5em; margin-left: 2em; /* LTR */ } li ul, li ol { margin-bottom: 0; } ul { list-style-type: disc; } ol { list-style-type: decimal; } a { margin: 0; padding: 0; text-decoration: none; } a:link, a:visited { } a:hover, a:focus, a:active { text-decoration: underline; } blockquote { } hr { height: 1px; border: 1px solid gray; } /* tables */ table { border-spacing: 0; width: 100%; } tr.even td, tr.odd td { background-color: #FFFFFF; border: 1px solid #dbdbdb; } caption { text-align: left; } th { margin: 0; padding: 0 10px 0 0; } th.active img { display: inline; } thead th { padding-right: 10px; } td { margin: 0; padding: 3px; } /* Remove grid block styles from Drupal's table ".block" class */ td.block { border: none; float: none; margin: 0; } /* Maintain light background/dark text on dragged table rows */ tr.drag td, tr.drag-previous td { background: #FFFFDD; color: #000; } /* Accessibility /-------------------------------------------------------------- */ /* skip-link to main content, hide offscreen */ #skip a, #skip a:hover, #skip a:visited { height: 1px; left: 0px; overflow: hidden; position: absolute; top: -500px; width: 1px; } /* make skip link visible when selected */ #skip a:active, #skip a:focus { background-color: #fff; color: #000; height: auto; padding: 5px 10px; position: absolute; top: 0; width: auto; z-index: 99; } #skip a:hover { text-decoration: none; } /* Helper Classes /-------------------------------------------------------------- */ .hide { display: none; visibility: hidden; } .left { float: left; } .right { float: right; } .clear { clear: both; } /* clear floats after an element */ /* (also in ie6-fixes.css, ie7-fixes.css) */ .clearfix:after, .clearfix .inner:after { clear: both; content: "."; display: block; font-size: 0; height: 0; line-height: 0; overflow: auto; visibility: hidden; } /* Grid Layout Basics (specifics in 'gridnn_x.css') -------------------------------------------------------------- */ /* center page and full rows: override this for left-aligned page */ .page, .row { margin: 0 auto; } /* fix layout/background display on floated elements */ .row, .nested, .block { overflow: hidden; } /* full-width row wrapper */ div.full-width { width: 100%; } /* float, un-center & expand nested rows */ .nested { float: left; /* LTR */ margin: 0; width: 100%; } /* allow Superfish menus to overflow */ #sidebar-first.nested, #sidebar-last.nested, div.superfish { overflow: visible; } /* sidebar layouts */ .sidebars-both-first .content-group { float: right; /* LTR */ } .sidebars-both-last .sidebar-first { float: right; /* LTR */ } /* Grid Mask Overlay -------------------------------------------------------------- */ #grid-mask-overlay { display: none; left: 0; opacity: 0.75; position: absolute; top: 0; width: 100%; z-index: 997; } #grid-mask-overlay .row { margin: 0 auto; } #grid-mask-overlay .block .inner { background-color: #e3fffc; outline: none; } .grid-mask #grid-mask-overlay { display: block; } .grid-mask .block { overflow: visible; } .grid-mask .block .inner { outline: #f00 dashed 1px; } #grid-mask-toggle { background-color: #777; border: 2px outset #fff; color: #fff; cursor: pointer; font-variant: small-caps; font-weight: normal; left: 0; -moz-border-radius: 5px; padding: 0 5px 2px 5px; position: absolute; text-align: center; top: 22px; -webkit-border-radius: 5px; z-index: 998; } #grid-mask-toggle.grid-on { border-style: inset; font-weight: bold; } /* Site Info -------------------------------------------------------------- */ #header-site-info { width: auto; } #site-name-wrapper { float: left; /* LTR */ } #site-name, #slogan { display: block; } #site-name a:link, #site-name a:visited, #site-name a:hover, #site-name a:active { text-decoration: none; } #site-name a { outline: 0; } /* Regions -------------------------------------------------------------- */ /* Header Regions -------------------------------------------------------------- */ #header-group { overflow: visible; } /* Content Regions (Main) -------------------------------------------------------------- */ .node-bottom { margin: 1.5em 0 0 0; } /* Clear floats on regions -------------------------------------------------------------- */ #header-top-wrapper, #header-group-wrapper, #preface-top-wrapper, #main-wrapper, #preface-bottom, #content-top, #content-region, #content-bottom, #postscript-top, #postscript-bottom-wrapper, #footer-wrapper, #footer-message-wrapper { clear: both; } /* Drupal Core /-------------------------------------------------------------- */ /* Lists /-------------------------------------------------------------- */ .item-list ul li { margin: 0; } .block ul, .block ol { margin-left: 2em; /* LTR */ padding: 0; } .content-inner ul, .content-inner ol { margin-bottom: 1.5em; } .content-inner li ul, .content-inner li ol { margin-bottom: 0; } .block ul.links { margin-left: 0; /* LTR */ } /* Menus /-------------------------------------------------------------- */ ul.menu li, ul.links li { margin: 0; padding: 0; } /* Primary Menu /-------------------------------------------------------------- */ /* use ID to override overflow: hidden for .block, dropdowns should always be visible */ #primary-menu { overflow: visible; } /* remove left margin from primary menu list */ #primary-menu.block ul { margin-left: 0; /* LTR */ } /* remove bullets, float left */ .primary-menu ul li { float: left; /* LTR */ list-style: none; position: relative; } /* style links, and unlinked parent items (via Special Menu Items module) */ .primary-menu ul li a, .primary-menu ul li .nolink { display: block; padding: 0.75em 1em; text-decoration: none; } /* Add cursor style for unlinked parent menu items */ .primary-menu ul li .nolink { cursor: default; } /* remove outline */ .primary-menu ul li:hover, .primary-menu ul li.sfHover, .primary-menu ul a:focus, .primary-menu ul a:hover, .primary-menu ul a:active { outline: 0; } /* Secondary Menu /-------------------------------------------------------------- */ .secondary-menu-inner ul.links { margin-left: 0; /* LTR */ } /* Skinr styles /-------------------------------------------------------------- */ /* Skinr selectable helper classes */ .fusion-clear { clear: both; } div.fusion-right { float: right; /* LTR */ } div.fusion-center { float: none; margin-left: auto; margin-right: auto; } .fusion-center-content .inner { text-align: center; } .fusion-center-content .inner ul.menu { display: inline-block; text-align: center; } /* required to override drupal core */ .fusion-center-content #user-login-form { text-align: center; } .fusion-right-content .inner { text-align: right; /* LTR */ } /* required to override drupal core */ .fusion-right-content #user-login-form { text-align: right; /* LTR */ } /* Large, bold callout text style */ .fusion-callout .inner { font-weight: bold; } /* Extra padding on block */ .fusion-padding .inner { padding: 30px; } /* Adds 1px border and padding */ .fusion-border .inner { border-width: 1px; border-style: solid; padding: 10px; } /* Single line menu with separators */ .fusion-inline-menu .inner ul.menu { margin-left: 0; /* LTR */ } .fusion-inline-menu .inner ul.menu li { border-right-style: solid; border-right-width: 1px; display: inline; margin: 0; padding: 0; white-space: nowrap; } .fusion-inline-menu .inner ul.menu li a { padding: 0 8px 0 5px; /* LTR */ } .fusion-inline-menu .inner ul li.last { border: none; } /* Hide second level (and beyond) menu items */ .fusion-inline-menu .inner ul li.expanded ul { display: none; } /* Multi-column menu style with bolded top level menu items */ .fusion-multicol-menu .inner ul { margin-left: 0; /* LTR */ text-align: left; /* LTR */ } .fusion-multicol-menu .inner ul li { border-right: none; display: block; font-weight: bold; } .fusion-multicol-menu .inner ul li.last { border-right: none; } .fusion-multicol-menu .inner ul li.last a { padding-right: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded, .fusion-multicol-menu .inner ul li.leaf { float: left; /* LTR */ list-style-image: none; margin-left: 50px; /* LTR */ } .fusion-multicol-menu .inner ul.menu li.first { margin-left: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded li.leaf { float: none; margin-left: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded ul { display: block; margin-left: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded ul li { border: none; margin-left: 0; /* LTR */ text-align: left; /* LTR */ } .fusion-multicol-menu .inner ul.menu li ul.menu li { font-weight: normal; } /* Split list across multiple columns */ .fusion-2-col-list .inner .item-list ul li, .fusion-2-col-list .inner ul.menu li { float: left; /* LTR */ width: 50%; } .fusion-3-col-list .inner .item-list ul li, .fusion-3-col-list .inner ul.menu li { float: left; /* LTR */ width: 33%; } .fusion-2-col-list .inner .item-list ul.pager li, .fusion-3-col-list .inner .item-list ul.pager li { float: none; width: auto; } /* List with bottom border Fixes a common issue when list items have bottom borders and appear to be doubled when nested lists end and begin. This removes the extra border-bottom */ .fusion-list-bottom-border .inner ul li { list-style: none; list-style-type: none; list-style-image: none; } .fusion-list-bottom-border .inner ul li, .fusion-list-bottom-border .view-content div.views-row { padding: 0 0 0 10px; /* LTR */ border-bottom-style: solid; border-bottom-width: 1px; line-height: 216.7%; /* 26px */ } .fusion-list-bottom-border .inner ul { margin: 0; } .fusion-list-bottom-border .inner ul li ul { border-bottom-style: solid; border-bottom-width: 1px; } .fusion-list-bottom-border .inner ul li ul li.last { border-bottom-style: solid; border-bottom-width: 1px; margin-bottom: -1px; margin-top: -1px; } #views_slideshow_singleframe_pager_slideshow-page_2 .pager-item { display:block; } #views_slideshow_singleframe_pager_slideshow-page_2 { position:absolute; right:0; top:0; } #header-group-wrapper { background: none; } #page { background-color:#F3F3F3; background-image:url('/sites/all/themes/fusion/fusion_core/images/runswithgradient.jpg'); background-repeat:no-repeat; background-attachment: fixed; width: auto; } #views_slideshow_singleframe_pager_slideshow-page_2 div a img { top:0px; height:60px; width:80px; padding-right:10px; padding-bottom:19px; } #mycontent{ width: 720px; } .product-body { -moz-border-radius: 4px 4px 4px 4px; margin: 0 0 20px; overflow: hidden; padding: 20px; background: none repeat scroll 0 0 #F7F7F7; border: 1px solid #000000; border-style:solid; border-width:thin; color:#000000; } #product-details { background: none repeat scroll 0 0 #F7F7F7 !important; border: 1px solid #000000 !important; color: #8E8E8E; } #logo { position: relative; top: 30px; /* 30 pixels from the top of the page */ left: 80px; /* 80 pixels from the left hand side */ z-index:1099; border: 1px solid red; /* So we can see what is happening */ } #breadcrumbs-inner { background: none; border-color: transparent; border-style: none; } #block-views-new_products-block_1{ height:200px; } /* List with no bullet and extra padding This is a common style for menus, which removes the bullet and adds more vertical padding for a simple list style */ .fusion-list-vertical-spacing .inner ul, .fusion-list-vertical-spacing div.views-row-first { margin-left: 0; margin-top: 10px; } .fusion-list-vertical-spacing .inner ul li, .fusion-list-vertical-spacing div.views-row { line-height: 133.3%; /* 16px/12px */ margin-bottom: 10px; padding: 0; } .fusion-list-vertical-spacing .inner ul li { list-style: none; list-style-image: none; list-style-type: none; } .fusion-list-vertical-spacing .inner ul li ul { margin-left: 10px; /* LTR */ } /* Bold all links */ .fusion-bold-links .inner a { font-weight: bold; } /* Float imagefield images left and add margin */ .fusion-float-imagefield-left .field-type-filefield, .fusion-float-imagefield-left .image-insert, .fusion-float-imagefield-left .imagecache { float: left; /* LTR */ margin: 0 15px 15px 0; /* LTR */ } /* Clear float on new Views item so each row drops to a new line */ .fusion-float-imagefield-left .views-row { clear: left; /* LTR */ } /* Float imagefield images right and add margin */ .fusion-float-imagefield-right .field-type-filefield, .fusion-float-imagefield-right .image-insert .fusion-float-imagefield-right .imagecache { float: right; /* LTR */ margin: 0 0 15px 15px; /* LTR */ } /* Clear float on new Views item so each row drops to a new line */ .fusion-float-imagefield-right .views-row { clear: right; /* LTR */ } /* Superfish: all menus */ .sf-menu li { list-style: none; list-style-image: none; list-style-type: none; } /* Superfish: vertical menus */ .superfish-vertical { position: relative; z-index: 9; } ul.sf-vertical { background: #fafafa; margin: 0; width: 100%; } ul.sf-vertical li { border-bottom: 1px solid #ccc; font-weight: bold; line-height: 200%; /* 24px */ padding: 0; width: 100%; } ul.sf-vertical li a:link, ul.sf-vertical li a:visited, ul.sf-vertical li .nolink { margin-left: 10px; padding: 2px; } ul.sf-vertical li a:hover, ul.sf-vertical li a.active { text-decoration: underline; } ul.sf-vertical li ul { background: #fafafa; border-top: 1px solid #ccc; margin-left: 0; width: 150px; } ul.sf-vertical li ul li.last { border-top: 1px solid #ccc; margin-bottom: -1px; margin-top: -1px; } ul.sf-vertical li ul { border-top: none; padding: 4px 0; } ul.sf-vertical li ul li { border-bottom: none; line-height: 150%; /* 24px */ More below but I can't paste that much Thanks for the suggestion I've tried this #header-group { position: relative; z-index: 9; } #logo { position: abosolute; top: 230px; /* 30 pixels from the top of the page */ left: 10px; /* 80 pixels from the left hand side */ z-index: 999; } but it's not working. I've taken a screen shot of the div to show the structure. http://i.stack.imgur.com/ff4DP.png

    Read the article

  • Result in an argument isn't correct

    - by Paulo Nunes
    So I have this piece of prolog code: my_avalia(A,R) :- A=="Koza" -koza(R,0,0,e,89). koza(R,_,_,_,87):-!,write(R). koza(R,X,Y,V,C):-movex(V,X,X1),movey(V,Y,Y1),confirma(X1,Y1,Z),Z==1->(append(R,[emFrente],U),L is (C-1),koza(U,X1,Y1,V,L)). The matter is that when I write the "R" at koza(), it has the correct values, however it ends up with a empty list in my_avalia when I call it like this: my_avalia("Koza",R). My recursion might be incorrect but I don't really know what's wrong with it. Thanks in advance.

    Read the article

  • How to hide overflow in this example?

    - by Abe Miessler
    You can see the fiddle here: http://jsfiddle.net/easeS/4/ Here is the html/css I have: #main div { float:left; width:30px; margin-right:10px; } #main { overflow:hidden; width:100px; height:50px; border:1px solid; } <div id="main"> <div>test1</div> <div>test2</div> <div>test3</div> </div> I'm not sure why but it bumps the third div down to a new line instead of hiding it. Any suggestions?

    Read the article

  • C# Active Directory Group Querying

    - by user1073912
    I am trying the code found here. I am getting the following compile time error: The name 'p' does not exist in the current context Here is my code...can someone help? Thanks. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.DirectoryServices; using System.DirectoryServices.AccountManagement; public static List<string> GetGroups() { using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain)) { using (p = Principal.FindByIdentity(ctx, "yourUserName")) { var groups = p.GetGroups(); using (groups) { foreach (Principal group in groups) { Console.WriteLine(group.SamAccountName + "-" + group.DisplayName); } } } } }

    Read the article

  • .Net lambda expression-- where did this parameter come from?

    - by larryq
    I'm a lambda newbie, so if I'm missing vital information in my description please tell me. I'll keep the example as simple as possible. I'm going over someone else's code and they have one class inheriting from another. Here's the derived class first, along with the lambda expression I'm having trouble understanding: class SampleViewModel : ViewModelBase { private ICustomerStorage storage = ModelFactory<ICustomerStorage>.Create(); public ICustomer CurrentCustomer { get { return (ICustomer)GetValue(CurrentCustomerProperty); } set { SetValue(CurrentCustomerProperty, value); } } private int quantitySaved; public int QuantitySaved { get { return quantitySaved; } set { if (quantitySaved != value) { quantitySaved = value; NotifyPropertyChanged(p => QuantitySaved); //where does 'p' come from? } } } public static readonly DependencyProperty CurrentCustomerProperty; static SampleViewModel() { CurrentCustomerProperty = DependencyProperty.Register("CurrentCustomer", typeof(ICustomer), typeof(SampleViewModel), new UIPropertyMetadata(ModelFactory<ICustomer>.Create())); } //more method definitions follow.. Note the call to NotifyPropertyChanged(p => QuantitySaved) bit above. I don't understand where the "p" is coming from. Here's the base class: public abstract class ViewModelBase : DependencyObject, INotifyPropertyChanged, IXtremeMvvmViewModel { public event PropertyChangedEventHandler PropertyChanged; protected virtual void NotifyPropertyChanged<T>(Expression<Func<ViewModelBase, T>> property) { MvvmHelper.NotifyPropertyChanged(property, PropertyChanged); } } There's a lot in there that's not germane to the question I'm sure, but I wanted to err on the side of inclusiveness. The problem is, I don't understand where the 'p' parameter is coming from, and how the compiler knows to (evidently?) fill in a type value of ViewModelBase from thin air? For fun I changed the code from 'p' to 'this', since SampleViewModel inherits from ViewModelBase, but I was met with a series of compiler errors, the first one of which statedInvalid expression term '=>' This confused me a bit since I thought that would work. Can anyone explain what's happening here?

    Read the article

  • GC generation 3 appearing in windbg

    - by Johnv2020
    I've a dump file of a process I'm running (trying to find a memory leak) One thing I've noticed is that when I dump the bigger objects via !do windbg tells me that they are GC generation 3 ?? All of these are byte arrays so when I look at all the byte arrays in the dump I can see GC generations 0, 1, 2 & 3. Could someone explain whats going on here as I thought there was only 3 generations of GC.

    Read the article

  • avoiding code duplication in Rails 3 models

    - by Dustin Frazier
    I'm working on a Rails 3.1 application where there are a number of different enum-like models that are stored in the database. There is a lot of identical code in these models, as well as in the associated controllers and views. I've solved the code duplication for the controllers and views via a shared parent controller class and the new view/layout inheritance that's part of Rails 3. Now I'm trying to solve the code duplication in the models, and I'm stuck. An example of one of my enum models is as follows: class Format < ActiveRecord::Base has_and_belongs_to_many :videos attr_accessible :name validates :name, presence: true, length: { maximum: 20 } before_destroy :verify_no_linked_videos def verify_no_linked_videos unless self.videos.empty? self.errors[:base] << "Couldn't delete format with associated videos." raise ActiveRecord::RecordInvalid.new self end end end I have four or five other classes with nearly identical code (the association declaration being the only difference). I've tried creating a module with the shared code that they all include (which seems like the Ruby Way), but much of the duplicate code relies on ActiveRecord, so the methods I'm trying to use in the module (validate, attr_accessible, etc.) aren't available. I know about ActiveModel, but that doesn't get me all the way there. I've also tried creating a common, non-persistent parent class that subclasses ActiveRecord::Base, but all of the code I've seen to accomplish this assumes that you won't have subclasses of your non-persistent class that do persist. Any suggestions for how best to avoid duplicating these identical lines of code across many different enum models?

    Read the article

  • Is there a supplementary guide/answer key for ruby koans?

    - by corroded
    I have recently tried sharpening my rails skills with this tool: http://github.com/edgecase/ruby_koans but I am having trouble passing some tests. Also I am not sure if I'm doing some things correctly since the objective is just to pass the test, there are a lot of ways in passing it and I may be doing something that isn't up to standards. Is there a way to confirm if I'm doing things right? a specific example: in about_nil, def test_nil_is_an_object assert_equal __, nil.is_a?(Object), "Unlike NULL in other languages" end so is it telling me to check if that second clause is equal to an object(so i can say nil is an object) or just put assert_equal true, nil.is_a?(Object) because the statement is true? and the next test: def test_you_dont_get_null_pointer_errors_when_calling_methods_on_nil # What happens when you call a method that doesn't exist. The # following begin/rescue/end code block captures the exception and # make some assertions about it. begin nil.some_method_nil_doesnt_know_about rescue Exception => ex # What exception has been caught? assert_equal __, ex.class # What message was attached to the exception? # (HINT: replace __ with part of the error message.) assert_match(/__/, ex.message) end end Im guessing I should put a "No method error" string in the assert_match, but what about the assert_equal?

    Read the article

  • Changing style sheets depending on useragent

    - by John Vasiliou
    <script language="Javascript"> var deviceIphone = "iPhone"; var deviceIpod = "iPod"; //Initialize our user agent string to lower case. var uagent = navigator.userAgent.toLowerCase(); //************************** // Detects if the current device is an iPhone. function DetectiPhone() { if (uagent.search(deviceIphone) > -1) {document.write('<link rel="stylesheet" type="text/css" href="ui/mobile/css/site.css">'); } etc... Above is the start of my code. I am trying to change the CSS file depending on what platform the user is using. I currently use media="screen ... " but it doesn't work with the amount of platforms I'm trying to use. I need something a lot more detailed/complex that is why I'm turning to useragents. Any ideas why the css file doesn't change on my iPhone using the above code? Better yet, any ideas on another way to change style sheets depending on the users platform/screen resolution?

    Read the article

  • How should I set up these tables for searching?

    - by thewebguy
    My PHP site is an online store with about 5k products. Products belong to a vendor, a category, and possibly a subcategory. Each of those items has a name and the products have descriptions. The search queries we've set up work wonderfully, but tend to run pretty slow. They range between 0.20s and 30s (yes 30 seconds). We've optimized like crazy and I'm starting to think we're out of room to improve on that front, so we're caching them and that's making life a lot easier. But when they run they are still killing the server, because what appears to be all of the table locking that comes with MyISAM. So on to my question: Is there a way for us to use InnoDB (row-level locking) and still maintain FULLTEXT? Should we move our DB offsite and use a service like DB2? Is there some other search engine type software we should use instead? Any help is greatly appreciated :)

    Read the article

  • SAS/R calculate distance between two groups

    - by user976856
    I would like to calculate distance between two groups. I am very confused. I have a two data sets. One is about a company and one is about employees. I would like to find out how their age( a company in which an employee is hired and an employee) are similar or not. I think I need to standarize also.. calcuate euclidean distance between each person and a company. (4-5 people in a company) calculate euclidean distance between each person and a company in industry level. My dataset is like this: person person_age company company_age insustry 1 50 1 5 1 2 40 1 5 1 3 30 2 1 1 4 20 2 1 1 5 25 3 8 2 Please help me. I don't mind using SAS or R. I am very confused.

    Read the article

  • Expiring an IE session using WatiN

    - by Steve Wilkes
    I'm trying to write an acceptance test using WatiN which checks that a user is redirected to the login page if they navigate to a page after their session times out. I'm using WatiN's IE class for the browser, and trying the following: // 1. Login // 2. Do this: Browser.ClearCookies(); Browser.ClearCache(); // 3. Navigate to a different page But the user is always still logged in. Other info: I'm running the test through the NUnit GUI running as an administrator It's an ASP.NET MVC 3 site, using forms authentication and in-process session state I'm using IE9. If I manually clear all cookies in Chrome, the user is logged out If I manually clear all cookies in IE the user stays logged in If I call Browser.Eval("alert(document.cookie)"); in IE it alerts an empty string Given the above, I'm assuming this is a quirk with IE; any ideas how I can work around it?

    Read the article

  • using onDelete with Doctrine 2

    - by tamir
    I can't get the onDelete to work in Doctrine2 (with YAML Mapping). I tried this relation in my Product class: oneToOne: category: targetEntity: Category onDelete: CASCADE But that doesn't work.. EDIT: I've set the ON DELETE: CASCADE manually in the database imported the YAML mapping with doctrine:mapping:import, emptied the database updated it from the schema with doctrine:schema:update and got no ON DELETE in the foreign key.. so looks like even Doctrine doesn't know how to do it lol..

    Read the article

  • Handling national language prefix for checkconstraints

    - by Chris Chilvers
    I'm trying to create a check constraint such as CHECK Type IN (N'Create', N'Remove') for an enumeration's value. Sqlite complains about this syntax and only accepts CHECK Type IN ('Create', 'Remove'). The main database will be Sql Server 2005, but I use sqlite's in memory database for unit tests. Is there any way to get sqlite to recognise the national language (N) prefix? Alternatively, is there an easy way when using FluentNHibernate to adapt an nvarchar constant to match the database's dialect?

    Read the article

  • Design Advice Needed For Synonyms Database

    - by James J
    I'm planning to put together a database that can be used to query synonyms of words. The database will end up huge, so the idea is to keep things running fast. I've been thinking about how to do this, but my database design skills are not up to scratch these days. My initial idea was to have each word stored in one table, and then another table with a 1 to many relationship where each word can be linked to another word and that table can be queried. The application I'm developing allows users to highlight a word, and then type in, or select some synonyms from the database for that word. The application learns from the user input so if someone highlights "car" and types in "motor" the database would be updated to link the relationship if it don't exist already. What I don't want to happen is for a user to type in the word "shop" and link it to the word car. So I'm thinking I will need to add some sort of weight to each relationship. Eventually the synonyms the users enter will be used so they can auto select common synonyms used with a certain word. The lower weight words will not be displayed so shop could never be a synonym of car unless it had a very high weight, and chances are nobody is going to do that. Does the above sound right? Can you offer any suggestions or improvements?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >