Search Results

Search found 258 results on 11 pages for 'harry weston'.

Page 8/11 | < Previous Page | 4 5 6 7 8 9 10 11  | Next Page >

  • Resize an 8bpp bitmap in GDI+

    - by harry
    I've just noticed that GDI+ doesn't like the Graphics.FromImage() method to be called with an image that is 1bpp, 4bpp, or 8bpp. Is there any way of resizing an 8bpp image without changing from 8bpp to 24bpp, resizing, and then changing it back to 8bpp?

    Read the article

  • Can't update rows in my database using Entity Framework...?

    - by Dissonant
    Okay, this is really weird. I made a simple database with a single table, Customer, which has a single column, Name. From the database I auto-generated an ADO.NET Entity Data Model, and I'm trying to add a new Customer to it like so: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Test { class Program { static void Main() { Database1Entities db = new Database1Entities(); Customer c = new Customer(); c.Name = "Harry"; db.AddToCustomer(c); db.SaveChanges(); } } } But it doesn't persist Customer "Harry" to the database! I've been scratching my head for a while now wondering why such a simple operation doesn't work. What on earth could be the problem!?

    Read the article

  • Django modelform ForeignKey List

    - by Harry
    How do you get each item in the ForeignKey field in a list, for example: class Delegate(models.Model): excursion = models.ForeignKey(Excursion, limit_choices_to = {'is_activity': False}, related_name='excursion', null=True, blank=True) Template: {% for object in formset.excursion_set.all %} {{ object.lable }} etc {% endfor %} My reason is that I don't want the options to display as a dropdown, but in a custom way that I will style etc.

    Read the article

  • How to allow utf-8 charset in preg_match ???

    - by Shri.harry
    Hello everone, I am using preg_match() function only to allow specific charachters to accept. It is allowing all alphabates and numbers but along with that i also want to allow utf-8 characters such as "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ" so how can i allow this charachters from preg_match() function.Plase suggest me. Thanks in advance. Regards Shri

    Read the article

  • Saving data that is in a table efficiently and also is easy to retrieve and echo back out

    - by Harry
    Information I currently have a table which image is below, Problem I have made this table using ul & li Here is the code http://jsfiddle.net/8j2qe/1/ Question What would be the best way of storing the data in the image and easily displaying it? Keeping in mind that each column can only have 1 entry. Thank you! And any questions will be answered ASAP! EDIT Sorry, I dont think I was clear enough in my initial question. What I am asking is, what is the best way to store and then display this type of data. I want to DISPLAY data from my database to show like it would in the image. Should I have a column in my database for each column on the table, then say either A,B,C or D depending on what column it is in but then how would I display it using PHP in my code provided? Im struggling to find a good way of explaining this, I am sorry.

    Read the article

  • using windows service can we copy files from one computer to another computer C#.net ?

    - by Harry
    I have one service that will create a text file to local machine and then need to copy the same file to another server . I am using " File.Copy(SourceFilePath, TargetFilePath, true);" and getting an exception at the target file path "access denied. I am able to copy the files manually to that location ( TargetFilePath) . any idea , what is going wrong ?? I don't have any network drive mapping with this target location. Thanks in Advance

    Read the article

  • Google Maps panTo AND setCenter

    - by Harry
    The default panTo only pans to the edge of the screen. I like setCenter but would like to pan to that point. Any ideas welcome map.setCenter(mymarker.getPoint()); GEvent.trigger(mymarker,"click"); //open the info window

    Read the article

  • Inserting "£" in a string to a text file

    - by Harry
    iPhone Application writes data to a text file, saves it on the Documnets folder. Great that works If I place "£" in the string, or use [currencyStyle stringFromNumber] the text file will not be created. The "£" and the [currencyStyle stringFromNumber] works if the information is printed to a "New View" page on the simulator, pound and all Can someone please explain what's happening?

    Read the article

  • INSERT INTO othertbl SELECT * tbl

    - by Harry
    Current situation: INSERT INTO othertbl SELECT * FROM tbl WHERE id = '1' So i want to copy a record from tbl to othertbl. Both tables have an autoincremented unique index. Now the new record should have a new index, rather then the value of the index of the originating record else copying results in a index not unique error. A solution would be to not use the * but since these tables have quite some columns i really think it's getting ugly. So,.. is there a better way to copy a record which results in a new record in othertbl which has a new autoincremented index without having to write out all columns in the query and using a NULL value for the index. -hope it makes sense....-

    Read the article

  • How to get the content of two xml tags even when they have another xml tags inside them (PHP-XML)

    - by Harry
    In simple terms, let's suppose you have the following xml structure: <TEXT>Well, I need some help as you <CUSTOMTAG>can</CUSTOMTAG> see.</TEXT> When extracting the text of this node in PHP with strip_tags(), I am not getting the content of tags. First step: What I want to do, is to extract and thus have the following string: "Well, I need some help as you can see." Second step: I would also like to convert the <CUSTOMTAG> and </CUSTOMTAG> to something else, like <e> and </e> for example, and finally have the following string: "Well, I need some help as you <e>can</e> see." I would appreciate only tested and working code. Thanks in advance! Kind Regards

    Read the article

  • My Interview With DevExpress Regarding Silicon Valley Code Camp

    Last week, while at Microsofts TechEd 2010, Mehul Harry, Technical Evangalist for Developer Express, interviewed me about our upcoming Silicon Valley Code Camp (of which Dev Express is a platinum... This site is a resource for asp.net web programming. It has examples by Peter Kellner of techniques for high performance programming...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

  • Having Fun with Roughriders

    - by D'Arcy Lussier
    So I’m in Regina for a conference, and I happen to notice that some RoughRiders (Weston Dressler, Wes Cates, and Marcus Adams) are going to be signing autographs at the local SaskTel store on Thursday. So a plan gets hatched, and I call my buddy Mike who hasn’t left Winnipeg yet and have him pick up my Alouette jersey from home. My buddy Dylan who was here too happened to bring his Bomber jersey. And so we set off on our adventure: to get three Saskatchewan Roughrider players to autograph a calculator (cause, y’know…tough counting to 13 and all). Below is the footage. And continued… And here’s the autographed calculator: Thanks for being good sports guys! D Technorati Tags: CFL,Roughriders,Alouettes

    Read the article

  • Visual Studio 2010: Pro Power Tools

    - by Enrique Lima
    There is a set of Pro Power Tools released yesterday for Visual Studio 2010.  Check them out here. Brian Harry did a feature summary description on his blog.  Check it out here: http://blogs.msdn.com/b/bharry/archive/2010/06/07/announcing-the-first-visual-studio-pro-power-tools.aspx

    Read the article

  • New Book: "Systems Performance: Enterprise and the Cloud"

    - by uwes
    Brendan Gregg, former Solaris kernel engineer at Sun published his new book "Systems Performance: Enterprise and the Cloud" in October. The book is a modern, very comprehensive guide to general system performance principles and practices, as well as a highly detailed reference for specific UNIX and Linux observability tools used to examine and diagnose operating system behaviour. Read a more detailed abstract and review on Harry J Foxwell's Blog entry "Brendan Gregg's "Systems Performance: Enterprise and the Cloud"

    Read the article

  • Java remove HTML from String without regular expressions

    - by behrk2
    Hello, I am trying to remove all HTML elements from a String. Unfortunately, I cannot use regular expressions because I am developing on the Blackberry platform and regular expressions are not yet supported. Is there any other way that I can remove HTML from a string? I read somewhere that you can use a DOM Parser, but I couldn't find much on it. Text with HTML: <![CDATA[As a massive asteroid hurtles toward Earth, NASA head honcho Dan Truman (<a href="http://www.netflix.com/RoleDisplay/Billy_Bob_Thornton/20000303">Billy Bob Thornton</a>) hatches a plan to split the deadly rock in two before it annihilates the entire planet, calling on Harry Stamper (<a href="http://www.netflix.com/RoleDisplay/Bruce_Willis/99786">Bruce Willis</a>) -- the world's finest oil driller -- to head up the mission. With time rapidly running out, Stamper assembles a crack team and blasts off into space to attempt the treacherous task. <a href="http://www.netflix.com/RoleDisplay/Ben_Affleck/20000016">Ben Affleck</a> and <a href="http://www.netflix.com/RoleDisplay/Liv_Tyler/162745">Liv Tyler</a> co-star.]]> Text without HTML: As a massive asteroid hurtles toward Earth, NASA head honcho Dan Truman (Billy Bob Thornton) hatches a plan to split the deadly rock in two before it annihilates the entire planet, calling on Harry Stamper (Bruce Willis) -- the world's finest oil driller -- to head up the mission. With time rapidly running out, Stamper assembles a crack team and blasts off into space to attempt the treacherous task.Ben Affleck and Liv Tyler co-star. Thanks!

    Read the article

  • Linq-to-SQL: How to shape the data with group by?

    - by Cheeso
    I have an example database, it contains tables for Movies, People and Credits. The Movie table contains a Title and an Id. The People table contains a Name and an Id. The Credits table relates Movies to the People that worked on those Movies, in a particular role. The table looks like this: CREATE TABLE [dbo].[Credits] ( [Id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY, [PersonId] [int] NOT NULL FOREIGN KEY REFERENCES People(Id), [MovieId] [int] NOT NULL FOREIGN KEY REFERENCES Movies(Id), [Role] [char] (1) NULL In this simple example, the [Role] column is a single character, by my convention either 'A' to indicate the person was an actor on that particular movie, or 'D' for director. I'd like to perform a query on a particular person that returns the person's name, plus a list of all the movies the person has worked on, and the roles in those movies. If I were to serialize it to json, it might look like this: { "name" : "Clint Eastwood", "movies" : [ { "title": "Unforgiven", "roles": ["actor", "director"] }, { "title": "Sands of Iwo Jima", "roles": ["director"] }, { "title": "Dirty Harry", "roles": ["actor"] }, ... ] } How can I write a LINQ-to-SQL query that shapes the output like that? I'm having trouble doing it efficiently. if I use this query: int personId = 10007; var persons = from p in db.People where p.Id == personId select new { name = p.Name, movies = (from m in db.Movies join c in db.Credits on m.Id equals c.MovieId where (c.PersonId == personId) select new { title = m.Title, role = (c.Role=="D"?"director":"actor") }) }; I get something like this: { "name" : "Clint Eastwood", "movies" : [ { "title": "Unforgiven", "role": "actor" }, { "title": "Unforgiven", "role": "director" }, { "title": "Sands of Iwo Jima", "role": "director" }, { "title": "Dirty Harry", "role": "actor" }, ... ] } ...but as you can see there's a duplicate of each movie for which Eastwood played multiple roles. How can I shape the output the way I want?

    Read the article

  • merging javascript arrays for json

    - by Nat
    I serially collect information from forms into arrays like so: list = {"name" : "John", "email" : "[email protected]", "country" : "Canada", "color" : "blue"}; identifier = "first_round"; list = {"name" : "Harry", "email" : "[email protected]", "country" : "Germany"}; identifier = "second_round"; I want to combine them into something (I may have braces where I need brackets) like: list_all = { "first_round" : {"name" : "John", "email" : "[email protected]", "country" : "Canada", "color" : "blue"} , "second_round" : {"name" : "Harry", "email" : "[email protected]", "country" : "Germany"} }; so I can access them like: alert(list_all.first_round.name) -> John (Note: the name-values ("name", "email", "color") in the two list-arrays are not quite the same, the number of items in each list-array is limited but not known in advance; I need to serially add only one array to the previous structure each round and there may be any number of rounds, i.e. "third-round" : {...}, "fourth-round" : {...} and so on.) Ultimately, I'd like it to be well-parsed for JSON. I use the jquery library, if that helps.

    Read the article

  • How can I force Xbox Music to find music in all subfolders of my Music library?

    - by Matthew
    My music library is organized (roughly) like this: Music mp3 (original) Artist/Album/Song mp3 (from Tom) Artist/Album/Song mp3 (from Dick) Artist/Album/Song mp3 (from Harry) Artist/Album/Song ... etc. When I use the desktop Zune Software, it finds all of this music. However, the Xbox Music metro app only seems to find music in the "mp3 (original)" folder. How can I force it to find all of my music?

    Read the article

  • Batch Script to restart service

    - by saikishore
    Can anyone help with a peice of batch script to restart an application service at scheduled time. For example: If the service is "windows firewall " Then the script should restart this service every day at 09:00 AM and 09:00PM . Can someone help with complete code.(Assume that there is no dependency of this service on any other service).Any help is greately appreciated. Thanks Harry

    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

< Previous Page | 4 5 6 7 8 9 10 11  | Next Page >