Search Results

Search found 12772 results on 511 pages for 'the little schemer'.

Page 86/511 | < Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >

  • Question about Target parameter of Matrix.CreateLookAt

    - by manning18
    I have a newbie question that's causing me a little bit of confusion when experimenting with cameras and reading other peoples implementations - does this parameter represent a point or a vector? In some examples I've seen people treat it like a specific point they are looking at (eg a position in the world), other times I see people caching the orientation of the camera in a rotation matrix and simply using the Matrix.Forward property as the "target", and other times it's a vector that's the result of targetPos - camPos and also I saw a camPos + orientation.Forward I was also just playing around with hard-coded target positions with same direction eg 1 to 10000 with no discernible difference in what I saw in the scene. Is the "Target" parameter actually a position or a direction (irrespective of magnitude)? Are there any subtle differences in behaviors, common mistakes or gotchas that are associated with what values you provide, or HOW you provide this paramter? Are all the methods I mentioned above equivalent? (sorry, I've only recently started and my math is still catching up)

    Read the article

  • Beginner's guide to writing comments?

    - by Cameron
    Is there a definitive guide to writing code comments, aimed at budding developers? Ideally, it would cover when comments should (and should not) be used, and what comments should contain. This answer: Do not comment WHAT you are doing, but WHY you are doing it. The WHAT is taken care of by clean, readable and simple code with proper choice of variable names to support it. Comments show a higher level structure to the code that can't be (or is hard to) show by the code itself. comes close, but it's a little concise for inexperienced programmers (an expansion on that with several examples and corner cases would be excellent, I think).

    Read the article

  • Linux Learning curve for a 'Lifetime' windows user [closed]

    - by gary
    I am using windows for almost 8-10 years and have never worked on linux. Mostly i used to work in VB, VC++ MFC and little bit of .NET(C# and VB) so i didn't bother about Linux. But now when i got an opportunity to work with linux i dont want to miss it, here are my questions : Where can i find useful resources for Linux newbies? Which books/Tutorials will you suggest to start? Which distro shall i use? What was your experience while moving from Windows to Linux?

    Read the article

  • Comparing Checksums

    - by Sean Feldman
    This is something trivial, yet got me to think for a little. I had two checksums, one received from a client invoking a service, another one calculated once data sent into service is received. Checksums are plain arrays of bytes. I wanted to have comparison to be expressed as simple as possible. Quick google search brought me to a post that dealt with the same issue. But linq expression was too chatty and I think the solution was a bit muddy. So I looked a bit more into linq options presented in the post, and this is what ended up using: var matching = original_checksum.SequenceEqual(new_checksum); Sometimes things are so simple, we tend to overcomplicate them.

    Read the article

  • Web Service - SOAP

    - by seth
    My experience with web services is slim and I'm trying to understand this a little bit more. I have done for instance a web service using visual studio. In order to use it, I add a web service reference in my projects and this creates a proxy and the use is pretty simple. Does this use SOAP? I ask this because i will be now facing a web service that i must communicate using SOAP with attachements and i'm trying to understand the concept behind this and the difference to what i have done so far. Will the proxy still be viable or do i need to create the XML by hand and post it to the web service? This concepts still confuse and so any help is appreciated. EDIT: I'm not developing the service, i will be just using it.

    Read the article

  • Using a Predicate as a key to a Dictionary

    - by Tom Hines
    I really love Linq and Lambda Expressions in C#.  I also love certain community forums and programming websites like DaniWeb. A user on DaniWeb posted a question about comparing the results of a game that is like poker (5-card stud), but is played with dice. The question stemmed around determining what was the winning hand.  I looked at the question and issued some comments and suggestions toward a potential answer, but I thought it was a neat homework exercise. [A little explanation] I eventually realized not only could I compare the results of the hands (by name) with a certain construct – I could also compare the values of the individual dice with the same construct. That piece of code eventually became a Dictionary with the KEY as a Predicate<int> and the Value a Func<T> that returns a string from the another structure that contains the mapping of an ENUM to a string.  In one instance, that string is the name of the hand and in another instance, it is a string (CSV) representation of of the digits in the hand. An added benefit is that the digits re returned in the order they would be for a proper poker hand.  For instance the hand 1,2,5,3,1 would be returned as ONE_PAIR (1,1,5,3,2). [Getting to the point] 1: using System; 2: using System.Collections.Generic; 3:   4: namespace DicePoker 5: { 6: using KVP_E2S = KeyValuePair<CDicePoker.E_DICE_POKER_HAND_VAL, string>; 7: public partial class CDicePoker 8: { 9: /// <summary> 10: /// Magical construction to determine the winner of given hand Key/Value. 11: /// </summary> 12: private static Dictionary<Predicate<int>, Func<List<KVP_E2S>, string>> 13: map_prd2fn = new Dictionary<Predicate<int>, Func<List<KVP_E2S>, string>> 14: { 15: {new Predicate<int>(i => i.Equals(0)), PlayerTie},//first tie 16:   17: {new Predicate<int>(i => i > 0), 18: (m => string.Format("Player One wins\n1={0}({1})\n2={2}({3})", 19: m[0].Key, m[0].Value, m[1].Key, m[1].Value))}, 20:   21: {new Predicate<int>(i => i < 0), 22: (m => string.Format("Player Two wins\n2={2}({3})\n1={0}({1})", 23: m[0].Key, m[0].Value, m[1].Key, m[1].Value))}, 24:   25: {new Predicate<int>(i => i.Equals(0)), 26: (m => string.Format("Tie({0}) \n1={1}\n2={2}", 27: m[0].Key, m[0].Value, m[1].Value))} 28: }; 29: } 30: } When this is called, the code calls the Invoke method of the predicate to return a bool.  The first on matching true will have its value invoked. 1: private static Func<DICE_HAND, E_DICE_POKER_HAND_VAL> GetHandEval = dh => 2: map_dph2fn[map_dph2fn.Keys.Where(enm2fn => enm2fn(dh)).First()]; After coming up with this process, I realized (with a little modification) it could be called to evaluate the individual values in the dice hand in the event of a tie. 1: private static Func<List<KVP_E2S>, string> PlayerTie = lst_kvp => 2: map_prd2fn.Skip(1) 3: .Where(x => x.Key.Invoke(RenderDigits(dhPlayerOne).CompareTo(RenderDigits(dhPlayerTwo)))) 4: .Select(s => s.Value) 5: .First().Invoke(lst_kvp); After that, I realized I could now create a program completely without “if” statements or “for” loops! 1: static void Main(string[] args) 2: { 3: Dictionary<Predicate<int>, Action<Action<string>>> main = new Dictionary<Predicate<int>, Action<Action<string>>> 4: { 5: {(i => i.Equals(0)), PlayGame}, 6: {(i => true), Usage} 7: }; 8:   9: main[main.Keys.Where(m => m.Invoke(args.Length)).First()].Invoke(Display); 10: } …and there you have it. :) ZIPPED Project

    Read the article

  • Do private static methods in C# hurt anything?

    - by fish
    I created a private validation method for a certain validation that happens multiple times in my class (I can't store the validated data for various reasons). Now, ReSharper suggests that the function could be made static. I'm a little reluctant to do so due known problems with static methods. It would be a private static method. My question is, can private static methods cause similar coupling and testing problems like public static methods? Is it a bad practice? I would guess not, but I'm not sure if there is a pitfall here.

    Read the article

  • Electrified Light Saber Helps You Slay Bugs Like a Jedi [Video]

    - by Jason Fitzpatrick
    This fun little DIY project combines a toy light saber with the guts of an electrified fly-swatter to yield a bug slaying sword perfect for your epic battles against the Empire’s tiniest soldiers. Courtesy of Caleb over at Hack A Day, the build is surprisingly simple and quick to put together (if you’re handy with a screw driver and soldering iron). Check out the video above to see the build and the results or hit up the link below to read more about it. Building a Bug Zapping Light Saber [Hack A Day] How to Make Your Laptop Choose a Wired Connection Instead of Wireless HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me?

    Read the article

  • WCF service and security

    - by Gaz83
    Been building a WP7 app and now I need it to communicate to a WCF service I made to make changes to an SQL database. I am a little concerned about security as the user name and password for accessing the SQL database is in the App.Config. I have read in places that you can encrypt the user name and password in the config file. As the username and password is never exposed to the clients connected to the WCF service, would security in my situation be much of a problem? Just in case anyone suggests a method of security, I do not have SSL on my web server.

    Read the article

  • Repurpose an Old Android Phone as a Thermostat

    - by Jason Fitzpatrick
    If you’re interested in setting up a smart thermostat but put off by the high price of models like the Nest Learning Thermostat, this DIY project uses an old Android phone and a little DIY wiring to automate and network your home heating and cooling. What the project lacks for in terms of a polished off-the-shelf presentation, it certainly makes up for in versatility. Check out the above video to see Android Thermostat in action then hit up the link below for more information about the project–including the source code, build schematics, and more. Android Thermostat [via Hack A Day] Why Enabling “Do Not Track” Doesn’t Stop You From Being Tracked HTG Explains: What is the Windows Page File and Should You Disable It? How To Get a Better Wireless Signal and Reduce Wireless Network Interference

    Read the article

  • Backward compatibility with event-sourcing

    - by Tomas Jansson
    How do you stay backward compatible with event-sourcing? Let say you release a version that has one kind of event, let call it X. You know how to handle that event in all the systems that extracts the events from the event source. In a later release you make a change to event X or delete it, how do you stay backward compatible with that? To have a fully functional system you need to be able to handle the old event as the same time as you need to handle the updated version. Or if you delete that event type, then you will be stuck with code that is only there to handle legacy events which in my head can be a little bit messy in the long run.

    Read the article

  • I feel stuck in the center of Python, How to get past beginner

    - by Isov5
    I really apologize if this doesn't follow the S.O rules but I need a little help, I personally still classify myself as a beginner in python, Yet I've wrote a very small and VERY SURE impractical program for my boss to use. I know I'm still a beginner because simple things still perplex me but every book I read for beginners honestly just rehashes what I do already know but every 'more advanced' book doesn't really allow me to learn, they depend on example files and I never really understand why they built 'said' function or 'said' class. So onto my question... Is there any recommendations on a book or ANYTHING that pushes me out of this stage, I've used head first and normally they are really good but my issue there is they have me back tracking just to move forward again, It worked in HTML but its confusing in Python, basically I think I need to build a program while following along, Again I like HeadFirst's style but I need something that isn't going to make me have to remember one thing just to forget it... for record, I've checked into some O'Reilly books

    Read the article

  • Displaying Tweets in an ASP.NET UserControl with TweetSharp

    As I mentioned in my previous blog post, I'll be having a little fun over the next few weeks talking about all of the Social Media APIs I've been experimenting with. I thought I would start out today by talking about one of the most popular services, Twitter. Twitter is essentially a microblogging service that allows its users to post messages of up to 140 characters long known as Tweets. Users can subscribe to each other and see tweets from all of their subscriptions in their main feed listings. Due to this ease of providing and receiving updates to and from the masses, Twitter has been adopted by anything from bloggers to celebrities to large corporations. If you have a blog or just a website in general, having a Twitter account alongside it could potentially be a useful way to attract new visitors. Displaying your tweets on your website and ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Portal Turret Recreation an Amazing Clone of the Original [Video]

    - by Jason Fitzpatrick
    Last week Valve, the company behind the Portal series, received a crate containing a stunning replica of the iconic Portal turret sentry. Check out this video to see the turret in action. Valve explains the origin of the crate: On September 13th, 2012, Valve received another mysterious crate from WETA Workshop. Inside was a full-scale, articulated Portal turret, complete with a motion sensor. Once again, WETA Workshop’s gone far, far beyond our expectations to deliver something truly amazing. Thank you, WETA Workshop! If you’re ready to waste a little time geeking out over awesome props, designs, and other special FX goodies, you’ll definitely want to check out WETA’s site. [via Geeks Are Sexy] How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • How do freelancers know how much their work is worth?

    - by Qmal
    I want to start a bit of freelancing in web development using ASP.NET MVC3 and PHP and I already have some people who are interested in hiring me, but I still can't figure out how much to charge for projects since I have never done it. For example how much would this site cost? Would it cost more if the author built it from scratch instead of using WordPress as the CMS? Or what about a simpler site like this? How much time spent is considered good/normal for building sites like these? And maybe some freelancers with experience can tell me what the usual requests are that they get from clients. What sites are the most in demand? I'm asking because I'm a student and I really can't work every day in a full-time job but I need the money so I guess a little freelancing would help me out.

    Read the article

  • The Basics of Project Management / Software Development

    - by Sam
    It suddenly struck me today that I have never developed any large application or worked with a team of programmers, and so am missing out a lot - both in terms of technical knowledge and the social-fun part of it. And I would like to rectify that - an idea is to start an open source group by training college students (for no charge) and developing some open source application with them. Please give me some basic advice on the whole process of how to (1) plan and (2) manage projects in a team. What new skill sets would you recommend? (I have read joel on software and 37 Signals, and got many insightful tips from them. But I'd like a little more technical knowledge ...) Background (freelancer, past 4+ years) - Computer engineer graphic / web designer online marketing moved on to programming in PHP, Perl, Python did Oracle DBA OCP training to understand DB's current self-assigned title - web application developer.

    Read the article

  • How to show context menu when right-click released?

    - by Kev
    I'm using Ubuntu 10.04. When I right-click, menu popup too quickly, and the first menu item is clicked. If I right-click in desktop, it create a new folder sometime. If I right-click in terminal, it open a new terminal sometime. ... Is there some way to delay context menu? Or how can I offset context menu a little bit pixels to the right-bottom direction? (like firefox) Or how can I config Gnome to popup menu when right-mouse released? (like windows xp)

    Read the article

  • Live Meeting error: malformed email address... or IS IT???

    - by PeterBrunone
    During a remote SharePoint training session this morning, Live Meeting presented one of our instructors with the following gem:  "An attendee email address is malformed".  This was particularly troubling since a wizard took care of adding all the entries, and they looked correct (even after being sifted through my character analysis tool).As it turns out, the addresses were indeed correct.  As sometimes happens, though, at the line breaks, it looked like there was no space between the semicolon and the following email address.  Since I'm a member in good standing of the "I wonder what this button does" school of thought, I added an extra space after each of these cramped little semicolons -- and the invitation executed flawlessly.Coincidence?  Maybe... but you can bet I'm going to keep trying dumb stuff like that when the error message doesn't make sense.  Think of it as the tech support equivalent of "Ask a silly question..."

    Read the article

  • Conditional formatting of duplicate values in Excel

    - by jamiet
    One of the infrequent pleasures of being a data geek like me is that one does occasionally stumble across little-known yet incredibly useful features in a tool that you use day-in, day-out. Today this happened to me and the feature is Excel’s ability to highlight dupicate rows in a worksheet. Check this out: Notice that I have got some data in my worksheet that contains duplicated values and simply by selecting Conditional Formatting->Highlight Cells Rules->Duplicate Values… Excel will highlight (shown here in red) which rows are duplicated. It seem such a simple thing but when you’re working on a data integration project and the data that is being sent is of, well, let’s say dubious quality features like this are worth their weight in gold. I tweeted about this and it happened to catch a few people’s attention so I figured it might be worth blogging too. Note that I am using Excel 2013 but I happen to know that the feature exists in Excel 2010 and possibly in earlier versions too. Have a great weekend! @Jamiet

    Read the article

  • Building Paths Fluently

    - by PSteele
    If you ever need to “build” a path (i.e. “C:\folder1\subfolder”), you really should be using Path.Combine.  It makes sure the trailing directory separator is in between the two paths (and it puts the appropriate character in – DirectorySeparatorChar).  I wanted an easier way to build a path than having to constantly call Path.Combine so I created a handy little extension method that lets me build paths “fluently”: public static string PathCombine(this string path1, string path2) { return Path.Combine(path1, path2); } Now I can write code like this: var dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) .PathCombine("Folder1") .PathCombine("Folder2"); Technorati Tags: .NET,Extension Methods,Fluent

    Read the article

  • Game Engines with real time lighting

    - by Maik Klein
    I am studying computer graphics since 3 semesters and we just started with OpenGL. I really enjoy it and want to create my own little engine for learning purposes. I already read tons of different forum posts and saw the following engines. Panda3d, Ogre3d, NeoAxis, Irrlicht and Horde3d(graphics only). Now I don't want to use something like Unity or CryEngine because I want to start more low level. Which of those engines is suited for real-time rendering? Something that CryEngine offers - no baked lightmaps. Or at least gives me the option to add a real-time renderer?

    Read the article

  • The Effects of Caffeine [Video]

    - by Jason Fitzpatrick
    Whether in a cup, a can, or a little bottle, millions of us slug back caffeinated beverages everyday. Check out this video to see how it effects your brain and why it keeps you alert. Courtesy of Alex Dainis at Bite Sci-zed, we’re treated to a rather energetic look at the function of caffeine in the body. Caffeine!! – Bite Sci-zed [via Geeks Are Sexy] How To Delete, Move, or Rename Locked Files in Windows HTG Explains: Why Screen Savers Are No Longer Necessary 6 Ways Windows 8 Is More Secure Than Windows 7

    Read the article

  • How do I import Amazon MP3s with Banshee and the new Amazon Cloud Player?

    - by adempewolff
    Banshee's Amazon MP3 Import extension until recently allowed seamless importing of songs purchased from Amazon MP3. It did this by a)opening .amz files and using them to connect to and download the purchased files from Amazon's servers, and b) using hooks in Banshee's built-in browser to automatically recognize and open the .amz files when clicked on in the browser. However, recently this functionality stopped working. Banshee will display Contacting Server in the lower left hand corner for a little while and then stop. Furthermore opening the Amazon Cloud Player in the Banshee browser or any other browser on a Linux system to manually download the .amz file now results in the message: On Linux systems, Cloud Player only supports downloading songs one at a time. To download your music, deselect all checkboxes, select the checkbox for the song you want to download, then click the "Download" button. How can I get around this and import my purchased music into Banshee as I used to?

    Read the article

  • How can I use the Windows key?

    - by torbengb
    The Windows key seems to not have any use in Ubuntu, but since I'm just coming from Windows I'm used to this key having some function. How can I make good use of the Windows key in Ubuntu? I've seen that I can remap keys in SystemPreferencesKeyboardLayoutOptionsAlt/Win key behavior, but I have no idea what the choices meta, super, hyper mean. The help button in this dialog doesn't give any specifics about them. I've experimented a little and found that meta seems to have some use, like Win+M = Me menu, or Win+S is the shutdown menu, but for some keys (B, I) it's more like Ctrl (bold, italic). Haven't found any further. What would a useful setting be for a Linux newbie?

    Read the article

  • Removed Xserver driver. ubuntu doesnt start. what should i Do?

    - by user71576
    im new on ubuntu , i intalled it ( dual booted with windows 7) i was customizing it, but when i tried to run compiz it said that missing glx or something like that in the screen, i realized that the driver that i was not using wasnt the gefroce on so i went to nvidia downloaded the correct version for my graphic ( geforce gtm 525m) when y run the .run file it told me that i was using xserver and that i cant install this driver with the xserver installed. i search for information of how to remove or disable xserver i found one. in this web site --http://www.ubuntugeek.com/ubuntu-tiphow-to-removeinstall-and-reconfigure-xorg-without-reinstalling-ubuntu.html when i run the command , after that i tried to instal the geforce on, doesnt work so i remember windows that you must reboot after a driver unintallation or intallation so i reboot, them ubuntu doesnto load, it show the ubuntu whit the five dots like or 1-2 sec and them i get a black screen ( not the red-black of ubutntu ) so why i should do. i dont want to re install i dont have a cd and my usb is a little damaged so please if you could help me

    Read the article

< Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >