Daily Archives

Articles indexed Wednesday May 5 2010

Page 3/119 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • 3 column sticky footer

    - by blackessej
    html, body, #box { padding:0px; margin:0px; height:100%; min-height:100%; } body { background-image:url(images/footerbg.png); background-repeat:repeat-x repeat-y scroll; font-size:12px; font-family:Georgia; color:#564b47; } p, h1 { margin:0px 10px 10px 10px; } h1 { font-size:14px; padding-top:10px; text-transform:uppercase; color:#564b47; background-color:transparent; } a { color:#ff66cc; font-size:11px; background-color:transparent; text-decoration:none; } pre { color:#564b47; font-size:11px; background-color:transparent; } #box { position:relative; width:750px; margin:0 auto; text-align:left; height:auto!important; } #shadow { background:url("images/shadow.png") repeat-y scroll 0 0 transparent; width:760px; margin:auto; padding:0px; text-align:left; height:100%; z-index:0; margin-bottom:-40px; } #left { width:175px; float:left; background-color:#ff99cc; height:auto!important; height:100%; min-height:100%; text-align:left; } #content { width:400px; float:left; overflow:auto; background-color:#fff; height:auto!important; } #right { width:175px; float:right; background-color:#ff99cc; height:auto!important; height:100%; min-height:100%; text-align:right; } #head { background-image:url(images/banner.png); background-repeat:no-repeat; background-color:#000; height:125px; text-align:center; margin:auto; } #menu { width:100%; } p a { color:#000; text-decoration:underline; } a { color:#fb0303; text-decoration:none; outline:none; } a:visited { color:#fb0303; } p a:hover { text-decoration:underline!important; } ul#nav { margin:auto; width:100%; } ul#nav li a { display:block; font-size:12px; font-weight:bold; padding:4px; background:#000; } ul#nav li a:hover { background:#000; color:#fff; } li { list-style:none; top:100px; float:left; position:relative; width:110px; text-align:center; } li ul { display:none; position:relative; width:auto; margin-left:6px; border-top:4px dotted #fb0303; } li>ul { top:-102px; left:-40px; } li:hover ul, li.over ul { display:block; } ul#nav li.current a { background:#000; } ul#nav li.current a:hover { background:#000; } #player { width:360px; height:240px; position:absolute; z-index:2; } #head h1 { font-size:11px; text-transform:uppercase; text-align:right; color:#564b47; background-color:#90897a; padding:5px 15px; margin:0px; } #head p { padding:10px; margin:0px; } .footer { position:relative; height:40px; background-color:#444; } I want the three columns to be 100% height so that they go all the way to the footer. Right now, they're only as long as their content. The columns are #left, #right and #content. Pretty new to this stuff. Please feel free to point out sloppy code, redundancy, etc. And thank you.

    Read the article

  • Please help on multiple match replacement

    - by duenguyen
    I have a perl code: my $s = "The+quick+brown+fox+jumps+over+the+lazy+dog+that+is+my+dog"; what I want is to replace every + with space and dog with cat i have this regular expression $s =~ s/+(.*)dog/ ${1}cat/g; But it only match first occurrence of + and last dog. Please help

    Read the article

  • When is ¦ not equal to ¦?

    - by Trey Jackson
    Background. I'm working with netlists, and in general, people specify different hierarchies by using /. However, it's not illegal to actually use a / as a part of an instance name. For example, X1/X2/X3/X4 might refer to instance X4 inside another instance named X1/X2/X3. Or it might refer an instance named X3/X4 inside an instance named X2 inside an instance named X1. Got it? There's really no "regular" character that cannot be used as a part of an instance name, so you resort to a non-printable one, or ... perhaps one outside of the standard 0..127 ASCII chars. I thought I'd try (decimal) 166, because for me it shows up as the pipe: ¦. So... I've got some C++ code which constructs the path name using ¦ as the hierarchical separator, so the path above looks like X1¦X2/X3¦X4. Now the GUI is written in Tcl/Tk, and to properly translate this into human readable terms I need to do something like the following: set path [getPathFromC++] ;# returns X1¦X2/X3¦X4 set humanreadable [join [split $path ¦] /] Basically, replace the ¦ with / (I could also accomplish this with [string map]). Now, the problem is, the ¦ in the string I get from C++ doesn't match the ¦ I can create in Tcl. i.e. This fails: set path [getPathFromC++] ;# returns X1¦X2/X3¦X4 string match $path [format X1%cX2/X3%cX4 166 166] Visually, the two strings look identical, but string match fails. I even tried using scan to see if I'd mixed up the bit values. But set path [getPathFromC++] ;# returns X1¦X2/X3¦X4 set path2 [format X1%cX2/X3%cX4 166 166] for {set i 0} {$i < [string length $path]} {incr i} { set p [string range $path $i $i] set p2 [string range $path2 $i $i] scan %c $p c scan %c $p2 c2 puts [list $p $c :::: $p2 $c2 equal? [string equal $c $c2]] } Produces output which looks like everything should match, except the [string equal] fails for the ¦ characters with a print line: ¦ 166 :::: ¦ 166 equal? 0 For what it's worth, the character in C++ is defined as: const char SEPARATOR = 166; Any ideas why a character outside the regular ASCII range would fail like this? When I changed the separator to (decimal) 28 (^\), things worked fine. I just don't want to get bit by a similar problem on a different platform. (I'm currently using Redhat Linux).

    Read the article

  • Google Reader API with Objective-C - Problem getting token

    - by JustinXXVII
    I am able to successfully get the SID (SessionID) for my Google Reader account. In order to obtain the feed and do other operations inside Google Reader, you have to obtain an authorization token. I'm having trouble doing this. Can someone shed some light? //Create a cookie to append to the GET request NSDictionary *cookieDictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"SID",@"NSHTTPCookieName",self.sessionID,@"NSHTTPCookieValue",@".google.com",@"NSHTTPCookieDomain",@"/",@"NSHTTPCookiePath",@"NSHTTPCookieExpires",@"160000000000",nil]; NSHTTPCookie *authCookie = [NSHTTPCookie cookieWithProperties:cookieDictionary]; //The URL to obtain the Token from NSURL *tokenURL = [NSURL URLWithString:@"http://www.google.com/reader/api/0/token"]; NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL:tokenURL]; //Not sure if this is right: add cookie to array, extract the headers from the cookie inside the array...? [tokenRequest setAllHTTPHeaderFields:[NSHTTPCookie requestHeaderFieldsWithCookies:[NSArray arrayWithObjects:authCookie,nil]]]; //This gives me an Error 403 Forbidden in the didReceiveResponse of the delegate [NSURLConnection connectionWithRequest:tokenRequest delegate:self]; I get a 403 Forbidden error as the response from Google. I'm probably not doing it right. I set the dictionary values according to the documentation for NSHTTPCookie.

    Read the article

  • Generics in custom configuration sections

    - by Jonn
    I tried making a custom configuration class that went on like this: WatcherServiceInfoSection<TWatcherServiceDetailElement> where TWatcherServiceDetailElement is a ConfigurationElement inside it. Now when I call the type in the ConfigSections area of AppConfig I get the error: An error occurred creating the configuration section handler for WatcherServiceInfo: Could not load type 'Library.Common.Utilities.ConfigurationHandler.WatcherServiceInfoSection<ASNDPService.Configuration.WatcherServiceDetailElement>' from assembly Is what I'm doing possible? Can I have generic types in the type attribute for a custom section element? EDIT Additionally, how about ConfigurationElementCollection objects? Like in the above example, how could I do a [ConfigurationProperty("WatcherServiceDetails", IsRequired = true, IsDefaultCollection = true)] [ConfigurationCollection(typeof(TWatcherServiceDetailElement), AddItemName = "WatcherServiceDetail")] public WatcherServiceDetailCollection<TWatcherServiceDetailElement> WatcherServiceDetails I'm aware that type parameters aren't allowed for attributes and that's what I want to know how to do.

    Read the article

  • Building Custom HTTP Help Pages with WCF

    - by Jesse Ezell
    Been asked this a few times and needed to figure it out myself, so I put together a post on how to host custom HTTP help pages for your WCF services: http://blog.iserviceoriented.com/index.php/2010/05/04/building-custom-http-help-pages-with-wcf/ A little help from the WCF team to open up some of the internal classes would make it more straightforward... until them, it takes a bit of hacking and black magic.

    Read the article

  • High-concurrency counters without sharding

    - by dound
    This question concerns two implementations of counters which are intended to scale without sharding (with a tradeoff that they might under-count in some situations): http://appengine-cookbook.appspot.com/recipe/high-concurrency-counters-without-sharding/ (the code in the comments) http://blog.notdot.net/2010/04/High-concurrency-counters-without-sharding My questions: With respect to #1: Running memcache.decr() in a deferred, transactional task seems like overkill. If memcache.decr() is done outside the transaction, I think the worst-case is the transaction fails and we miss counting whatever we decremented. Am I overlooking some other problem that could occur by doing this? What are the significiant tradeoffs between the two implementations? Here are the tradeoffs I see: #2 does not require datastore transactions. To get the counter's value, #2 requires a datastore fetch while with #1 typically only needs to do a memcache.get() and memcache.add(). When incrementing a counter, both call memcache.incr(). Periodically, #2 adds a task to the task queue while #1 transactionally performs a datastore get and put. #1 also always performs memcache.add() (to test whether it is time to persist the counter to the datastore). Conclusions (without actually running any performance tests): #1 should typically be faster at retrieving a counter (#1 memcache vs #2 datastore). Though #1 has to perform an extra memcache.add() too. However, #2 should be faster when updating counters (#1 datastore get+put vs #2 enqueue a task). On the other hand, with #1 you have to be a bit more careful with the update interval since the task queue quota is almost 100x smaller than either the datastore or memcahce APIs.

    Read the article

  • RequiredFieldValidator not working.

    - by ProfK
    With the following simple mark-up, I get very strange behaviour in FF and IE8. If I give the textbox focus, and tab out, nothing happens. If I give a user name value, and erase it immediately, nothing happens. However, only when I supply a user name, tab away, the erase it and tab away again, do I finally get a red star "required" mark. The summary doesn't show at all.

    Read the article

  • COM AddIn for Outlook Tries to Install Self on Startup

    - by Ben
    Hi, I have an outlook addin that I have been developing for some time now, and am experiencing a problem. If I have a computer with two 'administrator' users (call them User A and User B), the addin installs and runs just fine as long as the same user tries to run it. In other words, if User A installs the addin, then User A has no problem using. The strange behavior comes in when we see the following scenario: User A installs the addin (for all users), User B launches outlook and observes that the addin is trying to install itself yet again. If User B cancels out of the 'install', he can then go and use the addin just fine. Right now, I use office's registry key propagation to do an 'all users' install, and I inspected the registry for any duplications and found none. I even used the officeins tool to try and detect if there was any duplication going on, and found none. I'm really bewildered as to why the addin would try to install itself over and over again. Does anyone know why this might be happening?

    Read the article

  • Best Android 2.1 app

    - by gurun8
    Aside from the standard stock apps shipped with your phone, what's the best Android 2.1 app in the Market Place today? You know what can't live without it? What makes your life better/easier? What just plan works day-in and day-out?

    Read the article

  • What is the correct way to create a single instance application?

    - by Nidonocu
    Using C# and WPF under .net (rather than WindowsForms or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are. The code needs to also inform the already running instance that the user tried to start a second one, and maybe also pass any command line arguments if any existed.

    Read the article

  • How do I create English-language list (name1, name2, AND name3) in Ruby on Rails?

    - by Angela
    Quite possibly there could be a rails magic I've missed, but I'm guessing it will be in Ruby. I have a model called Company which has_many Contacts. Suppose Company has Contact 1, Contact 2, Contact 3, and Contact 4. When I create a textblog for each Contact, I want to output the following (where Contact = Contact 1) "Hi, Contact 1, I am also writing to Contact 2, Contact 3, and Contact 4." So it needs to extract the Contact in the salutation and then list them, inserting "and" before the last Contact in the list.

    Read the article

  • Does the Eclipse IDE support JSF 2.0?

    - by Shane
    I have the WTP 3.1 plugin installed and have also installed the Glassfish v3 plugin. I am able to register my server. When I create a dynamic web project, I can see that the maximum dynamic web module version available is 2.5. I then choose the default configuration for Glassfish v3 but, when I look at it JSF, it is not selected by default. When I select it, the maximum version available is 1.2. I want to use JSF with facelets - does Eclipse support this? I can't seem to find anything helpful on the Eclipse WTP site.

    Read the article

  • Inserting default "admin" user into database during Rails App startup

    - by gbc
    I'm building my first real rails application for a little in-house task. Most of the application tasks require authentication/authorization. The first time the app starts up (or starts with a wiped db), I'd like the process to be: User logs into the admin panel using "admin" & "admin" for authentication info. User navigates to admin credentials editing page and changes name and password to something safer so that "admin" & "admin" is no longer a valid login. To achieve this result, I'd like to stuff a default username & password combination into the database on if the application starts up and detects that there are no user credentials in the 'users' table. For example: if User.count == 0 User.create(:name => "admin", :password => "admin") end However, I'm unsure where to place that code. I tried adding an initializer script in the config/initializers, but the error I received appeared to indicate that the model classes weren't yet loaded into the application. So I'm curious to know at what point I can hook into the application startup cycle and insert data into the database through ActiveRecord before requests are dispatched.

    Read the article

  • Jasper Reports and iReport issue

    - by William
    I am having an issue with JasperReports I can not solve. I am using Eclipse, OpenReports 3.2 and IReport 3.7 The issue I am having is that the report does nothing. When I preview the report in IReport I can at least get a "Document has no pages" message but when I try to open it using OpenReports it doesn't do anything. I get the open reports header and the copyright message but nothing between them. I was able to track it down to line 150 in ReportRunAction.java in OpenReports. That line is: jasperPrint = jasperEngine.fillReport(reportInput); At least that is the line the page dies on. I can't swear that the issue isn't that parameter. Through looking around all I have been able to find is something about how the report needs to be compiled with the same version of the jasperreports.jar that OpenReports uses. I have no idea how to tell if/what version of jasper reports is being bundled into the .jasper file though. Is that my problem? If so how do I tell/set the version of the jar that gets bundled? If not; help!

    Read the article

  • Is Prince the best way to PDF in Ruby on Rails?

    - by Angela
    After several Google searches, it appears that the way to create PDF's in Rails from HTML and CSS (versus a new markup language) is to use Prince. With licensing at $3800 for my non-big-commercial app, I'm wondering if this is, in fact, consensus or people have an alternative they can share the what's and how's.

    Read the article

  • Coffee, Tea, Etc. (Mae Hong Son, Thailand)

    Rating: When we were on our initial conference call with AJWS and the other SE Asia volunteers, one of the questions asked was, can I get good coffee? The response was something to the effect of this volunteering assignment is a good opportunity to kick your coffee habit. While Lauren and I certainly appreciate a [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >