So I just started using bodegraph but no graph at all. Always from this pdf .  \documentclass{standalone} %    \usepackage[utf8]{inputenc} %%    %    \usepackage{pgf} %    \usepackage{tikz} \usepackage{bodegraph} % per i diagrammi di Bode  \begin{document}              \begin{tikzpicture}[xscale=7/4]             \begin{scope}[yscale=3/40]             \semilog{-2}{2}{-20}{20}             \BodeGraph[asymp lines,samples=100]{-2:2}             {\POAmpAsymp{6}{0.3}}             \BodeGraph{-2:2}{\POAmp{6}{0.3}}             \end{scope}             \begin{scope}[yshift=-2.5cm,yscale=3/90]             \semilog{-2}{2}{-90}{0}             \BodeGraph[asymp lines,samples=100, const plot]{-2:2}             {\POArgAsymp{6}{0.3}}             \BodeGraph{-2:2}{\POArg{6}{0.3}}             \end{scope}             \end{tikzpicture}            \end{document}   but it only show me the empty grid. As @Marijn suggested in a previous post, I tried only with the code for the bodegraph. Still the same...   And the result shoul look more o less like this:    Tanks in advance Fr3d
I'm using pdfLatex (with --shell-escape option) and I had a problem of compilation with TexWorks that was successfully solved with the help of other post in this site: .  After correcting that error the code compiles smoothly but just displays the logarithmic grids, not the function. The gnuplot files are created in the right place, but the graphic doesn't come out in the PDF.  Code from :  \documentclass{article}  \usepackage{tikz} \usepackage{bodegraph}  \begin{document}  \begin{tikzpicture}[     gnuplot def/.append style={prefix={}}, % Fixed the issue (prefix was 'gnuplot/\jobname/' before) ] \begin{scope} \UnitedB \semilog{-1}{2}{-50}{60}  \BodeAmp{-1:1.35}{\POAmpAsymp{4}{2.0}+\IntAmp{1}}  \end{scope} \end{tikzpicture} \end{document}   Any clues?
Why is the Association Bonus ignored when trying to answer a protected question? I registered on  only to post an answer to .  However, since it's a protected question, I am not allowed to answer it. (I found this info from ).  Worth to mention, I can comment on the above question, just not post an answer.  I was under the impression that the whole point of association bonus was to bypass such limits, so why isn't that the case for answering protected questions? Employment office encounters an alien masquerading as a human I'm looking for a story where a guy who has done job interviews for years is approached by an applicant, and because of his experience talking to people (I remember he specifically mentions having done something like 250,000 interviews), he immediately is able to tell the applicant is actually an alien in human form.  He goes on to help the alien understand human emotions &amp; teaches him how to fit in. Mortarboard badges being awarded as a result of bounties after recalc I am curious about the practical implementation of a binary split in a decision tree - as it relates to levels of a categorical predictor $X{j}$.  Specifically, I often will utilize some sort of sampling scheme (e.g. bagging, oversampling etc) when building a predictive model using a decision tree - in order to improve its predictive accuracy and stability. During these sampling routines, it is possible for a categorical variable to be presented to a tree fitting algorithm with less than the complete level set.  Say a variable X takes on levels {A,B,C,D,E}. In a sample, maybe only levels {A,B,C,D} are present. Then, when the resulting tree is used for prediction, the full set may be present.  Continuing from this example, say a tree splits on X and sends {A,B} to the left and {C,D} to the right. I would expect the logic of the binary split to then say, when faced with new data: "If X has value A or B, send to the left, otherwise, send this case to the right". What seems to happen in some implementations is "if X has value A or B, send to the left, if X has value C or D send to the right". When this case takes on value E, the algorithm breaks down.   What is the "right" way for a binary split to be handled? It seems the much more robust way is implemented often, but not always (see Rpart below).  Here are a couple examples:  Rpart fails, the others are ok.  #test trees and missing values  summary(solder) table(solder$PadType)  # create train and validation set.seed(12345) t_rows&lt;-sample(1:nrow(solder),size=360, replace=FALSE) train_solder&lt;-solder[t_rows,] val_solder&lt;-solder[-t_rows,]  #look at PadType table(train_solder$PadType) table(val_solder$PadType) #set a bunch to missing levels(train_solder$PadType)[train_solder$PadType %in% c('L8','L9','W4','W9')] &lt;- 'MISSING'   #Fit several trees, may have to play with the parameters to get them to split on the variable  ####RPART mod_rpart&lt;-rpart(Solder~PadType,data=train_solder) predict(mod_rpart,val_solder) #Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = attr(object,  :  #factor 'PadType' has new level(s) D6, L6, L7, L8, L9, W4  ####TREE mod_tree&lt;-tree(Solder~PadType,data=train_solder,split="gini") predict(mod_tree,val_solder) #works fine  ####ctree mod_ctree&lt;-ctree(Solder~PadType,data=train_solder,control = ctree_control(mincriterion = 0.05)) predict(mod_ctree,val_solder) #works fine how to sort by the day of the week? I have two files.  file1:  Dave 734.838.9800   Bob 313.123.4567   Carol 248.344.5576   Mary 313.449.1390   Ted 248.496.2204   Alice 616.556.4458      file2:  Bob Tuesday   Carol Monday   Ted Sunday    Alice Wednesday   Dave Thursday     Mary Saturday     I merged the two files.  file3 should look like this:  Name      On-Call     Phone   Carol     MONDAY      248.344.5576   Bob       TUESDAY     313.123.4567   Alice     WEDNESDAY   616.556.4458   Dave      THURSDAY    734.838.9800   Nobody    FRIDAY      634.296.3356   Mary      SATURDAY    313.449.1390   Ted       SUNDAY      248.496.2204     But I cannot get the weekdays to be in order. How do I go about doing that? Are C++ Templates just Macros in disguise? I've been programming in C++ for a few years, and I've used STL quite a bit and have created my own template classes a few times to see how it's done.  Now I'm trying to integrate templates deeper into my OO design, and a nagging thought keeps coming back to me: They're just a macros, really... You could implement (rather UGLY) auto_ptrs using #defines, if you really wanted to.  This way of thinking about templates helps me understand how my code will actually work, but I feel that I must be missing the point somehow. Macros are meant evil incarnate, yet "template metaprogramming" is all the rage.  So, what ARE the real distinctions? and how can templates avoid the dangers that #define leads you into, like   Inscrutable compiler errors in places where you don't expect them? Code bloat?  Difficulty in tracing code? Setting Debugger Breakpoints? We know for a metallic conductor   Current $\frac{I}{enA} = v$ where $v$ is drift velocity , $e$ is the charge of an electron, $n$ is no of electrons per unit volume and $A$ is area of cross section.  Ok my questions that I am struggling with:   Does it depend on length of wire? (let's say if the current is the same and area is also the same but one wire is longer and one wire is shorter then is the drift velocity for both wires the same?) Does it depend on the cross sectional area of the wire? (Yes, according to the relation, if the area is greater, drift velocity is lower, correct?)   I have digged university physics still I couldn't get my answer :( . Clicking on a notification on Android app opens an empty feed When I receive a message on an SE post, I get a notification like this:    If I double tap this notification, the SE application opens, but my feed is empty approximately half the time. It looks like this:    If I refresh the feed (slide from the top), the feed does refresh and shows the new notification.   The notification, above, leads to  comment.  I haven't figured out the pattern yet, but this occurs roughly half the time I open a notification. It's occurred for chat messages, comments and answers - but not consistently. I have received notifications for the same post (for example, the two comments after the one linked above) that do not show an empty feed. But, a chat message barely 10 minutes later will show the empty feed again.  I am utilizing the beta app - version 1.0.72 on Android 5.0.1. Doubt regarding a limit which is related to MVT Let the function $f(x)$ be differentiable  and $f'(x)$ be continuous in $\left(-\infty,\infty \right)$ with $f'(2)=14$ then evaluate the limit  $$\lim_{x\to 0}\frac{f(2+\sin x)-f(2+x\cos x)}{x-\sin x}$$  My attempt:  $\lim_{x\to 0}\frac{f(2+\sin x)-f(2+x\cos x)}{x-\sin x}$  $\lim_{x\to 0}\left(\frac{f(2+\sin x)-f(2+x\cos x)}{\sin x-x\cos x}\right)$ $\frac{\sin x-x\cos x}{x-\sin x}$$=\left(f'(2)\right)(2)=28$  Is the method used here correct How do I get my device detected by ADB on Linux? I just got my shiny new Wileyfox Swift – and before putting it to use I want to oem unlock and root it (as I usually do with new devices ;) Trouble is, though  is enabled on the device, and a corresponding line in /etc/udev/rules.d/51-android.rules exists, the device is not seen by adb devices.  I know there are several answers scattered around this site, but they are either hard to find, just cover a specific device, or don't cover all steps I finally needed. So I take this as a chance for a canonical, device-independent question and give it a detailed answer below:  How can I get my Android device seen and used by adb on Linux? I am looping over the features of a shapefile containing multiple polygons. If  certain criteria are met, I want to save the current feature in a new shapefile.  I am doing this using GDAL 1.10.0 with Python 2.7.3  The code runs, creates the files I want, calculates the area correctly. In the shapefile that is created, the attribute table contains the propoer fields ('name' and FID). Two things are wrong:   No polygons are visible (in ArcMap). This seems to me particularly weird, because the polygons seem to me proper, in the sense that they are closed (and the area is calculated properly).  The coordinate system seems off (in Arc Catalog there appears in the bottom -20,9667 0,0000 (are these degrees??)), despite the fact that I am creating a projection file (they are in German national grid 3)   Any hints as to what the problems could be? I tried to put the relevant excerpt of the code below:  from osgeo import gdal, gdalnumeric, ogr, osr, gdalconst  ### prepare shapefile into which to save driver = ogr.GetDriverByName('ESRI Shapefile') path_matched = r'.../.../path' datasource = driver.CreateDataSource(path_matched) lyr_matched = 'matched_%s' % cur_id  # from above # Remove output shapefile if it already exists name_shpfile = lyr_matched + '.shp' if os.path.exists(os.path.join(path_matched, name_shpfile)):     driver.DeleteDataSource(os.path.join(path_matched, name_shpfile)) layer = datasource.CreateLayer(lyr_matched, geom_type=ogr.wkbPolygon) #layer.ResetReading() field_name = ogr.FieldDefn("name", ogr.OFTString) layer.CreateField(field_name)  ### prepare file in which I want to write the areas of matched polygons path_area = path_matched file_area = 'matched_area_%s.txt' % (cur_id) fobj_area = open(os.path.join(path_area, file_area), 'w')  ### original shape file containing all polygons shp = ogr.Open(shp_all)  # os fobj from above lyr = shp.GetLayer()  # loop over polygons in original shameful for FID in featList:     feat = lyr.GetFeature(FID)      # this is from the shapefile      cur_name = feat.GetField(1)      # ... work on conditions ...      if condition = true:         myPoly = ogr.Geometry(type=ogr.wkbPolygon)         cur_poly = feat.GetGeometryRef()         myPoly.AddGeometry(cur_poly)         cur_spat_ref = cur_poly.GetSpatialReference()          cur_area =  cur_poly.GetArea()         cur_area_string = "%s \t %f \n" % (gw_name_EZG, cur_area)         fobj_area.write(cur_area_string)          featur_dfn = layer.GetLayerDefn()         feature_abc = ogr.Feature(featur_dfn)         feature_abc.SetGeometry(myPoly)         feature_abc.SetField("name", cur_name)         feature_abc.SetFID(FID)         layer.CreateFeature(feature_abc)         myPoly.Destroy()         feature.Destroy()   # generate projection file prj_filename = lyr_matched + '.prj' file = open(os.path.join(path_matched, prj_filename), 'w') targetSR = cur_spat_ref targetSR.MorphToESRI() file.write(targetSR.ExportToWkt()) file.close()   datasource.Destroy() I can't install Rainlendar 2 on my Ubuntu 18.04, I found this solution for 16.04 (), followed it, seems to work, but after install, there's no Rainlendar in my Show Apps, so I'm not sure what went wrong. When I issued sudo dpkg -i rainlendar2-pro_2.12.2.b138-1_amd64.deb, I got this:   Selecting previously unselected package rainlendar2-pro. (Reading database ... 190677 files and directories currently installed.) Preparing to unpack rainlendar2-pro_2.12.2.b138-1_amd64.deb ... Unpacking rainlendar2-pro (2.12.2.b138-1) ... dpkg: dependency problems prevent configuration of rainlendar2-pro:  rainlendar2-pro depends on libpng12-0; however:   Package libpng12-0 is not installed.  rainlendar2-pro depends on tofrodos; however:   Package tofrodos is not installed.  rainlendar2-pro depends on libjpeg62; however:   Package libjpeg62 is not installed.  rainlendar2-pro depends on libwebkitgtk-1.0-0; however:   Package libwebkitgtk-1.0-0 is not installed.  dpkg: error processing package rainlendar2-pro (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-11ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Errors were encountered while processing:  rainlendar2-pro   I got this after issuing this command in terminal sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED:   rainlendar2-pro 0 upgraded, 0 newly installed, 1 to remove and 35 not upgraded. 1 not fully installed or removed. After this operation, 20.5 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 191316 files and directories currently installed.) Removing rainlendar2-pro (2.12.2.b138-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...   What I'm doing wrong? After the last command it just removed Rainlendar and not installing dependencies as stated in the original post? TIA What makes the number of neutrons the number of proton similar? Why must a planet be in a star's "habitable zone" to have life? Unexpected AdjacencyMatrix output How can I get my external IP address in a shell script? Root of unity for $n+1$ Let $n \ge 1$ and $u_{1},u_{2},...,u_{n}$ are all root of unity for $n+1$ and there are different from $1$.(a) Find polynomial $f \in \mathbb R[x]$ of degree $n$ for which: $f(u_{k})=0$ for $k=1,2,...,n$.(b) Calculate real coefficient and imaginary part for $(2-u_{1})(2-u_{2})\cdot...\cdot(2-u_{n}).$    I have a knowledge about root of unity but I completely don't know how to do it because I think that I need some extra trick to do it but my ideas finished. I know that $\varepsilon_n^{(k)} = \cos\left(\tfrac{2k\pi}{n}\right) + i\sin\left(\tfrac{2k\pi}{n}\right) = e^\frac{2\pi i k}{n}$ and for $n&gt;1$ $\sum _{{k=0}}^{{n-1}}e^{{\frac  {2\pi ik}{n}}}=0$ but I think it is too little knowledge to solve this task.Can you help me? What blocks can Endermen pick up and what blocks they can't? Does one work in or on an aeroplane? In an exam paper, there was a picture of an air stewardess in the aeroplane serving passengers. One of my pupils wrote the following:      The air stewardess works on an aeroplane.    Shouldn't it be the air stewardess works in an aeroplane? Show that $\{\cos\ n:n \in \mathbb{N}\}$ is dense in $[-1,1]$ by using the fact below:      Suppose $x$ is irrational. Then there exists $p_n,q_n \in \mathbb{Z}$   such that $\bigg|x -\frac{p_n}{q_n}\bigg| &lt; \frac{1}{q_n^2}$   I have no idea on how to apply the fact above to show the set is dense in $[-1,1]$. Can anyone help me?