[Solved] how to properly use recursive function to go through multiple nested objects

Change your data to this: $scope.subjectAreas = [{ name: “Area-1”, link: “dashboards.dashboard_1”, entities: [{ name: ‘entities’, entities: [{ name: “entity 1” }, { name: “entity 2” }] }, { name: ‘offerings’, entities: [{ name: “offering 1” }, { name: “offering 2” }] }] }, { name: “Area-2”, link: “dashboards.dashboard_1”, entities: [{ name: “entity 3” }], … Read more

[Solved] which is best for designing forum website – bootstrap or materialize? [closed]

I would definitely go with bootstrap. It´s easy to get started, well documented, supported, responsive, mobile first… If you want to read more to compare both frameworks I found a good discussion here Also have a look to the twitter bootstrap components so you can get familiar with them. It has a lot of features … Read more

[Solved] How to get all items from a list in Python 2 [closed]

What you are trying to do is to unpack the elements of the list into parameters. This can be done like this: Albaqus_Function(*coord_list[0:n]) Where n is the last index+1. The *args notation is used as the following: arguments = [“arg1”, “arg1”, “arg3”] print(*arguments) This will be equivalent to: print(“arg1”, “arg2”, “arg3”) This is useful when … Read more

[Solved] How can I showing checkbox when I choose the spinner data?

try this custom Class public class MultiSelectionSpinner extends Spinner implements OnMultiChoiceClickListener { String[] _items = null; boolean[] mSelection = null; boolean[] mSelectionAtStart = null; String _itemsAtStart = null; ArrayAdapter<String> simple_adapter; public MultiSelectionSpinner(Context context) { super(context); simple_adapter = new ArrayAdapter<>(context, android.R.layout.simple_spinner_item); super.setAdapter(simple_adapter); } public MultiSelectionSpinner(Context context, AttributeSet attrs) { super(context, attrs); simple_adapter = new ArrayAdapter<>(context, android.R.layout.simple_spinner_item); … Read more

[Solved] when i refresh will delete all records

try this code <?php $sql=”SELECT * FROM administrators”; $record=mysql_query($sql); function drop($id,$email){ $q=”DELETE FROM administrators WHERE id=’$id’ AND email=”$email””; mysql_query($q); header(“Refresh:0″); } if (isset($_GET[‘drop’])) { $id=$_GET[‘id’];$email=$_GET[’email’]; drop($id,$email); } ?> <title>Admins Table</title> <style> table, th, td { border: 2px solid black; border-collapse: collapse; } #creating { font:bold; font-size:1.6em; } </style> <a href=”https://stackoverflow.com/questions/35550971/cadmin.php” id=’creating’>Create New Admin</a><br/><br/> <table width=”920″ … Read more

[Solved] Randomly select value 1 in list and get index

Option 1 – as recommended @StefanPochmann, @rayryeng and @Clayton Wahlstrom. index = [i for (i, j) in enumerate(y) if j] print(random.sample(index, 2)) Option 2 – My original horrible implementation… import random y = [1,0,0,0,0,1,0] i = 0 index =[] for each in y: if each == 1: index.append(i) i = i + 1 print(random.sample(index, 2)) … Read more

[Solved] In Powershell, how to copy files with common file name string (i.e. “ABC*”) last written in a specific date range?

This is a common task, here’s the general approach we take to solving an issue like this in PowerShell. Get a list of files, VMs, Items, ETC Pipe this into the Where-Object cmdlet to filter and apply one or more constraints That’s it! With your requirements, we’ll actually do Step 2 in two separate steps, … Read more

[Solved] Dynamic Url & Canonical meta tag issue [closed]

Yes you are correctly specifying the canonical link for each time the page is hit. That’s what it is intended for (google discusses it here). So that whatever URLs people are using to generate this page, you are telling Google that the official link for this content is http://www.ladydecosmetic.com/makeup-kits-cat-67. I think it’s reasonable to suspect … Read more

[Solved] Please Help! I have to read numbers from a text file i create and find the average of these numbers and print it [closed]

I think the smallest set of changes that will make this work is: class TemperatureFile: def __init__(self, filename): self.__filename = filename def getFilename(self): return self._Filename def setFilename(self): self._filename = filename def calculateAverage(self): try: with open(self.__filename,’rb’) as temperatureFile: total = 0 temp = 0 for line in temperatureFile: amount = float(line.rstrip(“\n”)) total += amount temp = … Read more