Search Results

Search found 21003 results on 841 pages for 'spell check'.

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

  • How to check Early Z efficiency on AMD GPU with Windows 7

    - by Suma
    I have a game using DirectX 9, and a development station using Win 7 x64. I am still able to get access to another station with Vista x64 / dual booted with WinXP x86. I wanted to check early Z efficiency in the game and to my sadness all tools I have tried seem to be unable to perform this task: AMD PerfStudio AMD GPUPerfStudio 2 does not support DirectX 9 at all AMD GPUPerfStudio 1.2 does not install correctly on Windows 7. When I have tweaked the MSI package (a simple OS version check adjustment was needed), it complained the drivers I have do not provide needed instrumentation. The drivers old enough to support the GPUPerfStudio would most likely not be able to operate with my Radeon 5750 card (though this is something I am not 100 % sure, I did not attempt to try any older drivers, not knowing which I should look for) PIX PIX does not seem to contain any counters like this. It offers some ATI specific counters, but when I try to activate them, the PIX reports "PIX encountered a problem while attaching to the target program." I do not want to upgrade to DX 10/11 just to be able to profile the game, but it seems without the step I am somewhat locked with a toolset which is no longer supported. I see only one obvious options which would probably work, and that is using WinXP (or with a little bit of luck even Vista) station, perhaps with some older AMD card, to make sure GPUPerfStudio 1.2 works. Other than that, can anyone recommend other options how to check GPU HW counters (HiZ / EarlyZ in particular, but if others would be enabled as well, it would be a nice bonus) for a DirectX 9 game on Windows 7, preferably on AMD GPU? (If that is not possible, I would definitely prefer switching GPU to switching the OS, but before I do so I would like to know if I will not hit the same problem with nVidia again)

    Read the article

  • Brother MFC-J470DW scan function "Check Connection"

    - by user292599
    I have a Brother MFC-J470DW printer that I have connected to a Linux desktop (running Ubuntu 14.04) using a wireless router network. The printer works fine for printing and copying, but now I want to add the scan function. To set up the scan function, I went to the Brother web page for this printer: http://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=mfcj470dw_us_eu_as&os=128 and under Scanner Drivers selected "Scanner driver 64bit (deb package)", "Scan-key-tool 64bit (deb package)", and "Scanner Setting file (deb package)". For each package, I clicked the EULA, and selected "open with Ubuntu Software Center". Then after the USC window pops up, I click on Install and the red line goes from left to right. In each case, the USC window then had a green checkmark and the Install box changes to Reinstall (that's how you know it worked). So now I try it out. Hitting the Scan button on the printer, selecting "Scan to file", and hitting ok produces the message "Check Connection". I checked the Brother Linux Information FAQ (scanner) page and the 14th question seems the same as mine: When I try to use the scan key on my network connected machine, I receive the error "Check connection" or I can not select anything except "scan to FTP". I explored the solution given for this FAQ, but found from ifconfig that I am already using eth0, the default setting, so presumably that is not the problem. I also found brscan-skey installed in /usr/bin and did drrm@drrmlinux2:~$ brscan-skey -t drrm@drrmlinux2:~$ brscan-skey but that didn't help - I still get the "Check connection" message. What can you suggest to fix this problem?

    Read the article

  • MS Word custom dictionary making spellcheck slow - ideas?

    - by ezuk
    I have a user who edits technical materials. She uses MS Word's Custom Dictionary all the time for spelling; it has grown very large, and is now making spell check very slow. All of the advice I've read online says to disable the custom dictionary. This is an easy solution, but is not workable for the user, because she actually needs this dictionary. So, is there any way to optimize the custom dictionary and/or Word itself, so that a large dictionary file doesn't slow things down quite so badly? Many thanks. Update after suggestions: I ran contig on the file, and it reports just 1 frag, so that's not the issue I think. The file is 9.95KB -- 1,117 lines, each consisting of just a single word. I viewed the file using Notepad and none of the lines seems corrupted, strange, or overly long (no line seems to be over 10 chars or so). Both of your suggestions were helpful so I will upvote both; any further tips would be most welcome.

    Read the article

  • Quick note from JavaOne … check my twitter feed

    - by terrencebarr
    Just a quick note from JavaOne … excellent response to Oracle’s embedded Java announcements and strategy. Our DEMOGround booth is always busy – people want to learn more about Oracle Java ME Embedded 3.2, see it in action. Today’s keynote for the Java Embedded @ JavaOne sub conference was excellent – full house, great line up of partners and content. Haven’t had time to blog, but been tweeting about the latest news around embedded Java – be sure to monitor @terrencebarr. And check my last blog for embedded Java highlights. Oh, and check this latest summary on blogs.oracle.com “Huge Opportunity in Small Things” Cheers, – Terrence Filed under: Mobile & Embedded Tagged: "Oracle Java ME Embedded", embedded, Embedded Java, Java Embedded @ JavaOne, JavaOne

    Read the article

  • Ubuntu 12.04 64 bit doesn't work on a win7 with check point full disk encryption

    - by Victor Rodriguez
    I installed Ubuntu 12.04 64 bit with the Wubi installer on a Windows 7 with Check Point Full Disk Encryption. The Wubi Installer runs without any trouble selecting the compatibility mode with WinXP and as Administrator. The problem is that after the installation is complete and the reboot done, when you restart the system, there's no option to start Ubuntu instead of Windows. I recently installed Ubuntu on other Win7 machines without any problem. But those laptops don't have the Check Point Full Disk Encryption. And when you restart the system you have the option to start in Ubuntu. If somebody has resolved this issue please share...!!! Regards! Víctor

    Read the article

  • Tor check failed though Vidalia shows green onion

    - by Wolter Hellmund
    I have installed tor successfully and Vidalia shows it is running without problems; however, when I check if I am using tor in this website I get an error message saying I am not using tor. I have tried two things to fix this: I installed ProxySwitchy on Google Chrome, and created a profile for Tor (with address 127.0.0.1, port 8118), but enabling the proxy doesn't change the results in the tor check website linked before. I changed my network proxy settings through System Settings Network from None to Manual, and selected as address always 127.0.0.1 and as port 8118 for all but for the socket, for which I entered 9050 instead. This makes internet stop working completely. How can I fix this problem?

    Read the article

  • SQL SERVER – Check If Column Exists in SQL Server Table

    - by Pinal Dave
    A very frequent task among SQL developers is to check if any specific column exists in the database table or not. Based on the output developers perform various tasks. Here are couple of simple tricks which you can use to check if column exists in your database table or not. Method 1 IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'columnName' AND OBJECT_ID = OBJECT_ID(N'tableName')) BEGIN PRINT 'Your Column Exists' END   For AdventureWorks sample database IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'Name' AND OBJECT_ID = OBJECT_ID(N'[HumanResources].[Department]')) BEGIN PRINT 'Your Column Exists' END   Method 2 IF COL_LENGTH('table_name','column_name') IS NOT NULL BEGIN PRINT 'Your Column Exists' END For AdventureWorks sample database IF COL_LENGTH('[HumanResources].[Department]','Name') IS NOT NULL BEGIN PRINT 'Your Column Exists' END Method 3 IF EXISTS( SELECT TOP 1 * FROM INFORMATION_SCHEMA.COLUMNS WHERE [TABLE_NAME] = 'TableName' AND [COLUMN_NAME] = 'ColumnName' AND [TABLE_SCHEMA] = 'SchemaName') BEGIN PRINT 'Your Column Exists' END For AdventureWorks sample database IF EXISTS( SELECT TOP 1 * FROM INFORMATION_SCHEMA.COLUMNS WHERE [TABLE_NAME] = 'Department' AND [COLUMN_NAME] = 'Name' AND [TABLE_SCHEMA] = 'HumanResources') BEGIN PRINT 'Your Column Exists' END Let me know if you know any other method to find if Column Exists in SQL Server Table. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Keeping Entitlements in Check

    - by Naresh Persaud
    Thanks for going the webcast on keeping entitlements in check. As a follow up, I have attached the slides to the webcast. The webcast will be available on demand shortly via IOUG.   A few key takeaways: Application security means applying both preventive and detective controls. Audit and security groups need the combination of both access certification and runtime dynamic authorization. Today, security policy is largely fragmented and brittle to change. The result is audit exposure for highly regulated applications.  By addressing the entire value chain of application security with a comprehensive platform approach, organizations can reduce the risk and improve compliance.    Ioug webcast entitlements in check View more PowerPoint from OracleIDM

    Read the article

  • Check for Instant File Initialization

    - by TiborKaraszi
    Instant File initialization, IFI, is generally a good thing to have. Check out this earlier blog post of mine f you don't know what IFI is and why it is a good thing: blog . The purpose of this blog post is to provide a simple script you can use to check if you have IFI turned on. Note that the script below uses undocumented commands, and might take a while if you have a large errorlog file... USE MASTER ; SET NOCOUNT ON -- *** WARNING: Undocumented commands used in this script !!! *** -- --Exit...(read more)

    Read the article

  • Spell Check in IE

    - by Prashant
    In Firefox, if a user enters words which have spelling mistakes, the browser puts a line below the word indicating a spelling mistake. How can the same be accomplished in IE ? Any ideas ?

    Read the article

  • NHunspell Spell

    - by mouthpiec
    Hi, Can someone explain the letters after the '/' mean? The example below show an extract of the dictionary accessory/SM access/SDMG accidence/M accidentalness/M accidental/SPY accident/MS acclaimer/M acclaim/SDRG acclamation/MS acclimate/XSDGN acclimation/M acclimatisation

    Read the article

  • How to check if String value is Boolean type in Java?

    - by Ragnar
    I did a little search on this but couldn't find anything useful. The point being that if String value is either "true" or "false" the return value should be true. In every other value it should be false. I tried these: String value = "false"; System.out.println("test1: " + Boolean.parseBoolean(value)); System.out.println("test2: " + Boolean.valueOf(value)); System.out.println("test3: " + Boolean.getBoolean(value)); All functions returned false :(

    Read the article

  • The 35 Best Tips and Tricks for Maintaining Your Windows PC

    - by Lori Kaufman
    When working (or playing) on your computer, you probably don’t think much about how you are going to clean up your files, backup your data, keep your system virus free, etc. However, these are tasks that need attention. We’ve published useful article about different aspects of maintaining your computer. Below is a list our most useful articles about maintaining your computer, operating system, software, and data. HTG Explains: Learn How Websites Are Tracking You Online Here’s How to Download Windows 8 Release Preview Right Now HTG Explains: Why Linux Doesn’t Need Defragmenting

    Read the article

  • Failed to download repository information Check your Internet connection

    - by Luca Brazza
    I need to check if I have updates for Ubuntu. I think it is 11.05 As you can see this is what it says: Failed to download repository information Check your Internet connection. Details: W:Failed to fetch cdrom://Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)/dists/precise/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)/dists/precise/restricted/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)/dists/precise/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)/dists/precise/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/precise/main/source/Sources 404 Not Found , W:Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found , E:Some index files failed to download. They have been ignored, or old ones used instead.

    Read the article

  • Having to check collisions twice per game tic

    - by user22241
    I have vertically moving elevators (3 solid tiles wide) and static solid tiles. Each are separate entities and therefore have their own respective collision routines (to check for, and resolve, collisions with the main character) I check my vertical collisions after characters vertical movements and then horizontal collisions after horizontal movements. The problem is that I want my platform to kill the player if it squashes him from the top, and also if he's on a moving platform (that is moving up) that squashes him into a solid block. Correct behaviour, player on solid blocks being squashed from above by decending elevator Here is what happens. Gravity pushes character into solid block, solid block collision routine corrects characters position and sits him on the solid block which pushes him into the moving elevator, elevator routine then checks for collision and kills player. This assumes I am checking solid blocks first, then elevator collisions. However, if it's the other way around, this happens.... Incorrect behaviour, player on accending elevator gets pushed into solid blocks above Player is on an elevator moving up, gravity pushes him into the elevator, solid block CD routine detects no collision, no action taken. Elevator CD routine detects character has been pushed into elevator by gravity, corrects this by moving character up and sitting him on the elevator and pushes him into the solid blocks above, however the solid block vertical routine has now already run for this tic, so the game continues and the next solid block collision that is encountered is the horizontal routine. This detects a collision and moves the character out of the collision to the left or right of the block which looks odd to say the least (character should get killed here). The only way I've managed to get this working correctly is by running the solid block CD, then the elevator CD, then the solid block CD again straight after. This is clearly wasteful but I can't figure out how else to do this. Any help would be appreciated.

    Read the article

  • Help Creating a Google Analytics Funnel for Check out process

    - by Drew
    have a funnel question. I am currently working on tracking (through GA) guest and logged in member activity once they get to my sites shopping cart. But need help with setting up funnels. Specifically to see; Total sales Logged in member total sales List item Guest member sales The urls associated to the check out proces are: Logged in members /cart (arriving to checkout) /checkout (checking out as a logged in member) /checkout/confirmation (thank you - confirmed sale) Guest members - /cart (arriving to checkout) - /checkout-guest (checking out as a guest) - /checkout/confirmation (thanks you - confirmed sale) I've tested the funnels set up for the above with 9 transactions. But the end maths doesn't seem to line up. Total sales funnel shows 9 completed transactions when only tracking these to urls: - /cart - /checkout/confirmation Which is great - cause it's working Logged in member sales show a total of 9 completed transactions based on each step of the logged in url steps (above) being tracked in a funnel. Not good because this number should be 3. Guest check out funnel (see guest steps above) shows 9 as well. What the?!?!?!? The results I am looking for should reflect the following - total sales = 9, logged in members = 3, guest members = 6 Is there any way to set these urls up so that the funnels report the correct results - or do I need to changed the urls and provide logged in members and guest stand alone purchase confirmation pages (this would mean I can not track total sales which combine results from both streams)? Any knowledge in this area is welcome. Thanks.

    Read the article

  • How To Check If a Transaction Related to Oracle Asset Tracking Has Been Accounted in SLA

    - by LuciaC-Oracle
    In Oracle Asset Tracking (OAT), we often see situations where a pending transaction has failed to be processed by the OAT programs. Typical situations can be: a pending transaction errors with "Unable to derive accounts from sub ledger accounting for the material transaction" a transaction is not picked by OAT programs. The Create Accounting program log file will show error messages and possible corrective actions to solve the error.  But as this is usually a scheduled program, often any errors that are reported are missed by users. To aid OAT users to identify if a transaction has failed and accounting has not been created, we have now created a SQL script which can be run for any pending transaction: How To Check If a Transaction Related to Oracle Asset Tracking Has Been Accounted in SLA ? (Doc ID 1673414.1)Using the script in this note, the user can pass the material transaction ID for the related transaction and the script will check if SLA accounting entries have been created for this specific transaction or not.If the SLA accounting entries have not been created, the script will prompt the user to run Create Accounting program.  After Create Accounting has been run, the user can run the script again to confirm that accounting has been created.

    Read the article

  • Java - Using Linear Coordinates to Check Against AI [closed]

    - by Oliver Jones
    I'm working on some artificial intelligence, and I want my AI not to run into given coordinates as these are references of a wall/boundary. To begin with, every time my AI hits a wall, it makes a reference to that position (x,y). When it hits the same wall three times, it uses linear check points to 'imagine' there is a wall going through these coordinates. I want to now prevent my AI from going into that wall again. To detect if my coordinates make a straight line, i use: private boolean collinear(double x1, double y1, double x2, double y2, double x3, double y3) { return (y1 - y2) * (x1 - x3) == (y1 - y3) * (x1 - x2); } This returns true is the given points are linear to one another. So my problems are: How do I determine whether my robot is approaching the wall from its current trajectory? Instead of Java 'imagining' theres a line from 1, to 3. But to 'imagine' a line all the way through these linear coordinantes, until infinity (or close). I have a feeling this is going to require some confusing trigonometry? (REPOST: http://stackoverflow.com/questions/13542592/java-using-linear-coordinates-to-check-against-ai)

    Read the article

  • Header Guard Issues - Getting Swallowed Alive

    - by gjnave
    I'm totally at wit's end: I can't figure out how my dependency issues. I've read countless posts and blogs and reworked my code so many times that I can't even remember what almost worked and what didnt. I continually get not only redefinition errors, but class not defined errors. I rework the header guards and remove some errors simply to find others. I somehow got everything down to one error but then even that got broke while trying to fix it. Would you please help me figure out the problem? card.cpp #include <iostream> #include <cctype> #include "card.h" using namespace std; // ====DECL====== Card::Card() { abilities = 0; flavorText = 0; keywords = 0; artifact = 0; classType = new char[strlen("Card") + 1]; classType = "Card"; } Card::~Card (){ delete name; delete abilities; delete flavorText; artifact = NULL; } // ------------ Card::Card(const Card & to_copy) { name = new char[strlen(to_copy.name) +1]; // creating dynamic array strcpy(to_copy.name, name); type = to_copy.type; color = to_copy.color; manaCost = to_copy.manaCost; abilities = new char[strlen(to_copy.abilities) +1]; strcpy(abilities, to_copy.abilities); flavorText = new char[strlen(to_copy.flavorText) +1]; strcpy(flavorText, to_copy.flavorText); keywords = new char[strlen(to_copy.keywords) +1]; strcpy(keywords, to_copy.keywords); inPlay = to_copy.inPlay; tapped = to_copy.tapped; enchanted = to_copy.enchanted; cursed = to_copy.cursed; if (to_copy.type != ARTIFACT) artifact = to_copy.artifact; } // ====DECL===== int Card::equipArtifact(Artifact* to_equip){ artifact = to_equip; } Artifact * Card::unequipArtifact(Card * unequip_from){ Artifact * to_remove = artifact; artifact = NULL; return to_remove; // put card in hand or in graveyard } int Card::enchant( Card * to_enchant){ to_enchant->enchanted = true; cout << "enchanted" << endl; } int Card::disenchant( Card * to_disenchant){ to_disenchant->enchanted = false; cout << "Enchantment Removed" << endl; } // ========DECL===== Spell::Spell() { currPower = basePower; currToughness = baseToughness; classType = new char[strlen("Spell") + 1]; classType = "Spell"; } Spell::~Spell(){} // --------------- Spell::Spell(const Spell & to_copy){ currPower = to_copy.currPower; basePower = to_copy.basePower; currToughness = to_copy.currToughness; baseToughness = to_copy.baseToughness; } // ========= int Spell::attack( Spell *& blocker ){ blocker->currToughness -= currPower; currToughness -= blocker->currToughness; } //========== int Spell::counter (Spell *& to_counter){ cout << to_counter->name << " was countered by " << name << endl; } // ============ int Spell::heal (Spell *& to_heal, int amountOfHealth){ to_heal->currToughness += amountOfHealth; } // ------- Creature::Creature(){ summoningSick = true; } // =====DECL====== Land::Land(){ color = NON; classType = new char[strlen("Land") + 1]; classType = "Land"; } // ------ int Land::generateMana(int mana){ // ... // } card.h #ifndef CARD_H #define CARD_H #include <cctype> #include <iostream> #include "conception.h" class Artifact; class Spell; class Card : public Conception { public: Card(); Card(const Card &); ~Card(); protected: char* name; enum CardType { INSTANT, CREATURE, LAND, ENCHANTMENT, ARTIFACT, PLANESWALKER}; enum CardColor { WHITE, BLUE, BLACK, RED, GREEN, NON }; CardType type; CardColor color; int manaCost; char* abilities; char* flavorText; char* keywords; bool inPlay; bool tapped; bool cursed; bool enchanted; Artifact* artifact; virtual int enchant( Card * ); virtual int disenchant (Card * ); virtual int equipArtifact( Artifact* ); virtual Artifact* unequipArtifact(Card * ); }; // ------------ class Spell: public Card { public: Spell(); ~Spell(); Spell(const Spell &); protected: virtual int heal( Spell *&, int ); virtual int attack( Spell *& ); virtual int counter( Spell*& ); int currToughness; int baseToughness; int currPower; int basePower; }; class Land: public Card { public: Land(); ~Land(); protected: virtual int generateMana(int); }; class Forest: public Land { public: Forest(); ~Forest(); protected: int generateMana(); }; class Creature: public Spell { public: Creature(); ~Creature(); protected: bool summoningSick; }; class Sorcery: public Spell { public: Sorcery(); ~Sorcery(); protected: }; #endif conception.h -- this is an "uber class" from which everything derives class Conception{ public: Conception(); ~Conception(); protected: char* classType; }; conception.cpp Conception::Conception{ Conception(){ classType = new char[11]; char = "Conception"; } game.cpp -- this is an incomplete class as of this code #include <iostream> #include <cctype> #include "game.h" #include "player.h" Battlefield::Battlefield(){ card = 0; } Battlefield::~Battlefield(){ delete card; } Battlefield::Battlefield(const Battlefield & to_copy){ } // =========== /* class Game(){ public: Game(); ~Game(); protected: Player** player; // for multiple players Battlefield* root; // for battlefield getPlayerMove(); // ask player what to do addToBattlefield(); removeFromBattlefield(); sendAttack(); } */ #endif game.h #ifndef GAME_H #define GAME_H #include "list.h" class CardList(); class Battlefield : CardList{ public: Battlefield(); ~Battlefield(); protected: Card* card; // make an array }; class Game : Conception{ public: Game(); ~Game(); protected: Player** player; // for multiple players Battlefield* root; // for battlefield getPlayerMove(); // ask player what to do addToBattlefield(); removeFromBattlefield(); sendAttack(); Battlefield* field; }; list.cpp #include <iostream> #include <cctype> #include "list.h" // ========== LinkedList::LinkedList(){ root = new Node; classType = new char[strlen("LinkedList") + 1]; classType = "LinkedList"; }; LinkedList::~LinkedList(){ delete root; } LinkedList::LinkedList(const LinkedList & obj) { // code to copy } // --------- // ========= int LinkedList::delete_all(Node* root){ if (root = 0) return 0; delete_all(root->next); root = 0; } int LinkedList::add( Conception*& is){ if (root == 0){ root = new Node; root->next = 0; } else { Node * curr = root; root = new Node; root->next=curr; root->it = is; } } int LinkedList::remove(Node * root, Node * prev, Conception* is){ if (root = 0) return -1; if (root->it == is){ root->next = root->next; return 0; } remove(root->next, root, is); return 0; } Conception* LinkedList::find(Node*& root, const Conception* is, Conception* holder = NULL) { if (root==0) return NULL; if (root->it == is){ return root-> it; } holder = find(root->next, is); return holder; } Node* LinkedList::goForward(Node * root){ if (root==0) return root; if (root->next == 0) return root; else return root->next; } // ============ Node* LinkedList::goBackward(Node * root){ root = root->prev; } list.h #ifndef LIST_H #define LIST_H #include <iostream> #include "conception.h" class Node : public Conception { public: Node() : next(0), prev(0), it(0) { it = 0; classType = new char[strlen("Node") + 1]; classType = "Node"; }; ~Node(){ delete it; delete next; delete prev; } Node* next; Node* prev; Conception* it; // generic object }; // ---------------------- class LinkedList : public Conception { public: LinkedList(); ~LinkedList(); LinkedList(const LinkedList&); friend bool operator== (Conception& thing_1, Conception& thing_2 ); protected: virtual int delete_all(Node*); virtual int add( Conception*& ); // virtual Conception* find(Node *&, const Conception*, Conception* ); // virtual int remove( Node *, Node *, Conception* ); // removes question with keyword int display_all(node*& ); virtual Node* goForward(Node *); virtual Node* goBackward(Node *); Node* root; // write copy constrcutor }; // ============= class CircularLinkedList : public LinkedList { public: // CircularLinkedList(); // ~CircularLinkedList(); // CircularLinkedList(const CircularLinkedList &); }; class DoubleLinkedList : public LinkedList { public: // DoubleLinkedList(); // ~DoubleLinkedList(); // DoubleLinkedList(const DoubleLinkedList &); protected: }; // END OF LIST Hierarchy #endif player.cpp #include <iostream> #include "player.h" #include "list.h" using namespace std; Library::Library(){ root = 0; } Library::~Library(){ delete card; } // ====DECL========= Player::~Player(){ delete fname; delete lname; delete deck; } Wizard::~Wizard(){ delete mana; delete rootL; delete rootH; } // =====Player====== void Player::changeName(const char[] first, const char[] last){ char* backup1 = new char[strlen(fname) + 1]; strcpy(backup1, fname); char* backup2 = new char[strlen(lname) + 1]; strcpy(backup1, lname); if (first != NULL){ fname = new char[strlen(first) +1]; strcpy(fname, first); } if (last != NULL){ lname = new char[strlen(last) +1]; strcpy(lname, last); } return 0; } // ========== void Player::seeStats(Stats*& to_put){ to_put->wins = stats->wins; to_put->losses = stats->losses; to_put->winRatio = stats->winRatio; } // ---------- void Player::displayDeck(const LinkedList* deck){ } // ================ void CardList::findCard(Node* root, int id, NodeCard*& is){ if (root == NULL) return; if (root->it.id == id){ copyCard(root->it, is); return; } else findCard(root->next, id, is); } // -------- void CardList::deleteAll(Node* root){ if (root == NULL) return; deleteAll(root->next); root->next = NULL; } // --------- void CardList::removeCard(Node* root, int id){ if (root == NULL) return; if (root->id = id){ root->prev->next = root->next; // the prev link of root, looks back to next of prev node, and sets to where root next is pointing } return; } // --------- void CardList::addCard(Card* to_add){ if (!root){ root = new Node; root->next = NULL; root->prev = NULL; root->it = &to_add; return; } else { Node* original = root; root = new Node; root->next = original; root->prev = NULL; original->prev = root; } } // ----------- void CardList::displayAll(Node*& root){ if (root == NULL) return; cout << "Card Name: " << root->it.cardName; cout << " || Type: " << root->it.type << endl; cout << " --------------- " << endl; if (root->classType == "Spell"){ cout << "Base Power: " << root->it.basePower; cout << " || Current Power: " << root->it.currPower << endl; cout << "Base Toughness: " << root->it.baseToughness; cout << " || Current Toughness: " << root->it.currToughness << endl; } cout << "Card Type: " << root->it.currPower; cout << " || Card Color: " << root->it.color << endl; cout << "Mana Cost" << root->it.manaCost << endl; cout << "Keywords: " << root->it.keywords << endl; cout << "Flavor Text: " << root->it.flavorText << endl; cout << " ----- Class Type: " << root->it.classType << " || ID: " << root->it.id << " ----- " << endl; cout << " ******************************************" << endl; cout << endl; // ------- void CardList::copyCard(const Card& to_get, Card& put_to){ put_to.type = to_get.type; put_to.color = to_get.color; put_to.manaCost = to_get.manaCost; put_to.inPlay = to_get.inPlay; put_to.tapped = to_get.tapped; put_to.class = to_get.class; put_to.id = to_get.id; put_to.enchanted = to_get.enchanted; put_to.artifact = to_get.artifact; put_to.class = to_get.class; put.to.abilities = new char[strlen(to_get.abilities) +1]; strcpy(put_to.abilities, to_get.abilities); put.to.keywords = new char[strlen(to_get.keywords) +1]; strcpy(put_to.keywords, to_get.keywords); put.to.flavorText = new char[strlen(to_get.flavorText) +1]; strcpy(put_to.flavorText, to_get.flavorText); if (to_get.class = "Spell"){ put_to.baseToughness = to_get.baseToughness; put_to.basePower = to_get.basePower; put_to.currToughness = to_get.currToughness; put_to.currPower = to_get.currPower; } } // ---------- player.h #ifndef player.h #define player.h #include "list.h" // ============ class CardList() : public LinkedList(){ public: CardList(); ~CardList(); protected: virtual void findCard(Card&); virtual void addCard(Card* ); virtual void removeCard(Node* root, int id); virtual void deleteAll(); virtual void displayAll(); virtual void copyCard(const Conception*, Node*&); Node* root; } // --------- class Library() : public CardList(){ public: Library(); ~Library(); protected: Card* card; int numCards; findCard(Card&); // get Card and fill empty template } // ----------- class Deck() : public CardList(){ public: Deck(); ~Deck(); protected: enum deckColor { WHITE, BLUE, BLACK, RED, GREEN, MIXED }; char* deckName; } // =============== class Mana(int amount) : public Conception { public: Mana() : displayTotal(0), classType(0) { displayTotal = 0; classType = new char[strlen("Mana") + 1]; classType = "Mana"; }; protected: int accrued; void add(); void remove(); int displayTotal(); } inline Mana::add(){ accrued += 1; } inline Mana::remove(){ accrued -= 1; } inline Mana::displayTotal(){ return accrued; } // ================ class Stats() : public Conception { public: friend class Player; friend class Game; Stats() : wins(0), losses(0), winRatio(0) { wins = 0; losses = 0; if ( (wins + losses != 0) winRatio = wins / (wins + losses); else winRatio = 0; classType = new char[strlen("Stats") + 1]; classType = "Stats"; } protected: int wins; int losses; float winRatio; void int getStats(Stats*& ); } // ================== class Player() : public Conception{ public: Player() : wins(0), losses(0), winRatio(0) { fname = NULL; lname = NULL; stats = NULL; CardList = NULL; classType = new char[strlen("Player") + 1]; classType = "Player"; }; ~Player(); Player(const Player & obj); protected: // member variables char* fname; char* lname; Stats stats; // holds previous game statistics CardList* deck[]; // hold multiple decks that player might use - put ll in this private: // member functions void changeName(const char[], const char[]); void shuffleDeck(int); void seeStats(Stats*& ); void displayDeck(int); chooseDeck(); } // -------------------- class Wizard(Card) : public Player(){ public: Wizard() : { mana = NULL; rootL = NULL; rootH = NULL}; ~Wizard(); protected: playCard(const Card &); removeCard(Card &); attackWithCard(Card &); enchantWithCard(Card &); disenchantWithCard(Card &); healWithCard(Card &); equipWithCard(Card &); Mana* mana[]; Library* rootL; // Library Library* rootH; // Hand } #endif

    Read the article

  • Sending email to gmail account using c++ on windows error check

    - by LCD Fire
    I know this has been disscused a lot, but I I'm not asking how to do it, I'm just asking why it doesn't work. What I am doing wrong. It says that the email was sent succesfully but I don't see it in my inbox. I want to send an email to a gmail account, not through it. #include <iostream> #include <windows.h> #include <fstream> #include <conio.h> #pragma comment(lib, "ws2_32.lib") // Insist on at least Winsock v1.1 const int VERSION_MAJOR = 1; const int VERSION_MINOR = 1; #define CRLF "\r\n" // carriage-return/line feed pair using namespace std; // Basic error checking for send() and recv() functions void Check(int iStatus, char *szFunction) { if((iStatus != SOCKET_ERROR) && (iStatus)) return; cerr<< "Error during call to " << szFunction << ": " << iStatus << " - " << GetLastError() << endl; } int main(int argc, char *argv[]) { int iProtocolPort = 25; char szSmtpServerName[64] = ""; char szToAddr[64] = ""; char szFromAddr[64] = ""; char szBuffer[4096] = ""; char szLine[255] = ""; char szMsgLine[255] = ""; SOCKET hServer; WSADATA WSData; LPHOSTENT lpHostEntry; LPSERVENT lpServEntry; SOCKADDR_IN SockAddr; // Check for four command-line args //if(argc != 5) // ShowUsage(); // Load command-line args lstrcpy(szSmtpServerName, "smtp.gmail.com"); lstrcpy(szToAddr, "[email protected]"); lstrcpy(szFromAddr, "[email protected]"); // Create input stream for reading email message file ifstream MsgFile("D:\\d.txt"); // Attempt to intialize WinSock (1.1 or later) if(WSAStartup(MAKEWORD(VERSION_MAJOR, VERSION_MINOR), &WSData)) { cout << "Cannot find Winsock v" << VERSION_MAJOR << "." << VERSION_MINOR << " or later!" << endl; return 1; } // Lookup email server's IP address. lpHostEntry = gethostbyname(szSmtpServerName); if(!lpHostEntry) { cout << "Cannot find SMTP mail server " << szSmtpServerName << endl; return 1; } // Create a TCP/IP socket, no specific protocol hServer = socket(PF_INET, SOCK_STREAM, 0); if(hServer == INVALID_SOCKET) { cout << "Cannot open mail server socket" << endl; return 1; } // Get the mail service port lpServEntry = getservbyname("mail", 0); // Use the SMTP default port if no other port is specified if(!lpServEntry) iProtocolPort = htons(IPPORT_SMTP); else iProtocolPort = lpServEntry->s_port; // Setup a Socket Address structure SockAddr.sin_family = AF_INET; SockAddr.sin_port = iProtocolPort; SockAddr.sin_addr = *((LPIN_ADDR)*lpHostEntry->h_addr_list); // Connect the Socket if(connect(hServer, (PSOCKADDR) &SockAddr, sizeof(SockAddr))) { cout << "Error connecting to Server socket" << endl; return 1; } // Receive initial response from SMTP server Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() Reply"); // Send HELO server.com sprintf(szMsgLine, "HELO %s%s", szSmtpServerName, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() HELO"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() HELO"); // Send MAIL FROM: <[email protected]> sprintf(szMsgLine, "MAIL FROM:<%s>%s", szFromAddr, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() MAIL FROM"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() MAIL FROM"); // Send RCPT TO: <[email protected]> sprintf(szMsgLine, "RCPT TO:<%s>%s", szToAddr, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() RCPT TO"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() RCPT TO"); // Send DATA sprintf(szMsgLine, "DATA%s", CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() DATA"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() DATA"); //strat writing about the subject, end it with two CRLF chars and after that you can //write data to the body oif the message sprintf(szMsgLine, "Subject: My own subject %s%s", CRLF, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() DATA"); // Send all lines of message body (using supplied text file) MsgFile.getline(szLine, sizeof(szLine)); // Get first line do // for each line of message text... { sprintf(szMsgLine, "%s%s", szLine, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() message-line"); MsgFile.getline(szLine, sizeof(szLine)); // get next line. } while(!MsgFile.eof()); // Send blank line and a period sprintf(szMsgLine, "%s.%s", CRLF, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() end-message"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() end-message"); // Send QUIT sprintf(szMsgLine, "QUIT%s", CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() QUIT"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() QUIT"); // Report message has been sent cout<< "Sent " << argv[4] << " as email message to " << szToAddr << endl; // Close server socket and prepare to exit. closesocket(hServer); WSACleanup(); _getch(); return 0; }

    Read the article

  • Website Health Check - Keyword Blunders - Part 2

    Website Health Check is becoming an integral part of Search Engine Optimization (SEO). The reason is that it helps to find mistakes in websites that are commonly unnoticed. Eventually, it means the difference between coming up as the first or last result in a search engine query. A small part regarding keywords, such as keyword density, keyword stuffing, spelling errors, cloaking, etc., is explained here.

    Read the article

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