Search Results

Search found 7884 results on 316 pages for 'ben record'.

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

  • DMV {dm_os_ring_buffers} - Queries to help pinpoint current Issues / usual usage patterns

    - by NeilHambly
    I'm been running some queries (below) to help me identify when I have had time-sensitive performance issues around Memory/CPU, I didn't want to load up additional overhead to the system (unless absolutely neccessary) using traces or profiler  - naturally we have various methods to do this Perfmon counters, DBCC, DMVs etc.. One quick way I like is to run a few DMV queries (normally back in seconds) to help me find those RECENT specific time periods when the system has been substantially changed in some way using, this is using the DMV dm_os_ring_buffers This one helps me identify when I'm expericing Timeout Errors (1222).. modiy code to look for other error as highlight belowDECLARE @ts_now BIGINT,@dt_max BIGINT, @dt_min BIGINT  SELECT @ts_now = cpu_ticks / CONVERT(FLOAT, cpu_ticks_in_ms) FROM sys.dm_os_sys_info SELECT @dt_max = MAX(timestamp), @dt_min = MIN(timestamp)    FROM sys.dm_os_ring_buffers WHERE ring_buffer_type = N'RING_BUFFER_EXCEPTION'  SELECT       record_id      ,DATEADD(ms, -1 * (@ts_now - [timestamp]), GETDATE()) AS EventTime      ,y.Error      ,UserDefined      ,b.description as NormalizedText FROM       (       SELECT       record.value('(./Record/@id)[1]', 'int')                    AS record_id,       record.value('(./Record/Exception/Error)[1]', 'int')        AS Error,       record.value('(./Record/Exception/UserDefined)[1]', 'int')  AS UserDefined,      TIMESTAMP       FROM             (             SELECT TIMESTAMP, CONVERT(XML, record) AS record             FROM sys.dm_os_ring_buffers             WHERE ring_buffer_type = N'RING_BUFFER_EXCEPTION'             AND record LIKE '% %'            ) AS x      ) AS y INNER JOIN sys.sysmessages b on y.Error = b.error WHERE b.msglangid = 1033 and  y.Error = 1222 ORDER BY record_id DESC Sample Output record_id EventTime Error UserDefined NormalizedText 15199195 18/03/2010 14:00 1222 0 Lock request time out period exceeded. 15199194 18/03/2010 14:00 1222 0 Lock request time out period exceeded. 15199193 18/03/2010 14:00 1222 0 Lock request time out period exceeded. 15199192 18/03/2010 14:00 1222 0 Lock request time out period exceeded. 15199191 18/03/2010 14:00 1222 0 Lock request time out period exceeded.  This one helps me identify when I have Unusally High Processing (> 50%) or # Page-FaultsSELECT record.value('(./Record/@id)[1]', 'int') AS record_id,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int')              AS SystemIdle,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int')      AS SQLProcessUtilization,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/UserModeTime)[1]', 'bigint')         AS UserModeTime,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/KernelModeTime)[1]', 'bigint')       AS KernelModeTime,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/PageFaults)[1]', 'bigint')           AS PageFaults,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/WorkingSetDelta)[1]', 'bigint')      AS WorkingSetDelta,record.value('(./Record/SchedulerMonitorEvent/SystemHealth/MemoryUtilization)[1]', 'int')       AS MemoryUtilization,TIMESTAMPFROM (        SELECT TIMESTAMP, CONVERT(XML, record) AS record         FROM sys.dm_os_ring_buffers         WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR'        AND record LIKE '% %'         ) AS x Example: Showing entries > 50% SQL CPU record_id SystemIdle SQLProcessUtilization UserModeTime KernelModeTime PageFaults WorkingSetDelta MemoryUtilization TIMESTAMP 111916 66 29 36718750 1374843750 21333 -40960 100 7991061289 111917 54 41 50156250 1954062500 26914 -28672 100 7991121290 111918 57 39 42968750 1838437500 30096 20480 100 7991181290 111919 41 53 43906250 2530156250 22088 -4096 100 7991241307 111920 48 45 40937500 2124062500 26395 8192 100 7991301310 111921 52 43 35625000 2052812500 21996 155648 100 7991361311 111922 40 55 36875000 2637343750 33355 -262144 100 7991421311 111923 36 58 44843750 2786562500 47019 28672 100 7991481311 111924 31 64 53437500 3046562500 31027 61440 100 7991541314 111925 36 57 43906250 2711250000 37074 -8192 100 7991601317 111926 52 43 43437500 2060156250 29176 20480 100 7991661318 111927 71 24 33750000 1141250000 14478 16384 100 7991721320 111928 71 23 34531250 1116250000 12711 -20480 100 7991781320 111929 53 36 46562500 1714062500 26684 200704 100 7991841323 Finally one to provide some understanding of the level of memory state changes that are ocuringSELECT record.value('(./Record/@id)[1]', 'int')                                                       AS 'record_id',record.value('(./Record/ResourceMonitor/Notification)[1]', 'VARCHAR(100)')                     AS 'ReservedMemory',record.value('(./Record/ResourceMonitor/Indicators)[1]', 'int')                                AS 'Indicators',record.value('(./Record/ResourceMonitor/Effect/@state)[1]', 'VARCHAR(100)')         + ' - ' + record.value('(./Record/ResourceMonitor/Effect/@reversed)[1]', 'VARCHAR(100)')      + ' - ' + record.value('(./Record/ResourceMonitor/Effect)[1]', 'VARCHAR(100)')                           AS 'APPLY-HIGHPM',record.value('(./Record/ResourceMonitor/Effect/@state)[2]', 'VARCHAR(100)')         + ' - ' + record.value('(./Record/ResourceMonitor/Effect/@reversed)[2]', 'VARCHAR(100)')      + ' - ' + record.value('(./Record/ResourceMonitor/Effect)[2]', 'VARCHAR(100)')                           AS 'APPLY-HIGHPM',record.value('(./Record/ResourceMonitor/Effect/@state)[3]', 'VARCHAR(100)')         + ' - ' + record.value('(./Record/ResourceMonitor/Effect/@reversed)[3]', 'VARCHAR(100)')      + ' - ' + record.value('(./Record/ResourceMonitor/Effect)[3]', 'VARCHAR(100)')                           AS 'REVERT_HIGHPM',record.value('(./Record/MemoryNode/ReservedMemory)[1]', 'int')                                 AS 'ReservedMemory',record.value('(./Record/MemoryNode/CommittedMemory)[1]', 'int')                                AS 'CommittedMemory',record.value('(./Record/MemoryNode/SharedMemory)[1]', 'int')                                   AS 'SharedMemory',record.value('(./Record/MemoryNode/AWEMemory)[1]', 'int')                                      AS 'AWEMemory',record.value('(./Record/MemoryNode/SinglePagesMemory)[1]', 'int')                              AS 'SinglePagesMemory',record.value('(./Record/MemoryNode/CachedMemory)[1]', 'int')                                   AS 'CachedMemory',record.value('(./Record/MemoryRecord/MemoryUtilization)[1]', 'int')                            AS 'MemoryUtilization',record.value('(./Record/MemoryRecord/TotalPhysicalMemory)[1]', 'int')                          AS 'TotalPhysicalMemory',record.value('(./Record/MemoryRecord/AvailablePhysicalMemory)[1]', 'int')                      AS 'AvailablePhysicalMemory',record.value('(./Record/MemoryRecord/TotalPageFile)[1]', 'int')                                AS 'TotalPageFile',record.value('(./Record/MemoryRecord/AvailablePageFile)[1]', 'int')                            AS 'AvailablePageFile',record.value('(./Record/MemoryRecord/TotalVirtualAddressSpace)[1]', 'bigint')                  AS 'TotalVirtualAddressSpace',record.value('(./Record/MemoryRecord/AvailableVirtualAddressSpace)[1]', 'bigint')              AS 'AvailableVirtualAddressSpace',record.value('(./Record/MemoryRecord/AvailableExtendedVirtualAddressSpace)[1]', 'bigint')      AS 'AvailableExtendedVirtualAddressSpace', TIMESTAMPFROM (        SELECT TIMESTAMP, CONVERT(XML, record) AS record         FROM sys.dm_os_ring_buffers         WHERE ring_buffer_type = N'RING_BUFFER_RESOURCE_MONITOR'        AND record LIKE '% %'        ) AS x  

    Read the article

  • Retrieving only the first record or record at a certain index in LINQ

    - by vik20000in
    While working with data it’s not always required that we fetch all the records. Many a times we only need to fetch the first record, or some records in some index, in the record set. With LINQ we can get the desired record very easily with the help of the provided element operators. Simple get the first record. If you want only the first record in record set we can use the first method [Note that this can also be done easily done with the help of the take method by providing the value as one].     List<Product> products = GetProductList();      Product product12 = (         from prod in products         where prod.ProductID == 12         select prod)         .First();   We can also very easily put some condition on which first record to be fetched.     string[] strings = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };     string startsWithO = strings.First(s => s[0] == 'o');  In the above example the result would be “one” because that is the first record starting with “o”.  Also the fact that there will be chances that there are no value returned in the result set. When we know such possibilities we can use the FirstorDefault() method to return the first record or incase there are no records get the default value.        int[] numbers = {};     int firstNumOrDefault = numbers.FirstOrDefault();  In case we do not want the first record but the second or the third or any other later record then we can use the ElementAt() method. In the ElementAt() method we need to pass the index number for which we want the record and we will receive the result for that element.      int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };      int fourthLowNum = (         from num in numbers         where num > 5         select num )         .ElementAt(1); Vikram

    Read the article

  • Ubuntu and Windows 8 shared partition gets corrupted

    - by Bruno-P
    I have a dual boot (Ubuntu 12.04 and Windows 8) system. Both systems have access to an NTFS "DATA" partition which contains all my images, documents, music and some application data like Chrome and Thunderbird Profiles which used by both OS. Everything was working fine in my Dual boot Ubuntu/Windows 7, but after updating to Windows 8 I am having a lot of troubles. First, sometimes, I add some files from Ubuntu into my DATA partition but they don't show up in Windows. Sometimes, I can't even use the DATA partition from Windows. When I try to save a file it gives an error "The directory or file is corrupted or unreadable". I need to run checkdisk to fix it but after some time, same error appears. Before upgrading to Windows 8 I also installed a new hard drive and copied the old data using clonezilla (full disk clone). Here is the log of my last chkdisk: Chkdsk was executed in read/write mode. Checking file system on D: Volume dismounted. All opened handles to this volume are now invalid. Volume label is DATA. CHKDSK is verifying files (stage 1 of 3)... Deleted corrupt attribute list entry with type code 128 in file 67963. Unable to find child frs 0x12a3f with sequence number 0x15. The attribute of type 0x80 and instance tag 0x2 in file 0x1097b has allocated length of 0x560000 instead of 0x427000. Deleted corrupt attribute list entry with type code 128 in file 67963. Unable to locate attribute with instance tag 0x2 and segment reference 0x1e00000001097b. The expected attribute type is 0x80. Deleting corrupt attribute record (128, "") from file record segment 67963. Attribute record of type 0x80 and instance tag 0x3 is cross linked starting at 0x2431b2 for possibly 0x20 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x3 in file 0x1791e is already in use. Deleting corrupt attribute record (128, "") from file record segment 96542. Attribute record of type 0x80 and instance tag 0x4 is cross linked starting at 0x6bc7 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x4 in file 0x17e83 is already in use. Deleting corrupt attribute record (128, "") from file record segment 97923. Attribute record of type 0x80 and instance tag 0x4 is cross linked starting at 0x1f7cec for possibly 0x5 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x4 in file 0x17eaf is already in use. Deleting corrupt attribute record (128, "") from file record segment 97967. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x441bd7f for possibly 0x9 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x32085 is already in use. Deleting corrupt attribute record (128, "") from file record segment 204933. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4457850 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x320be is already in use. Deleting corrupt attribute record (128, "") from file record segment 204990. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4859249 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3726b is already in use. Deleting corrupt attribute record (128, "") from file record segment 225899. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x485d309 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3726c is already in use. Deleting corrupt attribute record (128, "") from file record segment 225900. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x48a47de for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37286 is already in use. Deleting corrupt attribute record (128, "") from file record segment 225926. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x48ac80b for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37287 is already in use. Deleting corrupt attribute record (128, "") from file record segment 225927. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x48ae7ef for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37288 is already in use. Deleting corrupt attribute record (128, "") from file record segment 225928. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x48af7f8 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3728a is already in use. Deleting corrupt attribute record (128, "") from file record segment 225930. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x48c39b6 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37292 is already in use. Deleting corrupt attribute record (128, "") from file record segment 225938. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x495d37a for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x372d7 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226007. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4d0bd38 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x372dc is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226012. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4c2d9bc for possibly 0x1 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x372ed is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226029. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4a4c1c3 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37354 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226132. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4a8e639 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37376 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226166. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4a8f6eb for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37379 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226169. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4ae1aa8 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37391 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226193. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4b00d45 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x37396 is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226198. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4b02d50 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3739c is already in use. Deleting corrupt attribute record (128, "") from file record segment 226204. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4b3407a for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x373a8 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226216. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4bd8a1b for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x373db is already in use. Deleting corrupt attribute record (128, "") from file record segment 226267. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4bd9a28 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x373dd is already in use. Deleting corrupt attribute record (128, "") from file record segment 226269. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4c2fb24 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x373f3 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226291. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cb67e9 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37424 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226340. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cba829 for possibly 0x2 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37425 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226341. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cbe868 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37427 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226343. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cbf878 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37428 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226344. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cc58d8 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3742a is already in use. Deleting corrupt attribute record (128, "") from file record segment 226346. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4ccc943 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3742b is already in use. Deleting corrupt attribute record (128, "") from file record segment 226347. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cd199b for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3742d is already in use. Deleting corrupt attribute record (128, "") from file record segment 226349. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cd29a8 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3742f is already in use. Deleting corrupt attribute record (128, "") from file record segment 226351. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cd39b8 for possibly 0x2 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37430 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226352. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cd49c8 for possibly 0x2 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37432 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226354. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cd9a16 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37435 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226357. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cdca46 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37436 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226358. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4ce0a78 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37437 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226359. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4ce6ad9 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3743a is already in use. Deleting corrupt attribute record (128, "") from file record segment 226362. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cebb28 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3743b is already in use. Deleting corrupt attribute record (128, "") from file record segment 226363. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4ceeb67 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3743d is already in use. Deleting corrupt attribute record (128, "") from file record segment 226365. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cf4bc6 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x3743e is already in use. Deleting corrupt attribute record (128, "") from file record segment 226366. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cfbc3a for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37440 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226368. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4cfcc48 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37442 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226370. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4d02ca9 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37443 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226371. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4d06ce8 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37444 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226372. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4d9a608 for possibly 0x2 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x37449 is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226377. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4d844ab for possibly 0x1 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x3744b is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226379. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4d6c32b for possibly 0x1 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x3744c is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226380. Attribute record of type 0xa0 and instance tag 0x5 is cross linked starting at 0x4d2af25 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0xa0 and instance tag 0x5 in file 0x3744e is already in use. Deleting corrupt attribute record (160, $I30) from file record segment 226382. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4d0fd78 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x80 and instance tag 0x2 in file 0x37451 is already in use. Deleting corrupt attribute record (128, "") from file record segment 226385. Attribute record of type 0x80 and instance tag 0x2 is cross linked starting at 0x4d16ef8 for possibly 0x1 clusters. Some clusters occupied by attribute of type 0x8 Can anyone help? Thank you

    Read the article

  • www a-record vs cname-record

    - by Sorin Buturugeanu
    Hi! I have a website that I will be hosting DNS for (testing purposes at first and then it will have some limited traffic). I have set up DNS so that site.tld has an A record to the actual IP but I don't know what to do about www.site.tld. Both site.tld and www.site.tld will point to the same server / application so my logic tells me to add a cname record so that www.site.tld becomes an alias for site.tld, BUT, I've been checking my settings with intodns.com and if I only add a CNAME for the www.site.tld it gives me the following error: ERROR: I could not get any A records for www.cexa.ro! (the error clears once I do an A record for www.site.tld to point to the actual IP) I don't know if there is a "rule" that "www." should always be an A record even though it's actually pointing to the same IP / application. Thanks for helping me understand this!

    Read the article

  • Wildcard 'A' record overriding CNAME record

    - by user116890
    I have a Wildcard * A record for self-registration of subdomains by users on our web app. All works fine. I now need to set up an alias for support.mydomain.com to point to mydomain.freshdesk.com. I created a CNAME record as per instructions however it appears my Wildcard A record is overriding the CNAME entry. Any thoughts on how to resolve this? I need the wildcard so creating an A record for each user subdomain is not possible. Thanks.

    Read the article

  • Sending an Email from 2 Mail Servers

    - by Ted Smith
    We are currently attempting to move away from using a "local" mail(exchange) server to an cloud based offering for all our automated emails. The problem is that we send and receive thousands for emails a day and its uptime is quite critical so the business do not want to put all their eggs in one basket, so if we would like to use a cloud based offering(mailgun) they would like a backup if this goes down. So my question is: Would it be possible to set multpile A, TXT and CNAME records to multiple IP address so if one mail server goes down we can automatically start sending emails from the fallover(without them being blocked doing a reverse DNS lookup)? I know we will still need to adjust the MX record for incoming emails but that is acceptable to not receive emails for a short(1-2 hours) of time. Does this make sense?

    Read the article

  • where is this function getting its values from

    - by user295189
    I have the JS file below that I am working on and I have a need to know this specific function pg.getRecord_Response = function(){ } within the file. I need to know where are the values are coming from in this function for example arguments[0].responseText? I am new to javascript so any help will be much appreciated. Thanks var pg = new Object(); var da = document.body.all; // ===== - EXPRESS BUILD [REQUEST] - ===== // pg.expressBuild_Request = function(){ var n = new Object(); n.patientID = request.patientID; n.encounterID = request.encounterID; n.flowSheetID = request.flowSheetID; n.encounterPlan = request.encounterPlan; n.action = "/location/diagnosis/dsp_expressBuild.php"; n.target = popWinCenterScreen("/common/html/empty.htm", 619, 757, ""); myLocationDB.PostRequest(n); } // ===== - EXPRESS BUILD [RESPONSE] - ===== // pg.expressBuild_Response = function(){ pg.records.showHiddenRecords = 0; pg.loadRecords_Request(arguments.length ? arguments[0] : 0); } // ===== - GET RECORD [REQUEST] - ===== // pg.getRecord_Request = function(){ if(pg.records.lastSelected){ pg.workin(true); pg.record.recordID = pg.records.lastSelected.i; var n = new Object(); n.noheaders = 1; n.recordID = pg.record.recordID; myLocationDB.Ajax.Post("/location/diagnosis/get_record.php", n, pg.getRecord_Response); } else { pg.buttons.btnOpen.disable(true); } } // ===== - GET RECORD [RESPONSE] - ===== // pg.getRecord_Response = function(){ //alert(arguments[0].responseText); if(arguments.length && arguments[0].responseText){ alert(arguments[0].responseText); // Refresh PQRI grid when encounter context if(request.encounterID && window.parent.frames['main']){ window.parent.frames['main'].pg.loadQualityMeasureRequest(); } var rec = arguments[0].responseText.split(pg.delim + pg.delim); if(rec.length == 20){ // validate record values rec[0] = parseInt(rec[0]); rec[3] = parseInt(rec[3]); rec[5] = parseInt(rec[5]); rec[6] = parseInt(rec[6]); rec[7] = parseInt(rec[7]); rec[8] = parseInt(rec[8]); rec[9] = parseInt(rec[9]); rec[10] = parseInt(rec[10]); rec[11] = parseInt(rec[11]); rec[12] = parseInt(rec[12]); rec[15] = parseInt(rec[15]); // set record state pg.recordState = { recordID: pg.record.recordID, codeID: rec[0], description: rec[2], assessmentTypeID: rec[3], type: rec[4], onsetDateYear: rec[5], onsetDateMonth: rec[6], onsetDateDay: rec[7], onsetDateIsApproximate: rec[8], resolveDateYear: rec[9], resolveDateMonth: rec[10], resolveDateDay: rec[11], resolveDateIsApproximate: rec[12], commentsCount: rec[15], comments: rec[16] } // set record view pg.record.code.codeID = pg.recordState.codeID; pg.record.code.value = rec[1]; pg.record.description.value = rec[2]; for(var i=0; i<pg.record.type.options.length; i++){ if(pg.record.type.options[i].value == rec[4]){ pg.record.type.selectedIndex = i; break; } } for(var i=0; i<pg.record.assessmentType.options.length; i++){ if(pg.record.assessmentType.options[i].value == rec[3]){ pg.record.assessmentType.selectedIndex = i; break; } } if(rec[5]){ if(rec[6] && rec[7]){ pg.record.onsetDateType.selectedIndex = 0; pg.record.onsetDate.value = rec[6] + "/" + rec[7] + "/" + rec[5]; pg.record.onsetDate.format(); } else { pg.record.onsetDateType.selectedIndex = 1; pg.record.onsetDateMonth.selectedIndex = rec[6]; for(var i=0; i<pg.record.onsetDateYear.options.length; i++){ if(pg.record.onsetDateYear.options[i].value == rec[5]){ pg.record.onsetDateYear.selectedIndex = i; break; } } if(rec[8]) pg.record.chkOnsetDateIsApproximate.checked = true; } } else { pg.record.onsetDateType.selectedIndex = 2; } if(rec[9]){ if(rec[10] && rec[11]){ pg.record.resolveDateType.selectedIndex = 0; pg.record.resolveDate.value = rec[10] + "/" + rec[11] + "/" + rec[9]; pg.record.resolveDate.format(); } else { pg.record.resolveDateType.selectedIndex = 1; pg.record.resolveDateMonth.selectedIndex = rec[10]; for(var i=0; i<pg.record.resolveDateYear.options[i].length; i++){ if(pg.record.resolveDateYear.options.value == rec[9]){ pg.record.resolveDateYear.selectedIndex = i; break; } } if(rec[12]) pg.record.chkResolveDateIsApproximate.checked = true; } } else { pg.record.resolveDateType.selectedIndex = 2; } pg.record.lblCommentCount.innerHTML = rec[15]; pg.record.comments.value = rec[16]; pg.record.lblUpdatedBy.innerHTML = "* Last updated by " + rec[13] + " on " + rec[14]; pg.record.lblUpdatedBy.title = "Updated by: " + rec[13] + "\nUpdated on: " + rec[14]; pg.record.linkedNotes.setData(rec[18]); pg.record.linkedOrders.setData(rec[19]); pg.record.updates.setData(rec[17]); return; } } alert("An error occured while attempting to retrieve\ndetails for record #" + pg.record.recordID + ".\n\nPlease contact support if this problem persists.\nWe apologize for the inconvenience."); pg.hideRecordView(); } // ===== - HIDE COMMENTS VIEW - ===== // pg.hideCommentsView = function(){ pg.recordComments.style.left = ""; pg.recordComments.disabled = true; pg.recordComments.comments.value = ""; pg.record.disabled = false; pg.record.style.zIndex = 5500; } // ===== - HIDE code SEARCH - ===== // pg.hidecodeSearch = function(){ pg.codeSearch.style.left = ""; pg.codeSearch.disabled = true; pg.record.disabled = false; pg.record.style.zIndex = 5500; } // ===== - HIDE RECORD - ===== // pg.hideRecord = function(){ if(arguments.length){ pg.loadRecords_Request(); } else if(pg.records.lastSelected){ var n = new Object(); n.recordTypeID = 11; n.patientID = request.patientID; n.recordID = pg.records.lastSelected.i; n.action = "/location/hideRecord/dsp_hideRecord.php"; n.target = popWinCenterScreen("/common/html/empty.htm", 164, 476); myLocationDB.PostRequest(n); } } // ===== - HIDE RECORD VIEW - ===== // pg.hideRecordView = function(){ pg.record.style.left = ""; pg.record.disabled = true; // reset record grids pg.record.updates.state = "NO_RECORDS"; pg.record.linkedNotes.state = "NO_RECORDS"; pg.record.linkedOrders.state = "NO_RECORDS"; // reset linked record tabs pg.record.tabs[0].click(); pg.record.tabs[1].disable(true); pg.record.tabs[2].disable(true); pg.record.tabs[1].all[1].innerHTML = "Notes"; pg.record.tabs[2].all[1].innerHTML = "Orders"; // reset record state pg.recordState = null; // reset record view pg.record.recordID = 0; pg.record.code.value = ""; pg.record.code.codeID = 0; pg.record.description.value = ""; pg.record.type.selectedIndex = 0; pg.record.assessmentType.selectedIndex = 0; pg.record.onsetDateType.selectedIndex = 0; pg.record.chkOnsetDateIsApproximate.checked = false; pg.record.resolveDateType.selectedIndex = 0; pg.record.chkResolveDateIsApproximate.checked = false; pg.record.lblCommentCount.innerHTML = 0; pg.record.comments.value = ""; pg.record.lblUpdatedBy.innerHTML = ""; pg.record.lblUpdatedBy.title = ""; pg.record.updateComment = ""; pg.recordComments.comments.value = ""; pg.record.active = false; pg.codeSearch.newRecord = true; pg.blocker.className = ""; pg.workin(false); } // ===== - HIDE UPDATE VIEW - ===== // pg.hideUpdateView = function(){ pg.recordUpdate.style.left = ""; pg.recordUpdate.disabled = true; pg.recordUpdate.type.value = ""; pg.recordUpdate.onsetDate.value = ""; pg.recordUpdate.description.value = ""; pg.recordUpdate.resolveDate.value = ""; pg.recordUpdate.assessmentType.value = ""; pg.record.disabled = false; pg.record.btnViewUpdate.setState(); pg.record.style.zIndex = 5500; } // ===== - INIT - ===== // pg.init = function(){ var tab = 1; pg.delim = String.fromCharCode(127); pg.subDelim = String.fromCharCode(1); pg.blocker = da.blocker; pg.hourglass = da.hourglass; pg.pageContent = da.pageContent; pg.blocker.shim = da.blocker_shim; pg.activeTip = da.activeTip; pg.activeTip.anchor = null; pg.activeTip.shim = da.activeTip_shim; // PAGE TITLE pg.pageTitle = da.pageTitle; // TOTAL RECORDS pg.totalRecords = da.totalRecords[0]; // START RECORD pg.startRecord = da.startRecord[0]; pg.startRecord.onchange = function(){ pg.records.startRecord = this.value; pg.loadRecords_Request(); } // RECORD PANEL pg.recordPanel = myLocationDB.RecordPanel(pg.pageContent.all.recordPanel); for(var i=0; i<pg.recordPanel.buttons.length; i++){ if(pg.recordPanel.buttons[i].orderBy){ pg.recordPanel.buttons[i].onclick = pg.sortRecords; } } // RECORDS GRIDVIEW pg.records = pg.recordPanel.all.grid; alert(pg.recordPanel.all.grid); pg.records.sortOrder = "DESC"; pg.records.lastExpanded = null; pg.records.attachEvent("onrowclick", pg.record_click); pg.records.orderBy = pg.recordPanel.buttons[0].orderBy; pg.records.attachEvent("onrowmouseout", pg.record_mouseOut); pg.records.attachEvent("onrowdblclick", pg.getRecord_Request); pg.records.attachEvent("onrowmouseover", pg.record_mouseOver); pg.records.attachEvent("onstateready", pg.loadRecords_Response); // BUTTON - TOGGLE HIDDEN RECORDS pg.btnHiddenRecords = myLocationDB.Custom.ImageButton(3, 751, 19, 19, "/common/images/hide.gif", 1, 1, "", "", da.pageContent); pg.btnHiddenRecords.setTitle("Show hidden records"); pg.btnHiddenRecords.onclick = pg.toggleHiddenRecords; pg.btnHiddenRecords.setState = function(){ this.disable(!pg.records.totalHiddenRecords); } // code SEARCH SUBWIN pg.codeSearch = da.subWin_codeSearch; pg.codeSearch.newRecord = true; pg.codeSearch.searchType = "code"; pg.codeSearch.searchFavorites = true; pg.codeSearch.onkeydown = function(){ if(window.event && window.event.keyCode && window.event.keyCode == 113){ if(pg.codeSearch.searchType == "DESCRIPTION"){ pg.codeSearch.searchType = "code"; pg.codeSearch.lblSearchType.innerHTML = "ICD-9 Code"; } else { pg.codeSearch.searchType = "DESCRIPTION"; pg.codeSearch.lblSearchType.innerHTML = "Description"; } pg.searchcodes_Request(); } } // SEARCH TYPE pg.codeSearch.lblSearchType = pg.codeSearch.all.lblSearchType; // SEARCH STRING pg.codeSearch.searchString = pg.codeSearch.all.searchString; pg.codeSearch.searchString.tabIndex = 1; pg.codeSearch.searchString.onfocus = function(){ this.select(); } pg.codeSearch.searchString.onblur = function(){ this.value = this.value.trim(); } pg.codeSearch.searchString.onkeydown = function(){ if(window.event && window.event.keyCode && window.event.keyCode == 13){ pg.searchcodes_Request(); } } // -- "SEARCH" pg.codeSearch.btnSearch = pg.codeSearch.all.btnSearch; pg.codeSearch.btnSearch.tabIndex = 2; pg.codeSearch.btnSearch.disable = myLocationDB.Disable; pg.codeSearch.btnSearch.onclick = pg.searchcodes_Request; pg.codeSearch.btnSearch.baseTitle = "Search diagnosis codes"; pg.codeSearch.btnSearch.setState = function(){ pg.codeSearch.btnSearch.disable(pg.codeSearch.searchString.value.trim().length < 2); } pg.codeSearch.searchString.onkeyup = pg.codeSearch.btnSearch.setState; // START RECORD / TOTAL RECORDS pg.codeSearch.startRecord = pg.codeSearch.all.startRecord; pg.codeSearch.totalRecords = pg.codeSearch.all.totalRecords; pg.codeSearch.startRecord.onchange = function(){ pg.codeSearch.records.startRecord = this.value; pg.searchcodes_Request(); } // RECORD PANEL pg.codeSearch.recordPanel = myLocationDB.RecordPanel(pg.codeSearch.all.recordPanel); pg.codeSearch.recordPanel.buttons[0].onclick = pg.sortcodeResults; pg.codeSearch.recordPanel.buttons[1].onclick = pg.sortcodeResults; // DATA GRIDVIEW pg.codeSearch.records = pg.codeSearch.all.grid; pg.codeSearch.records.orderBy = "code"; pg.codeSearch.records.attachEvent("onrowdblclick", pg.updatecode); pg.codeSearch.records.attachEvent("onstateready", pg.searchcodes_Response); // BUTTON - "CANCEL" pg.codeSearch.btnCancel = pg.codeSearch.all.btnCancel; pg.codeSearch.btnCancel.tabIndex = 4; pg.codeSearch.btnCancel.onclick = pg.hidecodeSearch; pg.codeSearch.btnCancel.title = "Close this search area"; // SEARCH FAVORITES / ALL pg.codeSearch.optSearch = myLocationDB.InputButton(pg.codeSearch.all.optSearch); pg.codeSearch.optSearch[0].onclick = function(){ if(pg.codeSearch.searchFavorites){ pg.codeSearch.searchString.focus(); } else { pg.codeSearch.searchFavorites = true; pg.searchcodes_Request(); } } pg.codeSearch.optSearch[1].onclick = function(){ if(pg.codeSearch.searchFavorites){ pg.codeSearch.searchFavorites = false; pg.searchcodes_Request(); } else { pg.codeSearch.searchString.focus(); } } // -- "USE SELECTED" pg.codeSearch.btnUseSelected = pg.codeSearch.all.btnUseSelected; pg.codeSearch.btnUseSelected.tabIndex = 3; pg.codeSearch.btnUseSelected.onclick = pg.updatecode; pg.codeSearch.btnUseSelected.disable = myLocationDB.Disable; pg.codeSearch.btnUseSelected.baseTitle = "Use the selected diagnosis code"; pg.codeSearch.btnUseSelected.setState = function(){ pg.codeSearch.btnUseSelected.disable(!pg.codeSearch.records.lastSelected); } pg.codeSearch.records.attachEvent("onrowclick", pg.codeSearch.btnUseSelected.setState); // RECORD STATE pg.recordState = null; // RECORD SUBWIN pg.record = da.subWin_record; pg.record.recordID = 0; pg.record.active = false; pg.record.updateComment = ""; // -- TABS pg.record.tabs = myLocationDB.TabCollection( pg.record.all.tab, function(){ if(pg.record.tabs[0].all[0].checked){ pg.record.btnOpen.style.display = "none"; pg.record.chkSelectAll.hitArea.style.display = "none"; pg.record.btnSave.style.display = "block"; pg.record.lblUpdatedBy.style.display = "block"; pg.record.pnlRecord_shim.style.display = "none"; } else { pg.record.pnlRecord_shim.style.display = "block"; pg.record.btnSave.style.display = "none"; pg.record.lblUpdatedBy.style.display = "none"; pg.record.btnOpen.setState(); pg.record.btnOpen.style.display = "block"; if(pg.record.tabs[2].all[0].checked){ pg.record.chkSelectAll.hitArea.style.display = "none"; //pg.record.btnViewLabs.setState(); //pg.record.btnViewLabs.style.display = "block"; } else { pg.record.chkSelectAll.setState(); pg.record.chkSelectAll.hitArea.style.display = "block"; //pg.record.btnViewLabs.style.display = "none"; } } } ); pg.record.tabs[1].disable(true); pg.record.tabs[2].disable(true); pg.record.pnlRecord_shim = pg.record.all.pnlRecord_shim; pg.record.code = pg.record.all.code; pg.record.code.codeID = 0; pg.record.code.tabIndex = -1; // -- CHANGE code pg.record.btnChangecode = myLocationDB.Custom.ImageButton(6, 107, 22, 22, "/common/images/edit.gif", 2, 2, "", "", pg.record.all.pnlRecord); pg.record.btnChangecode.tabIndex = 1; pg.record.btnChangecode.onclick = pg.showcodeSearch; pg.record.btnChangecode.title = "Change the diagnosis code for this problem"; pg.record.description = pg.record.all.description; pg.record.description.tabIndex = 2; pg.record.type = pg.record.all.type; pg.record.type.tabIndex = 3; pg.record.assessmentType = pg.record.all.assessmentType; pg.record.assessmentType.tabIndex = 9; // ONSET DATE pg.record.onsetDateType = pg.record.all.onsetDateType; pg.record.onsetDateType.tabIndex = 4; pg.record.onsetDateType.onchange = pg.record.onsetDateType.setState = function(){ switch(this.selectedIndex){ case 1: // PARTIAL pg.record.chkOnsetDateIsApproximate.disable(false); pg.record.onsetDate.style.visibility = "hidden"; pg.record.onsetDateUnknown.style.visibility = "hidden"; pg.record.onsetDate.datePicker.style.visibility = "hidden"; pg.record.onsetDateMonth.style.visibility = "visible"; pg.record.onsetDateYear.style.visibility = "visible"; break; case 2: // UNKNOWN pg.record.chkOnsetDateIsApproximate.disable(true); pg.record.onsetDate.style.visibility = "hidden"; pg.record.onsetDateYear.style.visibility = "hidden"; pg.record.onsetDateMonth.style.visibility = "hidden"; pg.record.onsetDate.datePicker.style.visibility = "hidden"; pg.record.onsetDateUnknown.style.visibility = "visible"; break; default: // "WHOLE" pg.record.chkOnsetDateIsApproximate.disable(true); pg.record.onsetDateMonth.style.visibility = "hidden"; pg.record.onsetDateYear.style.visibility = "hidden"; pg.record.onsetDateUnknown.style.visibility = "hidden"; pg.record.onsetDate.style.visibility = "visible"; pg.record.onsetDate.datePicker.style.visibility = "visible"; break; } } pg.record.onsetDate = myLocationDB.Custom.DateInput(30, 364, 80, pg.record.all.pnlRecord, 1, 1, 0, params.todayDate, 1); pg.record.onsetDate.tabIndex = 5; pg.record.onsetDate.style.textAlign = "LEFT"; pg.record.onsetDate.calendar.style.zIndex = 6000; pg.record.onsetDate.datePicker.style.left = "448px"; pg.record.onsetDate.setDateRange(params.birthDate, params.todayDate); pg.record.onsetDateYear = pg.record.all.onsetDateYear; pg.record.onsetDateYear.tabIndex = 6; pg.record.onsetDateMonth = pg.record.all.onsetDateMonth pg.record.onsetDateMonth.tabIndex = 7; pg.record.onsetDateUnknown = pg.record.all.onsetDateUnknown; pg.record.onsetDateUnknown.tabIndex = 8; pg.record.chkOnsetDateIsApproximate = myLocationDB.InputButton(pg.record.all.chkOnsetDateIsApproximate); pg.record.chkOnsetDateIsApproximate.setTitle("Onset date is approximate"); pg.record.chkOnsetDateIsApproximate.disable(true); // RESOLVE DATE pg.record.lblResolveDate = pg.record.all.lblResolveDate; pg.record.resolveDateType = pg.record.all.resolveDateType; pg.record.resolveDateType.tabIndex = 10; pg.record.resolveDateType.lastSelectedIndex = 0; pg.record.resolveDateType.setState = function(){ switch(this.selectedIndex){ case 1: // PARTIAL pg.record.chkResolveDateIsApproximate.disable(false); pg.record.resolveDate.style.visibility = "hidden"; pg.record.resolveDateUnknown.style.visibility = "hidden"; pg.record.resolveDate.datePicker.style.visibility = "hidden"; pg.record.resolveDateMonth.style.visibility = "visible"; pg.record.resolveDateYear.style.visibility = "visible"; break; case 2: // UNKNOWN pg.record.chkResolveDateIsApproximate.disable(true); pg.record.resolveDate.style.visibility = "hidden"; pg.record.resolveDateYear.style.visibility = "hidden"; pg.record.resolveDateMonth.style.visibility = "hidden"; pg.record.resolveDate.datePicker.style.visibility = "hidden"; pg.record.resolveDateUnknown.style.visibility = "visible"; break; default: // "WHOLE" pg.record.chkResolveDateIsApproximate.disable(true); pg.record.resolveDateMonth.style.visibility = "hidden"; pg.record.resolveDateYear.style.visibility = "hidden"; pg.record.resolveDateUnknown.style.visibility = "hidden"; pg.record.resolveDate.style.visibility = "visible"; pg.record.resolveDate.datePicker.style.visibility = "visible"; break; } } pg.record.resolveDateType.onchange = function(){ this.lastSelectedIndex = this.selectedIndex; this.setState(); } pg.record.resolveDate = myLocationDB.Custom.DateInput(55, 364, 80, pg.record.all.pnlRecord, 1, 1, 0, params.todayDate, 1); pg.record.resolveDate.tabIndex = 11; pg.record.resolveDate.style.textAlign = "LEFT"; pg.record.resolveDate.calendar.style.zIndex = 6000; pg.record.resolveDate.datePicker.style.left = "448px"; pg.record.resolveDate.setDateRange(params.birthDate, params.todayDate); pg.record.resolveDate.setState = function(){ if(pg.record.assessmentType.value == 15){ pg.record.chkResolveDateIsApproximate.disable(pg.record.resolveDateType.value != "PARTIAL"); pg.record.resolveDate.disabled = false; pg.record.lblResolveDate.disabled = false; pg.record.resolveDateType.selectedIndex = pg.record.resolveDateType.lastSelectedIndex; pg.record.resolveDateType.setState(); pg.record.resolveDate.datePicker.disable(false); pg.record.resolveDateType.disabled = false; pg.record.resolveDateYear.disabled = false; pg.record.resolveDateMonth.disabled = false; pg.record.resolveDateUnknown.disabled = false; } else { pg.record.resolveDate.datePicker.disable(true); pg.record.chkResolveDateIsApproximate.disable(true); pg.record.resolveDateType.selectedIndex = 2; pg.record.resolveDateType.setState(); pg.record.resolveDate.disabled = true; pg.record.lblResolveDate.disabled = true; pg.record.resolveDateType.disabled = true; pg.record.resolveDateYear.disabled = true; pg.record.resolveDateMonth.disabled = true; pg.record.resolveDateUnknown.disabled = true; } } pg.record.assessmentType.onchange = pg.record.resolveDate.setState; pg.record.resolveDateYear = pg.record.all.resolveDateYear; pg.record.resolveDateYear.tabIndex = 11; pg.record.resolveDateMonth = pg.record.all.resolveDateMonth pg.record.resolveDateMonth.tabIndex = 12; pg.record.resolveDateUnknown = pg.record.all.resolveDateUnknown; pg.record.resolveDateUnknown.tabIndex = 13; pg.record.chkResolveDateIsApproximate = myLocationDB.InputButton(pg.record.all.chkResolveDateIsApproximate); pg.record.chkResolveDateIsApproximate.setTitle("Resolve date is approximate"); pg.record.chkResolveDateIsApproximate.disable(true); // -- UPDATES pg.record.updates = pg.record.all.pnlUpdates.all.grid; pg.record.lblUpdateCount = pg.record.all.lblUpdateCount; pg.record.updates.attachEvent("onstateready", pg.showRecordView); pg.record.updates.attachEvent("onrowdblclick", pg.showUpdateView); // -- "VIEW SELECTED" pg.record.btnViewUpdate = myLocationDB.PanelButton(pg.record.all.btnViewUpdate); pg.record.btnViewUpdate.setTitle("View details for the selected problem update"); pg.record.btnViewUpdate.onclick = pg.showUpdateView; pg.record.btnViewUpdate.setState = function(){ pg.record.btnViewUpdate.disable(!pg.record.updates.lastSelected); } pg.record.updates.attachEvent("onrowclick", pg.record.btnViewUpdate.setState); // -- COMMENTS pg.record.comments = pg.record.all.comments; pg.record.pnlComments = pg.record.all.pnlComments; pg.record.lblCommentCount = pg.record.all.lblCommentCount; // -- UPDATE COMMENTS pg.record.btnUpdateComments = myLocationDB.PanelButton(pg.record.all.btnUpdateComments); pg.record.btnUpdateComments.onclick = pg.showCommentView; pg.record.btnUpdateComments.title = "Update this record's comments"; // -- LINKED NOTES pg.record.linkedNotes = pg.record.all.linkedNotes.all.grid; pg.record.linkedNotes.attachEvent("onrowclick", pg.linkedRecordClick); pg.record.linkedNotes.attachEvent("onrowdblclick", pg.openLinkedNote); pg.record.linkedNotes.attachEvent("onstateready", pg.setLinkedNotes_Count); // -- LINKED ORDERS pg.record.linkedOrders = pg.record.all.linkedOrders.all.grid; pg.record.linkedOrders.attachEvent("onrowclick", pg.linkedRecordClick); pg.record.linkedOrders.attachEvent("onrowdblclick", pg.openLinkedOrder); pg.record.linkedOrders.attachEvent("onstateready", pg.setLinkedOrders_Count); // -- "CLOSE" pg.record.btnClose = pg.record.all.btnClose; pg.record.btnClose.tabIndex = 15; pg.record.btnClose.onclick = pg.hideRecordView; pg.record.btnClose.title = "Close this record panel"; // -- LAST UPDATED BY pg.record.lblUpdatedBy = pg.record.all.lblUpdatedBy; // -- "SELECT ALL" pg.record.chkSelectAll = myLocationDB.InputButton(pg.record.all.chkSelectAll); pg.record.chkSelectAll.onclick = function(){ if(pg.record.tabs[1].all[0].checked){ if(pg.record.chkSelectAll.checked){ pg.record.linkedNotes.selectAll(); } else { pg.record.linkedNotes.deselectAll(); } } else { if(pg.record.chkSelectAll.checked){ pg.record.linkedOrders.selectAll(); } else { pg.record.linkedOrders.deselectAll(); } } pg.record.btnOpen.setState(); //pg.record.btnViewLabs.setState(); } pg.record.chkSelectAll.setState = function(){ if(pg.record.tabs[1].all[0].checked){ pg.record.chkSelectAll.checked = pg.record.linkedNotes.selectedRows.length == pg.record.linkedNotes.rows.length; } else { pg.record.chkSelectAll.checked = pg.record.linkedOrders.selectedRows.length == pg.record.linkedOrders.rows.length; } } // -- "OPEN SELECTED" pg.record.btnOpen = pg.record.all.btnOpenSelected; pg.record.btnOpen.tabIndex = 14; pg.record.btnOpen.disable = myLocationDB.Disable; pg.record.btnOpen.title = "Open the selected record"; pg.record.btnOpen.onclick = function(){ if(pg.record.tabs[1].all[0].checked){ pg.openLinkedNote(); } else if(pg.record.tabs[2].all[0].checked){ pg.openLinkedOrder(); } else { pg.record.btnOpen.disable(true); } } pg.record.btnOpen.setState = function(){ if(pg.record.tabs[1].all[0].checked){ pg.record.btnOpen.disable(!pg.record.linkedNotes.lastSelected); } else if(pg.record.tabs[2].all[0].checked){ pg.record.btnOpen.disable(pg.record.linkedOrders.selectedRows.length != 1); } else { pg.record.btnOpen.disable(true); } } // -- "SAVE" pg.record.btnSave = pg.record.all.btnSave; pg.record.btnSave.tabIndex = 14; pg.record.btnSave.onclick = pg.updateRecord_Request; pg.record.btnSave.title = "Save changes to this record"; // RECORD UPDATE SUBWIN pg.recordUpdate = da.subWin_update; pg.recordUpdate.lblUpdatedBy = pg.recordUpdate.all.lblUpdatedBy; pg.recordUpdate.lblUpdateDTS = pg.recordUpdate.all.lblUpdateDTS; pg.recordUpdate.type = pg.recordUpdate.all.type; pg.recordUpdate.onsetDate = pg.recordUpdate.all.onsetDate; pg.recordUpdate.description = pg.recordUpdate.all.description; pg.recordUpdate.resolveDate = pg.recordUpdate.all.resolveDate; pg.recordUpdate.assessmentType = pg.recordUpdate.all.assessmentType; // -- "CLOSE" pg.recordUpdate.btnClose = pg.recordUpdate.all.btnClose; pg.recordUpdate.btnClose.tabIndex = 1; pg.recordUpdate.btnClose.onclick = pg.hideUpdateView; pg.recordUpdate.btnClose.title = "Close this sub-window"; // COMMENTS SUBWIN pg.recordComments = da.subWin_comments; pg.recordComments.comments = pg.recordComments.all.updateComments; pg.recordComments.comment

    Read the article

  • 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

  • How to set up the CNAME in DNS zone record to work with Unbounce

    - by Lirik
    I'm trying to run split testing on some landing pages I "designed" with Unbounce, but it requires that I set the CNAME record for my domain/sub-domain and I'm having trouble figuring out what is the right way to do it. My host is arvixe (www.arvixe.com) and their customer support has failed to help me for the past 5 days (I spoke to them multiple times). I followed the directions for setting the CNAME record and I was able to set the CNAME record, but I'm consistently unable to verify that the CNAME record is set up correctly. I followed the instructions on Unbounce to verify the CNAME record for my sub-domain (beta.devboost.com) and here are the results: No records found reverse lookup smtp diag port scan blacklist Reported by ns1.SNARE.arvixe.com on Thursday, November 10, 2011 at 5:49:57 PM (GMT-6) Here is my DNS zone record from the control panel of my host (last record, CNAME unbouncepages.com): Is there something wrong with my DNS Zone Record? What's the right way to do this? Update: I also have a CNAME record for beta in my root domain (devboost.com): I've updated my sub-domain record now: I've removed most of the other DNS records and I've removed the beta label for the CNAME record: Is that correct? Is there anything else I need to do?

    Read the article

  • Saving record in Subsonic 3 using Active Record

    - by singfoom
    I'm having trouble saving a record in Subsonic 3 using Active record. I've generated my objects using the DALs and tts and everything seems fine because the following test passes. I think that my connection string is correct or the generation wouldn't have succeeded. [Test] public void TestSavingAnEmail() { Email testEmail = new Email(); testEmail.EmailAddress = "[email protected]"; testEmail.Subscribed = true; testEmail.Save(); Assert.AreEqual(1, Email.All().Count()); } On the live side, the following code fails: protected void btEmailSubmit_Click(object sender, EventArgs e) { Email email = new Email(); email.EmailAddress = txtEmail.Text; email.Subscribed = chkSubscribe.Checked; email.Save(); } with a message of: Need to specify Values or a Select query to insert - can't go on! at the following line repo.Add(this,provider); line in my ActiveRecord.cs: public void Add(IDataProvider provider){ var key=KeyValue(); if(key==null){ var newKey=_repo.Add(this,provider); this.SetKeyValue(newKey); }else{ _repo.Add(this,provider); } SetIsNew(false); OnSaved(); } Am I doing something horribly wrong here? The save and add methods have parameterless overloads that I thought were safe to use. Do I need to pass a provider? I've googled around for this for a while and was unable to come up with anything specific to my situation. Thanks in advance for any kind of answer.

    Read the article

  • How to select display to record in recordmydesktop

    - by Tom
    I have a dual monitor setup and wish to only record the 1st monitor with recordmydesktop, but I am unsure of the settings when doing it via the command line, so far I have this: recordmydesktop --display=1 --width=1920 height=1080 --fps=15 --no-sound --delay=10 But I get this error message: Cannot connect to X server 1 How do I find the right X server to connect to and are the rest of my settings correct? I'm using 11.04, cheers.

    Read the article

  • How to simulate inner join on very large files in java (without running out of memory)

    - by Constantin
    I am trying to simulate SQL joins using java and very large text files (INNER, RIGHT OUTER and LEFT OUTER). The files have already been sorted using an external sort routine. The issue I have is I am trying to find the most efficient way to deal with the INNER join part of the algorithm. Right now I am using two Lists to store the lines that have the same key and iterate through the set of lines in the right file once for every line in the left file (provided the keys still match). In other words, the join key is not unique in each file so would need to account for the Cartesian product situations ... left_01, 1 left_02, 1 right_01, 1 right_02, 1 right_03, 1 left_01 joins to right_01 using key 1 left_01 joins to right_02 using key 1 left_01 joins to right_03 using key 1 left_02 joins to right_01 using key 1 left_02 joins to right_02 using key 1 left_02 joins to right_03 using key 1 My concern is one of memory. I will run out of memory if i use the approach below but still want the inner join part to work fairly quickly. What is the best approach to deal with the INNER join part keeping in mind that these files may potentially be huge public class Joiner { private void join(BufferedReader left, BufferedReader right, BufferedWriter output) throws Throwable { BufferedReader _left = left; BufferedReader _right = right; BufferedWriter _output = output; Record _leftRecord; Record _rightRecord; _leftRecord = read(_left); _rightRecord = read(_right); while( _leftRecord != null && _rightRecord != null ) { if( _leftRecord.getKey() < _rightRecord.getKey() ) { write(_output, _leftRecord, null); _leftRecord = read(_left); } else if( _leftRecord.getKey() > _rightRecord.getKey() ) { write(_output, null, _rightRecord); _rightRecord = read(_right); } else { List<Record> leftList = new ArrayList<Record>(); List<Record> rightList = new ArrayList<Record>(); _leftRecord = readRecords(leftList, _leftRecord, _left); _rightRecord = readRecords(rightList, _rightRecord, _right); for( Record equalKeyLeftRecord : leftList ){ for( Record equalKeyRightRecord : rightList ){ write(_output, equalKeyLeftRecord, equalKeyRightRecord); } } } } if( _leftRecord != null ) { write(_output, _leftRecord, null); _leftRecord = read(_left); while(_leftRecord != null) { write(_output, _leftRecord, null); _leftRecord = read(_left); } } else { if( _rightRecord != null ) { write(_output, null, _rightRecord); _rightRecord = read(_right); while(_rightRecord != null) { write(_output, null, _rightRecord); _rightRecord = read(_right); } } } _left.close(); _right.close(); _output.flush(); _output.close(); } private Record read(BufferedReader reader) throws Throwable { Record record = null; String data = reader.readLine(); if( data != null ) { record = new Record(data.split("\t")); } return record; } private Record readRecords(List<Record> list, Record record, BufferedReader reader) throws Throwable { int key = record.getKey(); list.add(record); record = read(reader); while( record != null && record.getKey() == key) { list.add(record); record = read(reader); } return record; } private void write(BufferedWriter writer, Record left, Record right) throws Throwable { String leftKey = (left == null ? "null" : Integer.toString(left.getKey())); String leftData = (left == null ? "null" : left.getData()); String rightKey = (right == null ? "null" : Integer.toString(right.getKey())); String rightData = (right == null ? "null" : right.getData()); writer.write("[" + leftKey + "][" + leftData + "][" + rightKey + "][" + rightData + "]\n"); } public static void main(String[] args) { try { BufferedReader leftReader = new BufferedReader(new FileReader("LEFT.DAT")); BufferedReader rightReader = new BufferedReader(new FileReader("RIGHT.DAT")); BufferedWriter output = new BufferedWriter(new FileWriter("OUTPUT.DAT")); Joiner joiner = new Joiner(); joiner.join(leftReader, rightReader, output); } catch (Throwable e) { e.printStackTrace(); } } } After applying the ideas from the proposed answer, I changed the loop to this private void join(RandomAccessFile left, RandomAccessFile right, BufferedWriter output) throws Throwable { long _pointer = 0; RandomAccessFile _left = left; RandomAccessFile _right = right; BufferedWriter _output = output; Record _leftRecord; Record _rightRecord; _leftRecord = read(_left); _rightRecord = read(_right); while( _leftRecord != null && _rightRecord != null ) { if( _leftRecord.getKey() < _rightRecord.getKey() ) { write(_output, _leftRecord, null); _leftRecord = read(_left); } else if( _leftRecord.getKey() > _rightRecord.getKey() ) { write(_output, null, _rightRecord); _pointer = _right.getFilePointer(); _rightRecord = read(_right); } else { long _tempPointer = 0; int key = _leftRecord.getKey(); while( _leftRecord != null && _leftRecord.getKey() == key ) { _right.seek(_pointer); _rightRecord = read(_right); while( _rightRecord != null && _rightRecord.getKey() == key ) { write(_output, _leftRecord, _rightRecord ); _tempPointer = _right.getFilePointer(); _rightRecord = read(_right); } _leftRecord = read(_left); } _pointer = _tempPointer; } } if( _leftRecord != null ) { write(_output, _leftRecord, null); _leftRecord = read(_left); while(_leftRecord != null) { write(_output, _leftRecord, null); _leftRecord = read(_left); } } else { if( _rightRecord != null ) { write(_output, null, _rightRecord); _rightRecord = read(_right); while(_rightRecord != null) { write(_output, null, _rightRecord); _rightRecord = read(_right); } } } _left.close(); _right.close(); _output.flush(); _output.close(); } UPDATE While this approach worked, it was terribly slow and so I have modified this to create files as buffers and this works very well. Here is the update ... private long getMaxBufferedLines(File file) throws Throwable { long freeBytes = Runtime.getRuntime().freeMemory() / 2; return (freeBytes / (file.length() / getLineCount(file))); } private void join(File left, File right, File output, JoinType joinType) throws Throwable { BufferedReader leftFile = new BufferedReader(new FileReader(left)); BufferedReader rightFile = new BufferedReader(new FileReader(right)); BufferedWriter outputFile = new BufferedWriter(new FileWriter(output)); long maxBufferedLines = getMaxBufferedLines(right); Record leftRecord; Record rightRecord; leftRecord = read(leftFile); rightRecord = read(rightFile); while( leftRecord != null && rightRecord != null ) { if( leftRecord.getKey().compareTo(rightRecord.getKey()) < 0) { if( joinType == JoinType.LeftOuterJoin || joinType == JoinType.LeftExclusiveJoin || joinType == JoinType.FullExclusiveJoin || joinType == JoinType.FullOuterJoin ) { write(outputFile, leftRecord, null); } leftRecord = read(leftFile); } else if( leftRecord.getKey().compareTo(rightRecord.getKey()) > 0 ) { if( joinType == JoinType.RightOuterJoin || joinType == JoinType.RightExclusiveJoin || joinType == JoinType.FullExclusiveJoin || joinType == JoinType.FullOuterJoin ) { write(outputFile, null, rightRecord); } rightRecord = read(rightFile); } else if( leftRecord.getKey().compareTo(rightRecord.getKey()) == 0 ) { String key = leftRecord.getKey(); List<File> rightRecordFileList = new ArrayList<File>(); List<Record> rightRecordList = new ArrayList<Record>(); rightRecordList.add(rightRecord); rightRecord = consume(key, rightFile, rightRecordList, rightRecordFileList, maxBufferedLines); while( leftRecord != null && leftRecord.getKey().compareTo(key) == 0 ) { processRightRecords(outputFile, leftRecord, rightRecordFileList, rightRecordList, joinType); leftRecord = read(leftFile); } // need a dispose for deleting files in list } else { throw new Exception("DATA IS NOT SORTED"); } } if( leftRecord != null ) { if( joinType == JoinType.LeftOuterJoin || joinType == JoinType.LeftExclusiveJoin || joinType == JoinType.FullExclusiveJoin || joinType == JoinType.FullOuterJoin ) { write(outputFile, leftRecord, null); } leftRecord = read(leftFile); while(leftRecord != null) { if( joinType == JoinType.LeftOuterJoin || joinType == JoinType.LeftExclusiveJoin || joinType == JoinType.FullExclusiveJoin || joinType == JoinType.FullOuterJoin ) { write(outputFile, leftRecord, null); } leftRecord = read(leftFile); } } else { if( rightRecord != null ) { if( joinType == JoinType.RightOuterJoin || joinType == JoinType.RightExclusiveJoin || joinType == JoinType.FullExclusiveJoin || joinType == JoinType.FullOuterJoin ) { write(outputFile, null, rightRecord); } rightRecord = read(rightFile); while(rightRecord != null) { if( joinType == JoinType.RightOuterJoin || joinType == JoinType.RightExclusiveJoin || joinType == JoinType.FullExclusiveJoin || joinType == JoinType.FullOuterJoin ) { write(outputFile, null, rightRecord); } rightRecord = read(rightFile); } } } leftFile.close(); rightFile.close(); outputFile.flush(); outputFile.close(); } public void processRightRecords(BufferedWriter outputFile, Record leftRecord, List<File> rightFiles, List<Record> rightRecords, JoinType joinType) throws Throwable { for(File rightFile : rightFiles) { BufferedReader rightReader = new BufferedReader(new FileReader(rightFile)); Record rightRecord = read(rightReader); while(rightRecord != null){ if( joinType == JoinType.LeftOuterJoin || joinType == JoinType.RightOuterJoin || joinType == JoinType.FullOuterJoin || joinType == JoinType.InnerJoin ) { write(outputFile, leftRecord, rightRecord); } rightRecord = read(rightReader); } rightReader.close(); } for(Record rightRecord : rightRecords) { if( joinType == JoinType.LeftOuterJoin || joinType == JoinType.RightOuterJoin || joinType == JoinType.FullOuterJoin || joinType == JoinType.InnerJoin ) { write(outputFile, leftRecord, rightRecord); } } } /** * consume all records having key (either to a single list or multiple files) each file will * store a buffer full of data. The right record returned represents the outside flow (key is * already positioned to next one or null) so we can't use this record in below while loop or * within this block in general when comparing current key. The trick is to keep consuming * from a List. When it becomes empty, re-fill it from the next file until all files have * been consumed (and the last node in the list is read). The next outside iteration will be * ready to be processed (either it will be null or it points to the next biggest key * @throws Throwable * */ private Record consume(String key, BufferedReader reader, List<Record> records, List<File> files, long bufferMaxRecordLines ) throws Throwable { boolean processComplete = false; Record record = records.get(records.size() - 1); while(!processComplete){ long recordCount = records.size(); if( record.getKey().compareTo(key) == 0 ){ record = read(reader); while( record != null && record.getKey().compareTo(key) == 0 && recordCount < bufferMaxRecordLines ) { records.add(record); recordCount++; record = read(reader); } } processComplete = true; // if record is null, we are done if( record != null ) { // if the key has changed, we are done if( record.getKey().compareTo(key) == 0 ) { // Same key means we have exhausted the buffer. // Dump entire buffer into a file. The list of file // pointers will keep track of the files ... processComplete = false; dumpBufferToFile(records, files); records.clear(); records.add(record); } } } return record; } /** * Dump all records in List of Record objects to a file. Then, add that * file to List of File objects * * NEED TO PLACE A LIMIT ON NUMBER OF FILE POINTERS (check size of file list) * * @param records * @param files * @throws Throwable */ private void dumpBufferToFile(List<Record> records, List<File> files) throws Throwable { String prefix = "joiner_" + files.size() + 1; String suffix = ".dat"; File file = File.createTempFile(prefix, suffix, new File("cache")); BufferedWriter writer = new BufferedWriter(new FileWriter(file)); for( Record record : records ) { writer.write( record.dump() ); } files.add(file); writer.flush(); writer.close(); }

    Read the article

  • PTR and A record must match?

    - by somecallmemike
    RFC 1912 Section 2.1 states the following: Make sure your PTR and A records match. For every IP address, there should be a matching PTR record in the in-addr.arpa domain. If a host is multi-homed, (more than one IP address) make sure that all IP addresses have a corresponding PTR record (not just the first one). Failure to have matching PTR and A records can cause loss of Internet services similar to not being registered in the DNS at all. Also, PTR records must point back to a valid A record, not a alias defined by a CNAME. It is highly recommended that you use some software which automates this checking, or generate your DNS data from a database which automatically creates consistent data. This does not make any sense to me, should an ISP keep matching A records for every PTR record? It seems to me that it's only important if the IP address that the PTR record describes is hosting a service that is sensitive to DNS being mismatched (such as email hosting). In that case the forward zone would be configured under a domain name (examples follow the format 'zone - record'): domain.tld -> mail IN A 1.2.3.4 And the PTR record would be configured to match: 3.2.1.in-addr.arpa -> 4 IN PTR mail.domain.tld. Would there be any reason for the ISP to host a forward lookup for an IP address on their network like this?: ispdomain.tld -> broadband-ip-1 IN A 1.2.3.4

    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

  • 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

  • Possible to direct naked domain to external IP

    - by Luke
    So I found this post: configure Bind to have a custom domain on tumblr and I was trying to ask a related question: Would it be possible to set up an A record pointing traffic to domain.com to Tumblr and feed.domain.com to the IP address of my choice? In other words, by setting up a naked domain A record to Tumblr's IP, will I inherently lose traffic to feed.domain.com? Can I write another A record for the specific subdomains I want to point to my server? I hope this makes sense.

    Read the article

  • Perl XML SAX parser emulating XML::Simple record for record

    - by DVK
    Short Q summary: I am looking a fast XML parser (most likely a wrapper around some standard SAX parser) which will produce per-record data structure 100% identical to those produced by XML::Simple. Details: We have a large code infrastructure which depends on processing records one-by-one and expects the record to be a data structure in a format produced by XML::Simple since it always used XML::Simple since early Jurassic era. An example simple XML is: <root> <rec><f1>v1</f1><f2>v2</f2></rec> <rec><f1>v1b</f1><f2>v2b</f2></rec> <rec><f1>v1c</f1><f2>v2c</f2></rec> </root> And example rough code is: sub process_record { my ($obj, $record_hash) = @_; # do_stuff } my $records = XML::Simple->XMLin(@args)->{root}; foreach my $record (@$records) { $obj->process_record($record) }; As everyone knows XML::Simple is, well, simple. And more importantly, it is very slow and a memory hog - due to being a DOM parser and needing to build/store 100% of data in memory. So, it's not the best tool for parsing an XML file consisting of large amount of small records record-by-record. However, re-writing the entire code (which consist of large amount of "process_record"-like methods) to work with standard SAX parser seems like an big task not worth the resources, even at the cost of living with XML::Simple. What I'm looking for is an existing module which will probably be based on a SAX parser (or anything fast with small memory footprint) which can be used to produce $record hashrefs one by one based on the XML pictured above that can be passed to $obj->process_record($record) and be 100% identical to what XML::Simple's hashrefs would have been. I don't care much what the interface of the new module is - e.g whether I need to call next_record() or give it a callback coderef accepting a record.

    Read the article

  • SQL Query to update parent record with child record values

    - by Wells
    I need to create a Trigger that fires when a child record (Codes) is added, updated or deleted. The Trigger stuffs a string of comma separated Code values from all child records (Codes) into a single field in the parent record (Projects) of the added, updated or deleted child record. I am stuck on writing a correct query to retrieve the Code values from just those child records that are the children of a single parent record. -- Create the test tables CREATE TABLE projects ( ProjectId varchar(16) PRIMARY KEY, ProjectName varchar(100), Codestring nvarchar(100) ) GO CREATE TABLE prcodes ( CodeId varchar(16) PRIMARY KEY, Code varchar (4), ProjectId varchar(16) ) GO -- Add sample data to tables: Two projects records, one with 3 child records, the other with 2. INSERT INTO projects (ProjectId, ProjectName) SELECT '101','Smith' UNION ALL SELECT '102','Jones' GO INSERT INTO prcodes (CodeId, Code, ProjectId) SELECT 'A1','Blue', '101' UNION ALL SELECT 'A2','Pink', '101' UNION ALL SELECT 'A3','Gray', '101' UNION ALL SELECT 'A4','Blue', '102' UNION ALL SELECT 'A5','Gray', '102' GO I am stuck on how to create a correct Update query. Can you help fix this query? -- Partially working, but stuffs all values, not just values from chile (prcodes) records of parent (projects) UPDATE proj SET proj.Codestring = (SELECT STUFF((SELECT ',' + prc.Code FROM projects proj INNER JOIN prcodes prc ON proj.ProjectId = prc.ProjectId ORDER BY 1 ASC FOR XML PATH('')),1, 1, '')) The result I get for the Codestring field in Projects is: ProjectId ProjectName Codestring 101 Smith Blue,Blue,Gray,Gray,Pink ... But the result I need for the Codestring field in Projects is: ProjectId ProjectName Codestring 101 Smith Blue,Pink,Gray ... Here is my start on the Trigger. The Update query, above, will be added to this Trigger. Can you help me complete the Trigger creation query? CREATE TRIGGER Update_Codestring ON prcodes AFTER INSERT, UPDATE, DELETE AS WITH CTE AS ( select ProjectId from inserted union select ProjectId from deleted )

    Read the article

  • Perl XML SAX parser emulating XML::Simple record for record

    - by DVK
    Short Q summary: I am looking a fast XML parser (most likely a wrapper around some standard SAX parser) which will produce per-record data structure 100% identical to those produced by XML::Simple. Details: We have a large code infrastructure which depends on processing records one-by-one and expects the record to be a data structure in a format produced by XML::Simple since it always used XML::Simple since early Jurassic era. An example simple XML is: <root> <rec><f1>v1</f1><f2>v2</f2></rec> <rec><f1>v1b</f1><f2>v2b</f2></rec> <rec><f1>v1c</f1><f2>v2c</f2></rec> </root> And example rough code is: sub process_record { my ($obj, $record_hash) = @_; # do_stuff } my $records = XML::Simple->XMLin(@args)->{root}; foreach my $record (@$records) { $obj->process_record($record) }; As everyone knows XML::Simple is, well, simple. And more importantly, it is very slow and a memory hog - due to being a DOM parser and needing to build/store 100% of data in memory. So, it's not the best tool for parsing an XML file consisting of large amount of small records record-by-record. However, re-writing the entire code (which consist of large amount of "process_record"-like methods) to work with standard SAX parser seems like an big task not worth the resources, even at the cost of living with XML::Simple. What I'm looking for is an existing module which will probably be based on a SAX parser (or anything fast with small memory footprint) which can be used to produce $record hashrefs one by one based on the XML pictured above that can be passed to $obj->process_record($record) and be 100% identical to what XML::Simple's hashrefs would have been.

    Read the article

  • Amazon SES domain verification TXT DNS record

    - by Skittles
    I currently am trying to get my domain verified on Amazon's SES and running int a problem that google searches are not helping me get any closer to solving. According to SES, I have to create a TXT record in my DNS for the domain I'm trying to verify. Amazon gives you the following (value changed for security purposes); TYPE: TXT NAME: _amazonses.somedomain.com VALUE: M2sXTycXkgZXXuMuWI8TczngaPIDDMToPefzGhZ3uYA= I have tried numerous entries in my registrar's DNS manager, but SES still fails to find what it's looking for. I am not a DNS guru, so, I have tried to construct the TXT record from very sparse examples, at best, to try to get this right. My present TXT record is this; "v=DKIM1 s=_domainkey d=_amazonses.somedomain.com p=M2sXTycXkgZXXuMuWI8TczngaPIDDMToPefzGhZ3uYA=" Am I doing something incorrect? Thanks

    Read the article

  • How do I check a reverse PTR record?

    - by Daisetsu
    I need to check a reverse PTR record to make sure that a script I have is sending emails which will actually received by my users and not incorrectly marked as spam. I understand that the ISP which owns the IP range has to set up the PTR record, but how do I check if it is already set up?

    Read the article

  • how do you add an A record for a root domain

    - by nbv4
    this seems really simple, but I can't figure it out. I'm using xname.org since it's free and I own a bunch of domains spread over a few different registrars. The setup I desire is very simple: one A record that points the bare domain name to my server, plus a wildcard CNAME record pointing all subdomains to the same server. So if the user goes to domain.com it will point them to 285.24.435.75, if they go to www.domain, blah.domain.com, or any other sub domain, they'll get sent to 285.24.435.75. All the examples I read on the internet about setting up A records all have the A record set to a subdomain such as www. WWW is deprecated so I want to have noting to do with it. Currently my xname.org zone looks like this: $TTL 86400 ; Default TTL domain.com. IN SOA ns0.xname.org. nbvfour.gmail.com. ( 2010052503 ; serial 10800 ; Refresh period 3600 ; Retry interval 604800 ; Expire time 10800 ; Negative caching TTL ) $ORIGIN domain.com. IN NS ns2.xname.org. IN NS ns0.xname.org. IN NS ns1.xname.org. @ IN A 65.49.73.148 * IN CNAME domain.com The '@' symbol is something that the godaddy domain interface uses to mean "this root domain', but that may have been specefic to that interface and has no meaning here. Before I had a 'www' entry in the A rcords and it worked in the sense that I could ping 'www.domain.com' and it returned a response, but pinging the root domain 'domain.com' returned "no host found".

    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

  • BizTalk 2009 - Scoped Record Counting in Maps

    - by StuartBrierley
    Within BizTalk there is a functoid called Record Count that will return the number of instances of a repeated record or repeated element that occur in a message instance. The input to this functoid is the record or element to be counted. As an example take the following Source schema, where the Source message has a repeated record called Box and each Box has a repeated element called Item: An instance of this Source schema may look as follows; 2 box records - one with 2 items and one with only 1 item. Our destination schema has a number of elements and a repeated box record.  The top level elements contain totals for the number of boxes and the overall number of items.  Each box record contains a single element representing the number of items in that box. Using the Record Count functoid it is easy to map the top level elements, producing the expected totals of 2 boxes and 3 items: We now need to map the total number of items per box, but how will we do this?  We have already seen that the record count functoid returns the total number of instances for the entire message, and unfortunately it does not allow you to specify a scoping parameter.  In order to acheive Scoped Record Counting we will need to make use of a combination of functoids. As you can see above, by linking to a Logical Existence functoid from the record/element to be counted we can then feed the output into a Value Mapping functoid.  Set the other Value Mapping parameter to "1" and link the output to a Cumulative Sum functoid. Set the other Cumulative Sum functoid parameter to "1" to limit the scope of the Cumulative Sum. This gives us the expected results of Items per Box of 2 and 1 respectively. I ran into this issue with a larger schema on a more complex map, but the eventual solution is still the same.  Hopefully this simplified example will act as a good reminder to me and save someone out there a few minutes of brain scratching.

    Read the article

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