Search Results

Search found 36179 results on 1448 pages for 'generic list'.

Page 70/1448 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • Ubuntu not showing complete list of partitions while installing 10.04 and 10.10

    - by Ravi
    I am a total beginner to Ubuntu. I have tried to install Ubuntu on my 320 gb hard disk and am stuck at the partition page. The problem is, Ubuntu is not showing all the partitions. When I run the live CD and try to see all the drives these are not present. I have presently 4 drives, C: 58 GB D: 48 GB E: 87 GB and F: 102 GB. The F: drive is not shown; at the time of installing it does not show any of the drives, just a chunk of 257 GB, hence I am unable to install Ubuntu on my D: drive. On the C: drive, Windows 7 64 bit is installed.

    Read the article

  • Entity Framework Generic Repository Error

    - by Jeff Ancel
    I am trying to create a very generic generics repository for my Entity Framework repository that has the basic CRUD statements and uses an Interface. I have hit a brick wall head first and been knocked over. Here is my code, written in a console application, using a Entity Framework Model, with a table named Hurl. Simply trying to pull back the object by its ID. Here is the full application code. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Objects; using System.Linq.Expressions; using System.Reflection; using System.Data.Objects.DataClasses; namespace GenericsPlay { class Program { static void Main(string[] args) { var hs = new HurlRepository(new hurladminEntity()); var hurl = hs.Load<Hurl>(h => h.Id == 1); Console.Write(hurl.ShortUrl); Console.ReadLine(); } } public interface IHurlRepository { T Load<T>(Expression<Func<T, bool>> expression); } public class HurlRepository : IHurlRepository, IDisposable { private ObjectContext _objectContext; public HurlRepository(ObjectContext objectContext) { _objectContext = objectContext; } public ObjectContext ObjectContext { get { return _objectContext; } } private Type GetBaseType(Type type) { Type baseType = type.BaseType; if (baseType != null && baseType != typeof(EntityObject)) { return GetBaseType(type.BaseType); } return type; } private bool HasBaseType(Type type, out Type baseType) { Type originalType = type.GetType(); baseType = GetBaseType(type); return baseType != originalType; } public IQueryable<T> GetQuery<T>() { Type baseType; if (HasBaseType(typeof(T), out baseType)) { return this.ObjectContext.CreateQuery<T>("[" + baseType.Name.ToString() + "]").OfType<T>(); } else { return this.ObjectContext.CreateQuery<T>("[" + typeof(T).Name.ToString() + "]"); } } public T Load<T>(Expression<Func<T, bool>> whereCondition) { return this.GetQuery<T>().Where(whereCondition).First(); } public void Dispose() { if (_objectContext != null) { _objectContext.Dispose(); } } } } Here is the error that I am getting: System.Data.EntitySqlException was unhandled Message="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near escaped identifier, line 3, column 1." Source="System.Data.Entity" Column=1 ErrorContext="escaped identifier" ErrorDescription="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly." This is where I am attempting to extract this information from. http://blog.keithpatton.com/2008/05/29/Polymorphic+Repository+For+ADONet+Entity+Framework.aspx

    Read the article

  • flex List Size not updating when itemRenderer resizes itself

    - by duder
    I've got a list with a custom itemRenderer that's just a rectangle of specific size. The list <s:List id="thelist" width="100%" dataProvider="{thelistdata}" itemRenderer="ListItem" borderVisible="true" /> Note the list's border is visible to help with debugging The itemRenderer <s:Rect id="box" width="50" height="50"> <s:fill> <s:SolidColor color="blue"/> </s:fill> </s:Rect> When the itemRenderer receives an event, it changes its size to half box.width = 25; box.height = 25; I see the itemRenderers are resizing themselves correctly, but the list itself stays the same size and the border stays where it is. Anyone knows how to fix this bug. Basically the list should refresh its size too to fit the smaller boxes.

    Read the article

  • Where can I find a list of local japanese game publishers

    - by Erik
    What would be a good starting point for locating small or medium size game publishers in Japan. We have a US/EU released game that we believe will fit the Japanese market well, and are looking for companies that we could contact for possible co-publishing. EDIT: So far, I've found http://www.gamebusiness.jp/directory/category.php?id=10002 and from one answer, http://www.gamedevmap.com/index.php?query=Japan&Submit=Search Starting a bounty, I need as many publishers as I can get.

    Read the article

  • Saving a list of points into a text file

    - by dylanisawesome1
    I recently posted a question about this, but was not really sure where to go. I've gotten some progress, and have generated some simple noise here: http://pastie.org/5408655 That works well enough for me, but I would really like to be able to save the points into an ascii text file. currently it's formatted so that something like this: http://pastie.org/5409311 would create a square. I need to save in this format with the points(and lines connecting them) generated in the method above. Essentially, I need to write the array of points created in the first example to a text file formatted like the second example.

    Read the article

  • The width of a list that contains an embedded matrix grows unexpectedly

    - by Greg Lorenz
    I have a report in reporting services 2005 that includes a list with an embedded matrix and am attempting to put a border on the list, however, when I run the report in visual studio the matrix is growing past the end of the page and therefore the boarder is growing with it causing it to grow into the second page. It appears that there was supposedly a fix for this in reporting services 2000 service pack 1 but I am still experianceing the issue in 2005. The list has a details group that limits the records on a row to 4 using the following expression: =ceiling(rownumber("list1")/4), the matrix has a column group that should recycle those based on the rownumber determined by the list using the following expression: =rowNumber("list1_Details_Group") I have also attempted to put the list in a rectangle in hopes to stop the matrix from growing to no avail. How do I effectivly stop the matrix form growing past the space allowed by the list control?

    Read the article

  • Decorator Pattern on List<T> for DataGridView

    - by elector
    Hi all, I would like to apply a Decorator on List class and be able to bind it to the WinForms DataGirdView. I would like to know what members of List i need to implement for this new class to be able to bind it to DataGrid. Some of the methods from List I would hide with my decorated class methods and others I would just call _decoratedList.Method(). Is this an option for implementing Decorator on List type? Decorator: public class MyCustomList : List<MyObject> { List<MyObject> _decoratedList; . . . }

    Read the article

  • Ubuntu error: no candidate ver

    - by codedude
    Ok...so for some reason by Ubuntu 10.04 partition won't startup anymore. I'm not exactly sure what I did. I have the feeling that I accidentally removed some important packages. However, when I startup in Recovery Mode and select "dpkg: repair broken packages" I get this output: rm: cannot remove /var/lib/apt/lists/partial/*': No such file or directory rm: cannot remove/var/cache/apt/archives/partial/*': No such file or directory Reading Cache Reading Package lists: Done Reading State Information: Done Reading State Information: Done Reading State Information: Done No candidate ver: libisc44 No candidate ver: readahead No candidate ver: libdirectfb-1.0-0 No candidate ver: upstart-logd No candidate ver: libparted1.8-10 No candidate ver: libflickrnet2.1.5-cil No candidate ver: libicu38 No candidate ver: fast-user-switch-applet No candidate ver: linux-restricted-modules-2.6.28-11-generic No candidate ver: libnm-util0 No candidate ver: libwebkit-1.0-1 No candidate ver: libopal3.6.1 No candidate ver: libbind9-40 No candidate ver: linux-restricted-modules-common No candidate ver: upstart-compat-sysv No candidate ver: linux-restricted-modules-2.6.28-13-generic No candidate ver: chromium-browser No candidate ver: libisc45 No candidate ver: belocs-locales-bin No candidate ver: libxcb-xlib0 No candidate ver: libpoppler4 No candidate ver: libpulsecore9 No candidate ver: libpulsecore5 No candidate ver: linux-image-2.6.28-15-generic No candidate ver: libntfs-3g49 No candidate ver: libisccfg40 No candidate ver: libavahi-core5 No candidate ver: linux-restricted-modules-2.6.27-7-generic No candidate ver: libparted1.8-9 No candidate ver: libmagickwand1 No candidate ver: libwvstreams4.4-base No candidate ver: linux-image-2.6.28-14-generic No candidate ver: libraw1394-8 No candidate ver: libdatrie0 No candidate ver: libboost-program-options1.35.0 No candidate ver: libgnomekbdui3 No candidate ver: libsgutils1 No candidate ver: libass1 No candidate ver: linux-restricted-modules-2.6.28-15-generic No candidate ver: libindicate1 No candidate ver: libgnomekbd3 No candidate ver: system-services No candidate ver: linux-image-2.6.28-13-generic No candidate ver: libmagick10 No candidate ver: libcolamd-3.2.0 No candidate ver: desktop-effects-kde No candidate ver: picasa No candidate ver: libgnome-desktop-2-7 No candidate ver: libntfs-3g28 No candidate ver: libxklavier12 No candidate ver: libgpod3 No candidate ver: libmagickcore1 No candidate ver: libffado0 No candidate ver: libzephyr3 No candidate ver: libuniconf4.4 No candidate ver: libmbca0 No candidate ver: liblwres40 No candidate ver: hotkey-setup No candidate ver: libkrb53 No candidate ver: ttf-bitstream-vera No candidate ver: libee12-2 No candidate ver: libopal-2.2 No candidate ver: songbird No candidate ver: plib1.8.4c2 No candidate ver: linux-image-2.6.27-7-generic No candidate ver: libpoppler3 No candidate ver: google-chrome-unstable No candidate ver: linux-image-2.6.28-11-generic No candidate ver: linux-restricted-modules-2.6.28-14-generic No candidate ver: simgear1.0.0 No candidate ver: libpoppler-glib3 No candidate ver: mono-common No candidate ver: libx264-65 No candidate ver: libwvstreams4.4-extras No candidate ver: libdns43 No candidate ver: libnm-glib0 No candidate ver: libpt2.6.1 No candidate ver: libisccc40 No candidate ver: libdns45 No candidate ver: libisc44 No candidate ver: readahead No candidate ver: libdirectfb-1.0-0 No candidate ver: upstart-logd No candidate ver: libparted1.8-10 No candidate ver: libflickrnet2.1.5-cil No candidate ver: libicu38 No candidate ver: fast-user-switch-applet No candidate ver: linux-restricted-modules-2.6.28-11-generic No candidate ver: libnm-util0 No candidate ver: libwebkit-1.0-1 No candidate ver: libopal3.6.1 No candidate ver: libbind9-40 No candidate ver: linux-restricted-modules-common No candidate ver: upstart-compat-sysv No candidate ver: linux-restricted-modules-2.6.28-13-generic No candidate ver: chromium-browser No candidate ver: libisc45 No candidate ver: belocs-locales-bin No candidate ver: libxcb-xlib0 No candidate ver: libpoppler4 No candidate ver: libpulsecore9 No candidate ver: lipulsecore5 No candidate ver: linux-image-2.6.28-15-generic No candidate ver: libntfs-3g49 No candidate ver: libisccfg40 No candidate ver: libavahi-core5 No candidate ver: linux-restricted-modules-2.6.27-7-generic No candidate ver: libparted1.8-9 No candidate ver: libmagickwand1 No candidate ver: linux-image-2.6.28-14-generic No candidate ver: libraw1394-8 No candidate ver: libdatrie0 No candidate ver: libboost-program-options1.35.0 No candidate ver: libgnomekbdui3 No candidate ver: libsgutils1 No candidate ver: libass1 No candidate ver: linux-restricted-modules-2.6.28-15-generic No candidate ver: libindicate1 No candidate ver: libgnomekbd3 No candidate ver: system-services No candidate ver: linux-image-2.6.28-13-generic No candidate ver: libmagick10 No candidate ver: libcolamd-3.2.0 No candidate ver: desktop-effects-kde No candidate ver: picasa No candidate ver: libgnome-desktop-2-7 No candidate ver: libntfs-3g28 No candidate ver: libxklavier12 No candidate ver: libgpod3 No candidate ver: libmagickcore1 No candidate ver: libffado0 No candidate ver: libzephyr3 No candidate ver: libuniconf4.4 No candidate ver: libmbca0 No candidate ver: liblwres40 No candidate ver: hotkey-setup No candidate ver: libkrb53 No candidate ver: ttf-bitstream-vera No candidate ver: libeel2-2 No candidate ver: libopal-2.2 No candidate ver: songbird No candidate ver: plib1.8.4c2 No candidate ver: linux-image-2.6.27-7-generic No candidate ver: libpoppler3 No candidate ver: google-chrome-unstable No candidate ver: linux-image-2.6.28-11-generic No candidate ver: linux-restricted-modules-2.6.28-14-generic No candidate ver: simgear1.0.0 No candidate ver: libpoppler-glib3 No candidate ver: mono-common No candidate ver: libx264-65 No candidate ver: libwvstreams4.4-extras No candidate ver: libdns43 No candidate ver: libnm-glib0 No candidate ver: libpt2.6.1 No candidate ver: libisccc40 No candidate ver: libdns45 Your system is up-to-date There are no upgrades available for your system. The upgrade will now be canceled. Do you want to start the upgrdae? Continue [yN] Details [d] (Sorry that is so long...) I'm assuming I'm missing each of those packages. However, when I try to install them, for example: sudo apt-get install libisc44 I get some response that this package is missing and/or it may be part of another package. I'm not exactly sure what I should do. I don't want to reinstall ubuntu, since I have it dual booted with Windows Vista and I don't want to risk anything on the Windows partition. What are your thoughts? EDIT: I've posted this on Ubuntu Forums and nobody ever responded so...yah

    Read the article

  • Ubuntu error: no candidate ver

    - by codedude
    Ok...so for some reason by Ubuntu 10.04 partition won't startup anymore. I'm not exactly sure what I did. I have the feeling that I accidentally removed some important packages. However, when I startup in Recovery Mode and select "dpkg: repair broken packages" I get this output: rm: cannot remove /var/lib/apt/lists/partial/*': No such file or directory rm: cannot remove/var/cache/apt/archives/partial/*': No such file or directory Reading Cache Reading Package lists: Done Reading State Information: Done Reading State Information: Done Reading State Information: Done No candidate ver: libisc44 No candidate ver: readahead No candidate ver: libdirectfb-1.0-0 No candidate ver: upstart-logd No candidate ver: libparted1.8-10 No candidate ver: libflickrnet2.1.5-cil No candidate ver: libicu38 No candidate ver: fast-user-switch-applet No candidate ver: linux-restricted-modules-2.6.28-11-generic No candidate ver: libnm-util0 No candidate ver: libwebkit-1.0-1 No candidate ver: libopal3.6.1 No candidate ver: libbind9-40 No candidate ver: linux-restricted-modules-common No candidate ver: upstart-compat-sysv No candidate ver: linux-restricted-modules-2.6.28-13-generic No candidate ver: chromium-browser No candidate ver: libisc45 No candidate ver: belocs-locales-bin No candidate ver: libxcb-xlib0 No candidate ver: libpoppler4 No candidate ver: libpulsecore9 No candidate ver: libpulsecore5 No candidate ver: linux-image-2.6.28-15-generic No candidate ver: libntfs-3g49 No candidate ver: libisccfg40 No candidate ver: libavahi-core5 No candidate ver: linux-restricted-modules-2.6.27-7-generic No candidate ver: libparted1.8-9 No candidate ver: libmagickwand1 No candidate ver: libwvstreams4.4-base No candidate ver: linux-image-2.6.28-14-generic No candidate ver: libraw1394-8 No candidate ver: libdatrie0 No candidate ver: libboost-program-options1.35.0 No candidate ver: libgnomekbdui3 No candidate ver: libsgutils1 No candidate ver: libass1 No candidate ver: linux-restricted-modules-2.6.28-15-generic No candidate ver: libindicate1 No candidate ver: libgnomekbd3 No candidate ver: system-services No candidate ver: linux-image-2.6.28-13-generic No candidate ver: libmagick10 No candidate ver: libcolamd-3.2.0 No candidate ver: desktop-effects-kde No candidate ver: picasa No candidate ver: libgnome-desktop-2-7 No candidate ver: libntfs-3g28 No candidate ver: libxklavier12 No candidate ver: libgpod3 No candidate ver: libmagickcore1 No candidate ver: libffado0 No candidate ver: libzephyr3 No candidate ver: libuniconf4.4 No candidate ver: libmbca0 No candidate ver: liblwres40 No candidate ver: hotkey-setup No candidate ver: libkrb53 No candidate ver: ttf-bitstream-vera No candidate ver: libee12-2 No candidate ver: libopal-2.2 No candidate ver: songbird No candidate ver: plib1.8.4c2 No candidate ver: linux-image-2.6.27-7-generic No candidate ver: libpoppler3 No candidate ver: google-chrome-unstable No candidate ver: linux-image-2.6.28-11-generic No candidate ver: linux-restricted-modules-2.6.28-14-generic No candidate ver: simgear1.0.0 No candidate ver: libpoppler-glib3 No candidate ver: mono-common No candidate ver: libx264-65 No candidate ver: libwvstreams4.4-extras No candidate ver: libdns43 No candidate ver: libnm-glib0 No candidate ver: libpt2.6.1 No candidate ver: libisccc40 No candidate ver: libdns45 No candidate ver: libisc44 No candidate ver: readahead No candidate ver: libdirectfb-1.0-0 No candidate ver: upstart-logd No candidate ver: libparted1.8-10 No candidate ver: libflickrnet2.1.5-cil No candidate ver: libicu38 No candidate ver: fast-user-switch-applet No candidate ver: linux-restricted-modules-2.6.28-11-generic No candidate ver: libnm-util0 No candidate ver: libwebkit-1.0-1 No candidate ver: libopal3.6.1 No candidate ver: libbind9-40 No candidate ver: linux-restricted-modules-common No candidate ver: upstart-compat-sysv No candidate ver: linux-restricted-modules-2.6.28-13-generic No candidate ver: chromium-browser No candidate ver: libisc45 No candidate ver: belocs-locales-bin No candidate ver: libxcb-xlib0 No candidate ver: libpoppler4 No candidate ver: libpulsecore9 No candidate ver: lipulsecore5 No candidate ver: linux-image-2.6.28-15-generic No candidate ver: libntfs-3g49 No candidate ver: libisccfg40 No candidate ver: libavahi-core5 No candidate ver: linux-restricted-modules-2.6.27-7-generic No candidate ver: libparted1.8-9 No candidate ver: libmagickwand1 No candidate ver: linux-image-2.6.28-14-generic No candidate ver: libraw1394-8 No candidate ver: libdatrie0 No candidate ver: libboost-program-options1.35.0 No candidate ver: libgnomekbdui3 No candidate ver: libsgutils1 No candidate ver: libass1 No candidate ver: linux-restricted-modules-2.6.28-15-generic No candidate ver: libindicate1 No candidate ver: libgnomekbd3 No candidate ver: system-services No candidate ver: linux-image-2.6.28-13-generic No candidate ver: libmagick10 No candidate ver: libcolamd-3.2.0 No candidate ver: desktop-effects-kde No candidate ver: picasa No candidate ver: libgnome-desktop-2-7 No candidate ver: libntfs-3g28 No candidate ver: libxklavier12 No candidate ver: libgpod3 No candidate ver: libmagickcore1 No candidate ver: libffado0 No candidate ver: libzephyr3 No candidate ver: libuniconf4.4 No candidate ver: libmbca0 No candidate ver: liblwres40 No candidate ver: hotkey-setup No candidate ver: libkrb53 No candidate ver: ttf-bitstream-vera No candidate ver: libeel2-2 No candidate ver: libopal-2.2 No candidate ver: songbird No candidate ver: plib1.8.4c2 No candidate ver: linux-image-2.6.27-7-generic No candidate ver: libpoppler3 No candidate ver: google-chrome-unstable No candidate ver: linux-image-2.6.28-11-generic No candidate ver: linux-restricted-modules-2.6.28-14-generic No candidate ver: simgear1.0.0 No candidate ver: libpoppler-glib3 No candidate ver: mono-common No candidate ver: libx264-65 No candidate ver: libwvstreams4.4-extras No candidate ver: libdns43 No candidate ver: libnm-glib0 No candidate ver: libpt2.6.1 No candidate ver: libisccc40 No candidate ver: libdns45 Your system is up-to-date There are no upgrades available for your system. The upgrade will now be canceled. Do you want to start the upgrdae? Continue [yN] Details [d] (Sorry that is so long...) I'm assuming I'm missing each of those packages. However, when I try to install them, for example: sudo apt-get install libisc44 I get some response that this package is missing and/or it may be part of another package. I'm not exactly sure what I should do. I don't want to reinstall ubuntu, since I have it dual booted with Windows Vista and I don't want to risk anything on the Windows partition. What are your thoughts? EDIT: I've posted this on Ubuntu Forums and nobody ever responded so...yah

    Read the article

  • How to Change How Long Internet Explorer Keeps a List of Sites You Have Visited

    - by Taylor Gibb
    There is a handy feature in most modern browsers that allows you to go back and see what pages you have visited on a particular day. But what if you don’t want your browser to keep track of your browsing history? Here’s how to disable it. How To Play DVDs on Windows 8 6 Start Menu Replacements for Windows 8 What Is the Purpose of the “Do Not Cover This Hole” Hole on Hard Drives?

    Read the article

  • A quick list of all SharePoint 2010 Powershell commandlets

    - by Sahil Malik
    SharePoint 2010 Training: more information Ever wonder what powershell commandlets exist on your SharePoint 2010 installation? Easy! Just run the SharePoint 2010 Management Shell, and issue the following command - Get-Command -module Microsoft.SharePoint.PowerShell And if you wish to find matching commands for a certain task, for instance, I wish to know all commands that have anything to do with “Update”, I would issue the following command  - Get-Command -module Microsoft.SharePoint.PowerShell  | where{$_.name -match "Update"} And if you want to do exactly the same for stsadm, you could do something like this - Read full article ....

    Read the article

  • Serialize a generic collection specifying element names for items in the collection

    - by mdresser
    I have a simple class derived from a generic list of string as follows: [Serializable] [System.Xml.Serialization.XmlRoot("TestItems")] public class TemplateRoleCollection : List<string> { } when I serialize this, I get the following XML: <TestItems> <string>cat</string> <string>dog</string> <string>wolf</string> </TestItems> Is there any way to override the xml element name which is used for serializing items in the collection? I would like the following xml to be produced: <TestItems> <TestItem>cat</TestItem> <TestItem>dog</TestItem> <TestItem>wolf</TestItem> </TestItems>

    Read the article

  • Argument list too long and copying to Samba Share

    - by Copy Run Start
    Ubuntu 12.04 LTS 64 bit. I'm trying to make a scheduled task copy from a directory with thousands of files to a samba share (while skipping duplicates). I mapped my Samba share through the GUI. The command I tried: cp /home/security/Brick/* ~/.gvfs/"cam on atm-bak-01.local/Brick" -n I found this but I don't know how to change the syntax to what I need. find -maxdepth 1 -name '*.prj' -exec mv -t ../prjshp {} + Any hints are greatly appreciated.

    Read the article

  • Infinite loop when adding a row to a list in a class in python3

    - by Margaret
    I have a script which contains two classes. (I'm obviously deleting a lot of stuff that I don't believe is relevant to the error I'm dealing with.) The eventual task is to create a decision tree, as I mentioned in this question. Unfortunately, I'm getting an infinite loop, and I'm having difficulty identifying why. I've identified the line of code that's going haywire, but I would have thought the iterator and the list I'm adding to would be different objects. Is there some side effect of list's .append functionality that I'm not aware of? Or am I making some other blindingly obvious mistake? class Dataset: individuals = [] #Becomes a list of dictionaries, in which each dictionary is a row from the CSV with the headers as keys def field_set(self): #Returns a list of the fields in individuals[] that can be used to split the data (i.e. have more than one value amongst the individuals def classified(self, predicted_value): #Returns True if all the individuals have the same value for predicted_value def fields_exhausted(self, predicted_value): #Returns True if all the individuals are identical except for predicted_value def lowest_entropy_value(self, predicted_value): #Returns the field that will reduce <a href="http://en.wikipedia.org/wiki/Entropy_%28information_theory%29">entropy</a> the most def __init__(self, individuals=[]): and class Node: ds = Dataset() #The data that is associated with this Node links = [] #List of Nodes, the offspring Nodes of this node level = 0 #Tree depth of this Node split_value = '' #Field used to split out this Node from the parent node node_value = '' #Value used to split out this Node from the parent Node def split_dataset(self, split_value): fields = [] #List of options for split_value amongst the individuals datasets = {} #Dictionary of Datasets, each one with a value from fields[] as its key for field in self.ds.field_set()[split_value]: #Populates the keys of fields[] fields.append(field) datasets[field] = Dataset() for i in self.ds.individuals: #Adds individuals to the datasets.dataset that matches their result for split_value datasets[i[split_value]].individuals.append(i) #<---Causes an infinite loop on the second hit for field in fields: #Creates subnodes from each of the datasets.Dataset options self.add_subnode(datasets[field],split_value,field) def add_subnode(self, dataset, split_value='', node_value=''): def __init__(self, level, dataset=Dataset()): My initialisation code is currently: if __name__ == '__main__': filename = (sys.argv[1]) #Takes in a CSV file predicted_value = "# class" #Identifies the field from the CSV file that should be predicted base_dataset = parse_csv(filename) #Turns the CSV file into a list of lists parsed_dataset = individual_list(base_dataset) #Turns the list of lists into a list of dictionaries root = Node(0, Dataset(parsed_dataset)) #Creates a root node, passing it the full dataset root.split_dataset(root.ds.lowest_entropy_value(predicted_value)) #Performs the first split, creating multiple subnodes n = root.links[0] n.split_dataset(n.ds.lowest_entropy_value(predicted_value)) #Attempts to split the first subnode.

    Read the article

  • Transform Two Lists into One Different List

    - by Ngu Soon Hui
    I have two lists of double List<double> X List<double> Y And I have a destination object: public class PointD { public double X {get;set;} public double Y {get;set;} } How to transform them into a single list? public static List<PointD> Transform(List<double> X, List<double> Y) { } All the errors checking must be there.

    Read the article

  • Any way to list similar commands?

    - by Septagram
    When you write the command name wrong, bash often does this: septi@norbert:~$ good No command 'good' found, did you mean: Command 'gold' from package 'binutils' (main) Command 'gmod' from package 'gmod' (universe) Command 'goo' from package 'goo' (universe) Command 'god' from package 'god' (universe) Command 'geod' from package 'proj-bin' (universe) Command 'gord' from package 'scotch' (universe) good: command not found Or sometimes it does this: septi@norbert:~$ nftp No command 'nftp' found, but there are 23 similar ones nftp: command not found Is there any way to ask bash to show these 23 similar commands for me? And, is there a way to show similar commands, including those that aren't yet installed, instead of running the application, ftp for example?

    Read the article

  • Backtracking infinite loop

    - by Greenhorn
    This is Exercise 28.1.2 from HtDP. I've successfully implemented the neighbors function and all test cases pass. (define Graph (list (list 'A (list 'B 'E)) (list 'B (list 'E 'F)) (list 'C (list 'D)) (list 'D empty) (list 'E (list 'C 'F)) (list 'F (list 'D 'G)) (list 'G empty))) (define (first-line n alist) (cond [(symbol=? (first alist) n) alist] [else empty])) ;; returns empty if node is not in graph (define (neighbors n g) (cond [(empty? g) empty] [(cons? (first g)) (cond [(symbol=? (first (first g)) n) (first-line n (first g))] [else (neighbors n (rest g))])])) ; test cases (equal? (neighbors 'A Graph) (list 'A (list 'B 'E))) (equal? (neighbors 'B Graph) (list 'B (list 'E 'F))) (equal? (neighbors 'C Graph) (list 'C (list 'D))) (equal? (neighbors 'D Graph) (list 'D empty)) (equal? (neighbors 'E Graph) (list 'E (list 'C 'F))) (equal? (neighbors 'F Graph) (list 'F (list 'D 'G))) (equal? (neighbors 'G Graph) (list 'G empty)) (equal? (neighbors 'H Graph) empty) The problem comes when I copy-paste the code from Figure 77 of the text. It is supposed to determine whether a destination node is reachable from an origin node. However it appears that the code goes into an infinite loop except for the most trivial case where the origin and destination nodes are the same. ;; find-route : node node graph -> (listof node) or false ;; to create a path from origination to destination in G ;; if there is no path, the function produces false (define (find-route origination destination G) (cond [(symbol=? origination destination) (list destination)] [else (local ((define possible-route (find-route/list (neighbors origination G) destination G))) (cond [(boolean? possible-route) false] [else (cons origination possible-route)]))])) ;; find-route/list : (listof node) node graph -> (listof node) or false ;; to create a path from some node on lo-Os to D ;; if there is no path, the function produces false (define (find-route/list lo-Os D G) (cond [(empty? lo-Os) false] [else (local ((define possible-route (find-route (first lo-Os) D G))) (cond [(boolean? possible-route) (find-route/list (rest lo-Os) D G)] [else possible-route]))])) Does the problem lie in my code? Thank you.

    Read the article

  • Adding a list of "recent articles" affects SEO

    - by Groo
    We have a site which has a sidebar with sections (or "widgets" if you like) showing stuff like "Recent Articles", "Other Articles by this User", "Similar Articles" etc. The issue is, Google seems to take these links very seriously. In fact, if I have only a single article which is closely related to a certain phrase (and several other pages link to it in their sidebars), when I do a Google search, it lists all those other pages highlighting that one link to the page that should actually be the most relevant one. And these pages don't even mention the phrase anywhere else. It there a common approach with adding these sidebar links? For example, I might add them through ajax after the page is loaded, but then crawlers will have harder time finding them?

    Read the article

  • Creating Database-Driven ASP.NET 3.5 Input and List Web Controls

    You might have read our tutorials on how to configure user input-based web controls in ASP.NET 3.5. This type of web control is used to gather user input from a web form. While those articles showed a basic way to configure these web controls this article will show you a database-driven method that is much more efficient when you have to make changes to lots of options presented by the controls.... Transportation Design - AutoCAD Civil 3D Design Road Projects 75% Faster with Automatic Documentation Updates!

    Read the article

  • Week in Geek: Firefox 17 Beta now Forces Secure Connections for List of Selected Domains

    - by Asian Angel
    Our first edition of WIG for November is filled with news link coverage on topics such as Gmail has become the #1 e-mail service in the world, Borderlands 2 video game characters are being killed off by a sabotage attack, Ubuntu 11.04 has reached its end of life, and more. How To Play DVDs on Windows 8 6 Start Menu Replacements for Windows 8 What Is the Purpose of the “Do Not Cover This Hole” Hole on Hard Drives?

    Read the article

  • Harnessing PowerShell's String Comparison and List-Filtering Features

    When you are first learning PowerShell, it often seems to be an 'Alice through the looking-glass' world. Just the simple process of comparing and selecting strings can seem strangely obtuse. Michael turns the looking-glass into wonderland with his wall-chart of the PowerShell string-comparison operators and syntax The Future of SQL Server MonitoringMonitor wherever, whenever with Red Gate's SQL Monitor. See it live in action now.

    Read the article

  • convert string to dict using list comprehension in python

    - by Pavel
    I have came across this problem a few times and can't seem to figure out a simple solution. Say I have a string string = "a=0 b=1 c=3" I want to convert that into a dictionary with a, b and c being the key and 0, 1, and 3 being their respective values (converted to int). Obviously I can do this: list = string.split() dic = {} for entry in list: key, val = entry.split('=') dic[key] = int(val) But I don't really like that for loop, It seems so simple that you should be able to convert it to some sort of list comprehension expression. And that works for slightly simpler cases where the val can be a string. dic = dict([entry.split('=') for entry in list]) However, I need to convert val to an int on the fly and doing something like this is syntactically incorrect. dic = dict([[entry[0], int(entry[1])] for entry.split('=') in list]) So my question is: is there a way to eliminate the for loop using list comprehension? If not, is there some built in python method that will do that for me?

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >