I've heard that 'play piano' is OK in American usage. Is that true? What I learned so far is 'play the piano'. As long as it comes to the instruments, we usually "play the (instrument)". Is that correct?
What is the rule for omitting/including the definite article in the following sentences:     I used to play piano.   I used to play the piano.   I would pick the first sentence, but I've heard people say the second sentence even when they are not referring to a specific piano. Which one is correct?
C++ deleting line of text in a file I was writing some Unit tests last week for a piece of code that generated some SQL statements.  I was trying to figure out a regex to match SELECT, INSERT and UPDATE syntax so I could verify that my methods were generating valid SQL, and after 3-4 hours of searching and messing around with various regex editors I gave up.  I managed to get partial matches but because a section in quotes can contain any characters it quickly expands to match the whole statement.  Any help would be appreciated, I'm not very good with regular expressions but I'd like to learn more about them.  By the way it's C# RegEx that I'm after.  Clarification  I don't want to need access to a database as this is part of a Unit test and I don't wan't to have to maintain a database to test my code. which may live longer than the project. How to delete a full stop on reference ending According to APA rules, after each reference there must the digital object identification (doi). I use JabRef as a reference manager and for some reason, if I put an article doi on its "doi" field, it won't show up after the build on my editor, but if I put the doi on its "note" field it shows up. However, it's adding a period after the note field. I need a way to have the reference without an ending period.  Here's the LaTex document. I use TexPad as my editor.  \documentclass[12pt,a4paper,oneside]{report} \usepackage[utf8]{inputenc} \usepackage[portuguese, english]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[sort, longnamesfirst]{natbib} \usepackage[strings]{underscore} \bibliographystyle{newapa}  \usepackage{sectsty} \chapterfont{\fontsize{14}{15}\selectfont} \sectionfont{\fontsize{12}{15}\selectfont} \subsectionfont{\fontsize{12}{15}\selectfont} \renewcommand\bibsection{\section*{Referências}} \bibpunct[:\ ]{(}{)}{;}{a}{,}{,}  \title{} \date{} \makeindex  \begin{document}  \cite{aldous-newviewsgrandparents-1995}  \bibliography{/Users/Ricardo/Documents/Ricardo/library2.bib}  \end{document}   It produces this:     Aldous, J. (1995). New views of grandparents in intergenera- tional   context. Journal of Family Issues, 16(1), 104–122. doi:   10.1177/019251395016001006.   I need that last period out.  Thanks. Procedure for reducing the degrees of freedom of an arbitrary system Flight ticket reimbursement after Travel Warning I've got a round-trip flight with Royal Air Maroc from Strasbourg, France (SXB) to Ouagadougou, Burkina Faso (OUA) on Monday, Nov 10. Return is on Dec 1. The recent turmoils in Ouagadougou have led the US Department of State for Travels to issue a , which is why I'd like to refrain from the trip.  Any chance I can get a reimbursement for my tickets? In Germany (where I live), an official travel warning can help you get a refund when you book a trip with a tour operator/travel agency, but in this case I booked the flight directly with a non-German airline, so German law surely doesn't apply here.  EDIT: Sorry for failing to state this earlier, but I had already called the airline as suggested in the answers. They had told me it's not possible to get a refund with my standard fare. However, I understand that sometimes you really have to bargain to get a refund, so I wanted to learn about similar experiences and possibly about some hard (legal) facts that I could bring forward. Selecting points within polygon and updating attributes using ArcPy? I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales area they are in and update their attribute table to show the sales area. I have searched python+point+in+polygon for other posts and I know how to select the polygons but I can't figure out how to populate the address points.   I found the following script that works but takes almost two hours to run.  import arcpy import os  # Allow overwrite  arcpy.env.overwriteOutput = True  # Script user input parameters polygonLayer = arcpy.GetParameter(0) pointLayer = arcpy.GetParameter(1) workspace = arcpy.GetParameter(2) copyField = = arcpy.GetParameterAsText (3)   # Add new field to target feature class  fieldList = arcpy.ListFields(pointLayer) fieldNameList = [] for field in fieldList:    fieldNameList.append(field.name) fieldType = arcpy.ListFields(polygonLayer,copyField)[0].type if not copyField in fieldNameList:     arcpy.AddField_management(pointLayer, copyField, fieldType)  arcpy.MakeFeatureLayer_management(polygonLayer, "PolygonLayer")  pntCursor = arcpy.UpdateCursor(pointLayer) for pnt in pntCursor:     rowID = pnt.OBJECTID     arcpy.MakeFeatureLayer_management(pointLayer, "PointLayer", '"OBJECTID" = ' + str(rowID))      # Polygon selection based on CONTAINS selection method     arcpy.SelectLayerByLocation_management("PolygonLayer", "CONTAINS", "PointLayer")      # Copy field values from polygon to point layer         polyCursor = arcpy.SearchCursor("PolygonLayer")             for poly in polyCursor:         pnt.setValue(copyField, poly.getValue(copyField))         pntCursor.updateRow(pnt)      arcpy.Delete_management("PointLayer")          del pntCursor, polyCursor, pnt, poly   I don't think I need to create a new field so I have simplified my script too:  # Import arcpy module import arcpy import os  # Allow overwrite  arcpy.env.overwriteOutput = True  # Script user input parameters polygonLayer = arcpy.GetParameter(0) pointLayer = arcpy.GetParameter(1) workspace = arcpy.GetParameter(2) fsaPoly = arcpy.GetParameterAsText (3) #FSA in FSA_Boundaries fsaPnt =  arcpy.GetParameterAsText (4) #FSA in Addresses   # Select all Address in FSA     polyCursor = arcpy.SearchCursor("PolygonLayer")      for poly in polyCursor: # Select based on CONTAINS      arcpy.SelectLayerByLocation_management(poly, "CONTAINS", "PointLayer")  # Add FSA to Address         pntCursor = arcpy.UpdateCursor("pointLayer")               for pnt in pointCursor:             pnt.setValue(fsaPnt, fsaPoly)             pntCursor.updateRow(pnt)   del pntCursor, polyCursor, pnt, poly   I know my update cursor is wrong but i'm stuck on how to update one feature class using information selected from the other.   I know I can do this manually but I need to do it for multiple cities so I would like to automate the process.   I am using Arc 10.2.2 to run my python script. This was talked about a few podcasts ago. And they referenced some other site that does this.  Currently location is a string but adding a country dropdown (and for the usa a state drop down) could be a great addition to the site.  Then allow for user filtering by country / state. I tried to find a topic here on this (possible problem) but I didn't.   I reported it at  but Tim Hoffmann pointed me that it is not a problem of editor. After tested with nano and pdflatex I'm posting here.  The minimal code produces errors. OK, we can solve it using \\{}.   But is this a problem with TeXlive 2014 or there are some good reasons to have that behavior.  \documentclass{report} \begin{document} test\\ [foo]  test\linebreak [foo]  test\newline [foo] \end{document}      ! Missing number, treated as zero.                        f l.3 test\ [foo] I'm looking to view and archive all my old DMs in Twitter, since I would like to revive conversations that took place 1 year ago.  Acording to Twitter they don't delete old messages, they simply archive them in their database.  Is there a way to view and download all of these messages, just like you can view all your old public tweets with third party apps?  UPDATE: I found  but apparently it's not working for DMs now Failed to mount Windows share: Invalid argument A very similar question has been asked before by robazefa, but no one answered it. For the last month or so, my Ubuntu 14.04 LTS box has been been unable to open a couple of folders shared from external drives on a PC running Win 8.1 on a home network.  Through Files on the Unity desktop, I can browse the network, access the workgoup, access the Win 8.1 box, see and access its shares except the folders on its external drives.  They appear on the list and I could access them without a problem a couple of months ago, but now I get a dialogue box with Unable to access location - failed to mount Windows share: Invalid argument message, with only the option to click OK.  These folders are readily accessible now from other Win 7 and 8 PCs on the network, but the same Invalid argument error now appears on the only other Linux box on the network which runs Mint Cinnamon.  My question is which argument is in invalid and how can I validate it? Ubuntu 16.04 wifi not connecting Ubuntu 16.04 wifi not connecting  Wifi not connecting on Ubuntu 16.04. When I go to network settings to turn the wifi toggle on it immediately toggles back to off.   I've tried   $ sudo service network-manager restart   as well as multiple other suggestions but nothing seems to work ...  This is what I got when I typed   $ sudo lshw -C network   into the terminal...  description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:07:00.0        logical name: enp7s0        version: 0a        serial: ec:b1:d7:df:8d:40        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8107e-2_0.0.2 02/26/15 ip=10.50.18.72 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:48 ioport:3000(size=256) memory:c3104000-c3104fff memory:c3100000-c3103fff   *-network DISABLED        description: Wireless interface        product: Wireless 3160        vendor: Intel Corporation        physical id: 0        bus info: pci@0000:08:00.0        logical name: wlp8s0        version: 83        serial: 34:e6:ad:9b:9c:63        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-47-generic firmware=16.242414.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn        resources: irq:52 memory:c3000000-c3001fff  I don't think the card is recognised with ifconfig   enp7s0    Link encap:Ethernet  HWaddr ec:b1:d7:df:8d:40             inet addr:10.50.18.72  Bcast:10.50.31.255  Mask:255.255.240.0           inet6 addr: fe80::18b2:f378:6027:7c2b/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15630 errors:0 dropped:0 overruns:0 frame:0           TX packets:7899 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:6370690 (6.3 MB)  TX bytes:1605183 (1.6 MB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:2709 errors:0 dropped:0 overruns:0 frame:0           TX packets:2709 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1            RX bytes:217671 (217.6 KB)  TX bytes:217671 (217.6 KB)   but I think it's recognised in $ sudo lspci -vnn    08:00.0 Network controller [0280]: Intel Corporation Wireless 3160 [8086:08b3] (rev 83)     Subsystem: Intel Corporation Dual Band Wireless AC 3160 [8086:8070]     Flags: bus master, fast devsel, latency 0, IRQ 52     Memory at c3000000 (64-bit, non-prefetchable) [size=8K]     Capabilities: [c8] Power Management version 3     Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+     Capabilities: [40] Express Endpoint, MSI 00     Capabilities: [100] Advanced Error Reporting     Capabilities: [140] Device Serial Number 34-e6-ad-ff-ff-9b-9c-63     Capabilities: [14c] Latency Tolerance Reporting     Capabilities: [154] Vendor Specific Information: ID=cafe Rev=1 Len=014      Kernel driver in use: iwlwifi     Kernel modules: iwlwifi  Edit: $ rfkill list prints   0: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   I'd greatly appreciate any help, Thanks in advance. This is my circuit. I need to find the power dissipated by Vlamp. So the lamp turns on if the Vlamp is more than 2V. When the lamp is on it has an internal resistance of 10 Ohms, and when it is off it acts like an open circuit.  How would I find the power dissipated? I know how to do it for Voltage sources and Resistors, but not elements like these.  One more thing, I already figured out that: Battery has open circuit voltage of 4V R1 = 5 Ohms R2 = 5 Ohms k = 0.2A/V When lamp on and Vlamp = 2V, Rbat = 10 Ohms   . How do I change fonts and adjust their size? I've been finding fonts on the internet and  on my system.   What's the easiest way to change my fonts? I would prefer an easy to use graphical way, but answers with command line recommendations are also welcome. Can I add new methods to the String class in Java? How confident is my model? Is there a way to know? Why is electric field lines away from (+) and toward (-)? I have a questions about the electric field lines.   Well in the basic learning, we know that:   The electric field lines extend away from a positive charge They move forward a negative charge   Let's take parallel plates, which make a uniform electric field.If we take the basic learning, which I mentioned, in accounts, it's very easy to understand that this is the direction of a positive charge object if we put the object between the plate (move away the positive charged plate and toward negatively charged plate).  The problem is if we put a negative charged object between. Isn't the electric field reversed ? sudo: /etc/sudoers is owned by uid 501, should be 0 To run programs as sudo without password, I edited /etc/sudoers with wrong content.   Then I re-edited it with Mac's default text editor(course sudo cannot be used when /etc/sudoers is wrong).  I tried to run sudo agin, and get this error:   sudo: /etc/sudoers is owned by uid 501, should be 0 sudo: no valid sudoers sources found, quitting   What should I do? I cannot remember the root password (maybe I haven't ever set root password before). I found native people prefer to use passive voice in a sentence. For example:  Tonight's moon can be seen from anywhere worldwide. We have reason to believe that progress can be made.  Be honest, it's difficult for an English learner to understand. Why not phrase it this way:  We can see the moon from anywhere worldwide.  In which cases do people prefer to use passive voice rather than active voice? I am part of a “study team” that authored a paper. How do I list in in my CV? Edit a truetype font I'm trying to find a free tool (on windows ) that would enable me to change some settings on a TrueType font. Specifically, I'm trying to fix the following errors:  E1311 The macStyle bold bit doesn't match the name table's font subfamily string macStyle bold bit is set, but subfamily is Regular  W2000 The subfamily string is inconsistent with the style of the font OS/2.fsSelection bold bit is set, but subfamily string = 'Regular'  I can do that with fontographer, but would prefer to use something free.  Fontforge doesn't seem to work with this font, when saved it corrupts the cyrillic letters in the font.