Daily Archives

Articles indexed Friday June 11 2010

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

  • book "Programming Role Playing Games with DirectX 2nd edition" and newer DirectX api

    - by numerical25
    I got the book "Programming Role Playing Games with DirectX 2nd edition" and I notice there are things in the book that are now considered deprecated. There is a whole Section on DirectPlay. And as much as I would like to avoid this section, I am afraid it might screw up the entire engine he is trying to build. So I was just curious to know even though DirectPlay is considered deprecated by XNA, and directX10. Is it possible to use it still in DirectX 9 ??

    Read the article

  • An appropriate C API for inspecting attribute values

    - by uk82
    There are two obvious ways in C to provide outside access to internal attribute values (A) provide a generic interface that accepts a list of attributes that changes over time (some added / some die) or (B) a specific interface for each and every attribute. Example A: int x_get_attribute_value(ATT att) { if (a) return a_val; if (b) return b_val; } Example B: A_Enum x_get_a_type_attribute() {} B_Enum x_get_b_type_attribute() {} I recall that Eclipse's API is very much like A (I could be wrong). What I can't do is come up with a compelling argument against either. A is clean - any user will no where to go to find out a property value. It can evolve cleanly without leaving dead interfaces around. B has type checking to a degree - this is C enums! Is there a big hitter argument that pushes the balance away from opinion?

    Read the article

  • ASP.NET/Vb.net: How to create a frame after an image is uploaded ?

    - by stighy
    Hi guys, i would like to create a fixed size frame for user photos uploaded. I've tought: i, can create a fixed sized image (200 width x 600 height for example), with my personal frame (top, left, bottom, right element graphics) , and in the center a transparency. Ok, but i don't know how to merge the photo into the frame and save the new photo format. Does anybody have some piece of code to help me ? Thank you!

    Read the article

  • c# application and configuration settings

    - by Maks
    Hi, I never used Settings class before but I found some articles on CodeProject which I'm currently reading (for example http://www.codeproject.com/KB/cs/PropertiesSettings.aspx) but so far I didn't see how to save string array for getting it after application is started next time. For example my application has several FileSystemWatcher instances, with each instance several other directories are connected (for example one FSW instance is monitoring one directory for a change and when it happens it copies some file to several other directories), so I would have one string array with watched paths representing FSW instances, and string array for each of those paths, representing directories that are affected. My question is, what should I use (Settings class or something else), and how should I use that for storing application configuration that is variable number of string arrays? Emphasize is on something I could use very soon as I don't have too much time to make custom class (but would have to if I cannot find solution) or dig into some obscure hacks. Any tutorial link, code snippet would be very helpful. Thanks.

    Read the article

  • SharpFFmpeg dll references

    - by Rodney Burton
    Looking at SharpFFmpeg project (c# interop library for ffmpeg) I noticed it references avcodec.dll and avformat.dll. What I have are libavcodec.dll and libavformat.dll. Are these the same and if not where do the non-lib versions come from?

    Read the article

  • How to keep multiple connectionString passwords safe, separate, and easy to deploy?

    - by Funka
    I know there are plenty of questions here already about this topic (I've read through as many as I could find), but I haven't yet been able to figure out how best to satisfy my particular criteria. Here are the goals: The ASP.NET application will run on a few different web servers, including localhost workstations for development. This means encrypting web.config using a machine key is out. The application will decide which connection string to use based on the server name (using a switch statement). For example, "localhost" and "dev.example.com" will use the DevDatabaseConnectionString, "test.example.com" will use the TestDatabaseConnectionString, and "www.example.com" will use the ProdDatabaseConnectionString, for example. Ideally, the exact same executables and web.config should be able to run on any of these environments, without needing to tailor or configure each environment separately every time that we deploy (something that seems like it would be easy to forget/mess up one day during a deployment, which is why we moved away from having just one connectionstring that has to be changed on each target). Deployment is currently accomplished via FTP. We will not have command-line access to the production web server. This means using aspnet_regiis.exe is out. (I could run on localhost, however, if this would still work.) We would prefer to not have to recompile the application whenever a password changes, so using web.config (or db.config or whatever) seems to make the most sense. A developer should not be able to decrypt the production database password. If a developer checks the source code out onto their localhost laptop (which would determine that it should be using the DevDatabaseConnectionString, remember?) and the laptop gets lost or stolen, it should not be possible to get at the other connection strings. Thus, having a single RSA private key to un-encrypt all three passwords cannot be considered. (Contrary to #3 above, it does seem like we'd need to have three separate key files if we went this route; these could be installed once per machine, and should the wrong key file get deployed to the wrong server, the worst that should happen is that the app can't decrypt anything---and not allow the wrong host to access the wrong database!) I know this is probably a subjective question (asking for a "best" way to do something), but given the criteria I've mentioned, I'm hoping that a single best answer will indeed arise. Thank you!

    Read the article

  • Spaces in type attribute for Behavior Extension Configuration Issues

    - by Shawn Cicoria
    If you’ve deployed your WCF Behavior Extension, and you get a Configuration Error, it might just be you’re lacking a space between your “Type” name and the “Assembly” name. You'll get the following error message: Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions So, if you’ve entered as below without <system.serviceModel> <extensions> <behaviorExtensions> <add name="appFabricE2E" type="Fabrikam.Services.AppFabricE2EBehaviorElement,Fabrikam.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> </behaviorExtensions> </extensions> The following will work – notice the additional space between the Type name and the Assembly name: <system.serviceModel> <extensions> <behaviorExtensions> <add name="appFabricE2E" type="Fabrikam.Services.AppFabricE2EBehaviorElement,Fabrikam.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> </behaviorExtensions> </extensions>

    Read the article

  • Reasonably Secure Alternative to Poptop PPTP Server for Ubuntu server and Windows clients?

    - by wag2639
    I have a poptp server running on a old Fedora server but I'm upgrading to an Ubuntu 10.04 server. I was wondering if there are any good, reasonable secure alternatives to poptop that in can install on our new Ubuntu server as a way to get VPN access from Windows clients (XP and 7) to get remote access into our Intranet. We only use the VPN to access files located inside the network; we do not need to use it as a proxy/gateway. I've looked into openVPN but it seemed way too complicated and I would prefer something built into Windows. A Windows 7 only solution is OK.

    Read the article

  • cPanel WHM virtualhost sample

    - by Prix
    Hi, Could anyone possible post a virtual host sample from a working httpd server, if possible with the most features enabled (like suPHP, suExec, php directives such as engine on off and others) ? The reason is that i wanted to see how it is formarted, and built per vhost... it's been a long time i dont use cPanel nor have it available so i can't really get it, i've been googling for it but havent found it at all. Much appreciated.

    Read the article

  • Moving LiveMeeting admin functions to a different window

    - by Rob Farley
    I run a user group, and often host LiveMeeting sessions. I use a projector, with a crowd watching. How do I do the admin stuff (respond to Q&A, etc) on one window, and just have the video on the 'extended monitor'? I dont' want the people in the audience to see anything except the video feed, but I want to be able to watch questions come in, etc... Note: I don't have a problem extending the screen across the two monitors - I already have different stuff showing on my screen compared to the projector. I just want a way to put the LM video on Monitor 2 (projector), and the LM controls on Monitor 1.

    Read the article

  • WCF custom certificate validation with BasicHttpBinding

    - by Sprklnh2o
    I have a WCF application hosted on IIS 6 that needs to Have 2-way SSL authentication Validate client certificate content with some client host information Validate client certificate is issued by the valid subCA. I was able to do 1) successfully. I am trying to achieve 2) and 3) by following this - basically creating a class that inherits X509CertificateValidator and overriding the Validate method with my own validation implementation(step 2 and 3). I followed the MSDN instructions exactly however, it seem that the Validate method is not being called. I purposely throw a SecurityAccessDeniedException in the overidden Validate method and no exception is thrown when I tried to access the service via my browser. I can still access my website with any client certificate. I also read this thread but it didn't really help. Any help would be greatly appreciated! Here's my configuration: <system.serviceModel> <services> <service behaviorConfiguration="SimpleServiceBehavior" name="SampleNameSpace.SampleClass"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="NewBinding0" contract="SampleNameSpace.ISampleClass" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="SimpleServiceBehavior"> <serviceMetadata httpsGetEnabled="true" policyVersion="Default" /> <serviceCredentials> <clientCertificate> <authentication certificateValidationMode="Custom" customCertificateValidatorType="SampleNameSpace.MyX509CertificateValidator, SampleAssembly"/> </clientCertificate> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="NewBinding0"> <security mode="Transport"> <transport clientCredentialType="Certificate" /> </security> </binding> </basicHttpBinding> </bindings>

    Read the article

  • Needed inputs for helping hospitals/practices save money on mandatory compliance Policies and Course

    - by user363414
    Recently one of my clients came up to me and asked "Is there any way we can save some money on mandatory compliance policies and courses, and I started wondering what can I do? I started creating a calculator to show some savings if they used elearning. I wanted your input to validate that data. How many Policies your practice/hospital need to sign and average number of pages per policy? Also how many employees need to sign these policies? This would be really helpful and once I have this done I will send a copy to you as well.

    Read the article

  • Linq to SQL Error with Many-to-Many table

    - by Matt Connolly
    I am getting the following error with linq-to-sql when I try to access a many-to-many collection: Members 'Int32 XXX' and 'Int32 YYY' both marked as IsPrimaryKey and IsDbGenerated. The statement is true, in that both of those columns are primary key integers with identity insert. The table I am trying to access has a foreign key to both YYY and ZZZ, and then ZZZ has a foreign key to XXX. There doesn't appear to be anything wrong with my data structure. I tried setting "Child Property" to false on the ZZZ-YYY relationship, but it didn't change anything.

    Read the article

  • My server app works strangely. What could be the reason(s)?

    - by Poni
    Hi! I've written a server app (two parts actually; proxy server and a game server) using C++ (board game). It uses IOCP as the sockets interface. For that app I've also written a "client simulator" (hereafter "client") app that spawns many client connections, where each of them plays, in very high speed, getting the CPU to be 100% utilized. So, that's how it goes in terms of topology: Game server - holds the game state. Real players do not connect it directly but through the proxy server. When a player joins a game, the proxy actually asks for it on behalf of that player, and the game server spawns a "player instance" for that player, and from now on, every notification between the game server and the player is being passed through the proxy. Proxy server - holds TCP connections with the real players. Players communicate with the game server through it only. Client simulator - connects to the proxy only. When running the server (again, it's actually two server apps) & client locally it all works just fine. I'm talking about 40k+ player instances in which all of them are active in a game. On the other hand, when running the server remotely with, say, 1000 clients who play things getting strange. For example, I run it as said above. Then with Task Manager I kill the client simulator app ("End Process Tree"). Then it seems like the buffer of the remote server got modified by another thread, or in other words, a memory corruption has been occurred. The server crashes because it got an unknown message id (it's a custom protocol where each message has it's own unique number). To make things clear, here is how I run the apps: PC1 - game server and clients simulator (because the clients will connect the proxy). PC2 - proxy server. The strangest thing is this: Only the remote side gets "corrupted". Remote in terms that it's not the PC I use to code the app (VC++ 2008). Let's call the PC I use to code the apps "PC1". Now for example, if this time I ran the game server on PC1 (it means that proxy server on PC2 and clients simulator on PC1), then the proxy server crashes with an "unknown message id" error. Another variation is when I run the proxy server on PC1 (again, the dev machine), the game server and the clients simulator on PC2, then the game server on PC2 gets crashed. As for the IOCP config: The servers' internal connections use the default receive/send buffer sizes. Tried even with setting them to 1MB, but no luck. I have three PCs in total; 2 x Vista 64bit <<-- one of those is the dev machine. The other is connected through WiFi. 1 x WinXP 32bit They're all connected in a "full duplex" manner. What could be the reason? Tried about everything; Stack tracing, recording some actions (like read/write logging).. I want to stress that only the PC I'm not using to code the apps crashes (actually the server app "role" which is running on it - sometimes the game server and sometimes the proxy server). At first I thought that maybe the wireless PC has problems (it's wireless..) but: TCP has it's own mechanisms to make sure the packet is delivered properly. Also, a crash also happens when trying it with the two PCs that are physically connected (Vista vs. XP). Another option is that the Windows DLLs versions might have problems, but then again, one of the tests is Vista vs. Vista, and the other is Vista vs. XP. Any idea?

    Read the article

  • C#: Why am I still getting an RCW error when exiting my application?

    - by shifuimam
    To be specific, the error is: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss. The application in question is a small applet that displays the current clock speed of the CPU as a system tray icon. I'm using a System.Timers.Timer object to refresh the systray icon at an interval of 2.5 seconds. There's a single context menu item to exit the application, which uses the following function to unload everything: public void ExitApp(object sender, EventArgs e) { //stop and disable the timer theInterval.Stop(); theInterval.Enabled = false; //unload the system tray icon TheIcon.Visible = false; //exit the application Application.Exit(); } If I take out everything but Application.Exit(); I get an RCW error and the systray icon doesn't go away until I mouse over it. Everything was working perfectly until I changed the window style of the hidden form used to initialize the systray icon and the timer. If it helps any, I'm using C# 2010 Express.

    Read the article

  • iPhone NSString drawAtPoint linebreakmodeWordWrap

    - by hecta
    Hello, Since I had a very slow scrolling tableView I'm now trying to catch up with the direct draw method, similiar to the Tweetie App sample or Apples TableViewSuite code. So right now I'm struggling to draw NSString with more than one line. I'm using the [NSString drawAtPoint: forWidth: withFont: linebreakMode:] method, and it "breaks" the line, but it doesn't show the second line, it just cuts the rest of the string off. Is this a normal behavior and what can be the solution to multiple lines?

    Read the article

  • C# + Querying XML with LINQ

    - by user336786
    Hello, I'm learning to use LINQ. I have seen some videos online that have really impressed me. In an effort to learn LINQ myself, I decided to try to write a query to the NOAA web service. If you put "http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?zipCodeList=20001&format=24+hourly&startDate=2010-06-10&numDays=5" in your browser's address bar, you will see some XML. I have successfully retrieved that XML in a C# program. I am loading the XML into a LINQable entity by doing the following: string xml = QueryWeatherService(); XDocument weather = XDocument.Parse(xml); I have a class called DailyForecast defined as follows: public class DailyForecast { public float HighTemperature { get; set; } public float LowTemperature { get; set; } public float PrecipitationPossibility { get; set; } public string WeatherSummary { get; set; } } I'm trying write a LINQ query that adheres to the structure of my DailyForecast class. At this time, I've only gotten to this far: var results = from day in response.Descendants("parameters") select day; Not very far I know. Because of the structure of the XML returned, I'm not sure it is possible to solely use a LINQ query. I think the only way to do this is via a loop and traverse the XML. I'm seeking someone to correct me if I'm wrong. Can someone please tell me if I can get results using purely LINQ that adhere to the structure of the DailyForecast class? If so, how? Thank you!

    Read the article

  • svn:externals a sub-folder of a git project

    - by dgaspar
    Hi, is there a way to get only a part (ex: a sub-folder called /library) of a github.com project and use it in svn:externals? What I'm doing now is $svn pe svn:externals . SomeLibrary http://svn.github.com/myuser/myproject.git But I don't want everything from the project... I need something like: $svn pe svn:externals . SomeLibrary http://svn.github.com/myuser/myproject.git/library

    Read the article

  • Is there an Emacs-analog for the VI '.' command to repeat-last-typed-text

    - by Don
    I've used emacs for decades and always wondered, but kept on coding, if there was a way to type in something, them move the cursor and insert the same text, like the VI . command. Instead what I do is to type the text, set the mark, backup, copy the region, go to the next spot (often just C-n, down one line) and then pre-arg yank, C-u C-y. It's the overhead of set mark, backup and copy region that makes me just go ahead and retype the thing.

    Read the article

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