Search Results

Search found 20869 results on 835 pages for 'things i hate'.

Page 160/835 | < Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >

  • UIButton title disappears on touch

    - by psychotik
    I want a touchable UILabel, but since that's not possible I decided to create a UIButton of type UIButtonTypeCustom. It looks how I want it to look, but when I touch it, the title disappears. I tried setting the title for state UIControlStateHighlighted but that didn't help. I know I'm doing something really silly here, but can't figure it out. I tried a few things (commented in the code below) which didn't seem to help. Here's how I'm configuring the button: UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0, 0, width, height); button.clearsContextBeforeDrawing = YES; button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; button.enabled = YES; button.hidden = NO; button.highlighted = NO; button.opaque = YES; button.selected = NO; button.userInteractionEnabled = YES; button.showsTouchWhenHighlighted = NO; [button setTitle:@"Hello World" forState:UIControlStateNormal]; button.titleLabel.font = [UIFont boldSystemFontOfSize:16]; button.titleLabel.textColor = [UIColor blackColor]; // Things I tried that didn't help //[button setBackgroundColor:[UIColor clearColor]]; //button.titleLabel.text = @"Hello World"; //[button setTitle:@"Hello World" forState:UIControlStateHighlighted]; Any ideas?

    Read the article

  • How to set default view in OpenLayers, WITHOUT restricting bounds?

    - by Jenny
    Based on samples, I can see that you can set a default view in OpenLayers by saying something along the lines of: var bounds = new OpenLayers.Bounds(-125, 25, -65, 50); var map = new OpenLayers.Map('map', {restrictedExtent: bounds }); However, this also (as the name implies), restricts me to be able to ONLY navigate within these bounds. I can zoom out and see things outside of these bounds, but I can't then zoom back onto them, or scroll to them. I've tried not having any restrictedExtent (or making it the entire map), but then I can't get it to focus on the area I want. I tried using: map.setCenter(new OpenLayers.LonLat(0,0), 3); console.log(map.getCenter()); To set the zoom and the center...but it doesn't seem to do ANYTHING, other than set the variable "center" which I can then read from map.getCenter() (if I don't set it, it's null, if I do set it, I can see it...but the map itself stays fully extended and it's center doesn't seem to change at all...) The Map layer I am using is: OpenLayers.Layer.OSM.Mapnik with displayOutsideMaxExtent set to true... I'm really at a loss here. My goal is to have a default region of the world zoomed in to and in view (such as the United States), with the option of viewers being able to go outside the default to view things.

    Read the article

  • Can it be important to call remove() on an EJB 3 stateless session bean? Perhaps on weblogic?

    - by Michael Borgwardt
    I'm in the process of migrating an EJB 2 application to EJB 3 (and what a satisfying task it is to delete all those deployment descriptors!). It used to run on Weblogic and now runs on Glassfish. The task is going very smoothly, but one thing makes me wary: The current code takes great care to ensure that EJBObject.remove() is called on the bean when it's done its job, and other developers have (unfortunately very vague) memories of "bad things" happening when that was not done. However, with EJB3, the implementation class does not implement EJBObject, so there is no remove() method to be called. And my understanding is that there isn't really any point at all in calling it on stateless session beans, since they are, well, stateless. Could these "bad things" have been weblogic-specific? If not, what else? Should I avoid the full EJB3 lightweightness and keep a remote interface that extends EJBObject? Or just write it off as cargo-cult programming and delete all those try/finally clauses? I'm leaning towards the latter, but now feeling very comfortable with it.

    Read the article

  • 2d Game Making > Where can someone get Free Tilesets?

    - by Iscariot
    I have been scouring the internet for free tilesets that are open to you. I have found http://lostgarden.com/ It does not seem very useful. There are a few things here and there, but overall not much to really make a game off of. http://www.flyingyogi.com/fun/spritelib.html Spritelib is a little better it has some useful information, but is still the graphics are more in the 8bit variety. http://reinerstileset.4players.de/ This is heavily stylized and its hard to have this match with any other free tile-sets available. All other sites I have found have just been rips from games and those are protected by a copyright and remain unusable. Right now I need simple objects to build the inside of buildings, but I have seem to have come up short in that area. I have plenty of things for outside of buildings, but nothing for in. I am hoping someone else has had this problem and has found a solution. If not, I hope the information I have provided can help someone else in their conquest.

    Read the article

  • Is it theoretically possible to emulate a human brain on a computer?

    - by JoelK
    Our brain consists of billions of neurons which basically work with all the incoming data from our senses, handle our consciousness, emotions and creativity as well as our hormone system, etc. So I'm completely new to this topic but doesn't each neuron have a fixed function? E.g.: If a signal of strength x enters, if the last signal was x ms ago, redirect it. From what I've learned in biology about our nerves system which includes our brain because both consist of simple neurons, it seems to me as our brain is one big, complicated computer. Maybe so complicated that things such as intelligence and cognition become possible? As the most complicated things about a neuron pretty much are the chemical aspects on generating an electric singal, keeping itself alive, and eventually segmenting itself, it should be pretty easy emulating some on a computer, or? You won't have to worry about keeping your virtual neuron alive, or? If you can emulate a single neuron on a computer, which shouldn't be too hard, could you theoretically emulate more than 1000 billions of them, recreating intelligence, cognition and maybe even creativity? In my question I'm leaving out the following aspects: Speed of our current (super) computers Actually writing a program for emulating neurons I don't know much about this topic, please tell me if I got anything wrong :) (My secret goal: Make a copy of my brain and store it on some 10 million TB HDD and make someone start it up in the future)

    Read the article

  • Windows xp blinking under score after bios

    - by heyjoe
    so this is for an older pc I have to repair for a friend. The pc has an hdd of about 60 something gb, It uses win xp and let's say 60-70% of the boots it hangs on showing only an underscore bilking line after bios screen, rest of the times it boots fine or the computer shuts down on xp loading screen. Sometimes if you let it alone while the underscore is blinking, it will boot after a while, like a few minutes, some times it won't boot at all even if you give him more time, like one hour. When it boots successfully the pc seems to work fine. I think it's a bad hard disk and i'm about to suggest buying a new one and switching it but I don't have enough experience and i would hate making him buy a new hdd and not solving the problem. anyone has any tips? I know there are other topics about blinking underscores or cursors while xp is booting but the issues about the pc shutting itself down or sometimes booting really freaks me out. Can't format everything and re install until about 10 days from now, cause the dude has some program for his business on this pc and I have to migrate it when the next computer arrives, however he needs to use it until then. so please advise, thx.

    Read the article

  • Does anybody have any tips for managing polymorphic nested resources in Rails 3?

    - by Ryan
    in config/routes.rb: resources posts do resources comments end resources pictures do resources comments end I would like to allow for more things to be commented on as well. I'm currently using mongoid (mongomapper isn't as compatible with rails3 yet as I would like), and comments are an embedded resource (mongoid can't yet handle polymorphic relational resources), which means that I do need the parent resource in order to find the comment. Are there any elegant ways to handle some of the following problems: in my controller, I need to find the parent before finding the comment. if params[:post_id] parent = Post.find(params[:post_id] else if params[:picture_id] parent = Picture.find(params[:picture_id] end which is going to get messy if I start adding more things to be commentable also url_for([comment.parent,comment]) doesn't work, so I'm going to have to define something in my Comment model, but I think I'm also going to need to define an index route in the Comment model as well as potentially an edit and new route definition. There might be more issues that I have to deal with as I get further. I can't imagine I'm the first person to try and solve this problem, are there any solutions out there to make this more manageable?

    Read the article

  • Why Can't Businesses Upgrade their Browsers from IE6/IE7?

    - by viatropos
    I have read lots these past few weeks on IE6, seeing if it was really that bad to make it look right. I have just learned HTML and CSS this past year so I've been spoiled to start with basically CSS3 and HTML5, and I can do some really cool stuff super fast. I'm no IE6 master and I don't have years of experience with IE. So I thought it'd take a little time to figure out all the hacks to IE6/7 discovered and just implement them. But it's way harder than that (or maybe just way too much work). I'd have to either completely rebuild my design using "Internet Explorer 'Principles'", or cut out a lot of the neat things I could do using more recent technologies. For a million and one other reasons, everyone who builds things online seems to think IE should die. My question is, why can't businesses upgrade their browsers? When I work with businesses, they almost always resist the first time I ask, but 5 seconds later I'll show them what it looks like on my computer and talk about how great the latest stuff is (how much more secure later browser are, all the famous IE security cases, how much smoother and faster they new browsers are, how the IE team has basically missed the boat entirely, how much smoother business processes run, etc.), and they get excited! And within a few seconds they're up and running with Chrome or something. So can businesses not upgrade for some reasons? What are the reasons a business cannot upgrade? The main reason I think of is because they have an old version of windows. But a) wasn't there a legal case against this? and b) somebody must have figured out how to install Chrome or Firefox on ancient versions of Windows by now.

    Read the article

  • Best practice on structuring asynchronous mailers (using Sidekiq)

    - by gbdev
    Just wondering what's the best way to go about structuring asynchronous mailers in my Rails app (using Sidekiq)? I have one ActionMailer class with multiple methods/emails... notifier.rb: class Notifier < ActionMailer::Base default from: "\"Company Name\" <[email protected]>" default_url_options[:host] = Rails.env.production? ? 'domain.com' : 'localhost:5000' def welcome_email(user) @user = user mail to: @user.email, subject: "Thanks for signing up!" end ... def password_reset(user) @user = user @edit_password_reset_url = edit_password_reset_url(user.perishable_token) mail to: @user.email, subject: "Password Reset" end end Then for example, the password_reset mail is sent in my User model by doing... user.rb: def deliver_password_reset_instructions! reset_perishable_token! NotifierWorker.perform_async(self) end notifier_worker.rb: class NotifierWorker include Sidekiq::Worker sidekiq_options queue: "mail" def perform(user) Notifier.password_reset(user).deliver end end So I guess I'm wondering a couple things here... Is it possible to define many "perform" actions in one single worker? By doing so I could keep things simple (one notifier/mail worker) as I have it and send many different emails through it. Or should I create many workers? One for each mailer (e.g. WelcomeEmailWorker, PasswordResetWorker, etc) and just assign them all to use the same "mail" queue with Sidekiq. I know it works as it is, but should I break out each of those mail methods (welcome_email, password_reset, etc) into individually mailer classes or is it ok to have them all under one class like Notifier? Really appreciate any advice here. Thanks!

    Read the article

  • Finding patterns of failure in a Unit Test

    - by Pekka
    I'm new to Unit Testing, and I'm only getting into the routine of building test suites. I have what is going to be a rather large project that I want to build tests for from the start. I'm trying to figure out general strategies and patterns for building test suites. When you look at a class, many tests come to you obviously due to the nature of the class. Say for a "user account" class with basic CRUD operations, being related to a database table, we will want to test - well, the CRUD. creating an object and seeing whether it exists query its properties change some properties change some properties to incorrect values and delete it again. As for how to break things, there are "fail" tests common to most CRUD classes like: Invalid input data types A number as the ID key that exceeds the range of the chosen data type Input in an incorrect character encoding Input that is too long And so on and so on. For a unit test concerned with file operations, the list of "breaking things" could be Invalid characters in file name File name too long File name uses incorrect protocol or path I'm pretty sure similar patterns - applicable beyond the unit test one is currently working on - can be found for most units that are being tested. Now my question is: Am I correct in seeing such "breaking patterns"? Or am I getting something completely wrong about Unit testing, and if I did it right, this wouldn't be an issue at all? Is Unit Testing as a process of finding as many ways to break the unit as possible the right way to go? If I am correct: Are there existing definitions, lists, cheat sheets for such patterns? Are there any provisions (mainly in PHPUnit, as that's the framework I'm working in) to automate such patterns? Is there any assistance - in the form of check lists, or software - to aid in writing complete tests?

    Read the article

  • Good functions and techniques for dealing with haskell tuples?

    - by toofarsideways
    I've been doing a lot of work with tuples and lists of tuples recently and I've been wondering if I'm being sensible. Things feel awkward and clunky which for me signals that I'm doing something wrong. For example I've written three convenience functions for getting the first, second and third value in a tuple of 3 values. Is there a better way I'm missing? Are there more general functions that allow you to compose and manipulate tuple data? Here are some things I am trying to do that feel should be generalisable. Extracting values: Do I need to create a version of fst,snd,etc... for tuples of size two, three, four and five, etc...? fst3(x,_,_) = x fst4(x,_,_,_) = x Manipulating values: Can you increment the last value in a list of pairs and then use that same function to increment the last value in a list of triples? Zipping and Unzipping values: There is a zip and a zip3. Do I also need a zip4? or is there some way of creating a general zip function? Sorry if this seems subjective, I honestly don't know if this is even possible or if I'm wasting my time writing 3 extra functions every time I need a general solution. Thank you for any help you can give!

    Read the article

  • When to use basic types (Integer, String), and when to write a new class?

    - by belgarat
    Stackoverflow users: A lot of things can be represented in programs by using the basic types, or we can create a new class for it. Example: A social security number can be a number, string or its own object. (Other common examples: Phone numbers, names, zip codes, user id, order id and other id's.) My question is: When should the basic types be used, and when should we write ourselves a new class? I see that when you need to add behavior, you'll want to create a class (example, social security number parsing, validation, formatting, etc). But is this the only criteria? I have come across cases where many of these things are represented as java Integers and/or Strings. We loose the benefit of type-checking, and I have often seen bugs caused by parameters being mixed in calls to function(Intever, Integer, Integer, Integer). On the other hand, some programmers are opposed to over-designing by creating classes for "eveything". Obviously, the answer is "it depends". But, what do you think, and what do you normally do?

    Read the article

  • fastest way to check to see if a certain index in a linq statement is null

    - by tehdoommarine
    Basic Details I have a linq statement that grabs some records from a database and puts them in a System.Linq.Enumerable: var someRecords = someRepoAttachedToDatabase.Where(p=>true); Suppose this grabs tons (25k+) of records, and i need to perform operations on all of them. to speed things up, I have to decided to use paging and perform the operations needed in blocks of 100 instead of all of the records at the same time. The Question The line in question is the line where I count the number of records in the subset to see if we are on the last page; if the number of records in subset is less than the size of paging - then that means there are no more records left. What I would like to know is what is the fastest way to do this? Code in Question int pageSize = 100; bool moreData = true; int currentPage = 1; while (moreData) { var subsetOfRecords = someRecords.Skip((currentPage - 1) * pageSize).Take(pageSize); //this is also a System.Linq.Enumerable if (subsetOfRecords.Count() < pageSize){ moreData = false;} //line in question //do stuff to records in subset currentPage++; } Things I Have Considered subsetOfRecords.Count() < pageSize subsetOfRecords.ElementAt(pageSize - 1) == null (causes out of bounds exception - can catch exception and set moreData to false there) Converting subsetOfRecords to an array (converting someRecords to an array will not work due to the way subsetOfRecords is declared - but I am open to changing it) I'm sure there are plenty of other ideas that I have missed.

    Read the article

  • Google Chrome 'ruined' after someone else logged in

    - by MHJ96
    Google Chrome was the default browser that came with my laptop. I have a Google account which I was logged into Chrome with. Someone else logged into my chrome using their account which has resulted in everything being lost. I logged in again to find my theme, bookmarks, history, most visited sites were gone and now instead of 'piling up' under the symbol already pinned to the Windows 7 task bar it opens a second symbol on the taskbar and 'piles up' under that instead which has never happened before. I have tried unpinning and repinning which didn't work. I have tried syncing my account numerous times to no avail, I have searched high and low on the Chrome forums for any kind of answer. I have tried accessing that thing in documents to try and recover my bookmarks but I can't find them (I had hidden files enabled etc etc). I really really want it back how it was as I had a lot of bookmarked sites and quick access to sites and everything was how i used it, and I hate that it now opens a new icon on the taskbar.

    Read the article

  • C# Sql Connection Best Practises 2013

    - by Pete Petersen
    With the new year approaching I'm drawing up a development plan for 2013. I won't bore you with the details but I started thinking about whether the way I do things is actually the 'correct' way. In particular how I'm interfacing with SQL. I create predominantly create WPF desktop applications and often some Silverlight Web Applications. All of my programs are very Data-Centric. When connecting to SQL from WPF I tend to use Stored Procedures stored on the server and fetch them using ADO.NET (e.g. SQLConnection(), .ExecuteQuery()). However with Silverlight I have a WCF service and use LINQ to SQL (and I'm using LINQ much more in WPF). My question is really is am I doing anything wrong in a sense that it's a little old fashioned? I've tried to look this up online but could find anything useful after about 2010 and of those half were 'LINQ is dead!' and the other 'Always use LINQ' Just want to make sure going forward I'm doing the right things the right way, or at least the advised way :). What principles are you using when connecting to SQL? Is it the same for WPF and Silverlight/WCF?

    Read the article

  • Why does a MFC application behaves mysteriously in encrypted hard drive environment.

    - by MauriceL
    I'm working on a bug where I have an MFC application that does weird things when installed in when Sophos Safeguard hard drive encryption is installed. I'm sorry to be so vague here, but I'm writing this away from the office so this is all from my (poor) memory. Three things I've noticed: AfxGetResourceHandle() doesn't return a consistent resource handle. There is a single case where we try to load a string resource, and for some reason, the resource handle that we get from this method is different to all the other stings. Can't construct a CDocumentTemplate. There is a trace error which I cant seem to recall. Will edit and post when I'm in tomorrow. This behaviour appears to manifest in a Visual Studio 2005 version of the project, but not a Visual Studio 2008 version. Unfortunately moving to the 2008 version is not an option. The bug is not always reproducable if I step through with a debugger. Also, bringing up debug message boxes changes the behaviuor, which leads me to think that either there is some kind of race condition going on with the way MFC events are being handled, but I'm not sure how I'll ever know for sure, or even what I can do about it if I did. I think there's some underlying reason that the app is behaving weirdly, but what I've posted are more symptoms. Can anyone think of what I should check for? I've run Windows update on the test environment to ensure everything was up to date, and I've examined the process in procmon to see if the disk encryption stuff was getting in the way and conflicting with files - it didn't appear to be, but it does appear to be involved in some way as our app accesses Sophos related paths in the temp directory.

    Read the article

  • What are the first steps in C#/.NET development?

    - by paxdiablo
    Okay, I'm biting the bullet and deciding to get into the whole Microsoft/C#/.NET culture and I'm going to do this by putting together a simple (hah!) application. It will basically be an application in which I want to store images and associate with them other optional things. It must be able to import images from the filesystem (and hopefully camera/scanner) then allow the user to add text, audio and other information. I plan to store the images and auxillary information into a database. What the application will do with said data isn't important (yet). Keep in mind I know absolutely nothing about C# or .NET although, as an old codger, I know a great deal about many other things and will regale you with stories and anecdotes until you quietly slip away :-) What are the first steps to take in developing such an application? I've already set out UI layouts and likely process flows although it may be that the development environment dictates changes. Development environment is currently XP SP3 + VS2008 (though I can upgrade if absolutely necessary). What should I be looking at as the first step? Are there any gotchas I should be looking out for?

    Read the article

  • CSS: position:absolute inside position:relative, but not affecting parent?

    - by JP
    <style> #special p { display:none; } #special:hover p { display:block; } </style> <table> <tr> <td style="width:200px">Things</td> <td style="position:relative; width:220px"> <div style="position:absolute;right:0" id="special"> <img id="shows" /> <p>Variable width upto, say 600px (Will be hidden until this td is :hovered</p> </div> </td> </tr> </table> Can I make this work? Ie, can I make the #special p expand over the top of 'Things'? As I currently have it set up #special won't ever grow outside the 220px wide td. Any ideas?

    Read the article

  • How to easily apply a function to a collection in C++

    - by Jesse Beder
    I'm storing images as arrays, templated based on the type of their elements, like Image<unsigned> or Image<float>, etc. Frequently, I need to perform operations on these images; for example, I might need to add two images, or square an image (elementwise), and so on. All of the operations are elementwise. I'd like get as close as possible to writing things like: float Add(float a, float b) { return a+b; } Image<float> result = Add(img1, img2); and even better, things like complex ComplexCombine(float a, float b) { return complex(a, b); } Image<complex> result = ComplexCombine(img1, img2); or struct FindMax { unsigned currentMax; FindMax(): currentMax(0) {} void operator(unsigned a) { if(a > currentMax) currentMax = a; } }; FindMax findMax; findMax(img); findMax.currentMax; // now contains the maximum value of 'img' Now, I obviously can't exactly do that; I've written something so that I can call: Image<float> result = Apply(img1, img2, Add); but I can't seem to figure out a generic way for it to detect the return type of the function/function object passed, so my ComplexCombine example above is out; also, I have to write a new one for each number of arguments I'd like to pass (which seems inevitable). Any thoughts on how to achieve this (with as little boilerplate code as possible)?

    Read the article

  • Determining Best Table Structure for MySQL Performance

    - by Joe Majewski
    I'm working on a browser-based RPG for one of my websites, and right now I'm trying to determine the best way to organize my SQL tables for performance and maintenance. Here's my question: Does the number of columns in an SQL table affect the speed in which it can be queried? I am not a newbie when it comes to PHP or MySQL. I used to develop things with the common goal of getting them to work, but I've recently advanced to the stage where a functional program is not good enough unless it's fast and reliable. Anyways, right now I have a members table that has around 15 columns. It contains information such as the player's username, password, email, logins, page views, etcetera. It doesn't contain any information on the player's progress in the game, however. If I added columns for things such as army size, gold, turns, and whatnot, then it could easily rise to around 40 or 50 total columns. Oh, and my database structure IS normalized. Will a table with 50 columns that gets constantly queried be a bad idea? Should I split it into two tables; one for the user's general information and one for the user's game statistics? I know I could check the query time myself, but I haven't actually created the tables yet and I think I'd be better off with some professional advice on this important decision for my game. Thank you for your time! :)

    Read the article

  • Best approach to cache Counts from SQL tables ?

    - by pixel3cs
    I would like to develop a Forum from scratch, with special needs and customization. I would like to prepare my forum for intensive usage and wondering how to cache things like User posts count and User replies count. Having only three tables, tblForum, tblForumTopics, tblForumReplies, what is the best approach of cache the User topics and replies counts ? Think at a simple scenario: user press a link and open the Replies.aspx?id=x&page=y page, and start reading replies. On the HTTP Request, the server will run an SQL command wich will fetch all replies for that page, also "inner joining with tblForumReplies to find out the number of User replies for each user that replied." select tblForumReplies.*, tblFR.TotalReplies from tblForumReplies inner join ( select IdRepliedBy, count(*) as TotalReplies from tblForumReplies group by IdRepliedBy ) as tblFR on tblFR.IdRepliedBy = tblForumReplies.IdRepliedBy Unfortunately this approach is very cpu intensive, and I would like to see your ideas of how to cache things like table Counts. If counting replies for each user on insert/delete, and store it in a separate field, how to syncronize with manual data changing. Suppose I will manually delete Replies from SQL.

    Read the article

  • How do I simplify my code?

    - by Mitchell Skurnik
    I just finished creating my first major application in C#/Silverlight. In the end the total line count came out to over 12,000 lines of code. Considering this was a rewrite of a php/javascript application I created 2 years that was over 28,000 lines I am actually quite proud of my accomplishment. After reading many questions and answers here on stackoverflow and other sites online, I followed many posters advice: I created classes, procedures, and such for things that I would have a year ago copied and pasted; I created logic charts to figure out complex functions; making sure there are no crazy hidden characters (used tabs instead of spaces); and a few others things; place comments where necessary (I have lots of comments). My application consists of 4 tiles laid out horizontally that have user controls loaded into each slice. You can have between one and four slices loaded at anytime. If you have once slice loaded, the slice takes up the entire artboard...if you have 2 loaded, each take up half, 3 a third, 4 a quarter. Each one of these slices represent (for the sake of this example) a light control. Each slice has 3 slider controls in it. Now when I coded the functionality of the sliders, I used a switch/case statement inside of a public function that would run the command on the specified slice/slider. The made for some duplicate code but I saw no way around it as each slice was named differently. So I would do slice1.my.commands(); slice2.my.commands(); etc. My question to you is how do I clean up my code even futher? (Sadly I cannot post any of my code). Is there any way to take this repetion out of my code?

    Read the article

  • How does an ASP.NET programmer go from working on/developing existing sites, to creating one from sc

    - by SLC
    I've been an ASP.NET developer for some time, always working on existing ASP.NET pages, modifying functionality, adding features, tweaking things etc. but have never built a site up from scratch. I've read books on ASP.NET, and they generally talk you through the various features of ASP.NET with a mock up site, but it's always very basic and they jump straight in. The time has come however, to write a site from scratch for a client. I've never done this before. There are design considerations, but like a lot of ASP.NET sites, the basic idea is, you have a site, where users can log in, and save some information like their name and password and address. The site has some functionality, but that's the basic design of a majority of (business-related) asp.net websites I would wager. I know how to program in ASP.NET already on an existing site, but I don't know how to design my own properly that meets the criteria above. I guess the main worry is security. I don't know the best way to handle a simple log-in system that stores user information like their name and password. I understand there are a few approaches to this, but the catch with this project is that it has to be absolutely bulletproof. Maximum security. All those good practices for security, it needs to have them all. I'm not asking what they are, but I am asking where to begin. What should be the first steps after I do File New Project ? Where can I look for information about setting up a secure ASP.NET website? I'll figure out the content and page layout later, it's the framework that is the big thing. Any and all advice would be welcome. I really want to get my first from-scratch project right from the beginning. Just to confuse things, it's possible I will be using MVC, I am not sure if this has any impact.

    Read the article

  • Is is possible to stringstream this way? to convert from string to int?

    - by John
    Is it possible to stringstream like this? I am trying to read with ifstream and convert it. string things = "10 11 12 -10"; int i1; int i2; int i3; int i4; stringstream into; into << things; into >> i1; into >> i2; into >> i3; into >> i4; I expect it to be : i1 = 10 i2 = 11 i3 = 12 i4 = -10 is that correct? Can the same stringstream variable be used multiple times? When I tried, the first time was ok but everything else later on is just 0.

    Read the article

  • What are good examples of perfectly acceptable approaches to development that are NOT test driven development (TDD)?

    - by markbruns
    The TDD cycle is test, code, refactor, (repeat) and then ship. TDD implies development that is driven by testing, specifically that means understanding requirements and then writing tests first before developing or writing code. My natural inclination is a philosophical bias in favor of TDD; I would like to be convinced that there are other approaches that now work well or even better than TDD so I have asked this question. What are examples of perfectly acceptable approaches that NOT test driven development? I can think of plenty approaches that are not TDD but could be a lot more trouble than what they are worth ... it's not moral judgement, it's just that they are cost more than they are worth ... the following are simply examples of things that might be ok as learning exercises, but approaches I'd find to be NOT acceptable in serious production and NOT TDD might include: Inspecting quality into your product -- Focusing efforts on developing a proficiency in testing/QA can be problematic, especially if you don't work on the requirements and development side first ... symptom of this include bug triaging where the developers have so many different bugs to deal with it, it is necessary to employ a form of triage -- each development cycle gets worse and worse, programmers work more and more hours, sleep less and less, struggle to keep going in death march until they are consumed. Superstition ... believing in things that you don't understand -- this would involve borrowing code that you believe has been proven or tested from somewhere, e.g. legacy code, a magic code starter wizard or an open source project, and you go forward hacking up a storm of modifications, sliding FaceBook Connect into your the user interface, inventing some new magic features on the fly (e.g. a mashup using the Twitter API, GoogleMaps API and maybe Zappos API), showing off your cool new "product" to a few people and then writing up a simple "specification" and list of "test cases" and turning that over to Mechanical Turk for testing.

    Read the article

< Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >