Search Results

Search found 37 results on 2 pages for 'kasper pedersen'.

Page 1/2 | 1 2  | Next Page >

  • Passing context between templatetags, django

    - by Kasper Gadensgaard
    Hi overflowers, I am using django to create a web-application. I have created a template in where I load a templatetag. In this templatetag i load another templatetag. From the template I pass context to the first templatetag, but the context is not available from the second templatetag (inside the first templatetag) - see below. I hope this makes sense, and that one of you have the answer. Thanks in advance Regards Kasper Gadensgaard Template snippit: {% load templatetags %} {% some_tag argument %} some_tag Templatetag: {% load templatetags %} {% some_other_tag another_argument %} some_other_tag Templatetag: In this templatetag i am trying to access context to get user info i.e. using request = context['request'] request.user

    Read the article

  • Am I missing a pattern?

    - by Ryan Pedersen
    I have a class that is a singleton and off of the singleton are properties that hold the instances of all the performance counters in my application. public interface IPerformanceCounters { IPerformanceCounter AccountServiceCallRate { get; } IPerformanceCounter AccountServiceCallDuration { get; } Above is an incomplete snippet of the interface for the class "PerformanceCounters" that is the singleton. I really don't like the plural part of the name and thought about changing it to "PerformanceCounterCollection" but stopped because it really isn't a collection. I also thought about "PerformanceCounterFactory" but it is really a factory either. After failing with these two names and a couple more that aren't worth mentioning I thought that I might be missing a pattern. Is there a name that make sense or a change that I could make towards a standardized pattern that would help me put some polish on this object and get rid of the plural name? I understand that I might be splitting hairs here but that is why I thought that the "Programmers" exchange was the place for this kind of thing. If it is not... I am sorry and I will not make that mistake again. Thanks!

    Read the article

  • Mouse pointer size problem

    - by Rasmus Pedersen
    My mouse cursor is double the normal size. Its only the default pointer that is enlarged. Variations like resize, busy and so on are the correct size. The problem persists even when I change cursor theme. If I move the cursor inside a Firefox window it changes to the correct size. My resolution is 2560x1440, its a single screen setup. Nvidia-settings reports my DPI to be: 108x107. I've tired to force that DPI in the LightDM conf, since I figured it must have something to-do with the DPI calculation. I have tried to change the cursor size through dconf but the problem still remains. I haven't seen this problem before, it arrived after the upgrade from Beta 2 to release version of Ubuntu 11.10. Anybody got any idea what the problem might be, its pretty annoying with the huge cursor.

    Read the article

  • Adding a CLI for PHP5 on live server

    - by Josua Pedersen
    I want to add command-line support for PHP5 on my server. When I run aptitude install php5-cli I get a message saying that my PHP modules/packages have unmet dependencies. Here is a list of packages that suffer from these "unmet dependencies" and needs and upgrade: php5-gd php5-curl php5-mysql php5-cgi They all depend on php5-common. Can I upgrade the packages just like aptitude suggests without causing any disruptions to the live site? Output from aptitude Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initialising package states... Done The following packages are BROKEN: libapache2-mod-php5 php5-cgi php5-curl php5-gd php5-mysql The following NEW packages will be installed: php5-cli The following packages will be upgraded: php5-common 1 packages upgraded, 1 newly installed, 0 to remove and 123 not upgraded. Need to get 3,511kB of archives. After unpacking 7,803kB will be used. The following packages have unmet dependencies: php5-gd: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. php5-curl: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. php5-mysql: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. php5-cgi: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. libapache2-mod-php5: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. The following actions will resolve these dependencies: Upgrade the following packages: libapache2-mod-php5 [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-cgi [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-curl [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-gd [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-mysql [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] Score is 340

    Read the article

  • excel rows,find if include,low and high

    - by Malin Pedersen
    Link to full-size image For what is marked in orange: As mentioned in the example in the picture it says "headphones". I would like it to search through all the lines in column A, to find something that has that name in it, then it should count the number of people, and come out with the number (in how many) the "middle price" I want it to take the price of B (depending on where it found it called headphones) and take the average price of it. In secured, as I would like it to count how many of them (from the number, or from the beginning) that have "secured" as "no" and "yes." I would like to use this on several things. For what is marked in pink: Where would I find the average price of all the goods, and what the name of the particular item is? Same with the highest and lowest price. How can I do this?

    Read the article

  • Find text between lines in linux

    - by Kasper Mooijman
    I have a log-file where at the end of a series of lines you can see if this block is relevant now I'm looking for a command like sed to delete de blocks ending with "Content-Length: 0" and beginning with the last "--" before this line. I tried sed -n "/--/,/Content-Length: 0/d" but this takes the first "--" and the first "Content-Length: 0" and deletes it. ex : line 1 "--" line 2 line 3 "Content-Length: 20" line 4 "--" line 5 line 6 "Content-Length: 0" i want to delete line 4,5 and 6 not line 1 to 6 hohw can i do this?

    Read the article

  • vector quality of svg and pdf

    - by Kasper
    I'm converting pdf files to svg as it is easier to use svg files on webpages. I first thought the quality of svg must be similar to pdf, as they are both vector graphics. However, now I look a little better on it, it seems that pdf is a bit superior: (https://dl.dropboxusercontent.com/u/58922976/Photos/1.png) I wonder if I could change this in some way. Is this because pdf vectors are just better quality ? Or is this because chrome renders svg in lower quality than adobe reader renders pdf ? Is this a setting in the svg file that I could change ? Here is the pdf file: https://dl.dropboxusercontent.com/u/58922976/syllabusLinAlg2012.59.pdf And here is the svg file: (https://dl.dropboxusercontent.com/u/58922976/syllabusLinAlg2012.59.svg) I've made this svg file in illustrator, and only chrome is able to use the embedded svg fonts. So firefox and internet explorer won't give the expected result.

    Read the article

  • ISA Web Farm and WCF service hosted in a Windows Service with basicHttpBinding

    - by Ryan Pedersen
    I have created a WCF service that needs to be hosted in a Window Service because it is participating in a P2P mesh (NetPeerTcpBinding). When I tried to host the WCF Service with NetPeerTcpBinding endpoints in the IIS Service container the service wouldn't run because it turns out that the P2P binding doesn't work in IIS. I have exposed a HTTP endpoint from the WCF service hosted in a Windows Service container and I want to know if there is a way to create an ISA Web Farm that will route traffic to http endpoints on two machines each running the same WCF service in a Windows Service container.

    Read the article

  • Enable 2-way databinding on nested listview

    - by Lars Pedersen
    I have a ASP.NET FormView, that - via an ObjectDataSource - is bound to my EventOrder-object: [Serializable] public class EventOrder { [Serializable] public class OrderTicket { public int Qty { get; set; } public int Id { get { return this.Ticket.Id; } } public Ticket Ticket { get; set; } public double TicketPrice { get; set; } } [Serializable] public class OrderExtra { public int Qty { get; set; } public int Id { get { return this.Extra.Id; } } public Extra Extra { get; set; } } public Event Event { get; set; } public List<OrderTicket> OrderTickets { get; set; } public List<OrderExtra> OrderExtras { get; set; } public UserProfile UserProfile { get; set; } public List<Fee> Fees { get; set; } public List<Discount> Discounts { get; set; } public EventOrder() { this.OrderExtras = new List<OrderExtra>(); this.OrderTickets = new List<OrderTicket>(); this.Fees = new List<Fee>(); this.Discounts = new List<Discount>(); } } In my FormView, I have a bindingexpression on an inner listview for my collection of OrderTickets: <asp:ListView Visible="false" runat="server" DataKeyNames="Id" ID="lvTickets" DataSource='<%# Bind("OrderTickets") %>'> <ItemTemplate> <asp:TextBox ID="TextBox5" Text='<%# Bind("Qty") %>' runat="server"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Ticket.Title") %>'></asp:Label> <asp:Label ID="Label2" runat="server" Text='<%# Eval("TicketPrice") %>'></asp:Label><br /> </ItemTemplate> My problem is that the Qty-property isn't databound to the object when the parent container is updated. Is it possible to have this kind of parent-child relation with 2-way databinding? Can I force the child listview to update it's bound dataobject when I submit the form?

    Read the article

  • What off-the-shelf licensing system will meet my needs?

    - by Anders Pedersen
    I'm looking for an off-the-shelf license system for desktop software. After some research on the net -- and of course here on StackOverflow -- I haven't found one the suits our needs. I have a couple of must-have features and some would-be-nice features: Must have: Encrypted unlock key Possibility to automate the unlock key generation on my website User info in key so that I can show name and company in an about box and perhaps in reports Nice to have: License managing tools Online activation Nice upgrade possibilities to a version with concurrent license model and subscription model I have looked at Manco, but I find them difficult to work with and the documentation is minimal. Further, I couldn't get the name in the key. Also, the automatic generation of a key on my website has to be done with an application web service, but I would rather program against a DLL. Next I looked at xheo. It is easier to use and the documentation is better, but the price is substantially higher and here you can only get the user name in the license file that you then have to provide together with the unlock key. Could anyone share their experiences on what you are using and how it is working for you?

    Read the article

  • How to use routing in a ASP MVC website to localize in two languages - But keeping exiting URLs

    - by Anders Pedersen
    We have a couple ASP MVC websites just using the standard VS templates default settings - Working as wanted. But now I want to localize these website ( They are now in Dutch and I will add the English language ) I would like to use routing and not Resource because: 1. Languages will differ in content, numbers of pages, etc. 2. The content is mostly text. I would like the URLs to look some thing like this - www.domain.com/en/Home/Index, www.domain.nl/nl/Home/Index. But the last one should also work with - www.domain.nl/Home/Index - Witch is the exciting URLs. I have implemented Phil Haacks areas ViewEngine from this blogpost - http://haacked.com/archive/2008/11/04/areas-in-aspnetmvc.aspx. But only putting the English website in the areas and keeping the Dutch in old structure. Witch are served as Phils default fallback. But the problem is here that I have to duplicate my controllers for both language's. So I tried the work method described in this tread - http://stackoverflow.com/questions/1712167/asp-net-mvc-localization-route. It works OK with the ?en? and /nl/ but not with the old URLs. When using this code in the global.asax the URL without the culture isn't working. public static void RegisterRoutes(RouteCollection routes) { //routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{culture}/{controller}/{action}/{id}", // URL with parameters new { culture = "nl-NL", controller = "Home", action = "Index", id = "" } // Parameter defaults ); routes.MapRoute( "DefaultWitoutCulture", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } I properly overlooking some thing simple but I can't get this to work for me. Or are there a better way of doing this?

    Read the article

  • .NET: Preserving some, but not all query params during redirect

    - by kasper pedersen
    Hi all, Could someone tell me if the code below would achieve what I want, which is: Check if the query parameters 'return_path' and/or 'user_state' are present in the query string, and if so append them to the query string of the redirect URI. As I'm not a .NET dev and don't have a server to test this on, I was hoping someone could give me some feedback. ArrayList vars = new ArrayList(); vars.Add("return_path"); vars.Add("user_state"); string newUrl = "/new/request/uri" + "?"; ArrayList params = new ArrayList(); foreach ( string key in Request.QueryString ) { if (vars.contains(key)) { params.Add(key + "=" + HttpUtility.URLPathEncode(Request.QueryString[key])); } } String[] paramArr = (String[]) params.ToArray( typeof (string) ); String queryString = String.join("&", paramArr); Response.Redirect(newUrl); Thank you :)

    Read the article

  • PowerPivot RTM Download

    - by simonsabin
    Thanks to Kasper de Jonge for pointing out that the download on the Powerpivot.com site is NOT the RTM version. The RTM version is available on MSDN but is not available publically. The RTM version has a version number of 10.50.1600.1. Click on the setting button on the Powerpivot section of the ribbon to find out what version you have installed.  ...(read more)

    Read the article

  • Google I/O 2012 - Dart - A Modern Web Language

    Google I/O 2012 - Dart - A Modern Web Language Lars Bak, Kasper Lund The two creators of Dart will discuss the rationale behind Dart's design and its impact on web scalability and performance. They'll also present how Dart helps developers innovate by increasing their productivity without breaking backwards compatibility. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 2066 36 ratings Time: 01:03:40 More in Science & Technology

    Read the article

  • Broadband Speed and What it Means to You

    However experienced the buyer, the one thing most broadband customers ask about is ?speed?. This is pretty much an umbrella term for how easy the functionality of your broadband connection and provid... [Author: Jakob Pedersen - Computers and Internet - April 01, 2010]

    Read the article

  • Convert javascript ticks to date in Flot jQuery-plugin issue

    - by Kasper Skov
    I have a dynamic Flot graph with dates on the x-axis and numbers on the y-axis. To get the Flot-plugin to read the date object correctly, I had to convert the dates to ticks (with getTime()). My problem is that I can't revers the ticks back to a normal date in my tooltip hover on the graph. I've tried to revers it with this: dateTimeObject = new Date((jsTicks - 621355968000000000) / 10000); All I get, no matter what jsTicks is, is "Jan 02 0001 hh:mm:ss (almost current time)" What am I doing wrong?

    Read the article

  • IE6 - body shrink on hover / z-index change

    - by Kasper
    I'm debugging a site to make it work for IE6 (god, please, let this be the last time). I've gotten pretty far with getting the the layout look right. There's just one more thing bugging me. Some elements like links, when they get hovered, the body of the site shrinks. I have built a dropdown with javascript. When it should show, the body of the site shrinks. There is a slideshow, made with javascript, which changes the z-index of the images, everytime it changes the z-index, the body shrinks. Now I found some information that IE6 creates this specific shrinking behaviour when using a fixed position element. But this is not the case. Someone here have some ideas for solving this? Thanks!

    Read the article

  • How do I get the URLs from any tab in any open browser

    - by Kasper
    I am trying to detect which web in sharepoint that the user is looking at right now. One approach could be to read the URls from the browser and try to compare them to a reference URL to the sharepoint solution. I have not yet been able to locate any solution that works in both IE and Firefox. The idea is to write a small C# app that will harvest the URLs and do the comparing. TIA

    Read the article

  • How to disable vertical bounce/scroll on iPhone in a mobile web application

    - by Kasper Skov
    As the title says, i need to disable vertical bounce on iphone on my mobile web form application. Ive tried alot of different things, but most of them disables my form or horizontal scroll and bounce as well. Any ideas? Im using jquery.mobile btw :) Update: I actually managed to get the code from the first answer working somewhat: function stopScrolling( touchEvent ) { touchEvent.preventDefault(); } document.addEventListener( 'touchstart' , stopScrolling , false ); document.addEventListener( 'touchmove' , stopScrolling , false ); The reason why I couldnt get it to work in the first place, was that there actually was some margin on my body (stupid me). But. As the layout is fluid and im using jquery.mobile and have <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> in the header (I think) it doesnt work properly. The page is zoomed out (view from like a desktop browser) and zooming is disabled. Without the code, the page scales perfectly right from an 50" tv to the smallest nokia on the planet. Am I doing something wrong? Im starting to think the problem is caused by the body/content somehow being over 100% of the viewport. No idea how though.

    Read the article

  • Two objects with dependencies for each other. Is that bad?

    - by Kasper Grubbe
    Hi SO. I am learning a lot about design patterns these days. And I want to ask you about a design question that I can't find an answer to. Currently I am building a little Chat-server using sockets, with multiple Clients. Currently I have three classes. Person-class which holds information like nick, age and a Room-object. Room-class which holds information like room-name, topic and a list of Persons currently in that room. Hotel-class which have a list of Persons and a list of Rooms on the server. I have made a diagram to illustrate it (Sorry for the big size!): http://i.imgur.com/Kpq6V.png I have a list of players on the server in the Hotel-class because it would be nice to keep track of how many there are online right now (Without having to iterate through all of the rooms). The persons live in the Hotel-class because I would like to be able to search for a specific Person without searching the rooms. Is this bad design? Is there another way of achieve it? Thanks.

    Read the article

  • Adding line with text between pattern and next occurence of the same pattern in bash

    - by kasper
    I am writing a bash script that modifies a file that looks like this: --- usr1 --- data data data data data data data data data data data data --- usr2 --- data data data data data data data data --- usr3 --- data data data data --- endline --- One question is: How to add next user line --- usrn --- after last user data lines? Second one is: How to delete specific user data lines (data lines and --- userx ---) i.e. I would like to delete usr2 with all his data set. It must work on bash 2.05 :) and I think it will use awk or sed, but I'm not sure.

    Read the article

1 2  | Next Page >