Search Results

Search found 440 results on 18 pages for 'shawn miller'.

Page 9/18 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • IIS 7 and ASP.NET State Service Configuration

    - by Shawn
    We have 2 web servers load balanced and we wanted to get away from sticky sessions for obvious reasons. Our attempted approach is to use the ASP.NET State service on one of the boxes to store the session state for both. I realize that it's best to have a server dedicated to storing sessions but we don't have the resources for that. I've followed these instructions to no avail. The session still isn't being shared between the two servers. I'm not receiving any errors. I have the same machine key for both servers, and I've set the application ID to a unique value that matches between the two servers. Any suggestions on how I can troubleshoot this issue? Update: I turned on the session state service on my local machine and pointed both servers to the ip address on my local machine and it worked as expected. The session was shared between both servers. This leads me to believe that the problem might be that I'm not using a standalone server as my state service. Perhaps the problem is because I am using the ip address 127.0.0.1 on one server and then using a different ip address on the other server. Unfortunately when I try to use the network ip address as opposed to localhost the connection doesn't seem to work from the host server. Any insight on whether my suspicions are correct would be appreciated.

    Read the article

  • Why is the `remove rows` button not always present in MySQL Workbench?

    - by Shawn
    I'm using MySQL Workbench to remove rows from a table in my database. Most of the time, I will simply write a select statement, then select the rows I want to erase and use the remove rows button (circled in the screenshot below). But sometimes (quite often actually), the remove rows button does not appear. Instead, I get something like the screenshot below: The remove rows button is not there and the remove rows option is grayed out in the context menu, so basically, I can't remove rows... The only way I've found of solving this issue is to run the select query many times until the button appears (it usually does after 3 of 4 times). Does anyone know why this is happening? UPDATE Today, I've been running a select query dozens of times and the button never appears. It seems my incomprehensible workaround no longer works... Help! btw: Using a delete statement does work, though I would rather not have to write one for each row I want to remove as this happens quite frequently during development...

    Read the article

  • php-cgi got SIGKILL on burst.net VPS?

    - by Shawn
    I got an VPS at burst.net, very cheap one, but this doesn't matter. The strange behavior of it is, the php-cgi process, which started using lighthttpd's spawn-cgi, dies every a few minutes. however, other processes are fine and great, even include a java process, and I'm sure there is no "out of memory" issue, so it's not killed by OOM killer. I used strace to trace the process, and found out it was killed by SIGKILL, hence no single log was left on the disk, just dies suddenly. Is there anyway I can find out what process/thing sent the SIGKILL to the poor php process? Filed a ticket with the vendor, but they said they won't care. strace -p 7176 Process 7176 attached - interrupt to quit wait4(-1, <unfinished ...> +++ killed by SIGKILL +++

    Read the article

  • Why is my wireless so slow compared to my wired download speed?

    - by Shawn
    I just used speedtest.net (using Firefox) to compare my wired connection speed with my wireless connection speed. With my current contract (with Videotron), I'm supposed to get Download speed: 8Mbps Upload speed: 1Mbps Here are the results of the speedtest.net test: Wired Ping: 14ms Download speed: 8.41Mbps Upload speed: 1.04Mbps Wireless Ping: 16ms Download speed: 0.18Mbps Upload speed: 0.98Mbps The difference in download speeds seems staggering to me since I did the test 1 meter aways from my router. Any clue as to why my wireless download speed is so low compared to my wired download speed? using Ubuntu 11.04 on an Acer Aspire 5536-5519 Oh and it might be worth mentioning that my girlfriend has no trouble at all with her wireless connection. No slowness at all. (She uses Firefox on Windows 7 on a Dell) Here's the results for the same test on her system: Ping: 22ms Download speed; 8.44Mbps Upload speed: 1.02Mbps

    Read the article

  • Windows 7 Desktop background picture in Group Policy displaying black - XP working correctly

    - by Shawn Gradwell
    We want everyone on the Windows Domain to have the same desktop background. This is set up in a Group Policy. This works great in Windows XP but the Windows 7 machines display a black background. I have re-created the Group Policy, done various tests with different types and sizes of files Enabling and Disabling Active Desktop. I have researched and tried some options and patches from Microsoft as well. Any idea what I can try or even how to determine the problem?

    Read the article

  • How can I get "Calculated Columns" to work in excel?

    - by Shawn Persels
    Using Excel 2010, I want a single formula to apply to all cells in a column. I see documentation for a feature called "Calculated Columns". That is exactly what I want, but when I follow the instructions I only end up creating a formulate in a single cell - not the whole column. I don't want to use "Fill" or "Copy" because the number or rows in the sheet changes periodically and maintaining the formulas would be very tedious.

    Read the article

  • Can you explain how to understand what the 'iwconfig' command displays in Ubuntu-9.04?

    - by Shawn
    I'm having trouble making my wireless connection work, and I realized I don't really know how to use the tools I have, in this case, the iwconfig command in Ubuntu-9.04. Here is what I get: ***iwconfig*** - lo no wireless extensions. eth0 no wireless extensions. wmaster0 no wireless extensions. wlan0 IEEE 802.11bgn ESSID:"Network" Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated Tx-Power=20 dBm Retry min limit:7 RTS thr:off Fragment thr=2352 B Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 vboxnet0 no wireless extensions. pan0 no wireless extensions. "Network" is the name of my wireless network, btw. But what does this all mean? How can this information help me aquire a working wireless connection? When I try associating a key using sudo iwconfig wlan0 key s:my_key I get the following error message: Error for wireless request "Set Encode" (8B2A) : SET failed on device wlan0 ; Invalid argument. I do have the right key though, so what's the problem?

    Read the article

  • Can you explain how to understand what the 'iwconfig' command displays in Ubuntu-9.04?

    - by Shawn
    I'm having trouble making my wireless connection work, and I realized I don't really know how to use the tools I have, in this case, the iwconfig command in Ubuntu-9.04. Here is what I get: ***iwconfig*** - lo no wireless extensions. eth0 no wireless extensions. wmaster0 no wireless extensions. wlan0 IEEE 802.11bgn ESSID:"Network" Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated Tx-Power=20 dBm Retry min limit:7 RTS thr:off Fragment thr=2352 B Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 vboxnet0 no wireless extensions. pan0 no wireless extensions. "Network" is the name of my wireless network, btw. But what does this all mean? How can this information help me aquire a working wireless connection? When I try associating a key using sudo iwconfig wlan0 key s:my_key I get the following error message: Error for wireless request "Set Encode" (8B2A) : SET failed on device wlan0 ; Invalid argument. I do have the right key though, so what's the problem?

    Read the article

  • Silverlight Cream for March 11, 2010 -- #812

    - by Dave Campbell
    In this Issue: Walter Ferrari, Viktor Larsson, Bill Reiss(-2-, -3-, -4-), Jonathan van de Veen, Walt Ritscher, Jobi Joy, Pete Brown, Mike Taulty, and Mark Miller. Shoutouts: Going to MIX10? John Papa announced Got Questions? Ask the Experts at MIX10 Pete Brown listed The Essential WPF/Silverlight/XNA Developer and Designer Toolbox From SilverlightCream.com: How to extend Bing Maps Silverlight with an elevation profile graph - Part 2 In this second and final tutorial, Walter Ferrari adds elevation to his previous BingMaps post. I'm glad someone else worked this out for me :) Navigating AWAY from your Silverlight page Viktor Larsson has a post up on how to navigate to something other than your Silverlight page like maybe a mailto ... SilverSprite: Not just for XNA games any more Bill Reiss has a new version of SilverSprite up on CodePlex and if you're planning on doing any game development, you should check this out for sure Space Rocks game step 1: The game loop Bill Reiss has a tutorial series on Game development that he's beginning ... looks like a good thing to jump in on and play along. This first one is all about the game loop. Space Rocks game step 2: Sprites (part 1) In Part 2, Bill Reiss begins a series on Sprites in game development and positioning it. Space Rocks game step 3: Sprites (part 2) Bill Reiss's Part 3 is a follow-on tutorial on Sprites and moving according to velocity... fun stuff :) Adventures while building a Silverlight Enterprise application part No. 32 Jonathan van de Veen is discussing debugging and the evil you can get yourself wrapped up in... his scenario is definitely one to remember. Streaming Silverlight media from a Dropbox.com account Read the comments and the agreements, but I think Walt Ritscher's idea of using DropBox to serve up Streaming media is pretty cool! UniformGrid for Silverlight Jobi Joy wanted a UniformGrid like he's familiar with in WPF. Not finding one in the SDK or Toolkit, he converted the WPF one to Silverlight .. all good for you and me :) How to Get Started in WPF or Silverlight: A Learning Path for New Developers Pete Brown has a nice post up describing resources, tutorials, blogs, and books for devs just getting into Silveright or WPF, and thanks for the shoutout, Pete! Silverlight 4, MEF and the DeploymentCatalog ( again :-) ) Mike Taulty is revisiting the DeploymentCatalog to wrap it up in a class like he did the PackageCatalog previously MVVM with Prism 101 – Part 6b: Wrapping IClientChannel Mark Miller is back with a Part 6b on MVVM with Prism, and is answering some questions from the previous post and states his case against the client service proxy. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    MIX10

    Read the article

  • The Latest Dish: Black Eyed Peas to Headline at Appreciation Event

    - by Justin Kestelyn
    If you're coming to Oracle Develop Conference to fill up on content, collaboration, and community, be sure to save room for dessert. At the Wednesday evening "Appreciation Event," which is open to Oracle Develop, JavaOne, and Oracle OpenWorld Full Conference attendees, you'll be savoring the music of the world's hottest funk pop band, Black Eyed Peas, plus superstar rock legends Don Henley (of the Eagles) and Steve Miller. Save the date now: When: Wednesday, September 22, 8 p.m.­12 a.m. Where: Treasure Island, San Francisco Get all the details here!

    Read the article

  • Encrypting your SQL Server Passwords in Powershell

    - by laerte
    A couple of months ago, a friend of mine who is now bewitched by the seemingly supernatural abilities of Powershell (+1 for the team) asked me what, initially, appeared to be a trivial question: "Laerte, I do not have the luxury of being able to work with my SQL servers through Windows Authentication, and I need a way to automatically pass my username and password. How would you suggest I do this?" Given that I knew he, like me, was using the SQLPSX modules (an open source project created by Chad Miller; a fantastic library of reusable functions and PowerShell scripts), I merrily replied, "Simply pass the Username and Password in SQLPSX functions". He rather pointed responded: "My friend, I might as well pass: Username-'Me'-password 'NowEverybodyKnowsMyPassword'" As I do have the pleasure of working with Windows Authentication, I had not really thought this situation though yet (and thank goodness I only revealed my temporary ignorance to a friend, and the embarrassment was minimized). After discussing this puzzle with Chad Miller, he showed me some code for saving passwords on SQL Server Tables, which he had demo'd in his Powershell ETL session at Tampa SQL Saturday (and you can download the scripts from here). The solution seemed to be pretty much ready to go, so I showed it to my Authentication-impoverished friend, only to discover that we were only half-way there: "That's almost what I want, but the details need to be stored in my local txt file, together with the names of the servers that I'll actually use the Powershell scripts on. Something like: Server1,UserName,Password Server2,UserName,Password" I thought about it for just a few milliseconds (Ha! Of course I'm not telling you how long it actually took me, I have to do my own marketing, after all) and the solution was finally ready. First , we have to download Library-StringCripto (with many thanks to Steven Hystad), which is composed of two functions: One for encryption and other for decryption, both of which are used to manage the password. If you want to know more about the library, you can see more details in the help functions. Next, we have to create a txt file with your encrypted passwords:$ServerName = "Server1" $UserName = "Login1" $Password = "Senha1" $PasswordToEncrypt = "YourPassword" $UserNameEncrypt = Write-EncryptedString -inputstring $UserName -Password $PasswordToEncrypt $PasswordEncrypt = Write-EncryptedString -inputstring $Password -Password $PasswordToEncrypt "$($Servername),$($UserNameEncrypt),$($PasswordEncrypt)" | Out-File c:\temp\ServersSecurePassword.txt -Append $ServerName = "Server2" $UserName = "Login2" $Password = "senha2" $PasswordToEncrypt = "YourPassword" $UserNameEncrypt = Write-EncryptedString -inputstring $UserName -Password $PasswordToEncrypt $PasswordEncrypt = Write-EncryptedString -inputstring $Password -Password $PasswordToEncrypt "$($Servername),$($UserNameEncrypt),$($PasswordEncrypt)" | Out-File c:\temp\ ServersSecurePassword.txt -Append .And in the c:\temp\ServersSecurePassword.txt file which we've just created, you will find your Username and Password, all neatly encrypted. Let's take a look at what the txt looks like: .and in case you're wondering, Server names, Usernames and Passwords are all separated by commas. Decryption is actually much more simple:Read-EncryptedString -InputString $EncryptString -password "YourPassword" (Just remember that the Password you're trying to decrypt must be exactly the same as the encrypted phrase.) Finally, just to show you how smooth this solution is, let's say I want to use the Invoke-DBMaint function from SQLPSX to perform a checkdb on a system database: it's just a case of split, decrypt and be happy!Get-Content c:\temp\ServerSecurePassword.txt | foreach { [array] $Split = ($_).split(",") Invoke-DBMaint -server $($Split[0]) -UserName (Read-EncryptedString -InputString $Split[1] -password "YourPassword" ) -Password (Read-EncryptedString -InputString $Split[2] -password "YourPassword" ) -Databases "SYSTEM" -Action "CHECK_DB" -ReportOn c:\Temp } This is why I love Powershell.

    Read the article

  • WORK PLANS in 10 Minutes

    Most productive people use some form of a work plan to sort out what they need to do and to guide them when they are doing the work. People generally agree that they need a work plan for new work, b... [Author: Dr Neil Miller - Computers and Internet - August 24, 2009]

    Read the article

  • Apple publie une mise à jour de sécurité qui colmate la faille mise à jour lors du Pwn2Own 2010

    Apple a publié une mise à jour de sécurité pour Mac OS X Leopard et Mac OS X Snow Leopard, que ce soit la version normale ou la version Serveur. Cette mise à jour de sécurité colmate la faille que Charlie Miller avait mis à jour lors du Pwn2own 2010 qui s'était tenu fin mars. Voir http://support.apple.com/kb/HT4131 pour plus d'information sur la mise à jour sécurité 2010-003 Voir également Jusqu'ici, aucun navigateur ne résiste aux attaques des experts en séc...

    Read the article

  • Guide To Be An Active Facebook Member With Safety

    These days many people from all over the world have a fun time by browsing online social networking websites like Facebook. The reason is that they are the superb means to be in contact with friends ... [Author: Susan Miller - Computers and Internet - May 17, 2010]

    Read the article

  • Silverlight Cream for March 10, 2010 - 2 -- #811

    - by Dave Campbell
    In this Issue: AfricanGeek, Phil Middlemiss, Damon Payne, David Anson, Jesse Liberty, Jeremy Likness, Jobi Joy(-2-), Fredrik Normén, Bobby Diaz, and Mike Taulty(-2-). Shoutouts: Shawn Wildermuth blogged that they posted My "What's New in Silverlight 3" Video from 0reDev Last Fall Shawn Wildermuth also has a post up for his loyal followers: Where to See Me At MIX10 Jonas Follesø has presentation materials up as well: MVVM presentation from NDC2009 on Vimeo Adam Kinney updated his Favorite Tool and Library Downloads for Silverlight From SilverlightCream.com: Styling Silverlight ListBox with Blend 3 In his latest Video Tutorial, AfricanGeek is animating the ListBox control by way of Expression Blend 3. Animating the Silverlight Opacity Mask Phil Middlemiss has written a Behavior that lets you turn a FrameworkElement into an opacity mask for it's parent container... check out his tutorial and grab the code. AddRange for ObservableCollection in Silverlight 3 Damon Payne has a post up discussing the problem with large amounts of data in an ObservableCollection, and how using AddRange is a performance booster. Easily rotate the axis labels of a Silverlight/WPF Toolkit chart David Anson blogged a solution to rotating the axis labels of a Silverlight and WPF chart. Persisting the Configuration (Updated) Jesse Liberty has a good discussion on the continuation of his HyperVideo Platform talking about what all he is needing from the database in the form of configuration information... including the relationships. Animations and View Models: IAnimationDelegate Check out Jeremy Likness' IAnimationDelegate that lets your ViewModel fire and respond to animations without having to know all about them. Button Style - Silverlight Jobi Joy converted a WPF control template into Silverlight... and you'll want to download the XAML he's got for this :) A Simple Accordion banner using ListBox Jobi Joy also has an Image Accordian created in Expression Blend... and it's a 'drop this XAML in your User Control' kinda thing... again, go grab the XAML :) WCF RIA Services Silverlight Business Application – Using ASP.NET SiteMap for Navigation Fredrik Normén has a code-laden post up on RIA Services and the ASP.NET SiteMap. He is using the Silverlight Business app template that comes with WCF RIA Services. A Simple, Selectable Silverlight TextBlock (sort of)... Bobby Diaz shares with us his solution for a Text control that can be copied from in the same manner 'normal' web controls can be. He also includes a link to another post on the same topic. Silverlight 4 Beta Networking. Part 11 - WCF and TCP Mike Taulty has another pair of video tutorials up in his Networking series. This one is on WCF over TCP Silverlight 4 Beta Networking. Part 12 - WCF and Polling HTTP Mike Taulty's 12th networking video tutorial is on WCF with HTTP polling duplex. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    MIX10

    Read the article

  • Silverlight Cream for April 18, 2010 -- #840

    - by Dave Campbell
    In this Issue: CrocusGirl, Giorgetti Alessandro(-2-), smartyP, Pete Brown, David Poll, David Anson, and Bill Reiss. Shoutouts: Yasser Makram has a post up discussing Human Centered ALM with Telerik TeamPulse and Team Foundation Server. I saw this demo'd at DevConnnections and it definitely deserves a look. Shawn Wildermuth posted his materials from DevConnections all on one post: Back from DevConnections with SourceCode Shawn Wildermuth also posted an Updated RIA Services + MVVM Example Laurent Bugnion announced a Small change in MVVM Light Toolkit templates for Blend 4 RC Laurent Bugnion also announced Crowdsourcing MVVM Light Toolkit support The Expression Blend and Design Blog announced Expression Blend 4 Release Candidate Available! Dan Wahlin posted Slides and Code from my Silverlight MVVM Talk at DevConnections From SilverlightCream.com: Windows Phone 7 Design Notes – Part#1: Metro Resources CrocusGirl has blogged about WP7 and the Metro design concept. She has a bunch of resources up and information about Metro and the design methodology. Stay tuned for Part 2. Silverlight, M-V-VM ... and IoC - part 1 Giorgetti Alessandro has part 1 of a multi-parter up on IoC and MVVM for LOB apps in Silverlight ... a pretty quick into to MVVM. Silverlight, M-V-VM … and IoC – part 2 Giorgetti Alessandro also posted part 2 of his series, and this one digs deeper into the code and discusses what goes into the view and the model. Using the Facebook Developer Toolkit With Windows Phone 7 smartyP has a post addressing using the Facebook Developer toolkit with WP7... it took some hacking, and he explains it, and provides it for download. Silverlight and WPF Tip: Fitting items in a ListBox Having trouble fitting items into a Listbox in Silverlight or WPF without getting horizontal scrollbars? Pete Brown has a solution for you in 4 steps. Making printing easier in Silverlight 4 David Poll has a great detailed post up about printing in SL4, taking it to building a higher-level API that allows printing of collections... all demos and source included. Detailed information about the Silverlight Toolkit's new stacked series support David Anson details the improvements to Data Visualization in the Toolkit release from last week. Space Rocks game step 9: the asteroid sprite Bill Reiss has his latest game episode up and this time he's putting asteroid sprites in play. No placement, movement, or collisions yet, but it's a beginning. And, he's updated all his code to Silverlight 4. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • xml file save/read error (making a highscore system for XNA game)

    - by Eddy
    i get an error after i write player name to the file for second or third time (An unhandled exception of type 'System.InvalidOperationException' occurred in System.Xml.dll Additional information: There is an error in XML document (18, 17).) (in highscores load method In data = (HighScoreData)serializer.Deserialize(stream); it stops) the problem is that some how it adds additional "" at the end of my .dat file could anyone tell me how to fix this? the file before save looks: <?xml version="1.0"?> <HighScoreData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <PlayerName> <string>neil</string> <string>shawn</string> <string>mark</string> <string>cindy</string> <string>sam</string> </PlayerName> <Score> <int>200</int> <int>180</int> <int>150</int> <int>100</int> <int>50</int> </Score> <Count>5</Count> </HighScoreData> the file after save looks: <?xml version="1.0"?> <HighScoreData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <PlayerName> <string>Nick</string> <string>Nick</string> <string>neil</string> <string>shawn</string> <string>mark</string> </PlayerName> <Score> <int>210</int> <int>210</int> <int>200</int> <int>180</int> <int>150</int> </Score> <Count>5</Count> </HighScoreData>> the part of my code that does all of save load to xml is: DECLARATIONS PART [Serializable] public struct HighScoreData { public string[] PlayerName; public int[] Score; public int Count; public HighScoreData(int count) { PlayerName = new string[count]; Score = new int[count]; Count = count; } } IAsyncResult result = null; bool inputName; HighScoreData data; int Score = 0; public string NAME; public string HighScoresFilename = "highscores.dat"; Game1 constructor public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Width = graphics.PreferredBackBufferWidth = 960; Height = graphics.PreferredBackBufferHeight =640; GamerServicesComponent GSC = new GamerServicesComponent(this); Components.Add(GSC); } Inicialize function (end of it) protected override void Initialize() { //other game code base.Initialize(); string fullpath =Path.Combine(HighScoresFilename); if (!File.Exists(fullpath)) { //If the file doesn't exist, make a fake one... // Create the data to save data = new HighScoreData(5); data.PlayerName[0] = "neil"; data.Score[0] = 200; data.PlayerName[1] = "shawn"; data.Score[1] = 180; data.PlayerName[2] = "mark"; data.Score[2] = 150; data.PlayerName[3] = "cindy"; data.Score[3] = 100; data.PlayerName[4] = "sam"; data.Score[4] = 50; SaveHighScores(data, HighScoresFilename); } } all methods for loading saving and output public static void SaveHighScores(HighScoreData data, string filename) { // Get the path of the save game string fullpath = Path.Combine("highscores.dat"); // Open the file, creating it if necessary FileStream stream = File.Open(fullpath, FileMode.OpenOrCreate); try { // Convert the object to XML data and put it in the stream XmlSerializer serializer = new XmlSerializer(typeof(HighScoreData)); serializer.Serialize(stream, data); } finally { // Close the file stream.Close(); } } /* Load highscores */ public static HighScoreData LoadHighScores(string filename) { HighScoreData data; // Get the path of the save game string fullpath = Path.Combine("highscores.dat"); // Open the file FileStream stream = File.Open(fullpath, FileMode.OpenOrCreate, FileAccess.Read); try { // Read the data from the file XmlSerializer serializer = new XmlSerializer(typeof(HighScoreData)); data = (HighScoreData)serializer.Deserialize(stream);//this is the line // where program gives an error } finally { // Close the file stream.Close(); } return (data); } /* Save player highscore when game ends */ private void SaveHighScore() { // Create the data to saved HighScoreData data = LoadHighScores(HighScoresFilename); int scoreIndex = -1; for (int i = 0; i < data.Count ; i++) { if (Score > data.Score[i]) { scoreIndex = i; break; } } if (scoreIndex > -1) { //New high score found ... do swaps for (int i = data.Count - 1; i > scoreIndex; i--) { data.PlayerName[i] = data.PlayerName[i - 1]; data.Score[i] = data.Score[i - 1]; } data.PlayerName[scoreIndex] = NAME; //Retrieve User Name Here data.Score[scoreIndex] = Score; // Retrieve score here SaveHighScores(data, HighScoresFilename); } } /* Iterate through data if highscore is called and make the string to be saved*/ public string makeHighScoreString() { // Create the data to save HighScoreData data2 = LoadHighScores(HighScoresFilename); // Create scoreBoardString string scoreBoardString = "Highscores:\n\n"; for (int i = 0; i<5;i++) { scoreBoardString = scoreBoardString + data2.PlayerName[i] + "-" + data2.Score[i] + "\n"; } return scoreBoardString; } when ill make this work i will start this code when i call game over (now i start it when i press some buttons, so i could test it faster) public void InputYourName() { if (result == null && !Guide.IsVisible) { string title = "Name"; string description = "Write your name in order to save your Score"; string defaultText = "Nick"; PlayerIndex playerIndex = new PlayerIndex(); result= Guide.BeginShowKeyboardInput(playerIndex, title, description, defaultText, null, null); // NAME = result.ToString(); } if (result != null && result.IsCompleted) { NAME = Guide.EndShowKeyboardInput(result); result = null; inputName = false; SaveHighScore(); } } this where i call output to the screen (ill call this in highscores meniu section when i am done with debugging) spriteBatch.DrawString(Font1, "" + makeHighScoreString(),new Vector2(500,200), Color.White); }

    Read the article

  • YouTube Developers Live: Freebase API for YouTube Developers

    YouTube Developers Live: Freebase API for YouTube Developers In this video, a special guest from the Freebase team, Shawn Simister is giving an overview of the Freebase and Topics API for YouTube API V3. To learn more about the Freebase API, see wiki.freebase.com For YouTube API V3, you can find more information here: developers.google.com Catch us live on Wednesdays, 10am Pacific at developers.google.com From: GoogleDevelopers Views: 87 18 ratings Time: 28:00 More in Science & Technology

    Read the article

  • Google I/O 2012 - Knowledge-Based Application Design Patterns

    Google I/O 2012 - Knowledge-Based Application Design Patterns Shawn Simister In this talk we'll look at emerging design patterns for building web applications that take advantage of large-scale, structured data. We'll look at open datasets like Wikipedia and Freebase as well as structured markup like Schema.org and RDFa to see what new types of applications these technologies open up for developers. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1 0 ratings Time: 56:55 More in Science & Technology

    Read the article

  • How do HttpOnly cookies work with AJAX requests?

    - by Shawn Simon
    JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site? Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option? Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly? Edit 3: Here is a quote from Wikipedia: When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33]. I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only? In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object. <script type="text/javascript"> var req = null; try { req = new XMLHttpRequest(); } catch(e) {} if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} req.open('GET', 'http://beta.stackoverflow.com/', false); req.send(null); alert(req.getAllResponseHeaders()); </script> Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated... Final Edit: Ahh, apparently both sites are wrong, this is actually a bug in FireFox. IE6 & 7 are actually the only browsers that currently fully support HttpOnly. To reiterate everything I've learned: HttpOnly restricts all access to document.cookie in IE7 & and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies. edit: This information is likely no longer up to date.

    Read the article

  • Using SDL to replace colors using SDL Color Keys

    - by Shawn B
    Hey, I am working an a simple Roguelike game, and using SDL as the display. The Graphics for the game is an image of Codepage 437, with the background being black, and the font white. Instead of using many seperate image files that are already colored, I want to use one image file, and replace the colors when it is being loaded into memory. The code to split the codepage into a sprite sheet works properly, but when attempting to print in color, everything comes out in white. I had it working the past, but somehow I broke the code when changing it from change the color at print, to change the color on load. Here is the code to load the image: SDL_Surface *Screen,*Font[2]; SDL_Rect Character[256]; Uint8 ScreenY,ScreenX; Uint16 PrintX,PrintY,ScreenSizeY,ScreenSizeX; Uint32 Color[2]; void InitDisplay() { if(SDL_Init(SDL_INIT_VIDEO) == -1) { printf("SDL Init failed\n"); return; } ScreenSizeY = 600; ScreenSizeX = 800; Screen = SDL_SetVideoMode(ScreenSizeX,ScreenSizeY,32,SDL_HWSURFACE | SDL_RESIZABLE); SDL_WM_SetCaption("Alpha",NULL); SDL_Surface *Load; Load = IMG_Load("resource/font.png"); Font[0] = SDL_DisplayFormat(Load); SDL_FreeSurface(Load); Color[0] = SDL_MapRGB(Font[0]->format,255,255,255); Color[1] = SDL_MapRGB(Font[0]->format,255,0,0); Uint8 i,j,k = 0; PrintX = 0; PrintY = 0; for(i = 0; i < 16; i++) { for(j = 0; j < 16; j++) { Character[k].x = PrintX; Character[k].y = PrintY; Character[k].w = 8; Character[k].h = 12; k++; PrintX += 8; } PrintX = 0; PrintY += 12; } PrintX = 0; PrintY = 0; for(i = 1; i < 2; i++) { Font[i] = SDL_DisplayFormat(Font[0]); SDL_SetColorKey(Font[i],SDL_SRCCOLORKEY,Color[i]); SDL_FillRect(Font[i],&Font[i]->clip_rect,Color[i]); SDL_BlitSurface(Font[0],NULL,Font[i],NULL); SDL_SetColorKey(Font[0],0,Color[0]); } } The problem is with the last for loop above. I can't figure out why it isn't working. Any help is greatly appreciated!

    Read the article

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