Python - wrong encoding, regexp I have a text in Polish language in which I want to filter out non-Polish letters, but the problem is that Polish specific letters disappear  # coding: utf-8 import re  _NOT_LETTERS = re.compile('[^a-ząćęłóńśżź]+')  text = u'dzień dobry i wszystkiego najlepszego życzę'  data = _NOT_LETTERS.sub(' ', text)  print data   and the result is    dzie dobry i wszystkiego najlepszego ycz    instead of expected  dzień dobry i wszystkiego najlepszego życzę   How can I fix this ? I receive variable text from a third-party library
Python and regular expression with Unicode I need to delete some Unicode symbols from the string 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ'  I know they exist here for sure. I tried:  re.sub('([\u064B-\u0652\u06D4\u0670\u0674\u06D5-\u06ED]+)', '', 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ')   but it doesn't work. String stays the same. What am I doing wrong?
Cannot sort on numeric field with SOQL in Custom Metadata Cannot sort on a soql-request in a custom meta data type. When i perform SELECT .. FROM x__mdt WHERE ... ORDER BY x. Then field x cannot be numeric to get a correct order. Change it to a string-field ordering works ok. Playing with ASC/DESC makes no difference! My number is associated with iMessage on other phone, how to remove it? Good day everyone. For only 1 hour (!) I used my relatives iPhone with my sim card and that's it, he keeps receiving all of my iMessages. I tried checking in iTunes all devices associated with my account and his device is not listed. I tried to log in and log out to/from iMessage on his phone with his apple ID, still won't help. How can I stop this nightmare!? When I go to iMessage settings>Send &amp; Receive on his device, there is only my phone number listed, how do I remove it without smashing phone to the wall?! Thanks and have a great day  EDIT. After talking to apple support for some time, they removed my phone number from my friend's iMessage. So I guess if you are facing same problem you have to contact support. Is a Squib a Muggle? ‘And what on earth’s a Squib?’ said Harry.   To his surprise, Ron stifled a snigger.   ‘Well – it’s not funny really – but as it’s Filch ...’ he said. ‘A Squib is someone who was born into a wizarding family but hasn’t got any magic powers. Kind of the opposite of Muggle-born wizards, but Squibs are quite unusual. If Filch’s trying to learn magic from a Kwikspell course, I reckon he must be a Squib. It would explain a lot. Like why he hates students so much.’ Ron gave a satisfied smile. ‘He’s bitter.’   Chamber of Secrets - pages 110-111 - British Hardcover   If a Squib is 'kind of the opposite of a Muggle-born wizards' wouldn't that make a Squib more Muggle than wizard? Does a Muggle strictly have to be born to Muggle parents to be considered a Muggle, or can the lack of magic render a person, even of wizarding parentage, a Muggle?  Hermione can say in all truthfulness that she is a 'Muggle-born witch.' The nickname (albeit derogatory) for a Muggle-born is 'Mudblood.' Filch can say in all truthfulness that he is a 'wizarding-born non-magic person,' which, according to Hagrid is a Muggle.  'Squib' may be derogatory in the same way as 'Mudblood' is. Neville laments his family thought he was a Squib when he showed no magical tendencies as a child; the Longbottoms were so rattled at the thought of Neville being a Squib that they, among other things, threw him out a second-story window to see if he would bounce. So could 'Squib' actually be a derogatory term meaning the opposite of 'Mudblood'? After all, the Ministry doesn't allow Squibs to register as magical beings, and many Squibs are schooled and trained in Muggle professions. Squibs don't get a Hogwarts letter.    Wizards can be born to Muggles. Can Muggles be born to wizards?  ETA 11.22.14: In regard to this question, I was glancing through Philosopher's Stone, and I came across this, that Neville said:     ‘Well, my gran brought me up and she’s a witch,’ said Neville, ‘but the family thought I was all Muggle for ages. My great-uncle Algie kept trying to catch me off my guard and force some magic out of me – he pushed me off the end of Blackpool pier once, I nearly drowned – but nothing happened until I was eight.’   Philosopher's Stone - page 93 - Bloomsbury - chapter seven, The Sorting Hat   Could what Neville says contribute to the theory and/or conclusion that Squibs are, or are not, Muggles? How do we apply what Neville said? What is actually the characteristic length in fluid dynamics description? In many fluid-dynamics models and quantities (, ... generally various  descriptions) there is a parameter (usually $L$ or $\ell$) descripted as characteristic linear dimension or characteristic length. What is that in intuitive and physical meaning? I understand the typical examples ( etc.) but I can't see so far any systematic generalisation.  What is the definition? (Or, maybe: What is its role during the derivation?) Why is the $S_{z} =0$ state forbidden for photons? get the value from force:RecordData on Init handler Is there a way we can get the value from force:RecordData on init ? I am getting the onclick event of a button.  &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt;     &lt;aura:attribute name="recordId" type="String"/&gt;      &lt;aura:attribute name="showButton" type="Boolean" default="false"/&gt;     &lt;aura:attribute name="Opportunity" type="Object"/&gt;        &lt;aura:attribute name="parentOpp" type="Object"/&gt;     &lt;aura:attribute name="oppLoadError" type="String"/&gt;     &lt;force:recordData aura:id="oppRecordLoader"                       recordId="{!v.recordId}"                       fields="Id,                               Name,                               AccountId,                               Cohort_Sem__r.End_date__c,                               LeadSource,                               Staff_Referral_Detail__c,                               lead_source_detail__c"                       targetRecord="{!v.Opportunity}"                       targetFields="{!v.parentOpp}"                       targetError="{!v.oppLoadError}"                       /&gt;   JS:  doInit: function(component, event, helper) {                     var opp = component.get("v.parentOpp");                   console.log('Name Value: '+ opp.Name);     }   Error:     Action failed: c:createIWSRecord$controller$doInit [Cannot read   property 'Name' of null] quickActionHandlerHelper.js failed to create   component - forceChatter:lightningComponent I have a  beautiful  inequality, but I can only prove part of cases. Given any positive real numbers $a,b,c$, we have   $$(a^{2}+2)(b^{2}+2)(c^{2}+2)\geq 9(ab+bc+ca)$$  How can we prove this statement? How to show $(mn)!$ is divisible by $(m!)^n$? How to show $(mn)!$ divides $(m!)^n$, $m$ and $n$ is integers? Intuitively it's easy, but hard to prove by the epsilon-delta method:  $$ \lim_{n \to \infty} n x^{n} = 0$$ Best way to do multi-row insert in Oracle? I'm looking for a good way to perform multi-row inserts into an Oracle 9 database.  The following works in MySQL but doesn't seem to be supported in Oracle.  INSERT INTO TMP_DIM_EXCH_RT  (EXCH_WH_KEY,   EXCH_NAT_KEY,   EXCH_DATE, EXCH_RATE,   FROM_CURCY_CD,   TO_CURCY_CD,   EXCH_EFF_DATE,   EXCH_EFF_END_DATE,   EXCH_LAST_UPDATED_DATE)  VALUES     (1, 1, '28-AUG-2008', 109.49, 'USD', 'JPY', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'),     (2, 1, '28-AUG-2008', .54, 'USD', 'GBP', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'),     (3, 1, '28-AUG-2008', 1.05, 'USD', 'CAD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'),     (4, 1, '28-AUG-2008', .68, 'USD', 'EUR', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'),     (5, 1, '28-AUG-2008', 1.16, 'USD', 'AUD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'),     (6, 1, '28-AUG-2008', 7.81, 'USD', 'HKD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'); Index not created in pdf output, even though idx file is present I have a document that has \usepackage{makeidx} and \makeindex in the preamble and \printindex inside the document body. An .idx file is created when I compile, no errors are signalled, still there is no index listing in the PDF document that is produced. There used to be one until all my files were deleted except the .tex file, after that I could not get the index to appear in my output. How can one troubleshoot this thing? I have changed all the "%bm" with "%tm" wherever I could find it in the build profiles (Tools -> Options -> Clean), as Thorsten Donig suggested on this website (in an answer to another posting regarding problems with the index creation). It did not solve my problem. I am using the TeXnicCenter editor on Windows XP, with the MiKTeX 2.9 distribution. Macbook Air - how to install a dual bootable Ubuntu 14.04 LTS On my Macbook Air 10.9.2 without crashing the current setup, how can i install as dual boot: Ubuntu 14.04 LTS ? (can anyone please advise some step by step please) find $\left( \frac{x}{x+y} \right)^{2007} + \left( \frac{y}{x+y} \right)^{2007}$ Count occurrences of each element in a List[List[T]] in Scala Replace links with the current question title in comments In questions, links get converted into question titles (see )  Can the same functionality be added to comments? I've installed VM VirtualBox v. 4.3.8 on my Ubuntu 12.04 LTS (Lenovo G500S with Intel 1005M processor) and I can't configure any 64-bit guest (nor Windows, neither other OS). Inslalation of Win 8.1 64-bit under 32-bit profile obviously fails... My processor supports VT-x technology, but in my BIOS there is no enable/disable option for VT-x. Is there any way to force VirtualBox to support 64-bit guest ? SharePoint 2013 REST display lookup fields? I am using SharePoint 2013 REST to show data from my list,  one of my field in announce list is AnnouncedBy which is a user packer field  or is a lookup field   how can I display it or get it using SharePoint 2013 REST?   var app = angular.module('SmartphoneOSList', ['ngSanitize']);    app.controller('ListController', function ($scope, $http) {    $http({       method: 'GET',       url: "https://myserver/_api/web/lists/getByTitle('announce')/items?$top=2&amp;$orderby=Modified desc",       headers: { "Accept": "application/json;odata=verbose" }      }).success(function (data, status, headers, config) {        $scope.items = data.d.results;       }).error(function (data, status, headers, config) {       //...     });   }); Multivariable limit proof: $\lim\limits_{(x,y)\rightarrow (0,0)}\frac{\left|x\right|^a\left|y\right|^b}{\left|x\right|^c + \left|y\right|^d} = 0$ I have some trouble with this: Show that if $a, b \ge 0$, $c, d &gt; 0$ and $\frac{a}{c} + \frac{b}{d} &gt; 1$ then   $$\lim_{(x,y)\rightarrow (0,0)}\frac{\left|x\right|^a\left|y\right|^b}{\left|x\right|^c + \left|y\right|^d} = 0$$  we were not really shown how to evaluate multivariable limits other than trying different paths, which wouldn't work when the limit exists, or by applying the squeeze theorem which is my initial plan. Unfortunately I cannot find a proper bound for the denominator and so I am quite lost right now. Any help would be appreciated. Expectation of the maximum of gaussian random variables What decides what to prepend the duplicate question list with on a duplicate question? On duplicate questions, I often see different headings for the duplicate question list. These include:     Possible Duplicate:    [duplicate question list]   and      This question already has an answer here:    [duplicate question list]   and more recently,     This question is an exact duplicate of:    [duplicate question list]   What decides which heading is placed before the duplicate question list?