Search Results

Search found 3801 results on 153 pages for 'container'.

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

  • MovieClip progress bar width is too small relative to parent container

    - by egyedg
    I am new to ActionScripot and Flash and I am stuck with the following problem: On the stage I have a movieclip (Container, originally 200px width) and inside it with a progressbar movieclip (originally 700px width), scaled with Free Transform Tool to fit the parent container. The width of the container changes run-time while resizing the scene. In ActionScript I have a function which should set the progress bar width according to a calculated percentage value: private function updateProgress(event:TimerEvent):void { var barWidth:int = _container.width; var progress:Number = _stream.time / _stream.duration * barWidth; _progressBar.width = progress; } My problem is that the progressBar even at full time (100%) is only at 1/4 of the parent container. I assume that it comes from the symbols original size. Can I correct this programatically, or I must redesign it with the "designer"? I hope I made clear my problem, as I said, I'm new in Flash. Thanks in advance.

    Read the article

  • vertically aligning image in fluid container

    - by archytect
    looked for other examples but couldn't find any. my image container uses max-width/max-height so the image scales to the container but I can't seem to get it to auto margin top/bottom or vertical align it to the middle without setting a height. html, body { width: 100%; height: 100%; margin: 0px; } #container { border: solid 1px #000; height: 100%; width: 65%; position: absolute; right: 0; } #container img { max-width: 100%; max-height: 100%; display: block; margin: auto; vertical-align: middle; }? <div id="container"><img src="http://rack.2.mshcdn.com/media/ZgkyMDEyLzEyLzE2LzAzL3NjcmVlbnNob3QyXzJlb2RkLnBuZwpwCXRodW1iCTg1MHg1OTA+CmUJanBn/5b500a85/9ee/screen-shot-2012-12-14-at-9-45-01-am.jpg" /> </div>? http://jsfiddle.net/beftR/

    Read the article

  • Preferred OS for hosting Tomcat servlet container

    - by dacracot
    I know that I'm taking a risk, pitting the differing OS religions against each other, but I would like professional opinions about hosting a servlet container. In my case the container is set, we will be using Tomcat. But what is in question is the hosting operating system. We have administrators experienced in Windows Server 2003. We have developers experienced in Solaris, OSX, and Linux. There is no warring between these groups, just a question of who will ramp up through the learning curve necessary to use the OS that they are unfamiliar with. So given all the cooperative spirit, we are struggling with how to find the most efficient path. I had already cross-posted this question here.

    Read the article

  • Cloning OpenVZ container

    - by Tiffany Walker
    I have an OpenVZ container on 1 host and I would like to clone it over to my server. both run SolusVM. I only have root access to my server and would like to host the container on my server now. Can I use rsync to clone the drive while the OS is running on both? Using a command like this: rsync -uazPx --exclude='/boot' --exclude='/proc' --exclude='/dev' --exclude='/lib' --exclude='/tmp' --exclude='/var/lock' / [email protected]:/ Is there any other areas I should probably not copy over?

    Read the article

  • Error in New-MailboxExportRequest - "Couldn't find the Enterprise Organizational Container" even though permissions seem right

    - by tacos_tacos_tacos
    When disabling users I typically will be asked to retain a copy of their mailbox. I accomplish this by literally creating their mailbox in Outlook and then exporting to PST. Is there some way around having to do this just to save a mailbox? Edit: I've tried New-MailboxExportRequest but I keep getting the following after providing an alias: Supply values for the following parameters: FilePath: \\localhost\EXPORT_PST\myuser.pst Mailbox: myuser Couldn't find the Enterprise Organization container. <--- the error I've also tried supplying [email protected] as the mailbox as well. Edit 2: I had already seen the post at http://www.mikepfeiffer.net/2010/10/error-couldnt-find-the-enterprise-organization-container-when-creating-a-new-mailbox-export-request/ so I set the permissions as follows below: NTFS permissions Sharing permissions I am still getting that error. Final Solution In Exchange SP2, it does not warn you that you have not set role assignments, it just fails. So be sure to create a management role for "Mailbox Import Export" and add your user to the group, then restart PowerShell for this to take effect.

    Read the article

  • Encryption container for multiple people

    - by Adam M.
    I was just wondering if anyone may have come across a product that would allow for a container based encryption to be used by multiple people, in a Windows Server setup. I wanted to see if there might be something like a truecrypt that could handle being accessed by two accounts? Looking to see if there is a product that would have such properties that would allow only a hand full of users access to the content of the location, but allow for the files to be backed up a normal backup system. That way if a file had to be restored, the container could be redirected to another location for one of the users to get access to it? This would allow for access to be restricted beyond the NTFS and file share permissons

    Read the article

  • Is this a valid implementation of the repository pattern?

    - by user1578653
    I've been reading up about the repository pattern, with a view to implementing it in my own application. Almost all examples I've found on the internet use some kind of existing framework rather than showing how to implement it 'from scratch'. Here's my first thoughts of how I might implement it - I was wondering if anyone could advise me on whether this is correct? I have two tables, named CONTAINERS and BITS. Each CONTAINER can contain any number of BITs. I represent them as two classes: class Container{ private $bits; private $id; //...and a property for each column in the table... public function __construct(){ $this->bits = array(); } public function addBit($bit){ $this->bits[] = $bit; } //...getters and setters... } class Bit{ //some properties, methods etc... } Each class will have a property for each column in its respective table. I then have a couple of 'repositories' which handle things to do with saving/retrieving these objects from the database: //repository to control saving/retrieving Containers from the database class ContainerRepository{ //inject the bit repository for use later public function __construct($bitRepo){ $this->bitRepo = $bitRepo; } public function getById($id){ //talk directly to Oracle here to all column data into the object //get all the bits in the container $bits = $this->bitRepo->getByContainerId($id); foreach($bits as $bit){ $container->addBit($bit); } //return an instance of Container } public function persist($container){ //talk directly to Oracle here to save it to the database //if its ID is NULL, create a new container in database, otherwise update the existing one //use BitRepository to save each of the Bits inside the Container $bitRepo = $this->bitRepo; foreach($container->bits as $bit){ $bitRepo->persist($bit); } } } //repository to control saving/retrieving Bits from the database class BitRepository{ public function getById($id){} public function getByContainerId($containerId){} public function persist($bit){} } Therefore, the code I would use to get an instance of Container from the database would be: $bitRepo = new BitRepository(); $containerRepo = new ContainerRepository($bitRepo); $container = $containerRepo->getById($id); Or to create a new one and save to the database: $bitRepo = new BitRepository(); $containerRepo = new ContainerRepository($bitRepo); $container = new Container(); $container->setSomeProperty(1); $bit = new Bit(); $container->addBit($bit); $containerRepo->persist($container); Can someone advise me as to whether I have implemented this pattern correctly? Thanks!

    Read the article

  • Dependency Injection Constructor Madness

    - by JP
    I find that my constructors are starting to look like this: public MyClass(Container con, SomeClass1 obj1, SomeClass2, obj2.... ) with ever increasing parameter list. Since "Container" is my dependency injection container, why can't I just do this: public MyClass(Container con) for every class? What are the downsides? If I do this, it feels like I'm using a glorified static. Please share your thoughts on IoC and Dependency Injection madness. Thanks in advance. -JP

    Read the article

  • Castle Windsor: Reuse resolved component in OnCreate, UsingFactoryMethod or DynamicParameters

    - by shovavnik
    I'm trying to execute an action on a resolved component before it is returned as a dependency to the application. For example, with this graph: public class Foo : IFoo { } public class Bar { IFoo _foo; IBaz _baz; public Bar(IFoo foo, IBaz baz) { _foo = foo; _baz = baz; } } When I create an instance of IFoo, I want the container to instantiate Bar and pass the already-resolved IFoo to it, along with any other dependencies it requires. So when I call: var foo = container.Resolve<IFoo>(); The container should automatically call: container.Resolve<Bar>(); // should pass foo and instantiate IBaz I've tried using OnCreate, DynamicParameters and UsingFactoryMethod, but the problem they all share is that they don't hold an explicit reference to the component: DynamicParameters is called before IFoo is instantiated. OnCreate is called after, but the delegate doesn't pass the instance. UsingFactoryMethod doesn't help because I need to register these components with TService and TComponent. Ideally, I'd like a registration to look something like this: container.Register<IFoo, Foo>((kernel, foo) => kernel.Resolve<Bar>(new { foo })); Note that IFoo and Bar are registered with the transient life style, which means that the already-resolved instance has to be passed to Bar - it can't be "re-resolved". Is this possible? Am I missing something?

    Read the article

  • Is there any CSS selector to reach an element outside of the current container?

    - by acidrums4
    (And excuse me for my bad english, for starters...) Sorry if this is a noob question, but I really don't know if the following is possible. I'm doing a html5 portfolio. I'm following a tuto from codrops to visually filter works with only css3 (http://tympanus.net/codrops/2012/01/09/filter-functionality-with-css3/). There, user can select which category want to see with some <input type="radio">'s. But those selectors are under the same container (a <section>) and give visibility for the elements via CSS using a general sibling combinator (~). So in that example, the CSS code goes like this: .ff-container input.ff-selector-type-all:checked ~ label.ff-label-type-all, .ff-container input.ff-selector-type-1:checked ~ label.ff-label-type-1, .ff-container input.ff-selector-type-2:checked ~ label.ff-label-type-2, .ff-container input.ff-selector-type-3:checked ~ label.ff-label-type-3{ background: linear-gradient(top, #646d93 0%,#7c87ad 100%); color: #424d71; text-shadow: 0px 1px 1px rgba(255,255,255,0.3); box-shadow: 0px 0px 0px 1px #40496e, 0 1px 2px rgba(0,0,0,0.1) inset; } The thing is I want to put those <input type="radio">'s on the <head> section of my portfolio, but obviously the ~ selector won't work there. So my question is that is there any selector, hack or something that can do that? Something like .ff-container input.ff-selector-type-all:checked $ header > label.ff-label-type-all { awesomeness:100%; } I really don't want to use Javascript/Jquery for that... Thank you so much in advance!

    Read the article

  • How to populate a private container for unit test?

    - by Sardathrion
    I have a class that defines a private (well, __container to be exact since it is python) container. I am using the information within said container as part of the logic of what the class does and have the ability to add/delete the elements of said container. For unit tests, I need to populate this container with some data. That date depends on the test done and thus putting it all in setUp() would be impractical and bloated -- plus it could add unwanted side effects. Since the data is private, I can only add things via the public interface of the object. This run codes that need not be run during a unit test and in some case is just a copy and paste from another test. Currently, I am mocking the whole container but somehow it does not feel that elegant a solution. Due to Python mocking frame work (mock), this requires the container to be public -- so I can use patch.dict(). I would rather keep that data private. What pattern can one use to still populate the containers without excising the public method so I have data to test with? Is there a way to do this with mock' patch.dict() that I missed?

    Read the article

  • Organising XML results as cells in container (AS3)

    - by PJ Palomaki
    Hi, I'm having some problems figuring out how to organise data pulled off XML in cells within a container. I'm sure this should be a basic thing in AS3, but my head's fried.. can anyone help? Basically an array if fed to callThumbs() which iterates through it and compares the entries with preloaded XML _my_images. If match is found, it's sent to processXML which loads all relevant info and loads a .jpg thumbnail. All this is then fed to createCell which creates a specific cell with position values depending on x_counter and y_counter values (4 cells in a row) and adds the cell into a container _container_mc. The Problem: This all works fine and looks fine, the problem is that the cells within the container do not display in descending order. They are in random order, probably because some of the .jpg's takes longer to load etc. How do I easily organise the cells within the container in descending order by the XML .id value? Or how do I tell Flash to wait till the thumbnail and data is loaded and the cell created and added? Thanks guys, would really appreciate all the help! PJ //Flash (AS3) function callThumbs(_my_results:Array):void { // selector = 1 for specific items, 2 for search items var _thumb_url:XML; for (var r:Number=0; r < _my_results.length; r++) { // iterate through results vector, compare with _my_images XML .id for (var i:Number=0; i < _my_images.length(); i++) { if (_my_images[i][email protected]() == _my_results[r]) { _thumb_url=_my_images[i]; processXML(_thumb_url, i); } } } } // End callThumbs function processXML(imageXML:XML, num:Number) { // Processes XML data and loads .jpg thumbnail var _thumb_loader=new Loader(); _thumb_loader.load(new URLRequest("thumbs/thumb_sm/" + imageXML.@id + "_st.jpg")); _thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,thumbLoaded); _thumb_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, urlNotFound); var id:XMLList = new XMLList; id = imageXML.@id; var description:XMLList = new XMLList; description = imageXML.@description; function urlNotFound(event:IOErrorEvent):void { trace("The image URL '" + String(imageXML.@id) + "' was not found."); } function thumbLoaded(e:Event):void { var imageLoader:Loader = Loader(e.target.loader); var bm:Bitmap = Bitmap(imageLoader.content); createCell(bm, id, description, num); adjustFooterBar(); // Adjust bottom footer } } // End processXML private function createCell(_image:Bitmap, _id, _description:String, _position):void { // Creates a cell with data, add to container var _cell_mc = new CellTitle(); _cell_mc.initCell(_image, _id, _description, _position, x_counter, y_counter); if (x_counter+1 < 4) { x_counter++; } else { x_counter = 0; y_counter++; } _container_mc.addChild(_cell_mc); // movieclip container } // End createCell

    Read the article

  • WHy am I unable to add text along with <%# Container.DataItem %> in repeater in user control

    - by Jamie Hartnoll
    I have a User Control which is dynamically placed by CodeBehind as follows: Dim myControl As Control = CType(Page.LoadControl("~/Controls/mainMenu.ascx"), Control) If InStr(Request.ServerVariables("url"), "/Login.aspx") <= 0 Then mainMenu.Controls.Add(myControl) End If As per an example from my previous question on here. Within this Control is a repeater which calls a database to generate values. My Repeater mark-up is as follows <asp:Repeater runat="server" ID="locationRepeater" OnItemDataBound="getQuestionCount"> <ItemTemplate> <p id='locationQuestions' title='<%# Container.DataItem %>' runat='server'></p> </ItemTemplate> </asp:Repeater> The example above works fine, but I want to be able to prepend text to <%# Container.DataItem %> in the title attribute of that <p to print to the browser like this is some text DATA_ITEM_OUTPUT When I try to do that though, it prints this is some text <%# Container.DataItem %> exactly like that, ie, turning <%# Container.DataItem %> into text, NOT the value from the repeater code. It was working fine before I made it into a dynamically inserted control, so I am thinking I might have something being generated in the wrong order, but given that it works without any prepended text, I am stumped to fix it! I'm new to .net and using vb.net, please could someone point me in the right direction?

    Read the article

  • Share Truecrypt container

    - by uwe
    Hello, is it possible to put a truecrypt container on a net share and access/mount it form multiple machines (windows) at the same time? I fear that if both would write the file could be corrupted.

    Read the article

  • Update panel in Tab Container

    - by Sam_Cogan
    I have a tab container with 5 tabs, each tab contains an update panel. When the user initially opens the form, they can only see the first Tab, the others are set to visible=false. Once they have completed the first form, the hit save which sends a partial postback to save the data to the DB. Once that is saved, I then want to set all the other tabs to visible, however this does not work at the moment, I am assuming because the tab container is not contained in an update panel. How can I get this to work, do I need to put the tab container in it's own update panel, which will obviously then contain all the other update panels, or should I not use an update panel in the first tab and do a full page postback?

    Read the article

  • JLayeredPane versus Container layering

    - by Gili
    JLayeredPane allows one to stack multiple Components on top of one another using JLayeredPane.add(Component, Integer). Components in higher "layers" display on top of Components in lower "layers". Container.add(Component, int) provides a similar mechanism whereby Components with lower indexes display on top of Components with higher indexes. Please note that the first mechanism uses Integer and the second mechanism uses int. Also, one renders high values on top of low ones, and the other does the opposite. Do not mix the two :) My question is: what's the point of using JLayeredPane when Container already provides the same mechanism? Does one layer components better than the another? UPDATE: There is also Container.setComponentZOrder(Component, int) to consider.

    Read the article

  • Windows Azure: Exception while creating a blob container

    - by veda
    I followed a tutorial on creating a blob on windows azure. But when I do that, I get an exception error: Error while creating containerThe server encountered an unknown failure: The remote server returned an error: (300) Ambiguous Redirect. The code is : private void SetContainersAndPermission() { try { // create a container var CloudAccountStorage = CloudStorageAccount.FromConfigurationSetting("BlobConnectionString"); cloudBlobClient = CloudAccountStorage.CreateCloudBlobClient(); CloudBlobContainer blobContainer = cloudBlobClient.GetContainerReference("documents"); blobContainer.CreateIfNotExist(); // permissions var containerPermissions = blobContainer.GetPermissions(); containerPermissions.PublicAccess = BlobContainerPublicAccessType.Container; blobContainer.SetPermissions(containerPermissions); } catch(Exception ex) { throw new Exception("Error while creating container" + ex.Message); } } Can anyone tell me How to solve this problem....

    Read the article

  • Override asbolute position on child container (modal window)

    - by Shawn Mclean
    I have a modal window that is pulled from the server and inserted into a container that is absolute positioned. When that window is triggered to open, it does not display properly, it positions itself inside the container and most of it is hidden. Is there a specific css to be written for the container of the modal window (MyModalWindow). My code is as follows: <div style="position:relative;"> <div style="position: absolute;"> <div id="MyModalWindow"> </div> </div> </div> This is a jquery tools window.

    Read the article

  • Better name needed for applying a function on elements of a container

    - by stefaanv
    I have a container class (containing a multi-index container) for which I have a public "foreach" member-function, so users can pass a functor to apply on all elements. While implementing, I had a case where the functor should only be applied to some elements of a range in the container, so I overloaded the foreach, to pass some valid range. Now, in some cases, it was worthwhile to stop on a certain condition, so practically, I let the foreach stop based on the return-value of the function. I'm pleased with how the system works, but I have one concern: How should a "foreach" on a range, with stop conditions be called? Anyone knows a generic, clear and concise name?

    Read the article

  • FFmpeg extract clip - stream frame rate differs from container frame rate (x264, aac)

    - by fideli
    Summary H.264 video seems to have a really high frame rate that requires a scaling factor to the applied to the duration of video that I'm trying to extract (900x lower). Body I'm trying to extract a clip from a movie that I have in MP4 format (created using Handbrake). After trying mencoder and VLC, I decided to give FFmpeg a shot since it was the least troublesome when it came to copying the codecs. That is, compared to mencoder and VLC, the resulting file was still playable in QuickTime (I know about Perian, etc, I'm just trying to learn how all this works). Anyway, my command was as follows: ffmpeg -ss 01:15:51 -t 00:05:59 -i outofsight.mp4 \ -acodec copy -vcodec copy clip.mp4 During the copy, The following comes up: Seems stream 0 codec frame rate differs from container frame rate: 45000.00 (45000/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from outofsight.mp4': Duration: 01:57:42.10, start: 0.000000, bitrate: 830 kb/s Stream #0.0(und): Video: h264, yuv420p, 720x384, 25 tbr, 22500 tbn, 45k tbc Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 Output #0, mp4, to 'out.mp4': Stream #0.0(und): Video: libx264, yuv420p, 720x384, q=2-31, 90k tbn, 22500 tbc Stream #0.1(eng): Audio: libfaac, 48000 Hz, stereo, s16 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 2591 fps=2349 q=-1.0 size= 8144kB time=101.60 bitrate= 656.7kbits/s … Instead of a 5:59 duration clip, I get the entire rest of the movie. So, to test this, I ran the ffmpeg command with -t 00:00:01. What I got was exactly a 15:00 minute clip. So I did some black box engineering and decided to scale my -t option by calculating what value to enter given that 1 second was interpreted as 900 s. For my desired 359 s clip, I calculated 0.399 s and so my ffmpeg command became: ffmpeg -ss 01:15.51 -t 00:00:00.399 -i outofsight.mp4 \ -acodec copy -vcodec copy clip.mp4 This works, but I have no idea why the duration is scaled by 900. Investigating further, each ffmpeg run has the line: Seems stream 0 codec frame rate differs from container frame rate: 45000.00 (45000/1) -> 25.00 (25/1) 45000/25 = 1800. Must be a relation somewhere. Somehow, the obscenely high frame rate is causing issues with the timing. How is that frame rate so high? The best part about this is that the resulting clip.mp4 has the exact same feature (due to the copied video codec), and taking further clips from this needs the same scaling for the -t duration option. Therefore, I've made it available for anyone willing to check this out. Appendix The preamble for ffmpeg on my system (built using MacPorts ffmpeg port): FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 1. 4. 0 / 1. 4. 0 libswscale 1. 7. 1 / 1. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jan 4 2010 21:51:51, gcc: 4.2.1 (Apple Inc. build 5646) (dot 1)

    Read the article

  • FFmpeg extract clip - stream frame rate differs from container frame rate (x264, aac)

    - by fideli
    Summary H.264 video seems to have a really high frame rate that requires a scaling factor to the applied to the duration of video that I'm trying to extract (900x lower). Body I'm trying to extract a clip from a movie that I have in MP4 format (created using Handbrake). After trying mencoder and VLC, I decided to give FFmpeg a shot since it was the least troublesome when it came to copying the codecs. That is, compared to mencoder and VLC, the resulting file was still playable in QuickTime (I know about Perian, etc, I'm just trying to learn how all this works). Anyway, my command was as follows: ffmpeg -ss 01:15:51 -t 00:05:59 -i outofsight.mp4 \ -acodec copy -vcodec copy clip.mp4 During the copy, The following comes up: Seems stream 0 codec frame rate differs from container frame rate: 45000.00 (45000/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from outofsight.mp4': Duration: 01:57:42.10, start: 0.000000, bitrate: 830 kb/s Stream #0.0(und): Video: h264, yuv420p, 720x384, 25 tbr, 22500 tbn, 45k tbc Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 Output #0, mp4, to 'out.mp4': Stream #0.0(und): Video: libx264, yuv420p, 720x384, q=2-31, 90k tbn, 22500 tbc Stream #0.1(eng): Audio: libfaac, 48000 Hz, stereo, s16 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 2591 fps=2349 q=-1.0 size= 8144kB time=101.60 bitrate= 656.7kbits/s … Instead of a 5:59 duration clip, I get the entire rest of the movie. So, to test this, I ran the ffmpeg command with -t 00:00:01. What I got was exactly a 15:00 minute clip. So I did some black box engineering and decided to scale my -t option by calculating what value to enter given that 1 second was interpreted as 900 s. For my desired 359 s clip, I calculated 0.399 s and so my ffmpeg command became: ffmpeg -ss 01:15.51 -t 00:00:00.399 -i outofsight.mp4 \ -acodec copy -vcodec copy clip.mp4 This works, but I have no idea why the duration is scaled by 900. Investigating further, each ffmpeg run has the line: Seems stream 0 codec frame rate differs from container frame rate: 45000.00 (45000/1) -> 25.00 (25/1) 45000/25 = 1800. Must be a relation somewhere. Somehow, the obscenely high frame rate is causing issues with the timing. How is that frame rate so high? The best part about this is that the resulting clip.mp4 has the exact same feature (due to the copied video codec), and taking further clips from this needs the same scaling for the -t duration option. Therefore, I've made it available for anyone willing to check this out. Appendix The preamble for ffmpeg on my system (built using MacPorts ffmpeg port): FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 1. 4. 0 / 1. 4. 0 libswscale 1. 7. 1 / 1. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jan 4 2010 21:51:51, gcc: 4.2.1 (Apple Inc. build 5646) (dot 1) EDIT Not sure whether it was a bug or not, but it seems to be fixed now in my current version of ffmpeg, at least for this video (version 0.6.1 from MacPorts).

    Read the article

  • MEF = may experience frustration?

    - by Dave
    Well, it's not THAT bad yet. :) But I do have questions after Reed has pointed me at MEF as a potential alternative to IoC (and so far it does look pretty good). Consider the following model: As you can see, I have an App, and this app uses Plugins (whoops, missed that association!). Both the App and Plugins require usage of an object of type CandySettings, which is found in yet another assembly. I first tried to use the ComposeParts method in MEF, but the only way I could get this to work was to do something like this in the plugin code. var container = new CompositionContainer(); container.ComposeParts(this, new CandySettings()); But this doesn't make any sense, because why would I want to create the instance of CandySettings in the plugin? It should be in the App. But if I put it in the App code, then the Plugin doesn't magically figure out how to get at ICandySettings, even though I am using [Import] in the plugin, and [Export] in CandySettings. The way I did it was to use MEF's DirectoryCatalog, because this allows the plugin, when constructed, to scan all of the assemblies in the current folder and automagically import everything that is marked with the [Import] attribute. So it looks like this, and potentially in every plugin: var catalog = new DirectoryCatalog( "."); var container = new CompositionContainer( catalog); container.ComposeParts( this); This totally works great, but I can't help but think that this is not how MEF was intended to be used?

    Read the article

  • Castle, sharing a transient component between a decorator and a decorated component

    - by Marius
    Consider the following example: public interface ITask { void Execute(); } public class LoggingTaskRunner : ITask { private readonly ITask _taskToDecorate; private readonly MessageBuffer _messageBuffer; public LoggingTaskRunner(ITask taskToDecorate, MessageBuffer messageBuffer) { _taskToDecorate = taskToDecorate; _messageBuffer = messageBuffer; } public void Execute() { _taskToDecorate.Execute(); Log(_messageBuffer); } private void Log(MessageBuffer messageBuffer) {} } public class TaskRunner : ITask { public TaskRunner(MessageBuffer messageBuffer) { } public void Execute() { } } public class MessageBuffer { } public class Configuration { public void Configure() { IWindsorContainer container = null; container.Register( Component.For<MessageBuffer>() .LifeStyle.Transient); container.Register( Component.For<ITask>() .ImplementedBy<LoggingTaskRunner>() .ServiceOverrides(ServiceOverride.ForKey("taskToDecorate").Eq("task.to.decorate"))); container.Register( Component.For<ITask>() .ImplementedBy<TaskRunner>() .Named("task.to.decorate")); } } How can I make Windsor instantiate the "shared" transient component so that both "Decorator" and "Decorated" gets the same instance? Edit: since the design is being critiqued I am posting something closer to what is being done in the app. Maybe someone can suggest a better solution (if sharing the transient resource between a logger and the true task is considered a bad design)

    Read the article

  • Lightcore IoC is returning the same instance when it should give a new one

    - by Anthony
    I have the following code using the lightcore IoC container. But it fails with "NUnit.Framework.AssertionException: Contained objects are equal" which indicates that the objects that should be transient, are not. Is this a bug in lightcore, or am I doing it wrong? [Test] public void JellybeanDispenserHasNewInstanceEachTimeWithDefault() { var builder = new ContainerBuilder(); builder.Register<IJellybeanDispenser, VanillaJellybeanDispenser>(); builder.Register<SweetVendingMachine>().ControlledBy<TransientLifecycle>(); builder.Register<SweetShop>(); builder.DefaultControlledBy<TransientLifecycle>(); IContainer container = builder.Build(); SweetShop sweetShop = container.Resolve<SweetShop>(); SweetShop sweetShop2 = container.Resolve<SweetShop>(); Assert.IsFalse(ReferenceEquals(sweetShop, sweetShop2), "Root objects are equal"); Assert.IsFalse(ReferenceEquals(sweetShop.SweetVendingMachine, sweetShop2.SweetVendingMachine), "Contained objects are equal"); Assert.IsFalse(ReferenceEquals(sweetShop.SweetVendingMachine.JellybeanDispenser, sweetShop2.SweetVendingMachine.JellybeanDispenser), "services are equal"); } PS: I would tag this question with "lightcore", but suddenly my reputation isn't good enough to make a new tag. Huh.

    Read the article

  • Inversion of control domain objects construction problem

    - by Andrey
    Hello! As I understand IoC-container is helpful in creation of application-level objects like services and factories. But domain-level objects should be created manually. Spring's manual tells us: "Typically one does not configure fine-grained domain objects in the container, because it is usually the responsibility of DAOs and business logic to create/load domain objects." Well. But what if my domain "fine-grained" object depends on some application-level object. For example I have an UserViewer(User user, UserConstants constants) class. There user is domain object which cannot be injected, but UserViewer also needs UserConstants which is high-level object injected by IoC-container. I want to inject UserConstants from the IoC-container, but I also need a transient runtime parameter User here. What is wrong with the design? Thanks in advance! UPDATE It seems I was not precise enough with my question. What I really need is an example how to do this: create instance of class UserViewer(User user, UserService service), where user is passed as the parameter and service is injected from IoC. If I inject UserViewer viewer then how do I pass user to it? If I create UserViewer viewer manually then how do I pass service to it?

    Read the article

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