Παρουσίαση με Ετικέτες

HowTo: Extract numeric suffix from a string in Python
24 Αυγούστου 20 11:15 πμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
I recently needed to extract a numeric suffix from a string value in Python. Initially I did the following: import re def extractNumSuffix(value):     return (None if (search:=re.search(‘^\D*(\d+)$’, value, re.IGNORECASE)) is None else search.group(1)) Note that return has a single-line expression. So print(extractNumSuffix("test1030")) prints 1030 Tried it online at: https://repl.it/languages/python3 However, then I found out […]
Δημοσίευση στην κατηγορία: , , , , , , , , , , ,
HowTo: make raw_input & input work the same in both Python 2 and 3
10 Ιουλίου 20 04:00 πμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
Was just trying to make a Python 2 script work in Python 3 and at first it seemed I just needed a small change to add missing parentheses to the argument of a couple of print statements. But then another issue came up, it wasn’t understanding the command raw_input(somePrompt) that was occuring at various places […]
Δημοσίευση στην κατηγορία: , , , , , , , , , , ,
HowTo: Tell IE to use compatibility mode without editing your web pages
22 Αυγούστου 14 07:07 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
at http://www.mono-software.com/Mono/Pages/Discussion/dtopic/_YyUBIlx5kiqHaNqAQeltg/br-brake-bug-in-IE11-and-clipflair-text-editor/ one reads: We are using Telerik’s rich text editor (RadEditor), and it seems that RadEditor has specific behaviour regarding insertion of break tags. To circumvent this issue please try to add host header in ISS 7 (website level): Name = "X-UA-Compatible" Value = "IE=EmulateIE10" Or, you can insert Html Meta tag on a […]
Δημοσίευση στην κατηγορία: , , , , , , , , , , , ,

Search

Go

Ιστορικό Δημοσιεύσεων

Συνδρομές