Search Results

Search found 1668 results on 67 pages for 'ben ward'.

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

  • Permissions restoring from Time Machine - Finder copy vs "cp" copy

    - by Ben Challenor
    Note: this question was starting to sprawl so I rewrote it. I have a folder that I'm trying to restore from a Time Machine backup. Using cp -R works fine, but certain folders cannot be restored with either the Time Machine UI or Finder. Other users have reported similar errors and the cp -R workaround was suggested (e.g. Restoring from Time Machine - Permissions Error). But I wanted to understand: Why cp -R works when the Finder and the Time Machine UI do not. Whether I could prevent the errors by changing file permissions before the backup. There do indeed seem to be some permissions that Finder works with and some that it does not. I've narrowed the errors down to folders with the user ben (that's me) and the group wheel. Here's a simplified reproduction. I have four folders with the owner/group combinations I've seen so far: ben ~/Desktop/test $ ls -lea total 16 drwxr-xr-x 7 ben staff 238 27 Nov 14:31 . drwx------+ 17 ben staff 578 27 Nov 14:29 .. 0: group:everyone deny delete -rw-r--r--@ 1 ben staff 6148 27 Nov 14:31 .DS_Store drwxr-xr-x 3 ben staff 102 27 Nov 14:30 ben-staff drwxr-xr-x 3 ben wheel 102 27 Nov 14:30 ben-wheel drwxr-xr-x 3 root admin 102 27 Nov 14:31 root-admin drwxr-xr-x 3 root wheel 102 27 Nov 14:31 root-wheel Each contains a single file called file with the same owner/group: ben ~/Desktop/test $ cd ben-staff ben ~/Desktop/test/ben-staff $ ls -lea total 0 drwxr-xr-x 3 ben staff 102 27 Nov 14:30 . drwxr-xr-x 7 ben staff 238 27 Nov 14:31 .. -rw-r--r-- 1 ben staff 0 27 Nov 14:30 file In the backup, they look like this: ben /Volumes/Deimos/Backups.backupdb/Ben’s MacBook Air/Latest/Macintosh HD/Users/ben/Desktop/test $ ls -leA total 16 -rw-r--r--@ 1 ben staff 6148 27 Nov 14:34 .DS_Store 0: group:everyone deny write,delete,append,writeattr,writeextattr,chown drwxr-xr-x@ 3 ben staff 102 27 Nov 14:51 ben-staff 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown drwxr-xr-x@ 3 ben wheel 102 27 Nov 14:51 ben-wheel 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown drwxr-xr-x@ 3 root admin 102 27 Nov 14:52 root-admin 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown drwxr-xr-x@ 3 root wheel 102 27 Nov 14:52 root-wheel 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown Of these, ben-staff can be restored with Finder without errors. root-wheel and root-admin ask for my password and then restore without errors. But ben-wheel does not prompt for my password and gives the error: The operation can’t be completed because you don’t have permission to access “file”. Interestingly, I can restore the file from this folder by dragging it directly to my local drive (instead of dragging its parent folder), but when I do so its permissions are changed to ben/staff. Here are the permissions after the restore for the three folders that worked correctly, and the file from ben-wheel that was changed to ben/staff. ben ~/Desktop/test-restore $ ls -leA total 16 -rw-r--r--@ 1 ben staff 6148 27 Nov 14:46 .DS_Store drwxr-xr-x 3 ben staff 102 27 Nov 14:30 ben-staff -rw-r--r-- 1 ben staff 0 27 Nov 14:30 file drwxr-xr-x 3 root admin 102 27 Nov 14:31 root-admin drwxr-xr-x 3 root wheel 102 27 Nov 14:31 root-wheel Can anyone explain this behaviour? Why do Finder and the Time Machine UI break with the ben / wheel permissions? And why does cp -R work (even without sudo)?

    Read the article

  • Silverlight TV with Myself, John Papa, Shawn Wildermuth and Ward Bell

    - by dwahlin
    I had the chance to go on a live episode of Channel 9 while at DevConnections and had a lot of fun chatting about various Silverlight topics and answering some fairly unique questions posted on Twitter.  Here’s more info on the episode from John Papa’s blog: John interviews a panel of 3 well known Silverlight leaders including Shawn Wildermuth, Dan Wahlin, and Ward Bell at the Silverlight 4 launch event. The guest panel answers questions sent in from Twitter about the features in Silverlight 4, thoughts on MVVM, and the panel members' experiences developing Silverlight. This is a great chance to hear from some of the leading Silverlight minds. These guys are all experts at building business applications with Silverlight. Relevant links: John's Blog and on Twitter (@john_papa) Shawn's Blog and on Twitter (@shawnwildermuth) Dan's Blog and on Twitter (@danwahlin) Ward's Blog and on Twitter (@wardbell) Silverlight Training Course on Channel 9 Follow us on Twitter @SilverlightTV or on the web at http://silverlight.tv You can see the episode online by clicking the image below:

    Read the article

  • Book Review: Getting Started With Window 8 Apps By Ben Dewey

    - by Tim Murphy
    When O’Reilly gave me an opportunity to review this book I was excited.  It gave me a reason to finally put some time into this new platform and what developers will need to learn in order to be successful. This book by Ben Dewey is only 92 pages long, so if you were looking for an in-depth treatment of Windows 8 development you will need supplemental materials.  It is also due for an update from the perspective of recent changes made by Microsoft prior to the final release of the OS and tools.  This causes a few issues if you try to run the code samples because of namespace changes. I was encouraged by the fact that the author didn’t do the typical “hello world” app.  He uses a lot of pattern based development techniques and hits many of the main topics including: Application lifecycle Charms integration Tiles Sensors The lifecycle is critical for anyone who hasn’t done mobile development before.  Limited resources on these devices mean that the OS can suspend or kill your app altogether if it decides it needs to.  He covers tombstoning which is the key to Windows 8 and Windows Phone lifecycle management. He also dedicates a chapter to marketing and distributing the application you build.  From my experience with Windows Phone development this is crucial information.  You need to know how to test your application so that it is going to pass certification and present your app so that it is going to get noticed amongst thousands of other apps. The main things that I wish had been in the book explanations of more of the common controls and more complete explanation of patterns that were implemented. In the end this book is a good foundation getting exposure to the concepts that underlie this new version of the Windows platform and how it effects developers.  It isn’t a book that I would suggest for someone just getting into development with no understanding of pattern based development. del.icio.us Tags: Windows 8,O'Reilly,Ben Dewey,Book Review,Review

    Read the article

  • Silverlight TV 23: MVP Q&A with WWW (Wildermuth, Wahlin and Ward)

    John interviews a panel of 3 well known Silverlight leaders including Shawn Wildermuth, Dan Wahlin, and Ward Bell at the Silverlight 4 launch event. The guest panel answers questions sent in from Twitter about the features in Silverlight 4, thoughts on MVVM, and the panel members' experiences developing Silverlight. This is a great chance to hear from some of the leading Silverlight minds. These guys are all experts at building business applications with Silverlight. Relevant links: John's Blog...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

  • Itzik Ben-Gan is in town

    - by Dave Ballantyne
    Not that you would know it from the page below,  but Itzik Ben-Gan is back in London to do a 5 day training course, start 03october.  http://www.qa.com/training-courses/technical-it-training/microsoft/microsoft-sql-server/microsoft-sql-server-2008-and-r2/advanced-t-sql-querying,-programming-and-tuning-for-sql-server-2005--2008Why QA are not screaming this from the rafters, I will never be able to fathom.  Its kind of like going for a physics course and finding that Steven Hawking is taking the class. Training budgets are tight at the moment and £2500+ is a fair amount to pay but ,as the saying goes,  but if you pay peanuts you get monkeys. Looks like you will need to be quick , the site is saying "Fewer than 5 places available".

    Read the article

  • Responsive Web design d'Ethan Marcotte, critique par Ihèb BEN ROMDHANE

    Bonjour, Je vous propose la critique du Livre Responsive Web design de Ethan Marcotte. Citation: Encore un très bon ouvrage dans l'excellente collection A book Apart, dans lequel Ethan Marcotte aborde, de manière très claire et argumentée, les différents aspects qui mènent à la création d'une mise en page fluide et responsive. Les exemples présentés s'appuient sur le principe des grilles de m...

    Read the article

  • Introducing Ben Barreth, Community Builder & Software Developer at GWB

    - by Staff of Geeks
    Please extend a warm welcome to Ben Barreth as the new community builder and full-time software developer at Geeks With Blogs. We've been wanting to add some cool features to the site but haven't had the opportunity until now. Adding Ben to the team should give us a big kick in the right direction. Ben has several years of .Net development experience and is heavily involved in the startup community in Kansas City, including the KC Startup Village as well as his own startup initiatives: Homes for Hackers and FreeIdeas.co. He loves working with people even more than coding and is excited to serve the GWB community in any way possible. Ben originally met Matt Watson as a beta tester for Stackify, the software company that gives developers the safe & secure access to troubleshoot in production. Jeff Julian and Matt are old friends and recently decided the site needed new ownership to carry it forward and build the enhancements it deserves. The site management transferred in October and Matt quickly began looking for a full-time community builder to lead the charge. Ben bumped into Matt once again at a Tech Cocktail event at the Boulevard Brewery where Stackify was presenting and an alliance was forged. Yes, the beer really IS that good! Which brings us to the biggest question of all: Where do you want Geeks with Blogs to go next? As a contributor to the GWB community, now is your chance to be heard! What are we missing? Features on our radar: New templates Add a code "formatter" to posts Add categories to blog feeds Re-skin the site and redesign the logo Feel free to contact Ben with further questions and ideas below. We need your help! @BenBarreth [email protected] Cell: 816-332-9770 www.linkedin.com/in/benbarreth

    Read the article

  • A training world nugget for being taught by the best

    - by Testas
    June represents an exciting time for the SQL Server community with events all over the country in the next few months and there is plenty of knowledge to be gained from willing speakers enthusiastically sharing their knowledge. Furthermore, Paul Randall and Kimberley Trip will be conducting their highly recommended immersion events at London Heathrow in June.There are other big names within SQL Server that will be teaching this year. The company I used to work for, QA, has excellent trainers teaching SQL Server who I would always recommend. Occasionally a big name speaker will be take a course, unknowingly to the community. Solid Quality Mentors is such a company where their staff will teach at QA offices from time to time. And I know from conversation with Itzik Ben-Gan that he will be teaching Advanced TSQL within QA offices in London during the week of Oct 3-7. A link to the course details can be found here.http://www.qa.com/training-courses/technical-it-training/microsoft/microsoft-sql-server/microsoft-sql-server-2008-and-r2/advanced-t-sql-querying,-programming-and-tuning-for-sql-server-2005--2008So if you want to be taught by the best experts, consider checking www.QA.com for their advanced SQL courses, you could find yourself being taught by the best in the business in their field.Chris  

    Read the article

  • I need a groovy criteria to get all the elements after i make sort on nullable inner object

    - by user1773876
    I have two domain classes named IpPatient,Ward as shown below. class IpPatient { String ipRegNo Ward ward static constraints = { ward nullable:true ipRegNo nullable:false } } class Ward { String name; static constraints = { name nullable:true } } now i would like to create criteria like def criteria=IpPatient.createCriteria() return criteria.list(max:max , offset:offset) { order("ward.name","asc") createAlias('ward', 'ward', CriteriaSpecification.LEFT_JOIN) } At present IpPatient table has 13 records, where 8 records of IpPatient doesn't have ward because ward can be null. when i sort with wardName i am getting 5 records those contain ward. I need a criteria to get all the elements after i make sort on nullable inner object.

    Read the article

  • Disable button until tabs have ben read...

    - by jimbo
    I have some tabs which have been created using Javascript and Mootools, my client wants the 'next button' at the bottom of the page to be disabled, until the tabs have been read(clicked). The page is dynamic (created with PHP and MySQL) and there could be two tabs or three, depending on the set-up. I am struggling today to think of the best solution. Any help more than welcome...

    Read the article

  • Makeadder example from Ben alman

    - by Matrym
    In the below, where does b come from? I don't see it being passed in, so how could it be returned? function lockInFirstArg( fn, a ) {   return function( b ) {     return fn( a, b );   }; } Link: http://msdn.microsoft.com/en-us/scriptjunkie/gg575560 More complete excerpt (sorry for iPad formatting... No tabs): // More-general functions.   function add( a, b ) {   return a + b; }   function multiply( a, b ) {   return a * b; }   // Relatively flexible more-specific function generator.   function lockInFirstArg( fn, a ) {   return function( b ) {     return fn( a, b );   }; }   var add1 = lockInFirstArg( add, 1 ); add1( 2 );    // 3 add1( 3 );    // 4 add1( 10 );   // 11

    Read the article

  • Java Spotlight Episode 57: Live From #Devoxx - Ben Evans and Martijn Verburg of the London JUG with Yara Senger of SouJava

    - by Roger Brinkley
    Tweet Live from Devoxx 11,  an interview with Ben Evans and Martijn Verburg from the London JUG along with  Yara Senger from the SouJava JUG on the JCP Executive Committee Elections, JSR 248, and Adopt-a-JSR program. Both the London JUG and SouJava JUG are JCP Standard Edition Executive Committee Members. Joining us this week on the Java All Star Developer Panel are Geertjan Wielenga, Principal Product Manger in Oracle Developer Tools; Stephen Chin, Java Champion and Java FX expert; and Antonio Goncalves, Paris JUG leader. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link: Java Spotlight Podcast in iTunes. Show Notes News Netbeans 7.1 JDK 7 upgrade tools Netbeans First Patch Program OpenJFX approved as an OpenJDK project Devoxx France April 18-20, 2012 Events Nov 22-25, OTN Developer Days in the Nordics Nov 22-23, Goto Conference, Prague Dec 6-8, Java One Brazil, Sao Paulo Feature interview Ben Evans has lived in "Interesting Times" in technology - he was the lead performance testing engineer for the Google IPO, worked on the initial UK trials of 3G networks with BT, built award-winning websites for some of Hollywood's biggest hits of the 90s, rearchitected and reimagined technology helping some of the most vulnerable people in the UK and has worked on everything from some of the UKs very first ecommerce sites, through to multi-billion dollar currency trading systems. He helps to run the London Java Community, and represents the JUG on the Java SE/EE Executive Committee. His first book "The Well-Grounded Java Developer" (with Martijn Verburg) has just been published by Manning. Martijn Verburg (aka 'the Diabolical Developer') herds Cats in the Java/open source communities and is constantly humbled by the creative power to be found there. Currently he resides in London where he co-leads the London JUG (a JCP EC member), runs a couple of open source projects & drinks too much beer at his local pub. You can find him online moderating at the Javaranch or discussing (ranting?) subjects on the Prgorammers Stack Exchange site. Most recently he's become a regular speaker at conferences on Java, open source and software development and has recently wrapped up his first Manning title - "The Well-Grounded Java Developer" with his co-author Ben Evans. Yara Senger is the partner and director of teacher education and Globalcode, graduated from the University of Sao Paulo, Sao Carlos, has significant experience in Brazil and abroad in developing solutions to critical Java. She is the co-creator of Java programs Academy and Academy of Web Developer, accumulating over 1000 hours in the classroom teaching Java. She currently serves as the President of Sou Java. In this interview Ben, Martijn, and Yara talk about the JCP Executive Committee Elections, JSR 348, and the Adopt-a-JSR program. Mail Bag What's Cool Show Transcripts Transcript for this show is available here when available.

    Read the article

  • Adding additional users to Ubuntu server and configuring Samba

    - by Ben
    I have installed Ubuntu Server 12.10 and during the install created a user for myself ben, I now wish to add a second user bill. I have an external drive that I have mounted to /media/storage and created a shared folder called Share, the owner of the folder is ben:ben, how do I grant bill access to the folder? I don't want to put him in the group ben. Once setup, I need to configure Samba & NFS, here is my Samba configuration [Share] path = /media/storage/Share read only = no public = yes writeable = yes force user = ben How do I give both bill and ben access to the share via Samba? Thank you.

    Read the article

  • Book Review: “Inside Microsoft SQL Server 2008: T-SQL Querying” by Itzik Ben-Gan et al

    - by Sam Abraham
    In the past few weeks, I have been reading “Inside Microsoft SQL Server 2008: T-SQL Querying” by Itzik Ben-Gan et al. In the next few lines, I will be providing a quick book review having finished reading this valuable resource on SQL Server 2008. In this book, the authors have targeted most of the common as well as advanced T-SQL Querying scenarios that one would use for development on a SQL Server database. Book content covered sufficient theory and practice to empower its readers to systematically write better performance-tuned queries. Chapter one introduced a quick refresher of the basics of query processing. Chapters 2 and 3 followed with a thorough coverage of applicable relational algebra concepts which set a good stage for chapter 4 to dive deep into query tuning. Chapter 4 has been my favorite chapter of the book as it provided nice illustrations of the internals of indexes, waits, statistics and query plans. I particularly appreciated the thorough explanation of execution plans which helped clarify some areas I may have not paid particular attention to in the past. The book continues to focus on SQL operators tackling a few in each chapter and covering their internal workings and the best practices to follow when used. Figures and illustrations have been particularly helpful in grasping advanced concepts covered therein. In conclusion, Inside Microsoft SQL Server 2008: T-SQL Querying provided me with 750+ pages of focused, advanced and practical knowledge that has added a few tips and tricks to my arsenal of query tuning strategies. Many thanks to the O’Reilly User Group Program and its support of our West Palm Beach Developers’ Group. --Sam Abraham

    Read the article

  • Trying to run Compiz but it won't work!

    - by Ben Deslauriers
    ben@ben-ThinkCentre-XXXX:~$ compiz --replace Checking if settings need to be migrated ...no Checking if internal files need to be migrated ...yes [LOG]: Moving Internal Files [LOG]: Copying subdirectory from /home/ben/.compiz/session to /home/ben/.compiz-1/session [LOG]: Copied file /home/ben/.compiz/session/10cd9233ce225949613394716379921200000016160046 to /home/ben/.compiz-1/session/10cd9233ce225949613394716379921200000016160046 [LOG]: Successfully moved internal files Backend : gconf Integration : true Profile : default Adding plugins Initializing core options...done Initializing composite options...done nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 55 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 56 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 59 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 58 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30 Initializing opengl options...done Initializing decor options...done Initializing grid options...done Initializing gnomecompat options...done Initializing place options...done Initializing session options...done Initializing move options...done Initializing mousepoll options...done Initializing resize options...done Initializing snap options...done Initializing vpswitch options...done Initializing animation options...done Initializing workarounds options...done Initializing fade options...done Initializing cube options...done Initializing scale options...done compiz (expo) - Warn: failed to bind image to texture Initializing expo options...done Initializing rotate options...done Initializing ezoom options...done Setting Update "main_menu_key" Setting Update "run_key" Starting gtk-window-decorator compiz (decor) - Warn: No default decoration found, placement will not be correct compiz (decor) - Warn: No default decoration found, placement will not be correct I have NO CLUE what I am doing wrong :( Please help. All I did was type in compiz --replace and it made my screen flicker and it showed this message in the terminal. I HAVE NO CLUE :(

    Read the article

  • Developing a SQL Server Function in a Test-Harness.

    - by Phil Factor
    /* Many times, it is a lot quicker to take some pain up-front and make a proper development/test harness for a routine (function or procedure) rather than think ‘I’m feeling lucky today!’. Then, you keep code and harness together from then on. Every time you run the build script, it runs the test harness too.  The advantage is that, if the test harness persists, then it is much less likely that someone, probably ‘you-in-the-future’  unintentionally breaks the code. If you store the actual code for the procedure as well as the test harness, then it is likely that any bugs in functionality will break the build rather than to introduce subtle bugs later on that could even slip through testing and get into production.   This is just an example of what I mean.   Imagine we had a database that was storing addresses with embedded UK postcodes. We really wouldn’t want that. Instead, we might want the postcode in one column and the address in another. In effect, we’d want to extract the entire postcode string and place it in another column. This might be part of a table refactoring or int could easily be part of a process of importing addresses from another system. We could easily decide to do this with a function that takes in a table as its parameter, and produces a table as its output. This is all very well, but we’d need to work on it, and test it when you make an alteration. By its very nature, a routine like this either works very well or horribly, but there is every chance that you might introduce subtle errors by fidding with it, and if young Thomas, the rather cocky developer who has just joined touches it, it is bound to break.     right, we drop the function we’re developing and re-create it. This is so we avoid the problem of having to change CREATE to ALTER when working on it. */ IF EXISTS(SELECT * FROM sys.objects WHERE name LIKE ‘ExtractPostcode’                                      and schema_name(schema_ID)=‘Dbo’)     DROP FUNCTION dbo.ExtractPostcode GO   /* we drop the user-defined table type and recreate it */ IF EXISTS(SELECT * FROM sys.types WHERE name LIKE ‘AddressesWithPostCodes’                                    and schema_name(schema_ID)=‘Dbo’)   DROP TYPE dbo.AddressesWithPostCodes GO /* we drop the user defined table type and recreate it */ IF EXISTS(SELECT * FROM sys.types WHERE name LIKE ‘OutputFormat’                                    and schema_name(schema_ID)=‘Dbo’)   DROP TYPE dbo.OutputFormat GO   /* and now create the table type that we can use to pass the addresses to the function */ CREATE TYPE AddressesWithPostCodes AS TABLE ( AddressWithPostcode_ID INT IDENTITY PRIMARY KEY, –because they work better that way! Address_ID INT NOT NULL, –the address we are fixing TheAddress VARCHAR(100) NOT NULL –The actual address ) GO CREATE TYPE OutputFormat AS TABLE (   Address_ID INT PRIMARY KEY, –the address we are fixing   TheAddress VARCHAR(1000) NULL, –The actual address   ThePostCode VARCHAR(105) NOT NULL – The Postcode )   GO CREATE FUNCTION ExtractPostcode(@AddressesWithPostCodes AddressesWithPostCodes READONLY)  /** summary:   > This Table-valued function takes a table type as a parameter, containing a table of addresses along with their integer IDs. Each address has an embedded postcode somewhere in it but not consistently in a particular place. The routine takes out the postcode and puts it in its own column, passing back a table where theinteger key is accompanied by the address without the (first) postcode and the postcode. If no postcode, then the address is returned unchanged and the postcode will be a blank string Author: Phil Factor Revision: 1.3 date: 20 May 2014 example:      – code: returns:   > Table of  Address_ID, TheAddress and ThePostCode. **/     RETURNS @FixedAddresses TABLE   (   Address_ID INT, –the address we are fixing   TheAddress VARCHAR(1000) NULL, –The actual address   ThePostCode VARCHAR(105) NOT NULL – The Postcode   ) AS – body of the function BEGIN DECLARE @BlankRange VARCHAR(10) SELECT  @BlankRange = CHAR(0)+‘- ‘+CHAR(160) INSERT INTO @FixedAddresses(Address_ID, TheAddress, ThePostCode) SELECT Address_ID,          CASE WHEN start>0 THEN REPLACE(STUFF([Theaddress],start,matchlength,”),‘  ‘,‘ ‘)             ELSE TheAddress END            AS TheAddress,        CASE WHEN Start>0 THEN SUBSTRING([Theaddress],start,matchlength-1) ELSE ” END AS ThePostCode FROM (–we have a derived table with the results we need for the chopping SELECT MAX(PATINDEX([matched],‘ ‘+[Theaddress] collate SQL_Latin1_General_CP850_Bin)) AS start,         MAX( CASE WHEN PATINDEX([matched],‘ ‘+[Theaddress] collate SQL_Latin1_General_CP850_Bin)>0 THEN TheLength ELSE 0 END) AS matchlength,        MAX(TheAddress) AS TheAddress,        Address_ID FROM (SELECT –first the match, then the length. There are three possible valid matches         ‘%['+@BlankRange+'][A-Z][0-9] [0-9][A-Z][A-Z]%’, 7 –seven character postcode       UNION ALL SELECT ‘%['+@BlankRange+'][A-Z][A-Z0-9][A-Z0-9] [0-9][A-Z][A-Z]%’, 8       UNION ALL SELECT ‘%['+@BlankRange+'][A-Z][A-Z][A-Z0-9][A-Z0-9] [0-9][A-Z][A-Z]%’, 9)      AS f(Matched,TheLength) CROSS JOIN  @AddressesWithPostCodes GROUP BY [address_ID] ) WORK; RETURN END GO ——————————-end of the function————————   IF NOT EXISTS (SELECT * FROM sys.objects WHERE name LIKE ‘ExtractPostcode’)   BEGIN   RAISERROR (‘There was an error creating the function.’,16,1)   RETURN   END   /* now the job is only half done because we need to make sure that it works. So we now load our sample data, making sure that for each Sample, we have what we actually think the output should be. */ DECLARE @InputTable AddressesWithPostCodes INSERT INTO  @InputTable(Address_ID,TheAddress) VALUES(1,’14 Mason mews, Awkward Hill, Bibury, Cirencester, GL7 5NH’), (2,’5 Binney St      Abbey Ward    Buckinghamshire      HP11 2AX UK’), (3,‘BH6 3BE 8 Moor street, East Southbourne and Tuckton W     Bournemouth UK’), (4,’505 Exeter Rd,   DN36 5RP Hawerby cum BeesbyLincolnshire UK’), (5,”), (6,’9472 Lind St,    Desborough    Northamptonshire NN14 2GH  NN14 3GH UK’), (7,’7457 Cowl St, #70      Bargate Ward  Southampton   SO14 3TY UK’), (8,”’The Pippins”, 20 Gloucester Pl, Chirton Ward,   Tyne & Wear   NE29 7AD UK’), (9,’929 Augustine lane,    Staple Hill Ward     South Gloucestershire      BS16 4LL UK’), (10,’45 Bradfield road, Parwich   Derbyshire    DE6 1QN UK’), (11,’63A Northampton St,   Wilmington    Kent   DA2 7PP UK’), (12,’5 Hygeia avenue,      Loundsley Green WardDerbyshire    S40 4LY UK’), (13,’2150 Morley St,Dee Ward      Dumfries and Galloway      DG8 7DE UK’), (14,’24 Bolton St,   Broxburn, Uphall and Winchburg    West Lothian  EH52 5TL UK’), (15,’4 Forrest St,   Weston-Super-Mare    North Somerset       BS23 3HG UK’), (16,’89 Noon St,     Carbrooke     Norfolk       IP25 6JQ UK’), (17,’99 Guthrie St,  New Milton    Hampshire     BH25 5DF UK’), (18,’7 Richmond St,  Parkham       Devon  EX39 5DJ UK’), (19,’9165 laburnum St,     Darnall Ward  Yorkshire, South     S4 7WN UK’)   Declare @OutputTable  OutputFormat  –the table of what we think the correct results should be Declare @IncorrectRows OutputFormat –done for error reporting   –here is the table of what we think the output should be, along with a few edge cases. INSERT INTO  @OutputTable(Address_ID,TheAddress, ThePostcode)     VALUES         (1, ’14 Mason mews, Awkward Hill, Bibury, Cirencester, ‘,‘GL7 5NH’),         (2, ’5 Binney St   Abbey Ward    Buckinghamshire      UK’,‘HP11 2AX’),         (3, ’8 Moor street, East Southbourne and Tuckton W    Bournemouth UK’,‘BH6 3BE’),         (4, ’505 Exeter Rd,Hawerby cum Beesby   Lincolnshire UK’,‘DN36 5RP’),         (5, ”,”),         (6, ’9472 Lind St,Desborough    Northamptonshire NN14 3GH UK’,‘NN14 2GH’),         (7, ’7457 Cowl St, #70    Bargate Ward  Southampton   UK’,‘SO14 3TY’),         (8, ”’The Pippins”, 20 Gloucester Pl, Chirton Ward,Tyne & Wear   UK’,‘NE29 7AD’),         (9, ’929 Augustine lane,  Staple Hill Ward     South Gloucestershire      UK’,‘BS16 4LL’),         (10, ’45 Bradfield road, ParwichDerbyshire    UK’,‘DE6 1QN’),         (11, ’63A Northampton St,Wilmington    Kent   UK’,‘DA2 7PP’),         (12, ’5 Hygeia avenue,    Loundsley Green WardDerbyshire    UK’,‘S40 4LY’),         (13, ’2150 Morley St,     Dee Ward      Dumfries and Galloway      UK’,‘DG8 7DE’),         (14, ’24 Bolton St,Broxburn, Uphall and Winchburg    West Lothian  UK’,‘EH52 5TL’),         (15, ’4 Forrest St,Weston-Super-Mare    North Somerset       UK’,‘BS23 3HG’),         (16, ’89 Noon St,  Carbrooke     Norfolk       UK’,‘IP25 6JQ’),         (17, ’99 Guthrie St,      New Milton    Hampshire     UK’,‘BH25 5DF’),         (18, ’7 Richmond St,      Parkham       Devon  UK’,‘EX39 5DJ’),         (19, ’9165 laburnum St,   Darnall Ward  Yorkshire, South     UK’,‘S4 7WN’)       insert into @IncorrectRows(Address_ID,TheAddress, ThePostcode)        SELECT Address_ID,TheAddress,ThePostCode FROM dbo.ExtractPostcode(@InputTable)       EXCEPT     SELECT Address_ID,TheAddress,ThePostCode FROM @outputTable; If @@RowCount>0        Begin        PRINT ‘The following rows gave ‘;     SELECT Address_ID,TheAddress,ThePostCode FROM @IncorrectRows        RAISERROR (‘These rows gave unexpected results.’,16,1);     end   /* For tear-down, we drop the user defined table type */ IF EXISTS(SELECT * FROM sys.types WHERE name LIKE ‘OutputFormat’                                    and schema_name(schema_ID)=‘Dbo’)   DROP TYPE dbo.OutputFormat GO /* once this is working, the development work turns from a chore into a delight and one ends up hitting execute so much more often to catch mistakes as soon as possible. It also prevents a wildly-broken routine getting into a build! */

    Read the article

  • Pointing non-www to a spcific sub-directory

    - by Ben Sinclair
    I might be going about this all wrong so let me know if I am. I am creating software that allows people to sign up and have their own sub-domain on my website. So say my website is ben.com, they could have their own sub-domain called juice.ben.com. When they type their sub-domain juice.ben.com in their address bar, it will load the contents in a root directory. I have also set-up a .htaccess redirect to redirect www.ben.com to ben.com. Not sure if this matters with my question but I thought I'd mention it. Ok, so basically what I think I need to do is put the software they they've signed up to in the root directory. So when someone goes to juice.ben.com, they will be pointed to the root directory (I beleive I cans et-up wild card sub-domains with my host) and the software will then analyse their sub-domain and then display their account. Now, if someone just types in ben.com into their browser, I want it to show the contents of the ben.com/_website/ folder but still show in the address bar that they are still in the root directory. Hopefully I am making sense :) Is this possible with htaccess? If so, what do I need to do?

    Read the article

  • Star Sightings at MIX 10

    Hey its Vegas baby! Brad was stylin. Tim and I were a poor mans Vin Diesel and Tom Cruise. The jacket and shades actually suited Karen. Dan looked like he worked in Vegas. Ward was, well, Ward. Was it the town, the conference, or are we all just wacky developer/designer types? Ward Bell brought along his jacket, shirt and shades and of course we all just had to get into the act. (If you think this is crazy, wait til you see what Ward did to top it in our upcoming Silverlight TV video!) Yet another...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

  • How do I get GNU screen not to start in my home directory in OS X?

    - by Benjamin Oakes
    GNU Screen (screen) behaves differently on OS X 10.5 (Leopard) and 10.6 (Snow Leopard) compared to Linux (at least Ubuntu, Red Hat, and Gentoo) and OS X 10.4 (Tiger). In 10.5 and 10.6, new screens (made with screen or ^A c) always places me in my home directory ~. In Linux and OS X Tiger, new screens have a pwd of wherever the screen was created originally. Made up examples to illustrate what I mean: Tiger: $ cd ~/foo $ pwd /Users/ben/foo $ screen $ pwd /Users/ben/foo $ screen # or ^A c $ pwd /Users/ben/foo Leopard, Snow Leopard: $ cd ~/foo $ pwd /Users/ben/foo $ screen $ pwd /Users/ben $ screen # or ^A c $ pwd /Users/ben How do I get Leopard and Snow Leopard to behave like Tiger used to?

    Read the article

  • How do I stop and repair a RAID 5 array that has failed and has I/O pending?

    - by Ben Hymers
    The short version: I have a failed RAID 5 array which has a bunch of processes hung waiting on I/O operations on it; how can I recover from this? The long version: Yesterday I noticed Samba access was being very sporadic; accessing the server's shares from Windows would randomly lock up explorer completely after clicking on one or two directories. I assumed it was Windows being a pain and left it. Today the problem is the same, so I did a little digging; the first thing I noticed was that running ps aux | grep smbd gives a lot of lines like this: ben 969 0.0 0.2 96088 4128 ? D 18:21 0:00 smbd -F root 1708 0.0 0.2 93468 4748 ? Ss 18:44 0:00 smbd -F root 1711 0.0 0.0 93468 1364 ? S 18:44 0:00 smbd -F ben 3148 0.0 0.2 96052 4160 ? D Mar07 0:00 smbd -F ... There are a lot of processes stuck in the "D" state. Running ps aux | grep " D" shows up some other processes including my nightly backup script, all of which need to access the volume mounted on my RAID array at some point. After some googling, I found that it might be down to the RAID array failing, so I checked /proc/mdstat, which shows this: ben@jack:~$ cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid5 sdb1[3](F) sdc1[1] sdd1[2] 2930271872 blocks level 5, 64k chunk, algorithm 2 [3/2] [_UU] unused devices: <none> And running mdadm --detail /dev/md0 gives this: ben@jack:~$ sudo mdadm --detail /dev/md0 /dev/md0: Version : 00.90 Creation Time : Sat Oct 31 20:53:10 2009 Raid Level : raid5 Array Size : 2930271872 (2794.53 GiB 3000.60 GB) Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB) Raid Devices : 3 Total Devices : 3 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Mon Mar 7 03:06:35 2011 State : active, degraded Active Devices : 2 Working Devices : 2 Failed Devices : 1 Spare Devices : 0 Layout : left-symmetric Chunk Size : 64K UUID : f114711a:c770de54:c8276759:b34deaa0 Events : 0.208245 Number Major Minor RaidDevice State 3 8 17 0 faulty spare rebuilding /dev/sdb1 1 8 33 1 active sync /dev/sdc1 2 8 49 2 active sync /dev/sdd1 I believe this says that sdb1 has failed, and so the array is running with two drives out of three 'up'. Some advice I found said to check /var/log/messages for notices of failures, and sure enough there are plenty: ben@jack:~$ grep sdb /var/log/messages ... Mar 7 03:06:35 jack kernel: [4525155.384937] md/raid:md0: read error NOT corrected!! (sector 400644912 on sdb1). Mar 7 03:06:35 jack kernel: [4525155.389686] md/raid:md0: read error not correctable (sector 400644920 on sdb1). Mar 7 03:06:35 jack kernel: [4525155.389686] md/raid:md0: read error not correctable (sector 400644928 on sdb1). Mar 7 03:06:35 jack kernel: [4525155.389688] md/raid:md0: read error not correctable (sector 400644936 on sdb1). Mar 7 03:06:56 jack kernel: [4525176.231603] sd 0:0:1:0: [sdb] Unhandled sense code Mar 7 03:06:56 jack kernel: [4525176.231605] sd 0:0:1:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Mar 7 03:06:56 jack kernel: [4525176.231608] sd 0:0:1:0: [sdb] Sense Key : Medium Error [current] [descriptor] Mar 7 03:06:56 jack kernel: [4525176.231623] sd 0:0:1:0: [sdb] Add. Sense: Unrecovered read error - auto reallocate failed Mar 7 03:06:56 jack kernel: [4525176.231627] sd 0:0:1:0: [sdb] CDB: Read(10): 28 00 17 e1 5f bf 00 01 00 00 To me it is clear that device sdb has failed, and I need to stop the array, shutdown, replace it, reboot, then repair the array, bring it back up and mount the filesystem. I cannot hot-swap a replacement drive in, and don't want to leave the array running in a degraded state. I believe I am supposed to unmount the filesystem before stopping the array, but that is failing, and that is where I'm stuck now: ben@jack:~$ sudo umount /storage umount: /storage: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) It is indeed busy; there are some 30 or 40 processes waiting on I/O. What should I do? Should I kill all these processes and try again? Is that a wise move when they are 'uninterruptable'? What would happen if I tried to reboot? Please let me know what you think I should do. And please ask if you need any extra information to diagnose the problem or to help!

    Read the article

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