Posts

c# - Why is TransactionScope causing problems using Entity Framework? -

I have a problem relating to the scope, I know that some local transaction, probably MSDTC (I do not know too much Is about it) Other project developer (similar codebase, committed everything) implements the whole solution, but when I try to get some data from the database (always), I have the following error:. The underlying provider failed on EnlistTransaction. System.Data.Objects on System.Data.Objects.ObjectQuery`1.GetResults on System.Data.EntityClient.EntityConnection.EnlistTransaction (Transaction transaction) (System.Data.Objects.ObjectContext.EnsureConnection) (Nullable` 1 forMergeOption) .ObjectQuery`1.System.Collections.Generic.IEnumerable & LT; T & gt; .GetEnumerator () System.Linq.Enumerable.First [TSource] & LT on System.Data.Objects.ELinq.ObjectQueryProvider on (IEnumerable`1 source); GetElementFunction & gt; b__0 [TResult] System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle [TResult] on System.Data.Objects.ELinq.ObjectQueryProvider.Syste...

Disallow any member function to change its data members in C++ Class -

How can I do this? After starting the object in C ++, any member function can change the value of its data members. All members work const This is the only mechanism for the job, and It works just fine. If you also make them private , then you are completely covered. If for some reason you feel compelled to keep them safe, then things are more complicated. You will need to create a personal area const , and this will require you to start with the member initial list, or const_cast in the constructor Or maybe a temporary whistle, but I'm not sure there is such a thing.

iphone - Prevent automatic popToRootViewController on double-tap of UITabBarController -

एक UITabBarController का डिफ़ॉल्ट व्यवहार रूट निविष्ट करने के लिए निहित UINavigationController को पॉप करना है, जब किसी विशेष टैब को दूसरी बार टैप किया जाता है । मेरे पास एक विशेष उपयोग का मामला है, जहां मैं इसे स्वचालित रूप से काम न करने की इच्छा रखता हूं, और मुझे यह पता लगाना मुश्किल हो रहा है कि इसे कैसे रोकना है। क्या किसी ने इस में भाग लिया है, और यदि ऐसा है, तो क्या क्या तुमने किया? क्या मुझे UINavigationController subclass और popToRootViewController ओवरराइड करने की आवश्यकता है या क्या कोई आसान तरीका है? विधि का उपयोग करें । - (BOOL) tabBarController: (UITabBarController *) टैबबीआरसी नियंत्रक चाहिए SELECTViewController: (UIViewController *) viewController {वापसी viewController! = TabBarController.selectedViewController; } इस प्रतिनिधि विधि को वास्तव में लागू करने वाले ऑब्जेक्ट के लिए टैब बार नियंत्रक का प्रतिनिधि सेट करना भूलना नहीं है।

jquery - How to suppress jqgrid from initially loading data? -

I have a jqgrid in a modal popup in which the data is dependent on some input. I am showing the grid url options popups below based on input like: $ (container grid grid) .setGridParam ({url: urlGetContainers + 'CRALineId =' + CurrentCRALineId}). Reload grid (); When the grid is first loaded on the screen, it is not being displayed and does not need to recover the data until the modal popup is shown. Unfortunately, jqgrid still tries to request data based on its url option. I have initially tried to use the hiddengrid property to hide / shrink the grid, which also keeps it from requesting it does not work for the data, however, because it shows me the grid There was no programmatic way to expand / expand Is there a way to suppress jqgrid by initially loading data? Start your grid in the 'show' event of the modal popup. You can dynamically generate jqGrid and insert it into the DOM, and then you can tie the data late by using the normal initialization ...

internationalization - Turkish case conversion in JavaScript -

I would like to convert the string in local to Javascript in lower or upper case. I think the standard code like toUpperCase () and toLocaleUpperCase () do not meet this requirement toLocale functions do not behave as much as they want. For example, in Safari 4, Chrome 4 Beta, Firefox 3.5.x on my system incorrectly converts the wire with this Turkish characters. Answer Browsers Navigator.Language as "en-US" , "tr" , "en-US" respectively. But there is no way to get the user's approved-lang settings in the browser, as far as I could. Only Chrome gives me the "tr" , although I have preferred every browser Turkish locale. I think these settings only affect the HTTP header, but we do not access these settings via javascript Can. It says Characters change within a string ... For the majority of languages ​​while respecting the current locale, it will return the same way ... I think it is valid for Turkey, it is no differe...

wpf - How to bind ScaleTransformation.X to slider in Silverlight 3 -

I need to zoom the canvas. It is possible to tie the scale transformation.x in the WPF slider. Value I'm not able to do this in Silverlight - some errors. Is it supported in SL3? Thank you. The reason it does not work is that it is in the SL3 binding target framework element should be. (This restriction has been raised in SL4, but it does not help right now). However the solution only takes a little back-thinking (or backward thoughts in this case). If the source object does not need the framework element then the answer is binding, which puts the binding on the slider value property and put it in the two mode gives. & lt; Border width = "200" height = "200" & gt; & Lt; Border.RenderTransform & gt; & Lt; ScaleTransform x: name = "goal conversion" /> & Lt; /Border.RenderTransform> & Lt ;! - Here's some content - & gt; & Lt; / Border & gt; & Lt; Slider value = "{Binding...

php - Detecting if integer can be written as sum of given integers -

Understand that I'm 3,5,610,10 constant, with the number of words at least one of these constants As a yoga, how can you know how to write $ n? Example $ n = 10, S = 10 $ n = 18, S = 9 + 9 $ n = 24, S = 9 + 9 + 6 $ n = 27, S = 9 + 9 + 9 $ n = 28, S = 10 + 9 + 9 thanks