Search Results

Search found 6630 results on 266 pages for 'cname record'.

Page 95/266 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • Lesser Known NHibernate Session Methods

    - by Ricardo Peres
    The NHibernate ISession, the core of NHibernate usage, has some methods which are quite misunderstood and underused, to name a few, Merge, Persist, Replicate and SaveOrUpdateCopy. Their purpose is: Merge: copies properties from a transient entity to an eventually loaded entity with the same id in the first level cache; if there is no loaded entity with the same id, one will be loaded and placed in the first level cache first; if using version, the transient entity must have the same version as in the database; Persist: similar to Save or SaveOrUpdate, attaches a maybe new entity to the session, but does not generate an INSERT or UPDATE immediately and thus the entity does not get a database-generated id, it will only get it at flush time; Replicate: copies an instance from one session to another session, perhaps from a different session factory; SaveOrUpdateCopy: attaches a transient entity to the session and tries to save it. Here are some samples of its use. ISession session = ...; AuthorDetails existingDetails = session.Get<AuthorDetails>(1); //loads an entity and places it in the first level cache AuthorDetails detachedDetails = new AuthorDetails { ID = existingDetails.ID, Name = "Changed Name" }; //a detached entity with the same ID as the existing one Object mergedDetails = session.Merge(detachedDetails); //merges the Name property from the detached entity into the existing one; the detached entity does not get attached session.Flush(); //saves the existingDetails entity, since it is now dirty, due to the change in the Name property AuthorDetails details = ...; ISession session = ...; session.Persist(details); //details.ID is still 0 session.Flush(); //saves the details entity now and fetches its id ISessionFactory factory1 = ...; ISessionFactory factory2 = ...; ISession session1 = factory1.OpenSession(); ISession session2 = factory2.OpenSession(); AuthorDetails existingDetails = session1.Get<AuthorDetails>(1); //loads an entity session2.Replicate(existingDetails, ReplicationMode.Overwrite); //saves it into another session, overwriting any possibly existing one with the same id; other options are Ignore, where any existing record with the same id is left untouched, Exception, where an exception is thrown if there is a record with the same id and LatestVersion, where the latest version wins SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf'; SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; SyntaxHighlighter.all();

    Read the article

  • Ubuntu Install 11.10 doesn't recognize Windows 7 installation with new HDD

    - by arlendo
    Replaced my crashed HDD with a Seagate 2TB Sata (bought from a company who pulled it from a working computer, OS unknown) and did a fresh install of Windows 7. Windows shows 100MB boot partition (bootable NTFS) and 200GB Windows partition (NTFS), the rest is unallocated. Win7 Disk Management says the partitioning type is Master Boot Record. Win7 boots and runs fine. Ubuntu 11.10 Install procedes to Allocate Drive Space screen and should say This computer currently has Windows 7 on it. What would you like to do? Instead, it says something like Install doesn't detect any existing OS on this computer. When I click on Something else, the partition table shows only the unallocated space of 1.8TB. Ubuntu Disk Utility says Partitioning: Master Boot Record, but GParted Live says Partition Table: gpt. It was my original intention to have the Windows boot partition and application partition, then install Ubuntu 11.10 using boot, root, swap, and home partitions, and maybe another partition just for data (mostly photos). Currently, I would be happy if I could just get Ubuntu installed along with Win7. I am aware of the MBR limits of 3 Primary partitions and 1 Extended partition. I suspect that my new HDD is partitioned for GPT and that is why Ubuntu can't see the Win7 installation. Am I on the right track? I was going to use Windows Disk Management to convert GPT to MBR but I only have the one drive on my AMD-64 mini-computer and it says I have to empty the drive of all partitions before I can access the Convert command. And I can't find any bootable software that would allow me to do that conversion. Here is the result of sudo fdisk -l: ubuntu@ubuntu:~$ sudo fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 224 heads, 19 sectors/track, 918004 cylinders, total 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd4a68c18 Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 419637247 209715200 7 HPFS/NTFS/exFAT ubuntu@ubuntu:~$ Keep in mind that I'm a definite newbie to screwing around with the inner workings of Ubuntu. I previously had Ubuntu 10.04 running with Vista and I don't remember even having to partition anything that wasn't automatic in the install. Thanks for taking a look here. My Win7 is running fine but I miss my Ubuntu.

    Read the article

  • Webpage loading with wrong content-type after setting up CloudFlare

    - by Daniel Little
    I recently migrated my blog to the Ghost service, I've also setup an alias DNS record with CloudFlare. While showing the blog to a colleague I discovered one of the posts wasn't loading properly and would instead prompt to be downloaded with an application/octet-stream content-type. I can view all the pages without any issues and I believe we're both on the same network as well. Has anyone received a wrong content type like application/octet-stream using CloudFlare, or know what I can do to correct this?

    Read the article

  • Verizon CEO: Studies be damned, US is tops in broadband

    <b>ars Technica:</b> "Verizon CEO Ivan Seidenberg sat down for an on-the-record conversation yesterday at the Council for Foreign Relations, and he pulled no punches: the US is number one in the world when it comes to broadband. We're so far ahead of everyone else, it's "not even close.""

    Read the article

  • As a programmer, what would you use a personal Wiki for?

    - by Adam Harte
    Do any programmers out there keep a personal wiki? Either locally or online. What do you use your wiki for? or what might you use one for? I was thinking of starting a personal wiki as a place to record documentation and and other documents for my personal projects, and various notes etc, but how else is a personal (maybe private) Wiki useful to a programmer/developer? What type of things would you put in a personal Wiki?

    Read the article

  • SQL SERVER – DELETE, TRUNCATE and RESEED Identity

    - by pinaldave
    Yesterday I had a headache answering questions to one of the DBA on the subject of Reseting Identity Values for All Tables. After talking to the DBA I realized that he has no clue about how the identity column behaves when there is DELETE, TRUNCATE or RESEED Identity is used. Let us run a small T-SQL Script. Create a temp table with Identity column beginning with value 11. The seed value is 11. USE [TempDB] GO -- Create Table CREATE TABLE [dbo].[TestTable]( [ID] [int] IDENTITY(11,1) NOT NULL, [var] [nchar](10) NULL ) ON [PRIMARY] GO -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO When seed value is 11 the next value which is inserted has the identity column value as 11. – Select Data SELECT * FROM [TestTable] GO Effect of DELETE statement -- Delete Data DELETE FROM [TestTable] GO When the DELETE statement is executed without WHERE clause it will delete all the rows. However, when a new record is inserted the identity value is increased from 11 to 12. It does not reset but keep on increasing. -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO -- Select Data SELECT * FROM [TestTable] Effect of TRUNCATE statement -- Truncate table TRUNCATE TABLE [TestTable] GO When the TRUNCATE statement is executed it will remove all the rows. However, when a new record is inserted the identity value is increased from 11 (which is original value). TRUNCATE resets the identity value to the original seed value of the table. -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO -- Select Data SELECT * FROM [TestTable] GO Effect of RESEED statement If you notice I am using the reseed value as 1. The original seed value when I created table is 11. However, I am reseeding it with value 1. -- Reseed DBCC CHECKIDENT ('TestTable', RESEED, 1) GO When we insert the one more value and check the value it will generate the new value as 2. This new value logic is Reseed Value + Interval Value – in this case it will be 1+1 = 2. -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO -- Select Data SELECT * FROM [TestTable] GO Here is the clean up act. -- Clean up DROP TABLE [TestTable] GO Question for you: If I reseed value with some random number followed by the truncate command on the table what will be the seed value of the table. (Example, if original seed value is 11 and I reseed the value to 1. If I follow up with truncate table what will be the seed value now? Here is the complete script together. You can modify it and find the answer to the above question. Please leave a comment with your answer. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Turning Supply Data Into Savings- (Almost) Everything You Need to Know in 12 Minutes

    - by David Hope-Ross
    Strategic sourcing and supplier management analytics are easy. The hard part is getting reliable data that provide an accurate record of suppliers, spend, invoices, expenses, and so on. In this new AppsCast, e-Three’s Amy Joshi provides an extraordinarily cogent explanation of key challenges, technologies, and tactics for improving spend visibility. Take twelve minutes to listen and learn. The techniques that Amy outlines can add millions to your organization’s bottom line.

    Read the article

  • [News] Les 60 outils .NET que vous devriez conna?tre

    Le site de blog webdistortion.com publie une liste de 60 outils que tout d?velopper .NET doit conna?tre : "Every good developer knows never to re-invent the wheel, especially if there is software out there that has been tested by others, and has an established track record. As a developer using the .NET framework I?ve found some of these libraries invaluable, so I?m sharing them for some of the other dev?s out there with a brief outline of how to use."

    Read the article

  • Recording an Interview with Skype using Audacity 1.3

    <b>Packt:</b> "In this article by Bethany Hiitola, author of Getting started with Audacity 1.3, we will learn all the details of using third-party internet telephony software such as Skype to record telephone interviews. We will also cover how to set up a timed recording."

    Read the article

  • Ubuntu UK Podcast: Their Purple Moment

    <b>Ubuntu UK Podcast:</b> "We interview the awesome Stuart Langridge and discuss the Ubuntu One Music Store, beta testing, record tokens, Rhythmbox, MP3s, Britney Spears, file syncing, customer service, getting music into the store and Severed Fifth, Frequently Asked Questions, vinyl, reaching &#8216;real&#8217; people and Shot of Jaq."

    Read the article

  • Authorize.net CIM or using the module's storage

    - by CQM
    this site is intended to allow users to sign up and pay for a service, they will be able to pay using Paypal and Authorize.net since I am using two different payment gateways, it makes me wonder where I want to keep the user information. Authorize.net offers CIM, but some users will pay with paypal therefore Authorize.net won't have all user's information Would the best solution then be to not use CIM and store everything within my member database module? for the record I am using OSE for Joomla for my subscriber service

    Read the article

  • SELECT TOP 1

    - by Derek Dieter
    There are many good uses of the SELECT TOP 1 method of querying. Essentially, the select top 1 method is used to find the min or max record for a particular value. There is some debate as to whether this is the ‘correct’ method of querying, however it should be known that this [...]

    Read the article

  • How to switch off wifi on startup or from the console

    - by mit
    I have installed ubuntu 10.04 on a laptop. Wifi is switched on by default on startup. I can disable it rightclicking the network manager icon in the gnome bar. How can I set it to have wifi switched off as default? Alternatively, how can I switch off wifi on the console? I tried already the rfkill command but it does not list any devices and it does not switch off wifi, I tried different parameters. This is a standard install of the Ubuntu 10.04 i386 Desktop Live CD on an IBM T40 Laptop. EDIT A: This is the output of some rfkill commands on my system, and it does not affect the wifi of the laptop: $ rfkill --help Usage: rfkill [options] command Options: --version show version (0.4) Commands: help event list [IDENTIFIER] block IDENTIFIER unblock IDENTIFIER where IDENTIFIER is the index no. of an rfkill switch or one of: <idx> all wifi wlan bluetooth uwb ultrawideband wimax wwan gps fm $ rfkill list $ rfkill list wifi $ rfkill list all $ rfkill list wlan $ sudo rfkill list all $ sudo rfkill block all $ sudo rfkill block wlan $ sudo rfkill block wifi $ EDIT B: Now I found out that sudo ifconfig eth1 down turns it off. And I can turn it on through the gnome network applet again. But the applet does not reflect the change from the commandline, it stills believes wifi is switched on. I have to switch it off and on again on the applet to switch it on again, when I switched it off from the console. Is there a better way? This is what the syslog looks like when I switch wireless off and on again from the network manager: NetworkManager: <info> (eth1): device state change: 3 -> 2 (reason 0) NetworkManager: <info> (eth1): deactivating device (reason: 0). NetworkManager: <info> Policy set '24' (eth0) as default for routing and DNS. NetworkManager: <info> (eth1): taking down device. avahi-daemon[660]: Withdrawing address record for fe80::202:8aff:feba:d798 on eth1. kernel: [ 971.472116] airo(eth1): cmd:3 status:7f03 rsp0:0 rsp1:0 rsp2:0 NetworkManager: <info> (eth1): bringing up device. NetworkManager: <info> (eth1): supplicant interface state: starting -> ready NetworkManager: <info> (eth1): device state change: 2 -> 3 (reason 42) avahi-daemon[660]: Registering new address record for fe80::202:8aff:feba:d798 on eth1.*. kernel: [ 965.512048] eth1: no IPv6 routers present

    Read the article

  • Problem with RecordMyDesktop program

    - by Saeid87
    I am trying to record some tutorials using RecordMyDesktop application. The problem is the video becomes jagged and unusable as you can see from the screenshot I have taken while playing a saved video. I don't know what can be the problem, but I guess it has something to do with my graphics driver. My laptop is using Intel HD 3000 series and I couldn't find any update for it. If you know what might be the problem and how to solve it I will really appreciate it!

    Read the article

  • Hello SSIS World, From XML!

    This article brings us an SSIS package that reads an XML file and sequentially displays each XML record in a MessageBox before inserting it into a staging table. You can use this to get XML data into your SQL Server database for further processing.

    Read the article

  • Resolving data redundancy up front

    - by okeofs
    Introduction As all of us do when confronted with a problem, the resource of choice is to ‘Google it’. This is where the plot thickens. Recently I was asked to stage data from numerous databases which were to be loaded into a data warehouse. To make a long story short, I was looking for a manner in which to obtain the table names from each database, to ascertain potential overlap.   As the source data comes from a SQL database created from dumps of a third party product,  one could say that there were +/- 95 tables for each database.   Yes I know that first instinct is to use the system stored procedure “exec sp_msforeachdb 'select "?" AS db, * from [?].sys.tables'”. However, if one stops to think about this, it would be nice to have all the results in a temporary or disc based  table; which in itself , implies additional labour. This said,  I decided to ‘re-invent’ the wheel. The full code sample may be found at the bottom of this article.   Define a few temporary tables and variables   declare @SQL varchar(max); declare @databasename varchar(75) /* drop table ##rawdata3 drop table #rawdata1 drop table #rawdata11 */ -- A temp table to hold the names of my databases CREATE TABLE #rawdata1 (    database_name varchar(50) ,    database_size varchar(50),    remarks Varchar(50) )     --A temp table with the same database names as above, HOWEVER using an --Identity number (recNO) as a loop variable. --You will note below that I loop through until I reach 25 (see below) as at --that point the system databases, the reporting server database etc begin. --1- 24 are user databases. These are really what I was looking for. --Whilst NOT the best solution,it works and the code was meant as a quick --and dirty. CREATE TABLE #rawdata11 (    recNo int identity(1,1),    database_name varchar(50) ,    database_size varchar(50),    remarks Varchar(50) )   --My output table showing the database name and table name CREATE TABLE ##rawdata3 (    database_name varchar(75) ,    table_name varchar(75), )   Insert the database names into a temporary table I pull the database names using the system stored procedure sp_databases   INSERT INTO #rawdata1 EXEC sp_databases Go   Insert the results from #rawdata1 into a table containing a record number  #rawdata11 so that I can LOOP through the extract   INSERT into #rawdata11 select * from  #rawdata1   We now declare 3 more variables:  @kounter is used to keep track of our position within the loop. @databasename is used to keep track of the’ current ‘ database name being used in the current pass of the loop;  as inorder to obtain the tables for that database we  need to issue a ‘USE’ statement, an insert command and other related code parts. This is the challenging part. @sql is a varchar(max) variable used to contain the ‘USE’ statement PLUS the’ insert ‘ code statements. We now initalize @kounter to 1 .   declare @kounter int; declare @databasename varchar(75); declare @sql varchar(max); set @kounter = 1   The Loop The astute reader will remember that the temporary table #rawdata11 contains our  database names  and each ‘database row’ has a record number (recNo). I am only interested in record numbers under 25. I now set the value of the temporary variable @DatabaseName (see below) .Note that I used the row number as a part of the predicate. Now, knowing the database name, I can create dynamic T-SQL to be executed using the sp_sqlexec stored procedure (see the code in red below). Finally, after all the tables for that given database have been placed in temporary table ##rawdata3, I increment the counter and continue on. Note that I used a global temporary table to ensure that the result set persists after the termination of the run. At some stage, I plan to redo this part of the code, as global temporary tables are not really an ideal solution.    WHILE (@kounter < 25)  BEGIN  select @DatabaseName = database_name from #rawdata11 where recNo = @kounter  set @SQL = 'Use ' + @DatabaseName + ' Insert into ##rawdata3 ' + + ' SELECT table_catalog,Table_name FROM information_schema.tables' exec sp_sqlexec  @Sql  SET @kounter  = @kounter + 1  END   The full code extract   Here is the full code sample.   declare @SQL varchar(max); declare @databasename varchar(75) /* drop table ##rawdata3 drop table #rawdata1 drop table #rawdata11 */ CREATE TABLE #rawdata1 (    database_name varchar(50) ,    database_size varchar(50),    remarks Varchar(50) ) CREATE TABLE #rawdata11 (    recNo int identity(1,1),    database_name varchar(50) ,    database_size varchar(50),    remarks Varchar(50) ) CREATE TABLE ##rawdata3 (    database_name varchar(75) ,    table_name varchar(75), )   INSERT INTO #rawdata1 EXEC sp_databases go INSERT into #rawdata11 select * from  #rawdata1 declare @kounter int; declare @databasename varchar(75); declare @sql varchar(max); set @kounter = 1 WHILE (@kounter < 25)  BEGIN  select @databasename = database_name from #rawdata11 where recNo = @kounter  set @SQL = 'Use ' + @DatabaseName + ' Insert into ##rawdata3 ' + + ' SELECT table_catalog,Table_name FROM information_schema.tables' exec sp_sqlexec  @Sql  SET @kounter  = @kounter + 1  END    select * from ##rawdata3  where table_name like '%SalesOrderHeader%'

    Read the article

  • SQLAuthority News Interesting Whitepaper We Loaded 1TB in 30 Minutes with SSIS, and So Can You

    In February 2008, Microsoft announced a record-breaking data load using Microsoft SQL Server Integration Services (SSIS): 1 TB of data in less than 30 minutes. That data load, using SQL Server Integration Services, was 30% faster than the previous best time using a commercial ETL tool. This paper outlines what it took: the software, hardware, [...]...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

  • Use Expressions with LINQ to Entities

    - by EltonStoneman
    [Source: http://geekswithblogs.net/EltonStoneman] Recently I've been putting together a generic approach for paging the response from a WCF service. Paging changes the service signature, so it's not as simple as adding a behavior to an existing service in config, but the complexity of the paging is isolated in a generic base class. We're using the Entity Framework talking to SQL Server, so when we ask for a page using LINQ's .Take() method we get a nice efficient SQL query for just the rows we want, with minimal impact on SQL Server and network traffic. We use the maximum ID of the record returned as a high-water mark (rather than using .Skip() to go to the next record), so the approach caters for records being deleted between page requests. In the paged response we include a HasMorePages indicator, computed by comparing the max ID in the page of results to the max ID for the whole resultset - if the latter is bigger, then there are more pages. In some quick performance testing, the paged version of the service performed much more slowly than the unpaged version, which was unexpected. We narrowed it down to the code which gets the max ID for the full resultset - instead of building an efficient MAX() SQL query, EF was returning the whole resultset and then computing the max ID in the service layer. It's easy to reproduce - take this AdventureWorks query:             var context = new AdventureWorksEntities();             var query = from od in context.SalesOrderDetail                         where od.ModifiedDate >= modified                          && od.SalesOrderDetailID.CompareTo(id) > 0                         orderby od.SalesOrderDetailID                         select od;   We can find the maximum SalesOrderDetailID like this:             var maxIdEfficiently = query.Max(od => od.SalesOrderDetailID);   which produces our efficient MAX() SQL query. If we're doing this generically and we already have the ID function in a Func:             Func<SalesOrderDetail, int> idFunc = od => od.SalesOrderDetailID;             var maxIdInefficiently = query.Max(idFunc);   This fetches all the results from the query and then runs the Max() function in code. If you look at the difference in Reflector, the first call passes an Expression to the Max(), while the second call passes a Func. So it's an easy fix - wrap the Func in an Expression:             Expression<Func<SalesOrderDetail, int>> idExpression = od => od.SalesOrderDetailID;             var maxIdEfficientlyAgain = query.Max(idExpression);   - and we're back to running an efficient MAX() statement. Evidently the EF provider can dissect an Expression and build its equivalent in SQL, but it can't do that with Funcs.

    Read the article

  • Protecting Data from Users

    What is the best way to prevent unintended updates or deletes in a table? The small changes may not be so hard to recover from, but what if every record in the table underwent a change? How can you protect users from themselves and how do you protect yourself from you?

    Read the article

  • Evolution sending Email Settings

    - by Jack
    Can receive Comcast mail with evolution but cannot send. The SMTP settings record more digits when clicking the Server Configuration apply key. Sending ([email protected]:tenz222) port587 After clicking apply, receive a "Error while sending message" host lookup failed etc When rechecking,the sever settings are, ([email protected]%253atenz222) Attempted this process many times with same result. Now need to be proactive and ask for help. Will phone for help anywhere, anytime in USA. Thanks

    Read the article

  • Using the FormView Web Control in ASP.NET 3.5

    A FormView web control works much like a DetailsView web control it will display one record at a time to the browser from the database. The difference is that FormView is a template-based layout for which a developer can make detailed changes that affect the final output when rendered in the browser. This tutorial will explain how it works and walk you through setting up a FormView web control.... Test Drive the Next Wave of Productivity Find Microsoft Office 2010 and SharePoint 2010 trials, demos, videos, and more.

    Read the article

  • Hosting media on separate server than web server

    - by user18832
    Basically I have a website hosted by a web hosting company which I have limited access to (ftp upload etc). I have a home server which I use to record and store audio files. Is there an elegant way or best practice to host a page on the webserver which links to the audio files? I'm considering hosting a page on the home server and redirecting to that from the web server, or setting up something like rsync to push the audio files to the web server - I'm just not certain which solution would be best.

    Read the article

  • Tales from the Coalface - A Software Hero I have met.

    - by TATWORTH
    I use the word Hero to describe my friend, who wrote a word processor program that did not use a keyboard. This program was used by a 34-year woman who previously was unable to communicate. The first thing she wrote after she learned how to use it was "Nicole loves Mum". The details of this heroic act are documented in the Hansard (record of proceedings) of the Australian House of Parliament. A copy is available at http://masonsoft.co.uk/hansard.pdf

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >