Daily Archives

Articles indexed Sunday May 9 2010

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

  • automatic push to CDN deployment strategy

    - by imanc
    Does anyone have ideas for a strategy to push content to a CDN upon deployment? The key issue I'm facing is that we have a site that is available in various contexts: local development, development server, staging, then finally live. The liver version of the site needs to load assets from a domain, which will be pointed to a CDN: assets.domain.com. However, we will have numerous references to the assets pointing to a relative folder, e.g. /images/ in css, possibly in js, and in HTML & source. Our new site will use capistrano for deployment and it may be that we can hook in another build tool (apache ant?) or some custom script to search / replace paths. I am wondering if anyone has had to deal with this issue before and what solutions you put in place to automate managing the CDN in terms of pushing content up to the CDN and managing html & css references to assets in the CDN. Thanks Imanc

    Read the article

  • animate rotation

    - by Mike
    I'm trying to animate a rotation using CATransform3DMakeRotation, but the problem is once the animation is finished, the image goes back to its initial position, i.e back to zero. But I'd like to keep it where it finished rotating. How would I do that? edit What I'm trying to do is to create the same compass which comes with the new iPhone. Basically the locationmanager gives me new headings every few seconds (or several per second). Using the new heading and the timestamp, I was trying to get a smooth animation of the image but not getting anywhere. The only thing which seems to work is applying the transform directly, e.g. compassimage.layer.transform = CATransform3DMakeRotation(newHeading.trueHeading *M_PI/180,0,0,1.0): but that's not animated...

    Read the article

  • Newbie question attribute from associated table not showing up in index view

    - by Lauren
    Hi I know this is something simple I am doing wrong. I have three tables, installation, neighborhood, schools Installation: has_many :schools has_many :neighborhoods Neighborhood: has_many :installations has_many :schools Schools: belongs_to :installations belongs_to :neighborhoods I can't figure out how to show the name of the neighborhood the school is located in on the index view. I can get it to show on the show view once I have the school id. But on the index view I can't figure out what to put in the controller that will allow me to access the neighborhood name from the neighborhood_id that is in the School model. I am sure this is so easy and I am screwing up something stupid. HELP!

    Read the article

  • Serving files with Turbogears2

    - by Lionel
    How do I serve files from an arbitrary directory with Turbogears2? I have a database with the local path, e.g. /home/myuser/tg2env/MyProject/myproject/files/somefile.jpg tg.url seems to only be able to serve things from the public directory. Is there a widget available, or do I need to write some sort of DownloadController?

    Read the article

  • Web development: Haskell or Scheme

    - by Robert E. Lester
    I would like to to choose one of these languages for building web applications. I'm not interested in framework per say, but have the following needs: Rapid development. Easy to scale. Strong community for the web. Quick and easy to deploy. I'm very familiar with Haskell, and have some familiarity with scheme (in particular PLT). Scheme appeals to me as good candidate for web development due to it's simple syntax which is homogenous across libraries. I state this despite my subjective opinion that Haskell is a 'cleaner' language. Haskell web apps seem to require learning and building a patchwork of different combinator libraries. On the plus side, I realise this can be quite expressive, although I'd prefer to eliminate impedance mismatches where possible. While scheme-plt looks to be a good fit, I can find but one example of it being used in the "real world". Haskell doesn't seem to fair too much better here, but there seems to be a bigger community behind the web side. Please help me make up my mind. For the most part I'm interested in real-world use cases.

    Read the article

  • OS X 10.6 change folder Finder displays as Desktop?

    - by JT
    Hi All, I know this is weird, but is there a .plist or key that I can edit to make the Finder use a different folder besides ~/Desktop for its Desktop folder? Why? Because I really like the BumpTop Desktop for Mac, but when I am not using it, I want my actual Finder Desktop to be of different contents. BumpTop only looks at ~/Desktop that I can tell.

    Read the article

  • Designing a fluid Javascript interface to hide callback asynchrony

    - by Anurag
    How would I design an API to hide the asynchronous nature of AJAX and HTTP requests, or basically delay it to provide a fluid interface. To show an example from Twitter's new Anywhere API: // get @ded's first 20 statuses, filter only the tweets that // mention photography, and render each into an HTML element T.User.find('ded').timeline().first(20).filter(filterer).each(function(status) { $('div#tweets').append('<p>' + status.text + '</p>'); }); function filterer(status) { return status.text.match(/photography/); } vs this (asynchronous nature of each call is clearly visible) T.User.find('ded', function(user) { user.timeline(function(statuses) { statuses.first(20).filter(filterer).each(function(status) { $('div#tweets').append('<p>' + status.text + '</p>'); }); }); }); It finds the user, gets their tweet timeline, filters only the first 20 tweets, applies a custom filter, and ultimately uses the callback function to process each tweet. I am guessing that a well designed API like this should work like a query builder (think ORMs) where each function call builds the query (HTTP URL in this case), until it hits a looping function such as each/map/etc., the HTTP call is made and the passed in function becomes the callback. An easy development route would be to make each AJAX call synchronous, but that's probably not the best solution. I am interested in figuring out a way to make it asynchronous, and still hide the asynchronous nature of AJAX.

    Read the article

  • How To Create a Custom List of ProgressBars in .Net 2.0

    - by user205077
    I have created a progress bar custom control and would like to embed this into a list which can be sorted and placed on a windows form using .Net 2.0. What is the best approach for this? Is it possible to just add it to a ListView as a subitem? Is there a better way to achieve this? I want it to be as lightweight as possible.

    Read the article

  • SVN checkout/export too long to download

    - by sasayins
    Hi, My checkout/export session in svn is kinda weird. The file is just a 300KB in size but the downloading keeps going and it reaches a megabytes in size. The file is in RPM format. I don't know if the file is corrupt or the SVN has a bug. I tried to download the file using web browser and seems the downloading works fine. What probably is the main problem is here?

    Read the article

  • ifconfig return "unknown interface: no such device"

    - by xolstice
    I'm trying to install a Linux driver for my wireless network card (D-Link DWL-G510) on my Red Hat Linux 7.1 machine with a 2.4.37.9 kernel. I downloaded the serial monkey driver from the sourceforge site and was able to successfully compile the rt73 module and load it into the kernel. The problem now is that everytime I issue the command ifconfig wlan0 up it keeps returning with the following error message: wlan0: unknown interface: No such device. I'm at a loss as to what to do here. I specifed wlan0 as the alias for the rt73 module in the modules.conf and also tried to load the driver with the command modprobe rt73 ifname=wlan0 (this specifies the interface name according to the instructions packaged in the driver), but the error message still keeps coming up. Is there something else I need to do in Linux to configure the wlan0 part or is the module not recognizing the wireless network card? It would be quite strange if it is the later since all information from the Internet is indicating this is the linux driver I should be using for mentioned wireless card.

    Read the article

  • Designing a fluid Javascript interface to abstract away the asynchronous nature of AJAX

    - by Anurag
    How would I design an API to hide the asynchronous nature of AJAX and HTTP requests, or basically delay it to provide a fluid interface. To show an example from Twitter's new Anywhere API: // get @ded's first 20 statuses, filter only the tweets that // mention photography, and render each into an HTML element T.User.find('ded').timeline().first(20).filter(filterer).each(function(status) { $('div#tweets').append('<p>' + status.text + '</p>'); }); function filterer(status) { return status.text.match(/photography/); } vs this (asynchronous nature of each call is clearly visible) T.User.find('ded', function(user) { user.timeline(function(statuses) { statuses.first(20).filter(filterer).each(function(status) { $('div#tweets').append('<p>' + status.text + '</p>'); }); }); }); It finds the user, gets their tweet timeline, filters only the first 20 tweets, applies a custom filter, and ultimately uses the callback function to process each tweet. I am guessing that a well designed API like this should work like a query builder (think ORMs) where each function call builds the query (HTTP URL in this case), until it hits a looping function such as each/map/etc., the HTTP call is made and the passed in function becomes the callback. An easy development route would be to make each AJAX call synchronous, but that's probably not the best solution. I am interested in figuring out a way to make it asynchronous, and still hide the asynchronous nature of AJAX.

    Read the article

  • Syncing Online Content with iPhone Application

    - by PF1
    Hi Everyone: I am looking for some way to sync a online XML file with my iPhone application and only download the newest changed items. Each item is marked with a date attribute, so I assume this is possible. I have heard that Core Data can accomplish this task, but I am unsure of the suggested method and how to approach implementing it. Thanks for any help.

    Read the article

  • Center label instance inside VGroup in Flex

    - by Jerry
    Hi all I am trying to center my labels below my image inside my VGroup. The labels are align to left now and it seems like HorizontalAlign is not working on spark component. Anyone knows how to fix it? Thanks a lot. <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:VGroup width="800"> <mx:Image source="images/big/city1.jpg"/> <s:Label text="test1" horizontalCenter="0" /> //doesn't work....:( <s:Label text="test2" /> </s:VGroup> </s:Application>

    Read the article

  • PInvoke or using /clr:pure to compile

    - by Yin Zhu
    I have a set of numerical libraries in C++ and I want to call them interactively in a interpretive language like F# or IronPython. So I have two choices now: Compile the library in native DLL and use PInvoke to call functions in it. Compile the C++ library to .Net dll using visual c++ (/clr:pure compile option). The advantage of 1 is that it is very fast, however there are more work in it, e.g. I cannot PInvoke double pointer (e.g. float **), I must write another wrapper in the C++ library to make the interface friendly to .Net. The advantage of 2 is that I don't need to do know Mashaling strings, arrays, etc. However, the .net dll is slower compared to the native one. What others factors should be considered when choosing between the two?

    Read the article

  • How to select all the attributes that contain certain String in an XML Document using LINQ

    - by jaircazarin
    Similar to XPath: How to match attributes that contain a certain string but without using XPath. Is it possible? <c BarFoo="val1"> <d Foo="val2" someAttribute=""> <e FooBar="val3" /> </d> </c> Basically I want to select all the attribute values in the document that their attribute name contains "Foo", so it should return the values of "BarFoo", "FooBar", "Foo" (va1, val2, val3)

    Read the article

  • How to parse XML in VBA

    - by dev
    Hi, I work in VBA, and want to parse a string eg <PointN xsi:type='typens:PointN' xmlns:xsi='<http://www.w3.org/2001/XMLSchema-instance>' xmlns:xs='<http://www.w3.org/2001/XMLSchema>'><X>24.365</X><Y>78.63</Y></PointN> and get the X & Y values into two separate integer variables. I'm a newbie when it comes to XML, since I'm stuck in VB6 and VBA, because of the field I work in. How do I do this?

    Read the article

  • Trying to build OpenSimulator.. nant fails

    - by Gary
    Output of nant is: Buildfile: file:///root/opensim-0.6.8-release/OpenSim.build Target framework: Mono 2.0 Profile Target(s) specified: build [echo] Using 'mono-2.0' Framework init: Debug: [echo] Platform unix build: [nant] /root/opensim-0.6.8-release/OpenSim/Framework/Servers/HttpServer/OpenSim.Framework.Servers.HttpServer.dll.build build Buildfile: file:///root/opensim-0.6.8-release/OpenSim/Framework/Servers/HttpServer/OpenSim.Framework.Servers.HttpServer.dll.build Target framework: Mono 2.0 Profile Target(s) specified: build build: [echo] Build Directory is /root/opensim-0.6.8-release/OpenSim/Framework/Servers/HttpServer/bin/Debug [csc] Compiling 29 files to '/root/opensim-0.6.8-release/OpenSim/Framework/Servers/HttpServer/bin/Debug/OpenSim.Framework.Servers.HttpServer.dll'. [csc] /root/opensim-0.6.8-release/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs(103,41): error CS0246: The type or namespace name `TResponse' could not be found. Are you missing a using directive or an assembly reference? [csc] Compilation failed: 1 error(s), 0 warnings BUILD FAILED - 0 non-fatal error(s), 1 warning(s) /root/opensim-0.6.8-release/OpenSim/Framework/Servers/HttpServer/OpenSim.Framework.Servers.HttpServer.dll.build(14,6): External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe (return code was 1) Total time: 1.2 seconds. BUILD FAILED Nested build failed. Refer to build log for exact reason. Total time: 1.3 seconds. OS is Fedora 7. Any ideas appreciated. :)

    Read the article

  • What do I need to do to prevent exploitation of my postfix server?

    - by Josiah
    I have a a web server that needs to send emails, but not recieve them. I have installed postfix (it came with nagios, also installed on this server) and now I need to make sure that my server does not get used as a spam server. What steps do I need to take to ensure that this does not happen? What additional security measures do I need to put in place? Server is Ubuntu 10.4

    Read the article

  • Binary search in rotated sorted list

    - by Algorist
    I am having a sorted list which is rotated and I would like to do a binary search on that list to find the minimum element. Lets suppose initial list is {1,2,3,4,5,6,7,8} rotated list can be like {5,6,7,8,1,2,3,4} Normal binary search doesn't work in this case. Any idea how to do this.

    Read the article

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