Search Results

Search found 42 results on 2 pages for 'wings'.

Page 2/2 | < Previous Page | 1 2 

  • MVP Summit 2011 summary and thoughts: The &ldquo;I hope I don&rsquo;t cross a line and lose my MVP status&rdquo; post

    - by George Clingerman
    I've been wanting to write this post summarizing my thoughts about the MVP summit but have been dragging my feet since it's a very difficult one to write. However seeing Andy (http://forums.create.msdn.com/forums/t/77625.aspx) and Catalin (http://www.catalinzima.com/2011/03/mvp-summit-2011/) and Chris (http://geekswithblogs.net/cwilliams/archive/2011/03/07/144229.aspx) post about it has encouraged me to finally take the plunge. I'm going to have to write carefully though because I'm going to be dancing around a ton of NDA mine fields as well as having to walk the tight-rope of not sending the wrong message or having people read too much into what I'm saying. I want to note that most of what I'm about to say is just based on my observations, they're not thoughts that Microsoft has asked me to pass along and they're not things I heard Microsoft say. It's just me sharing what I think after going to the MVP summit. Let's start off with a short imaginary question and answer session.     Has the App Hub forums and XBLIG management been rather poor by Microsoft? Yes.     Do I think we're going to see changes to that overnight? No.     Will it continue to look bad from the outside? Somewhat. Confusing right? Well that's kind of how things are right now. Lots of confusion. XNA is doing AWESOME. Like, really, really awesome. As a result of that awesomeness, XNA is on three major platforms: Xbox 360, WP7 and PC. This means that internally Microsoft is really excited and invested in the technology. That's fantastic for XNA and really should show you the future the framework has. It's here to stay. So why are Xbox LIVE Indie Game developers feeling so much pain? The ironic thing is that pain is being caused by the success of XNA. When XNA was just a small thing, there was more freedom and more focus. It was just us and them. We were an only child. Now our family has grown and everyone has and wants some time with XNA. This gets XNA pulled in all directions and as it moves onto new platforms, it plays catch up trying to get those platforms up to speed to where Xbox LIVE Indie Games has grown. Forums, documentation, educational content. They all need to be there because Xbox LIVE Indie Games has all of that and more. Along with the catch up in features/documentation/awesomeness there's the catch up that the people on the team have to play. New platforms and new areas of development mean new players and those new guys don't have the history of being around from the beginning. This leads to a lack of understanding at times just how important some things are because they seem so small and insignificant (Rich Text defaulting for new forum profiles would be one things that jumps to mind). If you're not aware that the forums have become more than just a basic Q&A, if you're not aware that they're a central hub to a very active community, then you don't understand why that small change should be prioritized over something else. New people have to get caught up and figure out how to make a framework and central forum site work for everyone it's now serving. So yeah, a lot of our pain this last year has been simply that XNA is doing well and XBLIG is doing well so the focus was shifted to catch other things up. It hurts when a parent seems to not have any time for you and they're spending some much time with your new baby brother. Growing pains. All families and in our case our product family experience it to some degree. I think as WP7 matures we'll see the team figuring out how to give everyone the right amount of attention. While we're talking about some of our growing pains, it is also important to note (although not really an excuse) that the Xbox LIVE Arcade developers complain about many of the same things that we do. If you paid attention to talks and information coming out of GDC 2011, most of the the XBLA guys were saying things that sounded eerily similar to what the XBLIG developers are saying (Scott Nichols from GayGamer.net noticed http://twitter.com/#!/NaviFairyGG/status/43540379206811650). Does this mean we should just accept the status quo since we're being treated exactly the same? No way. However it DOES show that the way we're being treated is no indication of the stability and future of the platform, it's just Microsoft dropping the communication ball on two playing fields. We're not alone and we're not even being treated worse. Not great, but also in a weird way a very good sign. Now on to a few tidbits I think I CAN share from the summit (I'm really crossing my fingers I'm not stepping over some NDA line I shouldn't be). First, I discovered that the XBLIG user base is bigger than I personally had originally estimated. I won't give the exact numbers (although we did beg Microsoft to release some of these numbers so maybe someday?) but it was much larger than my original guestimates and I was pleasantly surprised. Maybe some of you guys had the right number when you were guessing, but I know that mine was much too low. And even MORE importantly the number of users/shoppers is growing at a steady pace as well. Our market is growing! That was fantastic news and really something that I had to share. On to the community manager discussion. It was mentioned. I was mentioned. I blushed. Nothing more to report there than the blush in my cheeks was a light crimson color. If I ever see a job description posted for that position I have a resume waiting in the wings. I can't deny that I think that would be my dream job... ...so after I finished blushing, the MVPs did make it very, very clear that the communication has to improve. Community manager or not the single biggest pain point with the Xbox LIVE Indie Game community has been a lack of communication. I have seen dramatic improvement in the team responding to MVPs and I'm even seeing more communication from them on the forums so I'm hoping that's a long term change. I really think they understood the issue, the problem remains how to open that communication channel in a way that was sustainable. I think they'll get it figured out and hopefully that's sooner rather than later. During the summit, you may have seen me tweeting about how I was "that guy" (http://twitter.com/#!/clingermangw/status/42740432471470081). You also may have noticed that Andy and Catalin both mentioned me in their summit write ups. I may have come on a bit strong while I was there...went a little out of character for myself. I've been agitated for a while with the way things have been and I've been listening to you guys and hearing you guys be agitated. I'm also watching some really awesome indie game developers looking elsewhere and leaving the platform. Some of them we might not have been able to keep even with changes, but others are only leaving because of perceptions and lack of communication from Microsoft. And that pisses me off. And I let Microsoft know that I was pissed off. You made your list and I took that list and verbalized it. I verbalized the hell out of it. [It was actually mentioned that I'm a lot nicer on the forums and in email than I am in person...I felt bad about that, but I couldn't stay silent]. Hopefully it did something guys, I really did try hard to get the message across. Along with my agitation, I also brought some pride. I mentioned several things in person to the team that I was particularly proud of. From people in the community that are doing an awesome job, to the re-launch of XboxIndies that was going on that week and even gamers like Steven Hurdle (http://writingsofmassdeduction.com/) who have purchased one XBLIG every day for over 100 days now. The community is freaking rocking it and I made sure to highlight that. So in conclusion, I'd just like to say hang in there (you know, like that picture of the cat). If you've been worried about investing in Xbox LIVE Indie Games because you think it's on shaky ground. It's not. Dream Build Play being about the Xbox 360 should have helped a little to point that out. The team is really scrambling around trying to figure things out and make improvements all around. There’s quite a few new gals and guys and it's going to take them time to catch up and there are a lot of constantly shifting priorities. We all have one toy, one team and we're fighting for time with it. It's also time for the community to continue spreading our wings and going out on our own more often. The Indie Game Winter Uprising was a fantastic example of that. We took things into our own hands and it got noticed and Microsoft got behind it. They do every time we stand up and do something (look at how many Microsoft employees tweeted, wrote about the re-launch of XboxIndies.com or the support I've gotten from them for my weekly XNA Notes). XNA is here to stay, it's time for us to stop being scared of that and figure out how to make our own games the successes they should be. There's definitely a list of things that need to be fixed, things that should be improved and I think we should definitely keep vocal about that with Microsoft. Keep it short, focused and prioritized. There's also a lot of things we can do ourselves while we're waiting on them to fix and change things. Lots of ways we can compensate for particular weaknesses in the channel. The kind of stuff that we can step up and do ourselves. Do it on our own, you know, the way Indies always do. And I'm really looking forward to watching us do just that.

    Read the article

  • What is a good DBMS for archiving?

    - by Thomas.Winsnes
    I've been stuck in a MsSql/MySql world now for a few years, and I've decided to spread my wings a little further. At the moment I'm researching which DBMS is good at things needed when archiving data. Eg. lots of writes and low reads. I've seen the NoSQL crusade, but I have a very RDBMS mindset, so I'm a bit skeptical. Anyone have any suggestions? Or even any pointers to where there are some benchmarks etc for this kind of stuff. Thank you :) Thomas

    Read the article

  • Angry Bird Makers: Developers Love iOS Over Android To Make Money

    - by Gopinath
    These days web is buzzing with Apple iOS vs Google Android debates. Recently Fortune predicted that Android is going to explode in 2011 and it will surpass Apple’s iOS market share. Yes Android is set to spread its wings across all the devices – smartphones, TVs, set top boxes, in car entertainment devices, what not. Think of any device that requires operating system, Android can be used. On the other than iOS is only available on very selective Apple devices – iPods, iPhones and iPads. When it comes to the count of devices running on a specific OS, Android will be far ahead of iOS but when you consider a quality of devices and providing an eco system for business to make money iOS seems to be the winner. That is what experts and analysts are saysing. Here is an excerpt from Peter Vesterbacka, maker of the popular Angry Birds game, interview to Tech N Marketing site.  He says Apple will be the number one platform for a long time from a developer perspective, they have gotten so many things right. And they know what they are doing and they call the shots. Android is growing, but it’s also growing complexity at the same time. Device fragmentation not the issue, but rather the fragmentation of the ecosystem. So many different shops, so many different models. The carriers messing with the experience again. Open but not really open, a very Google centric ecosystem. And paid content just doesn’t work on Android. Peter says developer prefer iOS over Android as it’s not very easy to make money on Android market. That’s why they released a free version of Angry Birds game with ads support for Android devices. Free is the way to go with Android. Nobody has been successful selling content on Android. We will offer a way to remove the ads by paying for the app, but we don’t expect that to be a huge revenue stream. You can read full interview here. cc image credit: flickr/johanl This article titled,Angry Bird Makers: Developers Love iOS Over Android To Make Money, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Windows 3 Animated Background/Desktop/Wallpaper

    - by Synetech
    In the summer of 1995, I visited some family in Los Angeles. My uncle had a computer with Windows 3 (or some version thereof since Windows 95 had not been released yet). In Windows 3, there was no desktop or wallpaper like in later versions; instead you could set it to a simple pattern (still possible in later versions before XP) like hounds-tooth or bricks (interestingly, there seems to be next to nothing available on the Internet about this anymore; no screenshots and almost no pages). I recall being amused when I found a program (on the still young “world-wide web”) that would actually let you set an animated background. It was smooth and fluid and was quite an amazing thing at the time. If I recall correctly, it had several built-in animations including one of a light-orange-pink background over which storks flew towards the top-left, possibly with some light stuff floating in the “background” (they were actually animated and flapped their wings, not simply translated coordinates). The storks were somewhat simplified, black-line drawings. Over the years, I’ve tried finding it again a few times but never could. Worse, it’s become harder and harder over time as new programs came out and polluted the search results. I’m hoping that someone remembers this software and knows some useful information like the author or where to download it. (No, it’s not ScreenPaper. That was created in 1997 to let you set a screensaver as the Windows 95/NT4 background. This was at least two years earlier for Windows 3 and I’m almost certain it had these animations built-in—I don’t recall any stork screensavers for Windows 3.)

    Read the article

  • How to Build Services from Legacy Applications

    - by Chris Falter
    The SOA consultants invaded the executive suite at your company or agency, preached the true religion, and converted the unbelievers. Now by divine imperative you must convert your legacy applications into a suite of reusable services.  But as usual, you lack the time and resources that you need in order to develop the services properly.  So you googled or bing’ed, found this blog post, and began crying in gratitude.  Yes, as the title implies, I am going to reveal my easy, 3-step, works-every-time process for converting silos of legacy applications into the inventory of services your CIO has been dreaming about.  So just close your eyes and count to 3 … now open them … and here it is…. Not. While wishful thinking is too often the coin of the IT realm, even the most naive practitioner knows that converting legacy applications into reusable services requires more than a magic wand.  The reason is simple: if your starting point is your legacy applications, then you will simply be bolting a web service technology layer on top of your legacy API.  And that legacy API is built in the image of the silo applications.  Enter the wide gate of the legacy API, follow the broad path of generating service interfaces from existing code, and you will arrive at the siloed enterprise destruction that you thought you were escaping. The Straight and Narrow Path This past week I had the opportunity to learn how the FBI Criminal Justice Information Systems department has been transitioning from silo applications to a service inventory.  Lafe Hutcheson, IT Specialist in the architecture group and fellow attendee at an SOA Architect Certification Workshop, was my guide.  Lafe has survived the chaos of an SOA initiative, so it is not surprising that he was able to return from a US Army deployment to Kabul, Afghanistan with nary a scratch.  According to Lafe, building their service inventory is a three-phase process: Model a business process.  This requires intense collaboration between the IT and business wings of the organization, of course.  The FBI uses IBM Websphere tools to model the process with BPMN. Identify candidate services to facilitate the business process. Convert the BPMN to an executable BPEL orchestration, model and develop the services, and use a BPEL engine to run the process.  The FBI uses ActiveVOS for orchestration services. The 12 Step Program to End Your Legacy API Addiction Thomas Erl has documented a process for building a web service inventory that is quite similar to the FBI process. Erl’s process adds a technology architecture definition phase, which allows for the technology environment to influence the inventory blueprint.  For example, if you are using an enterprise service bus, you will probably not need to build your own utility services for logging or intermediate routing.  Erl also lists a service-oriented analysis phase that highlights the 12-step process of applying the principles of service orientation to modeling your services.  Erl depicts the modeling of a service inventory as an iterative process: model a business process, define the relevant technology architecture, define the service inventory blueprint, analyze the services, then model another business process, rinse and repeat.  (Astute readers will note that Erl’s diagram, restricted to analysis and modeling process, does not include the implementation phase that concludes the FBI service development methodology.) The service-oriented analysis phase is where you find the 12 steps that will free you from your legacy API addiction. In a nutshell, you identify the steps in the process that need services; identify the different types of services (agnostic entity services, service compositions, and utility services) that are required; apply service-orientation principles; and normalize the inventory into cohesive service models. Rather than discuss each of the 12 steps individually, I will close by simply referring my readers to Erl’s explanation.

    Read the article

  • What is the best (Windows) program launcher?

    - by AR
    One of the biggest general productivity boosters I've used is a good program launcher. I was a long-time user of SlickRun, and I've tried a few others. My current favorite is Executor - by far the best I've used. Other options: Executor: My current favorite Vista Start Menu: Pretty good, actually, but Executor is similar (binds to Win+Z) and much more flexible. Quicksilver: For Macs only, but it seems to be the gold standard against which most other launchers are measured. Google Desktop: Press Ctrl+Ctrl and it's a quick launcher! AutoHotKey: Much,much more than just a launcher - more than I need, really. SlickRun: simple and unobtrusive Launchy: Seems to be the launcher of choice for many StackOverflow users :) Colibri: "Type Ahead - Information at the tip of your wings". Quite a cool concept. Many, many others. Scott Hanselman outlines some more here. I realize that everyone will have their own preferences, but the question is: is there anything that really stands out in terms of speed, features, and especially productivity increase?

    Read the article

  • HR According to Batman

    - by D'Arcy Lussier
    Any idea who that guy is running alongside the Caped Crusader? That’s Nightwing, but you may know him as Robin…well, the first Robin anyway. There were actually like 5 Robin’s according to Wikipedia: Dick Grayson, the original, who’s parents were circus performers killed by a gangster. Jason Todd, who was caught trying to steal tires off of the Batmobile. Tim Drake, who saw Dick’s parents die and figured out who Batman and Robin were. and a few others that get into recent time travel/altered reality storylines. What does this have to do with HR? Well, it somewhat ties in with an article by Alex Papadimoulis from 2008. In the article he talks about the “Cravath System”. The Craveth system was developed by a law firm called Cravath, Swaine & Moore back in the 19th century. In a nutshell, they believed in hiring the best and brightest straight out of school. These aspiring lawyers would then begin a fight for survival in the firm, with the strong surviving. In what’s termed the “Up and Out” rule, employees needed to be promoted within 3 years or leave the company. They should achieve partner within 7 – 8 years and no later than 10 after initially coming on board (read all about the system on Wikipedia here). Back to Alex’s article, he quotes from a book published in 1947 about the lawfirm: Under the “Cravath system” of taking a substantial number of men annually and keeping a current constantly moving up in the office, and its philosophy of tenure, men are constantly leaving… it is often difficult to keep the best men long enough to determine whether they shall be made partners, for Cravath-trained men are always in demand, usually at premium salaries. And so we see a pattern forming here: 1. Hire a whole whack of smart college graduates 2. Put them to work 3. The ones that stick around should move up the ladder. The ones that don’t stick around served the company well and left to expound the quality of the Cravath firm. Those that didn’t fall into either of those categories were just let go. There’s some interesting undercurrents to these ideas. If you stick around, you better keep your feet moving! I was at a Microsoft shindig a few months back, and was talking to a Microsoft employee. He shared that at MS you have 5 years to achieve a “senior” position within the company. Once you hit that mark, you can stay there for the rest of your career (he told about a guy who’s a “senior” developer and has been for the last 20+ years working on audio drivers for Windows), but you *must* hit that mark within the timeframe. What we see with Microsoft is Cravath’s system in action, whether intentional or not: bring in smart young people and see which ones stick. You need to give people something to work towards. Saying “You must reach this level or else!” is one way to look at it. The other way is to see achieving a higher rank in the organization as something for ambitious employees to reach towards. It’s important for an organization to always have the next generation of executives waiting in the wings, and unless you’re encouraging that early on you may find yourself in a position of needing to fill positions that nobody has been working towards. Now, you might suggest that this isn’t that big of a deal because you could just hire someone from outside the organization, but the Cravath system holds to the tenet of promoting internally; develop your own talent, since your business is the best place for the future leadership to learn teh business from. It’s OK for people to quit. Alex’s article really drives this point home, but its worth noting here also: its OK for your people to quit. In fact its inevitable…and more inevitable that it’ll be good people that leave. Some will stay and work towards the internal awards of promotion, but a number will get experience, serve the organization well, and then move on to something else. This should be expected and treated as a natural business occurrence. The idea of an alumni of an organization begins to come into play here: “That guy used to work for <insert company here>”. There’s a benefit in that: those best and brightest will be drawn to your organization and your reputation will permeate your market through former staff that are sought after because of how well you nurtured them. The Batman Hook All of this brings us back to Batman and his HR practice: when Dick decided he’d had enough of the Robin schtick, he quit and became his own…but he was always associated with Batman and people understood where his training had come from. To the Dark Knight’s credit, he continued training partners under the Robin brand. Luckily he didn’t have to worry about firing any of them (the ship sort of sails when you reveal a secret identity), although there was that unfortunate “quitting” of the second Robin when the Joker blew him up…but regardless, we see the Cravath system at work: bring in talent, expect great things, and be ok with whatever they decide for their careers. It’s an interesting way to approach HR, and luckily for us our business isn’t as dangerous or over-the-top as the caped crusader’s.

    Read the article

  • Training a 'replacement', how to enforce standards?

    - by Mohgeroth
    Not sure that this is the right stack exchange site to ask this of, but here goes... Scope I work for a small company that employs a few hundred people. The development team for the company is small and works out of visual foxpro. A specific department in the company hired me in as a 'lone gunman' to fix and enhance a pre-existing invoicing system. I've successfully taken an Access application that suffered from a lot of risks and limitations and converted it into a C# application driven off of a SQL server backend. I have recently obtained my undergraduate and am no expert by any means. To help make up for that I've felt that earning microsoft certifications will force me to understand more about .net and how it functions. So, after giving my notice with 9 months in advance, 3 months ago a replacement finally showed up. Their role is to learn what I have been designing to an attempt to support the applications designed in C#. The Replacement Fresh out of college with no real-world work experience, the first instinct for anything involving data was and still is listboxes... any time data is mentioned the list box is the control of choice for the replacement. This has gotten to the point, no matter how many times I discuss other controls, where I've seen 5 listboxes on a single form. Classroom experience was almost all C++ console development. So, an example of where I have concern is in a winforms application: Users need to key Reasons into a table to select from later. Given that I know that a strongly typed data set exists, I can just drag the data source from the toolbox and it would create all of this for me. I realize this is a simple example but using databinding is the key. For the past few months now we have been talking about the strongly typed dataset, how to use it and where it interacts with other controls. Data sets, how they work in relation to binding sources, adapters and data grid views. After handing this project off I expected questions about how to implement these since for me this is the way to do it. What happened next simply floors me: An instance of an adapter from the strongly typed dataset was created in the activate event of the form, a table was created and filled with data. Then, a loop was made to manually add rows to a listbox from this table. Finally, a variable was kept to do lookups to figure out what ID the record was for updates if required. How do they modify records you ask? That was my first question too. You won't believe how simple it is, all you do it double click and they type into a pop-up prompt the new value to change it to. As a data entry operator, all the modal popups would drive me absolutely insane. The final solution exceeds 100 lines of code that must be maintained. So my concern is that none of this is sinking in... the department is only allowed 20 hours a week of their time. Up until last week, we've only been given 4-5 hours a week if I'm lucky. The past week or so, I've been lucky to get 10. Question WHAT DO I DO?! I have 4 weeks left until I leave and they fully 'support' this application. I love this job and the opportunity it has given me but it's time for me to spread my wings and find something new. I am in no way, shape or form convinced that they are ready to take over. I do feel that the replacement has the technical ability to 'figure it out' but instead of learning they just write code to do all of this stuff manually. If the replacement wants to code differently in the end, as long as it works I'm fine with that as horrifiying at it looks. However to support what I have designed they MUST to understand how it works and how I have used controls and the framework to make 'magic' happen. This project has about 40 forms, a database with over 30 some odd tables, triggers and stored procedures. It relates labor to invoices to contracts to projections... it's not as simple as it was three years ago when I began this project and the department is now in a position where they cannot survive without it. How in the world can I accomplish any of the following?: Enforce standards or understanding in constent design when the department manager keeps telling them they can do it however they want to Find a way to engage the replacement in active learning of the framework and system design that support must be given for Gracefully inform sr. management that 5-9 hours a week is simply not enough time to learn about the department, pre-existing processes, applications that need to be supported AND determine where potential enhancements to the system go... Yes I know this is a wall of text, thanks for reading through me but I simply don't know what I should be doing. For me, this job is a monster of a reference and things would look extremely bad if I left and things fell apart. How do I handle this?

    Read the article

  • Linq to List and IEnumerable issues

    - by Otaku
    I am querying an HTML file with Linq. It looks something like this: <html> <body> <div class="Players"> <div class="role">Goalies</div> <div class="name">John Smith</div> <div class="name">Shawn Xie</div> <div class="role">Right Wings</div> <div class="name">Jack Davis</div> <div class="name">Carl Yuns</div> <div class="name">Wayne Gortonia</div> <div class="role">Centers</div> <div class="name">Lutz Gaspy</div> <div class="name">John Jacobs</div> </div </html> </body> What I'm trying to do is create a list of these folks like in a list of a structure called Players: Structure Players Public Name As String Public Position As String End Structure But I've quickly found out I don't really know what I'm doing when it comes to Linq. I've got this far my my queries: Dim goalieList = From d In player.Elements _ Where d.Value = "Goalies" _ Select From g In d.ElementsAfterSelf _ Take While (g.@class <> "role") _ Select New Players With {.Position = "Goalie", _ .Name = g.Value} Dim centersList = From d In player.Elements _ Where d.Value = "Centers" _ Select From g In d.ElementsAfterSelf _ Take While (g.@class <> "role") _ Select New Players With {.Position = "Centers", _ .Name = g.Value} Which gets me down to the the players by position, but then I can't do much with this afterwards the result type is System.Collections.Generic.IEnumerable(Of System.Collections.Generic.IEnumerable(Of Player)) What I want to do is add these two results to a new list, like: Dim playersList As List(Of Players) = Nothing playersList.AddRange(centersList) playersList.AddRange(goalieList) So that I can then query the list and use it. But it kicks the error: Unable to cast object of type 'WhereSelectEnumerableIterator2[System.Xml.Linq.XElement,System.Collections.Generic.IEnumerable1[Players]]' to type 'System.Collections.Generic.IEnumerable`1[Players]' As you can see, I may really have no idea how to work with all these objects/classes. Does anyone have any insight on what I may be doing wrong and how I can resolve it? RESOLVED: The Linq query needs to return a single iEnumerable, like this: Dim goalieList = From l In _ (From d In players.Elements _ Where d.Value = "Goalies" _ Select d.ElementsAfterSelf.TakeWhile(Function(f) f.@class <> "role")) _ Select New Players With {.Position = "Goalie", .Name = l.Value} and then use goalieList.ToList

    Read the article

  • Solving the NP-complete problem in XKCD

    - by Adam Tuttle
    The problem/comic in question: http://xkcd.com/287/ I'm not sure this is the best way to do it, but here's what I've come up with so far. I'm using CFML, but it should be readable by anyone. <cffunction name="testCombo" returntype="boolean"> <cfargument name="currentCombo" type="string" required="true" /> <cfargument name="currentTotal" type="numeric" required="true" /> <cfargument name="apps" type="array" required="true" /> <cfset var a = 0 /> <cfset var found = false /> <cfloop from="1" to="#arrayLen(arguments.apps)#" index="a"> <cfset arguments.currentCombo = listAppend(arguments.currentCombo, arguments.apps[a].name) /> <cfset arguments.currentTotal = arguments.currentTotal + arguments.apps[a].cost /> <cfif arguments.currentTotal eq 15.05> <!--- print current combo ---> <cfoutput><strong>#arguments.currentCombo# = 15.05</strong></cfoutput><br /> <cfreturn true /> <cfelseif arguments.currentTotal gt 15.05> <cfoutput>#arguments.currentCombo# > 15.05 (aborting)</cfoutput><br /> <cfreturn false /> <cfelse> <!--- less than 15.05 ---> <cfoutput>#arguments.currentCombo# < 15.05 (traversing)</cfoutput><br /> <cfset found = testCombo(arguments.currentCombo, arguments.currentTotal, arguments.apps) /> </cfif> </cfloop> </cffunction> <cfset mf = {name="Mixed Fruit", cost=2.15} /> <cfset ff = {name="French Fries", cost=2.75} /> <cfset ss = {name="side salad", cost=3.35} /> <cfset hw = {name="hot wings", cost=3.55} /> <cfset ms = {name="moz sticks", cost=4.20} /> <cfset sp = {name="sampler plate", cost=5.80} /> <cfset apps = [ mf, ff, ss, hw, ms, sp ] /> <cfloop from="1" to="6" index="b"> <cfoutput>#testCombo(apps[b].name, apps[b].cost, apps)#</cfoutput> </cfloop> The above code tells me that the only combination that adds up to $15.05 is 7 orders of Mixed Fruit, and it takes 232 executions of my testCombo function to complete. Is there a better algorithm to come to the correct solution? Did I come to the correct solution?

    Read the article

  • Thursday Community Keynote: "By the Community, For the Community"

    - by Janice J. Heiss
    Sharat Chander, JavaOne Community Chairperson, began Thursday's Community Keynote. As part of the morning’s theme of "By the Community, For the Community," Chander noted that 60% of the material at the 2012 JavaOne conference was presented by Java Community members. "So next year, when the call for papers starts, put-in your submissions," he urged.From there, Gary Frost, Principal Member of Technical Staff, AMD, expanded upon Sunday's Strategy Keynote exploration of Project Sumatra, an OpenJDK project targeted at bringing Java to heterogeneous computing platforms (which combine the CPU and the parallel processor of the GPU into a single piece of silicon). Sumatra entails enhancing the JVM to make maximum use of these advanced platforms. Within this development space, AMD created the Aparapi API, which converts Java bytecode into OpenCL for execution on such GPU devices. The Aparapi API was open sourced in September 2011.Whether it was zooming-in on a Mandelbrot set, "the game of life," or a swarm of 10,000 Dukes in a space-bound gravitational dance, Frost's demos, using an Aparapi/OpenCL implementation, produced stunningly faster display results. He indicated that the Java 9 timeframe is where they see Project Sumatra coming to ultimate fruition, employing the Lamdas of Java 8.Returning to the theme of the keynote, Donald Smith, Director, Java Product Management, Oracle, explored a mind map graphic demonstrating the importance of Community in terms of fostering innovation. "It's the sharing and mixing of culture, the diversity, and the rapid prototyping," he said. Within this topic, Smith, brought up a panel of representatives from Cloudera, Eclipse, Eucalyptus, Perrone Robotics, and Twitter--ideal manifestations of community and innovation in the world of Java.Marten Mickos, CEO, Eucalyptus Systems, explored his company's open source cloud software platform, written in Java, and used by gaming companies, technology companies, media companies, and more. Chris Aniszczyk, Operations Engineering,Twitter, noted the importance of the JVM in terms of their multiple-language development environment. Mike Olson, CEO, Cloudera, described his company's Apache Hadoop-based software, support, and training. Mike Milinkovich, Executive Director, Eclipse Foundation, noted that they have about 270 tools projects at Eclipse, with 267 of them written in Java. Milinkovich added that Eclipse will even be going into space in 2013, as part of the control software on various experiments aboard the International Space Station. Lastly, Paul Perrone, CEO, Perrone Robotics, detailed his company's robotics and automation software platform built 100% on Java, including Java SE and Java ME--"on rat, to cat, to elephant-sized systems." Milinkovic noted that communities are by nature so good at innovation because of their very openness--"The more open you make your innovation process, the more ideas are challenged, and the more developers are focused on justifying their choices all the way through the process."From there, Georges Saab, VP Development Java SE OpenJDK, continued the topic of innovation and helping the Java Community to "Make the Future Java." Martijn Verburg, representing the London Java Community (winner of a Duke's Choice Award 2012 for their activity in OpenJDK and JCP), soon joined Saab onstage. Verburg detailed the LJC's "Adopt a JSR" program--"to get day-to-day developers more involved in the innovation that's happening around them."  From its London launching pad, the innovative program has spread to Brazil, Morocco, Latvia, India, and more.Other active participants in the program joined Verburg onstage--Ben Evans, London Java Community; James Gough, Stackthread; Bruno Souza, SOUJava; Richard Warburton, jClarity; and Cecelia Borg, Oracle--OpenJDK Onboarding. Together, the group explored the goals and tasks inherent in the Adopt a JSR program--from organizing hack days (testing prototype implementations), to managing mailing lists and forums, to triaging issues, to evangelism—all with the goal of fostering greater community/developer involvement, but equally importantly, building better open standards. “Come join us, and make your ecosystem better!" urged Verburg.Paul Perrone returned to profile the latest in his company's robotics work around Java--including the AARDBOTS family of smaller robotic vehicles, running the Perrone MAX platform on top of the Java JVM. Perrone took his "Rumbles" four-wheeled robot out for a spin onstage--a roaming, ARM-based security-bot vehicle, complete with IR, ultrasonic, and "cliff" sensors (the latter, for the raised stage at JavaOne). As an ultimate window into the future of robotics, Perrone displayed a "head-set" controller--a sensor directed at the forehead to monitor brainwaves, for the someday-implementation of brain-to-robot control.Then, just when it seemed this might be the end of the day's futuristic offerings, a mystery voice from offstage pronounced "I've got some toys"--proving to be guest-visitor James Gosling, there to explore his cutting-edge work with Liquid Robotics. While most think of robots as something with wheels or arms or lasers, Gosling explained, the Liquid Robotics vehicle is an entirely new and innovative ocean-going 'bot. Looking like a floating surfboard, with an attached set of underwater wings, the autonomous devices roam the oceans using only the energy of ocean waves to propel them, and a single actuated rudder to steer. "We have to accomplish all guidance just by wiggling the rudder," Gosling said. The devices offer applications from self-installing weather buoy, to pollution monitoring station, to marine mammal monitoring device, to climate change data gathering, to even ocean life genomic sampling. The early versions of the vehicle used C code on very tiny industrial micro controllers, where they had to "count the bytes one at a time."  But the latest generation vehicles, which just hit the water a week or so ago, employ an ARM processor running Linux and the ARM version of JDK 7. Gosling explained that vehicle communication from remote locations is achieved via the Iridium satellite network. But because of the costs of this communication path, the data must be sent in very small bursts--using SBD short burst data. "It costs $1/kb, so that rules everything in the software design,” said Gosling. “If you were trying to stream a Netflix video over this, it would cost a million dollars a movie. …We don't have a 'big data' problem," he quipped. There are currently about 150 Liquid Robotics vehicles out traversing the oceans. Gosling demonstrated real time satellite tracking of several vehicles currently at sea, noting that Java is actually particularly good at AI applications--due to the language having garbage collection, which facilitates complex data structures. To close-out his time onstage, Gosling of course participated in the ceremonial Java tee-shirt toss out to the audience…In parting, Chander passed the JavaOne Community Chairperson baton to Stephen Chin, Java Technology Evangelist, Oracle. Onstage in full motorcycle gear, Chin noted that he'll soon be touring Europe by motorcycle, meeting Java Community Members and streaming live via UStream--the ultimate manifestation of community and technology!  He also reminded attendees of the upcoming JavaOne Latin America 2012, São Paulo, Brazil (December 4-6, 2012), and stated that the CFP (call for papers) at the conference has been extended for one more week. "Remember, December is summer in Brazil!" Chin said.

    Read the article

  • CodePlex Daily Summary for Thursday, June 17, 2010

    CodePlex Daily Summary for Thursday, June 17, 2010New ProjectsAstalanumerator: A JavaScript based recursive DOM/JS object inspector. Uses a simple tree menu to enumerate all properties of a object.BDD Log Converter: A simple .NET class and console application that will convert BDD logs (MDT) into XML format.CastleInvestProj: Castle Investigating project Easy Callback: This library facilitates the use of multiple asynchronous calls on the same page, and asynchronous calls from a user control also have a clean cod...Easy Wings: Small webApp to manage aircraft booking in flying club. French only for the moment.EPiServer Template Foundation: EPiServer Template Foundation builds on top of Page Type Builder to provide a framework for common site features such as basic page type properties...guidebook: a project to plan your road trip.Look into documents for e-discovery: Search, browse, tag, annotate documents such as MS Word, PDF, e-mail, etc. Good for legal professionals do e-discovery. One Bus Away for Windows Phone: A Windows Phone 7 application written in Silverlight for the OneBusAway (www.onebusaway.org) website. Allows mobile users to search for public tra...OneBusAway for Windows Phone 7: OneBusAway is a service with transit information for the Seattle, WA region. We are creating a mobile application for Windows Phone 7 utilizing th...PoFabLab - Poetry Generation Library and Editor in .NET: PoFabLab is an open source library and word processor designed for digital poets. The library can scan lines, perform Markov analysis, filter text...Project Axure: More details coming soon.Чат кутежа 2.0: ИРЦ чат специально для форума ЕНЕ简易代码生成器: 初次使用CodePlex,这只是一个测试项目。打算用WPF做一个简单的代码生成器,兼具SQL Server Client功能。使用.Net 4.0, C#开发。运营工作系统: TRAS(Team resource assist system) is a toolkit that help the studio to manage and distribute the daily work, like publish the news, GM broadcast a...New ReleasesAmuse - A New MU* Client For Windows: 2010 June: Important Notice to TestersPlease uninstall any previous versions of Amuse prior to this one before installing. Changes and InformationFirst relea...ASP.NET Generic Data Source Control: V1.0: GenericDataSource - Version 1.0Binary This is the first official binary release of the GenericDataSource for ASP.NET - stable and ready for product...Astalanumerator: Astalanumerator 0.7: I wanted to map all properties in javascript and inspect them regardless if they were objects or not. IE doesn’t support for(i in..) for native pro...BDD Log Converter: BDD Log Converter 0.1.0: First release (0.1.0).DVD Swarm: 0.8.10.616: Major update with improvements to encoding speed.Easy Callback: Easy Callback 1.0.0.0: Easy Callback library 1.0.0.0Facebook Connect Authentication for ASP.NET: Facebook Connect Authentication for ASP.NET - v1.0: Now supporting Facebook's new Open Graph API JavaScript SDK, this release of FBConnectAuth also adds support for running in partially trusted envir...FlickrNet API Library: 3.0 Beta 3: Another small Beta. Changed parsing code so exceptions aren't raised when new attributes are added by Flickr. This affects searches where you are ...Infragistics Analytics Framework: Infragistics Analytics Framework 10.2: An updated version of Infragistics Analytics Framework, which utilizes the newest version (v.1.4.4) of MSAF as well as the newest release (v.10.2) ...NUnit Add-in for Growl Notifications: NUnit Add-in for Growl Notifications 1.0 build 1: Version 1.0 build 1:[change] Test run failure notification now disappears automaticallyOpen Source PLM Activities: 3dxml player integration for Aras Innovator: This is just a simple html file you need to add to your Aras Innovator install directory. It loads the 3Dxml player for your 3dxml files. Tested o...patterns & practices - Windows Azure Guidance: WAAG - Part 2 - Drop 1: First code and docs drop for Part 2 of the Windows Azure Architecture Guide Part 1 of the Guide is released here. Highlights of this release are:...Phalanger - The PHP Language Compiler for the .NET Framework: 2.0 (June 2010): Installer of the latest binaries of Phalanger 2.0 (June 2010) and its integration into Visual Studio 2008 SP1. * Improved compatibility with P...RIA Services Essentials: Book Club Application (June 16, 2010): Added some XAML to hide/show link to BookShelf page based on whether the user is logged in or not. Updated IsBookOwner authorization rule implement...secs4net: Relase 1.01: version 1.01 releasesELedit: sELedit v1.1c: Added: Tool for exporting NPC/Mob database file that is used by sNPCeditSharePoint Ad Rotator: SPAdRotator 2.0 Beta 2: Added: Open tool pane link to default Web Part text Made all images except the first hidden by default, so the Web Part will degrade gracefully w...sMAPtool: sMAPtool v0.7f (without Maps): Added: 3rd party magnifier softwaresNPCedit: sNPCedit v0.9c: Added: npc/mob names and corresponding datbaseSolidWorks Addin Development: GenericAddinFrameworkR1-06.17.2010: .sTASKedit: sTASKedit v0.8: Important BugFix: there was an mistake in the structure, team-member block and get-items block was swapped internally. Tasks that contains both blo...stefvanhooijdonk.com: UnitTesting-SP2010-TFS2010: Files for my post on TFS2010 and NUnit testing with SP2010 projects. see the post here: http://wp.me/pMnlQ-88 The XSLT here is from http://nunit4t...Telerik CAB Enabling Kit for RadControls for WinForms: TCEK 2010.1.10.504: What's new in v2010.1.0610 (Beta): RadDocking component has been replaced with the latest RadDock control Requirements: Visual Studio 2005+ Tele...TFS Buddy: TFS Buddy 1.2: Fixes a problem with notificationsThales Simulator Library: Version 0.9: The Thales Simulator Library is an implementation of a software emulation of the Thales (formerly Zaxus & Racal) Hardware Security Module cryptogra...Triton Application Framework: Tools - Code Generator - Build 1.0: This is the first release of the Generator. This is buggy but works.VCC: Latest build, v2.1.30616.0: Automatic drop of latest buildXsltDb - DotNetNuke Module Builder: 01.01.27: Code completion for XsltDb, HTML and XSL stuff!! Full screen editing Some bugs are still in EditArea component and object lists in code completi...Чат кутежа 2.0: 0.9a build 2 версия: вторая сборка первой альфа-версии ирц-клиента.Most Popular ProjectsWBFS ManagerRawrAJAX Control ToolkitMicrosoft SQL Server Product Samples: DatabaseSilverlight ToolkitWindows Presentation Foundation (WPF)patterns & practices – Enterprise LibraryPHPExcelMicrosoft SQL Server Community & SamplesASP.NETMost Active ProjectsdotSpatialpatterns & practices: Enterprise Library Contribpatterns & practices – Enterprise LibraryBlogEngine.NETLightweight Fluent WorkflowRhyduino - Arduino and Managed CodeSunlit World SchemeNB_Store - Free DotNetNuke Ecommerce Catalog ModuleSolidWorks Addin DevelopmentN2 CMS

    Read the article

  • C#/.NET Little Wonders: Constraining Generics with Where Clause

    - by James Michael Hare
    Back when I was primarily a C++ developer, I loved C++ templates.  The power of writing very reusable generic classes brought the art of programming to a brand new level.  Unfortunately, when .NET 1.0 came about, they didn’t have a template equivalent.  With .NET 2.0 however, we finally got generics, which once again let us spread our wings and program more generically in the world of .NET However, C# generics behave in some ways very differently from their C++ template cousins.  There is a handy clause, however, that helps you navigate these waters to make your generics more powerful. The Problem – C# Assumes Lowest Common Denominator In C++, you can create a template and do nearly anything syntactically possible on the template parameter, and C++ will not check if the method/fields/operations invoked are valid until you declare a realization of the type.  Let me illustrate with a C++ example: 1: // compiles fine, C++ makes no assumptions as to T 2: template <typename T> 3: class ReverseComparer 4: { 5: public: 6: int Compare(const T& lhs, const T& rhs) 7: { 8: return rhs.CompareTo(lhs); 9: } 10: }; Notice that we are invoking a method CompareTo() off of template type T.  Because we don’t know at this point what type T is, C++ makes no assumptions and there are no errors. C++ tends to take the path of not checking the template type usage until the method is actually invoked with a specific type, which differs from the behavior of C#: 1: // this will NOT compile! C# assumes lowest common denominator. 2: public class ReverseComparer<T> 3: { 4: public int Compare(T lhs, T rhs) 5: { 6: return lhs.CompareTo(rhs); 7: } 8: } So why does C# give us a compiler error even when we don’t yet know what type T is?  This is because C# took a different path in how they made generics.  Unless you specify otherwise, for the purposes of the code inside the generic method, T is basically treated like an object (notice I didn’t say T is an object). That means that any operations, fields, methods, properties, etc that you attempt to use of type T must be available at the lowest common denominator type: object.  Now, while object has the broadest applicability, it also has the fewest specific.  So how do we allow our generic type placeholder to do things more than just what object can do? Solution: Constraint the Type With Where Clause So how do we get around this in C#?  The answer is to constrain the generic type placeholder with the where clause.  Basically, the where clause allows you to specify additional constraints on what the actual type used to fill the generic type placeholder must support. You might think that narrowing the scope of a generic means a weaker generic.  In reality, though it limits the number of types that can be used with the generic, it also gives the generic more power to deal with those types.  In effect these constraints says that if the type meets the given constraint, you can perform the activities that pertain to that constraint with the generic placeholders. Constraining Generic Type to Interface or Superclass One of the handiest where clause constraints is the ability to specify the type generic type must implement a certain interface or be inherited from a certain base class. For example, you can’t call CompareTo() in our first C# generic without constraints, but if we constrain T to IComparable<T>, we can: 1: public class ReverseComparer<T> 2: where T : IComparable<T> 3: { 4: public int Compare(T lhs, T rhs) 5: { 6: return lhs.CompareTo(rhs); 7: } 8: } Now that we’ve constrained T to an implementation of IComparable<T>, this means that our variables of generic type T may now call any members specified in IComparable<T> as well.  This means that the call to CompareTo() is now legal. If you constrain your type, also, you will get compiler warnings if you attempt to use a type that doesn’t meet the constraint.  This is much better than the syntax error you would get within C++ template code itself when you used a type not supported by a C++ template. Constraining Generic Type to Only Reference Types Sometimes, you want to assign an instance of a generic type to null, but you can’t do this without constraints, because you have no guarantee that the type used to realize the generic is not a value type, where null is meaningless. Well, we can fix this by specifying the class constraint in the where clause.  By declaring that a generic type must be a class, we are saying that it is a reference type, and this allows us to assign null to instances of that type: 1: public static class ObjectExtensions 2: { 3: public static TOut Maybe<TIn, TOut>(this TIn value, Func<TIn, TOut> accessor) 4: where TOut : class 5: where TIn : class 6: { 7: return (value != null) ? accessor(value) : null; 8: } 9: } In the example above, we want to be able to access a property off of a reference, and if that reference is null, pass the null on down the line.  To do this, both the input type and the output type must be reference types (yes, nullable value types could also be considered applicable at a logical level, but there’s not a direct constraint for those). Constraining Generic Type to only Value Types Similarly to constraining a generic type to be a reference type, you can also constrain a generic type to be a value type.  To do this you use the struct constraint which specifies that the generic type must be a value type (primitive, struct, enum, etc). Consider the following method, that will convert anything that is IConvertible (int, double, string, etc) to the value type you specify, or null if the instance is null. 1: public static T? ConvertToNullable<T>(IConvertible value) 2: where T : struct 3: { 4: T? result = null; 5:  6: if (value != null) 7: { 8: result = (T)Convert.ChangeType(value, typeof(T)); 9: } 10:  11: return result; 12: } Because T was constrained to be a value type, we can use T? (System.Nullable<T>) where we could not do this if T was a reference type. Constraining Generic Type to Require Default Constructor You can also constrain a type to require existence of a default constructor.  Because by default C# doesn’t know what constructors a generic type placeholder does or does not have available, it can’t typically allow you to call one.  That said, if you give it the new() constraint, it will mean that the type used to realize the generic type must have a default (no argument) constructor. Let’s assume you have a generic adapter class that, given some mappings, will adapt an item from type TFrom to type TTo.  Because it must create a new instance of type TTo in the process, we need to specify that TTo has a default constructor: 1: // Given a set of Action<TFrom,TTo> mappings will map TFrom to TTo 2: public class Adapter<TFrom, TTo> : IEnumerable<Action<TFrom, TTo>> 3: where TTo : class, new() 4: { 5: // The list of translations from TFrom to TTo 6: public List<Action<TFrom, TTo>> Translations { get; private set; } 7:  8: // Construct with empty translation and reverse translation sets. 9: public Adapter() 10: { 11: // did this instead of auto-properties to allow simple use of initializers 12: Translations = new List<Action<TFrom, TTo>>(); 13: } 14:  15: // Add a translator to the collection, useful for initializer list 16: public void Add(Action<TFrom, TTo> translation) 17: { 18: Translations.Add(translation); 19: } 20:  21: // Add a translator that first checks a predicate to determine if the translation 22: // should be performed, then translates if the predicate returns true 23: public void Add(Predicate<TFrom> conditional, Action<TFrom, TTo> translation) 24: { 25: Translations.Add((from, to) => 26: { 27: if (conditional(from)) 28: { 29: translation(from, to); 30: } 31: }); 32: } 33:  34: // Translates an object forward from TFrom object to TTo object. 35: public TTo Adapt(TFrom sourceObject) 36: { 37: var resultObject = new TTo(); 38:  39: // Process each translation 40: Translations.ForEach(t => t(sourceObject, resultObject)); 41:  42: return resultObject; 43: } 44:  45: // Returns an enumerator that iterates through the collection. 46: public IEnumerator<Action<TFrom, TTo>> GetEnumerator() 47: { 48: return Translations.GetEnumerator(); 49: } 50:  51: // Returns an enumerator that iterates through a collection. 52: IEnumerator IEnumerable.GetEnumerator() 53: { 54: return GetEnumerator(); 55: } 56: } Notice, however, you can’t specify any other constructor, you can only specify that the type has a default (no argument) constructor. Summary The where clause is an excellent tool that gives your .NET generics even more power to perform tasks higher than just the base "object level" behavior.  There are a few things you cannot specify with constraints (currently) though: Cannot specify the generic type must be an enum. Cannot specify the generic type must have a certain property or method without specifying a base class or interface – that is, you can’t say that the generic must have a Start() method. Cannot specify that the generic type allows arithmetic operations. Cannot specify that the generic type requires a specific non-default constructor. In addition, you cannot overload a template definition with different, opposing constraints.  For example you can’t define a Adapter<T> where T : struct and Adapter<T> where T : class.  Hopefully, in the future we will get some of these things to make the where clause even more useful, but until then what we have is extremely valuable in making our generics more user friendly and more powerful!   Technorati Tags: C#,.NET,Little Wonders,BlackRabbitCoder,where,generics

    Read the article

  • How to shoot yourself in the foot (DO NOT Read in the office)

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2013/06/21/how-to-shoot-yourself-in-the-foot-do-not-read.aspxLet me make it absolutely clear - the following is:merely collated by your Geek from http://www.codeproject.com/Lounge.aspx?msg=3917012#xx3917012xxvery, very very funny so you read it in the presence of others at your own riskso here is the list - you have been warned!C You shoot yourself in the foot.   C++ You accidently create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying "That's me, over there."   FORTRAN You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling facility.   Modula-2 After realizing that you can't actually accomplish anything in this language, you shoot yourself in the head.   COBOL USEing a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.   Lisp You shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds...   BASIC Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.   Forth Foot yourself in the shoot.   APL You shoot yourself in the foot; then spend all day figuring out how to do it in fewer characters.   Pascal The compiler won't let you shoot yourself in the foot.   Snobol If you succeed, shoot yourself in the left foot. If you fail, shoot yourself in the right foot.   HyperTalk Put the first bullet of the gun into foot left of leg of you. Answer the result.   Prolog You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn't allow it to explain.   370 JCL You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.   FORTRAN-77 You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you still can't do exception-processing.   Modula-2 (alternative) You perform a shooting on what might be currently a foot with what might be currently a bullet shot by what might currently be a gun.   BASIC (compiled) You shoot yourself in the foot with a BB using a SCUD missile launcher.   Visual Basic You'll really only appear to have shot yourself in the foot, but you'll have so much fun doing it that you won't care.   Forth (alternative) BULLET DUP3 * GUN LOAD FOOT AIM TRIGGER PULL BANG! EMIT DEAD IF DROP ROT THEN (This takes about five bytes of memory, executes in two to ten clock cycles on any processor and can be used to replace any existing function of the language as well as in any future words). (Welcome to bottom up programming - where you, too, can perform compiler pre-processing instead of writing code)   APL (alternative) You hear a gunshot and there's a hole in your foot, but you don't remember enough linear algebra to understand what happened. or @#&^$%&%^ foot   Pascal (alternative) Same as Modula-2 except that the bullet is not the right type for the gun and your hand is blown off.   Snobol (alternative) You grab your foot with your hand, then rewrite your hand to be a bullet. The act of shooting the original foot then changes your hand/bullet into yet another foot (a left foot).   Prolog (alternative) You attempt to shoot yourself in the foot, but the bullet, failing to find its mark, backtracks to the gun, which then explodes in your face.   COMAL You attempt to shoot yourself in the foot with a water pistol, but the bore is clogged, and the pressure build-up blows apart both the pistol and your hand. or draw_pistol aim_at_foot(left) pull_trigger hop(swearing)   Scheme As Lisp, but none of the other appendages are aware of this happening.   Algol You shoot yourself in the foot with a musket. The musket is aesthetically fascinating and the wound baffles the adolescent medic in the emergency room.   Ada If you are dumb enough to actually use this language, the United States Department of Defense will kidnap you, stand you up in front of a firing squad and tell the soldiers, "Shoot at the feet." or The Department of Defense shoots you in the foot after offering you a blindfold and a last cigarette. or After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type. or After correctly packing your foot, you attempt to concurrently load the gun, pull the trigger, scream, and confidently aim at your foot knowing it is safe. However the cordite in the round does an Unchecked Conversion, fires and shoots you in the foot anyway.   Eiffel   You create a GUN object, two FOOT objects and a BULLET object. The GUN passes both the FOOT objects a reference to the BULLET. The FOOT objects increment their hole counts and forget about the BULLET. A little demon then drives a garbage truck over your feet and grabs the bullet (both of it) on the way. Smalltalk You spend so much time playing with the graphics and windowing system that your boss shoots you in the foot, takes away your workstation and makes you develop in COBOL on a character terminal. or You send the message shoot to gun, with selectors bullet and myFoot. A window pops up saying Gunpowder doesNotUnderstand: spark. After several fruitless hours spent browsing the methods for Trigger, FiringPin and IdealGas, you take the easy way out and create ShotFoot, a subclass of Foot with an additional instance variable bulletHole. Object Oriented Pascal You perform a shooting on what might currently be a foot with what might currently be a bullet fired from what might currently be a gun.   PL/I You consume all available system resources, including all the offline bullets. The Data Processing & Payroll Department doubles its size, triples its budget, acquires four new mainframes and drops the original one on your foot. Postscript foot bullets 6 locate loadgun aim gun shoot showpage or It takes the bullet ten minutes to travel from the gun to your foot, by which time you're long since gone out to lunch. The text comes out great, though.   PERL You stab yourself in the foot repeatedly with an incredibly large and very heavy Swiss Army knife. or You pick up the gun and begin to load it. The gun and your foot begin to grow to huge proportions and the world around you slows down, until the gun fires. It makes a tiny hole, which you don't feel. Assembly Language You crash the OS and overwrite the root disk. The system administrator arrives and shoots you in the foot. After a moment of contemplation, the administrator shoots himself in the foot and then hops around the room rabidly shooting at everyone in sight. or You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot.or The bullet travels to your foot instantly, but it took you three weeks to load the round and aim the gun.   BCPL You shoot yourself somewhere in the leg -- you can't get any finer resolution than that. Concurrent Euclid You shoot yourself in somebody else's foot.   Motif You spend days writing a UIL description of your foot, the trajectory, the bullet and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams.   Powerbuilder While attempting to load the gun you discover that the LoadGun system function is buggy; as a work around you tape the bullet to the outside of the gun and unsuccessfully attempt to fire it with a nail. In frustration you club your foot with the butt of the gun and explain to your client that this approximates the functionality of shooting yourself in the foot and that the next version of Powerbuilder will fix it.   Standard ML By the time you get your code to typecheck, you're using a shoot to foot yourself in the gun.   MUMPS You shoot 583149 AK-47 teflon-tipped, hollow-point, armour-piercing bullets into even-numbered toes on odd-numbered feet of everyone in the building -- with one line of code. Three weeks later you shoot yourself in the head rather than try to modify that line.   Java You locate the Gun class, but discover that the Bullet class is abstract, so you extend it and write the missing part of the implementation. Then you implement the ShootAble interface for your foot, and recompile the Foot class. The interface lets the bullet call the doDamage method on the Foot, so the Foot can damage itself in the most effective way. Now you run the program, and call the doShoot method on the instance of the Gun class. First the Gun creates an instance of Bullet, which calls the doFire method on the Gun. The Gun calls the hit(Bullet) method on the Foot, and the instance of Bullet is passed to the Foot. But this causes an IllegalHitByBullet exception to be thrown, and you die.   Unix You shoot yourself in the foot or % ls foot.c foot.h foot.o toe.c toe.o % rm * .o rm: .o: No such file or directory % ls %   370 JCL (alternative) You shoot yourself in the head just thinking about it.   DOS JCL You first find the building you're in in the phone book, then find your office number in the corporate phone book. Then you have to write this down, then describe, in cubits, your exact location, in relation to the door (right hand side thereof). Then you need to write down the location of the gun (loading it is a proprietary utility), then you load it, and the COBOL program, and run them, and, with luck, it may be run tonight.   VMS   $ MOUNT/DENSITY=.45/LABEL=BULLET/MESSAGE="BYE" BULLET::BULLET$GUN SYS$BULLET $ SET GUN/LOAD/SAFETY=OFF/SIGHT=NONE/HAND=LEFT/CHAMBER=1/ACTION=AUTOMATIC/ LOG/ALL/FULL SYS$GUN_3$DUA3:[000000]GUN.GNU $ SHOOT/LOG/AUTO SYS$GUN SYS$SYSTEM:[FOOT]FOOT.FOOT   %DCL-W-ACTIMAGE, error activating image GUN -CLI-E-IMGNAME, image file $3$DUA240:[GUN]GUN.EXE;1 -IMGACT-F-NOTNATIVE, image is not an OpenVMS Alpha AXP image or %SYS-F-FTSHT, foot shot (fifty lines of traceback omitted) sh,csh, etc You can't remember the syntax for anything, so you spend five hours reading manual pages, then your foot falls asleep. You shoot the computer and switch to C.   Apple System 7 Double click the gun icon and a window giving a selection for guns, target areas, plus balloon help with medical remedies, and assorted sound effects. Click "shoot" button and a small bomb appears with note "Error of Type 1 has occurred."   Windows 3.1 Double click the gun icon and wait. Eventually a window opens giving a selection for guns, target areas, plus balloon help with medical remedies, and assorted sound effects. Click "shoot" button and a small box appears with note "Unable to open Shoot.dll, check that path is correct."   Windows 95 Your gun is not compatible with this OS and you must buy an upgrade and install it before you can continue. Then you will be informed that you don't have enough memory.   CP/M I remember when shooting yourself in the foot with a BB gun was a big deal.   DOS You finally found the gun, but can't locate the file with the foot for the life of you.   MSDOS You shoot yourself in the foot, but can unshoot yourself with add-on software.   Access You try to point the gun at your foot, but it shoots holes in all your Borland distribution diskettes instead.   Paradox Not only can you shoot yourself in the foot, your users can too.   dBase You squeeze the trigger, but the bullet moves so slowly that by the time your foot feels the pain, you've forgotten why you shot yourself anyway. or You buy a gun. Bullets are only available from another company and are promised to work so you buy them. Then you find out that the next version of the gun is the one scheduled to actually shoot bullets.   DBase IV, V1.0 You pull the trigger, but it turns out that the gun was a poorly designed hand grenade and the whole building blows up.   SQL You cut your foot off, send it out to a service bureau and when it returns, it has a hole in it but will no longer fit the attachment at the end of your leg. or Insert into Foot Select Bullet >From Gun.Hand Where Chamber = 'LOADED' And Trigger = 'PULLED'   Clipper You grab a bullet, get ready to insert it in the gun so that you can shoot yourself in the foot and discover that the gun that the bullets fits has not yet been built, but should be arriving in the mail _REAL_SOON_NOW_. Oracle The menus for coding foot_shooting have not been implemented yet and you can't do foot shooting in SQL.   English You put your foot in your mouth, then bite it off. (For those who don't know, English is a McDonnell Douglas/PICK query language which allegedly requires 110% of system resources to run happily.) Revelation [an implementation of the PICK Operating System] You'll be able to shoot yourself in the foot just as soon as you figure out what all these bullets are for.   FlagShip Starting at the top of your head, you aim the gun at yourself repeatedly until, half an hour later, the gun is finally pointing at your foot and you pull the trigger. A new foot with a hole in it appears but you can't work out how to get rid of the old one and your gun doesn't work anymore.   FidoNet You put your foot in your mouth, then echo it internationally.   PicoSpan [a UNIX-based computer conferencing system] You can't shoot yourself in the foot because you're not a host. or (host variation) Whenever you shoot yourself in the foot, someone opens a topic in policy about it.   Internet You put your foot in your mouth, shoot it, then spam the bullet so that everybody gets shot in the foot.   troff rmtroff -ms -Hdrwp | lpr -Pwp2 & .*place bullet in footer .B .NR FT +3i .in 4 .bu Shoot! .br .sp .in -4 .br .bp NR HD -2i .*   Genetic Algorithms You create 10,000 strings describing the best way to shoot yourself in the foot. By the time the program produces the optimal solution, humans have evolved wings and the problem is moot.   CSP (Communicating Sequential Processes) You only fail to shoot everything that isn't your foot.   MS-SQL Server MS-SQL Server’s gun comes pre-loaded with an unlimited supply of Teflon coated bullets, and it only has two discernible features: the muzzle and the trigger. If that wasn't enough, MS-SQL Server also puts the gun in your hand, applies local anesthetic to the skin of your forefinger and stitches it to the gun's trigger. Meanwhile, another process has set up a spinal block to numb your lower body. It will then proceeded to surgically remove your foot, cryogenically freeze it for preservation, and attach it to the muzzle of the gun so that no matter where you aim, you will shoot your foot. In order to avoid shooting yourself in the foot, you need to unstitch your trigger finger, remove your foot from the muzzle of the gun, and have it surgically reattached. Then you probably want to get some crutches and go out to buy a book on SQL Server Performance Tuning.   Sybase Sybase's gun requires assembly, and you need to go out and purchase your own clip and bullets to load the gun. Assembly is complicated by the fact that Sybase has hidden the gun behind a big stack of reference manuals, but it hasn't told you where that stack is. While you were off finding the gun, assembling it, buying bullets, etc., Sybase was also busy surgically removing your foot and cryogenically freezing it for preservation. Instead of attaching it to the muzzle of the gun, though, it packed your foot on dry ice and sent it UPS-Ground to an unnamed hookah bar somewhere in the middle east. In order to shoot your foot, you must modify your gun with a GPS system for targeting and hire some guy named "Indy" to find the hookah bar and wire the coordinates back to you. By this time, you've probably become so daunted at the tasks stand between you and shooting your foot that you hire a guy who's read all the books on Sybase to help you shoot your foot. If you're lucky, he'll be smart enough both to find your foot and to stop you from shooting it.   Magic software You spend 1 week looking up the correct syntax for GUN. When you find it, you realise that GUN will not let you shoot in your own foot. It will allow you to shoot almost anything but your foot. You then decide to build your own gun. You can't use the standard barrel since this will only allow for standard bullets, which will not fire if the barrel is pointed at your foot. After four weeks, you have created your own custom gun. It blows up in your hand without warning, because you failed to initialise the safety catch and it doesn't know whether the initial state is "0", 0, NULL, "ZERO", 0.0, 0,0, "0.0", or "0,00". You fix the problem with your remaining hand by nesting 12 safety catches, and then decide to build the gun without safety catch. You then shoot the management and retire to a happy life where you code in languages that will allow you to shoot your foot in under 10 days.FirefoxLets you shoot yourself in as many feet as you'd like, while using multiple great addons! IEA moving target in terms of standard ammunition size and doesn't always work properly with non-Microsoft ammunition, so sometimes you shoot something other than your foot. However, it's the corporate world's standard foot-shooting apparatus. Hackers seem to enjoy rigging websites up to trigger cascading foot-shooting failures. Windows 98 About the same as Windows 95 in terms of overall bullet capacity and triggering mechanisms. Includes updated DirectShot API. A new version was released later on to support USB guns, Windows 98 SE.WPF:You get your baseball glove and a ball and you head out to your backyard, where you throw balls to your pitchback. Then your unkempt-haired-cargo-shorts-and-sandals-with-white-socks-wearing neighbor uses XAML to sculpt your arm into a gun, the ball into a bullet and the pitchback into your foot. By now, however, only the neighbor can get it to work and he's only around from 6:30 PM - 3:30 AM. LOGO: You very carefully lay out the trajectory of the bullet. Then you start the gun, which fires very slowly. You walk precisely to the point where the bullet will travel and wait, but just before it gets to you, your class time is up and one of the other kids has already used the system to hack into Sony's PS3 network. Flash: Someone has designed a beautiful-looking gun that anyone can shoot their feet with for free. It weighs six hundred pounds. All kinds of people are shooting themselves in the feet, and sending the link to everyone else so that they can too. That is, except for the criminals, who are all stealing iOS devices that the gun won't work with.APL: Its (mostly) all greek to me. Lisp: Place ((gun in ((hand sight (foot then shoot))))) (Lots of Insipid Stupid Parentheses)Apple OS/X and iOS Once a year, Steve Jobs returns from sick leave to tell millions of unwavering fans how they will be able to shoot themselves in the foot differently this year. They retweet and blog about it ad nauseam, and wait in line to be the first to experience "shoot different".Windows ME Usually fails, even at shooting you in the foot. Yo dawg, I heard you like shooting yourself in the foot. So I put a gun in your gun, so you can shoot yourself in the foot while you shoot yourself in the foot. (Okay, I'm not especially proud of this joke.) Windows 2000 Now you really do have to log in, before you are allowed to shoot yourself in the foot.Windows XPYou thought you learned your lesson: Don't use Windows ME. Then, along came this new creature, built on top of Windows NT! So you spend the next couple days installing antivirus software, patches and service packs, just so you can get that driver to install, and then proceed to shoot yourself in the foot. Windows Vista Newer! Glossier! Shootier! Windows 7 The bullets come out a lot smoother. Active Directory Each bullet now has an attached Bullet Identifier, and can be uniquely identified. Policies can be applied to dictate fragmentation, and the gun will occasionally have a confusing delay after the trigger has been pulled. PythonYou try to use import foot; foot.shoot() only to realize that's only available in 3.0, to which you can't yet upgrade from 2.7 because of all those extension libs lacking support. Solaris Shoots best when used on SPARC hardware, but still runs the trigger GUI under Java. After weeks of learning the appropriate STOP command to prevent the trigger from automatically being pressed on boot, you think you've got it under control. Then the one time you ever use dtrace, it hits a bug that fires the gun. MySQL The feature that allows you to shoot yourself in the foot has been in development for about 6 years, and they are adding it into the next version, which is coming out REAL SOON NOW, promise! But you can always check it out of source control and try it yourself (just not in any environment where data integrity is important because it will probably explode.) PostgreSQLAllows you to have a smug look on your face while you shoot yourself in the foot, because those MySQL guys STILL don't have that feature. NoSQL Barrel? Who needs a barrel? Just put the bullet on your foot, and strike it with a hammer. See? It's so much simpler and more efficient that way. You can even strike multiple bullets in one swing if you swing with a good enough arc, because hammers are easy to use. Getting them to synchronize is a little difficult, though.Eclipse There are about a dozen different packages for shooting yourself in the foot, with weird interdependencies on outdated components. Once you finally navigate the morass and get one installed, you then have something to look at while you shoot yourself in the foot with that package: You can watch the screen redraw.Outlook Makes it really easy to let everyone know you shot yourself in the foot!Shooting yourself in the foot using delegates.You really need to shoot yourself in the foot but you hate firearms (you don't want any dependency on the specifics of shooting) so you delegate it to somebody else. You don't care how it is done as long is shooting your foot. You can do it asynchronously in case you know you may faint so you are called back/slapped in the face by your shooter/friend (or background worker) when everything is done.C#You prepare the gun and the bullet, carefully modeling all of the physics of a bullet traveling through a foot. Just before you're about to pull the trigger, you stumble on System.Windows.BodyParts.Foot.ShootAt(System.Windows.Firearms.IGun gun) in the extended framework, realize you just wasted the entire afternoon, and shoot yourself in the head.PHP<?phprequire("foot_safety_check.php");?><!DOCTYPE HTML><html><head> <!--Lower!--><title>Shooting me in the foot</title></head> <body> <!--LOWER!!!--><leg> <!--OK, I made this one up...--><footer><?php echo (dungSift($_SERVER['HTTP_USER_AGENT'], "ie"))?("Your foot is safe, but you might want to wear a hard hat!"):("<div class=\"shot\">BANG!</div>"); ?></footer></leg> </body> </html>

    Read the article

  • The program is executing properly on dev C++ but is giving problem in Linux.The movement is becoming

    - by srinija
    #include<stdio.h> #include<GL/glut.h> GLfloat v[3][24]={{100.0,300.0,350.0,50.0,100.0,120.0,120.0,100.0,260.0,280.0, 280.0,260.0,140.0,160.0,160.0,140.0,180.0,200.0,200.0,180.0, 220.0,240.0,240.0,220.0},{100.0,100.0,200.0,200.0,160.0, 160.0,180.0,180.0,160.0,160.0,180.0,180.0,160.0,160.0,180.0, 180.0,160.0,160.0,180.0,180.0,160.0,160.0,180.0,180.0}, {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0}}; GLfloat v1[3][16]={{50.0,350.0,350.0,50.0,100.0,300.0,300.0,100.0,125.0,175.0, 175.0,125.0,225.0,275.0,275.0,225.0},{200.0,200.0,210.0, 210.0,210.0,210.0,240.0,240.0,240.0,240.0,310.0,310.0,240.0, 240.0,310.0,310.0},{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, 1.0,1.0,1.0,1.0,1.0,1.0}}; GLfloat colors[4][3]={{0.0,0.0,1.0},{0.9961,0.9961,0.65625},{1.0,0.0,1.0}, {1.0,.0,1.0}}; static float q,w,e; static float fq,fw,fe; static GLfloat wa=0,wb=0,wc=0,ba,bb,bc; int flag; void myinit(void) { glClearColor(0.506,.7,1,0.0); glPointSize(2.0); glLoadIdentity(); glOrtho(0.0,499.0,0.0,499.0,-300.0,300.0); } void draw_top_boxes(GLint i,GLint j) { glColor3f(1.0,0.0,0.0); glBegin(GL_POLYGON); glColor3fv(colors[j]); // to draw the boat glVertex2f(v1[0][i+0],v1[1][i+0]); glColor3fv(colors[j+1]); glVertex2f(v1[0][i+1],v1[1][i+1]); glColor3fv(colors[j+2]); glVertex2f(v1[0][i+2],v1[1][i+2]); glColor3fv(colors[j+3]); glVertex2f(v1[0][i+3],v1[1][i+3]); glEnd(); } void draw_polygon(GLint i) { glBegin(GL_POLYGON); // to draw the boat glColor3f(0.0,0.0,0.0); glColor3fv(colors[0]); glVertex2f(v[0][i+0],v[1][i+0]); glColor3fv(colors[1]); glVertex2f(v[0][i+1],v[1][i+1]); glColor3fv(colors[2]); glVertex2f(v[0][i+2],v[1][i+2]); glColor3fv(colors[3]); glVertex2f(v[0][i+3],v[1][i+3]); glEnd(); } void draw_boat() { draw_polygon(0); draw_polygon(4); draw_polygon(8); draw_polygon(12); draw_polygon(16); draw_polygon(20); draw_top_boxes(0,0); draw_top_boxes(4,0); draw_top_boxes(8,0); draw_top_boxes(12,0); glFlush(); glPopMatrix(); glPopMatrix(); } void draw_water() { GLfloat i; GLfloat x=0,y=103,j=0; GLfloat k; glPushMatrix(); glTranslatef(wa,wb,wc); glPushMatrix(); glColor3f(0,0,1); for(k=y;k>0;k-=6) { for(i=1;i<30;i++) { glBegin(GL_LINES); glVertex2f(j,k); glVertex2f(j+10,k); glEnd(); j=j+20; } j=0; } glPopMatrix(); glPopMatrix(); } void draw_fishes() { glPushMatrix(); glTranslatef(fq,12.0,fe); glPushMatrix(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(100,80); glVertex2f(100,60); glVertex2f(85,70); glEnd(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(100,70); glVertex2f(110,75); glVertex2f(110,65); glEnd(); glColor3f(0,0,0); glBegin(GL_POINTS); glVertex2f(90,71); glEnd(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(200,80); glVertex2f(200,60); glVertex2f(185,70); glEnd(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(200,70); glVertex2f(210,75); glVertex2f(210,65); glEnd(); glColor3f(0,0,0); glBegin(GL_POINTS); glVertex2f(190,71); glEnd(); glPopMatrix(); glPopMatrix(); glFlush(); } void draw_cloud() { GLfloat m=100,n=400,o=10; for(int i=0;i<7;i++) { glPushMatrix(); glColor3f(1.0,1.0,1.0); if(i==1) glTranslated(125,415,10); else if(i==3||i==5) glTranslated(m,n+5,o); else glTranslated(m,n,o); glutSolidSphere(20.0,5000,150); glPopMatrix(); m+=10; } } void draw_square() { glColor3f(0,0.5,0.996); glBegin(GL_POLYGON); glVertex2f(0,0); glVertex2f(1000,0); glVertex2f(0,300); glVertex2f(1000,300); glEnd(); glFlush(); } void draw_brotate() { glPushMatrix(); glColor3f(0.96,0.5,0.25); //to draw body of the bird glTranslated(300,400,10); glScalef(3,1,1); glutSolidSphere(6,50000,15); glPopMatrix(); glPushMatrix(); glTranslated(323,400,10); glutSolidSphere(5,50000,15); glPopMatrix(); glColor3f(0,0,0); glBegin(GL_POINTS); glVertex2f(325,401); glEnd(); glColor3f(0.96,0.5,0.25); //to draw wings glBegin(GL_LINES); glVertex2f(294,394); glVertex2f(286,389); glEnd(); glBegin(GL_LINES); glVertex2f(286,389); glVertex2f(295,391); glEnd(); glBegin(GL_LINES); glVertex2f(295,391); glVertex2f(285,385); glEnd(); glBegin(GL_LINES); glVertex2f(285,385); glVertex2f(309,395); glEnd(); glBegin(GL_LINES); glVertex2f(294,406); glVertex2f(286,411); glEnd(); glBegin(GL_LINES); glVertex2f(286,411); glVertex2f(295,409); glEnd(); glBegin(GL_LINES); glVertex2f(295,409); glVertex2f(285,415); glEnd(); glBegin(GL_LINES); glVertex2f(285,415); glVertex2f(309,406); glEnd(); glColor3f(0.96,0.5,0.25); } void draw_bird() { GLfloat x=200,y=400,z=10; draw_brotate(); glBegin(GL_LINES); //draw legs of the bird glVertex2f(285,402); glVertex2f(275,402); glEnd(); glBegin(GL_LINES); glVertex2f(285,398); glVertex2f(275,398); glEnd(); glBegin(GL_LINES); glVertex2f(275,402); glVertex2f(270,405); glEnd(); glBegin(GL_LINES); glVertex2f(275,402); glVertex2f(270,398); glEnd(); glBegin(GL_LINES); glVertex2f(275,398); glVertex2f(273,400); glEnd(); glBegin(GL_LINES); glVertex2f(275,398); glVertex2f(270,395); glEnd(); glBegin(GL_LINES); glVertex2f(323,405); glVertex2f(323,407); glEnd(); glPushMatrix(); glTranslatef(323,409,10); glutSolidSphere(2,200,20); glPopMatrix(); glBegin(GL_TRIANGLES); glVertex2f(328,400); glVertex2f(331,397); glVertex2f(327,398.5); glEnd(); glFlush(); } void drawstars() { glColor3f(1.0,1.0,1.0); glBegin(GL_POINTS); glVertex3f(300.0,400.0,10.0); glVertex3f(200,400.0,10.0); glVertex3f(150,450.0,10.0); glVertex3f(100,470.0,10.0); glVertex3f(50,450.0,10.0); glVertex3f(50,350.0,10.0); glVertex3f(90,365.0,10.0); glVertex3f(350,450.0,10.0); glVertex3f(275,470.0,10.0); glVertex3f(280,430.0,10.0); glVertex3f(250,400.0,10.0); glVertex3f(450,450.0,10.0); glVertex3f(430,430.0,10.0); glVertex3f(430,470.0,10.0); glVertex3f(300,450.0,10.0); glVertex3f(265,380.0,10.0); glVertex3f(235,450.0,10.0); glEnd(); } void draw_all() { glClear(GL_COLOR_BUFFER_BIT); if(flag==0) { glDisable(GL_LIGHTING); //immp one draw_square(); draw_cloud(); glClearColor(0.506,.7,1,0.0); glTranslatef(q,w,e); glPushMatrix(); glColor3f(1.0,0.0,0.0); draw_boat(); draw_fishes(); glPushMatrix(); glColor3f(1.0,1.0,0.0); glTranslated(400,400,10); glutSolidSphere(20.0,5000,150); glPopMatrix(); } if(flag==1) { glDisable(GL_LIGHTING); //imp one draw_square(); draw_cloud(); glClearColor(0.9960,0.7070,0.3164,0.0); glTranslatef(q,w,e); glPushMatrix(); glColor3f(1.0,0.0,0.0); draw_boat(); draw_fishes(); glPushMatrix(); glColor3f(1.0,1.0,0.0); glTranslated(400,400,10); glutSolidSphere(20.0,500,100); glPopMatrix(); } if(flag==2) { // just try and change values in these arrays, specially the position array drawstars(); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); // GLfloat emission[]={0.1,0.1,0.1,0.0}; GLfloat diffuse[] = { 0.40, 0.40,0.40, 1.0 }; GLfloat ambiance[] = { 0.5, 0.5,0.5, 1.0 }; GLfloat specular[] = { 1.3, 1.3,.3, 1.0 }; GLfloat intensity[]={500.0}; GLfloat position[] = { 10,30,-30,1.0 }; glLightfv (GL_LIGHT0, GL_POSITION, position); glLightfv (GL_LIGHT0, GL_DIFFUSE,diffuse); glLightfv (GL_LIGHT0, GL_AMBIENT,ambiance); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,GL_TRUE); glLightfv (GL_LIGHT0, GL_SPECULAR,specular); glLightfv (GL_LIGHT0, GL_INTENSITY,intensity); glColor3f(0,0.5,0.996); glBegin(GL_POLYGON); glVertex2f(0,0); glVertex2f(1000,0); glVertex2f(0,150); glVertex2f(1000,150); glEnd(); glTranslatef(q,w,e); glPushMatrix(); glColor3f(1.0,0.0,0.0); draw_boat(); draw_fishes(); glDisable(GL_LIGHTING); glDisable(GL_LIGHT0); draw_cloud(); glClearColor(0.0,0.0,0.0,0.0); glPushMatrix(); glColor3f(1.0,1.0,1.0); glTranslated(400,400,10); glutSolidSphere(20.0,500,100); glPopMatrix(); glColor3f(1.0,1.0,1.0); glBegin(GL_POINTS); glVertex3f(300.0,400.0,10.0); glEnd(); } glPushMatrix(); glTranslatef(ba,bb,bc); glPushMatrix(); draw_bird(); glPopMatrix(); glPopMatrix(); GLfloat i; glPushMatrix(); GLfloat x=0,y=100,j=0; int k; //draw_water(); Sleep(60); q+=5; fq-=3.5; if(q>=440.0) //470 q=-390.0; //400 if(fq<=-300) //500 fq=400.0; //400 wa-=1; if(wa<=(-20)) wa=-0.5; ba+=6; if(ba>=500) ba=-400; glFlush(); glutSwapBuffers(); } void display(void) { draw_all(); } void color_menu(int id) { switch(id) { case 1: flag=0;break; case 2: flag=1;break; case 3: flag=2;break; case 4: exit(0); break; } glutPostRedisplay(); } void main_menu(int id) { switch(id) { case 1: break; case 2:exit(0);break; glutPostRedisplay(); } } int main(int argc,char **argv) { int sub_menu; glutInit(&argc,argv); glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE); glutInitWindowSize(1000,1000); glutInitWindowPosition(0,0); glutCreateWindow("Ship"); sub_menu=glutCreateMenu(color_menu); glutAddMenuEntry("Morning",1); glutAddMenuEntry("Evening",2); glutAddMenuEntry("Night",3); glutAddMenuEntry("Quit",4); glutCreateMenu(main_menu); glutAddSubMenu("View",sub_menu); glutAddMenuEntry("Quit",2); glutAttachMenu(GLUT_RIGHT_BUTTON); glutDisplayFunc(display); glutIdleFunc(display); myinit(); glutMainLoop(); glFlush(); }

    Read the article

  • This code is working properly in Dev C++ .But on Linux platform it is giving problem with the moveme

    - by srinija
    #include<stdio.h> #include<GL/glut.h> #include<stdlib.h> GLfloat v[3][24]={{100.0,300.0,350.0,50.0,100.0,120.0,120.0,100.0,260.0,280.0, 280.0,260.0,140.0,160.0,160.0,140.0,180.0,200.0,200.0,180.0, 220.0,240.0,240.0,220.0},{100.0,100.0,200.0,200.0,160.0, 160.0,180.0,180.0,160.0,160.0,180.0,180.0,160.0,160.0,180.0, 180.0,160.0,160.0,180.0,180.0,160.0,160.0,180.0,180.0}, {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0}}; GLfloat v1[3][16]={{50.0,350.0,350.0,50.0,100.0,300.0,300.0,100.0,125.0,175.0, 175.0,125.0,225.0,275.0,275.0,225.0},{200.0,200.0,210.0, 210.0,210.0,210.0,240.0,240.0,240.0,240.0,310.0,310.0,240.0, 240.0,310.0,310.0},{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, 1.0,1.0,1.0,1.0,1.0,1.0}}; GLfloat colors[4][3]={{0.0,0.0,1.0},{0.9961,0.9961,0.65625},{1.0,0.0,1.0}, {1.0,.0,1.0}}; static float q,w,e; static float fq,fw,fe; static GLfloat wa=0,wb=0,wc=0,ba,bb,bc; int flag; void myinit(void) { glClearColor(0.506,.7,1,0.0); glPointSize(2.0); glLoadIdentity(); glOrtho(0.0,499.0,0.0,499.0,-300.0,300.0); } void draw_top_boxes(GLint i,GLint j) { glColor3f(1.0,0.0,0.0); glBegin(GL_POLYGON); glColor3fv(colors[j]); // to draw the boat glVertex2f(v1[0][i+0],v1[1][i+0]); glColor3fv(colors[j+1]); glVertex2f(v1[0][i+1],v1[1][i+1]); glColor3fv(colors[j+2]); glVertex2f(v1[0][i+2],v1[1][i+2]); glColor3fv(colors[j+3]); glVertex2f(v1[0][i+3],v1[1][i+3]); glEnd(); } void draw_polygon(GLint i) { glBegin(GL_POLYGON); // to draw the boat glColor3f(0.0,0.0,0.0); glColor3fv(colors[0]); glVertex2f(v[0][i+0],v[1][i+0]); glColor3fv(colors[1]); glVertex2f(v[0][i+1],v[1][i+1]); glColor3fv(colors[2]); glVertex2f(v[0][i+2],v[1][i+2]); glColor3fv(colors[3]); glVertex2f(v[0][i+3],v[1][i+3]); glEnd(); } void draw_boat() { draw_polygon(0); draw_polygon(4); draw_polygon(8); draw_polygon(12); draw_polygon(16); draw_polygon(20); draw_top_boxes(0,0); draw_top_boxes(4,0); draw_top_boxes(8,0); draw_top_boxes(12,0); glFlush(); glPopMatrix(); glPopMatrix(); } void draw_water() { GLfloat i; GLfloat x=0,y=103,j=0; GLfloat k; glPushMatrix(); glTranslatef(wa,wb,wc); glPushMatrix(); glColor3f(0,0,1); for(k=y;k>0;k-=6) { for(i=1;i<30;i++) { glBegin(GL_LINES); glVertex2f(j,k); glVertex2f(j+10,k); glEnd(); j=j+20; } j=0; } glPopMatrix(); glPopMatrix(); } void draw_fishes() { glPushMatrix(); glTranslatef(fq,12.0,fe); glPushMatrix(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(100,80); glVertex2f(100,60); glVertex2f(85,70); glEnd(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(100,70); glVertex2f(110,75); glVertex2f(110,65); glEnd(); glColor3f(0,0,0); glBegin(GL_POINTS); glVertex2f(90,71); glEnd(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(200,80); glVertex2f(200,60); glVertex2f(185,70); glEnd(); glColor3f(.99609375,0.2578125,0.2578125); glBegin(GL_TRIANGLES); glVertex2f(200,70); glVertex2f(210,75); glVertex2f(210,65); glEnd(); glColor3f(0,0,0); glBegin(GL_POINTS); glVertex2f(190,71); glEnd(); glPopMatrix(); glPopMatrix(); glFlush(); } void draw_cloud() { GLfloat m=100,n=400,o=10; for(int i=0;i<7;i++) { glPushMatrix(); glColor3f(1.0,1.0,1.0); if(i==1) glTranslated(125,415,10); else if(i==3||i==5) glTranslated(m,n+5,o); else glTranslated(m,n,o); glutSolidSphere(20.0,5000,150); glPopMatrix(); m+=10; } } void draw_square() { glColor3f(0,0.5,0.996); glBegin(GL_POLYGON); glVertex2f(0,0); glVertex2f(1000,0); glVertex2f(0,300); glVertex2f(1000,300); glEnd(); glFlush(); } void draw_brotate() { glPushMatrix(); glColor3f(0.96,0.5,0.25); //to draw body of the bird glTranslated(300,400,10); glScalef(3,1,1); glutSolidSphere(6,50000,15); glPopMatrix(); glPushMatrix(); glTranslated(323,400,10); glutSolidSphere(5,50000,15); glPopMatrix(); glColor3f(0,0,0); glBegin(GL_POINTS); glVertex2f(325,401); glEnd(); glColor3f(0.96,0.5,0.25); //to draw wings glBegin(GL_LINES); glVertex2f(294,394); glVertex2f(286,389); glEnd(); glBegin(GL_LINES); glVertex2f(286,389); glVertex2f(295,391); glEnd(); glBegin(GL_LINES); glVertex2f(295,391); glVertex2f(285,385); glEnd(); glBegin(GL_LINES); glVertex2f(285,385); glVertex2f(309,395); glEnd(); glBegin(GL_LINES); glVertex2f(294,406); glVertex2f(286,411); glEnd(); glBegin(GL_LINES); glVertex2f(286,411); glVertex2f(295,409); glEnd(); glBegin(GL_LINES); glVertex2f(295,409); glVertex2f(285,415); glEnd(); glBegin(GL_LINES); glVertex2f(285,415); glVertex2f(309,406); glEnd(); glColor3f(0.96,0.5,0.25); } void draw_bird() { GLfloat x=200,y=400,z=10; draw_brotate(); glBegin(GL_LINES); //draw legs of the bird glVertex2f(285,402); glVertex2f(275,402); glEnd(); glBegin(GL_LINES); glVertex2f(285,398); glVertex2f(275,398); glEnd(); glBegin(GL_LINES); glVertex2f(275,402); glVertex2f(270,405); glEnd(); glBegin(GL_LINES); glVertex2f(275,402); glVertex2f(270,398); glEnd(); glBegin(GL_LINES); glVertex2f(275,398); glVertex2f(273,400); glEnd(); glBegin(GL_LINES); glVertex2f(275,398); glVertex2f(270,395); glEnd(); glBegin(GL_LINES); glVertex2f(323,405); glVertex2f(323,407); glEnd(); glPushMatrix(); glTranslatef(323,409,10); glutSolidSphere(2,200,20); glPopMatrix(); glBegin(GL_TRIANGLES); glVertex2f(328,400); glVertex2f(331,397); glVertex2f(327,398.5); glEnd(); glFlush(); } void drawstars() { glColor3f(1.0,1.0,1.0); glBegin(GL_POINTS); glVertex3f(300.0,400.0,10.0); glVertex3f(200,400.0,10.0); glVertex3f(150,450.0,10.0); glVertex3f(100,470.0,10.0); glVertex3f(50,450.0,10.0); glVertex3f(50,350.0,10.0); glVertex3f(90,365.0,10.0); glVertex3f(350,450.0,10.0); glVertex3f(275,470.0,10.0); glVertex3f(280,430.0,10.0); glVertex3f(250,400.0,10.0); glVertex3f(450,450.0,10.0); glVertex3f(430,430.0,10.0); glVertex3f(430,470.0,10.0); glVertex3f(300,450.0,10.0); glVertex3f(265,380.0,10.0); glVertex3f(235,450.0,10.0); glEnd(); } void draw_all() { glClear(GL_COLOR_BUFFER_BIT); if(flag==0) { glDisable(GL_LIGHTING); //immp one draw_square(); draw_cloud(); glClearColor(0.506,.7,1,0.0); glTranslatef(q,w,e); glPushMatrix(); glColor3f(1.0,0.0,0.0); draw_boat(); draw_fishes(); glPushMatrix(); glColor3f(1.0,1.0,0.0); glTranslated(400,400,10); glutSolidSphere(20.0,5000,150); glPopMatrix(); } if(flag==1) { glDisable(GL_LIGHTING); //imp one draw_square(); draw_cloud(); glClearColor(0.9960,0.7070,0.3164,0.0); glTranslatef(q,w,e); glPushMatrix(); glColor3f(1.0,0.0,0.0); draw_boat(); draw_fishes(); glPushMatrix(); glColor3f(1.0,1.0,0.0); glTranslated(400,400,10); glutSolidSphere(20.0,500,100); glPopMatrix(); } if(flag==2) { // just try and change values in these arrays, specially the position array drawstars(); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); // GLfloat emission[]={0.1,0.1,0.1,0.0}; GLfloat diffuse[] = { 0.40, 0.40,0.40, 1.0 }; GLfloat ambiance[] = { 0.5, 0.5,0.5, 1.0 }; GLfloat specular[] = { 1.3, 1.3,.3, 1.0 }; GLfloat intensity[]={500.0}; GLfloat position[] = { 10,30,-30,1.0 }; glLightfv (GL_LIGHT0, GL_POSITION, position); glLightfv (GL_LIGHT0, GL_DIFFUSE,diffuse); glLightfv (GL_LIGHT0, GL_AMBIENT,ambiance); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,GL_TRUE); glLightfv (GL_LIGHT0, GL_SPECULAR,specular); glLightfv (GL_LIGHT0, GL_INTENSITY,intensity); glColor3f(0,0.5,0.996); glBegin(GL_POLYGON); glVertex2f(0,0); glVertex2f(1000,0); glVertex2f(0,150); glVertex2f(1000,150); glEnd(); glTranslatef(q,w,e); glPushMatrix(); glColor3f(1.0,0.0,0.0); draw_boat(); draw_fishes(); glDisable(GL_LIGHTING); glDisable(GL_LIGHT0); draw_cloud(); glClearColor(0.0,0.0,0.0,0.0); glPushMatrix(); glColor3f(1.0,1.0,1.0); glTranslated(400,400,10); glutSolidSphere(20.0,500,100); glPopMatrix(); glColor3f(1.0,1.0,1.0); glBegin(GL_POINTS); glVertex3f(300.0,400.0,10.0); glEnd(); } glPushMatrix(); glTranslatef(ba,bb,bc); glPushMatrix(); draw_bird(); glPopMatrix(); glPopMatrix(); GLfloat i; glPushMatrix(); GLfloat x=0,y=100,j=0; int k; //draw_water(); q+=25; fq-=3.5; if(q>=440.0) //470 q=-390.0; //400 if(fq<=-300) //500 fq=400.0; //400 wa-=1; if(wa<=(-20)) wa=-0.5; ba+=6; if(ba>=500) ba=-400; glFlush(); glutSwapBuffers(); } void display(void) { draw_all(); } void color_menu(int id) { switch(id) { case 1: flag=0;break; case 2: flag=1;break; case 3: flag=2;break; case 4: exit(0); break; } glutPostRedisplay(); } void main_menu(int id) { switch(id) { case 1: break; case 2:exit(0);break; glutPostRedisplay(); } } int main(int argc,char **argv) { int sub_menu; glutInit(&argc,argv); glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE); glutInitWindowSize(1000,1000); glutInitWindowPosition(0,0); glutCreateWindow("Ship"); sub_menu=glutCreateMenu(color_menu); glutAddMenuEntry("Morning",1); glutAddMenuEntry("Evening",2); glutAddMenuEntry("Night",3); glutAddMenuEntry("Quit",4); glutCreateMenu(main_menu); glutAddSubMenu("View",sub_menu); glutAddMenuEntry("Quit",2); glutAttachMenu(GLUT_RIGHT_BUTTON); glutDisplayFunc(display); glutIdleFunc(display); myinit(); glutMainLoop(); glFlush(); }

    Read the article

  • How to write a XSLT for this XML?

    - by atrueguy
    <?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="612px" height="792px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve"> <g id="Original_Text"> <line x1="92.676" y1="500.913" x2="92.676" y2="500.262"/> <line x1="15.208" y1="500.913" x2="15.208" y2="500.262"/> <line x1="92.676" y1="500.262" x2="92.676" y2="500.913"/> <line x1="15.208" y1="510.329" x2="15.208" y2="509.678"/> <line x1="92.676" y1="500.913" x2="92.676" y2="500.262"/> <rect x="15.208" y="574.678" display="none" width="77.468" height="0.651"/> <text transform="matrix(1 0 0 1 258.6782 28.9111)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="8.4629">Bartlet</tspan><tspan x="24.459" y="0" font-family="'ArialMT'" font-size="8.4629">t</tspan><tspan x="26.895" y="0" font-family="'ArialMT'" font-size="8.4629"> </tspan><tspan x="29.035" y="0" font-family="'ArialMT'" font-size="8.4629">Managemen</tspan><tspan x="76.081" y="0" font-family="'ArialMT'" font-size="8.4629">t</tspan><tspan x="78.601" y="0" font-family="'ArialMT'" font-size="8.4629"> </tspan><tspan x="80.741" y="0" font-family="'ArialMT'" font-size="8.4629">Services</tspan></text> <text transform="matrix(1 0 0 1 522.9805 39.562)"><tspan x="0" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Report</tspan><tspan x="21.493" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="25.382" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="27.343" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Home</tspan></text> <line fill="none" stroke="#0000FF" stroke-width="0.651" stroke-miterlimit="10" x1="522.98" y1="40.213" x2="569.852" y2="40.213"/> <text transform="matrix(1 0 0 1 261.2822 39.3267)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Consolidate</tspan><tspan x="37.818" y="0" font-family="'ArialMT'" font-size="7.1609">d</tspan><tspan x="41.901" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="44.105" y="0" font-family="'ArialMT'" font-size="7.1609">Weekl</tspan><tspan x="64.001" y="0" font-family="'ArialMT'" font-size="7.1609">y</tspan><tspan x="67.975" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="70.18" y="0" font-family="'ArialMT'" font-size="7.1609">Sales</tspan><tspan x="88.092" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="90.297" y="0" font-family="'ArialMT'" font-size="7.1609">Report</tspan></text> <text transform="matrix(1 0 0 1 522.9775 49.3267)"><tspan x="0" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Stor</tspan><tspan x="13.133" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="17.566" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="19.527" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Finder</tspan></text> <line fill="none" stroke="#0000FF" stroke-width="0.651" stroke-miterlimit="10" x1="521.98" y1="49.978" x2="562.341" y2="49.978"/> <text transform="matrix(1 0 0 1 282.7881 49.9775)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">P</tspan><tspan x="4.776" y="0" font-family="'ArialMT'" font-size="7.1609">D</tspan><tspan x="10.27" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="12.475" y="0" font-family="'ArialMT'" font-size="7.1609"> / </tspan></text> <text transform="matrix(1 0 0 1 123.5044 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">1</tspan></text> <text transform="matrix(1 0 0 1 190.1138 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">2</tspan></text> <text transform="matrix(1 0 0 1 261.6782 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">3</tspan></text> <text transform="matrix(1 0 0 1 331.377 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">4</tspan></text> <text transform="matrix(1 0 0 1 400.3164 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">5</tspan></text> <text transform="matrix(1 0 0 1 461.751 60.9487)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">P</tspan><tspan x="4.805" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="7.404" y="0" font-family="'ArialMT'" font-size="7.1609">T</tspan><tspan x="11.808" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="14.406" y="0" font-family="'ArialMT'" font-size="7.1609">D</tspan><tspan x="19.864" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.068" y="0" font-family="'ArialMT'" font-size="7.1609">Total</tspan></text> <text transform="matrix(1 0 0 1 527.6309 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Yea</tspan><tspan x="12.741" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="15.699" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="18.298" y="0" font-family="'ArialMT'" font-size="7.1609">T</tspan><tspan x="22.673" y="0" font-family="'ArialMT'" font-size="7.1609">o</tspan><tspan x="27.12" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="29.72" y="0" font-family="'ArialMT'" font-size="7.1609">Dat</tspan><tspan x="40.863" y="0" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="45.419" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="47.623" y="0" font-family="'ArialMT'" font-size="7.1609">Total</tspan></text> <text transform="matrix(1 0 0 1 112.853 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 148.0059 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 184.4619 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 218.9629 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 255.4194 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 289.9204 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 326.377 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 360.8779 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 397.334 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 431.835 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 470.2461 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 506.0508 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 546.4092 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 584.1689 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 15.1997 83.394)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">KFC</tspan></text> <text transform="matrix(1 0 0 1 15.1997 94.1616)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">A&amp;W</tspan></text> <text transform="matrix(1 0 0 1 15.1997 104.9287)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">LJS</tspan></text> <text transform="matrix(1 0 0 1 15.1924 115.6963)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">TB</tspan></text> <text transform="matrix(1 0 0 1 15.1924 126.9639)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">Net</tspan></text> <text transform="matrix(1 0 0 1 15.1851 149.2949)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Las</tspan><tspan x="11.545" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="13.671" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="15.632" y="0" font-family="'ArialMT'" font-size="7.1609">Yea</tspan><tspan x="28.374" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="31.252" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="33.213" y="0" font-family="'ArialMT'" font-size="7.1609">Sales</tspan></text> <text transform="matrix(1 0 0 1 15.1855 161.0625)" font-family="'ArialMT'" font-size="7.1609">Increase</text> <text transform="matrix(1 0 0 1 15.2065 171.8296)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Las</tspan><tspan x="11.545" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="13.671" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="15.632" y="0" font-family="'ArialMT'" font-size="7.1609">yea</tspan><tspan x="27.178" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="29.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="31.91" y="0" font-family="'ArialMT'" font-size="7.1609">Nex</tspan><tspan x="44.644" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="46.884" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="48.845" y="0" font-family="'ArialMT'" font-size="7.1609">Week</tspan></text> <text transform="matrix(1 0 0 1 15.2065 193.3574)" font-family="'ArialMT'" font-size="7.1609">Chicken</text> <text transform="matrix(1 0 0 1 15.1997 205.125)" font-family="'ArialMT'" font-size="7.1609">Filets</text> <text transform="matrix(1 0 0 1 15.1997 215.8926)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Popcor</tspan><tspan x="22.689" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="26.686" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="28.646" y="0" font-family="'ArialMT'" font-size="7.1609">Chicken</tspan></text> <text transform="matrix(1 0 0 1 15.1997 226.6602)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Crisp</tspan><tspan x="16.71" y="0" font-family="'ArialMT'" font-size="7.1609">y</tspan><tspan x="20.828" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.788" y="0" font-family="'ArialMT'" font-size="7.1609">Strips</tspan></text> <text transform="matrix(1 0 0 1 15.1997 237.4272)" font-family="'ArialMT'" font-size="7.1609">Special</text> <text transform="matrix(1 0 0 1 15.1924 248.1948)" font-family="'ArialMT'" font-size="7.1609">Wings</text> <text transform="matrix(1 0 0 1 15.1924 257.9624)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Subtota</tspan><tspan x="24.686" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="26.448" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="28.652" y="0" font-family="'ArialMT'" font-size="7.1609">Chicken</tspan></text> <text transform="matrix(1 0 0 1 15.1851 280.2935)" font-family="'ArialMT'" font-size="7.1609">Shortening</text> <text transform="matrix(1 0 0 1 15.1851 291.5605)" font-family="'ArialMT'" font-size="7.1609">Flour</text> <text transform="matrix(1 0 0 1 15.1851 302.3281)" font-family="'ArialMT'" font-size="7.1609">Biscuits</text> <text transform="matrix(1 0 0 1 15.1851 313.0957)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Frie</tspan><tspan x="12.332" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="16.278" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.239" y="0" font-family="'ArialMT'" font-size="7.1609">/</tspan><tspan x="20.844" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.805" y="0" font-family="'ArialMT'" font-size="7.1609">Onio</tspan><tspan x="37.931" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="42.329" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="44.29" y="0" font-family="'ArialMT'" font-size="7.1609">Rings</tspan></text> <text transform="matrix(1 0 0 1 15.1851 323.9385)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Potatoe</tspan><tspan x="24.686" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="28.646" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="30.606" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="33.206" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="35.167" y="0" font-family="'ArialMT'" font-size="7.1609">Mashed</tspan></text> <text transform="matrix(1 0 0 1 15.1851 334.6309)" font-family="'ArialMT'" font-size="7.1609">Desserts</text> <text transform="matrix(1 0 0 1 15.1851 345.3979)" font-family="'ArialMT'" font-size="7.1609">Drinks</text> <text transform="matrix(1 0 0 1 15.1851 357.1655)" font-family="'ArialMT'" font-size="7.1609">Corn</text> <text transform="matrix(1 0 0 1 15.1851 367.4331)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ms</tspan><tspan x="9.545" y="0" font-family="'ArialMT'" font-size="7.1609">c</tspan><tspan x="13.663" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="15.624" y="0" font-family="'ArialMT'" font-size="7.1609">Entrees</tspan></text> <text transform="matrix(1 0 0 1 15.1846 378.2002)" font-family="'ArialMT'" font-size="7.1609">Salads</text> <text transform="matrix(1 0 0 1 15.1846 388.9678)" font-family="'ArialMT'" font-size="7.1609">Condiments</text> <text transform="matrix(1 0 0 1 15.1846 400.2354)" font-family="'ArialMT'" font-size="7.1609">Paper</text> <text transform="matrix(1 0 0 1 15.2012 410.9385)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">A&amp;</tspan><tspan x="9.553" y="0" font-family="'ArialMT'" font-size="7.1609">W</tspan><tspan x="16.927" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.888" y="0" font-family="'ArialMT'" font-size="7.1609">Sandwiches</tspan></text> <text transform="matrix(1 0 0 1 15.1943 421.2051)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">LJ</tspan><tspan x="7.563" y="0" font-family="'ArialMT'" font-size="7.1609">S</tspan><tspan x="12.368" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">Product</tspan></text> <text transform="matrix(1 0 0 1 15.1938 431.4736)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">T</tspan><tspan x="4.374" y="0" font-family="'ArialMT'" font-size="7.1609">B</tspan><tspan x="9.766" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="11.727" y="0" font-family="'ArialMT'" font-size="7.1609">Product</tspan></text> <text transform="matrix(1 0 0 1 15.208 441.2402)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">C.O.S</tspan></text> <text transform="matrix(1 0 0 1 15.187 465.0713)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Hourl</tspan><tspan x="17.112" y="0" font-family="'ArialMT'" font-size="7.1609">y</tspan><tspan x="20.829" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.79" y="0" font-family="'ArialMT'" font-size="7.1609">Labor</tspan></text> <text transform="matrix(1 0 0 1 15.1797 474.8389)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Mgm</tspan><tspan x="15.913" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="18.225" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="20.186" y="0" font-family="'ArialMT'" font-size="7.1609">Labor</tspan></text> <text transform="matrix(1 0 0 1 15.1724 486.6064)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">Labor</tspan></text> <text transform="matrix(1 0 0 1 15.1655 507.7412)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">Controllable</tspan></text> <text transform="matrix(1 0 0 1 15.1655 530.2686)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Charg</tspan><tspan x="19.503" y="0" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="24.088" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="26.048" y="0" font-family="'ArialMT'" font-size="7.1609">Count</tspan></text> <text transform="matrix(1 0 0 1 15.1729 542.0361)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Charg</tspan><tspan x="19.503" y="0" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="24.088" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="26.048" y="0" font-family="'ArialMT'" font-size="7.1609">Ticke</tspan><tspan x="43.157" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="45.576" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="47.537" y="0" font-family="'ArialMT'" font-size="7.1609">Average</tspan></text> <text transform="matrix(1 0 0 1 15.1553 563.5635)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Coupo</tspan><tspan x="21.102" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="25.385" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="27.346" y="0" font-family="'ArialMT'" font-size="7.1609">Count</tspan></text> <text transform="matrix(1 0 0 1 15.1479 574.3311)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Coupo</tspan><tspan x="21.102" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="25.385" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="27.346" y="0" font-family="'ArialMT'" font-size="7.1609">$</tspan></text> <text transform="matrix(1 0 0 1 15.1582 595.8594)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ticke</tspan><tspan x="17.108" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="19.528" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.489" y="0" font-family="'ArialMT'" font-size="7.1609">Average</tspan></text> <text transform="matrix(1 0 0 1 15.1582 617.3867)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Hea</tspan><tspan x="13.136" y="0" font-family="'ArialMT'" font-size="7.1609">d</tspan><tspan x="17.57" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="19.531" y="0" font-family="'ArialMT'" font-size="7.1609">Average</tspan></text> <text transform="matrix(1 0 0 1 15.1582 628.1543)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Piece</tspan><tspan x="17.913" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="22.138" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="24.099" y="0" font-family="'ArialMT'" font-size="7.1609">Scrapped</tspan></text> <text transform="matrix(1 0 0 1 15.1514 639.4219)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Piece</tspan><tspan x="17.913" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="22.138" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="24.099" y="0" font-family="'ArialMT'" font-size="7.1609">Unacc</tspan><tspan x="44.396" y="0" font-family="'ArialMT'" font-size="7.1609">.</tspan><tspan x="46.887" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="48.848" y="0" font-family="'ArialMT'" font-size="7.1609">For</tspan></text> <text transform="matrix(1 0 0 1 15.1514 650.6895)" font-family="'ArialMT'" font-size="7.1609">Efficiency</text> <text transform="matrix(1 0 0 1 15.1514 671.2168)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Cas</tspan><tspan x="12.734" y="0" font-family="'ArialMT'" font-size="7.1609">h</tspan><tspan x="16.925" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.885" y="0" font-family="'ArialMT'" font-size="7.1609">ove</tspan><tspan x="30.431" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="33.202" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="35.163" y="0" font-family="'ArialMT'" font-size="7.1609">/(short)</tspan></text> <path stroke="#000000" d="M10,488.932"/> </g> <g id="Pieces_Unaccounted"> <g id="l_x5F_u_x5F_pieces_x5F_unaccounted"> <line id="UnaccountedFor_1_" fill="none" stroke="#000000" stroke-width="0.5" x1="10" y1="640" x2="599.5" y2="640"/> </g> </g> <g id="Total_Labor"> <g id="Double_Lines"> <line id="Btm_Line" stroke="#000000" stroke-width="0.5" x1="11" y1="490.932" x2="600.5" y2="490.932"/> <line id="Top_Line" stroke="#000000" stroke-width="0.5" x1="11" y1="488.932" x2="600.5" y2="488.932"/> </g> <line id="Line_Above" stroke="#000000" stroke-width="0.5" x1="10.5" y1="477.5" x2="600" y2="477.5"/> </g> <g id="Total_Cos"> <g id="Double_Line_3_"> <line id="Btm_Line_3_" stroke="#000000" stroke-width="0.5" x1="11" y1="444.932" x2="600.5" y2="444.932"/> <line id="Top_Line_3_" stroke="#000000" stroke-width="0.5" x1="11" y1="442.932" x2="600.5" y2="442.932"/> </g> <line id="Line_Above_6_" stroke="#000000" stroke-width="0.5" x1="10.34" y1="433.097" x2="599.84" y2="433.097"/> </g> <g id="SubTotal_Chicken"> <g id="Double_Line_2_"> <line id="Btm_Line_1_" stroke="#000000" stroke-width="0.5" x1="7" y1="261.932" x2="596.5" y2="261.932"/> <line id="Top_Line_1_" stroke="#000000" stroke-width="0.5" x1="7" y1="259.932" x2="596.5" y2="259.932"/> </g> <line id="Line_Above_1_" stroke="#000000" stroke-width="0.5" x1="7" y1="250.097" x2="596.5" y2="250.097"/> </g> <g id="total_Net"> <g id="Double_Line_1_"> <line id="Btm_Line_2_" stroke="#000000" stroke-width="0.5" x1="7" y1="130.932" x2="596.5" y2="130.932"/> <line id="Top_Line_2_" stroke="#000000" stroke-width="0.5" x1="7" y1="128.932" x2="596.5" y2="128.932"/> </g> <line id="Line_Above_3_" stroke="#000000" stroke-width="0.5" x1="7" y1="119.097" x2="596.5" y2="119.097"/> </g> <g id="Header_Underline"> <line id="Line_Above_4_" stroke="#000000" stroke-width="0.5" x1="8.34" y1="74.5" x2="597.84" y2="74.5"/> </g> <g id="Total_Controllable"> <line id="Line_Above_2_" stroke="#000000" x1="7" y1="498.066" x2="600.5" y2="498.066"/> <line id="Line_Under" stroke="#000000" x1="7" y1="509.329" x2="600.5" y2="509.329"/> </g> </svg> The above code is generated xml file, and i need to write a xslt transformation to get the fo file, for the PDF generation, how do I do it?? The doubt I have is, that I dont now how to represent the tags in xslt, and also I need to represent the line, path and text in the form of xslt. how can I do this any ideas, with really get me going... Actually I have to use a style sheet like this: <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" > <fo:layout-master-set> <fo:simple-page-master margin-right="1.5cm" margin-left="1.5cm" margin-bottom="2cm" margin-top="1cm" page-width="21cm" page-height="29.7cm" master-name="first"> <fo:region-body margin-top="1cm"/> <fo:region-before extent="1cm"/> <fo:region-after extent="1.5cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="first"> <fo:static-content flow-name="xsl-region-before"> <fo:block line-height="14pt" font-size="10pt" text-align="end">Embedding SVG examples - Practise</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <fo:block line-height="14pt" font-size="10pt" text-align="end">Page <fo:page-number/> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block text-align="center" font-weight="bold" font-size="14pt" space-before.optimum="3pt" space-after.optimum="15pt">Embedding SVG</fo:block> <fo:block space-before.optimum="3pt" space-after.optimum="20pt"> <fo:instream-foreign-object> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="542px" height="505px"> <svg:title>A less cute tiger</svg:title> <xsl:for-each select="svg/switch/g/g/path"> <svg:g style="fill: #ffffff; stroke:#000000; stroke-width:0.25"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/switch/g/g/g/path"> <svg:g style="fill: #ffffff; stroke:#000000; stroke-width:0.5; fill-rule=evenodd; clip-rule=evenodd; stroke-linejoin=round"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> </svg:svg> </fo:instream-foreign-object> </fo:block> <fo:block><xsl:apply-templates/></fo:block> </fo:flow> </fo:page-sequence> </fo:root>

    Read the article

< Previous Page | 1 2