Posts

regex - Does a regular expression exist for enzymatic cleavage? -

There is a regular expression for the (theoretical) cleavage of the sequences? There is a crack rule for trypsin: after r or after, but not before p. Example: Sequence of fragmentation VGTKCCTKPESERMPCTEDYLSLILNR The result should be in the sequence (s): VGTK CCTKPCI YLSLILR Note that there is no deviation after the second peptide (because PK comes after Kashmir). / P> In Perl (this can be just in C #, Python or Ruby): My $ seq = 'VGTRCCTKPESERMPCTEDYLSLILNR'; My @peptides = Split / Some Regular Expressions, $ seq; I have used around this work (where a cut marker, = inserted into the first sequence and then removed, if immediately after the p cut maker): my $ seq = 'VGTRCCTKPESERMPCTEDYLSLILNR'; $ Seq = ~ s / ([RK]) / $ 1 = / g; # Main deduction rules $ Seq = ~ s / = P / P / g; #exception. My @peptides = split (/ = /, $ seq); But this requires modification of a string which can be very long and can have millions of views. Is there a way w...

iphone - Converting between unique NSIndexPath and unique NSUInteger (or int) -

What is a better way than creating a one-by-one mapping between the NSIndexPath of the table view cell? and a unique NSUInteger or int , a specific tag cell (a UIProgressView ) link UIKit classifies methods by means of class extension, which is NSIndexPath and int , but They work less than just certain lines That's right, I can not walk in that range, but I am thinking that there is a mapping with which nobody has come, it should be guaranteed to work for any line May be. No, in fact, there is no guarantee of working for any kind of rows if you have 2 squares. With a table, with 3 billion rows in each, there is no way to map those 6 billion potential NSINXPath into 4 billion 32-bit NSINTGARS. (If you were creating a 64-bit version, bit app, this is true, but in the examples the number would be 4 billion times higher.) They added 10,000 rows in per section Use the range of; If you are seriously worried that you may have more rows than that, then you can use...

Is it possible to recursively require all files in a directory in Ruby? -

I am working on an API for which all .rb files must be loaded in their current directory and all subdirectories. Currently, I am entering a new requirement for every file I add, but I want to create it where I only have to put one of the sub-directories and it will be automatically added. . Is there a standard order to do this? In this case, all the files are being loaded under the lib directory: Dir ["# {File.dirname (__ file __)} / lib / ** / *. Rb"]. Each {| F | Load (F)}

orm - How to query a date in HQL (Hibernate) with Joda Time? -

I'm sure anyone is familiar with HQL (I'm a newbie myself) can easily answer this question . In my Grails application, I have the following domain class. class book {org.joda.time.DateTime releaseDate // I use PersistentDateTime to continue through hibernate (which is a DATETIME type in my HQL query, I I want to retrieve the books which are included in the date range of the release date1 .. date2 Date Book date 1, Date 2 ... def queryStr = "Book with 'b * where b.releaseDate & gt; $ date1 and B.releaseDate & lt; $ date2" def res = Book.executeQuery (queryS Tr) but I have exceptions ... due to: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: error token digits in date format ( For example 2009-11-27T21: 57: 18.010 + 01: 00 or no thank you V 27 22:01:20 CET 2009 ) I also tried to convert date 1 to a date range without success So what is the correct HQL code? Do I use a pattern format method to specify ...

Code review tool for Aptana and Tortoise? -

I have seen some links on this subject, but none of our status: We use apatata for coding and deployment, and the turtle is put back in the SVN hosted by Unfuded. I would like a simple way of reviewing the remote, asynchronous code - going through the check in code and commenting, asking questions, etc. Suggestions? Users either code strikers or trac with the CodeReview plugin / Html>

php - extreme ajax implementation in web service? -

If someone wants to create a website that works like a desktop software, it is not better if you are a page Use and use AJAX Recover all other php-files and update the contents of the current page with examples. Jquery? I mean, just one page, you get the idea of ​​my question which I think ... Is this a recommendation? Similarly, Meebo, Gmail, etc. do so, so obviously there are cases of legitimate use. Note that they have versions that work without JavaScript, to avoid loosing the audience ...

How do I move and scale properly in ActionScript? -

फ़ंक्शन स्केल (ई: इवेंट): शून्य {plane1_mc.scaleX + = .1; Plane1_mc.scaleY + = 1; Plane1_mc.x - = 5; Plane1_mc.y - = 3; } फ़ंक्शन प्रोप (ईवीटी: इवेंट): शून्य {plane1_mc.prop_mc.rotation + = 100; } Plane1_mc.prop_mc.addEventListener (इवेंट .ENTER_FRAME, prop); Plane1_mc.addEventListener (इवेंट .ENTER_FRAME, पैमाने); ऐसा करने के लिए विमान 1_ एमसी को स्केल और स्थानांतरित करने का प्रयास करने के लिए यह क्या है I यह दोनों से पहले कर रहा था, लेकिन अब यह केवल पैमाने पर कर रहा है कोई भी मुझे बताने में संकोच नहीं करता आपका कोड सही है उस राशि को बढ़ाने की कोशिश करें, जिसे आप ले जाएं और क्या होता है उसे पोस्ट करें। ऐसा कुछ: plane1_mc.x - = 50; Plane1_mc.y - = 30; यह भी सुनिश्चित करें कि आप कहीं भी 1_mc को स्केल नहीं कर रहे हैं। यह संभव है कि इस के बजाय एक और घटना को निकाल दिया जा रहा है, इसलिए यह scaleX और scaleY मानों की तरह दिखता है इस समारोह से संशोधित किया जा रहा है, जब वे वास्तव में नहीं हैं। मैं इस फ़ंक्शन में कुछ ट्रेस स्टेटमेंट डालकर सुझाव देता हूं और देख रहा हूं कि अग...