Search Results

Search found 2575 results on 103 pages for 'canonical cover'.

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

  • HTML overlay height to cover entire visible page

    - by Evgeny
    I have a web page that loads some stuff using AJAX. I want to display an overlay with a loading indicator while the loading is in progress, so that the user cannot interact with most of the page - except the menu at the top. I'm using jQuery and the jQuery BlockUI plugin to do this. I call $(element).block() and it works fine, but the overlay only extends as far down as the current content of my page. As more content is loaded and added to the page the overlay moves down with it and this looks a bit ugly. Ideally I'd like it to cover the entire visible area of the page right from the start. A simple hack for doing this would be to set a large height value for the overlay, like this: $(myElement).block({ overlayCSS: { height: '10000px' } }); ... but this creates a scrollbar! How do I avoid this and make it just the right height to cover the visible page, but not enlarge it?

    Read the article

  • DNSSEC - What doesn't it cover?

    - by KP65
    I'm currently revising for an exam to do with DNS/DNSSEC. While I know DNSSEC provides various security enhancements for DNS, I would like to dive a bit deeper(for my own thirst for knowledge!) and would like to know what is still problematic security wise even after DNSSEC is employed? After all it can't have solved all programs DNS was having with regards to security, right? Thanks

    Read the article

  • Canonical Redirect on Dynamic Mass Virtual Hosts on Apache

    - by Josh
    I have a Web app on Apache that allows users to point their domain to the server. Right now I'm using Apache's dynamic mass virtual hosts with an entry VirtualDocumentRoot /www/hosts/%0/docs So with www.companydomain.com it points to /www/hosts/www.companydomain.com/docs The problem is when the user goes to companydomain.com it will point to /www/hosts/companydomain.com/docs Is there an easy way to automatically have Apache check to see if a directory exists for the virtual host, and if not, look for the host name with "www." in front of it? Other subdomains are fine (i.e. abc.domain.com should point to a diff. directory than def.domain.com) but the whole "www" issue is a mystery to me. I am using dynamic mass virtual hosts so the server does not have to restart after each registration for the application. If there is a different way that is fine as long as apache isn't restarted each time. How can I accomplish this? Worst case scenario if there were a way to redirect to a "default" location on the server if not found I could always do a check via PHP or something but I feel like that is a bit hacked together and there has to be a more efficient way. Thanks in advance!

    Read the article

  • Can I use wildcards is puppet package ensure to cover multiple releaseversion

    - by Rob van den Eijnde
    Using puppet I want to update packages on my (CentOS 5 & 6 servers) in a controlled way. Therefore I don't want to use ensure=>latest but rather ensure=>3.0.1-1. Example: class puppet::installation inherits puppet { package { "puppet": ensure => "3.0.1-1", } } The update works alright but puppet agent keeps complaining that there is a difference: /Stage[main]/Puppet::Installation/Package[puppet]/ensure: current_value 3.0.1-1.el6, should be 3.0.1-1 (noop) I can solve this by changing the ensure rule to 3.0.1-1.el6 but than that won't work on CentOS 5. Is there a short/clean way to solve this or do I have to write to seperate, os-releaseversion dependant rules. I have been googling for a solution but didn't find anything pertaining to this particular question. Any suggestion or reference to a relevant example would be appreciated.

    Read the article

  • The canonical "blocking BitTorrent" question

    - by Aphex5
    How can one block, or severely slow down, BitTorrent and similar peer-to-peer (P2P) services on one's small home/office network? In searching Server Fault I wasn't able to find a question that served as a rallying point for the best technical ideas on this. The existing questions are all about specific situations, and the dominant answers are social/legal in nature. Those are valid approaches, but a purely technical discussion would be useful to a lot of people, I suspect. Let's assume that you don't have access to the machines on the network. With encryption use increasing in P2P traffic, it seems like stateful packet inspection is becoming a less workable solution. One idea that seems to make sense to me is simply throttling down heavy users by IP, regardless of what they're sending or receiving -- but it doesn't seem many routers support that functionality at the moment. What's your preferred method to throttle P2P/BitTorrent traffic? My apologies if this is a dupe.

    Read the article

  • Canonical configuration for multiple-instance Postfix?

    - by threecheeseopera
    I recently attempted to reconfigure an existing single-instance Postfix server (multi-homed) to support multiple MTA instances, but failed miserably (read: open relay, nastygram from ISP). It appears that there are several methods that can be used to accomplish this, and the various (and numerous) secondary sources that I found online were 'all over the map' with respect to which they used/glued together. Can anyone provide a working configuration (or tips) that use postmulti to manage a multi-instance Postfix setup?

    Read the article

  • How do I cover unintuitive code blocks?

    - by naivedeveloper
    For some reason, I'm having a hard time trying to cover the block of code below. This code is an excerpt from the UNIX uniq command. I'm trying to write test cases to cover all blocks, but can't seem to reach this block: if (nfiles == 2) { // Generic error routine } In context: int main (int argc, char **argv) { int optc = 0; bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL); int nfiles = 0; char const *file[2]; file[0] = file[1] = "-"; program_name = argv[0]; skip_chars = 0; skip_fields = 0; check_chars = SIZE_MAX; for (;;) { /* Parse an operand with leading "+" as a file after "--" was seen; or if pedantic and a file was seen; or if not obsolete. */ if (optc == -1 || (posixly_correct && nfiles != 0) || ((optc = getopt_long (argc, argv, "-0123456789Dcdf:is:uw:", longopts, NULL)) == -1)) { if (optind == argc) break; if (nfiles == 2) { // Handle errors } file[nfiles++] = argv[optind++]; } else switch (optc) { case 1: { unsigned long int size; if (optarg[0] == '+' && posix2_version () < 200112 && xstrtoul (optarg, NULL, 10, &size, "") == LONGINT_OK && size <= SIZE_MAX) skip_chars = size; else if (nfiles == 2) { // Handle error } else file[nfiles++] = optarg; } break; } } } Any help would be greatly appreciated. Thanks.

    Read the article

  • CSS - background-size: cover; not working in Firefox

    - by Jayant Bhawal
    body{ background-image: url("./content/site_data/bg.jpg"); background-size: cover; background-repeat: no-repeat; font-family: 'Lobster', cursive; } Check: http://demo.jayantbhawal.in on firefox browsers, NOT in widescreen mode. The code works on Chrome(Android + PC) and even the stock Android browser, but NOT Firefox(Android + PC). Is there any good alternative to it? Why is it not working anyways? Googled this issue a lot of times, but no one else seems to have this problem. Is it just me? In any case, how do I fix it? There are quite some questions on SO about it too, but none of them provide a legitimate solution, so can someone just tell me if they have background-size: cover; issues on firefox too? So basically tell me 3 things: 1. Why is it happening? 2. What is a good alternative to it? 3. Is this happening to you too? On Firefox browsers of course. Chrome Version 35.0.1916.114 m Firefox Version 29.0.1 Note: I may already be trying to fix it so at times you may see a totally weird page. Wait a bit and reload.

    Read the article

  • Generate canonical / real URL based on base.href or location

    - by blueyed
    Is there a method/function to get the canonical / transformed URL, respecting any base.href setting of the page? I can get the base URL via (in jQuery) using $("base").attr("href") and I could use string methods to parse the URL meant to being made relative to this, but $("base").attr("href") has no host, path etc attributes (like window.location has) manually putting this together is rather tedious E.g., given a base.href of "http://example.com/foo/" and a relative URL "/bar.js", the result should be: "http://example.com/bar.js" If base.href is not present, the URL should be made relative to window.location. This should handle non-existing base.href (using location as base in this case). Is there a standard method available for this already? (I'm looking for this, since jQuery.getScript fails when using a relative URL like "/foo.js" and BASE tag is being used (FF3.6 makes an OPTIONS request, and nginx cannot handle this). When using the full URL (base.href.host + "/foo.js", it works).)

    Read the article

  • Problem deploying portlets on JBoss Portal 2.7.2: Not a canonical value

    - by Dee
    I just downloaded the JBoss Portal Server 2.7.2 (JBoss Portal + JBoss AS 4.2.3 bundle to be precise) and tried deploying portlets just as the SimpleHelloWorld provided in the samples. The portlet gets deployed fine but when I put it on a page I get the following exception. I tried adding other Portlets as well (such as the booking MVC portelt supplied with Spring WebFlow dist) but the same problem happens. The problem happens when the new instances are created by me, example when i create a new instance of CMS Portlet, I get the same error. If I use an existing instance it works. If I deploy a portlet that creates an instance using the "portle-instances.xml" then it works fine, but creating additional instances using the Admin and deploying them on page fails due to the following error. What am I doing wrong? Can anyone please help? javax.servlet.ServletException: java.lang.IllegalArgumentException: Not a canonical value SimplestHelloWorldWindow org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:278) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) root cause java.lang.IllegalArgumentException: Not a canonical value SimplestHelloWorldWindow org.jboss.portal.core.model.portal.PortalObjectPath$CanonicalFormat.parse(PortalObjectPath.java:357) org.jboss.portal.core.model.portal.PortalObjectPath.<init>(PortalObjectPath.java:161) org.jboss.portal.core.model.portal.PortalObjectPath.parse(PortalObjectPath.java:314) org.jboss.portal.core.model.portal.PortalObjectId.parse(PortalObjectId.java:158) org.jboss.portal.core.model.portal.PortalObjectId.parse(PortalObjectId.java:143) org.jboss.portal.core.model.portal.navstate.PortalObjectNavigationalStateContext.createWindowKey(PortalObjectNavigationalStateContext.java:299) org.jboss.portal.core.model.portal.navstate.PortalObjectNavigationalStateContext.getWindowNavigationalState(PortalObjectNavigationalStateContext.java:194) org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState.getPortletWindowNavigationalState(ControllerPageNavigationalState.java:230) org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.getPortletNavigationalState(RenderWindowCommand.java:121) org.jboss.portal.core.impl.model.content.InternalContentProvider.renderWindow(InternalContentProvider.java:211) org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.execute(RenderWindowCommand.java:100) org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131) org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:124) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:134) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:78) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:48) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInterceptor.java:56) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:55) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157) org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:134) org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.render(RenderWindowCommand.java:80) org.jboss.portal.core.model.portal.command.render.RenderPageCommand.execute(RenderPageCommand.java:222) org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131) org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:124) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:134) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:78) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:48) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInterceptor.java:56) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:55) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50) org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157) org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:134) org.jboss.portal.core.model.portal.PortalObjectResponseHandler.processCommandResponse(PortalObjectResponseHandler.java:80) org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:78) org.jboss.portal.core.controller.classic.ClassicResponseHandler.processCommandResponse(ClassicResponseHandler.java:53) org.jboss.portal.core.controller.handler.ResponseHandlerSelector.processCommandResponse(ResponseHandlerSelector.java:70) org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:315) org.jboss.portal.core.controller.Controller.processCommand(Controller.java:303) org.jboss.portal.core.controller.Controller.handle(Controller.java:261) org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131) org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:196) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCacheInterceptor.java:68) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49) org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java) org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253) org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java) org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262) org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java) org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java) org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:69) org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130) org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157) org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    Read the article

  • Canonical, acteur de l'open source, use des droits de marque contre un site qui critique les fonctions d'Ubuntu portant atteintes à la vie privée

    Canonical, acteur de l'open source, use des droits de propriété intellectuelle pour attaquer un site qui propose des astuces pour désactiver les fonctions portant atteinte à la vie privéeCanonical s'attire de nouveau les foudres de la communauté de l'open source.Critiqué pour les choix et le modèle de développement adoptés pour la célèbre distribution Linux Ubuntu, Canonical a brandi la carte de ses droits de propriétés intellectuelles pour intimider le détenteur d'un site Web qui fournissait...

    Read the article

  • Including uncovered files in Devel::Cover reports

    - by Markus
    I have a project setup like this: bin/fizzbuzz-game.pl lib/FizzBuzz.pm test/TestFizzBuzz.pm test/TestFizzBuzz.t When I run coverage on this, using perl -MDevel::Cover=-db,/tmp/cover_db test/*.t ... I get the following output: ----------------------------------- ------ ------ ------ ------ ------ ------ File stmt bran cond sub time total ----------------------------------- ------ ------ ------ ------ ------ ------ lib/FizzBuzz.pm 100.0 100.0 n/a 100.0 1.4 100.0 test/TestFizzBuzz.pm 100.0 n/a n/a 100.0 97.9 100.0 test/TestFizzBuzz.t 100.0 n/a n/a 100.0 0.7 100.0 Total 100.0 100.0 n/a 100.0 100.0 100.0 ----------------------------------- ------ ------ ------ ------ ------ ------ That is: the totally-uncovered file bin/fizzbuzz-game.pl is not included in the results. How do I fix this?

    Read the article

  • Make jQuery-ui draggable handle cover entire page

    - by Acorn
    What would be the best way to make an element draggable when clicking anywhere in the window? Would I have to use a container <div> that covers the whole window? I tried making the body draggable but that didn't work. The problem with using a container <div> is that it moves and therefore doesn't cover the whole of the screen any more after it has been dragged. What about making a really vast container <div> that spans a large number of pixels in every direction so you would never get to the edge of it. Is that a bad idea? The idea (simplified) is to have a page with a square in the middle that can be dragged by dragging any part of the window. Here's a wonderfully unnecessary mockup :)

    Read the article

  • Find the set of largest contiguous rectangles to cover multiple areas

    - by joelpt
    I'm working on a tool called Quickfort for the game Dwarf Fortress. Quickfort turns spreadsheets in csv/xls format into a series of commands for Dwarf Fortress to carry out in order to plot a "blueprint" within the game. I am currently trying to optimally solve an area-plotting problem for the 2.0 release of this tool. Consider the following "blueprint" which defines plotting commands for a 2-dimensional grid. Each cell in the grid should either be dug out ("d"), channeled ("c"), or left unplotted ("."). Any number of distinct plotting commands might be present in actual usage. . d . d c c d d d d c c . d d d . c d d d d d c . d . d d c To minimize the number of instructions that need to be sent to Dwarf Fortress, I would like to find the set of largest contiguous rectangles that can be formed to completely cover, or "plot", all of the plottable cells. To be valid, all of a given rectangle's cells must contain the same command. This is a faster approach than Quickfort 1.0 took: plotting every cell individually as a 1x1 rectangle. This video shows the performance difference between the two versions. For the above blueprint, the solution looks like this: . 9 . 0 3 2 8 1 1 1 3 2 . 1 1 1 . 2 7 1 1 1 4 2 . 6 . 5 4 2 Each same-numbered rectangle above denotes a contiguous rectangle. The largest rectangles take precedence over smaller rectangles that could also be formed in their areas. The order of the numbering/rectangles is unimportant. My current approach is iterative. In each iteration, I build a list of the largest rectangles that could be formed from each of the grid's plottable cells by extending in all 4 directions from the cell. After sorting the list largest first, I begin with the largest rectangle found, mark its underlying cells as "plotted", and record the rectangle in a list. Before plotting each rectangle, its underlying cells are checked to ensure they are not yet plotted (overlapping a previous plot). We then start again, finding the largest remaining rectangles that can be formed and plotting them until all cells have been plotted as part of some rectangle. I consider this approach slightly more optimized than a dumb brute-force search, but I am wasting a lot of cycles (re)calculating cells' largest rectangles and checking underlying cells' states. Currently, this rectangle-discovery routine takes the lion's share of the total runtime of the tool, especially for large blueprints. I have sacrificed some accuracy for the sake of speed by only considering rectangles from cells which appear to form a rectangle's corner (determined using some neighboring-cell heuristics which aren't always correct). As a result of this 'optimization', my current code doesn't actually generate the above solution correctly, but it's close enough. More broadly, I consider the goal of largest-rectangles-first to be a "good enough" approach for this application. However I observe that if the goal is instead to find the minimum set (fewest number) of rectangles to completely cover multiple areas, the solution would look like this instead: . 3 . 5 6 8 1 3 4 5 6 8 . 3 4 5 . 8 2 3 4 5 7 8 . 3 . 5 7 8 This second goal actually represents a more optimal solution to the problem, as fewer rectangles usually means fewer commands sent to Dwarf Fortress. However, this approach strikes me as closer to NP-Hard, based on my limited math knowledge. Watch the video if you'd like to better understand the overall strategy; I have not addressed other aspects of Quickfort's process, such as finding the shortest cursor-path that plots all rectangles. Possibly there is a solution to this problem that coherently combines these multiple strategies. Help of any form would be appreciated.

    Read the article

  • IOS How to make the view cover keyboard

    - by regrecall
    I encounter the a problem: I have a view controller like this. TO make tool bar up when the keyboard appear, I move the self.view to up. [self.view setFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y + keyboardFrame.size.height * (up ? -1 : 1), self.view.frame.size.width, self.view.frame.size.height)]; Now I want to click the left button in the tool bar, and appear the view that frame is same as the this keyboard. But where can I add this view? if add the subview to the self.view, it will move up with the self.view on the top of the keyboard, not cover. I'm a beginner about IOS, I have no idea about it, and have searched, but got nothing about this. another question, IF when the toolbar at the bottom, I aslo want to click the left button on it to show the view(the animation and frame both are the same as the keyboard), how can I do ? Can you help me? Thanks

    Read the article

  • Use javascript to extend a DOM Range to cover partially selected nodes

    - by ko-dos
    I'm working on a rich text editor like web application, basically a XML editor written in javascript. My javascript code needs to wrap a selection of nodes from the contentEditable div container. I'm using the methods described at MDC. But since I need to synchronize the div containers content to my XML DOM I would like to avoid partial selections as described in w3c ranges: <BODY><H1>Title</H1><P>Blah xyz.</P></BODY ............^----------------^............ This selection starts inside H1 and ends inside P, I'd like it to include H1,P completely. Is there an easy way to extend the selection to cover partially selected children completely? (The code doesn't need to work with opera/IE)

    Read the article

  • Full background using :cover; makes adds horizontal scroll

    - by user1907341
    I am working on a website which needs a header with full background image & 650 height. At the moment i am using background-size: cover; property with 100% width. While, it's working it leaves an awkward horizontal scroll of about 50px on right side. Which is lot more prominent in smaller resolutions. I tried applying background to body instead of header div too. But same thing happens there as well. You can see a preview here - http://nitingarg.com/projects/tfe/

    Read the article

  • Google Webmaster Tools is showing duplicate URLs based on page title differences

    - by Praveen Reddy
    I have 700+ title tag duplicates showing in WMT. Every first link in that picture is as duplicate link of second one. I don't know from where the first link got indexed by Google when that link doesn't exist in the site. It's showing the title of every page as link. Original link: http://www.sitename.com/job/407/Swedish-plus-Any-other-Nordic-Language-Customer-Service-Representative-Dublin-Ireland. Duplicate link: http://www.sitename.com/job/407/Swedish-plus-Any-other-Nordic-Language-Customer-Service-Representative-Dublin-Ireland-Ireland. How can this happen? I have checked entire site I didn't find where the second version is linked. I have no images linked to with duplicated version of URL.

    Read the article

  • Using subdomains or directories for main categories?

    - by Matthieu
    I have a website which references places to travel to in the world. Those places are (of course) grouped by countries. Here is an example of an actual URL of my website: http://awespot.org/country/105/iceland I am wondering if it would be better, in terms of SEO, to have the countries separated in subdomains: http://iceland.awespot.org/ I know subdomains are considered by Google as different websites, so I am considering the 2 options: separating would mean also separating the pagerank and benefits of links to the website but separating would enable me to create a "web" or related websites (all related to travel and all) that link and benefit to each other I am only asking about SEO here, I know there are other questions raised by this possibility (user experience, administration... even password completion by web browsers)

    Read the article

  • What kind of connection this is?

    - by Rohit
    I happened to use `netstat' program this morning.. And what I couldn't understand its results. The snap-shot of the results window is given below: Screen-shot is at http://s2.postimg.org/3zt058415/image.png ( I can't post images! :/ ) Can somebody explain me the last entry in the results, where I've pointed them with arrows? [1] I don't understand why `canonical' servers are connected with my computer even if I am not currently using anything that I would expect such a connection to exist. [2] Second, I don't see the PID/Program name of the Program which has made this connection. I would at-least expect a PID.

    Read the article

  • Category to Page and blocking category url via robots.txt -Good for SEO?

    - by user2952353
    I am using a template which in the pages it allows me to add sidebars / more content under and above the content I want to pull from a category which is very helpful. If I create pages to display my categories content wont the page urls go in conflict with the category urls? By conflict I mean causing a duplicate content error? What I thought might help was to block from robots.txt the category urls of the blog ex. /category/books /category/music Would that be a good practice in order to avoid the duplicate content penalty? Any tips appreciated.

    Read the article

  • Multiple URL's going to same page - Kosher for Google?

    - by Ashoka15
    I hear conflicting answers from people about this, and I'm a developer by trade, and my SEO knowledge is not what it should be. Here's my situation: I run a website that lists hotels, restaurants, bars, shops, etc for a small Asian beach town. Lots of establishments here are hotels with a restaurant and bar, as well as restaurants that are also bars. As en example, a Mexican restaurant that also functions as a full cocktail bar. I first set it up so each establishment has one page, but can create multiple pages based on their other areas of business. This forces people to create TWO listings under the same name, and most just add the exact same information onto each page, making things redundant. I am re-arranging the database so that a establishment has only ONE listing (one unique page referenced by the unique code '12345ABCDEF') that is accessible from browsing under "Restaurants" and "Bars", and has the URL structures: site.com/dining/mexican/12345ABCDEF/business-name.html site.com/bars/cocktail_bars/12345ABCDEF/business-name.html I could easily simplify the URL to just the unique code and name: site.com/12345ABCDEF/business-name.html But, I found that Google has parsed by URL structure and lists like this on their SERP: Home > Dining > Mexican With each pointing to the default page for homepage, restaurants and Mexican restaurants. If I simplify the URL structure, will I lose these associations? Could Google also be picking up this structure from my breadcrumb trail at the top of the page? What is the best way to set up URL's on these pages so I am not penalized by Google for having identical information on two URL's, while still being able to have places show up as they did with the old system?

    Read the article

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