Search Results

Search found 49 results on 2 pages for 'filenet p8'.

Page 1/2 | 1 2  | Next Page >

  • Using IBM FileNet Web services in C# Application

    - by acadia
    Hello Experts, Our organization uses IBM FileNet as document management system. FileNet P8 comes with a web services API which can be used in .net Has anyone of you guys tried this? If yes could you please direct me to any resources to kick start? Thanks a ton in advance.

    Read the article

  • FileNet P8 workplace token issue in C#

    - by acadia
    Hello, I am trying to get user token and build the URL so that user need not login everytime they click the file. below is my code. My question is do I need to pass whole of the token value shown below or?? The token value I am getting is symmetric:algorithm:QUVT:keyid:NTZkYTNkNmI=:data:7P9aJHzkfGTOlwtotuWGaMqfU9COECscA9yxMdK64ZLa298A3tsGlHKHDFp0cH+gn/SiMrwKfbWNZybPXaltgo5e4H4Ak8KUiCRKWfS68qhmjfw69qPv9ib96vL3TzNORYFpp/hrwvp8aX4CQIZlBA== The problem is, once i copy the URL and past it in the browser, it is taking me to the login page. Though I am not getting any errors, it should take users directly to the imageviewer but instead it takes me to login page, if I login it is opening the file correctly. What am I doing wrong? string text = ""; string userName = "userName"; string pwd = "*****"; fileNetID = "{5FCE7E04-3D74-4A93-AA53-26C12A2FD4FC}"; Uri uri = null; string workplaceURL = "http://filenet:9081/WorkPlaceXT"; uri = new Uri(workplaceURL + "/setCredentials?op=getUserToken&userId=" + this.encodeLabel(userName) + "&password=" + this.encodeLabel(pwd) + "&verify=true"); System.Net.WebRequest webRequest = System.Net.WebRequest.Create(uri); System.Net.WebResponse webResponse = webRequest.GetResponse(); StreamReader streamReader = new StreamReader(webResponse.GetResponseStream()); String token = streamReader.ReadToEnd(); string contentURL = string.Empty; contentURL = workplaceURL + "/getContent?objectType=document&impersonate=true&objectStoreName=OBJECTSTORE&id=" + HttpUtility.UrlEncode(fileNetID); contentURL += "&ut=" + HttpUtility.UrlEncode(encodeLabel(token)); return contentURL;

    Read the article

  • Application Event Log keeps getting corrupted

    - by yakatz
    I recently asked about repairing a corrupt event log, because it seemed to be a one-off event. The event log has since exhibited the same behavior 3 times. We have been trying to find patterns, but so far we have found nothing. The server runs several ASP.NET applications and three scheduled tasks written in .NET. The last modified date of the event log once happened to be the same time as one of the scheduled tasks, but the others have not been. Any suggestions of where to look next or a way we can get any information out of a corrupt evtx file? The server is running critical e-commerce applications, so we want to keep the number of restarts required to a minimum. Edit: I ran DUMPEL and got very strange results. 1/9/2012 4:14:05 PM 1 100 1000 Application Error N/A SERVERNAME Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8 Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58 Exception code: 0xc0000374 Fault offset: 0x000ce653 Faulting process id: 0x1070 Faulting application start time: 0x01cccf1386d30991 Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: dbf4f691-3b06-11e1-9025-005056a602e6 1/9/2012 4:14:07 PM 4 0 1001 Windows Error Reporting N/A SERVERNAME Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: w3wp.exe P2: 7.5.7601.17514 P3: 4ce7a5f8 P4: StackHash_79d9 P5: 6.1.7601.17514 P6: 4ce7ba58 P7: c0000374 P8: 000ce653 P9: P10: Attached files: C:\Windows\Temp\WER975.tmp.appcompat.txt C:\Windows\Temp\WERA03.tmp.WERInternalMetadata.xml C:\Windows\Temp\WERA13.tmp.hdmp C:\Windows\Temp\WERD21.tmp.mdmp These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_cd7d09dfc84119d82a2ac6a789038bd5661acfb_cab_128f0e67 Analysis symbol: Rechecking for solution: 0 Report Id: dbf4f691-3b06-11e1-9025-005056a602e6 Report Status: 4 1/9/2012 4:14:07 PM 4 0 1001 Windows Error Reporting N/A SERVERNAME Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: w3wp.exe P2: 7.5.7601.17514 P3: 4ce7a5f8 P4: StackHash_79d9 P5: 6.1.7601.17514 P6: 4ce7ba58 P7: c0000374 P8: 000ce653 P9: P10: Attached files: C:\Windows\Temp\WER975.tmp.appcompat.txt C:\Windows\Temp\WERA03.tmp.WERInternalMetadata.xml C:\Windows\Temp\WERA13.tmp.hdmp C:\Windows\Temp\WERD21.tmp.mdmp These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_cd7d09dfc84119d82a2ac6a789038bd5661acfb_cab_128f0e67 Analysis symbol: Rechecking for solution: 0 Report Id: dbf4f691-3b06-11e1-9025-005056a602e6 Report Status: 0 1/9/2012 4:14:12 PM 1 100 1000 Application Error N/A SERVERNAME Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8 Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58 Exception code: 0xc0000374 Fault offset: 0x000ce653 Faulting process id: 0x16ac Faulting application start time: 0x01cccf139f475c0c Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: e03bae70-3b06-11e1-9025-005056a602e6 1/9/2012 4:14:16 PM 4 0 1001 Windows Error Reporting N/A SERVERNAME Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: w3wp.exe P2: 7.5.7601.17514 P3: 4ce7a5f8 P4: StackHash_9c6c P5: 6.1.7601.17514 P6: 4ce7ba58 P7: c0000374 P8: 000ce653 P9: P10: Attached files: C:\Windows\Temp\WER2579.tmp.appcompat.txt C:\Windows\Temp\WER25F7.tmp.WERInternalMetadata.xml C:\Windows\Temp\WER25F8.tmp.hdmp C:\Windows\Temp\WER28F6.tmp.mdmp These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_c49a67649524ad11b64bbf809211bc5ba742a3d6_cab_0b63321b Analysis symbol: Rechecking for solution: 0 Report Id: e03bae70-3b06-11e1-9025-005056a602e6 Report Status: 4 1/9/2012 4:14:16 PM 4 0 1001 Windows Error Reporting N/A SERVERNAME Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: w3wp.exe P2: 7.5.7601.17514 P3: 4ce7a5f8 P4: StackHash_9c6c P5: 6.1.7601.17514 P6: 4ce7ba58 P7: c0000374 P8: 000ce653 P9: P10: Attached files: C:\Windows\Temp\WER2579.tmp.appcompat.txt C:\Windows\Temp\WER25F7.tmp.WERInternalMetadata.xml C:\Windows\Temp\WER25F8.tmp.hdmp C:\Windows\Temp\WER28F6.tmp.mdmp These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_c49a67649524ad11b64bbf809211bc5ba742a3d6_cab_0b63321b Analysis symbol: Rechecking for solution: 0 Report Id: e03bae70-3b06-11e1-9025-005056a602e6 Report Status: 0 1/9/2012 4:14:21 PM 1 100 1000 Application Error N/A SERVERNAME Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8 Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58 Exception code: 0xc0000374 Fault offset: 0x000ce653 Faulting process id: 0x17f8 Faulting application start time: 0x01cccf13a4ba5126 Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: e57a0a85-3b06-11e1-9025-005056a602e6 1/9/2012 4:14:21 PM 4 0 1001 Windows Error Reporting N/A SERVERNAME Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: w3wp.exe P2: 7.5.7601.17514 P3: 4ce7a5f8 P4: StackHash_9c6c P5: 6.1.7601.17514 P6: 4ce7ba58 P7: c0000374 P8: 000ce653 P9: P10: Attached files: These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_c49a67649524ad11b64bbf809211bc5ba742a3d6_1cfb4872 Analysis symbol: Rechecking for solution: 0 Report Id: e57a0a85-3b06-11e1-9025-005056a602e6 Report Status: 4 1/9/2012 4:14:21 PM 4 0 1001 Windows Error Reporting N/A SERVERNAME Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: w3wp.exe P2: 7.5.7601.17514 P3: 4ce7a5f8 P4: StackHash_9c6c P5: 6.1.7601.17514 P6: 4ce7ba58 P7: c0000374 P8: 000ce653 P9: P10: Attached files: These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_c49a67649524ad11b64bbf809211bc5ba742a3d6_1cfb4872 Analysis symbol: Rechecking for solution: 0 Report Id: e57a0a85-3b06-11e1-9025-005056a602e6 Report Status: 0 None of the files referenced actually exist (not even in WER ReportArchive). These should not be the only events mentioned. The log file has been cleared twice since January 9, so those events should not even be listed at all.

    Read the article

  • Why Could Linq to Sql Submit Changes Fail for Updates Despite Data in Change Set

    - by KevDog
    I'm updating a set of objects, but the update fails on a SqlException that says "Incorrect Syntax near 'Where'". So I crack open SqlProfiler, and here is the generated SQL: exec sp_executesql N'UPDATE [dbo].[Addresses] SET WHERE ([AddressID] = @p0) AND ([StreetAddress] = @p1) AND ([StreetAddress2] = @p2) AND ([City] = @p3) AND ([State] = @p4) AND ([ZipCode] = @p5) AND ([CoordinateID] = @p6) AND ([CoordinateSourceID] IS NULL) AND ([CreatedDate] = @p7) AND ([Country] = @p8) AND (NOT ([IsDeleted] = 1)) AND (NOT ([IsNonSACOGZip] = 1))',N'@p0 uniqueidentifier,@p1 varchar(15),@p2 varchar(8000),@p3 varchar(10),@p4 varchar(2),@p5 varchar(5),@p6 uniqueidentifier,@p7 datetime,@p8 varchar(2)',@p0='92550F32-D921-4B71-9622-6F1EC6123FB1',@p1='125 Main Street',@p2='',@p3='Sacramento',@p4='CA',@p5='95864',@p6='725E7939-AEE3-4EF9-A033-7507579B69DF',@p7='2010-06-15 14:07:51.0100000',@p8='US' Sure enough, no set statement. I also called context.GetChangeSet() and the proper values are in the updates section. Also, I checked the .dbml file and all of the properties Update Check values are 'Always'. I am completely baffled on this one, any help out there?

    Read the article

  • .NET Oracle Provider: Why will my stored proc not work?

    - by Matt
    I am using the Oracle .NET Provider and am calling a stored procedure in a package. The message I get back is "Wrong number or types in call". I have ensured that the order in which the parameters are being added are in the correct order and I have gone over the OracleDbType's thoroughly though I suspect that is where my problem is. Here is the code-behind: //setup intial stuff, connection and command string msg = string.Empty; string oraConnString = ConfigurationManager.ConnectionStrings["OracleServer"].ConnectionString; OracleConnection oraConn = new OracleConnection(oraConnString); OracleCommand oraCmd = new OracleCommand("PK_MOVEMENT.INSERT_REC", oraConn); oraCmd.CommandType = CommandType.StoredProcedure; try { //iterate the array //grab 3 items at a time and do db insert, continue until all items are gone. Will always be divisible by 3. for (int i = 0; i < theData.Length; i += 3) { //3 items hardcoded for now string millCenter = "0010260510"; string movementType = "RECEIPT"; string feedCode = null; string userID = "GRIMMETTM"; string inventoryType = "INGREDIENT"; //set to FINISHED for feed stuff string movementDate = theData[i + 0]; string ingCode = System.Text.RegularExpressions.Regex.Match(theData[i + 1], @"^([0-9]*)").ToString(); string pounds = theData[i + 2].Replace(",", ""); //setup parameters OracleParameter p1 = new OracleParameter("A_MILL_CENTER", OracleDbType.NVarchar2, 10); p1.Direction = ParameterDirection.Input; p1.Value = millCenter; oraCmd.Parameters.Add(p1); OracleParameter p2 = new OracleParameter("A_INGREDIENT_CODE", OracleDbType.NVarchar2, 50); p2.Direction = ParameterDirection.Input; p2.Value = ingCode; oraCmd.Parameters.Add(p2); OracleParameter p3 = new OracleParameter("A_FEED_CODE", OracleDbType.NVarchar2, 30); p3.Direction = ParameterDirection.Input; p3.Value = feedCode; oraCmd.Parameters.Add(p3); OracleParameter p4 = new OracleParameter("A_MOVEMENT_TYPE", OracleDbType.NVarchar2, 10); p4.Direction = ParameterDirection.Input; p4.Value = movementType; oraCmd.Parameters.Add(p4); OracleParameter p5 = new OracleParameter("A_MOVEMENT_DATE", OracleDbType.NVarchar2, 10); p5.Direction = ParameterDirection.Input; p5.Value = movementDate; oraCmd.Parameters.Add(p5); OracleParameter p6 = new OracleParameter("A_MOVEMENT_QTY", OracleDbType.Int64, 12); p6.Direction = ParameterDirection.Input; p6.Value = pounds; oraCmd.Parameters.Add(p6); OracleParameter p7 = new OracleParameter("INVENTORY_TYPE", OracleDbType.NVarchar2, 10); p7.Direction = ParameterDirection.Input; p7.Value = inventoryType; oraCmd.Parameters.Add(p7); OracleParameter p8 = new OracleParameter("A_CREATE_USERID", OracleDbType.NVarchar2, 20); p8.Direction = ParameterDirection.Input; p8.Value = userID; oraCmd.Parameters.Add(p8); OracleParameter p9 = new OracleParameter("A_RETURN_VALUE", OracleDbType.Int32, 10); p9.Direction = ParameterDirection.Output; oraCmd.Parameters.Add(p9); //open and execute oraConn.Open(); oraCmd.ExecuteNonQuery(); oraConn.Close(); } } catch (OracleException oraEx) { msg = "An error has occured in the database: " + oraEx.ToString(); } catch (Exception ex) { msg = "An error has occured: " + ex.ToString(); } finally { //close connection oraConn.Close(); } return msg;

    Read the article

  • How to handle Oracle Stored Proc with ASP.NET and Oracle Data Provider?

    - by Matt
    I have been struggling with this for quite some time having been accustomed to SQL Server. I have the following code and I have verified that the OracleDbType's are correct and have verified that the actual values being passed to the parameters match. I think my problem may rest with the return value. All it does is give me the row count. I read somewhere that the return parameter must be set at the top. The specific error I am getting says, PLS-00306: wrong number or types of arguments in call to \u0027INSERT_REC\u0027 ORA-06550: line 1, column 7:\nPL/SQL: Statement ignored The stored procedure is: PROCEDURE INSERT_REC ( A_MILL_CENTER IN GRO_OWNER.MOVEMENT.MILL_CENTER%TYPE, --# VARCHAR2(10) A_INGREDIENT_CODE IN GRO_OWNER.MOVEMENT.INGREDIENT_CODE%TYPE, --# VARCHAR2(50) A_FEED_CODE IN GRO_OWNER.MOVEMENT.FEED_CODE%TYPE, --# VARCHAR2(30) --# A_MOVEMENT_TYPE should be ‘RECEIPT’ for ingredient receipts A_MOVEMENT_TYPE IN GRO_OWNER.MOVEMENT.MOVEMENT_TYPE%TYPE, --# VARCHAR2(10) A_MOVEMENT_DATE IN VARCHAR2, --# VARCHAR2(10) A_MOVEMENT_QTY IN GRO_OWNER.MOVEMENT.MOVEMENT_QTY%TYPE, --# NUMBER(12,4) --# A_INVENTORY_TYPE should be ‘INGREDIENT’ or ‘FINISHED’ A_INVENTORY_TYPE IN GRO_OWNER.MOVEMENT.INVENTORY_TYPE%TYPE, --# VARCHAR2(10) A_CREATE_USERID IN GRO_OWNER.MOVEMENT.CREATE_USERID%TYPE, --# VARCHAR2(20) A_RETURN_VALUE OUT NUMBER --# NUMBER(10,0) ); My code is as follows: //3 items hardcoded for now string millCenter = "0010260510"; string movementType = "RECEIPT"; string feedCode = "test this"; string userID = "GRIMMETTM"; string inventoryType = "INGREDIENT"; //set to FINISHED for feed stuff string movementDate = theData[i]; string ingCode = System.Text.RegularExpressions.Regex.Match(theData[i + 1], @"^([0-9]*)").ToString(); //int pounds = Convert.ToInt32(theData[i + 2].Replace(",", "")); int pounds = 100; //setup parameters OracleParameter p9 = new OracleParameter("A_RETURN_VALUE", OracleDbType.Int32, 30); p9.Direction = ParameterDirection.ReturnValue; oraCmd.Parameters.Add(p9); OracleParameter p1 = new OracleParameter("A_MILL_CENTER", OracleDbType.Varchar2, 10); p1.Direction = ParameterDirection.Input; p1.Value = millCenter; oraCmd.Parameters.Add(p1); OracleParameter p2 = new OracleParameter("A_INGREDIENT_CODE", OracleDbType.Varchar2, 50); p2.Direction = ParameterDirection.Input; p2.Value = ingCode; oraCmd.Parameters.Add(p2); OracleParameter p3 = new OracleParameter("A_FEED_CODE", OracleDbType.Varchar2, 30); p3.Direction = ParameterDirection.Input; p3.Value = feedCode; oraCmd.Parameters.Add(p3); OracleParameter p4 = new OracleParameter("A_MOVEMENT_TYPE", OracleDbType.Varchar2, 10); p4.Direction = ParameterDirection.Input; p4.Value = movementType; oraCmd.Parameters.Add(p4); OracleParameter p5 = new OracleParameter("A_MOVEMENT_DATE", OracleDbType.Varchar2, 10); p5.Direction = ParameterDirection.Input; p5.Value = movementDate; oraCmd.Parameters.Add(p5); OracleParameter p6 = new OracleParameter("A_MOVEMENT_QTY", OracleDbType.Int32, 12); p6.Direction = ParameterDirection.Input; p6.Value = pounds; oraCmd.Parameters.Add(p6); OracleParameter p7 = new OracleParameter("A_INVENTORY_TYPE", OracleDbType.Varchar2, 10); p7.Direction = ParameterDirection.Input; p7.Value = inventoryType; oraCmd.Parameters.Add(p7); OracleParameter p8 = new OracleParameter("A_CREATE_USERID", OracleDbType.Varchar2, 20); p8.Direction = ParameterDirection.Input; p8.Value = userID; oraCmd.Parameters.Add(p8); //open and execute oraConn.Open(); oraCmd.ExecuteNonQuery(); oraConn.Close();

    Read the article

  • iptables issue on plesk

    - by Fred Rufin
    i don't know how to open a specific port (rtmp=1935) on my CentOS server using Plesk or itables. I created new rules for port 1935 i/o using Plesk/Modules/Firewall but this doesn't work. Nmap scanning tells me this : 1935/tcp filtered rtmp . So i decided to have look at my iptable using SSH (iptables -L), and iptables seems to contain my rules (tcp spt:macromedia-fcs): Chain INPUT (policy DROP) target prot opt source destination VZ_INPUT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere Chain FORWARD (policy DROP) target prot opt source destination VZ_FORWARD all -- anywhere anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere Chain OUTPUT (policy DROP) target prot opt source destination VZ_OUTPUT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere Chain VZ_FORWARD (1 references) target prot opt source destination Chain VZ_INPUT (1 references) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpts:filenet-tms:65535 ACCEPT udp -- anywhere anywhere udp dpts:filenet-tms:65535 ACCEPT tcp -- anywhere anywhere tcp dpt:cddbp-alt ACCEPT tcp -- anywhere anywhere tcp dpt:pcsync-https ACCEPT tcp -- localhost.localdomain localhost.localdomain ACCEPT tcp -- anywhere anywhere tcp dpt:macromedia-fcs ACCEPT udp -- localhost.localdomain localhost.localdomain Chain VZ_OUTPUT (1 references) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp spt:http ACCEPT tcp -- anywhere anywhere tcp spt:ssh ACCEPT tcp -- anywhere anywhere tcp spt:smtp ACCEPT tcp -- anywhere anywhere tcp spt:pop3 ACCEPT tcp -- anywhere anywhere tcp spt:domain ACCEPT udp -- anywhere anywhere udp spt:domain ACCEPT tcp -- anywhere anywhere ACCEPT udp -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp spt:cddbp-alt ACCEPT tcp -- anywhere anywhere tcp spt:pcsync-https ACCEPT tcp -- localhost.localdomain localhost.localdomain ACCEPT tcp -- anywhere anywhere tcp spt:macromedia-fcs ACCEPT udp -- localhost.localdomain localhost.localdomain My rules seems to be OK but there is no connection to 1935 port using a browser. I can connect to this port with SSH (typing "wget myServerIP:1935") but maybe this is because it is an SSH tunelling ? I don't know how to do.

    Read the article

  • Ideablade Update

    - by Tolu
    Hi, I'm using IdeaBlade version 3.6. I noticed the following generated SQL update query : (@P1 nchar(32),@P2 nvarchar(32),@P3 nvarchar(512),@P4 nchar(32),@P5 int,@P6 nvarchar(32),@P7 int,@P8 datetime,@P9 datetime,@P10 datetime,@P11 int,@P12 datetime,@P13 int,@P14 int,@P15 int,@P16 nvarchar(32),@P17 nvarchar(128),@P18 nvarchar(32),@P19 nvarchar(32),@P20 datetime,@P21 datetime,@P22 bit,@P23 nvarchar(32),@P24 nvarchar(64),@P25 nchar(32))update "dbo"."GSS_Documents" set "DocumentID"=@P1,"FileName"=@P2,"FilePath"=@P3,"BusinessOfficeID"=@P4,"Pages"=@P5,"FileSize"=@P6,"DocumentType"=@P7,"DateCreated"=@P8,"EffectiveDateCreated"=@P9,"DateProcessed"=@P10,"ProcessorID"=@P11,"DateReviewed"=@P12,"ReviewerID"=@P13,"WorkflowStatus"=@P14,"ApprovalStatus"=@P15,"AccountNumber"=@P16,"AccountName"=@P17,"SerialNumber"=@P18,"TransactionID"=@P19,"CriticalDate"=@P20,"EmergencyDate"=@P21,"GenerateSMSAlert"=@P22,"CustomerPhoneNumber"=@P23,"CustomerEmailAddress"=@P24 where "DocumentID"=@P25 Problem is DocumentID is the primary key. This update appears to be updating the primary key as well! Any ideas on how to stop this?

    Read the article

  • Discrete mathematics problem - Probability theory and counting

    - by Mohammad
    Hello All, I'm taking a discrete mathematics course, and I encountered a question and I need your help. I don't know if this is the right place for that though :) It says: Each user on a computer system has a password, which is six to eight characters long, where each character is an uppercase letter or a digit. Each password must contain at least one digit. How many possible passwords are there? The book solves this by adding the probabilities of having six,seven and eight characters long password. However, when he solves for probability of six characters he does this P6 = 36^6 - 26^6 and does P7 = 36^7 - 26^7 and P8 = 36^8 - 26^8 and then add them all I understand the solution, but my question is why doesn't calculating, P6 = 10*36^5 and the same for P7 and P8, work? 10 for the digit and 36 for the alphanumeric? Also, if anyone could give me another solution, other than the one in the book. Thank you very much :)

    Read the article

  • MySQL SELECT where if stores have X, show me everything that they have

    - by tnt0932
    I have a MYSQL table like this: STORES (SPID, StoreID, ProductID); And data like this: { 1 | s1 | p2 } { 2 | s1 | p7 } { 3 | s1 | p8 } { 4 | s2 | p1 } { 5 | s2 | p3 } { 6 | s2 | p6 } { 7 | s2 | p9 } { 8 | s3 | p2 } { 9 | s3 | p5 } And I would like to: Use a MYSQL SELECT query to get results, where if a store has a certain product, then a list of all of the products at that store will be returned. For example, if I were looking for "p2", then I would like to know that "s1" has "p2, p7, p8" and "s3" has "p2, p5". Please let me know if you require any more information. I'm not sure what is required to solve this issue (Which is probably why I can't search and find the answer!) Thank you.

    Read the article

  • NHibernate won't persist DateTime SqlDateTime overflow

    - by chris raethke
    I am working on an ASP.NET MVC project with NHibernate as the backend and am having some trouble getting some dates to write back to my SQL Server database tables. These date fields are NOT nullable, so the many answers here about how to setup nullable datetimes have not helped. Basically when I try to save the entity which has a DateAdded and a LastUpdated fields, I am getting a SqlDateTime overflow exception. I have had a similar problem in the past where I was trying to write a datetime field into a smalldatetime column, updating the type on the column appeared to fix the problem. My gut feeling is that its going to be some problem with the table definition or some type of incompatible data types, and the overflow exception is a bit of a bum steer. I have attached an example of the table definition and the query that NHibernate is trying to run, any help or suggestions would be greatly appreciated. CREATE TABLE [dbo].[CustomPages]( [ID] [uniqueidentifier] NOT NULL, [StoreID] [uniqueidentifier] NOT NULL, [DateAdded] [datetime] NOT NULL, [AddedByID] [uniqueidentifier] NOT NULL, [LastUpdated] [datetime] NOT NULL, [LastUpdatedByID] [uniqueidentifier] NOT NULL, [Title] [nvarchar](150) NOT NULL, [Term] [nvarchar](150) NOT NULL, [Content] [ntext] NULL ) exec sp_executesql N'INSERT INTO CustomPages (Title, Term, Content, LastUpdated, DateAdded, StoreID, LastUpdatedById, AddedById, ID) VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8)',N'@p0 nvarchar(21),@p1 nvarchar(21),@p2 nvarchar(33),@p3 datetime,@p4 datetime,@p5 uniqueidentifier,@p6 uniqueidentifier,@p7 uniqueidentifier,@p8 uniqueidentifier',@p0=N'Size and Colour Chart',@p1=N'size-and-colour-chart',@p2=N'This is the size and colour chart',@p3=''2009-03-14 14:29:37:000'',@p4=''2009-03-14 14:29:37:000'',@p5='48315F9F-0E00-4654-A2C0-62FB466E529D',@p6='1480221A-605A-4D72-B0E5-E1FE72C5D43C',@p7='1480221A-605A-4D72-B0E5-E1FE72C5D43C',@p8='1E421F9E-9A00-49CF-9180-DCD22FCE7F55' In response the the answers/comments, I am using Fluent NHibernate and the generated mapping is below public CustomPageMap() { WithTable("CustomPages"); Id( x => x.ID, "ID" ) .WithUnsavedValue(Guid.Empty) . GeneratedBy.Guid(); References(x => x.Store, "StoreID"); Map(x => x.DateAdded, "DateAdded"); References(x => x.AddedBy, "AddedById"); Map(x => x.LastUpdated, "LastUpdated"); References(x => x.LastUpdatedBy, "LastUpdatedById"); Map(x => x.Title, "Title"); Map(x => x.Term, "Term"); Map(x => x.Content, "Content"); } <?xml version="1.0" encoding="utf-8"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false" assembly="MyNamespace.Core" namespace="MyNamespace.Core"> <class name="CustomPage" table="CustomPages" xmlns="urn:nhibernate-mapping-2.2"> <id name="ID" column="ID" type="Guid" unsaved-value="00000000-0000-0000-0000-000000000000"><generator class="guid" /></id> <property name="Title" column="Title" length="100" type="String"><column name="Title" /></property> <property name="Term" column="Term" length="100" type="String"><column name="Term" /></property> <property name="Content" column="Content" length="100" type="String"><column name="Content" /></property> <property name="LastUpdated" column="LastUpdated" type="DateTime"><column name="LastUpdated" /></property> <property name="DateAdded" column="DateAdded" type="DateTime"><column name="DateAdded" /></property> <many-to-one name="Store" column="StoreID" /><many-to-one name="LastUpdatedBy" column="LastUpdatedById" /> <many-to-one name="AddedBy" column="AddedById" /></class></hibernate-mapping>

    Read the article

  • Generated LinqtoSql Sql 5x slower than SAME EXACT hand-written sql

    - by JasonM
    I have a sql statement which is hardcoded in an existing VB6 app. I'm upgrading a new version in C# and using Linq To Sql. I was able to get LinqToSql to generate the same sql (before I start refactoring), but for some reason the Sql generated by LinqToSql is 5x slower than the original sql. This is running the generated Sql Directly in LinqPad. The only real difference my meager sql eyes can spot is the WITH (NOLOCK), which if I add into the LinqToSql generated sql, makes no difference. Can someone point out what I'm doing wrong here? Thanks! Existing Hard Coded Sql (5.0 Seconds) SELECT DISTINCT CH.ClaimNum, CH.AcnProvID, CH.AcnPatID, CH.TinNum, CH.Diag1, CH.GroupNum, CH.AllowedTotal FROM Claims.dbo.T_ClaimsHeader AS CH WITH (NOLOCK) WHERE CH.ContractID IN ('123A','123B','123C','123D','123E','123F','123G','123H') AND ( ( (CH.Transmited Is Null or CH.Transmited = '') AND CH.DateTransmit Is Null AND CH.EobDate Is Null AND CH.ProcessFlag IN ('Y','E') AND CH.DataSource NOT IN ('A','EC','EU') AND CH.AllowedTotal > 0 ) ) ORDER BY CH.AcnPatID, CH.ClaimNum Generated Sql from LinqToSql (27.6 Seconds) -- Region Parameters DECLARE @p0 NVarChar(4) SET @p0 = '123A' DECLARE @p1 NVarChar(4) SET @p1 = '123B' DECLARE @p2 NVarChar(4) SET @p2 = '123C' DECLARE @p3 NVarChar(4) SET @p3 = '123D' DECLARE @p4 NVarChar(4) SET @p4 = '123E' DECLARE @p5 NVarChar(4) SET @p5 = '123F' DECLARE @p6 NVarChar(4) SET @p6 = '123G' DECLARE @p7 NVarChar(4) SET @p7 = '123H' DECLARE @p8 VarChar(1) SET @p8 = '' DECLARE @p9 NVarChar(1) SET @p9 = 'Y' DECLARE @p10 NVarChar(1) SET @p10 = 'E' DECLARE @p11 NVarChar(1) SET @p11 = 'A' DECLARE @p12 NVarChar(2) SET @p12 = 'EC' DECLARE @p13 NVarChar(2) SET @p13 = 'EU' DECLARE @p14 Decimal(5,4) SET @p14 = 0 -- EndRegion SELECT DISTINCT [t0].[ClaimNum], [t0].[acnprovid] AS [AcnProvID], [t0].[acnpatid] AS [AcnPatID], [t0].[tinnum] AS [TinNum], [t0].[diag1] AS [Diag1], [t0].[GroupNum], [t0].[allowedtotal] AS [AllowedTotal] FROM [Claims].[dbo].[T_ClaimsHeader] AS [t0] WHERE ([t0].[contractid] IN (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7)) AND (([t0].[Transmited] IS NULL) OR ([t0].[Transmited] = @p8)) AND ([t0].[DATETRANSMIT] IS NULL) AND ([t0].[EOBDATE] IS NULL) AND ([t0].[PROCESSFLAG] IN (@p9, @p10)) AND (NOT ([t0].[DataSource] IN (@p11, @p12, @p13))) AND ([t0].[allowedtotal] > @p14) ORDER BY [t0].[acnpatid], [t0].[ClaimNum] New LinqToSql Code (30+ seconds... Times out ) var contractIds = T_ContractDatas.Where(x => x.EdiSubmissionGroupID == "123-01").Select(x => x.CONTRACTID).ToList(); var processFlags = new List<string> {"Y","E"}; var dataSource = new List<string> {"A","EC","EU"}; var results = (from claims in T_ClaimsHeaders where contractIds.Contains(claims.contractid) && (claims.Transmited == null || claims.Transmited == string.Empty ) && claims.DATETRANSMIT == null && claims.EOBDATE == null && processFlags.Contains(claims.PROCESSFLAG) && !dataSource.Contains(claims.DataSource) && claims.allowedtotal > 0 select new { ClaimNum = claims.ClaimNum, AcnProvID = claims.acnprovid, AcnPatID = claims.acnpatid, TinNum = claims.tinnum, Diag1 = claims.diag1, GroupNum = claims.GroupNum, AllowedTotal = claims.allowedtotal }).OrderBy(x => x.ClaimNum).OrderBy(x => x.AcnPatID).Distinct(); I'm using the list of constants above to make LinqToSql Generate IN ('xxx','xxx',etc) Otherwise it uses subqueries which are just as slow...

    Read the article

  • ANOVA with 3 fixed factors in R

    - by TKBell
    Im trying to run a model with a response variable p and 3 fixed factors to get ANOVA. this is how my code looks like : #run it as 3 fixed factor model p1=c(37,38,37,41,41,40,41,42,41) p2=c(42,41,43,42,42,42,43,42,43) p3=c(30,31,31,31,31,31,29,30,28) p4=c(42,43,42,43,43,43,42,42,42) p5=c(28,30,29,29,30,29,31,29,29) p6=c(42,42,43,45,45,45,44,46,45) p7=c(25,26,27,28,28,30,29,27,27) p8=c(40,40,40,43,42,42,43,43,41) p9=c(37,38,37,41,41,40,41,42,41) p10=c(35,34,34,35,35,34,35,34,35) p = cbind(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) partnumber=c(rep(1,9),rep(2,9),rep(3,9),rep(4,9),rep(5,9),rep(6,9),rep(7,9),rep(8,9),rep(9,9),rep(10,9)) test=c(rep(c(rep(1:3,3)),10)) inspector = rep(c(rep(1,3),rep(2,3),rep(3,3)),10) fpartnumber = factor(partnumber) ftest = factor(test) finspector = factor(inspector) model=lm(p~fpartnumber*ftest*finspector) summary(model) anova(model) but when I run it I get this error : it says my variable length for fpartnumber is different , but when I checked the length of each variable and is 90. What is going on ? model=lm(y~fpartnumber*ftest*finspector) Error in model.frame.default(formula = yang ~ fpartnumber * ftest * finspector, : variable lengths differ (found for 'fpartnumber')

    Read the article

  • If a table has two xml columns, will inserting records be a lot slower?

    - by Lieven Cardoen
    Is it a bad thing to have two xml columns in one table? + How much slower are these xml columns in terms of updating/inserting/reading data? In profiler this kind of insert normally takes 0 ms, but sometimes it goes up to 160ms: declare @p8 xml set @p8=convert(xml,N'<interactions><interaction correct="false" score="0" id="0" gapid="0" x="61" y="225"><feedback/><element id="0" position="0" elementtype="1"><asset/></element></interaction><interaction correct="false" score="0" id="1" gapid="1" x="64" y="250"><feedback/><element id="0" position="0" elementtype="1"><asset/></element></interaction><interaction correct="false" score="0" id="2" gapid="2" x="131" y="250"><feedback/><element id="0" position="0" elementtype="1"><asset/></element></interaction></interactions>') declare @p14 xml set @p14=convert(xml,N'<contentinteractions/>') exec sp_executesql N'INSERT INTO [dbo].[PackageSessionNodes]([dbo].[PackageSessionNodes].[PackageSessionId], [dbo].[PackageSessionNodes].[TreeNodeId],[dbo].[PackageSessionNodes].[Duration], [dbo].[PackageSessionNodes].[Score],[dbo].[PackageSessionNodes].[ScoreMax], [dbo].[PackageSessionNodes].[Interactions],[dbo].[PackageSessionNodes].[BrainTeaser], [dbo].[PackageSessionNodes].[DateCreated], [dbo].[PackageSessionNodes].[CompletionStatus], [dbo].[PackageSessionNodes].[ReducedScore], [dbo].[PackageSessionNodes].[ReducedScoreMax], [dbo].[PackageSessionNodes].[ContentInteractions]) VALUES (@ins_dboPackageSessionNodesPackageSessionId, @ins_dboPackageSessionNodesTreeNodeId, @ins_dboPackageSessionNodesDuration, @ins_dboPackageSessionNodesScore, @ins_dboPackageSessionNodesScoreMax, @ins_dboPackageSessionNodesInteractions, @ins_dboPackageSessionNodesBrainTeaser, @ins_dboPackageSessionNodesDateCreated, @ins_dboPackageSessionNodesCompletionStatus, @ins_dboPackageSessionNodesReducedScore, @ins_dboPackageSessionNodesReducedScoreMax, @ins_dboPackageSessionNodesContentInteractions) ; SELECT SCOPE_IDENTITY() as new_id This is the table: CREATE TABLE [dbo].[PackageSessionNodes]( [PackageSessionNodeId] [int] IDENTITY(1,1) NOT NULL, [PackageSessionId] [int] NOT NULL, [TreeNodeId] [int] NOT NULL, [Duration] [int] NULL, [Score] [float] NOT NULL, [ScoreMax] [float] NOT NULL, [Interactions] [xml] NOT NULL, [BrainTeaser] [bit] NOT NULL, [DateCreated] [datetime] NULL, [CompletionStatus] [int] NOT NULL, [ReducedScore] [float] NOT NULL, [ReducedScoreMax] [float] NOT NULL, [ContentInteractions] [xml] NOT NULL, CONSTRAINT [PK_PackageSessionNodes] PRIMARY KEY CLUSTERED ( [PackageSessionNodeId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[PackageSessionNodes] WITH CHECK ADD CONSTRAINT [FK_PackageSessionNodes_PackageSessions] FOREIGN KEY([PackageSessionId]) REFERENCES [dbo].[PackageSessions] ([PackageSessionId]) ON UPDATE CASCADE ON DELETE CASCADE GO ALTER TABLE [dbo].[PackageSessionNodes] CHECK CONSTRAINT [FK_PackageSessionNodes_PackageSessions] GO ALTER TABLE [dbo].[PackageSessionNodes] WITH CHECK ADD CONSTRAINT [FK_PackageSessionNodes_TreeNodes] FOREIGN KEY([TreeNodeId]) REFERENCES [dbo].[TreeNodes] ([TreeNodeId]) GO ALTER TABLE [dbo].[PackageSessionNodes] CHECK CONSTRAINT [FK_PackageSessionNodes_TreeNodes] GO ALTER TABLE [dbo].[PackageSessionNodes] ADD CONSTRAINT [DF_PackageSessionNodes_Score] DEFAULT ((-1)) FOR [Score] GO ALTER TABLE [dbo].[PackageSessionNodes] ADD CONSTRAINT [DF_PackageSessionNodes_ScoreMax] DEFAULT ((-1)) FOR [ScoreMax] GO ALTER TABLE [dbo].[PackageSessionNodes] ADD CONSTRAINT [DF_PackageSessionNodes_DateCreated] DEFAULT (getdate()) FOR [DateCreated] GO ALTER TABLE [dbo].[PackageSessionNodes] ADD CONSTRAINT [DF_PackageSessionNodes_ReducedScore] DEFAULT ((-1)) FOR [ReducedScore] GO ALTER TABLE [dbo].[PackageSessionNodes] ADD CONSTRAINT [DF_PackageSessionNodes_ReducedScoreMax] DEFAULT ((-1)) FOR [ReducedScoreMax] GO

    Read the article

  • Method Cannot be reflected error

    - by acadia
    Hello, I am trying to add the web reference of a IBM FileNet WebSErvice in my .net application. The only change I did is changed the namespace in the reference from System.Web.Services.Protocols.SoapHttpClientProtocol TO Microsoft.Web.Services3.WebServicesClientProtocol After doing so, though the application is building properly. I am getting an error ExecuteChanges[webMethod] cannot be reflected. Please help

    Read the article

  • inverse search from Okular to Kile

    - by shallowthought
    Upgraded to 12:04 now can't get inverse search to work (from Okular to Kile) My settings: in Kile I have: Tools - Mode - Normal in Okular I have: Settings- Configure-Editor (and set Editor to Kile) In Kile I have tried the buttons: PDFLatex and then ForwardPDF and also: Latex and then ForwardPDF. both bring up PDF in Okular, but SHIFT/leftClick does not do an inverse search. A bug in Kile? in Okular? in 12.04? in me? I'm using a System76 Pangolin P8. Thanks for any help

    Read the article

  • Ubuntu Gnome 14.04 - 100% CPU usage alternating between cores

    - by AwDeOh
    I've noticed my Ubuntu Gnome 14.04 has been getting a bit sluggish lately - things like Gnome Shell overview animation are jerky where they were lightning fast, Elder Scrolls Online is stuttering and dropping to low FPS where I previously had a solid 50-60 fps. Out of interest I looked at the CPU History, and when running nothing but the system monitor, I was getting this: That was 15 minutes ago. The 100% load seemed to be alternating between the cores. PC specs: i3 2130 processor. 8gb DDR3 RAM. ASUS P8-Z77M motherboard. Samsung 128gb SSD I've been trying to reproduce the problem, and while I'm not getting the 100% any more at idle, the system monitor is showing an average load of about 20-30%, that's with just Chrome and the System Monitor open. Oddly, if I touch nothing, it'll average out to about 20% - if I start moving the mouse around and do some typing, it's closer to 40%. Is this normal? Any help appreciated, I wouldn't even know where to start here..

    Read the article

  • sometimes, strange audio distortion(peeping, scratching), ubuntu 12.04

    - by richi902
    i have a problem with my sound in ubuntu 12.04. the problem is, that sometimes out of nowhere, when switching songs, or playing youtube videos, changing volume with my keyboard buttons, that the sound gets distorted(peeping, scratching). i dont know if it is related, but when i skip through music in rythmbox, there is also a little scratching noise. i can sometimes temporarly fix it: for youtube videos, i refresh the page, and sometimes it works agian normal, mostly not. for audio playback with rythmbox, i have to pause the song for sometime, and resume it, and hope that it works. before all that,i have changed my soundcard to "Analog Surround 5.1" in the sound settings from ubuntu, but i also used alsamixer to change it from 2 channels to 6 channels, since changing in ubuntu sound settings alone wasnt enough to make the other speaks work. i use a ASUS P8-H61-M LE B3 Revision Motherboard. which has a built in surround soundcard.

    Read the article

  • Kohana 3 - custom route

    - by pigfox
    I'm trying to create a custom route like:search/result/city/p1/state/p2/zip/p3/min/p4/max/p5/bed/p6/bath/p7/cats/p8/dogs/p9/parking/p10 Where search is the controller and result the action p1-p10 are variables.

    Read the article

  • How to debug .NET error logged in an Event Viewer ?

    - by PaN1C_Showt1Me
    Hi I found out that my application causes some errors which are logged in an Event log. It states: NET Runtime 2.0 Error EventType clr20r3, P1 *****.exe, P2 1.0.0.0, P3 4b2a572f, P4 system.web.services, P5 2.0.0.0, P6 4889df18, P7 bc, P8 65, P9 system.net.webexception, P10 NIL. How can I find out what's going on? I've tried that app locally and everything works fine.

    Read the article

  • build single file application

    - by Neir0
    Hello. I am trying to merge two files. One of them is .net3.5 wpf application and other is WPF notify icon dll i use the following command: IlMerge /target:winexe /out:PS.exe "PlayerSearcher.exe" "Hardcodet.Wpf.TaskbarNotification.dll" But when i launch result assebmly my application is crashed with this error EventType : clr20r3 P1 : ps.exe P2 : 1.0.0.0 P3 : 4c0ee52f P4 : presentationframework P5 : 3.0.0.0 P6 : 4938d608 P7 : 9a1 P8 : 46 P9 : system.io.ioexception Why? And how i can to build a single file application?

    Read the article

  • windows service application run fine on windows XP but crashes on windows7

    - by Abbas Siddiqui
    I am sorry If my question asked before, I search extensively but didn't found. If present please post the link of that question. I have developed windows service that works fine on windows xp , when I installed it on windows7 it installed and works fine for few minutes, after that is crashes and gives the following error message. has stopped working windows is checking for the solution to the problem. the log entry is as follows Fault bucket 1155193276, type 5 Event Name: CLR20r3 Response: Not available Cab Id: 0 Problem signature: P1: windowsserviceapp.exe P2: 1.0.0.0 P3: 4bf29a85 P4: System.Windows.Forms P5: 2.0.0.0 P6: 4a275ebd P7: 16cf P8: 159 P9: System.ComponentModel.Win32 P10: Attached files: C:\Users\DELL\AppData\Local\Temp\WERF98D.tmp.WERInternalMetadata.xml These files may be available here: C:\Users\DELL\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_windowsserviceap_89ea5da5168ff1535681aa613b5f7bf2b1636dc_111d24f1 Analysis symbol: Rechecking for solution: 0 Report Id: 24dc8c83-62a1-11df-b1ee-00271352d813

    Read the article

  • VSTS2010 crashes on opening the team explorer->My queries node

    - by vstsuser
    VSTS2010 crashes on opening the team explorer-My queries node this does not repeat if MSN office communicator (2007 R2 version) is exited. the issue occurs only if MSN office communicator is up and running. (no issues reported by communicator though) Any help in this regard? Debug log: Unable to cast COM object of type 'CommunicatorAPI.MessengerClass' to interface type 'MessengerAPI.IMessenger2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{....}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)). Windows event log EventType clr20r3, P1 devenv.exe, P2 10.0.30319.1, P3 4ba1fab3, P4 microsoft.teamfoundation.collaboration.microsoft, P5 10.0.0.0, P6 4c7d8ce4, P7 49, P8 0, P9 system.invalidcastexception, P10 NIL.

    Read the article

  • A Nondeterministic Engine written in VB.NET 2010

    - by neil chen
    When I'm reading SICP (Structure and Interpretation of Computer Programs) recently, I'm very interested in the concept of an "Nondeterministic Algorithm". According to wikipedia:  In computer science, a nondeterministic algorithm is an algorithm with one or more choice points where multiple different continuations are possible, without any specification of which one will be taken. For example, here is an puzzle came from the SICP: Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment housethat contains only five floors. Baker does not live on the top floor. Cooper does not live onthe bottom floor. Fletcher does not live on either the top or the bottom floor. Miller lives ona higher floor than does Cooper. Smith does not live on a floor adjacent to Fletcher's.Fletcher does not live on a floor adjacent to Cooper's. Where does everyone live? After reading this I decided to build a simple nondeterministic calculation engine with .NET. The rough idea is that we can use an iterator to track each set of possible values of the parameters, and then we implement some logic inside the engine to automate the statemachine, so that we can try one combination of the values, then test it, and then move to the next. We also used a backtracking algorithm to go back when we are running out of choices at some point. Following is the core code of the engine itself: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Public Class NonDeterministicEngine Private _paramDict As New List(Of Tuple(Of String, IEnumerator)) 'Private _predicateDict As New List(Of Tuple(Of Func(Of Object, Boolean), IEnumerable(Of String))) Private _predicateDict As New List(Of Tuple(Of Object, IList(Of String))) Public Sub AddParam(ByVal name As String, ByVal values As IEnumerable) _paramDict.Add(New Tuple(Of String, IEnumerator)(name, values.GetEnumerator())) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(1, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(2, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(3, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(4, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(5, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(6, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(7, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(8, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Sub CheckParamCount(ByVal count As Integer, ByVal paramNames As IList(Of String)) If paramNames.Count <> count Then Throw New Exception("Parameter count does not match.") End If End Sub Public Property IterationOver As Boolean Private _firstTime As Boolean = True Public ReadOnly Property Current As Dictionary(Of String, Object) Get If IterationOver Then Return Nothing Else Dim _nextResult = New Dictionary(Of String, Object) For Each item In _paramDict Dim iter = item.Item2 _nextResult.Add(item.Item1, iter.Current) Next Return _nextResult End If End Get End Property Function MoveNext() As Boolean If IterationOver Then Return False End If If _firstTime Then For Each item In _paramDict Dim iter = item.Item2 iter.MoveNext() Next _firstTime = False Return True Else Dim canMoveNext = False Dim iterIndex = _paramDict.Count - 1 canMoveNext = _paramDict(iterIndex).Item2.MoveNext If canMoveNext Then Return True End If Do While Not canMoveNext iterIndex = iterIndex - 1 If iterIndex = -1 Then Return False IterationOver = True End If canMoveNext = _paramDict(iterIndex).Item2.MoveNext If canMoveNext Then For i = iterIndex + 1 To _paramDict.Count - 1 Dim iter = _paramDict(i).Item2 iter.Reset() iter.MoveNext() Next Return True End If Loop End If End Function Function GetNextResult() As Dictionary(Of String, Object) While MoveNext() Dim result = Current If Satisfy(result) Then Return result End If End While Return Nothing End Function Function Satisfy(ByVal result As Dictionary(Of String, Object)) As Boolean For Each item In _predicateDict Dim pred = item.Item1 Select Case item.Item2.Count Case 1 Dim p1 = DirectCast(pred, Func(Of Object, Boolean)) Dim v1 = result(item.Item2(0)) If Not p1(v1) Then Return False End If Case 2 Dim p2 = DirectCast(pred, Func(Of Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) If Not p2(v1, v2) Then Return False End If Case 3 Dim p3 = DirectCast(pred, Func(Of Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) If Not p3(v1, v2, v3) Then Return False End If Case 4 Dim p4 = DirectCast(pred, Func(Of Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) If Not p4(v1, v2, v3, v4) Then Return False End If Case 5 Dim p5 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) If Not p5(v1, v2, v3, v4, v5) Then Return False End If Case 6 Dim p6 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) Dim v6 = result(item.Item2(5)) If Not p6(v1, v2, v3, v4, v5, v6) Then Return False End If Case 7 Dim p7 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) Dim v6 = result(item.Item2(5)) Dim v7 = result(item.Item2(6)) If Not p7(v1, v2, v3, v4, v5, v6, v7) Then Return False End If Case 8 Dim p8 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) Dim v6 = result(item.Item2(5)) Dim v7 = result(item.Item2(6)) Dim v8 = result(item.Item2(7)) If Not p8(v1, v2, v3, v4, v5, v6, v7, v8) Then Return False End If Case Else Throw New NotSupportedException End Select Next Return True End FunctionEnd Class    And now we can use the engine to solve the problem we mentioned above:   Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Sub Test2() Dim engine = New NonDeterministicEngine() engine.AddParam("baker", {1, 2, 3, 4, 5}) engine.AddParam("cooper", {1, 2, 3, 4, 5}) engine.AddParam("fletcher", {1, 2, 3, 4, 5}) engine.AddParam("miller", {1, 2, 3, 4, 5}) engine.AddParam("smith", {1, 2, 3, 4, 5}) engine.AddRequire(Function(baker) As Boolean Return baker <> 5 End Function, {"baker"}) engine.AddRequire(Function(cooper) As Boolean Return cooper <> 1 End Function, {"cooper"}) engine.AddRequire(Function(fletcher) As Boolean Return fletcher <> 1 And fletcher <> 5 End Function, {"fletcher"}) engine.AddRequire(Function(miller, cooper) As Boolean 'Return miller = cooper + 1 Return miller > cooper End Function, {"miller", "cooper"}) engine.AddRequire(Function(smith, fletcher) As Boolean Return smith <> fletcher + 1 And smith <> fletcher - 1 End Function, {"smith", "fletcher"}) engine.AddRequire(Function(fletcher, cooper) As Boolean Return fletcher <> cooper + 1 And fletcher <> cooper - 1 End Function, {"fletcher", "cooper"}) engine.AddRequire(Function(a, b, c, d, e) As Boolean Return a <> b And a <> c And a <> d And a <> e And b <> c And b <> d And b <> e And c <> d And c <> e And d <> e End Function, {"baker", "cooper", "fletcher", "miller", "smith"}) Dim result = engine.GetNextResult() While Not result Is Nothing Console.WriteLine(String.Format("baker: {0}, cooper: {1}, fletcher: {2}, miller: {3}, smith: {4}", result("baker"), result("cooper"), result("fletcher"), result("miller"), result("smith"))) result = engine.GetNextResult() End While Console.WriteLine("Calculation ended.")End Sub   Also, this engine can solve the classic 8 queens puzzle and find out all 92 results for me.   Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Sub Test3() ' The 8-Queens problem. Dim engine = New NonDeterministicEngine() ' Let's assume that a - h represents the queens in row 1 to 8, then we just need to find out the column number for each of them. engine.AddParam("a", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("b", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("c", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("d", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("e", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("f", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("g", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("h", {1, 2, 3, 4, 5, 6, 7, 8}) Dim NotInTheSameDiagonalLine = Function(cols As IList) As Boolean For i = 0 To cols.Count - 2 For j = i + 1 To cols.Count - 1 If j - i = Math.Abs(cols(j) - cols(i)) Then Return False End If Next Next Return True End Function engine.AddRequire(Function(a, b, c, d, e, f, g, h) As Boolean Return a <> b AndAlso a <> c AndAlso a <> d AndAlso a <> e AndAlso a <> f AndAlso a <> g AndAlso a <> h AndAlso b <> c AndAlso b <> d AndAlso b <> e AndAlso b <> f AndAlso b <> g AndAlso b <> h AndAlso c <> d AndAlso c <> e AndAlso c <> f AndAlso c <> g AndAlso c <> h AndAlso d <> e AndAlso d <> f AndAlso d <> g AndAlso d <> h AndAlso e <> f AndAlso e <> g AndAlso e <> h AndAlso f <> g AndAlso f <> h AndAlso g <> h AndAlso NotInTheSameDiagonalLine({a, b, c, d, e, f, g, h}) End Function, {"a", "b", "c", "d", "e", "f", "g", "h"}) Dim result = engine.GetNextResult() While Not result Is Nothing Console.WriteLine("(1,{0}), (2,{1}), (3,{2}), (4,{3}), (5,{4}), (6,{5}), (7,{6}), (8,{7})", result("a"), result("b"), result("c"), result("d"), result("e"), result("f"), result("g"), result("h")) result = engine.GetNextResult() End While Console.WriteLine("Calculation ended.")End Sub (Chinese version of the post: http://www.cnblogs.com/RChen/archive/2010/05/17/1737587.html) Cheers,  

    Read the article

  • Very slow write access to SSD disks on some Asus P8Z77 motherboards

    - by lenik
    I have Asus P8Z77-V LK motherboard, that ran Mint 13 (based on Ubuntu 12.04) just perfectly, but recently I've tried to install Mint 17 and noticed abysmal write performance. Write speed on SSD disk was about 1.5MB/sec, when it's supposed to be in 150-250MB/sec range. For write testing I've used dd if=/dev/zero of=/dev/sda bs=10M count=10 while booted up from LiveCD. I have also tested the read speed with hdparm -tT /dev/sda and got about 440MB/sec -- that's normal. I can tell, the read performance has not degraded at all and is not an issue here. Since I had a few different SSD disks and few motherboards, I've tested and tested and here are results: Asus P8H77 works fine with Mint13, has very slow write speed starting from Mint14. Asus P8Z77-V LK works with Mint13, has very slow write speed starting from Mint14. Asus P8Z77-V PRO works with Mint13, and works just fine with Mint14, 15, 16 and 17. The only difference between "PRO" version and others is that it has extra SATA controller onboard (in addition to the Z77 chipset SATA controller) providing extra 2 SATA ports. SSD disks work fine with "PRO" version when connected to the native SATA ports as well as to the ports provided by extra SATA controller, so this does not look like a hardware issue. As far as I can tell, there's something changed in the kernel while going from 3.2 to 3.5, that affects the detection of onboard SATA controller for Asus P8*77 motherboards, that screws up the write speed for SSD drives. Could anyone shed some light on how to fix this issue or, possibly, give a pointer to a more suitable place to ask this question?

    Read the article

1 2  | Next Page >