Search Results

Search found 889 results on 36 pages for 'keith lion'.

Page 19/36 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Daily tech links for .net and related technologies - June 1-3, 2010

    - by SanjeevAgarwal
    Daily tech links for .net and related technologies - June 1-3, 2010 Web Development Anti-Forgery Request Recipes For ASP.NET MVC And AJAX - Dixin ASP.NET MVC 2 Localization Complete Guide - Alex Adamyan Dynamically Structured ViewModels in ASP.NET MVC - Keith Brown ASP.NET MVC Time Planner is available at CodePlex - Gunnar Peipman Part 2 – A Cascading Hierarchical Field Template & Filter for Dynamic Data - Steve SharePoint Server 2010 Enterprise Content Management Resources - Andrew Connell Web...(read more)

    Read the article

  • Finally, I have my HP 6910p laptop running with 8Gb RAM

    - by Liam Westley
    Today, I received two Corsair Value Select 4Gb DDR SO-DIMMs (from overclock.co.uk) for my aging HP 6910p to give it the extra lease of life to keep it going until the end of 2010.  And here is the proof that Windows 7 64-bit happily sees all 8Gb, There are no 4Gb modules are officially supported for the HP 6910p (they didn’t exist when it was first build).  I was taking a bit of a gamble, and relying on the UK distance selling regulations which meant that even if they didn’t work I’d be able to send them back, getting a full refund and only paying for the return postage. I’d read Keith Comb’s blog back in 2008, (http://blogs.technet.com/b/keithcombs/archive/2008/07/05/loading-a-hp-6910p-with-8gb-of-ram.aspx) where he mentioned ‘trying’ out 4Gb samples of SO-DIMMs in a HP 6910p laptop, but there still appears to be no mentions of running this configuration in any other blog. Seeing how the 8Gb of memory is used is made easier with the new Resource Monitor available in Windows 7.  With two copies of Visual Studio 2008, Outlook, Firefox (with 30+ tabs), TweetDeck (an infamous memory hog) and VMWare workstation running a virtual machine allocated with 2Gb of memory, you might have no ‘free’ memory remaining, but the standby memory is an awesome 2.4Gb, and once the VM is up and running the Hard Faults/sec hovers around zero,   It’s the page fault figure which really counts, because reducing that value means that you are preventing the Windows 7 system drive from being used for virtual memory paging operations.  Even after only a few hours of use it’s noticeable that disc access has been reduced and applications feel more responsive and ‘snappy’.  I did consider the option of purchasing an SSD to replace the main drive, rather than go for 8Gb of RAM, but I think I’ve probably made the correct decision. Given my hobby topic of virtualisation, I take the view that you can never have too much memory.   It was also a decision made easier by the price differential between 8Gb of RAM compared to a decent size SSD.  In the 18 months since Keith Comb tested the first 4Gb SO-DIMMS they have plummeted in price, at just under £100 per 4Gb, they are around a fifth of the price when launched. So if you ever wondered if a HP 6910p can handle 8Gb, now you know.

    Read the article

  • Le Sénateur John McCain appelle au renvoi ou à la démission du chef de la NSA, lors d'une interview accordée à Der Spiegel

    Le Sénateur John McCain appelle au renvoi ou à la démission du chef de la NSA, lors d'une interview accordée à Der Spiegel Dans une interview accordé au quotidien allemand Der Spiegel, l'ancien candidat à la présidence le Sénateur John McCain a appelé à la démission du Général Keith Alexander, commandant en chef de la NSA, après les révélations d'une mise sur écoute du chef de l'Etat allemand Angela Merkel. Pour le Sénateur, cette mise sur écoute est une erreur, et il précise même qu'entre...

    Read the article

  • How to speed up file transfer to/from Ubuntu Server 11.10 (wifi)

    - by Alexander
    I've been searching AU & elsewhere for the last day and a half. Haven't found an answer so I joined AU to ask for help. I'm hoping someone can point me in the right direction. Ubuntu Server 11.10 Samba VSFTPD Windows 7 PC 2 MacBook Pro - Snow Leopard/Lion 1 iMac - Lion Wireless LAN using DLink DIR-655 Link Speed: 195 Mbit/s on Mac - 54Mbps on Windows ISP Connection: Cable - 20 down/3 up No Domain Controller. All machines are members of the same workgroup. No matter how I connect I can't get better than about 700K transfer rate up/down. Mac/PC, SMB/ftp, Domain Name/Local IP I've tried different user accounts and using different folders, different volumes on the server. Nothing seems to make a difference. 700K up/down. Period. Any suggestions would be greatly appreciated. Thanks, Alexander EDIT: Using sftp now and uploading seems to peak at 980k. After about 5 minutes into a 650MB file, downloading is at 1072k and climbing about 500b/s every ten seconds. If any of that matters... I was expecting a lot faster than 1Mb tx rate. Am I off base here? EDIT: From all I've read so far, perhaps the speed isn't that bad. I only installed Ubuntu out of boredom this past weekend. The trouble is, I like it. Guess it's time to ditch the wifi and run some Cat 5.

    Read the article

  • Reinstalling Mac OS X without original disc

    - by synapse
    I've had Mac OS X Lion installed on a mid-2011 iMac. I've erased the main partition and when I try to repair OS installation it connects to the Internet and says that it can't continue and I should contact Apple Support. I don't have original CD which should've come with an iMac. How can I install at least some version of OS X? Update: I've downloaded what looks like an installation app for Mac OS X Lion with a 4.6Gb InstallESD.dmg file but can't open it on Windows. I've tried PowerISO and MagicISO to no effect. Is it possible to create Mac OS installation media on Windows?

    Read the article

  • Will unbinding a server to an Open Directory Master remove its own file shares

    - by scape
    According to this article: http://support.apple.com/kb/TS3180?viewlocale=en_US I am required to remove the ldap binding of my second Mac OS X Lion server before I set it up as a replica server. I initially set the server up as a replica, or so I thought, and created file shares (it refers to the first server's ACL) before I realized it was never promoted as a replica server. So as of now it's running and shares files with correct ACL permissions but if the Master goes down all the file shares seize up. I want to set it up as a replica so this is not an issue; however, I don't want to lose the file shares and their permissions as I remove the binding and restart the server-- apparently I must remove the ldap binding to the OD Master (also a Mac OS X Lion server) before setting it up as a replica.

    Read the article

  • Is it Possible to Increase Display Resolution for OS X Maverick

    - by Michael
    The new OS X Maverick operating system has reduced maximum display resolution from 1920 x 1200 in Mountain Lion to 1680 x 1050, which is a SIZABLE reduction. The difference is obvious when viewing videos or photos. In addition, the colors are less vibrant. Does anyone know a way to change the display resolution for Maverick, thus restoring Mountain Lion resolution (1920 x 1200)...along with color vibrancy. By the way, I am using a 2012 Macbook Pro, with Matte display, which I think makes matters worse. At 1920 x 1200 my Macbook Pro was excellent...but at 1680 x 1050, it is very pedestrian.

    Read the article

  • Is is possible to hide label colors in list view in Mac OS 10.X Finder? I use labels as star ratings

    - by Andrew Swift
    I have modified the first five label names in OS X Lion to be ? through ?????. This way I can easily tag photos etc. in the finder. However, I find that Apple's rendering of the colored bars is horrendously ugly. I'd like to keep the labels (to be able to sort by label) but not see the colors. I know it was possible to change the colors with Label X, but Unsanity has not issued an update for Lion. I don't need to change the colors, just find a way to hide them in the finder.

    Read the article

  • icloud sync functionality + 10.6.8 Snow Leopard

    - by adamfield
    with yesterday's rollout of icloud, it seems those of us who refuse to upgrade to lion are left in the dust as far as it goes with calendar/contact syncing. i have had a mobileME account for years, i use it to sync my calendars, contacts and email between iphone/imac/macbook pro. i am NOT upgrading to lion. with the icloud transition, it seems im only able to access my mobileME email, but my calendars and contacts have stopped syncing. has anyone been able to get sync working with icloud contacts/calendars under 10.6.8? if not, what are some viable options for a seamless, background sync of calendars and contacts between my various devices?

    Read the article

  • Installing ubuntu 12.04 on macbook pro9,2

    - by stariz77
    I seem to have tried all the various suggested methods for installing ubuntu on a mbp, but can't seem to get anything that works and was wondering if anyone has run into any new problems with the latest non-retina models? I have a core i7 in my macbook, and model identifier is MacBookPro9,2. I have partitioned my HD using disk utility and have 700gig free space ready for the install (I haven't removed OSX Lion, it is still there in a 50gig partition). Problem: I am just getting a blank screen with a blinking cursor (unresponsive) in the top left whenever I boot from the disk. I left it for 20 minutes and nothing ever happened. This was without any boot manager, just holding "c" on startup. Attempted remedies: I have downloaded the 64 ubuntu iso from their site 3 times now and burned 4 separate discs to rule out some kind of corruption or burn error. I burned one in OSX Lion 10.7.4 and 3 on my windows 7 pc. I tried holding "alt" instead and then navigating to the windows disc to boot. Same thing happens, blank blinking unresponsive cursor. I also tried going to the EFI disc which actually brings up a menu (after saying "error prefix is not set") asking if I want to install ubuntu, test for errors or partition. All three options lead me to an unresponsive blank screen (some without cursors). I downloaded and installed rEFIt and if I hold "alt" on startup a linux penguin (Boot Linux from CD) appears in my boot options, along with the apple boot, and two others that I'm not sure of: "Boot EFI\boto\bootx64.efi from" and "Boot Legacy OS from". The "Boot Linux from CD" just takes me to the blank blinking cursor screen; again, I left if for 10+ minutes and nothing. I heard that the detection of the graphics card might be a problem and that I need change to nomodeset, but I have tried pressing F6 in all of the boot menus listed above and no options appear. Does anyone have any other suggested routes or can you see what I might have done wrong?

    Read the article

  • How to alter my mac os $PATH variable so that I can run the latest php version? [closed]

    - by skiabox
    Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I've just followed this article (http://mac.tutsplus.com/tutorials/server/upgrading-the-native-php-installation-on-os-x-mountain-lion/) to update my php installation using HomeBrew. The latest php version is indeed installed in /usr/local/bin The problem is that my $PATH variable is the following (doing an echo $PATH reveals it) : /usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin ...so the old version of php (that comes with mountain lion) always run first Any ideas on how to solve this? Thank you.

    Read the article

  • What Filesystem should be used for a 4TB drive for both Windows and OSX compatibility? [closed]

    - by Nicholas Yost
    Note: I am aware of similar questions. The one's I seen here are for Windows, OSX, and Linux (which I do not need). I also can use Mountain Lion, which the other questions did not mention. I was going to use NTFS, but OSX Mountain Lion can only read that filesystem and not write to it for some reason. I want to use something native between OSX and Windows, as I don't want to risk losing the data over filesystem incompatibilities. I have USB 3.0 and want something that will allow files greater than 4GB. I do not mind installing a small set of drivers on the Windows machine(s), but I would strongly prefer to leave the Mac machine untouched. Thanks!

    Read the article

  • Mac OS X multi-user thin client server (terminal server)?

    - by username
    Is there any solution out there to turn a Mac into a true multi-user thin client server? I'd like to set up a few cheap PCs with access to a couple accounts using something like VNC, but it isn't economical to buy a new server for each user or a new license for virtualized OS X Server for each user. I'm fully aware that OS X Server lets you set up users with "network home folders," and I know there's also VNC built into Mac OS X. Neither of these fit the bill (the former requires a thick client, and the latter is single-user only) UPDATE: yay, Lion! http://www.9to5mac.com/54102/10-7-lion-allows-multi-user-remote-computing

    Read the article

  • Why OS X use swap when there is lots of "inactive memory"?

    - by Balchev
    I am using OS X from few months (Lion and now Mountain Lion). I have 8 GB on my mini and almost daily now it get close to that. On Windows 7 machine with 8 GB I never had that kind of problem. Anyway, I read over the net, that the inactive memory is app cache of the programs that are recently closed and can be used for faster reopening.And this inactive memory can be released to a new app if needed. It is not released. Instead OS X starts swapping. So my question is why OS X use swap when there is lots of "inactive memory"? Here a screen that shows what I mean: I really hope there is a away to make OS X to use those 2.69 GB before start swapping.I really do.

    Read the article

  • bulk insert and update with ADO.NET Entity Framework

    - by Keith Barrows
    I am writing a small application that does a lot of feed processing. I want to use LINQ EF for this as speed is not an issue, it is a single user app and, in the end, will only be used once a month. My questions revolves around the best way to do bulk inserts using LINQ EF. After parsing the incoming data stream I end up with a List of values. Since the end user may end up trying to import some duplicate data I would like to "clean" the data during insert rather than reading all the records, doing a for loop, rejecting records, then finally importing the remainder. This is what I am currently doing: DateTime minDate = dataTransferObject.Min(c => c.DoorOpen); DateTime maxDate = dataTransferObject.Max(c => c.DoorOpen); using (LabUseEntities myEntities = new LabUseEntities()) { var recCheck = myEntities.ImportDoorAccess.Where(a => a.DoorOpen >= minDate && a.DoorOpen <= maxDate).ToList(); if (recCheck.Count > 0) { foreach (ImportDoorAccess ida in recCheck) { DoorAudit da = dataTransferObject.Where(a => a.DoorOpen == ida.DoorOpen && a.CardNumber == ida.CardNumber).First(); if (da != null) da.DoInsert = false; } } ImportDoorAccess newIDA; foreach (DoorAudit newDoorAudit in dataTransferObject) { if (newDoorAudit.DoInsert) { newIDA = new ImportDoorAccess { CardNumber = newDoorAudit.CardNumber, Door = newDoorAudit.Door, DoorOpen = newDoorAudit.DoorOpen, Imported = newDoorAudit.Imported, RawData = newDoorAudit.RawData, UserName = newDoorAudit.UserName }; myEntities.AddToImportDoorAccess(newIDA); } } myEntities.SaveChanges(); } I am also getting this error: System.Data.UpdateException was unhandled Message="Unable to update the EntitySet 'ImportDoorAccess' because it has a DefiningQuery and no element exists in the element to support the current operation." Source="System.Data.SqlServerCe.Entity" What am I doing wrong? Any pointers are welcome.

    Read the article

  • Using Word COM objects in .NET, WinWord process won't quit after calling Word.Documents.Add

    - by Keith
    I'm running into the classic scenario where, when creating Word COM objects in .NET (via the Microsoft.Office.Interop.Word assembly), the WinWord process won't exit even though I'm properly closing and releasing the objects. I've narrowed it down to the use of the Word.Documents.Add() method. I can work with Word in other ways without a problem (opening documents, modifying contents, etc) and WinWord.exe quits when I tell it to. It's once I use the Add() method that the process is left running. Here is a simple example which reproduces the problem: Dim oWord As New Word.Application() oWord.Visible = False Dim oDocuments As Word.Documents = oWord.Documents Dim oDoc As Word.Document = oDocuments.Add(Template:=CObj(sTemplatePath), NewTemplate:=False, DocumentType:=Word.WdNewDocumentType.wdNewBlankDocument, Visible:=False) ' dispose objects oDoc.Close() While (Marshal.ReleaseComObject(oDoc) < 0) End While oDoc = Nothing oWord.Quit() While (Marshal.ReleaseComObject(oWord) < 0) End While oWord = Nothing As you can see I'm creating and disposing the objects properly, even taking the extra step to loop Marsha.ReleaseComObject until it returns the proper code. Working with the Word objects is fine in other regards, it's just that pesky Documents.Add that is causing me grief. Is there another object that gets created in this process that I need to reference and dispose of? Is there another disposal step I need to follow? Something else? Your help is much appreciated :)

    Read the article

  • ASP.NET MVC Custom Role Provider/RolePrincipal

    - by Keith K
    My asp.net MVC application is not caching roles instead it round tripping to the database every request. Also when I attempted to view the cookie I noticed it had not been written to the browser. Web.config: <roleManager defaultProvider="CustomRole" enabled="true" cacheRolesInCookie="true" cookiePath="/" cookieName="CustomRole" maxCachedResults="25" cookieSlidingExpiration="true" cookieProtection="All" cookieRequireSSL="false" createPersistentCookie="false"> <providers> <clear/> <add name="CustomRole" type="Membership.CustomRole, Membership" connectionString="MemberDB" applicationName="/"/> </providers> </roleManager>

    Read the article

  • C# WCF - Failed to invoke the service.

    - by Keith Barrows
    I am getting the following error when trying to use the WCF Test Client to hit my new web service. What is weird is every once in awhile it will execute once then start popping this error. Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service. My code (interface): [ServiceContract(Namespace = "http://rivworks.com/Services/2010/04/19")] public interface ISync { [OperationContract] bool Execute(long ClientID); } My code (class): public class Sync : ISync { #region ISync Members bool ISync.Execute(long ClientID) { return model.Product(ClientID); } #endregion } My config (EDIT - posted entire serviceModel section): <system.serviceModel> <diagnostics performanceCounters="Default"> <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" /> </diagnostics> <serviceHostingEnvironment aspNetCompatibilityEnabled="false" /> <behaviors> <endpointBehaviors> <behavior name="JsonpServiceBehavior"> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="SimpleServiceBehavior"> <serviceMetadata httpGetEnabled="True" policyVersion="Policy15"/> </behavior> <behavior name="RivWorks.Web.Service.ServiceBehavior"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <services> <service name="RivWorks.Web.Service.NegotiateService" behaviorConfiguration="SimpleServiceBehavior"> <endpoint address="" binding="customBinding" bindingConfiguration="jsonpBinding" behaviorConfiguration="JsonpServiceBehavior" contract="RivWorks.Web.Service.NegotiateService" /> <!--<host> <baseAddresses> <add baseAddress="http://kab.rivworks.com/services"/> </baseAddresses> </host> <endpoint address="" binding="wsHttpBinding" contract="RivWorks.Web.Service.NegotiateService" />--> <endpoint address="mex" binding="mexHttpBinding" contract="RivWorks.Web.Service.NegotiateService" /> </service> <service name="RivWorks.Web.Service.Sync" behaviorConfiguration="RivWorks.Web.Service.ServiceBehavior"> <endpoint address="" binding="wsHttpBinding" contract="RivWorks.Web.Service.ISync" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <extensions> <bindingElementExtensions> <add name="jsonpMessageEncoding" type="RivWorks.Web.Service.JSONPBindingExtension, RivWorks.Web.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> </bindingElementExtensions> </extensions> <bindings> <customBinding> <binding name="jsonpBinding" > <jsonpMessageEncoding /> <httpTransport manualAddressing="true"/> </binding> </customBinding> </bindings> </system.serviceModel> 2 questions: What am I missing that causes this error? How can I increase the time out for the service? TIA!

    Read the article

  • In WPF, how do I get a command in a Control Template to bind to a property in a parent?

    - by Keith
    I am relatively new to WPF and sometimes it makes my head explode. However, I do like the power behind it, especially when used with the MVVM model. I have a control template that contains a button. I use that control template inside of a custom control. I want to add a property on the custom control that will bind to the command property of the button inside the control template. Basically, it is a combo box with a button to the right of it to allow a user to pop up a search dialog. Since this control could appear on a usercontrol multiple times, I need to be able to potentially bind each control to a different command (Searh products, search customers, etc). However, I have been unable to figure out how to do this Here is some sample XAML <Style TargetType="{x:Type m:SelectionFieldControl}"> <Setter Property="LookupTemplate" Value="{StaticResource LookupTemplate}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type m:SelectionFieldControl}"> <Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True" Focusable="False"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" MinWidth="0" SharedSizeGroup="{Binding LabelShareSizeGroupName, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type m:BaseFieldControl}}}" /> <ColumnDefinition Width="1*" /> <ColumnDefinition Width="Auto" SharedSizeGroup="{Binding WidgetsShareSizeGroupName, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type m:BaseFieldControl}}}" /> </Grid.ColumnDefinitions> <!-- Customized Value Part --> <ComboBox x:Name="PART_Value" Grid.Column="1" Margin="4,2,0,1" SelectedValue="{Binding Path=SelectionField.Value, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type m:SelectionFieldControl}}}" IsEnabled="{Binding Field.IsNotReadOnly, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type m:SelectionFieldControl}}}" Visibility="{Binding Field.IsInEditMode, Converter={StaticResource TrueToVisible}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type m:SelectionFieldControl}}}" FontFamily="{StaticResource FontFamily_Default}" FontSize="11px"> <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling"/> </ItemsPanelTemplate> </ComboBox.ItemsPanel> </ComboBox> <StackPanel Grid.Column="2" Orientation="Horizontal" Name="PART_Extra" Focusable="False"> <ContentControl Name="PART_LookupContent" Template="{Binding LookupTemplate, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type m:SelectionFieldControl}}}" Focusable="False"/> </StackPanel> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> I thought I could get it to work by doing something like this <Button Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type SelectionFieldControl}}, Path=ShowSearchCommand}" Margin="2" /> but it does not work. Any help would be greatly appreciated.

    Read the article

  • Loading Separate Pages With Animation in JQTouch

    - by Donovan Keith
    I'm trying to convert a database-driven multiple-choice-style study website (written in JSP) into an iPhone app using JQTouch. If I load all of the Q&A's into their own divs in the same file I can easily link and animate between them using links to hashtags, like: a class="button" href="#question22" Unfortunately this isn't practical. The logic of the website as it currently works requires calls to a number of dynamically generated pages; I can't include every question in its own div in the same flat file. How would I go about dynamically (pre)loading the next question (a JSP page like AskQuestion.jsp?questionId=Kzhctand ) then serving that up within the app after the user presses a button? Thanks for any help you might offer. -Donovan

    Read the article

  • How to make a Custom Data Generator for SQL XML DataType.

    - by Keith Sirmons
    Howdy, I am using Visual Studio 2010 and am playing around with the Database Projects. I am creating a DataGenerationPlan to insert data into a simple table, in which one of the column datatypes is XML. Out of the box, the generation plan uses the Regular Expression generator and generates something like this : HGcSv9wa7yM44T9x5oFT4pmBkEmv62lJ7OyAmCnL6yqXC2X.......... I am looking at creating a custom data Generator for this data type and have followed this site for the basics: http://msdn.microsoft.com/en-us/library/aa833244.aspx This example works if I am creating a string datatype and using it for a nvarchar datatype. What do I need to change to hook this Generator to the XML Datatype? Below are my code files. The string property works for nvarchar. The XElement property does not work for the xml datatype, and the RecordXMLDataGenerator is not listed as an option in the Generator column for the generation plan. CustomDataGenerators: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Data.Schema.Tools.DataGenerator; using Microsoft.Data.Schema.Extensibility; using Microsoft.Data.Schema; using Microsoft.Data.Schema.Sql; using System.Xml.Linq; namespace CustomDataGenerators { [DatabaseSchemaProviderCompatibility(typeof(SqlDatabaseSchemaProvider))] public class RecordXMLDataGenerator : Generator { private XElement _RecordData; [Output(Description = "Generates string of XML Data for the Record.", Name = "RecordDataString")] public string RecordDataString { get { return _RecordData.ToString(SaveOptions.None); } } [Output(Description = "Generates XML Data for the Record.", Name = "RecordData")] public XElement RecordData { get { return _RecordData; } } protected override void OnGenerateNextValues() { base.OnGenerateNextValues(); XElement element = new XElement("Root", new XElement("Children1", 1), new XElement("Children6", 6) ); _RecordData = element; } } } XML Extensions File: <?xml version="1.0" encoding="utf-8" ?> <extensions assembly="" version="1" xmlns="urn:Microsoft.Data.Schema.Extensions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:Microsoft.Data.Schema.Extensions Microsoft.Data.Schema.Extensions.xsd"> <extension type="CustomDataGenerators.RecordXMLDataGenerator" assembly="CustomDataGenerators, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx" enabled="true"/> </extensions> Table.sql: CREATE TABLE [dbo].[Record] ( id int IDENTITY (1,1) NOT NULL, recordData xml NULL, userId int NULL, test nvarchar(max) NULL, rowver rowversion NULL, CONSTRAINT pk_RecordID PRIMARY KEY (id) )

    Read the article

  • LINQ 4 XML - What is the proper way to query deep in the tree structure?

    - by Keith Barrows
    I have an XML structure that is 4 deep: <?xml version="1.0" encoding="utf-8"?> <EmailRuleList xmlns:xsd="EmailRules.xsd"> <TargetPST name="Tech Communities"> <Parse emailAsList="true" useJustDomain="false" fromAddress="false" toAddress="true"> <EmailRule address="@aspadvice.com" folder="Lists, ASP" saveAttachments="false" /> <EmailRule address="@sqladvice.com" folder="Lists, SQL" saveAttachments="false" /> <EmailRule address="@xmladvice.com" folder="Lists, XML" saveAttachments="false" /> </Parse> <Parse emailAsList="false" useJustDomain="false" fromAddress="false" toAddress="true"> <EmailRule address="[email protected]" folder="Special Interest Groups|Northern Colorado Architects Group" saveAttachments="false" /> <EmailRule address="[email protected]" folder="Support|SpamBayes" saveAttachments="false" /> </Parse> <Parse emailAsList="false" useJustDomain="false" fromAddress="true" toAddress="false"> <EmailRule address="[email protected]" folder="Support|GoDaddy" saveAttachments="false" /> <EmailRule address="[email protected]" folder="Support|No-IP.com" saveAttachments="false" /> <EmailRule address="[email protected]" folder="Discussions|Orchard Project" saveAttachments="false" /> </Parse> <Parse emailAsList="false" useJustDomain="true" fromAddress="true" toAddress="false"> <EmailRule address="@agilejournal.com" folder="Newsletters|Agile Journal" saveAttachments="false"/> <EmailRule address="@axosoft.ccsend.com" folder="Newsletters|Axosoft Newsletter" saveAttachments="false"/> <EmailRule address="@axosoft.com" folder="Newsletters|Axosoft Newsletter" saveAttachments="false"/> <EmailRule address="@cmcrossroads.com" folder="Newsletters|CM Crossroads" saveAttachments="false" /> <EmailRule address="@urbancode.com" folder="Newsletters|Urbancode" saveAttachments="false" /> <EmailRule address="@urbancode.ccsend.com" folder="Newsletters|Urbancode" saveAttachments="false" /> <EmailRule address="@Infragistics.com" folder="Newsletters|Infragistics" saveAttachments="false" /> <EmailRule address="@zdnet.online.com" folder="Newsletters|ZDNet Tech Update Today" saveAttachments="false" /> <EmailRule address="@sqlservercentral.com" folder="Newsletters|SQLServerCentral.com" saveAttachments="false" /> <EmailRule address="@simple-talk.com" folder="Newsletters|Simple-Talk Newsletter" saveAttachments="false" /> </Parse> </TargetPST> <TargetPST name="[Sharpen the Saw]"> <Parse emailAsList="false" useJustDomain="false" fromAddress="false" toAddress="true"> <EmailRule address="[email protected]" folder="Head Geek|Job Alerts" saveAttachments="false" /> <EmailRule address="[email protected]" folder="Social|LinkedIn USMC" saveAttachments="false"/> </Parse> <Parse emailAsList="false" useJustDomain="false" fromAddress="true" toAddress="false"> <EmailRule address="[email protected]" folder="Head Geek|Job Alerts" saveAttachments="false" /> <EmailRule address="[email protected]" folder="Head Geek|Job Alerts" saveAttachments="false" /> <EmailRule address="[email protected]" folder="Social|Cruise Critic" saveAttachments="false"/> </Parse> <Parse emailAsList="false" useJustDomain="true" fromAddress="true" toAddress="false"> <EmailRule address="@moody.edu" folder="Social|5 Love Languages" saveAttachments="false" /> <EmailRule address="@postmaster.twitter.com" folder="Social|Twitter" saveAttachments="false"/> <EmailRule address="@diabetes.org" folder="Physical|American Diabetes Association" saveAttachments="false"/> <EmailRule address="@membership.webshots.com" folder="Social|Webshots" saveAttachments="false"/> </Parse> </TargetPST> </EmailRuleList> Now, I have both an FromAddress and a ToAddress that is parsed from an incoming email. I would like to do a LINQ query against a class set that was deserialized from this XML. For instance: ToAddress = [email protected] FromAddress = [email protected] Query: Get EmailRule.Include(Parse).Include(TargetPST) where address == ToAddress AND Parse.ToAddress==true AND Parse.useJustDomain==false Get EmailRule.Include(Parse).Include(TargetPST) where address == [ToAddress Domain Only] AND Parse.ToAddress==true AND Parse.useJustDomain==true Get EmailRule.Include(Parse).Include(TargetPST) where address == FromAddress AND Parse.FromAddress==true AND Parse.useJustDomain==false Get EmailRule.Include(Parse).Include(TargetPST) where address == [FromAddress Domain Only] AND Parse.FromAddress==true AND Parse.useJustDomain==true I am having a hard time figuring this LINQ query out. I can, of course, loop on all the bits in the XML like so (includes deserialization into objects): XmlSerializer s = new XmlSerializer(typeof(EmailRuleList)); TextReader r = new StreamReader(path); _emailRuleList = (EmailRuleList)s.Deserialize(r); TargetPST[] PSTList = _emailRuleList.Items; foreach (TargetPST targetPST in PSTList) { olRoot = GetRootFolder(targetPST.name); if (olRoot != null) { Parse[] ParseList = targetPST.Items; foreach (Parse parseRules in ParseList) { EmailRule[] EmailRuleList = parseRules.Items; foreach (EmailRule targetFolders in EmailRuleList) { } } } } However, this means going through all these loops for each and every address. It makes more sense to me to query against the Objects. Any tips appreciated!

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >