Search Results

Search found 939 results on 38 pages for 'william anthony'.

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

  • How'd they do it: Millions of tiles in Terraria

    - by William 'MindWorX' Mariager
    I've been working up a game engine similar to Terraria, mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one time. Creating around 500.000 tiles, that is 1/20th of what's possible in Terraria, in my engine causes the frame-rate to drop from 60 to around 20, even tho I'm still only rendering the tiles in view. Mind you, I'm not doing anything with the tiles, only keeping them in memory. Update: Code added to show how I do things. This is part of a class, which handles the tiles and draws them. I'm guessing the culprit is the "foreach" part, which iterates everything, even empty indexes. ... public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { foreach (Tile tile in this.Tiles) { if (tile != null) { if (tile.Position.X < -this.Offset.X + 32) continue; if (tile.Position.X > -this.Offset.X + 1024 - 48) continue; if (tile.Position.Y < -this.Offset.Y + 32) continue; if (tile.Position.Y > -this.Offset.Y + 768 - 48) continue; tile.Draw(spriteBatch, gameTime); } } } ... Also here is the Tile.Draw method, which could also do with an update, as each Tile uses four calls to the SpriteBatch.Draw method. This is part of my autotiling system, which means drawing each corner depending on neighboring tiles. texture_* are Rectangles, are set once at level creation, not each update. ... public virtual void Draw(SpriteBatch spriteBatch, GameTime gameTime) { if (this.type == TileType.TileSet) { spriteBatch.Draw(this.texture, this.realm.Offset + this.Position, texture_tl, this.BlendColor); spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 0), texture_tr, this.BlendColor); spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(0, 8), texture_bl, this.BlendColor); spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 8), texture_br, this.BlendColor); } } ... Any critique or suggestions to my code is welcome. Update: Solution added. Here's the final Level.Draw method. The Level.TileAt method simply checks the inputted values, to avoid OutOfRange exceptions. ... public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { Int32 startx = (Int32)Math.Floor((-this.Offset.X - 32) / 16); Int32 endx = (Int32)Math.Ceiling((-this.Offset.X + 1024 + 32) / 16); Int32 starty = (Int32)Math.Floor((-this.Offset.Y - 32) / 16); Int32 endy = (Int32)Math.Ceiling((-this.Offset.Y + 768 + 32) / 16); for (Int32 x = startx; x < endx; x += 1) { for (Int32 y = starty; y < endy; y += 1) { Tile tile = this.TileAt(x, y); if (tile != null) tile.Draw(spriteBatch, gameTime); } } } ...

    Read the article

  • Message "Getting information" don't close

    - by William
    I have Windows 7 x64 I installed this software and I have a problem. I like Ubuntu but I feel the softwares related Linux often have problems. We each time need to seek to resolve the malfunctions. my problem is , I am getting a message as Getting information, please wait and it don't disappear. My firewall is completely deactivate and I already go to the UAC or the firewall to allow the "exe" of the Ubuntu One software in the settings. Nothing runs.Linux never run at the first time. I'm really disappointed and discouraged. Please help me. Thank you for your answers... Ps : I have Windows 7 64 bits

    Read the article

  • Windows gets progressively slower over time, why doesn't Ubuntu?

    - by William
    I, and many other previous Windows users notice that the computer seems to get progressively slower over time. I bought a leapfrog crammer only to find it installed process that sat there waiting for me to plug the crammer in so it could run the software. It took up three percent of the CPU twenty-four seven, seven day a week! This is one of the main reasons I left Windows. But, Ubuntu doesn't seem to slow down over time at all. Does Ubuntu allow programs to install background programs like the leapfrog crammer did to sit there like a leech and suck away at resources? Could someone explain why Windows tends to get slower over time, and is Ubuntu vulnrable to this too? Thanks for any help, this is puzzling me.

    Read the article

  • Problem using python QPID and gevent together [closed]

    - by William Payne
    I have a python script that pulls messages from an Apache QPID queue, and then uses gevent to perform (IO-bound) tasks on those messages in parallel. The queue that this script pulls from was recently changed: I suspect the version of the C++ QPID broker changed, although I cannot verify this at the present time. Now, my process deadlocks and hangs upon QPID queue creation. I strongly suspect that this is a result of an incompatibility with gevent, although I have not done the work yet to produce a minimal example to demonstrate the problem. (Next on my list). Does anybody else have experience of getting gevent and QPID to work together? or Has anybody else seen the same issues?

    Read the article

  • Am I violating LSP if the condition can be checked?

    - by William
    This base class for some shapes I have in my game looks like this. Some of the shapes can be resized, some of them can not. private Shape shape; public virtual void SetSizeOfShape(int x, int y) { if (CanResize()){ shape.Width = x; shape.Height = y; } else { throw new Exception("You cannot resize this shape"); } } public virtual bool CanResize() { return true; } In a sub class of a shape that I don't ever want to resize I am overriding the CanResize() method so a piece of client code can check before calling the SetSizeOfShape() method. public override bool CanResize() { return false; } Here's how it might look in my client code: public void DoSomething(Shape s) { if(s.CanResize()){ s.SetSizeOfShape(50, 70); } } Is this violating LSP?

    Read the article

  • Long 'Wait' Time for three php/CSS files. Is something blocking them?

    - by William Pitcher
    I have been speed optimizing a Wordpress site to little effect. There are three files CSS-related php files from the Wordpress theme that are delaying page loads on the site. One of the three files is basically one line of custom CSS from the custom CSS feature in the theme. You can see what I am talking about with this Pingdom speed test: The yellow is 'Wait'. There are no slow items in the cut-off portion of the image. The full results are here: Pingdom Results Page 1. Any thoughts on what might be causing this? I understand that I have blocking CSS or JS files, but I don't see anything that would be causing that long of a wait. When I ran the P3 Plugin Profiler, Wordpress and all plugins appeared fine -- it is the theme that is taking all the time. GTmetrix recommends avoiding dynamic queries. I assume all the ver=3.61 references are to the version of Wordpress (which I am using). I noticed that my Wordpress sites using other themes don't make this query (at least not over and over). 2. Is this typical coding practice? 3. How much negative impact do these query-strings have -- a little or a lot? I tried searching for similar questions here, please excuse me if I missed something. Sometimes, I know just enough to be dangerous.

    Read the article

  • How do I install VirtualBox 4.1?

    - by William
    How to install virtualbox-4.1.4 in ubuntu 11.04 fluently? when apt-get install libqt* unmet dependency. there is a long list of unmet dependency. Where start first and any command to install virtualbox fluently? You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: virtualbox-4.1 : Depends: libcurl3 (>= 7.16.2-1) but it is not going to be installed Depends: libqt4-network (>= 4:4.5.3) but it is not going to be installed Depends: libqt4-opengl (>= 4:4.7.0~rc1) but it is not going to be installed Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed Depends: libqtgui4 (>= 4:4.7.0~beta1) but it is not going to be installed Recommends: libsdl-ttf2.0-0 but it is not going to be installed Recommends: dkms but it is not going to be installed Recommends: libhal1 (>= 0.5) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

    Read the article

  • Leapfrog Crammer won't mount as a USB flash drive

    - by William
    I can't seem to get the Leapfrog Crammer study and sound system to show up as a flash drive under ubuntu so I can transfer stuff to it. I don't want to install the leapfrog bloatware, can someone help me with this? Additional Information: When I plug my crammer into my computer it shows a 1 MB file system with a link to download the crammer software. I want to know how to access the rest of the crammer's file system so I can transfer music to it. The crammer does not show any other partitions in natulius. According to an article on the internet, the crammed is divided into three partitions: One with a link to install the crammer software, one with all content(music, flash cards, etc.) and one for firmware. I want to know how to access the one with the content so I can add music to the player. Can anyone help me with this? Thanks in advance.

    Read the article

  • New Versions of Whitepapers are available

    - by Anthony Shorten
    The set of whitepapers that are available are progressively being updated and republished to reflect new versions of the products as well new advice for existing customers. A number of whitepapers are now available that have been updated (the My Oracle Support Doc Id is indicated): What’s New in Oracle Utilities Application Framework V4 (Doc Id: 1177265.1) -  This has been updated for the latest facilities in Oracle Utilities Application Framework V4.1. Batch Best Practices (Doc Id: 836362.1) – This has been updated for newer advice including more details of how CLUSTERED mode works, how to migrate to CLUSTERED mode and some configuration examples to cover typical configuration scenarios. Oracle Utilities Application Framework Architecture Guidelines (Doc Id: 807068.1) – This has been updated to reflect additional architecture advice. Performance Troubleshooting Guides (Doc Id: 560382.1) – This has been updated for the latest facilities in Oracle Utilities Application Framework V4.1 and includes additional techniques that have been used by customers to track performance. The whitepapers apply to all Oracle Utilities Application Framework Products which at the present time includes: Oracle Utilities Customer Care And Billing (V2.x) Oracle Enterprise Taxation Management (V2.x) Oracle Utilities Business Intelligence (V2.x) Oracle Utilities Meter Data Management (V2.x) Oracle Utilities Mobile Workforce Management (V2.x) Oracle Utilities Smart Grid Gateway (V2.x) Additional whitepapers and updates will be posted as they are available.

    Read the article

  • transfer Thunderbird (17) Profile on Win7 to Ubuntu 12.04

    - by William Curran
    I want to transfer Thunderbird Profile on Win7 to thunderbird (17) Ubuntu 12.04. I already copied the profile folder from Windows to Ubuntu and modified progile.ini on the ubuntu machine to include [Profile] Name=Bill IsRelative=1 Path=(the name of the transfered profile folder) I think the problem is that the Win. TB profile content (files and folder structure) look VERY different that the that of the unbuntu TB profile's that was created on installation. The Ubuntu install is new where as the Win TB has undergone many updates. Seems the system for profile storage has changed drastically. I tried to start TB in safe mode but could't get the path correct to start TB in the terminal with the -safe-mode switch. What can I do? Bill

    Read the article

  • Should I install ia32-libs or lib32stdc++ or can I just use --force-all for 32-bit printer driver

    - by William
    I got a Brother printer MFC class. The brother website only provides 32-bit drivers but I installed 64-bit Ubuntu. It says I need to install "ia32-libs" or "lib32stdc++" to install the 32-bit drivers onto 64-bit Ubuntu. Elsewhere I've read that I don't need to install these packages, I can just use --force-all when installing, but I don't know of the accuracy of this information. My questions: 1) do I HAVE to install "ia32-libs" or "lib32stdc++" or can I use --force-all to make 32-bit drivers install on 64-bit ubuntu? 2) if I do have to install "ia32-libs" or "lib32stdc++", which should I install? Which is better, which is recommended by ubuntu experts?

    Read the article

  • How to install ubuntu 12.04

    - by William A. Jordan
    I've had ubuntu on my pc for about 5 years,after the new 12.04 version and a day and a half trying to get it to just boot up. I will take it off my pc and rely on windows. I have 5 pc's which I built and am not an amateur, After installing it numerous times and even to run it from your webpage (to no avail). Granted I do have nvidia drivers on it, but after I went to their webpage and downloaded and installed the linux driver it,it still would not boot, by the way I took 2 different pc's apart and used what I thought were compatible (I shouldn't have to do this) parts. I have it on a seperate hd which I will remove and format. Have a nice day and so long (2 much trouble).

    Read the article

  • App not showing up in Google Play search on app name [on hold]

    - by William Jockusch
    About 30 hours ago, I released an app on Google Play. I am concerned that if you search on the exact app name, it does not show up in the results, even if you click "show more". https://play.google.com/store/search?q=free+graphing+calculator&c=apps It does show up if you put the name in quotes. But that's awfully low discoverability. https://play.google.com/store/search?q=%22free%20graphing%20calculator%22&c=apps Possibly relevant information: I had an earlier version with a different bundle ID. It was up for just an hour or so, and probably never actually visible to users. How can I fix this?

    Read the article

  • EF Doesn't Like Same Named Tables

    - by Anthony Trudeau
    Originally posted on: http://geekswithblogs.net/tonyt/archive/2013/07/02/153327.aspxIt's another week and another restriction imposed by the Entity Framework (EF). Don't get me wrong. I like EF, but I don't like how it restricts you in different ways. At this point you may be asking yourself the question: how can you have more than one table with the same name?The answer is to have tables in different schemas. I do this to partition the data based on the area of concern. It allows security to be assigned conveniently. A lot of people don't use schemas. I love them. But this article isn't about schemas.In the situation I have two tables:Contact.PersonEmployee.PersonThe first contains the basic, more public information such as the name. The second contains mostly HR specific information. I then mapped these tables to two classes. I stuck to a Table per Class (TPC) mapping, because of problems I've had in the past implementing inheritance with EF. The following code gives you the basic contents of the classes.[Table("Person", Schema = "Employee")]public class Employee {   ...   public int PersonId { get; set; }   [ForeignKey("PersonId")]   public virtual Person Person { get; set; }}[Table("Person", Schema = "Contact")]public class Person {   [Key]   public int Id { get; set; }   ...}This seemingly simple scenario just doesn't work. The problem occurs when you try to add a Person to the DbContext. You get an InvalidOperationException with the following text:The entity types 'Employee' and 'Person' cannot share table 'People' because they are not in the same type hierarchy or do not have a valid one to one foreign key relationship with matching primary keys between them..This is interesting for a couple of reasons. First, there is no People table in my database. Second, I have used the SetInitializer method to stop a database from being created, so it shouldn't be thinking about new tables.The solution to my problem was to change the name of my Employee.Person table. I decided to name it Employee.Employee. It's not ideal, but it gets me past the EF limitation. I hope that this article will help someone else that has the same problem.

    Read the article

  • Xubuntu and other Debian based distros slow

    - by William V
    I have a Compaq Presario SR1950NX desktop computer with the AMD64 3800+ processor and 1GB ram and it seems that Ubunutu, Xubuntu and Lubuntu are all laggy. Things seem to be slow such as clicking on menus and opening programs and the UI renders in peices. When using the browser the system slows down considerably. I ran the TOP command and I do notice that xorg hits 30 to 40 percent cpu when running the browsers. I have tried these distros on a spare P4 machine and it is even worse. As long as I don't have a several things open at one time I can manage to get around although sluggishly. I also notice that I can't get debian based distros to install in 64bit (crtc6 failure) only in 32bit. Can anyone tell me what is it that I might be doing wrong? I have an integrated Nvidia card and have tried several of the recommended drivers which sometimes result in no boot screen upon reboot. Thanks

    Read the article

  • Why does my C++ LinkedList cause a EXC_BAD_ACCESS?

    - by Anthony Glyadchenko
    When I call the cmremoveNode method in my LinkedList from outside code, I get an EXC_BAD_ACCESS. /* * LinkedList.h * Lab 6 * * Created by Anthony Glyadchenko on 3/22/10. * Copyright 2010 __MyCompanyName__. All rights reserved. * */ #include <stdio.h> #include <iostream> #include <fstream> #include <iomanip> using namespace std; class ctNode { friend class ctlinkList ; // friend class allowed to access private data private: string sfileWord ; // used to allocate and store input word int iwordCnt ; // number of word occurrances ctNode* ctpnext ; // point of Type Node, points to next link list element }; class ctlinkList { private: ctNode* ctphead ; // initialized by constructor public: ctlinkList () { ctphead = NULL ; } ctNode* gethead () { return ctphead ; } string cminsertNode (string svalue) { ctNode* ctptmpHead = ctphead ; if ( ctphead == NULL ) { // allocate new and set head ctptmpHead = ctphead = new ctNode ; ctphead -> ctpnext = NULL ; ctphead -> sfileWord = svalue ; } else { //find last ctnode do { if ( ctptmpHead -> ctpnext != NULL ) ctptmpHead = ctptmpHead -> ctpnext ; } while ( ctptmpHead -> ctpnext != NULL ) ; // fall thru found last node ctptmpHead -> ctpnext = new ctNode ; ctptmpHead = ctptmpHead -> ctpnext ; ctptmpHead -> ctpnext = NULL ; ctptmpHead -> sfileWord = svalue ; } return ctptmpHead -> sfileWord ; } string cmreturnNode (string svalue) { return NULL; } string cmremoveNode (string svalue) { if (ctphead == NULL) return NULL; ctNode *tmpHead = ctphead; while (tmpHead->sfileWord != svalue || tmpHead->ctpnext != NULL){ tmpHead = tmpHead->ctpnext; } if (tmpHead == NULL){ return NULL; } else { while (tmpHead != NULL){ tmpHead = tmpHead->ctpnext; } } return tmpHead->sfileWord; } string cmlistList () { string tempList; ctNode *tmpHead = ctphead; if (ctphead == NULL){ return NULL; } else{ while (tmpHead != NULL){ cout << tmpHead->sfileWord << " "; tempList += tmpHead->sfileWord; tmpHead = tmpHead -> ctpnext; } } return tempList; } }; Why is this happening?

    Read the article

  • scrollTo (jQuery) won't work in firefox

    - by William
    For some reason, firefox seems to ignore my scrollTo function even though it works in chrome and safari. Here's an example link: http://blog.rainbird.me/post/2358248459/blowholes-are-awesome Chrome and Safari will automatically scroll to the top of the image (with an offset of 20 pixels) It doesn't work in firefox. I'm baffled! code: $(document).ready(function() { $(".photoShell img").lazyload({ placeholder: "http://william.rainbird.me/boston-polaroid/white.gif", threshold: 200 }); window.viewport = { height: function() { return $(window).height(); }, width: function() { return $(window).width(); }, scrollTop: function() { return $(window).scrollTop(); }, scrollLeft: function() { return $(window).scrollLeft(); } }; $(".photoShell img").hide(); $(".photoShell .caption").hide(); $(".photoShell img").load(function() { var maxWidth = viewport.width() - 40; // Max width for the image if(maxWidth > 960){ maxWidth = 960; } var maxHeight = viewport.height() - 50; // Max height for the image var ratio = 0; // Used for aspect ratio var width = $(this).width(); // Current image width var height = $(this).height(); // Current image height // Check if the current width is larger than the max if(width > maxWidth){ ratio = maxWidth / width; // get ratio for scaling image $(this).css("width", maxWidth); // Set new width $(this).css("height", height * ratio); // Scale height based on ratio height = height * ratio; // Reset height to match scaled image width = width * ratio; // Reset width to match scaled image } // Check if current height is larger than max if(height > maxHeight){ ratio = maxHeight / height; // get ratio for scaling image $(this).css("height", maxHeight); // Set new height $(this).css("width", width * ratio); // Scale width based on ratio width = width * ratio; // Reset width to match scaled image } $(this).parents('div.photoShell').css("width", $(this).width() + 22); $(this).parents('div.photoShell').addClass('loaded'); $(this).next(".caption").show(); var scrollNum = $(this).parents('div.photoShell').offset().top; $.scrollTo(scrollNum - 20, {duration: 700, axis:"y"}); $(this).fadeIn("slow"); }).each(function() { // trigger the load event in case the image has been cached by the browser if(this.complete) $(this).trigger('load'); });

    Read the article

  • ArchBeat Link-o-Rama for 2012-06-29

    - by Bob Rhubart
    Backward-compatible vs. forward-compatible: a tale of two clouds | William Vambenepe "There is the Cloud that provides value by requiring as few changes as possible. And there is the Cloud that provides value by raising the abstraction and operation level," says William Vambenepe. "The backward-compatible Cloud versus the forward-compatible Cloud." Vambenepe was a panelist on the recent ArchBeat podcast Public, Private, and Hybrid Clouds. Andrejus Baranovskis's Blog: ADF 11g PS5 Application with Customized BPM Worklist Task Flow (MDS Seeded Customization) Oracle ACE Director Andrejus Baranovskis investigates "how you can customize a standard BPM Task Flow through MDS Seeded customization." Oracle OpenWorld 2012 Music Festival If, after a day spent in sessions at Oracle Openworld, you want nothing more than to head back to your hotel for a quiet evening spent responding to email, please ignore the rest of this message. Because every night from Sept 30 to Oct 4 the streets of San Francisco will pulsate with music from a vast array of bands representing more musical styles than a single human brain an comprehend. It's the first ever Oracle Music Festival, baby, 7:00pm to 1:00am every night. Are those emails that important...? Resource Kit: Oracle Exadata - includes demos, videos, product datasheets, and technical white papers. This free resource kit includes several customer case study videos, two 3D product demos, several product datasheets, and three technical architecture white papers. Registration is required for the who don't already have a free Oracle.com membership account. Some execs contemplate making 'Bring Your Own Device' mandatory | ZDNet "Companies and agencies are recognizing that individual employees are doing a better job of handling and managing their devices than their harried and overworked IT departments – who need to focus on bigger priorities, such as analytics and cloud," says ZDNet SOA blogger Joe McKendrick. Podcast Show Notes: Public, Private, and Hybrid Clouds All three parts of this discussion are now available. Featuring a panel of leading Oracle cloud computing experts, including Dr. James Baty, Mark T. Nelson, Ajay Srivastava, and William Vambenepe, the discussion covers an overview of the various flavors of cloud computing, the importance of standards, Why cloud computing is a paradigm shift—and why it isn't, and advice on what architects need to know to take advantage of the cloud. And for those who prefer reading to listening, a complete transcript is also available. Amazon AMIs and Oracle VM templates (Cloud Migrations) Cloud migration expert Tom Laszewski shares an objective comparison of these two resources. IOUC : Blogs : Read the latest news on the global user group community - June 2012! The June 2012 edition of "Are You a Member Yet?"—the quarterly newsletter about Oracle user group communities around the world. Webcast: Introducing Identity Management 11g R2 - July 19 Date: Thursday, July 19, 2012 Time: 10am PT / 1pm ET Please join Oracle and customer executives for the launch of Oracle Identity Management 11g R2, the breakthrough technology that dramatically expands the reach of identity management to cloud and mobile environments. Thought for the Day "The most important single aspect of software development is to be clear about what you are trying to build." — Bjarne Stroustrup Source: SoftwareQuotes.com

    Read the article

  • How do I Handle Ties When Ranking Results in MySQL?

    - by Laxmidi
    Hi, How does one handle ties when ranking results in a mysql query? I've simplified the table names and columns in this example, but it should illustrate my problem: SET @rank=0; SELECT student_names.students, @rank := @rank +1 AS rank, scores.grades FROM student_names LEFT JOIN scores ON student_names.students = scores.students ORDER BY scores.grades DESC So imagine the the above query produces: Students Rank Grades Al 1 90 Amy 2 90 George 3 78 Bob 4 73 Mary 5 NULL William 6 NULL Even though Al and Amy have the same grade, one is ranked higher than the other. Amy got ripped-off. How can I make it so that Amy and Al have the same ranking, so that they both have a rank of 1. Also, William and Mary didn't take the test. They bagged class and were smoking in the boy's room. They should be tied for last place. The correct ranking should be: Students Rank Grades Al 1 90 Amy 1 90 George 3 78 Bob 4 73 Mary 5 NULL William 5 NULL If anyone has any advice, please let me know. Thank you! -Laxmidi

    Read the article

  • Why does my C++ LinkedList method print out the last word more than once?

    - by Anthony Glyadchenko
    When I call the cmremoveNode method in my LinkedList from outside code, I get an EXC_BAD_ACCESS. FIXED: But now the last word using the following test code gets repeated twice: #include <iostream> #include "LinkedList.h" using namespace std; int main (int argc, char * const argv[]) { ctlinkList linkMe; linkMe.cminsertNode("The"); linkMe.cminsertNode("Cat"); linkMe.cminsertNode("Dog"); linkMe.cminsertNode("Cow"); linkMe.cminsertNode("Ran"); linkMe.cminsertNode("Pig"); linkMe.cminsertNode("Away"); linkMe.cmlistList(); cout << endl; linkMe.cmremoveNode("The"); linkMe.cmremoveNode("Cow"); linkMe.cmremoveNode("Away"); linkMe.cmlistList(); return 0; } LinkedList code: /* * LinkedList.h * Lab 6 * * Created by Anthony Glyadchenko on 3/22/10. * Copyright 2010 __MyCompanyName__. All rights reserved. * */ #include <stdio.h> #include <iostream> #include <fstream> #include <iomanip> using namespace std; class ctNode { friend class ctlinkList ; // friend class allowed to access private data private: string sfileWord ; // used to allocate and store input word int iwordCnt ; // number of word occurrances ctNode* ctpnext ; // point of Type Node, points to next link list element }; class ctlinkList { private: ctNode* ctphead ; // initialized by constructor public: ctlinkList () { ctphead = NULL ; } ctNode* gethead () { return ctphead ; } string cminsertNode (string svalue) { ctNode* ctptmpHead = ctphead ; if ( ctphead == NULL ) { // allocate new and set head ctptmpHead = ctphead = new ctNode ; ctphead -> ctpnext = NULL ; ctphead -> sfileWord = svalue ; } else { //find last ctnode do { if ( ctptmpHead -> ctpnext != NULL ) ctptmpHead = ctptmpHead -> ctpnext ; } while ( ctptmpHead -> ctpnext != NULL ) ; // fall thru found last node ctptmpHead -> ctpnext = new ctNode ; ctptmpHead = ctptmpHead -> ctpnext ; ctptmpHead -> ctpnext = NULL; ctptmpHead -> sfileWord = svalue ; } return ctptmpHead -> sfileWord ; } string cmreturnNode (string svalue) { return NULL; } string cmremoveNode (string svalue) { int counter = 0; ctNode *tmpHead = ctphead; if (ctphead == NULL) return NULL; while (tmpHead->sfileWord != svalue && tmpHead->ctpnext != NULL){ tmpHead = tmpHead->ctpnext; counter++; } do{ tmpHead->sfileWord = tmpHead->ctpnext->sfileWord; tmpHead = tmpHead->ctpnext; } while (tmpHead->ctpnext != NULL); return tmpHead->sfileWord; } string cmlistList () { string tempList; ctNode *tmpHead = ctphead; if (ctphead == NULL){ return NULL; } else{ while (tmpHead != NULL){ cout << tmpHead->sfileWord << " "; tempList += tmpHead->sfileWord; tmpHead = tmpHead -> ctpnext; } } return tempList; } }; Why is this happening?

    Read the article

  • Why is my Pre to Postfix code not working?

    - by Anthony Glyadchenko
    For a class assignment, I have to use two stacks in C++ to make an equation to be converted to its left to right equivalent: 2+4*(3+4*8) -- 35*4+2 -- 142 Here is the main code: #include <iostream> #include <cstring> #include "ctStack.h" using namespace std; int main (int argc, char * const argv[]) { string expression = "2+4*2"; ctstack *output = new ctstack(expression.length()); ctstack *stack = new ctstack(expression.length()); bool previousIsANum = false; for(int i = 0; i < expression.length(); i++){ switch (expression[i]){ case '(': previousIsANum = false; stack->cmstackPush(expression[i]); break; case ')': previousIsANum = false; char x; while (x != '('){ stack->cmstackPop(x); output->cmstackPush(x); } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': cout << "A number" << endl; previousIsANum = true; output->cmstackPush(expression[i]); break; case '+': previousIsANum = false; cout << "+" << endl; break; case '-': previousIsANum = false; cout << "-" << endl; break; case '*': previousIsANum = false; cout << "*" << endl; break; case '/': previousIsANum = false; cout << "/" << endl; break; default: break; } } char i = ' '; while (stack->ltopOfStack > 0){ stack->cmstackPop(i); output->cmstackPush(i); cout << i << endl; } return 0; } Here is the stack code (watch out!): #include <cstdio> #include <assert.h> #include <new.h> #include <stdlib.h> #include <iostream> class ctstack { private: long* lpstack ; // the stack itself long ltrue ; // constructor sets to 1 long lfalse ; // constructor sets to 0 // offset to top of the stack long lmaxEleInStack ; // maximum possible elements of stack public: long ltopOfStack ; ctstack ( long lnbrOfEleToAllocInStack ) { // Constructor lfalse = 0 ; // set to zero ltrue = 1 ; // set to one assert ( lnbrOfEleToAllocInStack > 0 ) ; // assure positive argument ltopOfStack = -1 ; // ltopOfStack is really an index lmaxEleInStack = lnbrOfEleToAllocInStack ; // set lmaxEleInStack to max ele lpstack = new long [ lmaxEleInStack ] ; // allocate stack assert ( lpstack ) ; // assure new succeeded } ~ctstack ( ) { // Destructor delete [ ] lpstack ; // Delete the stack itself } ctstack& operator= ( const ctstack& ctoriginStack) { // Assignment if ( this == &ctoriginStack ) // verify x not assigned to x return *this ; if ( this -> lmaxEleInStack < ctoriginStack . lmaxEleInStack ) { // if destination stack is smaller than delete [ ] this -> lpstack ; // original stack, delete dest and alloc this -> lpstack = // sufficient memory new long [ ctoriginStack . lmaxEleInStack ] ; assert ( this -> lpstack ) ; // assure new succeeded // reset stack size attribute this -> lmaxEleInStack = ctoriginStack . lmaxEleInStack ; } // copy original to destination stack for ( long i = 0 ; i < ctoriginStack . lmaxEleInStack ; i ++ ) *( this -> lpstack + i ) = *( ctoriginStack . lpstack + i ) ; this -> ltopOfStack = ctoriginStack . ltopOfStack ; // reset stack position attribute return *this ; } long cmstackPush (char lplaceInStack ) { // Push Method if ( ltopOfStack == lmaxEleInStack - 1 ) // stack is full can't add element return lfalse ; ltopOfStack ++ ; // acquire free slot *(lpstack + ltopOfStack ) = lplaceInStack ; // add element return ltrue ; // any number other than zero is true } long cmstackPop (char& lretrievedStackEle ) { // Pop Method if ( ltopOfStack < 0 ) { // stack has no elements lretrievedStackEle = -1 ; // dummy element return lfalse ; } lretrievedStackEle = *( lpstack + ltopOfStack ) ; // stack has element -- return it ltopOfStack -- ; // stack is pop'd return ltrue ; // any number other than zero is true } long cmstackLookAtTop (char& lretrievedStackEle ) { // Pop Method if ( ltopOfStack < 0 ) { // stack has no elements lretrievedStackEle = -1 ; // dummy element return lfalse ; } lretrievedStackEle = *( lpstack + ltopOfStack ) ; // stack has element -- return it return ltrue ; // any number other than zero is true } long cmstackHasAnEle (char& lretrievedTopOfStack ) { // Has element method lretrievedTopOfStack = ltopOfStack ; return ltopOfStack < 0 ? lfalse : ltrue ; // 0 - false stack does not have any ele } // 1 - true stack has at least one element long cmstackMaxNbrOfEle (char& lretrievedMaxStackEle ) { // Maximum element method lretrievedMaxStackEle = lmaxEleInStack ; // return stack size in reference var return ltrue ; // Return Maximum Size of Stack } } ; Thanks, Anthony.

    Read the article

  • links for 2010-05-04

    - by Bob Rhubart
    IdMapper: A Java Application for ID Mapping across Multiple Cross-Referencing Providers H/T to Geertjan for posting a link to this paper on a Netbeans-based project. (tags: java netbeans) Mastering Your Multicore System - Oracle Solaris Video How Sun Studio compilers and tools can simplify these challenges and enable you to fully unlock the potential in multicore architecture. Don Kretsch presents at Tech Days, Brazil, 2009. (tags: oracle sun sunstudio multicore video) Allison Dixon: COLLABORATE: OAUG Staff #c10 ORACLENERD guest blogger Allison Dixon offers a peek behind the curtain and a tip of the hat to the people behind Collaborate 10. (tags: oracle oaug ioug collaborate2010) @myfear: Java EE 5 or 6 - which to choose today Author, software architect, and Oracle ACE Director Markus Eisele shares his insight into the choice between Java EE versions. (tags: oracle otn java oracleace glassfish) @blueadept61: Architecture and Agility #entarch In yet another great, succinct post, Oracle ACE Director Mike Van Alst offers more quotable wisdom than I can share here. Read the whole thing. (tags: oracle otn entarch enterprisearchitecture agile) @blueadept61: Governance Causes SOA Projects to Fail? Oracle ACE Director Mike Van Alst's short but thought-provoking post raises issues of language and perception in dealing with the cultural hurdles to SOA Governance. (tags: oracle otn soa soagovernance communication) Anthony Shorten: List of available whitepapers as of 04 May 2010 Anthony Shorten shares a list of whitepapers available from My Oracle Support covering Oracle Utilities Application Framework based products. (tags: oracle otn whitepapers frameworks documentation) @processautomate: SOA Governance is Not a Documentation Exercise Leonardo Consulting SOA specialist Mervin Chiang proposes that simply considering and applying basic SOA governance -- service management -- can go a long way. (tags: otn oracle soa soagovernance) Article: Cloud Computing Capability Reference Model This Cloud Computing Capability Reference Model provides a functional view of the layers in a typical cloud stack to help Enterprise Architects identify the components necessary to implement Cloud solutions. (tags: oracle otn cloud entarch soa virtualization)

    Read the article

  • links for 2010-05-19

    - by Bob Rhubart
    Presentations from #otnarchday in Dallas now available on Slideshare Includes presentations on IT Optimization, Application Integration Architecture, Application Grid, and Infrastructure Consolidation. More to come. Anthony Shorten: JMX Based Monitoring - Part Four - Business App Server Monitoring Anthony Shorten discuss a new Oracle Utilities Application Framework V4 feature that allows JMX to be used for management and monitoring the Oracle Utilities business application server component. (tags: oracle otn java architect) New book: Oracle Coherence 3.5 An overview of the new book by authors Aleksandar Seovic, Mark Falco, Patrick Peralta. (tags: oracle otn grid architect) Douwe Pieter van den Bos: Next step in Virtualization: VirtualBox 3.2 "For businesses, VirtualBox just might be the answer they where looking for," says Douwe Pieter van den Bos. "A simple and widely supported virtual machine." (tags: oracle otn virtualization architect) Maurice Gamanho: Python and Ruby in Tuxedo Maurice Gamanho's quick overview of new features in Oracle's Service Architecture Leveraging Tuxedo (SALT) 11gR1. (tags: oracle otn soa architect) Live Webcast: Oracle and AmberPoint - May 20, 2010 - 10 a.m. PT/1 p.m. ET Ed Horst and Ashish Mohindroo discuss the advantages of the Oracle and AmberPoint combination. (tags: oracle otn architect soa governance)

    Read the article

  • links for 2011-03-04

    - by Bob Rhubart
    Joao Oliveira: Forms and Reports 11g Fusion Startup Script "After Fusion Middleware 11g Linux installation (Weblogic, Forms, Reports, Discoverer and Portal or others) probably most of the newcomers will wonder how to create a startup script to start the Weblogic managed Servers when the server starts up or reboots." (tags: oracle fusionmiddleware weblogic) Anthony Shorten: SOA Suite Integration: Part 3: Loading files Anthony says: "One of the most common scenarios in SOA Integration is the loading of a file into the product from an external source. In Oracle SOA Suite there is a File Adapter that can process many file types into your BPEL process." (tags: oracle otn soa soasuite) Francisco Munoz Alvarez: Playing with Oracle 11gR2, OEL 5.6 and VirtualBox 4.0.2 (1st Part) Oracle ACE Francisco Munoz Alvarez kicks off a tutorial on creating an Oracle Database 11gR2 instance using Oracle VirtualBox and OEL. (tags: oracle database virtualbox virtualization) ORACLENERD: VirtualBox and Shared Folders Oracle ACE Chet Justice shares some tips. (tags: oracle otn oracleace virtualization virtualbox) Chris Muir: Check out the ADF content at this year's ODTUG KScope11 conference Oracle ACE Director Chris Muir shares information on this year's ODTUD Kaleidoscope event in Long Beach, CA, June 26-30. (tags: oracle otn oracleace odtug adf) Edwin Biemond: Setting a virtual IP on a specific Network interface with WebLogic 10.3.4 PS3 Edwin says: "If you want High Availability in WebLogic you need to enable the WebLogic server migration, configure the nodemanager, use a virtual / floating IP in your managed servers and channels." (tags: oracle otn oracleace highavailability weblogic virtualization) Markus Eisele: High Performance JPA with GlassFish and Coherence - Part 3 Markus says: "In this third part of my four part series I'll explain strategy number two of using Coherence with EclipseLink and GlassFish. This is all about using Coherence as Second Level Cache (L2) with EclipseLink." (tags: oracle otn oracleace glassfish coherence) Michel Schildmeijer: Set Oracle ESB montoring with Enterprise Manager Grid Control "Monitoring your Oracle SOA Suite environment...can be very complicated, but if you are using Grid Control, Oracle provides you the SOA Management Pack. Unfortunately this SOA Management Pack has pretty detailed OOTB info about BPEL, but for ESB you won’t find any OOTB metrics." (tags: oracle otn soa grid servicebus)

    Read the article

  • links for 2010-05-11

    - by Bob Rhubart
    Fat Bloke: Oracle VM VirtualBox 3.1.8 released! "Supporting new platforms such as Ubuntu 10.04 (Lucid Lynx) and delivering a host of bugfixes, VirtualBox 3.1.8 is available now from the usual places, " says the Fat Bloke. (tags: oracle otn virtualization linux) Anthony Shorten: What is the Oracle Utilities Application Framework? "The Oracle Utilities Application Framework is a reusable, scalable and flexible java based framework which allows other products to be built, configured and implemented in a standard way," according to Anthony Shorten (tags: oracle otn framework java standards) Audio podcast: Oracle WebLogic Suite Virtualization Option (Application Grid) "Steve Harris, Senior Vice President of application server and Java Platform, Enterprise Edition development, talks about running Oracle WebLogic Server on Oracle JRockit Virtual Edition. Listen here to learn how you can run faster and more efficiently without a guest operating system on Oracle VM." (tags: oracle otn grid wweblogic podcast virtualization) MySQL Community Blog: MySQL track with free event at Kaleidoscope 2010 "The even greater news," writes Giuseppe Maxia, "is that, in addition to the general schedule, there are SUNDOWN SESSIONS!" (tags: java sun oracle mysql) @SOAtoday: Will Cloudsourcing Change the Face of Consulting? "Will we all be working remotely to deliver our client projects going forward? Maybe someday, but not anytime soon." -- Oracle ACE Director Jordan Braunstein (tags: oracle otn oracleace cloudcomputing entarch) @SOAtoday: Are we Paid to Say No? "Software architects take their governance initiatives seriously, and I can say with a high level of confidence that most of these denials are highly justified. But, have we architects lost our entrepreneurial spirit, with governance as our defense? Are we over-scrutinizing new ideas and slowing down pilots of innovation because they don’t align with our governance policies and enterprise frameworks?" -- Oracle ACE Director Jordan Braunstein (tags: architect entarch oracle otn soa)

    Read the article

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