Exception Reason:1, wrote a cycle of death, this is the most likely.2, the operation of large data volume, resulting in the status of suspended animation.Solution: Managed Debug Assistants in Debug---Exceptions, remove ContextSwitchDeadlock a front hook.Exception information: The CLR cannot convert from COM context 0x645e18 to COM context 0x645f88, which has lasted for 60 seconds. The thread that owns the target context/unit is most likely to perform
1.WPF multithreaded Modification UI Example:// Start thread Modify UI, throw exception ThreadPool.QueueUserWorkItem ((q) += {" Zhang San "null);Solution: Modify the UI by using the Dispatcher.begininvoke+ delegate methodEncapsulating code that modifies the UI in a delegate// Start thread processing New true; // set to a background thread, the background thread exits automatically when the main thread ends, otherwise the program cannot end Thread1. Start ();//threading methods, modifying butt
Let's look at the code first:var s = "Test"; var len=s.length;We know that the string declared in JavaScript like above is not an object, but since S is not an object, why is there a property of length?The reason is that in JavaScript, whenever you reference a property of a string (numeric, Boolean, and so on), JS converts the string to an object by calling new string (s), which inherits the string's method and is used to handle the property's reference. Once the attribute reference is finished,
1. Create a complextype.xsd file under the D:/xml practice directory2. Download the XJC tool, which can be downloaded at the following link:http://download.csdn.net/detail/u013998070/85696673. Open the command line and adjust to the bin directory of the XJC ToolkitIf you do not know what you need to enter, you can simply enter the XJC command to view it, as followsAfter you clear the relevant commands, enter the following instructions to generate the target Java codeThe schema that
I tried some of the methods offered online, and finally I solved some problems with SQL.
1 Select the problematic database in the Query Analyzer and enter:Exec sp_configure ' allow updates ', 1--Allows the system tables to be updated.
Reconfigure with OVERRIDE
2. Run the following SQL statement:UPDATE sysobjects Set uid=1--all objects in the database are assigned to the user dbo
3. Execute the following SQL statement:
Exec sp_configure ' allow updates ', 0--Shutdown system Table update
Re
SQL database user cannot delete, prompting "the user cannot be dropped because the selected user owns the object" workaroundDue to the error of the MSSQL200 database, I restored an original database to the current SQL, at this time I came to the user, want to restore the user deleted, but the result is prompted "because the selected user has an object, so the user cannot be removed"Because PB automatically establishes the table with the logged-in user
Error: The calling thread cannot access this object because another thread owns the objectMain window Create thread, multithreading cannot call control directlyThe thread created by the main window Public MainWindow () { InitializeComponent (); New Thread (listenchange); T.start (); }Line Cheng: Public void Listenchange () { // Create a ListView item is not written, here is just an example of
Title, when a WPF child thread accesses the UI thread, assigns a value to the UI's control, and if it does not, it reports the exception: "The calling thread cannot access this object because another thread owns the object." ”The solution is as follows: // method One this. Dispatcher.invoke (Action)delegate() {// your code }); // Method Two App.Current.Dispatcher.Invoke (Action)delegate(
Error When deleting a user:
MSG 15138, level16, state 1, line 1
The Database Principal owns a schemain the database, and cannot be dropped.
Solution (SSMs ):
1. Find the user's schema
2. Find the db_owner In the schema and change the schema owner from test6 to DBO or another user.
3. delete user test6
Or use the following statement to delete the file:
--- Query the schema owned by user test6 as db_owner
Use DBA;
Select
successful. You think people are casual, in fact, it is not so. There are things that you can see only by standing on that level.In this world, there is no shortage of wise people, but wise men.6.What I want to say is that good things are always fought and sacrificed to get.Will all the good things in the world be automatically put into your arms? Will the pie in the sky just fall into my open mouth? Especially the poor people like me, my competitors are the strength of my rich, they stand high
Tags: Database SQL Server 2008When using SQL Server to Do data mining, the user can not access the problem, so to the corresponding database add a login user Zhang, and give the appropriate permissions. When debugging, found that there is still a problem, so want to delete this user Zhang, and create a new user. An error message appears : The database principal has a schema in the database and cannot be deleted. (Microsoft SQL Server, error : 15138) Solution:Delete the schema for this user, an
ServerCodeThe function and bind dependent on boost are used for callback. This type of down Machine occurs during asynchronous calls. Let's talk less about the Code:
VoidFN (STD ::StringStr );Char* Temp_str =New Char[24]; Strcpy (temp_str,"1212");Boost: function f=Boost: BIND (FN, temp_str );F ();
The f function object here stores a temp_str pointer. If it is
1. Overview
Generally, most of the types we create for receiving errors are declared as follows:
boost::system::error_code error
We use this type to accept Errors generated in functions, such:
socket.connect(endpoint, error);
If the connection fails, the error type will be saved to error. For example, if the connection to the host fails, this error may be returned.
boost::asio::error::host_not_found;
If (er
, which ensures that it is initialized during compilation rather than runtime. So there is no problem with multiple threads initializing it at the same time. The Boost line threading provides boost::call_once to support "one implementation" and defines a flag Boost::once_flag and a macro boost_once_init that initializes the flag. List6 is an example of using
It has been several years since I started to get started with boost, but it is hard to get familiar with it. The analysis of some of its source code is also a bit of water. Have time to sort it out.1. Overview
[Boost] C ++ boost library Introduction[Boost] list of C ++ boost
Boost. asio Study Notes 1. Installation of the boost library in linux, boost. asioboost
You are welcome to reprint it. Please enter the original address for reprinting.: Http://blog.csdn.net/majianfei1023/article/details/46761029
The first step to learn about open-source libraries is to compile and install the libraries, and then run a demo to complete subsequen
Compile wxWidgets and boost in windows and add them to the codeblocks path (Visual C ++ 2008/mingw32)Compile wxWidgets1, to the official website to download the source package (MSW), install to X: \ wxwidgets-x.x.xxx2. Install visual c ++ express 2008 or install mingw32 (we recommend that you download http://tdm-gcc.tdragon.net/to automatically update the environment variable)3. Use the console provided by VC (the system is not available, and the syst
0 Abstract
There is always a saying that to become a master, you must read more highly handwritten source code. Which codes are good materials? C ++ standard library source code? No, if you have read it, you will find that either a variety of expressions that are unique to implementation are confusing, or a horrible code style (such as an underline everywhere) is uncomfortable. The Boost library code is quite clear, reasonable comments, and naming con
Boost-Getting Started Guide and boost Getting Started Guide
What is boost
The boost library is an open-source and free third-party library. It is a very good library and one of the best practices of the C ++ standard. Therefore, it is often used for commercial development. Therefore, if you are engaged in C ++ and have
unique lock
# Include
# Include
# Include
# Include
# Include
Using namespace STD;
Static boost: mutex G_m;
Void F (string strname)
{
Cout
For (INT I = 1; I
{
If (I % 0 xffffff = 0)
{
Boost: unique_lock
Cout
Lock. Unlock ();
}
}
Cout
}
Int _ tmain (INT argc, _ tchar * argv [])
{
Boost: thread t (F, string ("Inuyasha "));
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.