Search Results

Search found 397 results on 16 pages for 'timeline'.

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

  • How can I access and modify objects inside frames with AS3 in a permanent way?

    - by curro
    I have a MovieClip symbol created with flash in a fla file library. There is a textfield in frame one of this movieclip's timeline . There is another frame in the movieclip timeline. There is a custon class definition for this symbol. It is a flipping card in a memory game. I access the textfield by going to frame 2 (gotoAndStop(2)) and setting the textfield's text property ( this.field.text = "hello" ). However if I go to frame 1 and then return to frame 2, the text becomes the original one in the library's symbol. I have to modify the text propery again in a showFace method I've written. Besides, I cannot pass parameters in the constructor because it is a symbol in the library and that would give errors. I find this behaviour of flash extremely weird. Is there a way I can set properties inside frames permanently? Thank you

    Read the article

  • ActionScript 3.0: placing code on stage/MC timelines a la AS2 instead of in classes

    - by BoltClock
    I'm aware that ActionScript 3.0 is designed from the ground up to be a largely object-oriented language and using it means less or even no timeline code in Flash documents. I'm quite experienced with OOP and am comfortable writing classes. However, since I mostly use Flash for animations, I hardly ever need to write ActionScript code other than for preloaders, subtitles, quality controls, website links and so on. In fact, I still set my Flash movies to use AS2 to this day because I'm used to gotoAndPlay()/gotoAndStop(), AS2 preloaders, subtitles, quality controls and even getURL(). Of course, I really want to move on now that practically everyone's on Flash Player 9 or 10 and now that I've dabbled with other OO languages like Java, C# and Objective-C too. I'm a complete newcomer to AS3 and am not very learned with AS2 either. Considering my current use of ActionScript, are there any cases where it's still OK to use very simple AS3 code in the timeline instead of moving code to a class, especially since moving to a class might mean unnecessarily increasing the number of LOC from 4 to 40? (Heck, is the latter case ('instead of ...') even a valid concern at all?)

    Read the article

  • Delay garbage collection?

    - by GeoffreyF67
    I'm using chrome (the dev version for my mac). I was looking at the timeline for my page loading and I saw that there is a 150ms delay due to some garbage collection taking place while loading the page. http://cl.ly/cce10619c698a5b276e2 It's the yellow line. I was curious if there's any way to stop this, delay it, whatever so I get the page to load faster? G-Man

    Read the article

  • Disabling Keyboard Wakeup for Ubuntu 10.04 on Acer 1810TZ

    - by sybreon
    My Acer Aspire 1810TZ laptop suspends fine but wakes up on any slight key-press. I would like to disable this behaviour. I read that it involves disabling something in the /proc/acpi/wakeup but SLPB does not seem to be listed at all. root@1810TZ:/etc# cat /proc/acpi/wakeup Device S-state Status Sysfs node UHC0 S3 disabled pci:0000:00:1d.0 UHC1 S3 disabled pci:0000:00:1d.1 UHC2 S3 disabled pci:0000:00:1d.2 UHCR S3 disabled EHC1 S3 disabled pci:0000:00:1d.7 UHC3 S3 disabled pci:0000:00:1a.0 UHC4 S3 disabled UHC5 S3 disabled EHC2 S3 disabled pci:0000:00:1a.7 EXP1 S4 disabled pci:0000:00:1c.0 PXSX S4 disabled pci:0000:01:00.0 EXP2 S4 disabled PXSX S4 disabled EXP3 S4 disabled PXSX S4 disabled EXP4 S4 disabled pci:0000:00:1c.3 PXSX S4 disabled pci:0000:02:00.0 EXP5 S4 disabled PXSX S4 disabled EXP6 S4 disabled PXSX S4 disabled However, the relevant bits seem to be detected from dmesg. [ 0.357628] ACPI: AC Adapter [ACAD] (on-line) [ 0.357749] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 [ 0.357754] ACPI: Power Button [PWRB] [ 0.357817] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1 [ 0.359319] ACPI: Lid Switch [LID0] [ 0.359390] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2 [ 0.359394] ACPI: Sleep Button [SLPB] [ 0.359475] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3 [ 0.359479] ACPI: Power Button [PWRF] Not quite sure what to do next.

    Read the article

  • Parallel Class/Interface Hierarchy with the Facade Design Pattern?

    - by Mike G
    About a third of my code is wrapped inside a Facade class. Note that this isn't a "God" class, but actually represents a single thing (called a Line). Naturally, it delegates responsibilities to the subsystem behind it. What ends up happening is that two of the subsystem classes (Output and Timeline) have all of their methods duplicated in the Line class, which effectively makes Line both an Output and a Timeline. It seems to make sense to make Output and Timeline interfaces, so that the Line class can implement them both. At the same time, I'm worried about creating parallel class and interface structures. You see, there are different types of lines AudioLine, VideoLine, which all use the same type of Timeline, but different types of Output (AudioOutput and VideoOutput, respectively). So that would mean that I'd have to create an AudioOutputInterface and VideoOutputInterface as well. So not only would I have to have parallel class hierarchy, but there would be a parallel interface hierarchy as well. Is there any solution to this design flaw? Here's an image of the basic structure (minus the Timeline class, though know that each Line has-a Timeline): NOTE: I just realized that the word 'line' in Timeline might make is sound like is does a similar function as the Line class. They don't, just to clarify.

    Read the article

  • Setting instance names on keyframes quickly in AS3

    - by Boon
    Right now in Flash CS3 and up (using Actionscript 3) if you have the same instance that is used in multiple keyframes in a layer, and you decide to assign or change the instance name later, you would have to go to each keyframe and set the instance name. This is a big nuisance. Is there a quicker or better way to do this? NOTE: In AS2, you can set the name by using name property of the MovieClip in your code in the onLoad handler of the MovieClip class so it's done once and for all. Unfortunately in AS3, you are not allowed to set the name property anymore.

    Read the article

  • how to view file history in GIT?

    - by mrblah
    With subversion I could use tortieseSVN to view the history/log of a file. How can I do this with git? Just looking for history record for a particular file, and then the ability to compare the different versions.

    Read the article

  • Possible to access all Movie clips on a layer, on timeline, through stage ?

    - by azislo
    I have a code ... var selection:Array = new Array(); var diplayObjCont:* = stage; // The rectangle that defines the selection in the containers coordinate space. // Loop throught the containers children. for(var a:int; a<diplayObjCont.numChildren; a++){ // Get the childs bounds in the containers coordinate space. var child:DisplayObject = diplayObjCont.getChildAt(a); selection.push(child); } trace(selection); that returns just [object MainTimeline] So, can I access layers on this MainTimeline to get all Movie Clips on this layer ? So I can do a simple operation "A_1_2.buttonMode = true;" to all my MC's (in an array for example) without writing every line (lot of MC's on layer and lot of lines).

    Read the article

  • Most effecient way to create a "slider" timeline in HTML, CSS, and JavaScript?

    - by ZapChance
    Alright, so here's my dilemma. I've got these two "slides" lined up, one ready to be passed into view. I have it working and all, but I can scroll over to the right to see the second slide! How could I have it you can only view the one slide? JavaScript used: function validate(form) { var user = form.username.value; var pass = form.password.value; if(user === "test") { if(pass === "pass") { var hideoptions = {"direction" : "left", "mode" : "hide"}; var showoptions = {"direction" : "left", "mode" : "show"}; /*$("#loginView").toggle("slide", hideoptions, 1000, function() { $("#loginView").css("margin-left", "100%"); }); $("#mainView").toggle("slide", showoptions, 1000, function() { $("#mainView").css("margin-left", 0); });*/ $("#loginView").animate({ marginLeft: "-100%" }, 1000); $("#mainView").animate({ marginLeft: "0" }, 1000); } else { alert("nope"); } } else { alert("nope 2"); } } As you can see here @ http://jsfiddle.net/D7Va3/1/ (JSFiddle), once you enter "test" and "pass", then click enter, the tiles slide. But. If you reload, you can see that you can scroll to the right of the screen and view the second slide prematurely, which is just not going to work for me. I still need to achieve the same seamless transition, but you must only be able to view one slide at a time. Also, I plan to expand with more slides, so if you're feeling lucky today, I'd really love to see an example of how I could support multiple frames. I'm very new to JavaScript (yet I know syntax rules, and general coding knowledge from other languages), so the better you explain, the more knowledgeable I can be, and I'd be very grateful for that. Thanks in advance!

    Read the article

  • Merging Flash animations

    - by Radu
    If I have a Flash project in which there are multiple movie clips animating, each with its own timeline and other embedded movie clips, again, each with its own timeline, how can I merge everything so that I end up with a single timeline and a single layer? If Flash doesn't support this, maybe there's something else out there that can do this? I'm thinking that such a tool would need to calculate the intermediary tween values and somehow create keyframes with those values, then break everything apart and only animate the correct parts from the calculated keyframe values...

    Read the article

  • Camtasia 6: Callout not hiding!!

    - by user35112
    i am creating a video in Camtasia Studio 6. I created a callout in timeline, In timeline its showing that this callout will hide after 5 seconds. When i play the movie the callout is not hiding but if i click on the timeline anywhere after the callout and play the video the callout is hidden. Whats going on???

    Read the article

  • Set Final Cut Express Sequence Options to 970p30

    - by Maccaius
    Hi I have an project in FCE which was recorded in MPEG-4 video in 1280 x 960 (1,4MB/s) and whenever I import those mov files to FCE thez show just fine. but when i add the clips to the timeline (sequence) the quality is cropped - instead of HD i can onlz export the timeline with quicktime conversion and a resolution of 720 x 480. can anybody help me out and tell me how i can export the timeline in full HD quality (as the raw material itself is)?

    Read the article

  • Silverlight 4 Twitter Client &ndash; Part 7

    - by Max
    Download this article as a PDF Welcome back :) This week we are going to look at something more exciting and a much required feature for any twitter client – auto refresh so as to show new status updates. We are going to achieve this using Silverlight 4 Timers and a bit and refresh our datagrid every 2 minutes to show new updates. We will do this so that we do only minimal request to the twitter api, so that twitter does not block us – there is a limit of 150 request an hour. Let us get started now. Also we will get the profile user id hyperlinked, so that when ever the user click on it, we will take them to their twitter page. Also it was a pain to always run this application by pressing F5, then it would open in a browser you would have to right click uninstall and install it again to see any changes. All this and yet we were not able to debug it :( Now there is a solution for this to run a silverlight application directly out of browser and yet have the debug feature. Super cool, here is how. Right on the Silverlight project and go to debug and then select the Out-Of-Browser application option and choose the *.Web project. Then just right click on the SL project and set as Startup Project. There you go, now every time you press F5, it will automatically run out of browser and still have the debug options. I go to know about this after some binging. Now let us jump to the core straight away. 1) To get the user id hyperlinked, we need to have a DataGridTemplateColumn and within that have a HyperLinkButton. The code for this will  be <data:DataGridTemplateColumn> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <HyperlinkButton Click="HyperlinkButton_Click" Content="{Binding UserName}" TargetName="_blank" ></HyperlinkButton> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> </data:DataGridTemplateColumn> 2) Now let us look at how we are getting this done by looking into HyperlinkButton_Click event handler. There we will dynamically set the NavigateUri to the twitter page. I tried to do this using some binding, eval like stuff as in ASP.NET, but no luck! private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { HyperlinkButton hb = (HyperlinkButton)e.OriginalSource; hb.NavigateUri = new Uri("http://twitter.com/" + hb.Content.ToString(), UriKind.Absolute); } 3) Now we need to switch on our Timer right in the OnNavigated to event on our SL page. So we need to modify our OnNavigated event to some thing like below: protected override void OnNavigatedTo(NavigationEventArgs e) { image1.Source = new BitmapImage(new Uri(GlobalVariable.profileImage, UriKind.Absolute)); this.Title = GlobalVariable.getUserName() + " - Home"; if (!GlobalVariable.isLoggedin()) this.NavigationService.Navigate(new Uri("/Login", UriKind.Relative)); else { currentGrid = "Timeline-Grid"; TwitterCredentialsSubmit(); myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 60, 0); myDispatcherTimer.Tick += new EventHandler(Each_Tick); myDispatcherTimer.Start(); } } I use a global string – here it is currentGrid variable to indicate what is bound in the datagrid so that after every timer tick, I can rebind the latest data to it again. Like I will only rebind the friends timeline again if the data grid currently holds it and I’ll only rebind the respective list status again in the data grid, if already a list status is bound to the data grid. In the above timer code, its set to trigger the Each_Tick event handler every 1 minute (60 seconds). TimeSpan takes in (days, hours, minutes, seconds, milliseconds). 4) Now we need to set the list name in the currentGrid variable when a list button is clicked. So add the code line below to the list button event handler currentGrid = currentList = b.Content.ToString(); 5) Now let us see how Each_Tick event handler is implemented. public void Each_Tick(object o, EventArgs sender) { if (!currentGrid.Equals("Timeline-Grid")) getListStatuses(currentGrid); else { WebRequest.RegisterPrefix("https://", System.Net.Browser.WebRequestCreator.ClientHttp); WebClient myService = new WebClient(); myService.AllowReadStreamBuffering = true; myService.UseDefaultCredentials = false; myService.Credentials = new NetworkCredential(GlobalVariable.getUserName(), GlobalVariable.getPassword()); myService.DownloadStringCompleted += new DownloadStringCompletedEventHandler(TimelineRequestCompleted); myService.DownloadStringAsync(new Uri("https://twitter.com/statuses/friends_timeline.xml")); } } If the data grid hold friends timeline, I just use the same bit of code we had already to bind the friends timeline to the data grid. Copy Paste. But if it is some list timeline that is bound in the datagrid, I then call the getListStatus method with the currentGrid string which will actually be holding the list name. 6) I wanted to make the hyperlinks inside the status message as hyperlinks and when the user clicks on it, we can then open that link. I tried using a convertor and using a regex to recognize a url and wrap it up with a href, but that is not gonna work in silverlight textblock :( Anyways that convertor code is in the zip file. 7) You can get the complete project files from here. 8) Please comment below for your doubts, suggestions, improvements. I will try to reply as early as possible. Thanks for all your support. Technorati Tags: Silverlight 4,Datagrid,Twitter API,Silverlight Timer

    Read the article

  • What time planning tools do you use?

    - by sbrattla
    I'm trying to get a better overview of my tasks, and I'm looking for a tool which would let me enter tasks (everything from 2 hour tasks to 2 week tasks) and then simply let me organize these tasks on a timeline. I'm thinking that all tasks would have an estimated duration, and I could then prioritize these tasks by moving them along the timeline to prioritize them. The timeline would then show me the "tasks stack" and how far into the future i'm occupied. I'm not looking for an issue/bug handling system, but simply a tool which lets me get an overview of my tasks. I guess we're more into the category of resource planning. What tools do you use for this?

    Read the article

  • My Favorite Free Windows Phone Twitter App

    - by Tim Murphy
    Windows Phone 7 has been out for about two years now.  In that time I have switched back and forth with different free Twitter apps.  Mostly the has been because someone has mentioned one or another that they like.  I figured I would give a quick run down of what I felt were the pros and cons of each.  These are only the ones that I have used and your mileage may vary.  So here we go. WP7 Built-In Twitter Functionality While it is great that Microsoft put this functionality in, it is extremely limited in usefulness.  Some apps leverage it to allow you to share pictures or information they contain.  In all though, I don’t use it unless it is the quickest way to get something out. Official Twitter App The official Twitter app isn’t a very big step up from the phone functionality.  It gives you a better timeline view and better attachment handling, but it makes you bounce to a browser page to see images that are linked to a tweet. TweetCaster This was my main Twitter app for quite a while.  It is the only one with InstaPaper integration so that you can save you a tweet and review it later.  My main problem is that it crashes too much when it can’t find a connection.  It also only previews yfrog and twitpic images and only once you go to the detail of a tweet.  Other than that it is a solid Twitter client. moTweets This is my current favorite. It has nice image display in your timeline which I have not seen on any of the other apps.  There are two modes that you can use with this app.  The first is standard to most Twitter apps that allows you to navigate to a tweet and do the usual operations.  The second is what they call Quick Buttons.  In this case you do not see the content of the tweet but go straight to the let’s get something done stage.  It is an interesting take.  I do miss the Instapaper integration and it has a tendency to show a blank timeline list once in a while after you view detail entry.  If you scroll the list it restore your timeline, but you lose you place and are put to the first entry. Seesmic I am not very fond of this app.  The first thing is that it makes you pick a “Space” when you enter the app.  This is really “which account do you want to see”.  On top of that it does not show who retweeted an entry in your timeline and then only tells you how many people RT the post when you look at the detail.  There is a Speak feature that will read you a single tweet, but you have to navigate to the tweet and then to a menu to make it work.  We will have to see if this gets better with the features in Windows Phone 8.  Other than that it is another basic feature app.  Summary In the end I am sticking with moTweets.  I would appreciate it if they added the Instapaper capability and fixed the one bug.  If they did that I would be really happy with the product. del.icio.us Tags: Twitter,Windows Phone 7,WP7,TweetCaster,moTweets,Seesmic

    Read the article

  • VB.NET, templates, reflection, inheritance, feeling adrift

    - by brovar
    I've just made myself up a problem and am now wondering how to solve it. To begin with, I'm using some third-party components, including some calendar controls like schedule and timeline. They're used in the project classes more or less like that: Friend Class TimeBasedDataView 'some members End Class Friend Class ScheduleDataView Inherits TimeBasedDataView Public Schedule As Controls.Schedule.Schedule 'and others End Class Friend Class TimeLineDataView Inherits TimeBasedDataView Public TimeLine As Controls.TimeLine.TimeLine 'and others End Class (Hmm, code coloring fail, never mind...) Now, to allow managing the look of data being presented there are some mechanisms including so called Style Managers. A lot of code in them repeats, varying almost only with the control it maintains: Friend Class TimeLineStyleManager Private m_TimeLine As TimeLineDataView Private Sub Whatever() m_TimeLine.TimeLine.SomeProperty = SomeValue End Sub End Class Friend Class ScheduleStyleManager Private m_Schedule As ScheduleDataView Private Sub Whatever() m_Schedule.Schedule.SomeProperty = SomeValue End Sub End Class I was wondering if I could create some base class for those managers, like Friend Class TimeBasedCtrlStyleManagerBase(Of T As TimeBasedDataView) Private m_Control As T 'and others End Class which would unify these two, but I've got lost when it came to maintaining two components that have nothing in common (except their properties' names, etc.). Type reflection maybe? I'll be grateful for any advice ;)

    Read the article

  • Reading PowerPoint Effects with VBA

    - by OneNerd
    I have been working with VBA inside PowerPoint, and have a grasp on most things. What I am struggling with is reading the effect/animation settings for each object. I seem to be able to get a lot of what I need through the Powerpoint.ActivePresentation.Slides(slide_id).TimeLine.MainSequence(seq_num) What confuses me is how to convert the numeric value of Powerpoint.ActivePresentation.Slides(slide_id).TimeLine.MainSequence(seq_num).EffectType to an effect (so looking for a table of values to effects or perhaps a CONST table). Also, how to read in all the different level of effects (like entrance, or emphasis, etc) is really confusing. not to mention I cannot wrap my head around the timeline (which seems like it is not really a timeline). Can anyone point me to any good articles or documentation that discusses how to read the effects and animations properly and fully? Thanks.

    Read the article

  • Actionscript not running in nested MovieClips in Swf loaded into AIR app.

    - by Stray
    I'm loading content swfs into an Air App. The swfs are loaded into the non-app sandbox, and any communication is via the parent/child sandbox bridge. The swfs have timeline code. This code executes fine. The swfs also have mcs on the timeline - any code inside these mcs, or any child mcs of these mcs, is ignored. Simple traces do not execute below the top level timeline of the loaded swfs. I have tried naming the child mcs. I have tried exporting them in the library. Neither makes any difference. When I run the swf standalone, I see my diagnostic traces. When I load the swf, I only see the traces for the top level timeline. Air app is v1.5 Any clues? I've been bashing into this brick wall for several hours now...

    Read the article

  • Anchors with overlapping divs

    - by tmdelane
    I am using a grid based layout, with two main sections. Graph and Timeline. Graph, contains graded vertical bars, HTML similar to: <div id="graph" class="container_160"> <div id="Jan-97" class="grid_1 major"><a href="#">&nbsp;</a></div> <div id="Feb-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> <div id="Mar-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> <div id="Apr-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> <div id="May-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> etc... </div> Timeline, contains horizontal bars, HTML similar to: <div id="timeline" class="container_160"> <div id="bar1" class="grid_32 suffix_128"><a href="#">&nbsp;</a></div> <div id="bar2" class="prefix_32 grid_24 suffix_104"><a href="#">&nbsp;</a></div> <div id="bar3" class="prefix_58 grid_7 suffix_95"><a href="#">&nbsp;</a></div> </div> Timeline is relatively positioned to Graph so that it overlaps. My problem is that when these divs overlap, the anchors in Timeline stop working. I am open to both CSS and Jquery solutions. Thanks in advance. t.

    Read the article

  • Facebook action and object submission

    - by tijanja
    Am new to Facebook sdk and i want to use it in my project (blackberry app) has the developer i tried writing to my timeline with the code blow through a web service and i was able to write to my timeline, my question is this must i create an action and object that must be submitted for approval before other users can use my app to write to their timeline? because permission are not granted when users try to write to their timeline. $ret_obj = $facebook->api('/me/feed', 'POST',array('link' => 'www.****.com','message' => $user_profile["name"].' just downloaded W1')); echo '<pre>Post ID: ' . $ret_obj['id'] . '</pre>';

    Read the article

  • Working with Timelines with LINQ to Twitter

    - by Joe Mayo
    When first working with the Twitter API, I thought that using SinceID would be an effective way to page through timelines. In practice it doesn’t work well for various reasons. To explain why, Twitter published an excellent document that is a must-read for anyone working with timelines: Twitter Documentation: Working with Timelines This post shows how to implement the recommended strategies in that document by using LINQ to Twitter. You should read the document in it’s entirety before moving on because my explanation will start at the bottom and work back up to the top in relation to the Twitter document. What follows is an explanation of SinceID, MaxID, and how they come together to help you efficiently work with Twitter timelines. The Role of SinceID Specifying SinceID says to Twitter, “Don’t return tweets earlier than this”. What you want to do is store this value after every timeline query set so that it can be reused on the next set of queries.  The next section will explain what I mean by query set, but a quick explanation is that it’s a loop that gets all new tweets. The SinceID is a backstop to avoid retrieving tweets that you already have. Here’s some initialization code that includes a variable named sinceID that will be used to populate the SinceID property in subsequent queries: // last tweet processed on previous query set ulong sinceID = 210024053698867204; ulong maxID; const int Count = 10; var statusList = new List<status>(); Here, I’ve hard-coded the sinceID variable, but this is where you would initialize sinceID from whatever storage you choose (i.e. a database). The first time you ever run this code, you won’t have a value from a previous query set. Initially setting it to 0 might sound like a good idea, but what if you’re querying a timeline with lots of tweets? Because of the number of tweets and rate limits, your query set might take a very long time to run. A caveat might be that Twitter won’t return an entire timeline back to Tweet #0, but rather only go back a certain period of time, the limits of which are documented for individual Twitter timeline API resources. So, to initialize SinceID at too low of a number can result in a lot of initial tweets, yet there is a limit to how far you can go back. What you’re trying to accomplish in your application should guide you in how to initially set SinceID. I have more to say about SinceID later in this post. The other variables initialized above include the declaration for MaxID, Count, and statusList. The statusList variable is a holder for all the timeline tweets collected during this query set. You can set Count to any value you want as the largest number of tweets to retrieve, as defined by individual Twitter timeline API resources. To effectively page results, you’ll use the maxID variable to set the MaxID property in queries, which I’ll discuss next. Initializing MaxID On your first query of a query set, MaxID will be whatever the most recent tweet is that you get back. Further, you don’t know what MaxID is until after the initial query. The technique used in this post is to do an initial query and then use the results to figure out what the next MaxID will be.  Here’s the code for the initial query: var userStatusResponse = (from tweet in twitterCtx.Status where tweet.Type == StatusType.User && tweet.ScreenName == "JoeMayo" && tweet.SinceID == sinceID && tweet.Count == Count select tweet) .ToList(); statusList.AddRange(userStatusResponse); // first tweet processed on current query maxID = userStatusResponse.Min( status => ulong.Parse(status.StatusID)) - 1; The query above sets both SinceID and Count properties. As explained earlier, Count is the largest number of tweets to return, but the number can be less. A couple reasons why the number of tweets that are returned could be less than Count include the fact that the user, specified by ScreenName, might not have tweeted Count times yet or might not have tweeted at least Count times within the maximum number of tweets that can be returned by the Twitter timeline API resource. Another reason could be because there aren’t Count tweets between now and the tweet ID specified by sinceID. Setting SinceID constrains the results to only those tweets that occurred after the specified Tweet ID, assigned via the sinceID variable in the query above. The statusList is an accumulator of all tweets receive during this query set. To simplify the code, I left out some logic to check whether there were no tweets returned. If  the query above doesn’t return any tweets, you’ll receive an exception when trying to perform operations on an empty list. Yeah, I cheated again. Besides querying initial tweets, what’s important about this code is the final line that sets maxID. It retrieves the lowest numbered status ID in the results. Since the lowest numbered status ID is for a tweet we already have, the code decrements the result by one to keep from asking for that tweet again. Remember, SinceID is not inclusive, but MaxID is. The maxID variable is now set to the highest possible tweet ID that can be returned in the next query. The next section explains how to use MaxID to help get the remaining tweets in the query set. Retrieving Remaining Tweets Earlier in this post, I defined a term that I called a query set. Essentially, this is a group of requests to Twitter that you perform to get all new tweets. A single query might not be enough to get all new tweets, so you’ll have to start at the top of the list that Twitter returns and keep making requests until you have all new tweets. The previous section showed the first query of the query set. The code below is a loop that completes the query set: do { // now add sinceID and maxID userStatusResponse = (from tweet in twitterCtx.Status where tweet.Type == StatusType.User && tweet.ScreenName == "JoeMayo" && tweet.Count == Count && tweet.SinceID == sinceID && tweet.MaxID == maxID select tweet) .ToList(); if (userStatusResponse.Count > 0) { // first tweet processed on current query maxID = userStatusResponse.Min( status => ulong.Parse(status.StatusID)) - 1; statusList.AddRange(userStatusResponse); } } while (userStatusResponse.Count != 0 && statusList.Count < 30); Here we have another query, but this time it includes the MaxID property. The SinceID property prevents reading tweets that we’ve already read and Count specifies the largest number of tweets to return. Earlier, I mentioned how it was important to check how many tweets were returned because failing to do so will result in an exception when subsequent code runs on an empty list. The code above protects against this problem by only working with the results if Twitter actually returns tweets. Reasons why there wouldn’t be results include: if the first query got all the new tweets there wouldn’t be more to get and there might not have been any new tweets between the SinceID and MaxID settings of the most recent query. The code for loading the returned tweets into statusList and getting the maxID are the same as previously explained. The important point here is that MaxID is being reset, not SinceID. As explained in the Twitter documentation, paging occurs from the newest tweets to oldest, so setting MaxID lets us move from the most recent tweets down to the oldest as specified by SinceID. The two loop conditions cause the loop to continue as long as tweets are being read or a max number of tweets have been read.  Logically, you want to stop reading when you’ve read all the tweets and that’s indicated by the fact that the most recent query did not return results. I put the check to stop after 30 tweets are reached to keep the demo from running too long – in the console the response scrolls past available buffer and I wanted you to be able to see the complete output. Yet, there’s another point to be made about constraining the number of items you return at one time. The Twitter API has rate limits and making too many queries per minute will result in an error from twitter that LINQ to Twitter raises as an exception. To use the API properly, you’ll have to ensure you don’t exceed this threshold. Looking at the statusList.Count as done above is rather primitive, but you can implement your own logic to properly manage your rate limit. Yeah, I cheated again. Summary Now you know how to use LINQ to Twitter to work with Twitter timelines. After reading this post, you have a better idea of the role of SinceID - the oldest tweet already received. You also know that MaxID is the largest tweet ID to retrieve in a query. Together, these settings allow you to page through results via one or more queries. You also understand what factors affect the number of tweets returned and considerations for potential error handling logic. The full example of the code for this post is included in the downloadable source code for LINQ to Twitter.   @JoeMayo

    Read the article

  • Set Final Cut Express Sequence Options 4:3 to 960p (30fps)

    - by Maccaius
    Hi I have an project in FCE which was recorded in MPEG-4 video in 1280 x 960 (1,4MB/s) and whenever I import those mov files to FCE thez show just fine. but when i add the clips to the timeline (sequence) the quality is cropped - instead of HD i can onlz export the timeline with quicktime conversion and a resolution of 720 x 480. can anybody help me out and tell me how i can export the timeline in full HD quality (as the raw material itself is)? tried the quick setup and exporting as divx and AIC which doesnt reallz work. the actual video size is HD, but qualitz of the video is like SD...

    Read the article

  • Does Unity have existing support for Timelines?

    - by Raven Dreamer
    I am planning the development of a game in Unity3D, and trying to come to terms with what the engine has already provided, and what I must code myself. The game itself is going to be a rhythm game, which means synching audio and graphical events so that they always play when they're supposed to. What I'm looking to avoid is a potential scenario of lag where either the audio or the graphics starts to progress faster than the other. When we discussed this type of coordinating system in my game design class back at university, my professor called this type of design a "Timeline" class. The idea being that you can instantiate one or more of these to progress at different rates, schedule things to happen in the future, and synch up periodic events. However, calling this a "Timeline" class seems to have been limited to my professor himself, as googling for whether a certain API features "Timeline" functionality has been a fruitless endeavor. Is there some more common name for this kind of functionality? Does Unity have any pre-existing methods to coordinate the scheduling of events like this, or is this the kind of thing that needs to be built onto the engine? And if it does, I'd appreciate being pointed towards some tutorials!

    Read the article

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