Search Results

Search found 4668 results on 187 pages for 'font'.

Page 60/187 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Why do my Xcode default font starts to look ugly after some time, until I restart?

    - by mystify
    I plugged in an external monitor. All resolutions match perfectly. MacBookPro LCD is closed. After about 10 minutes my fonts in Xcode start to look very bad. Only in Xcode. When I restart the mac and don't use an external monitor, fonts look all right again. When I attach the monitor again, fonts look nice. Then I close XCode and reopen it: Fonts suck. All other fonts look great. It seems like Xcode isn't antialiasing them properly after something happens. For my observation it happens when I quit and reopen Xcode while an external monitor is in use. Only way to fix it then is to completely reboot. Is there a fix for this problem?

    Read the article

  • OpenType Font Parsing for Pleasure and Profit (anyone understand these damn tables?)

    - by mustISignUp
    So, this is mainly for fun, I'm poking around and trying to find my way inside a few fonts and i have a few questions i'd reeally appreciate some help on if anyone has done this kind of stuff. cmap table The fonts i am testing with contain several cmap subtables of different formats. I can read them, but i don't understand which i should be using. ie. what is the strategy for choosing the most appropriate subtable? Does this even make sense? glyf table This is really making my head hurt. I'm going by what is on here. Looking at the second table on that page.. I've got 'n' endPtsOfContours, 'n' instructions and 'n' flags but it is not clear to me if i have the same number of flags as contours (i know how many contours i have). Then, to make matters worse..(fun!) i have an array of xCoords and an array of yCoords. These arrays seem to be of indeterminate length and may contain data of either BYTE or SHORT but we are not going to tell you which.. Thanks to anyone willing to shed some light.

    Read the article

  • Solaris Web Magazine JP ?????

    - by kazun
    #midashi{ font-size:120%; border-left: 8px solid #FF0000;/*??????????????????*/ border-bottom:dotted 1px #cccccc;/*?????????????*/ width:515px;/*??????*/ line-height: 26px;/*h3?????*/ padding-left: 5px;/*?????????*/ color:#333333; /*????*/ font-weight:bold; } .select{ padding-top:2px; padding-left: 3px;/*?????????*/ font-size:10px; color:#999999; display: block; } #midashi2{ font-size:120%; border-left: 8px solid #FF0000;/*??????????????????*/ border-bottom:dotted 1px #cccccc;/*?????????????*/ width:205px;/*??????*/ line-height: 26px;/*h3?????*/ padding-left: 5px;/*?????????*/ color:#333333; /*????*/ font-weight:bold; } .select{ padding-top:2px; padding-left: 3px;/*?????????*/ font-size:10px; color:#999999; display: block; } ???? ????????:Oracle OpenWorld Tokyo 2012 ?????? ????:?????????????????:???????Oracle Solaris Studio 12.3? ???? Oracle Solaris ???????????????????? Oracle OpenWorld Tokyo 2012 ?????? Oracle Solaris 11 ?????????:?Oracle Solaris 11 ?????·????·??? ?2???? ?????????????????:???????Oracle Solaris Studio 12.3? ????? ???? ??????????????????????? Oracle Solaris Oracle Solaris Studio Oracle Solaris Cluster ????? ???? Oracle Technology Network ??????????????????????????????? Oracle Solaris 11 Oracle Solaris 10 Oracle Solaris Cluster Enterprise Edition Oracle Solaris Studio OTN? ????/????  ?????????#4?6/15(?)??? 2012/5/21 Oracle Solaris ??????? #3 2012/5/23 ?83? ????! ???????? ~Oracle x Sun ?6?: Solaris 10 ?? Solaris 11 ?????????????(Slideshare) ?????? Solaris 11 Solaris 10 Oracle Solaris Cluster Oracle Solaris Studio Oracle Linux OTN? ??????????? ?????????? Oracle Solaris ????????????????????????????????????????????????? ???????????????????????????????????????????????? OTN ???? ?????? ????? ?????? ???? Oracle Software Delivery Cloud My Oracle Support ????????? Oracle PartnerNetwork Oracle Solaris Knowledge Zone ????????? Solaris ?????? Oracle|Sun ????????? Oracle Japan (??????) Oracle University ????? Oracle Solaris 11 ?????? Oracle Solaris 11 ??????????? Sun Cluster for Hign Availability ???????? ???????? ?????????? Server / Storage System ????

    Read the article

  • How do you know how much space an NSString (using default font) will occupy on a UITableView section

    - by paul_sns
    Basically I want to copy the behavior in iPhone's Calendar where the day of week (Mon, Tue, Wed) is on the left side of the table's section header (left justified) while the formatted date (Apr 1, 2010, May 1, 2010) based on locale is on the right side of the table's section header (right justified). I was thinking of inserting a variable amount of space in between the day of week and formatted date but I first need to know the actual space consumed by the text on both sides to figure out how much space to add. Hope to hear your thoughts on this. Thanks.

    Read the article

  • How to fix a Sticky Footer that works, but after a browser window is resized, the footer overlaps.

    - by UXdesigner
    Good day, I've been trying to build a perfect footer who sticks at the bottom of the browser window after it's content. And I got help here @ Stack Overflow previously. But after a while, and doing a few tests, found out that after the browser window is resized, and then I scroll down , the footer overlaps...it is causing me a big headache right now and I'd like to fix this so I can move on. I'm going to post the display.css right here: @charset "utf-8"; body, html { margin: 0; padding: 0; text-align: center; position: relative; min-height:100%; /* needed for footer positioning*/ height:100%; /* needed for footer positioning*/ } .spacer { clear: both; height: 0; margin: 0; padding: 0; font-size: 0.1em; } .spacer_left { clear: left; margin: 0 0 10px 0; padding: 0; font-size: 0.1em; } hr { height: 1px; margin: 20px 0 20px 0; border: 0; color: #ccc; background: #ccc; } #container { position:relative; /* needed for footer positioning*/ min-height: 100%;/* needed for footer positioning*/ height: auto !important;/* needed for footer positioning*/ height: 100%;/* needed for footer positioning*/ margin: 0 auto -30px;/* needed for footer positioning*/ width: 1160px; padding: 0; border: 1px solid #333; text-align: left; } #header { margin: 0; padding: 5px; height:70px; } #login { font-family: Arial; font-size: 15px; color:#FFF; text-align: right; width: 440px; margin: 2px; } #login .theInput { font-family: Arial; font-size: 14px; width: 110px; margin-right: 5px; } #login .theSubmit { font-family: Arial; font-size: 10px; background-color: #333333; color: #FFFFFF; margin-right: 5px; } h1#lineainvisible { width:1160px; height:4px; position:relative; margin-top:4px; visibility: inherit; font-family:Arial, Helvetica, sans-serif; font-size:12px; } ul#nav { width:100%; height:36px; display:block; background-color:#000; background-repeat:repeat-x; } #wrapthatbanner { display:block; float:left; width:100%; height:524px; margin-bottom:20px; } #content { margin: 0px 20px 30px 20px; /* needed for footer positioning*/ } .panelsreadmore { margin-right: 10px; text-align:right; } div#content.columns { margin-left: 100px; } #content abbr, #content acronym { cursor: help; border-bottom: 1px dotted; } #content ul { list-style-type: square; margin-left: 75px; } #content ul li, #content ol li { margin: 0 0 0.4em 0; padding: 0; } #content blockquote { width: 75%; margin: 0 auto; padding: 20px; } #contentLeft { float: left; width:580px; } #contentRight { float: right; width:580px; } .sitenote { display:block; padding:6px; border:1px solid #bae2f0; background:#e3f4f9; line-height:130%; font-size:13px; margin-top: 0; margin-right: 0; margin-bottom: 0.5em; margin-left: 0; } #footer, .push /* needed for footer positioning*/ { padding: 5px; clear: both; position:absolute;/* needed for footer positioning*/ bottom:0;/* needed for footer positioning*/ height: -30px;/* needed for footer positioning*/ width:1150px; } And this is the HTML Template File. <!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"> <head> <!-- TemplateBeginEditable name="doctitle" --> <title>Title of Page</title> <!-- TemplateEndEditable --> <!-- TemplateParam name="categoria" type="text" value="home" --> <!-- Meta Tags --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- Meta Tags - Close --> <!-- CSS Loader - StartsS --> <link href="../css/main-client.css" rel="stylesheet" type="text/css" media="all" /> <!-- CSS Loader - Ends --> <!-- Drop Down Menu --> <link href="../css/dropdown.css" media="screen" rel="stylesheet" type="text/css" /> <link href="../css/default.advanced.css" media="screen" rel="stylesheet" type="text/css" /> <!-- Drop Down Menu - Ends --> <!-- Font Replacement Starts --> <script src="../cufon-yui.js" type="text/javascript"></script> <script src="../AFB_400.font.js" type="text/javascript"></script> <script type="text/javascript"> Cufon.replace('h2'); </script> <script type="text/javascript"> Cufon.replace('h3'); </script> <script type="text/javascript"> Cufon.replace('h4'); </script> <!-- Font Replacement = END --> <!-- Start VisualLightBox.com HEAD section --> <link rel="stylesheet" href="engine/css/vlightbox.css" type="text/css" /> <style type="text/css">#vlightbox a#vlb{display:none}</style> <link rel="stylesheet" href="engine/css/visuallightbox.css" type="text/css" media="screen" /> <script src="engine/js/jquery.min.js" type="text/javascript"></script> <!-- End VisualLightBox.com HEAD section --> <!-- TemplateBeginEditable name="head" --> <!-- TemplateEndEditable --> </head> <body id="@@(categoria)@@"> <div id="container"> <div id="header"> <table width="100%" border="0"> <tr> <td width="67%" height="77px;"><a href="index.html"><img src="../images/Titulos/5.png" alt="" width="257" hspace="10" vspace="10" border="0" id="screen_logo" title=""/></a></td> <td width="33%" valign="top"><form id="login">Log in: <input type="text" class="theInput" name="user" /> <input type="submit" name="Submit" value="Submit" /> </form> </td> </tr> </table> </div> <!-- Aqui es donde empieza fisicamente el menu drop down --> <ul id="nav" class="dropdown dropdown-horizontal"> <li><a href="../index.html">Home</a></li> <li><a href="#" class="dir">Service 1</a></li> <li><a href="#" class="dir">Service 2</a></li> <li><a href="#" class="dir">Service 3</a></li> <li><a href="#" class="dir">Service 4</a></li> <li><a href="#" class="dir">Service 5</a></li> <li><a href="#" class="dir">Service 6</a></li> </ul> <!-- Aqui termina el menu CSS--> <!-- Reset --> <div id="wmfg"> </div> <!-- Reset --> <!-- TemplateBeginEditable name="banner-grande" --> <!-- TemplateEndEditable --> <div id="content"><!-- TemplateBeginEditable name="content" --> <p>&nbsp;</p> <!-- TemplateEndEditable --></div> <div id="footer"><a href="../terms.html">Terms and Conditions</a> |<a href="privacy.html"> Privacy Policy</a><br/> Copyright 2010. .</div> </div> </div> </body> </html> Can somebody take a look at this, and tell me what am I doing wrong ? Thanks in advance.

    Read the article

  • background image not showing in html

    - by Registered User
    I am having following css <!DOCTYPE html > <html> <head> <meta charset="utf-8"> <title>Black Goose Bistro Summer Menu</title> <link href='http://fonts.googleapis.com/css?family=Marko+One' rel='stylesheet' type='text/css'> <style> body { font-family: Georgia, serif; font-size: 100%; line-height: 175%; margin: 0 15% 0; background-image:url(images/bullseye.png); } #header { margin-top: 0; padding: 3em 1em 2em 1em; text-align: center; } a { text-decoration: none; } h1 { font: bold 1.5em Georgia, serif; text-shadow: .1em .1em .2em gray; } h2 { font-size: 1em; text-transform: uppercase; letter-spacing: .5em; text-align: center; } dt { font-weight: bold; } strong { font-style: italic; } ul { list-style-type: none; margin: 0; padding: 0; } #info p { font-style: italic; } .price { font-family: Georgia, serif; font-style: italic; } p.warning, sup { font-size: small; } .label { font-weight: bold; font-variant: small-caps; font-style: normal; } h2 + p { text-align: center; font-style: italic; } ); </style> </head> <body> <div id="header"> <h1>Black Goose Bistro &bull; Summer Menu</h1> <div id="info"> <p>Baker's Corner, Seekonk, Massachusetts<br> <span class="label">Hours: Monday through Thursday:</span> 11 to 9, <span class="label">Friday and Saturday;</span> 11 to midnight</p> <ul> <li><a href="#appetizers">Appetizers</a></li> <li><a href="#entrees">Main Courses</a></li> <li><a href="#toast">Traditional Toasts</a></li> <li><a href="#dessert">Dessert Selection</a></li> </ul> </div> </div> <div id="appetizers"> <h2>Appetizers</h2> <p>This season, we explore the spicy flavors of the southwest in our appetizer collection.</p> <dl> <dt>Black bean purses</dt> <dd>Spicy black bean and a blend of mexican cheeses wrapped in sheets of phyllo and baked until golden. <span class="price">$3.95</span></dd> <dt class="newitem">Southwestern napoleons with lump crab &mdash; <strong>new item!</strong></dt> <dd>Layers of light lump crab meat, bean and corn salsa, and our handmade flour tortillas. <span class="price">$7.95</span></dd> </dl> </div> <div id="entrees"> <h2>Main courses</h2> <p>Big, bold flavors are the name of the game this summer. Allow us to assist you with finding the perfect wine.</p> <dl> <dt class="newitem">Jerk rotisserie chicken with fried plantains &mdash; <strong>new item!</strong></dt> <dd>Tender chicken slow-roasted on the rotisserie, flavored with spicy and fragrant jerk sauce and served with fried plantains and fresh mango. <strong>Very spicy.</strong> <span class="price">$12.95</span></dd> <dt>Shrimp sate kebabs with peanut sauce</dt> <dd>Skewers of shrimp marinated in lemongrass, garlic, and fish sauce then grilled to perfection. Served with spicy peanut sauce and jasmine rice. <span class="price">$12.95</span></dd> <dt>Grilled skirt steak with mushroom fricasee</dt> <dd>Flavorful skirt steak marinated in asian flavors grilled as you like it<sup>*</sup>. Served over a blend of sauteed wild mushrooms with a side of blue cheese mashed potatoes. <span class="price">$16.95</span></dd> </dl> </div> <div id="toast"> <h2>Traditional Toasts</h2> <p>The ultimate comfort food, our traditional toast recipes are adapted from <a href="http://www.gutenberg.org/files/13923/13923-h/13923-h.htm"><cite>The Whitehouse Cookbook</cite></a> published in 1887.</p> <dl> <dt>Cream toast</dt> <dd>Simple cream sauce over highest quality toasted bread, baked daily. <span class="price">$3.95</span></dd> <dt>Mushroom toast</dt> <dd>Layers of light lump crab meat, bean and corn salsa, and our handmade flour tortillas. <span class="price">$6.95</span></dd> <dt>Nun's toast</dt> <dd>Onions and hard-boiled eggs in a cream sauce over buttered hot toast. <span class="price">$6.95</span></dd> <dt>Apple toast</dt> <dd>Sweet, cinnamon stewed apples over delicious buttery grilled bread. <span class="price">$6.95</span></dd> </dl> </div> <div id="dessert"> <h2>Dessert Selection</h2> <p>Be sure to save room for our desserts, made daily by our own <a href="http://www.jwu.edu/college.aspx?id=19510">Johnson & Wales</a> trained pastry chef.</p> <dl> <dt class="newitem">Lemon chiffon cake &mdash; <strong>new item!</strong></dt> <dd>Light and citrus flavored sponge cake with buttercream frosting as light as a cloud. <span class="price">$2.95</span></dd> <dt class="newitem">Molten chocolate cake</dt> <dd>Bubba's special dark chocolate cake with a warm, molten center. Served with or without a splash of almond liqueur. <span class="price">$3.95</span></dd> </dl> </div> <p class="warning"><sup>*</sup> We are required to warn you that undercooked food is a health risk.</p> </body> </html> but the background image does not appear in body tag you can see background-image:url(images/bullseye.png); this html page is bistro.html and the directory in which it is contained there is a folder images and inside images folder I have a file bullseye.png .I expect the png to appear in background.But that does not happen. For sake of question I am posting the image here also Let me know if the syntax of css wrong? following is image http://i.stack.imgur.com/YUKgg.png

    Read the article

  • How to create dynamic panel layout for this logo creation wizard ?

    - by Rebol Tutorial
    I want to create a wizard for the logo badge below with 3 parameters. I can make the title dynamic but for image and gradient it's hardcoded because I can't see how to make them dynamic. Code follows after pictures: custom-styles: stylize [ lab: label 60x20 right bold middle font-size 11 btn: button 64x20 font-size 11 edge [size: 1x1] fld: field 200x20 font-size 11 middle edge [size: 1x1] inf: info font-size 11 middle edge [size: 1x1] ari: field wrap font-size 11 edge [size: 1x1] with [flags: [field tabbed]] ] panel1: layout/size [ origin 0 space 2x2 across styles custom-styles h3 "Parameters" font-size 14 return lab "Title" fld_title: fld "EXPERIMENT" return lab "Logo" fld_logo: fld "http://www.rebol.com/graphics/reb-logo.gif" return lab "Gradient" fld_gradient: fld "5 55 5 10 10 71.0.6 30.10.10 71.0.6" ] 278x170 panel2: layout/size [ ;layout (window client area) size is 278x170 at the end of the spec block at 0x0 ;put the banner on the top left corner box 278x170 effect [ ; default box face size is 100x100 draw [ anti-alias on line-width 2.5 ; number of pixels in width of the border pen black ; color of the edge of the next draw element fill-pen radial 100x50 5 55 5 10 10 71.0.6 30.10.10 71.0.6 ; the draw element box ; another box drawn as an effect 15 ; size of rounding in pixels 0x0 ; upper left corner 278x170 ; lower right corner ] ] pad 30x-150 Text fld_title/text font [name: "Impact" size: 24 color: white] image http://www.rebol.com/graphics/reb-logo.gif ] 278x170 main: layout [ vh2 "Logo Badge Wizard" guide pad 20 button "Parameters" [panels/pane: panel1 show panels ] button "Rendering" [show panel2 panels/pane: panel2 show panels] button "Quit" [Unview] return box 2x170 maroon return panels: box 278x170 ] panel1/offset: 0x0 panel2/offset: 0x0 panels/pane: panel1 view main

    Read the article

  • CSS call from code behind not working

    - by SmartestVEGA
    I have the following entries in the css file. a.intervalLinks { font-size:11px; font-weight:normal; color:#003399; text-decoration:underline; margin:0px 16px 0px 0px; } a.intervalLinks:link { text-decoration:underline; } a.intervalLinks:hover { text-decoration:none; } a.intervalLinks:visited { text-decoration:underline; } a.selectedIntervalLink { font-size:12px; font-weight:bold; color:#003399; text-decoration:none; margin:0px 16px 0px 0px; } a.intervalLinks:active { text-decoration:underline; font-size:large ; } Whenever i take the click on some links (not shown) which is embedded in the webpage ..i can see the change in the link a.intervalLinks:active { text-decoration:underline; font-size:large ; (the font of the link will become large) but after clicking the page refreshes ..the changes will go away i want to keep the change for ever in that link ...even there is a page refresh i understood that ..this can achieved only throughg the code behind of asp.net Following code should work:but unfortunately its not ..could anyone help? protected override void OnInit(EventArgs e) { rptDeptList.ItemDataBound += new RepeaterItemEventHandler(rptDeptList_ItemDataBound); } void rptDeptList_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.DataItem == null) return; LinkButton btn = (LinkButton)e.Item.FindControl("LinkButton1"); btn.Attributes.Add("class", "intervalLinks"); } Current html code for links has been shown below : <ItemTemplate> <div class='dtilsDropListTxt'><div class='rightArrow' ></div> <asp:LinkButton ID="LinkButton1" runat="server" Text=<%#DataBinder.Eval(Container.DataItem, "WORK_AREA")%> CssClass="intervalLinks" OnClick="LinkButton1_Click" ></asp:LinkButton> </div> </ItemTemplate> Could anyone help?

    Read the article

  • Smallcaps / multiple fonts and bolding using 'DrawString' in GDI+

    - by Simon_Weaver
    I want to write out some text using smallcaps in combination with different fonts for different words. To clarify I might want the message 'Welcome to our New Website' which is generated into a PNG file for the header of a page. The text will be smallcaps - everything is capitalized but the 'W', 'N' and 'W' are slightly larger. The 'New Website' will be in a different font than the rest of the text. Is there a way i can do this without doing it completely manually? Doing something like this is conceptually what I want to do : graphics.DrawString("<font size=2>W</font>ELCOME TO OUR <b><font size=2>N</font>" + "EW <font size=2>W</font>EBSITE</b>"); The best approach I could find so far is here, but I'm worried that I'll go to all the trouble to do this manually and end up with some horrible kerning or tracking problems. Edit: I should have mentioned that this is being done within ASP.NET so it needs to be fast and as lean as possible. I want it to be automated so I can localize easily and not have to create tonnes of little images.

    Read the article

  • In C/C++ mode in Emacs, change face of code in #if 0...#endif block to comment face

    - by pogopop77
    I'm trying to add functionality found in some other code editors to my Emacs configuration, whereby C/C++ code within #if 0...#endif blocks is automatically set to the comment face/font. Based on my testing, cpp-highlight-mode does something like what I want, but requires user action. It seems like tying into the font-lock functionality is the correct option to make the behavior automatic. I have successfully followed examples in the GNU documentation to change the face of single-line regular expressions. For example: (add-hook 'c-mode-common-hook (lambda () (font-lock-add-keywords nil '(("\\<\\(FIXME\\|TODO\\|HACK\\|fixme\\|todo\\|hack\\)" 1 font-lock-warning-face t))))) works fine to highlight debug related keywords anywhere in a file. However, I am having problems matching #if 0...#endif as a multiline regular expression. I found some useful information in this post (How to compose region like ""), that suggested that Emacs must be told specifically to allow for multiline matches. But this code: (add-hook 'c-mode-common-hook (lambda () '(progn (setq font-lock-multiline t) (font-lock-add-keywords nil '(("#if 0\\(.\\|\n\\)*?#endif" 1 font-lock-comment-face t)))))) still does not work for me. Perhaps my regular expression is wrong (though it appears to work using M-x re-builder), I've messed up my syntax, or I'm following the wrong approach entirely. I'm using Aquamacs 2.1 (which is based on GNU Emacs 23.2.50.1) on OS X 10.6.5, if that makes a difference. Any assistance would be appreciated!

    Read the article

  • Only show link if conditional equals true

    - by Dave Morin
    I want the link to appear only when $data['block'] equals to 1, 3 or 4. Not if it equals to 2 or 5. <td style="font-size:18px;color:#f0cb01;"> <a href="kickcodes.php?id='.$data["block"].'">Reason Codes</a> </td> EDIT while ($data = mysql_fetch_array($query)) { echo ' <tr style="background-color:#576c11;"> <td style="font-size:18px; color:#f0cb01;">'.$data["keyword"].'</td> <td style="font-size:18px;color:#f0cb01;">'.$data["block"].'</td> <td style="font-size:18px;color:#f0cb01;">'.$data["phone"].'</td> <td style="font-size:18px;color:#f0cb01;">'.$data["Reason"].'</td> <td style="font-size:18px;color:#f0cb01;"><a href="kickcodes.php?id='.$data ["block"].'">Kickcodes</a></td>' echo '<td style="font-size:18px;color:#f0cb01;">'; if( $data['block'] == 1 || $data['block'] == 3 || $data['block'] == 4) { echo '<a href="kickcodes.php?id='.$data["block"].'">Reason Codes</a>'; } else { echo '<span>Reason Codes</span>'; // Or echo nothing } echo '</td>';

    Read the article

  • CSS working in IE, but not FF

    - by cdotlister
    Hi guys, I have a very simple css file for my Asp.Net MVC application. body { font-family: Arial, Helvetica, sans-serif; font-size: x-small; color: #663300; } input { font-family: Arial, Helvetica, sans-serif; font-size: x-small; background-color: #FFFF99; color: #CC6600; border: 1px solid #808000; } .headerRow { background-color: #FFFFCC; border-style: none none dotted none; border-bottom-width: 1px; border-bottom-color: #800000; font-family: Arial, Helvetica, sans-serif; font-size: x-small; font-weight: bold; text-align: left; vertical-align: middle; text-transform: uppercase; } The Body is working well in both... as is the input. However, the headerRow isn't working in FF, yet works well in IE. Here it is, being used: <table width="700" border="0" cellspacing="1" cellpadding="2"> <tr class="headerRow"> <td> Transaction Date </td> <td> Type </td> <td> Category </td> <td> Budget Assignment </td> <td> Cost Center </td> <td align="right"> Amount </td> </tr> The header row just displays as normal body text though...

    Read the article

  • Help for CSS Menu Dropdown, FF OK and IE6 Problem

    - by Taruhku
    IE Problem, FF OK. Please help..???? Screen Shoot problem click here This is my CSS dolphincontainer { position:relative; height:56px; color:#E0E0E0; background:#143D55; width:100%; font-family:Tahoma; left: 0px; } dolphinnav {position:absolute;;height:33px;font-size:12px;font-weight:bold;background:#fff url(images/dolphin_bg.gif) repeat-x bottom left;padding:0 0 0 10px;width:975px;} dolphinnav ul {margin:0;padding:0;list-style-type:none;width:auto;float:left;} dolphinnav ul li {display:block;float:left;margin:0 1px;} dolphinnav ul li a {display:block;float:left;color:#001b2c;text-decoration:none;padding:0 0 0 10px;height:33px;} dolphinnav ul li a span {padding:12px 20px 0 0;height:21px;float:left;font-weight:bold;} dolphinnav ul li a:hover {color:#fff;background:transparent url(images/dolphin_bg-OVER.gif) repeat-x bottom left;} dolphinnav ul li a:hover span {display:block;width:auto;cursor:pointer;} dolphinnav ul li a.current,#dolphinnav ul li a.current:hover {color:#fff;background:#00517e url(images/dolphin_left-ON.gif) no-repeat top left;line-height:275%;} dolphinnav ul li a.current span {display:block;padding:0 20px 0 0;width:auto;background:#00517e url(images/dolphin_right-ON.gif) no-repeat top right;height:33px;} .tuckUp { display:block; width:90px; height:30px; overflow:hidden; cursor:pointer; } .pullDown { width:90px; height:56px; } .item a:link, .item a:visited { display:inline; float:left; background:#fff url(images/dolphin_bg.gif) repeat-x top left;padding:0 0 0 10px; text-align:left; color:#444; font-size:11px; font-weight:bold; text-decoration:none; line-height:25px; margin:0 5px 0px 0px; width:80px; } .item a:hover { display:inline; float:left; background:#39c; color:#FFF; text-decoration:none; text-align:left; font-size:11px; font-weight:700; font-weight:bold; line-height:25px; padding:0 0 0 10px; margin:0 5px 0px 0px; width:80px; } HTML: <div id="dolphincontainer"> <div id="dolphinnav"> <ul> <li><a href="index.php"><span>Home</span></a></li> <li><a href="chooseus.php"><span>Why Choose Us</span></a></li> <li><a href="peraturan.php"><span>Rules</span></a></li> <li class="tuckUp" onmousemove="this.className='pullDown'" onmouseout="this.className='tuckUp'"><a href="#"><span>Transaction</span></a> <div class="item"> <a href="drop1.php">Drop Down 1</a><br /> <a href="drop2.php">Drop Down 2</a></a><br /> <a href="drop3.php">Drop Down 3</a><br /> </div> </li> <li><a href="download.php"><span>Download</span></a></li> <li><a href="aboutus.php"><span>About Us</span></a></li> <li><a href="help.php" class="current"><span>Support</span></a></li> <li><a href="promo.php"><span><font color="#FF0000"><blink>PROMO</blink> </font></span></a></li> </ul> </div> </div>

    Read the article

  • Some Emails incoming to Outlook 2007 are blank, same emails work fine on webmail, iphone, etc

    - by Funran
    This is a pretty easy problem to describe. Basically users who have just been upgraded to Outlook 2007 (yeah I know 2010 is out), are not receiving SOME emails (from outside our domain, ie hotmail, yahoo). Receiving is not the correct word, these emails come in, along with their attachments, subjects, to/from line, etc. But the body is blank. If the same user goes into their webmail, iphone, blackberry instead, they can read the message fine. It's clear to me that something in Outlook 2007 is not generating the body correctly, so it just strips it. I just don't know WHY. Our mail server was recently upgraded to Exchange 2010, users on 2010 running outlook 2003 are working fine, it's just the random emails for users using 2007. I hope I made that clear enough, thank you for any future help guys. EDIT: I don't see rft, but i swear I've seen it before. Here is the view source on a recent email. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="MSHTML 8.00.6001.19120"> <DEFANGED_style_0 <="" style=""> </head> <body bgcolor="#ffffff"> <p><DEFANGED_DIV><font color="#0000ff" size="2" face="Calibri">MS,</font></p><DEFANGED_DIV> <p><DEFANGED_DIV><font color="#0000ff" size="2" face="Calibri">Could you tell me please what the legal descrip &amp; Topo Quad name is for this Monroe P.ID Site?</font></p><DEFANGED_DIV> <p><DEFANGED_DIV><em><font color="#0000ff" size="2" face="Calibri">Thanks, Henry Roye</font></em></p><DEFANGED_DIV></body></html>

    Read the article

  • output of ext gwt label rootpanel,get.add?

    - by msaif
    i have <div id="abc"></div> I executed RootPanel.get("abc").add(new Label("aaaaaaaaaaaaa")); from GWT. then acutually GWT generates what kind of html tag?? is it like <font>aaaaaaaaaaaa</font>???? which i mean the output will be <div id="abc"><font aaaaaaaaaaaa></font></div> ??

    Read the article

  • css table column width not set

    - by bsreekanth
    Hello, I'm trying to set the width of table column to a minimum value. The header row (th) was set white-space:nowrap to prevent wrapping. Now all the columns (including td rows) set to a width that of th. I tried to expand the size of smaller columns by setting it in the html as <th style="width:200px;"> and <td style="width:200px;">, but it has no effect. In firebug, in the style section, the width setting is active element.style { width:200px; } Still, the computed tab shows the width is less than 200px. Please see the details below. th -- computed: Text font-family verdana,arial,helvetica,sans-serif font-size 10px font-weight bold font-style normal color #333333 text-transform none text-decoration none letter-spacing normal word-spacing 0 line-height 17px text-align left vertical-align baseline direction ltr Background background-color transparent background-image none background-repeat repeat background-position 0 0 background-attachment scroll opacity 1 Box Model width 152px height 17px top auto right auto bottom auto left auto margin-top 0 margin-right 0 margin-bottom 0 margin-left 0 padding-top 0 padding-right 0 padding-bottom 0 padding-left 0 border-top-width 0 border-right-width 0 border-bottom-width 0 border-left-width 0 border-top-color #333333 border-right-color #333333 border-bottom-color #333333 border-left-color #333333 border-top-style none border-right-style none border-bottom-style none border-left-style none Layout position static display block visibility visible z-index auto overflow-x visible overflow-y visible white-space nowrap clip auto float none clear none -moz-box-sizing content-box Other cursor pointer list-style-image none list-style-position outside list-style-type disc marker-offset auto and td --computed: Text font-family verdana,arial,helvetica,sans-serif font-size 11px font-weight 400 font-style normal color #222222 text-transform none text-decoration none letter-spacing normal word-spacing 0 line-height 12px text-align left vertical-align top direction ltr Background background-color transparent background-image none background-repeat repeat background-position 0 0 background-attachment scroll opacity 1 Box Model width 152px height 48px top auto right auto bottom auto left auto margin-top 0 margin-right 0 margin-bottom 0 margin-left 0 padding-top 5px padding-right 6px padding-bottom 5px padding-left 6px border-top-width 0 border-right-width 1px border-bottom-width 0 border-left-width 0 border-top-color #222222 border-right-color #222222 border-bottom-color #222222 border-left-color #DDDDDD border-top-style none border-right-style none border-bottom-style none border-left-style solid Layout position static display table-cell visibility visible z-index auto overflow-x visible overflow-y visible white-space normal clip auto float none clear none -moz-box-sizing content-box Other cursor auto list-style-image none list-style-position outside list-style-type disc marker-offset auto Any help, highly appreciated... thanks

    Read the article

  • Why html frame behave differently in Firefox and IE8 ?

    - by Frank
    I use html frame on my webiste, it's been running for I while, usually I only use Firefox to surf the net, my site looks and functions ok, but today I suddenly found IE8 has a problem with the frame on my site, if I click on the top menu items, it's supposed to display the content in the lower part of the frame, it does this correctly in Firefox, but in IE8, it displays the content in the upper part of the frame and replaces the menu items. In order to give more details, I'll include a simplified version of my html pages, at the top level there are two items, an index.html page and a file directory, all the pages except the index.html are in the directory, so it looks like this : index.html Dir_Docs 00_Home.html 00_Install_Java.html 00_Top_Menu.html 01_Home_Menu.html 01_Install_Java_Menu.html 10_Home_Welcome.html 10_How_To_Install_Java.html [ index.html ] <Html> <Head><Title>Java Applications : Tv_Panel, Java_Sound, Biz Manager and Web Academy</Title></Head> <Frameset Rows="36,*" Border=5 Bordercolor=#006B9F> <Frame Src=Dir_Docs/00_Top_Menu.html Frameborder=YES Scrolling=no Marginheight=1 Marginwidth=1> <Frame Src=Dir_Docs/00_Home.html Name=lower_frame Marginheight=1 Marginwidth=1> </Frameset> </Html> [ 00_Home.html ] <Html> <Head><Title>NMJava Application Development</Title></Head> <Frameset Cols="217,*" Align=center BorderColor="#006B9F"> <Frame Src=01_Home_Menu.html Frameborder=YES Name=side_menu Marginheight=1 Marginwidth=1> <Frame Src=10_Home_Welcome.html Name=content Marginheight=1 Marginwidth=1> </Frameset> </Html> [ 00_Install_Java.html ] <Html> <Head> <Title>Install Java</Title> </Head> <Frameset Cols="217,*" Align=center BorderColor="#006B9F"> <Frame Src=01_Install_Java_Menu.html Frameborder=YES Name=side_menu Marginheight=1 Marginwidth=1> <Frame Src=10_How_To_Install_Java.html Name=content Marginheight=1 Marginwidth=1> </Frameset> </Html> [ 00_Top_Menu.html ] <Html> <Head>Top Menu</Head> <Body> <Center> <Base target=lower_frame> <Table Border=1 Cellpadding=3 Width=100%> <Tr> <Td Align=Center Bgcolor=#3366FF><A Href=00_Home.html><Font Size=4 Color=White>Home</Font></A></Td> <Td Align=Center Bgcolor=#3366FF><A Href=00_Install_Java.html><Font Size=4 Color=White>Install Java</Font></A></Td> </Tr> </Table> </Center> </Body> </Html> [ 01_Home_Menu.html ] <Html> <Head><Title>Home Menu</Title></Head> <Base Target=content> <Body Bgcolor=#7799DD> <Center> <Table Border=1 Width=100%> <Tr><Td Align=center Bgcolor=#66AAFF><A Href=10_Home_Welcome.html>Welcome</A></Td></Tr> </Table> </Center> </Body> </Html> [ 01_Install_Java_Menu.html ] <Html> <Head><Title>Install Java</Title></Head> <Base Target=content> <Body Bgcolor=#7799DD> <Center> <Table Border=1 Width=100%> <Tr><Td Align=Center Bgcolor=#66AAFF><A Href=10_How_To_Install_Java.html>How To Install Java ?</A></Td></Tr> </Table> </Center> </Body> </Html> [ 10_Home_Welcome.html ] <Html> <Head><Title>NMJava For Software Development</Title></Head> <Body> <Center> <P> <Font Size=5 Color=blue>Welcome To NMJava For Software Development</Font> <P> </Center> </Body> </Html> [ 10_How_To_Install_Java.html ] <Html> <Head> <Title>Install Java</Title> </Head> <Body> <Center> <Br> <Font Size=5 Color=#0022AE><A Href=http://java.com/en/download/index.jsp>How To Install Java ?</A></Font> <Br> <P> <Table Width=90% Cellspacing=5 Cellpadding=5> <Tr><Td><Font Color=#0022AE> You need JRE 6 (Java Runtime Environment) to run the programs on this site. You may or may not have Java already installed on your PC, you can find out by going to the following site, if you don't have the latest version, you can install/upgrade it, it's free from Sun/Oracle at :<Font Size=4> <A Href=http://java.com/en/download/index.jsp>http://java.com/en/download/index.jsp</A></Font>.<P> </Font></Td></Tr> </Table> </Center> </Body> </Html> What's wrong with them, why the two browsers behave differently, and how to fix this ? My site is at : http://nmjava.com , in case you want to see more details. Frank

    Read the article

  • Css simple style dont work on IE but yes in any other browser

    - by DomingoSL
    Hello guys, i have a simple css file called Titulos.css who contain this: h1 { font: 50px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #111; text-shadow: 0px 2px 3px #555; } h2 { font: 14px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #CCC; text-shadow: 0px 1px 2px #555; } h3 { font: 10px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #CCC; } b1 { font: 16px Tahoma, Helvetica, Arial, Sans-Serif; color: #DDD; } b2 { font: 10px Tahoma, Helvetica, Arial, Sans-Serif; color: #F9F7ED; } .caja { width: 690px; height: 40px; background-color: transparent; border: 0px solid #000000; font-size:x-large; color: #222; font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; font-weight: bold;" size="299"; } .style1 { text-align: right; } And a page who call this file like: <link rel="stylesheet" type="text/css" href="LIB/titulos.css" /> Later in this page im trying to use some of the styles like: <div id="todo" align="center" > <div id="cabeza" style="width:850px;height:100px"> </div> <div id="contenido" style="width:850px;height:420px;background-image: url(IMG/cuadro.png)" > <div id="titulo" style="width:765px;height:75px;padding-top: 18px;margin: auto;text-align: left;"> <b1>Bienvenido <b><?php echo($username); ?></b></b1><br> <?php $check = mysql_query("SELECT * FROM sms WHERE ref = '".$username."' ORDER BY fecha DESC LIMIT 0, 1") or die(mysql_error()); while($info = mysql_fetch_array( $check )) { echo("<b1> Tu ultimo mensaje enviado fue: </b1><b2>" . $info['texto'] . " enviado el " . $info['fecha'] . "</b2>"); That only a part of the code of course, the think is, Firefox and Chrome display the code above like this: that as you can see have the styles applied. But when i see the code from IE 8 (even 7 or 6) this is what you see: So, what do you think?

    Read the article

  • AutoScaleMode.Inherit does not inherit

    - by codymanix
    I have a user control contained in a tabpage. The Form has set AutoScaleMode = AutoScaleMode.Font and the UserControl has set AutoScaleMode.Inherit. Now when I enlarge the font size of the form then the font is enlarged in the user control too, but the controls contents are not scaled. If I explicitly set AutoScaleMode.Font on the user control then it works properly. Shouldn't AutoScaleMode.Inherit work that way?

    Read the article

  • CSS / HTML - Image will not show up

    - by weka
    Ugh, ok. I've been up all night working this thing and now an image won't show. It's so darn annoying. Trying to get this .png image to show up on a simple PHP webpage. I just wanna go to sleep X_X CSS: <style> .achievement { position:relative; width:500px; background:#B5B5B5; float:left; padding:10px; margin-bottom:10px; } .icon { float:left; width:32px; height:32px; background: url("images/trophy.php") no-repeat center; padding:05px; border:4px solid #4D4D4D; } .ptsgained { position:absolute; top:0; right:0; background:#79E310; color:#fff; font-family:Tahoma; font-weight:bold; font-size:12px; padding:5px; } .achievement h1 { color:#454545; font-size:12pt; font-family:Georgia; font-weight:none; margin:0;padding:0; } .achievement p { margin:0;padding:0; font-size:12px; font-family:Tahoma; color:#1C1C1C; } .text { margin-left:10px; float:left; } </style> HTML: <div class="achievement"> <span class="ptsgained">+10</span> <div class="icon"></div> <div class="text"><h1>All Around Submitter</h1> <p>Submit and have approved content in all 6 areas.</p> </div> </div> What am I doing wrong, guys? :\

    Read the article

  • Building applications with WCF - Intro

    - by skjagini
    I am going to write series of articles using Windows Communication Framework (WCF) to develop client and server applications and this is the first part of that series. What is WCF As Juwal puts in his Programming WCF book, WCF provides an SDK for developing and deploying services on Windows, provides runtime environment to expose CLR types as services and consume services as CLR types. Building services with WCF is incredibly easy and it’s implementation provides a set of industry standards and off the shelf plumbing including service hosting, instance management, reliability, transaction management, security etc such that it greatly increases productivity Scenario: Lets consider a typical bank customer trying to create an account, deposit amount and transfer funds between accounts, i.e. checking and savings. To make it interesting, we are going to divide the functionality into multiple services and each of them working with database directly. We will run test cases with and without transactional support across services. In this post we will build contracts, services, data access layer, unit tests to verify end to end communication etc, nothing big stuff here and we dig into other features of the WCF in subsequent posts with incremental changes. In any distributed architecture we have two pieces i.e. services and clients. Services as the name implies provide functionality to execute various pieces of business logic on the server, and clients providing interaction to the end user. Services can be built with Web Services or with WCF. Service built on WCF have the advantage of binding independent, i.e. can run against TCP and HTTP protocol without any significant changes to the code. Solution Services Profile: For creating a new bank customer, getting details about existing customer ProfileContract ProfileService Checking Account: To get checking account balance, deposit or withdraw amount CheckingAccountContract CheckingAccountService Savings Account: To get savings account balance, deposit or withdraw amount SavingsAccountContract SavingsAccountService ServiceHost: To host services, i.e. running the services at particular address, binding and contract where client can connect to Client: Helps end user to use services like creating account and amount transfer between the accounts BankDAL: Data access layer to work with database     BankDAL It’s no brainer not to use an ORM as many matured products are available currently in market including Linq2Sql, Entity Framework (EF), LLblGenPro etc. For this exercise I am going to use Entity Framework 4.0, CTP 5 with code first approach. There are two approaches when working with data, data driven and code driven. In data driven we start by designing tables and their constrains in database and generate entities in code while in code driven (code first) approach entities are defined in code and the metadata generated from the entities is used by the EF to create tables and table constrains. In previous versions the entity classes had  to derive from EF specific base classes. In EF 4 it  is not required to derive from any EF classes, the entities are not only persistence ignorant but also enable full test driven development using mock frameworks.  Application consists of 3 entities, Customer entity which contains Customer details; CheckingAccount and SavingsAccount to hold the respective account balance. We could have introduced an Account base class for CheckingAccount and SavingsAccount which is certainly possible with EF mappings but to keep it simple we are just going to follow 1 –1 mapping between entity and table mappings. Lets start out by defining a class called Customer which will be mapped to Customer table, observe that the class is simply a plain old clr object (POCO) and has no reference to EF at all. using System;   namespace BankDAL.Model { public class Customer { public int Id { get; set; } public string FullName { get; set; } public string Address { get; set; } public DateTime DateOfBirth { get; set; } } }   In order to inform EF about the Customer entity we have to define a database context with properties of type DbSet<> for every POCO which needs to be mapped to a table in database. EF uses convention over configuration to generate the metadata resulting in much less configuration. using System.Data.Entity;   namespace BankDAL.Model { public class BankDbContext: DbContext { public DbSet<Customer> Customers { get; set; } } }   Entity constrains can be defined through attributes on Customer class or using fluent syntax (no need to muscle with xml files), CustomerConfiguration class. By defining constrains in a separate class we can maintain clean POCOs without corrupting entity classes with database specific information.   using System; using System.Data.Entity.ModelConfiguration;   namespace BankDAL.Model { public class CustomerConfiguration: EntityTypeConfiguration<Customer> { public CustomerConfiguration() { Initialize(); }   private void Initialize() { //Setting the Primary Key this.HasKey(e => e.Id);   //Setting required fields this.HasRequired(e => e.FullName); this.HasRequired(e => e.Address); //Todo: Can't create required constraint as DateOfBirth is not reference type, research it //this.HasRequired(e => e.DateOfBirth); } } }   Any queries executed against Customers property in BankDbContext are executed against Cusomers table. By convention EF looks for connection string with key of BankDbContext when working with the context.   We are going to define a helper class to work with Customer entity with methods for querying, adding new entity etc and these are known as repository classes, i.e., CustomerRepository   using System; using System.Data.Entity; using System.Linq; using BankDAL.Model;   namespace BankDAL.Repositories { public class CustomerRepository { private readonly IDbSet<Customer> _customers;   public CustomerRepository(BankDbContext bankDbContext) { if (bankDbContext == null) throw new ArgumentNullException(); _customers = bankDbContext.Customers; }   public IQueryable<Customer> Query() { return _customers; }   public void Add(Customer customer) { _customers.Add(customer); } } }   From the above code it is observable that the Query methods returns customers as IQueryable i.e. customers are retrieved only when actually used i.e. iterated. Returning as IQueryable also allows to execute filtering and joining statements from business logic using lamba expressions without cluttering the data access layer with tens of methods.   Our CheckingAccountRepository and SavingsAccountRepository look very similar to each other using System; using System.Data.Entity; using System.Linq; using BankDAL.Model;   namespace BankDAL.Repositories { public class CheckingAccountRepository { private readonly IDbSet<CheckingAccount> _checkingAccounts;   public CheckingAccountRepository(BankDbContext bankDbContext) { if (bankDbContext == null) throw new ArgumentNullException(); _checkingAccounts = bankDbContext.CheckingAccounts; }   public IQueryable<CheckingAccount> Query() { return _checkingAccounts; }   public void Add(CheckingAccount account) { _checkingAccounts.Add(account); }   public IQueryable<CheckingAccount> GetAccount(int customerId) { return (from act in _checkingAccounts where act.CustomerId == customerId select act); }   } } The repository classes look very similar to each other for Query and Add methods, with the help of C# generics and implementing repository pattern (Martin Fowler) we can reduce the repeated code. Jarod from ElegantCode has posted an article on how to use repository pattern with EF which we will implement in the subsequent articles along with WCF Unity life time managers by Drew Contracts It is very easy to follow contract first approach with WCF, define the interface and append ServiceContract, OperationContract attributes. IProfile contract exposes functionality for creating customer and getting customer details.   using System; using System.ServiceModel; using BankDAL.Model;   namespace ProfileContract { [ServiceContract] public interface IProfile { [OperationContract] Customer CreateCustomer(string customerName, string address, DateTime dateOfBirth);   [OperationContract] Customer GetCustomer(int id);   } }   ICheckingAccount contract exposes functionality for working with checking account, i.e., getting balance, deposit and withdraw of amount. ISavingsAccount contract looks the same as checking account.   using System.ServiceModel;   namespace CheckingAccountContract { [ServiceContract] public interface ICheckingAccount { [OperationContract] decimal? GetCheckingAccountBalance(int customerId);   [OperationContract] void DepositAmount(int customerId,decimal amount);   [OperationContract] void WithdrawAmount(int customerId, decimal amount);   } }   Services   Having covered the data access layer and contracts so far and here comes the core of the business logic, i.e. services.   .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } ProfileService implements the IProfile contract for creating customer and getting customer detail using CustomerRepository. using System; using System.Linq; using System.ServiceModel; using BankDAL; using BankDAL.Model; using BankDAL.Repositories; using ProfileContract;   namespace ProfileService { [ServiceBehavior(IncludeExceptionDetailInFaults = true)] public class Profile: IProfile { public Customer CreateAccount( string customerName, string address, DateTime dateOfBirth) { Customer cust = new Customer { FullName = customerName, Address = address, DateOfBirth = dateOfBirth };   using (var bankDbContext = new BankDbContext()) { new CustomerRepository(bankDbContext).Add(cust); bankDbContext.SaveChanges(); } return cust; }   public Customer CreateCustomer(string customerName, string address, DateTime dateOfBirth) { return CreateAccount(customerName, address, dateOfBirth); } public Customer GetCustomer(int id) { return new CustomerRepository(new BankDbContext()).Query() .Where(i => i.Id == id).FirstOrDefault(); }   } } From the above code you shall observe that we are calling bankDBContext’s SaveChanges method and there is no save method specific to customer entity because EF manages all the changes centralized at the context level and all the pending changes so far are submitted in a batch and it is represented as Unit of Work. Similarly Checking service implements ICheckingAccount contract using CheckingAccountRepository, notice that we are throwing overdraft exception if the balance falls by zero. WCF has it’s own way of raising exceptions using fault contracts which will be explained in the subsequent articles. SavingsAccountService is similar to CheckingAccountService. using System; using System.Linq; using System.ServiceModel; using BankDAL.Model; using BankDAL.Repositories; using CheckingAccountContract;   namespace CheckingAccountService { [ServiceBehavior(IncludeExceptionDetailInFaults = true)] public class Checking:ICheckingAccount { public decimal? GetCheckingAccountBalance(int customerId) { using (var bankDbContext = new BankDbContext()) { CheckingAccount account = (new CheckingAccountRepository(bankDbContext) .GetAccount(customerId)).FirstOrDefault();   if (account != null) return account.Balance;   return null; } }   public void DepositAmount(int customerId, decimal amount) { using(var bankDbContext = new BankDbContext()) { var checkingAccountRepository = new CheckingAccountRepository(bankDbContext); CheckingAccount account = (checkingAccountRepository.GetAccount(customerId)) .FirstOrDefault();   if (account == null) { account = new CheckingAccount() { CustomerId = customerId }; checkingAccountRepository.Add(account); }   account.Balance = account.Balance + amount; if (account.Balance < 0) throw new ApplicationException("Overdraft not accepted");   bankDbContext.SaveChanges(); } } public void WithdrawAmount(int customerId, decimal amount) { DepositAmount(customerId, -1*amount); } } }   BankServiceHost The host acts as a glue binding contracts with it’s services, exposing the endpoints. The services can be exposed either through the code or configuration file, configuration file is preferred as it allows run time changes to service behavior even after deployment. We have 3 services and for each of the service you need to define name (the class that implements the service with fully qualified namespace) and endpoint known as ABC, i.e. address, binding and contract. We are using netTcpBinding and have defined the base address with for each of the contracts .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } <system.serviceModel> <services> <service name="ProfileService.Profile"> <endpoint binding="netTcpBinding" contract="ProfileContract.IProfile"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:1000/Profile"/> </baseAddresses> </host> </service> <service name="CheckingAccountService.Checking"> <endpoint binding="netTcpBinding" contract="CheckingAccountContract.ICheckingAccount"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:1000/Checking"/> </baseAddresses> </host> </service> <service name="SavingsAccountService.Savings"> <endpoint binding="netTcpBinding" contract="SavingsAccountContract.ISavingsAccount"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:1000/Savings"/> </baseAddresses> </host> </service> </services> </system.serviceModel> Have to open the services by creating service host which will handle the incoming requests from clients.   using System;   namespace ServiceHost { class Program { static void Main(string[] args) { CreateHosts(); Console.ReadLine(); }   private static void CreateHosts() { CreateHost(typeof(ProfileService.Profile),"Profile Service"); CreateHost(typeof(SavingsAccountService.Savings), "Savings Account Service"); CreateHost(typeof(CheckingAccountService.Checking), "Checking Account Service"); }   private static void CreateHost(Type type, string hostDescription) { System.ServiceModel.ServiceHost host = new System.ServiceModel.ServiceHost(type); host.Open();   if (host.ChannelDispatchers != null && host.ChannelDispatchers.Count != 0 && host.ChannelDispatchers[0].Listener != null) Console.WriteLine("Started: " + host.ChannelDispatchers[0].Listener.Uri); else Console.WriteLine("Failed to start:" + hostDescription); } } } BankClient    The client has no knowledge about service business logic other than the functionality it exposes through the contract, end points and a proxy to work against. The endpoint data and server proxy can be generated by right clicking on the project reference and choosing ‘Add Service Reference’ and entering the service end point address. Or if you have access to source, you can manually reference contract dlls and update clients configuration file to point to the service end point if the server and client happens to be being built using .Net framework. One of the pros with the manual approach is you don’t have to work against messy code generated files.   <system.serviceModel> <client> <endpoint name="tcpProfile" address="net.tcp://localhost:1000/Profile" binding="netTcpBinding" contract="ProfileContract.IProfile"/> <endpoint name="tcpCheckingAccount" address="net.tcp://localhost:1000/Checking" binding="netTcpBinding" contract="CheckingAccountContract.ICheckingAccount"/> <endpoint name="tcpSavingsAccount" address="net.tcp://localhost:1000/Savings" binding="netTcpBinding" contract="SavingsAccountContract.ISavingsAccount"/>   </client> </system.serviceModel> The client uses a façade to connect to the services   using System.ServiceModel; using CheckingAccountContract; using ProfileContract; using SavingsAccountContract;   namespace Client { public class ProxyFacade { public static IProfile ProfileProxy() { return (new ChannelFactory<IProfile>("tcpProfile")).CreateChannel(); }   public static ICheckingAccount CheckingAccountProxy() { return (new ChannelFactory<ICheckingAccount>("tcpCheckingAccount")) .CreateChannel(); }   public static ISavingsAccount SavingsAccountProxy() { return (new ChannelFactory<ISavingsAccount>("tcpSavingsAccount")) .CreateChannel(); }   } }   With that in place, lets get our unit tests going   using System; using System.Diagnostics; using BankDAL.Model; using NUnit.Framework; using ProfileContract;   namespace Client { [TestFixture] public class Tests { private void TransferFundsFromSavingsToCheckingAccount(int customerId, decimal amount) { ProxyFacade.CheckingAccountProxy().DepositAmount(customerId, amount); ProxyFacade.SavingsAccountProxy().WithdrawAmount(customerId, amount); }   private void TransferFundsFromCheckingToSavingsAccount(int customerId, decimal amount) { ProxyFacade.SavingsAccountProxy().DepositAmount(customerId, amount); ProxyFacade.CheckingAccountProxy().WithdrawAmount(customerId, amount); }     [Test] public void CreateAndGetProfileTest() { IProfile profile = ProxyFacade.ProfileProxy(); const string customerName = "Tom"; int customerId = profile.CreateCustomer(customerName, "NJ", new DateTime(1982, 1, 1)).Id; Customer customer = profile.GetCustomer(customerId); Assert.AreEqual(customerName,customer.FullName); }   [Test] public void DepositWithDrawAndTransferAmountTest() { IProfile profile = ProxyFacade.ProfileProxy(); string customerName = "Smith" + DateTime.Now.ToString("HH:mm:ss"); var customer = profile.CreateCustomer(customerName, "NJ", new DateTime(1982, 1, 1)); // Deposit to Savings ProxyFacade.SavingsAccountProxy().DepositAmount(customer.Id, 100); ProxyFacade.SavingsAccountProxy().DepositAmount(customer.Id, 25); Assert.AreEqual(125, ProxyFacade.SavingsAccountProxy().GetSavingsAccountBalance(customer.Id)); // Withdraw ProxyFacade.SavingsAccountProxy().WithdrawAmount(customer.Id, 30); Assert.AreEqual(95, ProxyFacade.SavingsAccountProxy().GetSavingsAccountBalance(customer.Id));   // Deposit to Checking ProxyFacade.CheckingAccountProxy().DepositAmount(customer.Id, 60); ProxyFacade.CheckingAccountProxy().DepositAmount(customer.Id, 40); Assert.AreEqual(100, ProxyFacade.CheckingAccountProxy().GetCheckingAccountBalance(customer.Id)); // Withdraw ProxyFacade.CheckingAccountProxy().WithdrawAmount(customer.Id, 30); Assert.AreEqual(70, ProxyFacade.CheckingAccountProxy().GetCheckingAccountBalance(customer.Id));   // Transfer from Savings to Checking TransferFundsFromSavingsToCheckingAccount(customer.Id,10); Assert.AreEqual(85, ProxyFacade.SavingsAccountProxy().GetSavingsAccountBalance(customer.Id)); Assert.AreEqual(80, ProxyFacade.CheckingAccountProxy().GetCheckingAccountBalance(customer.Id));   // Transfer from Checking to Savings TransferFundsFromCheckingToSavingsAccount(customer.Id, 50); Assert.AreEqual(135, ProxyFacade.SavingsAccountProxy().GetSavingsAccountBalance(customer.Id)); Assert.AreEqual(30, ProxyFacade.CheckingAccountProxy().GetCheckingAccountBalance(customer.Id)); }   [Test] public void FundTransfersWithOverDraftTest() { IProfile profile = ProxyFacade.ProfileProxy(); string customerName = "Angelina" + DateTime.Now.ToString("HH:mm:ss");   var customerId = profile.CreateCustomer(customerName, "NJ", new DateTime(1972, 1, 1)).Id;   ProxyFacade.SavingsAccountProxy().DepositAmount(customerId, 100); TransferFundsFromSavingsToCheckingAccount(customerId,80); Assert.AreEqual(20, ProxyFacade.SavingsAccountProxy().GetSavingsAccountBalance(customerId)); Assert.AreEqual(80, ProxyFacade.CheckingAccountProxy().GetCheckingAccountBalance(customerId));   try { TransferFundsFromSavingsToCheckingAccount(customerId,30); } catch (Exception e) { Debug.WriteLine(e.Message); }   Assert.AreEqual(110, ProxyFacade.CheckingAccountProxy().GetCheckingAccountBalance(customerId)); Assert.AreEqual(20, ProxyFacade.SavingsAccountProxy().GetSavingsAccountBalance(customerId)); } } }   We are creating a new instance of the channel for every operation, we will look into instance management and how creating a new instance of channel affects it in subsequent articles. The first two test cases deals with creation of Customer, deposit and withdraw of month between accounts. The last case, FundTransferWithOverDraftTest() is interesting. Customer starts with depositing $100 in SavingsAccount followed by transfer of $80 in to checking account resulting in $20 in savings account.  Customer then initiates $30 transfer from Savings to Checking resulting in overdraft exception on Savings with $30 being deposited to Checking. As we are not running both the requests in transactions the customer ends up with more amount than what he started with $100. In subsequent posts we will look into transactions handling.  Make sure the ServiceHost project is set as start up project and start the solution. Run the test cases either from NUnit client or TestDriven.Net/Resharper which ever is your favorite tool. Make sure you have updated the data base connection string in the ServiceHost config file to point to your local database

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >