_id
stringlengths
2
6
text
stringlengths
4
46k
title
stringclasses
1 value
d13901
How about a following modification? Modification points : * *In order to retrieve messages from threads, getMessages() is used. *In order to retrieve each message from messages retrieved by getMessages(), it retrieves using one more "for loop". *For each mail, the Date, From, Subject and Body can be retrieved by g...
d13902
Based on the documentation you could use the following: setFormat12Hour( "K:m" );
d13903
Using cp unix command, you can copy and rename at same time. I changed a bit your script to reduce it and I set the copy/rename inside the main loop. remove the "--" before the "set location" and the do shell script "rm". I leave them to be more safe for debugging. On first row, I assigned, for my tests, the Newdirecto...
d13904
You'll need to use a jQuery plugin of some kind to help close all those gaps you're seeing. As James mentioned, masonry is a very popular option. Another plugin (without as many options/features) is jQuery Waterfall. Both have lots of examples to help get you up and running. A: You should insert the code that you have...
d13905
Finally got it working! Thanks to @zgoda and this link. Here are the steps I ended up with for those of you who have the same problem: First make sure PIL is not installed. Download libjpeg from http://www.ijg.org/files/jpegsrc.v8c.tar.gz, unpacked it, ./configure, and make. When I tried to make install it couldn't...
d13906
Mat::convertTo function should be safe to use when using inplace calls (i.e. same input and output Mat objects). According to OpenCV DevZone, this function did have a bug when using inplace calls, but it was fixed a few years ago.
d13907
Copy the downloaded DLL file in a custom folder on your drive, hopefully at the root of your solution maybe in a libs folder, then add the reference to your project using the Browse button in the Add Reference dialog. Make sure that the new reference has Copy Local = True set within its properties once added to the sol...
d13908
Check if overflow: hidden; or overflow: auto is set in the parent div. That could prevent it from showing up.
d13909
Here is how I would do this. It's not exactly like you wanted, but IMHO its a better user experience. // this timer function allows us to wait till the user is done typing, // rather than calling our code on every keypress which can be quite annoying var keyupDelay = (function(){ var timer = 0; return functi...
d13910
I've only tested quickly on mobile, but stopping the background image from scrolling with the page seemed to fix it. To do this I added background-attachment: fixed; to the CSS for body, html
d13911
put it in a function, and call it on an onclick event on an element function myEvent() { j=parseInt(Math.random()*ranobjList.length); j=(isNaN(j))?0:j; document.write(unescape(ranobjList[j])); } then in your html <input type='button' value='Click Me' onclick='myEvent();' /> A: The code example you have i...
d13912
I would not combine data files with R source. Much easier to keep them separate. You put your functions in separate script files and then source() them as needed, and load your data with read.csv() etc. "Keep It Simple" :-) I am sure there's a contorted way of reading in the source code of a function from a text file a...
d13913
I tried to solve this through JS. Here is my code: function paint() { let txt = ""; for (let j = 0; j < 100; j++) { txt += "<div>" for (let i = 0; i < 100; i++) { txt += `<span onmouseout="hoverOut()" onmouseover="hover(this)" onmouseuop id="overlay-${i}-${j}">@</span>` } ...
d13914
Use alertview like this UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Enter Name" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Submit", nil]; alert.alertViewStyle=UIAlertViewStylePlainTextInput; UITextField *textField=[alert textFieldAtIndex:0]; textField.delegate=sel...
d13915
PhoneGap give you a layer of abstraction so that you app is going to have access to non browserView accessible functionality like the camera for example. And those will be the same on all mobile plateforme. A: You can create application with pure html5 with webview and piece of java methods used to handle mobile event...
d13916
You can try and use renewLockForMessage to extend the lock. Hope it helps!
d13917
The problem for example with this typedef declaration typedef struct { A(int a) : a_var(a) {} int a_var; } A; is that within the unnamed structure there is used undeclared name A as a name of a constructor. So this declaration is invalid. By the way the same problem exists else in C. Consider for example a typ...
d13918
Try: /^[\p{L}-. ]*$/u This says: ^ Start of the string [ ... ]* Zero or more of the following: \p{L} Unicode letter characters - dashes . periods spaces $ End of the string /u Enable Unicode mode in PHP A: /^[a-zàâçéèêëîïôûùüÿñæœ .-]*$/i Use of /i for ca...
d13919
Here is an example (completely neglecting error handling): request, _ := http.Get("https://api.github.com/repos/openebs/openebs") defer request.Body.Close() bytes, _ := ioutil.ReadAll(request.Body) var apiResponse struct { StargazersCount int `json:"stargazers_count"` } json.Unmarshal(bytes, &apiResponse) fmt.Pri...
d13920
I believe you are interested in knowing the properties of the each AWS Resource / Service and not the meta-data. I don't think there is a straight answer. The work around what I can recommend is using the AWS CloudFormation's Syntax definition of each AWS Resource. For Example : EC2 Instance is represented by the follo...
d13921
Approximately 3:4:6:8 for the ldpi mdpi hdpi and xhdpi ratios.
d13922
Ok so there was an answer before, but because two people asked the same/similar question, I just posted the same thing twice. Anyhow, the duplicate answer was deleted by the mod, but I would have at least expected them to link you the other question after deleting the answer here. Alas, people are not perfect. However ...
d13923
Firstly, you are getting incorrect results as some of the names contain spaces (Eric, Marry, Heather, ...). So, let mat <- gsub(" ", "", mat) g1 <- graph_from_edgelist(mat) degree.cent <- centr_degree(g1, mode = "all") Now we may extract the corresponding names of vertices and combine them with your result: setNames(d...
d13924
If I take this tweet, I can find it's id in the URL witch is "1294917318405836802" You can update your code and try to retrieve it id_ = "1294917318405836802" exp_tweet = api.get_status(id_, tweet_mode = 'extended') content = exp_tweet._json
d13925
Use a function to insert the variable... notEqualSerie: function() { return series; }
d13926
.vimrc should be in your home directory. .vimrc is there to make more interactive according to your need. Here is an example of .vimrc filetype indent on set ai set mouse=a set incsearch set confirm set number set ignorecase set smartcase set wildmenu set wildmode=list:longest,full A: Where: On UN*X systems your .vim...
d13927
The only way I managed to make it work was by only providing the username to the git clone command: git clone https://user@myDomain.scm.azure-api.net Once I did that, a login pop up appeared and I was able to insert my password unencoded, managing to clone it. So from my point of view it might be a documentation error...
d13928
<img> elements have height and width properties that are automatically populated by the browser when it determines the dimensions of an image. .height() and .width() map to the more generic offsetHeight and offsetWidth properties that return 0 when an element is hidden. Accessing the height and width properties direc...
d13929
You can’t access the theme state variable from the global scope where you are using it. I.e. the Stylesheet.create method call. You can just use the themeState in the components instead of calling in the StyleSheet.create call.
d13930
Solved it for now, since I had just one certificate I put it in emulator's keystore. If somebody has better solution, please let me know.
d13931
Short answer, it is distributed separately. Servlets are a specification and an API. If you want the JAR, download it from the spec site Servlet Spec 3.0. Obviously if you want to actually deploy your application, you'll still need an implementation (i.e. a server). A: The servlet API is available through some jar an...
d13932
Terminology about correlations is confusing, so let me take care in defining what it sounds like you want to compute. Autocorrelation matrix of a random signal "Autocorrelation matrix" is usually understood as a characterization of random vectors: for a random vector (X[1], ..., X[N]) where each element is a real-value...
d13933
You can do this with very little code in jQuery 1.4+ using .delay(), like this: $(function() { $(".secretpopout").delay(120000).fadeIn(); }); This would show it after 2 minutes, just give it some CSS so it's hidden initially: .secretpopout { display: none; }
d13934
Look also at VisualVM, shipped with latest Java releases. A: Oh shoot, looking through the source code I noticed the thread class has a method public StackTraceElement[] getStackTrace(), it just wasn't in the documentation I was reading. Now I feel dumb. So yeah, that seems to be the solution. A: One approach might b...
d13935
According to the directories, I believe it is a problem with the Android SDK. Try reinstalling Android Studio (but keep the project files), which will also reinstall the Android SDK with it. If that doesn't work, go to https://developer.android.com/studio/#downloads, scroll down to command-line tools only, and download...
d13936
As Jimmy points out, you do indeed miss even long runs of the same character as long as the run isn't of the character that starts the sequence you are testing. Here's a solution that I believe works in all cases: public static int lengthOfLongestSubstring(String s) { if (s.length() == 0) return 0; if (s.lengt...
d13937
Resolution: using "elastic" user account instead of kibana fixed this issue. A: Configuring security in Kibana To use Kibana with X-Pack security: Update the following settings in the kibana.yml configuration file: elasticsearch.username: "kibana" elasticsearch.password: "kibanapassword" Set the xpack.security.encryp...
d13938
The first time the callback is called first is a string (the first element in the array), and your function makes sense when first and last are both strings, so it works when the callback is only called once (the array has at most 2 elements). The second time it is called it is the result of the previous call, a number...
d13939
It shows because your router expect 2 parameter but you are giving 1 parameter seats Define your route this way $route['category/(:any)/(:num)'] = 'public_controller/category/$1/$2'; Now call your route http://localhost/ecom/category/seats/0 for category page http://localhost/ecom/category/seats/1 for first paginatio...
d13940
I think there are two different concepts in here: * *The inner representation of a Room in your service (The classes you use and their relations) *The outer representation (The one exposed by your API) If you want those two representation to be the same, you could just serialize/deserialize data using the Room clas...
d13941
You can find the duplicate elements by using a Set as the accumlator and then utilise Collections.frequency to check if a given number occurs more than once within the List<Integer> like this: List<Integer> elements = new ArrayList<>(Arrays.asList(1,2,5,4,7,6,4,7,6,4,7)); Set<Integer> accumulator = new LinkedHashSet<>(...
d13942
Is there a way, on Linux/X, to map certain key combos to other key combos? In the tradition of all open source projects, there's not a way, there are several. At the lowest level you've got kernel keybindings, which is probably not what you want. At the X server level you've got xkb with its myriad utilities. And t...
d13943
All controls refresh/update whether visible or not. It's generally considered good practice to not load recordsets until they are needed. If you have many subforms in a tab control, you can use the tab control's OnChange event to load/unload your subforms, or, alternatively, to set the recordsources. However, with only...
d13944
SqlDataAdapter does not have asynchronous methods. You will have to implement it yourself which I don't recommend. sample await Task.Run(() =>_adapter.Fill(ParentManager.MainDataSet, TableName)); But I would look into an alternative solution using other ADO.NET libraries like using an async SqlDataReader. sample p...
d13945
Use the DATETIME type and the following code : $lastSeen= mysqli_query($con, "UPDATE ws_users SET us_lastseen=NOW() WHERE us_id=$user_id"); Or add quotes : $now = date("Y-m-d H:i:s"); $lastSeen= mysqli_query($con, "UPDATE ws_users SET us_lastseen='$now' WHERE us_id=$user_id"); You should debug your query and execut...
d13946
You should use requests as such: requests.post(url, files=files, data=data)
d13947
I get an error 17:28:46 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MyS QL server version for the right syntax to use near ' NOW(), DATE_ADD( now(), INT ERVAL 1 MONTH )' at line 1 – sanchixx It was due to error in ...
d13948
When performing operations in the console, the return value of the last executed line is always output. That means that simply writing var counter = 0; ++counter; will log 1 to the console. The same is happening in your loop, the return value of the last counter++ is output to the console as the value of the last exec...
d13949
I think this sample code should solve your problem. You get spaces by having spaces between your formats. You need to use \r\n to get a new line on Windows machines. strings = {'hello','how','are','you'}; numbers = [1, 2, 3, 4]; fileID = fopen('tester.txt','w'); format = '%s %f \r\n'; for i = 1:length(numbers) ...
d13950
You can get the JSON representation of an arbitrary product in your store by fetching data from /products/<some-product-handle>.js. When using the .js endpoint, the product object will include a number of aggregate parameters, including product.available which will be true if at least 1 variant in the product is avail...
d13951
As pointed out in the comments it seems like Add Username into Serilog would serve your purpose and would also be the duplicate of this issue.
d13952
USE MAX AND MIN SELECT dbo.product_img.p_id , dbo.products.name , MAX(dbo.product_img.path) , MIN(dbo.product_img.path) FROM dbo.product_img INNER JOIN dbo.products ON dbo.product_img.p_id = dbo.products.p_id GROUP BY dbo.product_img.p_id , dbo.products.name A: If you can have more than two images per produ...
d13953
It's definitely possible to update the publisher chain and to try to decode an array of [SomeDecodable], and failing that, fallback on decoding the SomeDecodable itself. The pattern would be to wrap it in a FlatMap, and to deal with a failure inside of it. So, let's say you have some upstream publisher with an output o...
d13954
It should be coming from the SDK that you are using to build the wrapper. It'll be somewhere like... ${FLEX_HOME}/templates/express-installation/index.template.html A: As of Flex SDK 4.5: The template file used when building your project via html-wrapper ant task unfortunately does NOT come from ${FLEX_SDK_HOME}/temp...
d13955
The version of CsvHelper you are using uses CurrentCulture to get the delimiter. It appears your are in Germany, so your delimiter would be ";" instead of ",". The current version of CsvHelper forces you to pass in a CultureInfo object to CsvReader and CsvWriter with the suggestion of CultureInfo.InvariantCulture to ...
d13956
SELECT A.AttendanceID,A.Date,A.Present,A.ModuleID,S.StudentID,S.Name FROM attendance A ,student S WHERE A.StudentID = S.StudentID AND S.StudentID = "Your Value from the textbox"; INNER JOIN I prefer to use objectDataSource rather than SQLDataSource. to separate your layers.and use parameterized query to avoid sql inje...
d13957
If you ARE using Add -> Class OR Add -> New Item and then selecting Class, and you're still only getting an empty code file, then your default "class" template is missing or messed up. If you are using Add -> Code OR Add -> New Item and selecting Code, the "Code" template is simply an empty ".cs" file, and will be give...
d13958
Make sure the Content-Type metadata is set properly for your CSS files via the Developer Console. If not, you should manually edit the metadata to set the proper type, which is text/css for CSS files. If the type is neither not specified nor auto-detected at upload time, Google Cloud Storage serves files as binary/octe...
d13959
The suggestion would be to use the IdentityServer (http://thinktecture.github.com/Thinktecture.IdentityServer.v2/), a replacement for ADFS, which uses the same authentication protocol (WS-Federation) but allows you to plugin your custom membership provider. In addition, the IdentityServer supports some features ADFS l...
d13960
I think OpenCV fullfills your requirements. See the thread here about decreasing the resolution and read the OpenCV documentation.
d13961
Since there's a bounty, I'll repost this as a reply as well -- but in reality I would like to flag this as a duplicate, since the actual Exception is the one covered in another question, and answered: It is caused by hdp.version not getting substituted correctly. You have to set hdp.version in the file java-opts under ...
d13962
In the build.gradle file, I deleted implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'. Android Studio had warned in uncertain terms (as usual) that putting different versions in the dependencies "might produce some bugs". The said dependency was the first that could be deleted without causing any compile ...
d13963
Right now, you are converting the strings to uppercase, but that's it. There is no actual renaming being done. In order to rename, you need to use os.rename If you were to wrap your code with os.rename, it should solve your problem, like so: [os.rename("parallel_universe/" + x, "parallel_universe/" + os.path.splitext(x...
d13964
I did part of what you are asking for a customer weeks ago. Your question is to broad, very extensive, it will take months to accomplishes the job. Start your project with the basic that you can find at http://wiki.mikrotik.com/wiki/API_PHP_class, then you can grow your application and post specific questions about you...
d13965
To get a list of cats that have never been requested you'd go with: Cat.includes(:cat_requests).where(cat_requests: { id: nil }) # or, if `cat_requests` table does not have primary key (id): Cat.includes(:cat_requests).where(cat_requests: { cat_id: nil }) The above assumes you have the corresponding association: class...
d13966
if(Plane.isLanded = true) Note that this is assigning the value true to Plane.isLanded. You want to use the comparison operator == instead of =. if(Plane.isLanded == true) And since this is a boolean already, you should actually leave out the == true completely: if(Plane.isLanded) A: You are assigning to Plane.isLa...
d13967
The cart object is null until the service getPosts$ returns (callback). Therefore, the code *ngIf="cart.vegetable ... is equal to *ngIf="null.vegetable ... until that happens. That is what is happening. What you could do is put a DOM element with *ngIf="cart" containing the other *ngIf. For example: <div *ngIf="cart"> ...
d13968
Just add the xml file inside app_data folder and read it using XDocument. You can event use Cache with FileDependency to improve performance.
d13969
You should be looking at SAX parsers in Java. DOM parsers are built to read the entire XMLs, load into memory, and create java objects out of them. SAX parsers serially parse XML files and use an event based mechanism to process the data. Look at the differences here. Here's a link to a SAX tutorial. Hope it helps. A:...
d13970
A exemple add and remove divs by id (jquery) $( '#add' ).click(function() { var n = 0; n = $( "div" ).length; if(n!=1){ n = n-2; } n = n+1; var div_id = "div_"+n; $( document.body ).append( $( '<div id = "'+ div_id+ '">' )); $( "#count" ).val("There are " + n + " divs."...
d13971
You need learn more about $scope. We never user {{$scope.key}} in view. Instead we we use just {{key}} in View Your code should be <div class="container" ng-app="App"> <div class="row" ng-controller="catControl"> <div class="col-md-12"> <div class="well"> {{2 + 2}} </br> {{'cat'}} </br> ...
d13972
your not very clear with what you want exactly. so I've made some assumptions. (all of those assumptions can be corrected if I assumed wrong). Assumptions: * *Header should scroll with the content. (that behavior can be changed if you want) *the scroll should be applied on the 'Content Zone' only. (that behavior ca...
d13973
Try this class CreateJoinTableArticleCategory < ActiveRecord::Migration def change create_join_table :articles, :categories do |t| t.index :article_id t.index :category_id end end end Ref: api doc Edit: No need to add index and primary key into join table. Ref: see this answer
d13974
if(userNum != 11) || (userNum != 22) || (userNum != 33) || (userNum != 44) || (userNum != 55) || (userNum != 66) || (userNum != 77) || (userNum != 88) || (userNum != 99) Will always be true, because userNum cannot be all of those values at once. Substitute || for &&: if(userNum != 11) && (userNum != 22) && (userNum !=...
d13975
Oracle doesn't have a built-in month function so I'm assuming that is a user-defined function that you've created. Assuming that's the case, it sounds like you want where start_date > (case when month(sysdate) > 6 then trunc(sysdate,'yyyy') + interval '6' month else tr...
d13976
Without seeing the form I can only theorize what happens: * *You started with a clean slate, the form shows, you enter the username and password and submit it *The code passes the condition and then performs the login *The result of login(...) !== true for whatever reason (wrong password or bug in the code) *The ...
d13977
I solved this kind of problem before by simply considering the received array of bytes as a bit flow. So it's quite easy to read 3 bits, then 7 bits, then 10 bits, then 2 bits, etc. until the end of the buffer. You simply need to keep an index to the current bit: struct bitflow { unsigned char* data ; // Received dat...
d13978
select() can accept an array, so try: DB::table('users')->select($arr); This is source code of select() method: public function select($select = null) { .... // In this line Laravel checks if $select is an array. If not, it creates an array from arguments. $selects = is_array($select) ? $select : func_get...
d13979
You simply use logging.FileHandler(). I tried to implement it in your method: def pipe_logs_to_terminal(self, level=logging.INFO): log_path = "." # cwd file_name = "my_app" # configure root logger api_logger = logging.getLogger("bgapi") api_logger.setLevel(level=level) # set format formatte...
d13980
You should take a look at that blog. http://mateuszstankiewicz.eu/?p=189 You will find a start of Answer. Moreover I think there is a specific module for video analysis in Opencv. A: You said it looks like transparent. This is what you saw right?→ See YouTube Video - Background Subtraction (approximate median) The re...
d13981
If you would like to use dplyr, you can find an example here, especially mpalanco's answer. Briefly, after using rowwise to indicate that the operation should be applied by row (rather than to the entire data frame, as by default), you can use mutate to calculate and name a new column off of a selection of existing col...
d13982
This is how I do it.. - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { NSMutableDictionary *dict = [NSMutableDictionary dictionary]; //get parameters [self goResetPassword:dict]; } return YES; } - (void) goResetPassword:(NSDictionary*) dict{ UIStoryboard *storyboard...
d13983
Implement a filter which does basically the following job: HttpSession session = request.getSession(); if (session.isNew()) { session.setAttribute("start", System.currentTimeMillis()); } else { long start = (Long) session.getAttribute("start"); if (System.currentTimeMillis() - start > (30 * 60 * 1000)) { ...
d13984
You can use urllib.request.urlretrieve(url, path_to_file) All code: import urllib.request urllib.request.urlretrieve("https://www.python.org", "/home/user/ne.txt")
d13985
The code I suggested in the comments would work (not sure what you're saying doesn't work about it) - but it has a flaw If greetings were something "I have a lot of phlegm" - it would match with gm so lets try another way function fn(keywords, target) { const res = keywords.map(s => new RegExp(`\\b${s}\\b`)); r...
d13986
Inside your Service.js, first factory is missing the closing }) paranthesis, check the updated Service.js var app = angular.module("ServiceApp", ["ngResource"]); app.factory('GetPortfolios', function ($resource) { return $resource("http://localhost:61347/api/PortfolioManager/GetPortfolios/", {}, {}); }); app.fact...
d13987
Apparently the :hashtag has two different encodings for me, seems like one is stored as US-ASCII, and one (the parsed) in UTF-8. Funny that I was able to reproduce this only by pasting this into my irb. To solve this, make sure they have the same encoding
d13988
You need to either explicitly cast a value to a non-integer form, e.g. double, or use a non-integer in the calculation. For example: var pc = (p * 100/ (double)c).ToString(); or this (not 100.0 rather than 100): var pc = (p * 100.0/ c).ToString(); Next you need to round the result: var pc = Math.Round(p * 100 / (doub...
d13989
If your "Service" is just Java classes/package/modules then you can use Spring or any other DI container that supports lifecycle hookups. If by "Service" you mean something big/bloated/enterprise you can also look into OSGI. But for a small/library engine I suggest you look at plexus and picocontainer.
d13990
Figured out: processor.save(...) and learn.preprocessing.VocabularyProcessor.restore(...)
d13991
You can try the steps below: * *Backup the solution *Open VSS Explorer, move project2 folder *Open VS, go to File->Source Control->Change Source Control, update the server path of Project2 *Save the solution.
d13992
I took the liberty of formatting your code. This is how the method looks: double suma (int num [ ]) { int i=num.length; int j=0; int s=0; for(j=0;j < i;j++) { return (double)(s); } } I suspect you attempted to write a sum-method, started with a stub, and didn't get it to compile. This is p...
d13993
Solution 1: You could create a user that has access to both databases and then use fully qualified table names when querying for the external table. MySQL supports the dbname.tablename syntax to access tables outside the current database scope. This requires that the currently connected user has the appropriate right...
d13994
Is this what you are after?? CREATE TABLE view_data_main ( module_name VARCHAR(30), module_title VARCHAR(30), module_images VARCHAR(30), module_scripts VARCHAR(30) ) INSERT INTO `view_data_main` (module_name,module_title,module_images,module_scripts) VALUES ('welcome','main','http://www.test.com','htt...
d13995
Install a local forwarding nameserver on the computers that need to make a choice between the local nameserver and Internet nameserver. Use Unbound because it's lightweight and easy to configure for this task. Put this into the Unbound config: stub-zone: name: "internal.example.com" stub-host: internal....
d13996
Take a look at the HyperLinkField class. This should provide exactly what you're looking for. http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlinkfield.aspx
d13997
I had the same problem, and found a solution in another answer: Instead of --log-cli-level=DEBUG, use --log-level DEBUG. It disables all third-party module logs (in my case, I had plenty of matplotlib logs), but still outputs your app logs for each test that fails. A: I got this working by writing a factory class and ...
d13998
Sorry not an answer, but too long for a comment. I built a debug version for our users that experienced crashes, that swizzles the _updateEscapeKeyItem method, in an attempt to pinpoint the crash origin, which isn't visible due to the bottom of the stack being blown away by the infinite recursion. My guess is they chan...
d13999
Just use regular expressions: import re result = re.sub('>\s*<', '><', text, 0, re.M)
d14000
A lot of answers are returning the Index as an array, which loses information about the index name etc (though you could do pd.Series(index.map(myfunc), name=index.name)). It also won't work for a MultiIndex. The way that I worked with this is to use "rename": mix = pd.MultiIndex.from_tuples([[1, 'hi'], [2, 'there'], [...