Removing duplicate instances of a character using a regex expression using python
How do you remove duplicates from a list whilst preserving order?
$\lim_{x \to 0} f(x)=\frac{\tan 3x}{\tan 2x}$ without L'Hospital I'm trying to get a Schengen Visa from my first port of entry, France. I am trying to book an appointment with the French Consulate in SF, and the URL I am using is the following:   I've been checking this page periodically for the past few weeks, and I always see a dialog that that says "We are currently at full capacity. Please try again later." Their calendar provides no direct option for going to the next month. (Using the in-browser developer tools, I noticed that the button for next month is hidden. Un-hiding it and clicking on the Next Month button displays no available appointments either. I checked all the way until September 2016).  My guess is that there are absolutely no appointments for the next 6 months. Or, more likely, their page isn't functioning properly. I'll be traveling in July. Does anybody have any alternate suggestions to book an appointment? Scanning Java annotations at runtime Preserve search engine rankings while shifting to new domain name Is it okay to keep flour in the freezer? Years ago I noticed I was getting little bugs in the flour that I kept in the pantry.  To prevent this, I started keeping my flour in the freezer.  I don't do a lot of baking, but I was wondering what effects this might have on anything I do bake.  Do baked goods turn out any differently when flour is kept in the freezer vs flour kept at room temperature?  Also, if it's okay to freeze flour, how long will it last this way? Where is composition tab in QGIS Composer to change page size? I am trying to change the page size in the QGIS 3.0 Composer but I am not able to see the Composition tab.  I have right clicked an empty space in the toolbar but did not see anything about composition.  I am using Windows 7.  I tried looking at the QGIS docs but they are still in testing. Getting a random object from NSArray without duplication How to reduce the number of hyphenation? Sometimes, assume our document contain many long words, TeX may generate some hyphenation at the end of line. But it really hinder our smooth reading. Although I know we can add the hyphenation rule at the preamble. It can't reduce hyphenation number but effect the hyphenation position. It is said that microtype package can give us more compact output. But it require expert level to tuning the parameter. Where can game assets for Blender be downloaded? Is there any place where I can download surroundings of a game as a 3d model or maybe there re some inspired artists where they put them for download. I'm trying to find rooms from Wall-e. Some rooms, or outside surroundings or some interior surroundings. Where can I find things like that? Change multiple filenames by replacing a character I have multiple files named like that : screenshot 13:25.png Windows struggle to open these files probably because of the ":".  How can I replace it? How can I get the source directory of a Bash script from within the script itself? How do you get vim to display wrapped lines without inserting newlines? I'm getting back in touch with my inner (g)vim due to an unscheduled MacBook mother(board) of a meltdown (my emergency backup Linux box won't run TextMate). All told I'm happy with vim's efficiency and power, but I'm mortified at how hard it is to get the kind of word wrap that even stupid HTML textareas achieve with no apparent effort.  Consider the text  Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nullam.  By default, with an 80-character width vim displays this as  Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nu llam.  This wrapping doesn't care about whitespace, so sometimes it just slices words into pieces (nullam in this case). Of course, you can turn on word wrap, and get this:  Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nullam.  The problem is that vim inserts a newline at the linebreak, which I most emphatically do not want. In other words, I want the text to display exactly as vim displays it with word wrap turned on, but without inserting a newline. (This way it can be pasted into HTML textareas and email programs, among other places.)  Web searches have yielded nothing of use, despite diligent effort; I hope StackOverflow can succeed where my Google-fu has failed. Does linear ordering need the Axiom of Choice? Whey I try to run the program Layout Editor (available on ) on Ubuntu 14.04.1 64-bit LTS I get the following output in the terminal:  $ layout layout: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by layout)   I tried the command strings on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 as following and here is the input and the output:  $ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_DEBUG_MESSAGE_LENGTH   How can I resolve this issue I somehow guess that it is related with GCC but cannot figure out how to fix the problem. Furthermore, I have tried a PPA as suggested on  and there is a similar question for an older version of Ubuntu at . However, after I ran sudo update I get numerous warnings and the list I obtained with the strings command did not have new entries after installing gcc 4.9, so I purged the PPA() with ppa-purge. Any help, suggestions on how to proceed are greatly appreciated. How to save an activity state using save instance state? I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:  package com.android.hello;  import android.app.Activity; import android.os.Bundle; import android.widget.TextView;  public class HelloAndroid extends Activity {    private TextView mTextView = null;    /** Called when the activity is first created. */   @Override   public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      mTextView = new TextView(this);      if (savedInstanceState == null) {        mTextView.setText("Welcome to HelloAndroid!");     } else {        mTextView.setText("Welcome back.");     }      setContentView(mTextView);   } }   I thought it would be enough for the simplest case, but it always responds with the first message, no matter how I navigate away from the app.  I'm sure the solution is as simple as overriding onPause or something like that, but I've been poking away in the documentation for 30 minutes or so and haven't found anything obvious. MySQL Access denied for user 'root'@'localhost' In my server, everytime I try to access MySQL I get the error:        Access denied for user 'root'@'localhost' (using password: NO)   when I try mysqladmin -u root -p password I get        Access denied for user 'root'@'localhost' (using password: YES)   How can I access MySQL in my Ubuntu server 12.04? How to sum 2 vectors in spherical coordinate system I have 2 vectors, and each defined by 3 coordinates: radius, azimuth and zenith How i can sum it? Help me pls guys. What i have done: I found azimuth and zenith of resultant vector, by decomposition to 2 polar vectors And it gave me 2 radiuses: radius of resultant vector for azimuth polar sum and radius of resultant vector of zenith polar sum. What can i do with them? How to set class weights for imbalanced classes in Keras? ufw: how to forward single port to another port on different interface I have two interfaces eth0 (192.168.1.2) and eth1 (192.168.3.2).  I receive data from 8080 at eth0. I want to forward it to eth1 port 80.  I'm using UFW, because i don't understand iptables and how to add it at the beggining of /etc/ufw/before.rules.  I've already edited DEFAULT_FORWARD_POLICY="ACCEPT" on /etc/default/ufw and already edited net.ipv4.ip_forward=1 on /etc/ufw/sysctl.conf Unwanted behaviour from dict.fromkeys