I have been tasked with making a tool, that when you open it you can choose from a list in a dropdown box, which then populates the second dropdown box with a sublist, like so:    However I only have a basic understanding of Python and I barely understand GIS, so this is a giant learning experience for me. I have tried using ESRI's site and this community, but alas I am still horribly stuck.  Where it goes wrong is at "self.params.filter.list =" I can make it work with if I give it a list like ["Option 1", "Option 2"], however i already have the list "mergedList" where I have the values I want, but I cannot for the life of me make it work.   I have tried with: self.params.filter.list = mergedList  and  self.params.filter.list = sorted(mergedList.keys()) and one other which eludes my brain right now.  Current code, it only has one of the params, since I can't get that to work I haven't done the other one.  import arcpy  class ToolValidator(object):   """Class for validating a tool's parameter values and controlling   the behavior of the tool's dialog."""    def __init__(self):     """Setup arcpy and the list of tool parameters."""     self.params = arcpy.GetParameterInfo()    def initializeParameters(self):     """Refine the properties of a tool's parameters.  This method is     called when the tool is opened."""      # Variables for Cursor     featureClassName = r'ArcGIS_Drift_Grundkort_DB.GISGRUNDKORT.Jordstykke'     cursorNavn = "ELAVSNAVN"     cursorNr = "MATRNR"      #Generate empty Lists     listNavn = []     listNr = []      #Populate lists     with arcpy.da.SearchCursor(featureClassName, (cursorNavn,)) as cursor:         for row in cursor:             listNavn.append(row)      with arcpy.da.SearchCursor(featureClassName, (cursorNr,)) as cursor:         for row in cursor:             listNr.append(row)      #Merge lists into a single list with keys     mergedList = {}     for i, v in enumerate(listNavn):         mergedList[v] = mergedList.get(v, []) + [listNr[i]]      #toolbox stuff     self.params[1].filter.list = mergedList      return    def updateParameters(self):     """Modify the values and properties of parameters before internal     validation is performed.  This method is called whenever a parameter     has been changed."""     return    def updateMessages(self):     """Modify the messages created by internal validation for each tool     parameter.  This method is called after internal validation."""     return   It is very likely there is a better way of doing this, I just need the unique data from column A (ELAVSNAVN) which is like companies and then a sublist with the numbers (MATRNR) that goes with that.  The tool itself is incomplete since i am stuck on just the list part, just need some pointers / tips for that.
I have a python script that checks file path names for corresponding files in a drive location. All of the inputs were originally hard coded, and it works well enough:      import arcpy     import os     shp = r"C:\Users\dotwell\Desktop\Locations.shp"     fields = ["ZdriveLoc"]     f = open (r"C:\Users\dotwell\Desktop\ValMapsTest.txt", "w")     cursor = arcpy.da.SearchCursor (shp, fields)         for row in cursor:             Roll=str(row[0])             if not os.path.exists(Roll):             f.write(Roll + os.linesep)       f.close()   I'm trying to create an ArcGIS script tool from this, and I've only had partial success. I can use   shp = arcpy.GetParameterAsText(0)   to allow the user to select the shapefile. I'd like to then have a drop down list of the fields in that shapefile for the user to select the field that contains the path names, but I can't get it to work. Can someone show me how to generate the drop down? Here's my latest try. It works, but requires the user to type in the field name. It would also be nice for the user to designate the output text file name and location.   import arcpy import os shapefile = arcpy.GetParameterAsText(0) field = arcpy.GetParameterAsText(1) f = open (r"C:\Users\dotwell\Desktop\ValMapsTemp.txt", "w") cursor = arcpy.da.SearchCursor (shapefile, field) for row in cursor:     Roll=str(row[0])     if not os.path.exists(Roll):         f.write(Roll + os.linesep)   f.close()   Here are the parameters in my ArcGIS script tool:
What is spin as it relates to subatomic particles? Can't find wifi drivers for 0bda:f179 Realtek Semiconductor Corp I'm trying to install wifi drivers for a particular mini wifi card i bought. The output of lsusb is:  0bda:f179 Realtek Semiconductor Corp   I've searched everywhere for drivers, but could not find anything. Any help?  Thanks Event button as a module or as user program? How do you do load testing and capacity planning for web sites? This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general. The Wifi is working fine but no internet connection in Windows 8 In a Silverlight application I'm trying to find out when a property on a usercontrol has changed. I'm interested in one particular DependencyProperty, but unfortunately the control itself doesn't implement INotifyPropertyChanged.  Is there any other way of determining if the value has changed? "Can’t help but" vs. "can help but" Is "can’t help but" considered to be a confused mix of the expressions "can but" and "can’t help"? If not, what is the difference between "can help but" and "can’t help but"? Join lines from two files If I put my phone on my notebook's left corner, it shuts down. Can anybody give me reliable explanation as to why this is happening?? Let $G$ be a lie group with lie algebra $\frak{g}$. Let $Aut(\frak g)$ be the automorphism group of $\frak{g}$.   Its clear to me that $Aut(\frak{g})$ $\subset GL(\frak{g})$ since any automorphism of $\frak{g}$ is also a linear transformation. Now i have several questions:   How do i prove that $Aut(\frak{g})$ is actually a lie subgroup of $GL(\frak{g})$? I've tried playing with actions to realize $Aut(\frak g)$ as an orbit or an isotropy subgroup but nothing worked out... Say $H \subset G$ is an abstract subgroup (not necessarily lie). Are the following statements equivalent?   $$\{T_e H \text{  is closed under the lie bracket of } \frak{g} \}$$  $$ \{H \text{is a lie subgroup of } G\}$$   How does the lie algebra of $Aut(\frak g)$ look like? When does $Aut(\frak g)$ $= G$? what does $Aut(\frak g)$ tell me about $G$? How to show $\lim_{n \to \infty} \sqrt[n]{a^n+b^n}=\max \{a,b\}$? Why General Leibniz rule and Newton's Binomial are so similar? The binomial expansion:  $$(x+y)^{n} = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k}$$  The General Leibniz rule (used as a generalization of the product rule for derivatives):  $$(fg)^{(n)} = \sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}$$  Both formulas can be obtained simply by induction; Newton's binomial also has a combinatorial proof . It's striking how these formulas are similar; is there a possible connection between them? I was thinking that maybe the General Leibniz rule could be obtained using a combinatorial argument as well (hence the binomial coefficients)... How to write a function (piecewise) with bracket outside? How to write this Piecewise function using LaTeX?  I tried $ \begin{array}{cc}   \{ &amp;      \begin{array}{cc}       0 &amp; x\leq 0 \\       \frac{100-x}{100} &amp; 0\leq x\leq 100 \\       0 &amp; 100\leq x     \end{array} \end{array} $  but it didn't work perfectly, the bracket &quot;{&quot; looks small, see: Realtek RTL8723BE Wi-Fi incredibly weak I have a HP 14-AN001NA laptop. It came with Windows 10 installed on which the Wi-Fi worked fine anywhere in the house.   However I removed Windows 10 and installed Ubuntu 16.04 instead and since I have had terrible Wi-Fi anywhere aside from about three foot away from the router. I don't know if it's relevant but my Wi-Fi is not called wlan0 but wlo1 for some reason (I didn't change it).  When running lspci -knn | grep Net -A3     I get the following output:  05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723] DeviceName:   Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:81c1] Kernel driver in use: rtl8723be Kernel modules: wl, rtl8723be Orbiting a specific point - Orbiting Camera How would I create a camera that with the mouse, it allows you to orbit around a specifc position, with the camera always facing that point? I would also like it to be able to always be at a constant distance from the point, and be able to orbit around it in every direction.   Any ideas? My group of 8 level 3 players are about to run through the Thundertree Ruins and will probably have a hand at fighting the dragon. My question stems from the fact that a single poison breath attack from the dragon will outright kill all but 1 player assuming they fail their saving throws.  I understand this encounter is supposed to be ridiculously deadly, but I don't want to be punishing my players for testing the lengths at which they can fight stuff. A fight should be challenging and they should be able to try and run away, but instant obliteration seems a bit much.  All PCs are level 3 (HP in parenthesis):   Wood elf moon druid  (27) dwarven frenzy barbarian (44) fire genasi archer ranger (37) (pseudodragon companion (12)) wood elf assassin rogue (27) human wild magic sorcerer (22) dragonborn fighter (29) human monk (24) human fighter (32) Why does my user number show up in the search box when clicking my profile information? Hey all-  I just noticed that if you click on your username on the top bar, when your profile shows up, in the search bar at the top you'll find an explicit search for your user account.  For my meta account, for example, I see user:157031 whenever I click on my profile.  Is this deliberate?  If so, can I suggest removing that text?  It means that I have to manually delete the contents of the search field if I want to do a search from my profile screen.  Thanks! Drawbacks of making public which journal a manuscript is submitted to, while it is under review? Many researchers list out their submitted manuscripts on their website. Some specify the journal name, like     Smith J, Oliver J (under review) My awesome paper. Nature.   while others don't, like     Smith J, Oliver J (under review) My awesome paper.   One reason I can think of as to why some don't mention the journal name is that they may get embarrassed in the case where the current journal rejects the paper. Then, the "circle" will know this paper gets rejected from Nature first and then ends up in an inferior journal.  Besides this, are there any other considerations preventing people from mentioning to which journal they submit a paper to?  P.S.: I am asking because my advisor is a researcher who only mentions accepted  papers on his webpage. As a student hunting jobs, I feel it is advantageous for me to mention my submitted papers on my webpage. I hesitate to do so, as I worry I may make my advisor unhappy by announcing in which journal our papers are currently under review. How to integrate a paper where I am third author, but did a lot of work, into my master's thesis? I am writing my thesis currently and I want to include papers that I am included on as an author.  I will have a couple papers where I am 1st author, but there is one where I am third but did a lot of the work.  How do I go about integrating it into my thesis?  Can I copy/paste most of the text still or do I need to rewrite it?  I don't want to plagiarize but don't want to rewrite it if I don't have to. Since I updated Windows to 8.1 my Grub menu disappeared. I ran Ubuntu using Live USB, I used Boot-Repair but something went wrong. If I click on Reccomended repair I get this error:     GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again. Alternatively, you can retry after activating the [Separate /boot/efi partition:] option.   So I tried to set my sda9 (I think that it's the Ubuntu system partition, since it's ext4) with the bios_grub flag and then to run Boot-Repair again. It didn't work.  I don't know what to do. My Grub was working fine (using UEFI) before I updated Windows.  I removed the bios_grub flag. Then I used fsck and it didn't find any error. So I tried again with Boot-Repair but it always gives me the "GPT detected" error. My boot is on UEFI mode, Secure Boot is "off".  When I boot my PC with SecureBoot OFF, I can reach the GRUB menu. But it's empty (the only voice is "System Setup").  I mounted my Ubuntu system disk:  sudo mount /dev/sda9 /mnt   and the other things:  sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys   I logged on the system with chroot:  sudo chroot /mnt   I re-installed grub:  grub-install /dev/sda update-grub2   But it still doesn't work.