Search Results

Search found 259 results on 11 pages for 'conrad dean'.

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

  • 301 re-direct all external links to new domain

    - by Dean Legg
    I have changed the main domain to a sub-domain & would like to re-direct all external links to the new sub domain. Have read a few articles but having no luck editing the .htaccess as it might be interfering with all the rules in there. Old: www.example.co.uk New: https://secure.example.co.uk The current rules are quite handy because it seems to have sorted out the structure for all internal links. It has even updated the file path for images (or this could just be wordpress as the url was updated under general settings). This is the current .htaccess <files wp-config.php> order allow,deny deny from all </files> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

    Read the article

  • Making sub domain the new main domains for ssl

    - by Dean Legg
    What would be your best advise for changing your main domain to a sub domain? Are site used to be example.co.uk but has now changed to https://secure.example.co.uk/. Any example.co.uk url's re-direct to the new secure domain. Effectively the example.co.uk is now just there to redirect any links and is no longer part of the sites url structure. I have added a new domain to Google Webmaster https://secure.example.co.uk/ and added the site map. Waiting for it to be indexed. Is there anything else you would advise and will this take away a lot of the juice from all the links I developed for example.co.uk? Guessing this is not best practise as I have struggled to find any information online based on this subject.

    Read the article

  • Multimedia files written over WAN are getting truncated

    - by Dean
    I use the windows Multimedia API to create .wav files. 1. Open file with mmsioOpen 2. Creates WAVE,frm and data chunks using mmioCreateChunk 3. Write audio data using mmioWrite 4. Ascend out of the chunks using mmioAscend 5. Close file using mmioClose The file is being written into a temporary location, so after it has been closed it gets copied to another location using the CopyFile. This program is written in C++ and works great until the file it is writing resides over a WAN in a different city or country. The end result is a wav file that should be 20-30 seconds long ends up being 4 secodns long. It is always the last bit that is missing, so when you play it back it just stops before then of the recording. I initially thought that maybe I was copying the file too soon so as a test I put in a pause of 30 seconds after closing the file using Sleep(30000), but this made no difference to either it being truncated or by how much. I have modified the program to write to a file in parrallel using CreateFile and WriteFile, and the result is the same, so it is not an issue specifically with the mmio API's. Does anyone have any ideas why this is happening and if there is a work-around to it? I suspect that I may end up having the temporary location on the local drive, but this is quite a big change to the application as well as existing deployments. thanks for everyones time Dean

    Read the article

  • Problem Displaying XML in Grid View-newbie

    - by Dean
    I am trying to do something in VisualWebDev 2008 Express that I thought would be simple, but it is not working. I want to display data from an XML file so I added the XMLDataSource to my page, pointed it to the XML file, and then added the GridView and connected it to the datasource. I am getting the following error: GridView - GridView1There was an error rendering the control. The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content. Could someone please tell me what I might be doing wrong, TIA Dean A smippet from my XML is as follows: 6019 - Renaissance MS - New School Renaissance MS 7155 Hall Road Fairburn, GA 30213 NS-6019200-LA-01 New School Close-out NS-6019200 0.000000000000000e+000 The construction of the new Renaissance MS will be at the intersection of Jones/Hall Road, in the districts 7th & 9F and Land Lots 117, 143 & 146 of Fulton County, GA. The work includes the construction of the 180,500 square foot building that will house 34 standard classrooms, 12 standard science labs, 20 special purpose classrooms, cafeteria and litchen, gymnasium, media center and administrative offices. The site will also have multi-purpose playfields with track, softball field, tennis courts and basketball/volleyball court. Terry O'Brien Parsons Stevens Wilkinson Stang Newdow Barton Malow -84.62242 33.61497

    Read the article

  • Using HABTM relationships in cakephp plugins with unique set to false

    - by Dean
    I am working on a plugin for our CakePHP CMS that will handle blogs. When getting to the tags I needed to set the HABTM relationship to unique = false to be able add tags to a post without having to reset them all. The BlogPost model looks like this class BlogPost extends AppModel { var $name = 'BlogPost'; var $actsAs = array('Core.WhoDidIt', 'Containable'); var $hasMany = array('Blog.BlogPostComment'); var $hasAndBelongsToMany = array('Blog.BlogTag' => array('unique' => false), 'Blog.BlogCategory'); } The BlogTag model looks like this class BlogTag extends AppModel { var $name = 'BlogTag'; var $actsAs = array('Containable'); var $hasAndBelongsToMany = array('Blog.BlogPost'); } The SQL error I am getting when I have the unique = true setting in the HABTM relationship between the BlogPost and BlogTag is Query: SELECT `Blog`.`BlogTag`.`id`, `Blog`.`BlogTag`.`name`, `Blog`.`BlogTag`.`slug`, `Blog`.`BlogTag`.`created_by`, `Blog`.`BlogTag`.`modified_by`, `Blog`.`BlogTag`.`created`, `Blog`.`BlogTag`.`modified`, `BlogPostsBlogTag`.`blog_post_id`, `BlogPostsBlogTag`.`blog_tag_id` FROM `blog_tags` AS `Blog`.`BlogTag` JOIN `blog_posts_blog_tags` AS `BlogPostsBlogTag` ON (`BlogPostsBlogTag`.`blog_post_id` = 4 AND `BlogPostsBlogTag`.`blog_tag_id` = `Blog`.`BlogTag`.`id`) As you can see it is trying to set the blog_tags table to 'Blog'.'BlogTag. which isn't a valid MySQL name. When I remove the unique = true from the relationship it all works find and I can save one tag but when adding another it just erases the first one and puts the new one in its place. Does anyone have any ideas? is it a bug or am I just missing something? Cheers, Dean

    Read the article

  • How to split HTML code with javascript or JQuery

    - by Dean
    Hi I'm making a website using JSP and servlets and I have to now break up a list of radio buttons to insert a textarea and a button. I have got the button and textarea to hide and show when you click on the radio button it shows the text area and button. But this only appears at the top and when there are hundreds on the page this will become awkward so i need a way for it to appear underneath. Here is what my HTML looks like when complied: <form action="addSpotlight" method="POST"> <table> <tr><td><input type="radio" value="29" name="publicationIDs" ></td><td>A System For Dynamic Server Allocation in Application Server Clusters, IEEE International Symposium on Parallel and Distributed Processsing with Applications, 2008</td> </tr> <tr><td><input type="radio" value="30" name="publicationIDs" ></td><td>Analysing BitTorrent's Seeding Strategies, 7th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC-09), 2009</td> </tr> <tr><td><input type="radio" value="31" name="publicationIDs" ></td><td>The Effect of Server Reallocation Time in Dynamic Resource Allocation, UK Performance Engineering Workshop 2009, 2009</td> </tr> <tr><td><input type="radio" value="32" name="publicationIDs" ></td><td>idk, hello, 1992</td> </tr> <tr><td><input type="radio" value="33" name="publicationIDs" ></td><td>sad, safg, 1992</td> </tr> <div class="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </table> </form> Now here is what my JSP looks like: <form action="addSpotlight" method="POST"> <table> <%int i = 0; while(i<ids.size()){%> <tr><td><input type="radio" value="<%=ids.get(i)%>" name="publicationIDs" ></td><td><%=info.get(i)%></td> </tr> <%i++; }%> <div class="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </table> </form> Thanks in Advance Dean

    Read the article

  • Android onActivityResult is always 0

    - by Dean
    This has been killing me for two days now. I have a main Activity A which calls a second Activity B. Activity B simply presents the user with a listview. When I press an item on the list view I want a couple of strings to be passed back to the main Activity A and Activiy B will finish. The problem is I always get a resultcode of 0 and the data bundle is null. I really don't understand why this is happening. Here is my code. Start Activity B for result; Test.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(recipeActivity.this, BrowseLoadRecipes.class); startActivityForResult(i, RECIPE_CHOOSER); } }); This starts the second Activity fine. Activity B populates a listview and when I click an item I'm trying to send some data back to the calling Activity A. Any text at the moment, so I used the following in Activity B; lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> a, View v, int position, long id) { Bundle bundle = new Bundle(); bundle.putString("TEXT", "Please work... pleeeeaasee"); Intent mIntent = new Intent(); mIntent.putExtras(bundle); setResult(RESULT_OK, mIntent); finish(); } }); In the calling activity I have the following listening for the return as follows; protected void onActivityResult(int requestCode, int resultCode, Intent data) { switch(requestCode) { //TODO case RECIPE_CHOOSER: Toast.makeText(getApplicationContext(), "In recipe return", Toast.LENGTH_SHORT).show(); Toast.makeText(getApplicationContext(), "resultCode is " + String.valueOf(resultCode), Toast.LENGTH_SHORT).show(); if (resultCode == RESULT_OK) { Bundle b = getIntent().getExtras(); Toast.makeText(getApplicationContext(), "Returned " + b.getString("TEXT"), Toast.LENGTH_LONG).show(); } if (resultCode == RESULT_CANCELED) { } break; } } } I can see that the request code is correctly returned, but the resultcode is always a 0 and the data is always a null. I've ran through the debug and the setResult is doing its job and the bundle does indeed have the data I'm passing, but it's lost at some point along the way. Is there something in the manifest I'm missing or something. It's killed my progress on this project so far. Any help would truly be appreciated. Thanks, Dean

    Read the article

  • Results Delphi users who wish to use HID USB in windows

    - by Lex Dean
    Results Delphi users who wish to use HID USB in windows HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB Contain a list if keys containing vender ID and Producer ID numbers that co inside with the USB web sites data base. These numbers and the GUID held within the key gives important information to execute the HID.dll that is otherwise imposable to execute. The Control Panel/System/Hardware/Device manager/USB Serial Bus Controllers/Mass Storage Devices/details simply lists the registry data. The access to the programmer has been documented through the API32.dll with a number of procedures that accesses the registry. But that is not the problem yet it looks like the problem!!!!!!!!! The key is info about the registry and how to use it. These keys are viewed in RegEdit.exe it’s self. Some parts of the registry like the USB have been given a windows security system type of protection with a Aurthz.dll to give the USB read and right protection. Even the api32.dll. Now only Microsoft give out these details and we all know Microsoft hate Delphi. Now C users have enjoyed this access for over 10 years now. Now some will make out that you should never give out such information because some idiot may make a stupid virus (true), but the argument is also do Delphi users need to be denied USB access for another ten years!!!!!!!!!!!!. What I do not have is the skill in is assembly code. I’m seeking for some one that can trace how regedit.exe gets its access through Aurthz.dll to access the USB data. So I’m asking all who reads this:- to partition any friend they have that has this skill to get the Aurthz.dll info needed. I find communicating with USB.org they reply when they have a positive email reply but do not bother should their email be a slightly negative policy. For all simple reasoning, all that USB had to do was to have a secure key as they have done, and to update the same data into a unsecured key every time the data is changed for USB developer to access. And not bother developers access to Aurthz.dll. Authz.dll with these functions for USB:- AuthzFreeResourceManager AuthzFreeContext AuthzAccessCheck(Flags: DWORD; AuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST; AuditInfo: AUTHZ_AUDIT_INFO_HANDLE; pSecurityDescriptor: PSECURITY_DESCRIPTOR; OptionalSecurityDescriptorArray: PSECURITY_DESCRIPTOR; OptionalSecurityDescriptorCount: DWORD; //OPTIONAL, Var pReply: AUTHZ_ACCESS_REPLY; pAuthzHandle: PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE): BOOl; AuthzInitializeContextFromSid(Flags: DWORD; UserSid: PSID; AuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE; pExpirationTime: int64; Identifier: LUID; DynamicGroupArgs: PVOID; pAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; AuthzInitializeResourceManager(flags: DWORD; pfnAccessCheck: PFN_AUTHZ_DYNAMIC_ACCESS_CHECK; pfnComputeDynamicGroups: PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS; pfnFreeDynamicGroups: PFN_AUTHZ_FREE_DYNAMIC_GROUPS; ResourceManagerName: PWideChar; pAuthzResourceManager: PAUTHZ_RESOURCE_MANAGER_HANDLE): BOOL; further in Authz.h on kolers.com J Lex Dean.

    Read the article

  • Var null and not an object when using document.getElementById

    - by Dean
    Hi, I'm doing some work in HTML and JQuery. I have a problem of my textarea and submit button not appearing after the radio button is selected. My HTML looks like this: <html> <head><title>Publications Database | Which spotlight for Publications</title> <script type="text/javascript" src="./jquery.js"></script> <script src="./addSpotlight.js" type="text/javascript" charset="utf-8"></script> </head> <body> <div class="wrapper"> <div class="header"> <div class="headerText">Which spotlight for Publications</div> </div> <div class="mainContent"> <p>Please select the publication that you would like to make the spotlight of this month:</p> <form action="addSpotlight" method="POST" id="form" name="form"> <div class="div29" id="div29"><input type="radio" value="29" name="publicationIDs" >A System For Dynamic Server Allocation in Application Server Clusters, IEEE International Symposium on Parallel and Distributed Processsing with Applications, 2008 </div> <div class="div30" id="div30"><input type="radio" value="30" name="publicationIDs" >Analysing BitTorrent's Seeding Strategies, 7th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC-09), 2009 </div> <div class="div31" id="div31"><input type="radio" value="31" name="publicationIDs" >The Effect of Server Reallocation Time in Dynamic Resource Allocation, UK Performance Engineering Workshop 2009, 2009 </div> <div class="div32" id="div32"><input type="radio" value="32" name="publicationIDs" >idk, hello, 1992 </div> <div class="div33" id="div33"><input type="radio" value="33" name="publicationIDs" >sad, safg, 1992 </div> <div class="abstractWriteup" id="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </form> </div> </div> </body> </html> My javascript looks like this: $(document).ready( function() { $('.abstractWriteup').hide(); addAbstract(); }); function addAbstract() { var abstractWU = document.getElementById('.abstractWriteup'); $("input[name='publicationIDs']").change(function() { var abstractWU = document.getElementById('.abstractWriteup'); var classNameOfSelected = $("input[name='publicationIDs']").val(); var radioSelected = document.getElementById("div"+classNameOfSelected); var parentDiv = radioSelected.parentNode; parentDiv.insertBefore(radioSelected, abstractWU.nextSibling); $('.abstractWriteup').show(); });}; I have developed this by using Node#insertBefore. When I have had it working it has been rearranging the radio buttons. Thanks in Advance Dean

    Read the article

  • Very slow startup of ASP.NET applications

    - by Conrad
    I have an ASP.NET applications with quite small number of pages. The problem I see is that the startup time is quite slow. As far as I can tell, most of the time is spent in JIT. Pre-compiling the applications seem not very helpful in reducing the #methods JIT as reported thru PerfMon. Does anybody know what I can do to reduce the startup time further? Is it true that there is no way to pre-jit an ASP.NET application using NGEN?

    Read the article

  • Problem with a test method in Yii web services

    - by Conrad
    Hi There, Is there anyone here who might be familiar with web services in the yii framework? I declared the following test method: /** * Send a single SMS message * * @param string $username Username * @param string $password Password * @param string $identifier Valid Identifier to use * @param string $mobileNumber Mobile Number to send message to * @param string $message Message to send * @return string 'OK' on success, error message on failure * @soap */ public function singleSms($username, $password, $identifier,$mobileNumber, $message){ return "username=$username, pwd=$password, source=$identifier, mobno=$mobileNumber, msg=$message"; } But when I try to call this method I get the following response: - - WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sms.chillnethosting.co.za/index.php?r=sms/webservice' : Start tag expected, '<' not found The WSDL generates when I call my URL: Web Service URL Any Ideas?

    Read the article

  • Computer science textbooks

    - by Barrett Conrad
    I would like to try the book question a little bit differently. My goal is to know what the community thinks are the quintessential computer science textbooks. <beginsadstory>I lost all of my computer science and math books from college in Hurricane Katrina in 2005. I greatly miss having my familiar tomes to refer to when topics and problems come up, so I am looking to rebuild my library.<endsadstory> What are your recommendations for the best examples of academic caliber books for the field of computer science and its associated mathematics? I am looking for books on subjects like computational theory, programming languages, compilers, operating systems, algorithms and so on. Don't limit your suggestions to your textbooks only. If there is a book you have read that covers computer science or a related math in a formal way, but is not strictly a textbook, I would be love to hear about them as well. Finally, for the sake of creating a good reference for all of us, may I suggest posting one book per answer so they can be rated individually.

    Read the article

  • How do I set a ComboBox default *not in the drop down* when a list item begins with the same text as a drop down item?

    - by John Conrad
    Using C#, say you have a ComboBox that has a DropDownStyle set to DropDown (there are items in the drop down but the user can manually enter a value as well). How do you set a default value for the ComboBox that is not in the list of values in the drop down, but begins with text from a possible selection? Normally setting ComboBox.Text works fine, but if there is an item in the drop down that begins with the text you want as the default, it automatically selects the first item in the list that starts with the text. For example: Values in the drop down: c:\program files\ c:\windows\ d:\media\ Default Value Assignment myComboBox.Text = "C:\"; Result Initial value of ComboBox when the form opens is "c:\program files\". So what am I doing wrong? How do I correctly set a default value of an item not in the drop down list that begins with a possible selection?

    Read the article

  • Why does x86 WiX installer on Vista x64 not write keys to WOW6432Node in the registry

    - by Ryan Conrad
    I have an installer that writes to HKLM\Software\DroidExplorer\InstallPath. On any x86 machine it writes just fine to the expected location, on Windows XP x64 and Windows 7 x64 it also writes to the expected location, which is actually HKLM\Software\WOW6432Node\DroidExplorer\InstallPath. Later on during the install, my bootstrapper, which is also x86, attempts to read the value. On all x86 Windows machines it is successful, and on Windows XP x64 and Windows 7 x64, but Windows Vista x64 is unable to locate the key. If I look in the registry, it doesn't actually write it to WOW6432Node on Vista, it writes it to Software\DroidExplorer\InstallPath If I do not forcefully tell the installer to write to WOW6432Node, it writes the value to Software\DroidExplorer\InstallPath, but the bootstrapper still trys to look in WOW6432Node because of the Registry Reflection. This is on all x64 systems. Why is Vista x64 the only one I have this issue with? Is there a way around this?

    Read the article

  • Debug NAudio MP3 reading difference?

    - by Conrad Albrecht
    My code using NAudio to read one particular MP3 gets different results than several other commercial apps. Specifically: My NAudio-based code finds ~1.4 sec of silence at the beginning of this MP3 before "audible audio" (a drum pickup) starts, whereas other apps (Windows Media Player, RealPlayer, WavePad) show ~2.5 sec of silence before that same drum pickup. The particular MP3 is "Like A Rolling Stone" downloaded from Amazon.com. Tested several other MP3s and none show any similar difference between my code and other apps. Most MP3s don't start with such a long silence so I suspect that's the source of the difference. Debugging problems: I can't actually find a way to even prove that the other apps are right and NAudio/me is wrong, i.e. to compare block-by-block my code's results to a "known good reference implementation"; therefore I can't even precisely define the "error" I need to debug. Since my code reads thousands of samples during those 1.4 sec with no obvious errors, I can't think how to narrow down where/when in the input stream to look for a bug. The heart of the NAudio code is a P/Invoke call to acmStreamConvert(), which is a Windows "black box" call which I can't think how to error-check. Can anyone think of any tricks/techniques to debug this?

    Read the article

  • XNA 4.0 - What happens when the window is minimized?

    - by Conrad Clark
    Hello. I'm learning F#, and decided to try making simple XNA games for windows using F# (pure enthusiasm) , and got a window with some images showing up. Here's the code: (*Methods*) member self.DrawSprites() = _spriteBatch.Begin() for i = 0 to _list.Length-1 do let spentity = _list.List.ElementAt(i) _spriteBatch.Draw(spentity.ImageTexture,new Rectangle(100,100,(int)spentity.Width,(int)spentity.Height),Color.White) _spriteBatch.End() (*Overriding*) override self.Initialize() = ChangeGraphicsProfile() _graphicsDevice <- _graphics.GraphicsDevice _list.AddSprite(0,"NagatoYuki",992.0,990.0) base.Initialize() override self.LoadContent() = _spriteBatch <- new SpriteBatch(_graphicsDevice) base.LoadContent() override self.Draw(gameTime : GameTime) = base.Draw(gameTime) _graphics.GraphicsDevice.Clear(Color.CornflowerBlue) self.DrawSprites() And the AddSprite Method: member self.AddSprite(ID : int,imageTexture : string , width : float, height : float) = let texture = content.Load<Texture2D>(imageTexture) list <- list @ [new SpriteEntity(ID,list.Length, texture,Vector2.Zero,width,height)] The _list object has a ContentManager, here's the constructor: type SpriteList(_content : ContentManager byref) = let mutable content = _content let mutable list = [] But I can't minimize the window, since when it regains its focus, i get this error: ObjectDisposedException Cannot access a disposed object. Object name: 'GraphicsDevice'. What is happening?

    Read the article

  • Dynamically changing Wordpress permalinks

    - by conrad
    i am trying to write a plugin which rewrites "post_link", "page_link", "category_link", "tag_link" with an action hook on wordpress. it's similar to this: add_action("post_link", "the_rewrite_function"); function the_rewrite_function($link) { ... return $new_link; } for example the permalink to the post is: http://www.example.com/2010/11/11/the-post-name/ i am changing it with the function to: http://www.example.com/2010/11/11/the-awesome-post-name/ of course when i do this the new permalink is going to 404 (as expected) what can i do to make the new permalink go to the original and working one? Please consider this: it should work on any permalink structure so a permalink structure spesific solution won't do any good. i need to solve this inside the plugin. thanks!

    Read the article

  • C++ 2d Array Class Function Call Help

    - by johnny-conrad
    I hope this question takes a simple fix, and I am just missing something very small. I am in my second semester of C++ in college, and we are just getting into OOP. This is my first OOP program, and it is causing me a little problem. Here are the errors I am getting: Member function must be called or its address taken in function displayGrid(int,Cell ( *)[20]) Member function must be called or its address taken in function Turn(int,int,Cell ( *)[20]) Member function must be called or its address taken in function Turn(int,int,Cell ( *)[20]) Warning: Parameter 'grid' is never used in function displayGrid(int,Cell ( *)[20]) Here is all of my code. I am aware It is much more code than necessary, sorry if it makes it more difficult. I was worried that I might accidentally delete something. const int MAX=20; //Struct Cell holds player and their symbol. class Cell { private: int Player; char Symbol; public: Cell(void); void setPlayer(int); void setSymbol(char); int getPlayer(void); char getSymbol(void); }; Cell::Cell(void) { Symbol ='-'; } void Cell::setPlayer(int player_num) { Player = player_num; } void Cell::setSymbol(char rps) { Symbol = rps; } int Cell::getPlayer(void) { return Player; } char Cell::getSymbol(void) { return Symbol; } void Turn(int, int, Cell[MAX][MAX]); void displayGrid(int, Cell[MAX][MAX]); void main(void) { int size; cout << "How big would you like the grid to be: "; cin >> size; //Checks to see valid grid size while(size>MAX || size<3) { cout << "Grid size must between 20 and 3." << endl; cout << "Please re-enter the grid size: "; cin >> size; } int cnt=1; int full; Cell grid[MAX][MAX]; //I use full to detect when the game is over by squaring size. full = size*size; cout << "Starting a new game." << endl; //Exits loop when cnt reaches full. while(cnt<full+1) { displayGrid(size, grid); //calls function to display grid if(cnt%2==0) //if cnt is even then it's 2nd players turn cout << "Player 2's turn." << endl; else cout << "Player 1's turn" << endl; Turn(size, cnt, grid); //calls Turn do each players turn cnt++; } cout << endl; cout << "Board is full... Game Over" << endl; } void displayGrid(int size, Cell grid[MAX][MAX]) { cout << endl; cout << " "; for(int x=1; x<size+1; x++) // prints first row cout << setw(3) << x; // of numbers. cout << endl; //Nested-For prints the grid. for(int i=1; i<size+1; i++) { cout << setw(2) << i; for(int c=1; c<size+1; c++) { cout << setw(3) << grid[i][c].getSymbol; } cout << endl; } cout << endl; } void Turn(int size, int cnt, Cell grid[MAX][MAX]) { char temp; char choice; int row=0; int column=0; cout << "Enter the Row: "; cin >> row; cout << "Enter the Column: "; cin >> column; //puts what is in the current cell in "temp" temp = grid[row][column].getSymbol; //Checks to see if temp is occupied or not while(temp!='-') { cout << "Cell space is Occupied..." << endl; cout << "Enter the Row: "; cin >> row; cout << "Enter the Column: "; cin >> column; temp = grid[row][column].getSymbol; //exits loop when finally correct } if(cnt%2==0) //if cnt is even then its player 2's turn { cout << "Enter your Symbol R, P, or S (Capitals): "; cin >> choice; grid[row][column].setPlayer(1); in >> choice; } //officially sets choice to grid cell grid[row][column].setSymbol(choice); } else //if cnt is odd then its player 1's turn { cout << "Enter your Symbol r, p, or s (Lower-Case): "; cin >> choice; grid[row][column].setPlayer(2); //checks for valid input by user1 while(choice!= 'r' && choice!='p' && choice!='s') { cout << "Invalid Symbol... Please Re-Enter: "; cin >> choice; } //officially sets choice to grid cell. grid[row][column].setSymbol(choice); } cout << endl; } Thanks alot for your help!

    Read the article

  • XmlAttribute/XmlText cannot be used to encode complex type

    - by Conrad C
    I want to serialize a class Ticket into xml. I get the error :"XmlAttribute/XmlText cannot be used to encode complex type" because of my customfield class. This is how the xml for customfields should look like ( the attribute array is nesseray but I don't understand how to create it): <custom_fields type="array"> <custom_field name="Standby Reason" id="6"> <value/> </custom_field> <custom_field name="Close Date" id="84"> Class Ticket public class Ticket { [XmlElement("custom_fields")] public CustomFields Custom_fields { get; set; } Class CustomFields [Serializable] public class CustomFields { [XmlAttribute("array")] public List<CustomField> custom_field { get; set; } Class CustomField [Serializable] public class CustomField { [XmlIgnore] public string Name { get; set; } [XmlElement] public int Id { get; set; } [XmlElement] public string Value { get; set; }

    Read the article

  • How to integer-divide round negative numbers *down*?

    - by Conrad Albrecht
    Seems like whenever I divide a negative int by a positive int, I need it to round down (toward -inf), not toward 0. But both C# and C++ round toward 0. So I guess I need a DivideDownward() method. I can write it in a few lines with a test for negative and so on, but my ideas seem klugey. So I'm wondering if I'm missing something and if you have an "elegant" way to round negative division downward.

    Read the article

  • How am I able to create A List<T> containing a generic Interface?

    - by Conrad Clark
    I have a List which must contain IInteract Objects. But IInteract is a generic interface which requires 2 type arguments. My main idea is iterate through a list of Objects and "Interact" one with another if they didn't interact yet. So i have this object List<IObject> WorldObjects = new List<IObject>(); and this one: private List<IInteract> = new List<IInteract>(); Except I can't compile the last line because IInteract requires 2 type arguments. But I don't know what the arguments are until I add them. I could add interactions between Objects of Type A and A... or Objects of Type B and C. I want to create "Interaction" classes which do something with the "acting" object and the "target" object, but I want them to be independent from the objects... so I could add an Interaction between for instance... "SuperUltraClass" and... an "integer". Am I using the wrong approach?

    Read the article

  • Is my program taking too much time to execute?

    - by Conrad C
    I wanted to solve a question from project euleur about finding the largest prime number of a big number. I run my code on a virtual machine on Visual studio 2012, and the code seems froze. When I step into the loop, the code works well, but when I execute it, the console is always there. It is as if the program is still running. Could it be that the program takes time to execute? My Code static void Main(string[] args) { long number = 5; for (long i = 1; i < 600851475143; i++) { if (i % 2 != 0 && i % 1 == 0 && i % i == 0) number = i; } }

    Read the article

  • Outlook 2007 - Cannot start Outlook - Cannot open the Outlook window

    - by Dean Perry
    I went to open Outlook 2007 on my Windows 7 32bit machine and it came up with this error: Cannot start Microsoft Office Outlook. Cannot open the Outlook window. The set of folders cannot be opened. The information store could not be opened. I have deleted and created a new profile in Control Panel Mail but it still doesn't want to work properly but it still comes up with this message. Thanks in advance.

    Read the article

  • Cannot Expand/Collapse tasks in Microsoft Project 2010

    - by Dean
    I opened an existing Microsoft Project file today and was unable to expand/collapse the subtasks use the cursor and the '+/-' signs beside the parent tasks. I am able to expand and collapse using the 'View-Outline' ribbon icon. However when I attempt to do this using the mouse on specific tasks, my cursor will not perform the task. My cursor is a 'white cross' when I need it to be an 'arrow'. I'm assuming this is something minor that I'm missing. Any assistance appreciated. Thanks

    Read the article

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