Posts

dependency injection - Java Weld CDI alternative Factory -

A factory to me in my production code, the factory should be fun in my test code. I have to apply to both the interface, which factories: public interface FtpTransferFactory {FtpTransfer createFtpTransfer (string host, string machine); } Production code: default public class implements FtpTransferFactoryImpl FtpTransferFactory {public FtpTransferFactoryImpl () {} @ Override public FtpTransfer createFtpTransfer (final String host, final String Machine) {return new FTP transfers ( ); // some real FTP transfer object}} Test code: @Alternative implements public square FtpTransferFactoryTestImpl FtpTransferFactory {@Override public FtpTransfer createFtpTransfer (String host , String machine) {return ...; // Some real FTP transfer objects, with different settings (test env)}} Beans located on soya / test / resources. In XML: & lt; Options & gt; & Lt; Classes & gt; Engine.FtpTransferFactoryTestImpl & lt; / Square & gt; & Lt; / Options & gt...

rspec - A struggle about TDD(BDD) in rails -

I am new to Ruby on Rail Development. I have read a book called Ruby on Rail Tutorial written by Michael Hart, who writes a test before implementing the function using RSPC. Although I do not think this is a good idea, it's a good idea. Since I already know what the content should contain in the page, I should write the code like these unnecessary stuff, 'It should be ...' I plan to write a blog to practice my rail skills But I suspect that I should write TDD or BDD and it will bring me some benefit value Take that you have a big app and many developers can apply this application Connections are concurrently contribute. Apart from this, you have hundreds of modules and they have validation and calculation and all of them are very many. Will you test it manually and will the test be completely enough? Here the place where TDD is really important with automation, I have become like you once and still (my part). But from time to time, I realize that I can not fully ...

popup - iOS 8 : Keyboard Extension. Issue with adding pop up of keys -

Image
I am creating my keyboard extension app and added a key pop animation to the button on the user's tap on it. It works fine for the inside image but the top line image is hidden for the pop up area because this subview clips. I tried with the ClothBond property and set it as incorrect. But still no one is working, does anyone have any idea how to fix this? Adding a subview on supervision also does not work Image A is showing correct pop up because it has a frame inside the keyboard. The image is wrong as the pop-up clip inside the B frame. Anything outside the view is allowed to be displayed; It will be cleared automatically.

python - Difference between flask.ext.openid and flask_openid? -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मैं एक वेबसाइट बना रहा हूँ (भयानक!) फ्रेमवर्क का उपयोग करके, और इसके लिए मैं कभी-कभी एक्सटेंशन का उपयोग करता हूं ट्यूटोरियल में यह हमेशा कहता है कि आपको इसे कुछ (ओपनआईड के मामले में) का उपयोग करके आयात करना होगा: आयात करें ओपनआईडी लेकिन मैं हमेशा निम्न का उपयोग करता हूँ: flask_openid आयात से ओपनआईडी क्या दोनों के बीच कोई अंतर है? और यदि हां; जो एक बेहतर है और क्यों? वे समान हैं, लेकिन। यदि आप फ्लास्क प्रलेखन को देखते हैं: फ्लास्क flask.ext नामक एक रीडायरेक्ट पैकेज को सेट करता है जहां उपयोगकर्ताओं को एक्सटेंशन को आयात करना चाहिए। यदि आपके पास उदाहरण के लिए flask_something नामक एक पैकेज है, तो इसे flask.ext.something के रूप में आयात करेगा यह पुराने नामस्थान पैकेज से संक्रमण के लिए किया जाता है। और यहां: फ्लास्क एक्सटेंशन को उपयोगकर्ताओं को flask_foo या flaskext_foo के बजाय flask.ext.foo से आयात करने का आग्रह करना चाहिए इसलिए नए पैकेज नाम शैली का उपयोग करना बेहतर है: तो आपको इसका उपयोग करन...

python - How to make a while loop exit when user enters a certain string? -

I am conducting a survey that asks the user about age, gender, etc., using a time-lapse Tax. If the user enters some stars like "cya" or "bye", then what is the procedure to exclude the program from the loop? I know that I can make a one-statement after every input, but is there a quick / easy way to do this? Example of what I want to achieve: while (the user has not entered "cya"): age = int (input ("how old?" Edit): This example was too small, but the survey I am doing is too long, so every test variable takes a lot of time. is. I think the easiest way to do a survey is to list all your questions, and then Use it to make dictionary of all your user details. Answer: If not in the answer ("Bye," "CA"), the answer is: "Question" [= (["gender", "What is your gender?"), Response = "" Feedback = Response to Input ("Bye", "CA"): Brake Details [Description]...

html - How to replace input text tag into plain text of it's value using C# regex? -

मेरे पास html स्ट्रिंग है & lt; td AutoTab = "true" compulsory = " सच "मान्यकरण समूह =" OU20141008-0001 "वर्ग =" bn_TextBox bn_TextBox_com i "class =" r "& gt; & Lt; span id = "निश्चित ग्रिड 1__txtSUPPLY_AMT_0_Container" & gt; & LT; इनपुट ऑटोटैब = "true" अनिवार्य = "true" ValidationGroup = "OU20141008-0001" class = "bn_TextBox bn_TextBox_com आर IME-विकलांग" नाम = "FixedGrid1 $ ctl11 $ _txtSUPPLY_AMT" type = "text" मान = "900000" केवल पढ़ने के लिए = "पठनीय" आईडी = "फिक्स्ड ग्रिड 1 __टीक्स्ट एसयूपीएलवाई_एएमडी 0" शैली = "रंग: 0; पृष्ठभूमि रंग: 0; चौड़ाई: 96%;" / & Gt; & Lt; / span & gt; & Lt; / td & gt; & lt; td वर्ग = "आर" & gt; & Lt; span id = "फिक्स्ड ग्रिड 1__txtM_AMT_0_Container"> gt; ऑटोटैब = "सच" वर्ग = "bn_TextBox r ime- अक्षम...

Spring Integration : How to know whether two and more interfaces are succeed and allow business logic go on next step? -

I am doing some integer integration for other systems and using Spring Integration. What I want to achieve is like the following: System :: A -> B - & gt; CA?? A - & gt; B. Are each seven integrated one ?? ¡B is to check whether it receives all 7 integration data. ¢ ¢ Then B should decide to remove the data that were derived from those figures. at a time ?? ¡, I can not find a way to apply it with Spring Integreton at first glance, I thought I could just make it with aggregator pattern but now, I can not make sure of traffic and how to check the logic . Please give some advice to make these things with spring integration. I want to avoid the method of implementing with hardcoding: release-strategy-expression = "size () == 7" / code>. If you need more sophistication than that, then you will need to implement a custom release strategy.