Here is the entire question I am trying to solve:  Implement a function getCustomerList that takes as argument filename to read the file and return it as a nested list, where each element is a list of [, &lt;Clerk’s Desk&gt;, ]. The filename argument doesn’t contain the extension (i.e. “input”), your program must automatically add the “.txt” extension. If the file doesn’t exist, the getCustomerList function will print the message: “Error!  not found.”, and should return None.  My Problem: I am having trouble in getting the last item (minutes) to return WITHOUT quotes. Here are my expected and actual results:  Name, Desk, Minutes   Here is my code:  def getCustomerList(filename):     current_file = filename + &quot;.txt&quot;     data = []      # write code to check if file exist and return List/None     try:         open_file = open(current_file, &quot;r&quot;)             for aline in open_file:             values = aline.split(&quot;,&quot;) # Break each line into a list             lines = [(n.rstrip('\n')) for n in values]             data.append(lines) # Add the row to the list         return data[1:]         print(data)          except IOError:         print(&quot;Error! &quot; + current_file + &quot; not found.&quot;)
In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int.
How to find the inverse modulo $m$? For example: $$7x \equiv 1 \pmod{31} $$ In this example, the modular inverse of $7$ with respect to $31$ is $9$. How can we find out that $9$? What are the steps that I need to do? Update If I have a general modulo equation: $$5x + 1 \equiv 2 \pmod{6}$$ What is the fastest way to solve it? My initial thought was: $$5x + 1 \equiv 2 \pmod{6}$$ $$\Leftrightarrow 5x + 1 - 1\equiv 2 - 1 \pmod{6}$$ $$\Leftrightarrow 5x \equiv 1 \pmod{6}$$ Then solve for the inverse of $5$ modulo 6. Is it a right approach? Thanks. Often more than one person contributes to the community coming up with the final accepted answer to a question. However, it is only possible to accept a single answer. Restricting to one final answer does make sense for the sake of referencing that answer later, but in many cases that answer is the product of the input from several individuals. I would like to be able to decide how much of a bounty goes to different users, or some other mechanism to recognize the contribution of multiple users. Of course I could always upvote their previous answers, but this is really incorrect if their previous answers aren't the complete, final answer I've accepted.  What think you metaSOrs? Can EU citizens travel to UK after Brexit with just an identity card? How to create a cable/wire for animation? So I've created a "noodle" with a path and a bezier Circle that has soft body so that when I click play it will drop and flop about.    What I'm trying to do is have one of the cubes stationary while the other moves around having the noodle between them stretch and move around like its a cable.   Any tips on this? Program counter goes to the end of code and 8051 Restarts I have an 8051 MCU which I use keil to program it with C. My problem is that the micro-controller restarts at the end of some functions while they should return.  Using a debugger I tried to check it line by line. And I figured out the the MCU is not restated right after the end of the function. The PC(progam counter) goes to somewhere else (sometime somewhere that there is not any code to execute) and then it increases one by one until the end of code. It is very strange for me because I write my code in C and never seen the type of error previously.    I think this problem might be related to the compiler settings and thus I post the settings here:   Assembler settings: XR GEN DB EP NOMOD51  Compiler settings:  DB OE BR LARGE OPTIMIZE(11, SIZE) DEFINE(SILABS_PLATFORM_WMB912) DEFINE(SILABS_WMCU_SI106x)  Linker settings: CODE REMOVEUNUSED CLASSES(BIT(0x20.0-0x2F.7), DATA(D:0-D:0x7F), IDATA(I:0-I:0xFF), XDATA(X:0-X:0xFFF), CODE(C:0-C:0xFBFF), CONST(C:0-C:0xFBFF))  I tried both large and small settings but the problem remains. Kindly help me if you know the reason. How to make a water vortex I'm very new to Blender and I'm trying to make a water vortex like this.(may be not the easyest first project for a newbie)     I watched several tutorial on liquids particle etc but I'm not sure what is the best aproach. What I tried  until now:   I made a particle system with a vortex force field. It looks good, but I'm not able to add the right material.      I played around with the fluid physics, the water looks good but if I add a vortex force field it does nothing.   I would be very grateful if somebody could point me in the right direction because I'm definitely stocked. Character Limit in HTML Is there any analytics information that moderators can access for individual questions? How can I repair grub? (How to get Ubuntu back after installing Windows?) I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back? Excessive fields in biblatex could not be removed if using \fullcite Combination of biblatex-chicago and Zotero produces many excessive fileds in the bibliography. This problem could be solved by adding to the preambule caveats like this:  \AtEveryBibitem{% \ifentrytype{online} {} {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}   (Described in detail in the answer to my previous question: .)    This solution worked well for me, but now I have to produce a syllabus using \fullcite command. Unfortunately, this solution does not solve the problem for full bibliographic entries outside of the bibliography itself.  Here is the code with bibliography inside (to get the author's first and last name in the right order I use the following solution: ):    \begin{filecontents*}{database.bib}     @book{dalton_apartisan_2012,         title = {The Apartisan American: Dealignment and Changing Electoral Politics},         isbn = {9781452216942},         url = {http://books.google.com/books?id=eYkczUyX5wMC},         shorttitle = {The Apartisan American},         pagetotal = {241},         publisher = {{CQ} Press},         author = {Dalton, Russell J.},         urldate = {2014-04-03},         date = {2012-02-22},         langid = {english},         keywords = {Political Science / Political Process / Elections, Political Science / Public Policy / General}     } \end{filecontents*} \documentclass[11pt]{article} \usepackage[hmargin=3cm,vmargin=3cm]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage{amssymb,amsmath,amsthm} \usepackage{booktabs,graphicx} \usepackage{paralist} \usepackage{cancel,soul} \usepackage{enumitem} \usepackage[authordate,backend=biber,bibencoding=utf8,bookpages=false,doi=only,isbn=false,footmarkoff]{biblatex-chicago} \usepackage[colorlinks, pdfstartview={XYZ null null 1.25},bookmarksopen=true,bookmarksopenlevel=\maxdimen,citecolor={blue},urlcolor={blue}]{hyperref} \addbibresource{database.bib} \DeclareCiteCommand{\fullcite} {\usebibmacro{prenote}} {\usedriver     {}     {\thefield{entrytype}}} {\multicitedelim} {\usebibmacro{postnote}} \AtEveryBibitem{%     \ifthenelse{\ifentrytype{article}\OR\ifentrytype{book}\OR\ifentrytype{collection}\OR\ifentrytype{incollection}\OR\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR\ifentrytype{mvincollection}}     {\clearfield{month}\clearfield{url}\clearfield{doi}\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}   \begin{document} \begin{center} {\huge Partisanship in Old, New and Non-Democracies}\\ \end{center}  \vspace{30pt} \noindent\textbf{Instructor: }  \hfill \textbf{Time and Location:} TBA\\ \textbf{Contact:}  \hfill \hfil \textbf{Office Hours:} TBA\\  \vspace{-20pt}    \subsection*{Partisanship in the United States}   \begin{enumerate}     \item \parencite{dalton_apartisan_2012}     \item \fullcite{dalton_apartisan_2012} \end{enumerate}  \printbibliography[heading=bibintoc]  \end{document}    Here is the output. Note the excessive fileds in the in-text full citation (they are absent in the References):    Any help, especially simple acessible solutions would be greatlly apreciated. How to make child process die after parent exits? I  as unclear what you're asking after receiving flags on it in the moderator queue.   Once I did that, the text for the question title in the moderator queue changed from:     How to use handler to display images from database without passing ID in querystring?    to     How to use handler to display images from database without passing ID in querystring? [undefined more votes needed]    The text on the main page has stayed consistent with the new 'on hold' verbiage, however.  Here's a screenshot: The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this? I'm trying to run multiple Nodejs applications on Nginx server running on CentOS 7. I noticed that when I run a Nodejs app on some ports I get an 502 Bad Gateway error in the browser so I checked the error logs:  [notice] 12806#0: signal process started [crit] 12807#0: *13 connect() to 127.0.0.1:7777 failed (13: Permission denied) while connecting to upstream, client: **.**.99.58, server: myapp.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:7777/", host: "myapp.com" [crit] 12807#0: *13 connect() to [::1]:7777 failed (13: Permission denied) while connecting to upstream, client: **.**.99.58, server: myapp.com, request: "GET / HTTP/1.1", upstream: "http://[::1]:7777/", host: "myapp.com"   when I change the app to listen to 8008 for example everything is working fine. I checked permissions and if the process is running as root and everything seems ok. I played with the timeouts as well but no result. Can anyone help? Is there any function that converts an escaped Url string to its unescaped form? System.Web.HttpUtility.UrlDecode() can do that job but I don't want to add a reference to System.Web.dll. Since my app is not a web application, I don't want to add a dependency for only using a function in an assembly.  UPDATE: Check  about the same issue. When to use self references or composition? Cauchy-Product of non-absolutely convergent series While grading some basic coursework on analysis, I read an argument, that a Cauchy product of two series that converge but not absolutely can never converge i.e. if $\sum a_n$, $\sum b_n$ converge but not absolutely, the series $\sum c_n$ with $$c_n= \sum_{k=0}^n a_{n-k}b_k$$ diverges.  Although we didn't have any theorem in the course stating something like this, it made me wonder if it was true. Tried to add a comment to a post today, which ended up looking rather weird. What I had typed was:  On windows I believe you need to use `\` instead of `/`   As you can see in the first comment to this question, I don't exactly end up with what I thought I would... What's going on here?  Tried various combinations of double \\ and double `` (which seems to be impossible to have in an inline code thing...?), but couldn't get a good result. Ended up putting a space after the slash, which at least made it readable. Problem then was that the space between the inline code and the word "instead" seems to disappear O.o intuition on the fundamental group of $S^1$ I am familiar with the proof that the fundamental group of the unit circle $S^1$ is $\mathbb Z$, yet I couldn't develop intuition for why it is true. For example, why would I fail if I try to find homotopy from a path that circles $S^1$ once to the path that stays at one point all the time? What brakes the continuity of such a homotopy? Graphing $y = \frac{x^2-4}{x-2}$ I'm trying to graph the function $y = \frac{x^2-4}{x-2}$.  I factored the numerator into $(x+2)(x-2)$, and then canceled the common factor (x-2), leaving the function as $y = x + 2$.    Is it acceptable to graph the original function as $y = x + 2$, a straight line with domain and range all real numbers?  Or do you have to restrict the domain as in the original function?  Thanks, Sean