Posts

WAS 6.1, Hibernate, Spring and transaction managmement configuration -

I am using websphere application server express v6.1 and I am writing an application that is a spring 2.0.7 Uses, Hibernate 3.5 My dataset is Oracle 10G. I have 2 questions Which is the best transaction manager? Is Websphere or Hibernate? If IBM is answering then how do I configure it in spring configuration XML? This is my current declaration for hibernate & lt; Bean id = "transaction manager" category = "org.springframework.orm.hibernate3.HibernateTransactionManager" & gt; & Lt; Property Name = "sessionFactory" ref = "rmsSessionFactory" /> & Lt; / Bean & gt; What does this look like for Websphere? You should pip your transaction through JTA, even if you have a different implementation behind the scenario Using (Hibernate, webpage, weblogic, etc.) Ideally, it should look like this: & lt; Bean id = "transactionImpl" class = "org.springframework.transaction.jta.WebSphereTransact...

regex - Using map() to get number of times list elements exist in a string in Python -

How often am I trying to get every item in a string in Python in a list: / Code> returns [2, 0, 0] What I have to do but extend it, so I can feed the paragraph value in the map ( ) Function. Now, the tester () function has a hard paragraph, is there any way to do this (maybe make an en-long list of paragraph values)? Any other ideas here? Keep in mind that at any given time in the future, one of the array values ​​will be weighing - so instead of keeping the prices in the list, all need to keep together. / P> Update: Article will often be 20K and the list will often have 200+ members. My thinking is that the map runs in parallel - so it will be more efficient than any serial methods. There is a reaction to the movement of targets ("I probably need reazes because I have a near future Word delimiter will be required "): This method parses text to get a list of all times" word ". Each word is seen in a dictionary of the target words, and if it...

filter - Best data structure for search? -

I have a list with items where each has the number of properties (A, B, C, D) Filter (A, B, C, D) using the template with the same feature I want when I use a template I would like to filter all items that match this template. The match is assumed that if the item is equal to the template or after the smaller (matches 0 items). Example Data ABCD 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Example templates [2 0] will filter {0 0], [2 0]} [2 0 2] will filter {[0], [2] 0], [2 0 2]} [2 0 2] will filter {{0], [2 2 2 1]} [3 4 5 6] filter will [0]} [0 0] filter {[0], [0], [2 0 2], [02 0]} The problem is that the number of comparisons easily reach 300k And sometimes it can be slow, what can I use to make things quicker? Any ideas? Keep all items in 16 buckets, assuming 4 properties. The first bucket, where there is no zero-value for the properties. Selecting from here - General Lookup based on Key ABCD The second bucket is where property A == 0. Selecting from here is a lo...

windows - OpenCV videos across platform -

I am writing a video on Linux machine using OpenCV . I want to read the same video on Windows machine using OpenCV I am not able to use the standard codec provided in openCV . Can someone suggest how can I read / write videos in two platforms? OpenCV wiki directly addresses this issue. Unfortunately, only codec 'DIB' supported on all three platforms (Linux, Windows and OSX) are 'I420' and 'IUUUV', which are all uncompressed video codecs and thus really create large file sizes. Also lists some codecs in the wiki which can work on any two platforms, but not all three. If you decide to use uncompressed video files, you can convert them to something with a small file, like they are on your windows machine just like the program. Edit: FYI, I have given OpenCV output in Motion-JPEG, and then I would like to correct a bug with the movie's index Use virtualdube to retrieve directstream copy mode. These M-JPEG video files then play on Mac and W...

rails renaming associations -

मेरे पास दो मॉडल, ट्रीएनोड और यूज़र हैं I प्रत्येक उपयोगकर्ता has_one TreeNode, जो कि पेड़ की जड़ है। वर्ग ट्रीएनोड कृत्यों_स_ट्री संबंधित_तो: उपयोगकर्ता के अंत वर्ग उपयोगकर्ता has_one: tree_node end मैं यह सेटअप करना चाहूंगा ताकि रेल संघ को बनाये, ताकि मैं कुछ ऐसा कर सकूं user.first.tree के बजाय एक ऐसा करने के बारे में क्या होगा? है_one: पेड़,: class_name = & gt; "ट्रीएनोड" ध्यान रखें, यह user_id नामक एक विदेशी कुंजी को tree_nodes तालिका में मानता है। संपादित करें : यदि वह काम नहीं कर रहा है, तो आप शायद को विदेशी कुंजी ( : foreign_key = & gt ;: user_id ) निर्दिष्ट करने की आवश्यकता हो, लेकिन मुझे ऐसा नहीं लगता।

c# - Pass Additional ViewData to a Strongly-Typed Partial View -

I have a firmly typed partial view that takes the product image and when it is provided I I would like to provide additional extravagance which I've dynamically created in the page I created. In partial view with RenderPartial call, how can I easily pass both my typed object and my custom watchdata? var index = 0; Forchcha (images in the model, picture .orderbie (p = & gt; p. Oder)) {html.renderpartial ("product image", image); // & lt; Pass the 'index' from the partial index ++; Renderpartal takes another parameter that is only a ViewDataDictionary. You are almost there, just call it like this: HTML. Renderparty ("Product Image", Image, New ViewDataTine {{"Index", Index}}); Note that this will override the default view, which is by default all your other views. If you are adding ViewData to something, it will not be in this new dictionary that you are going through your partial view.

How to initialize a ASP.NET User Control With parameter? -

For example, I have a labeled user control (SSCX), I will use the user control in my aspx. Page. How do I cross a string value on the Essex page, so that in the beginning it can be displayed in the Essex page label? add it ... whatever the public string (Return label.text;} set {label.Text = value}}} Then from the page you are putting it for your esx control, you will ... usercontrol.Whatever = "Text to display"; Or anyway, the ASPX and a property of the page.