How can I see a list of what global variables are defined in Matlab? (I am using R2009a).
I have hunted unfruitfully for this on Google and SO, so apologies if it has been asked before.
Hey can someone help find a list of what some good looking fonts are that are not really standard but like
I'd find a font that is common to gnome or w/e
and mac and windows. So then I have 3 different fonts for css or like a big number and id order them in how much i like
.
I have a controller that takes in a viewmodel and submitbutton
public ActionResult AddLocation(AddLocationViewModel viewModel, string submitButton)
My view is bound to the viewmodel. The viewmodel contains a list objects used to create an html table with checkboxes. Is there a way to access the selected "rows" through the viewmodel in my controller? So that I can iterate through and get the selected items?
Thanks
LDD
How can I go to an anchor tag on the page when the myDropDownList_SelectedIndexChanged() event fires?
I am using regular ASP.NET Forms.
Update: The following is valid for an ASP.NET Button. I would like to achieve the same functionality (going to #someAnchor) when I select an option from the Dropdown list.
<asp:Button ID="btnSubmit" runat="server" Text="Do IT" Width="186px" PostBackUrl="#myAnchor" CausesValidation="false" />
I am trying to create a multi line string in Groovy. I have a list of strings that I'd like to loop through within the multi line string. I am not sure what the syntax is for this. Something like below...
def html = """\
<ul>
<li>$awaiting.each { it.toPermalink()}</li>
</ul>
"""
Hi,
I have a Silverlight web app which uses ASP.net Website administration tool for user authentication. Now is there any way by which I can get the list of all registered users in Silverlight?
How does Python (2.6.4, specifically) determine list membership in general? I've run some tests to see what it does:
def main():
obj = fancy_obj(arg='C:\\')
needle = (50, obj)
haystack = [(50, fancy_obj(arg='C:\\')), (1, obj,), needle]
print (1, fancy_obj(arg='C:\\'),) in haystack
print needle in haystack
if __name__ == '__main__':
main()
Which yields:
False
True
This tells me that Python is probably checking the object references, which makes sense. Is there something more definitive I can look at?
Given a list:
l1: ['a', 'b', 'c', 'a', 'a', 'b']
output: ['a', 'b', 'c', 'a'_1, 'a'_2, 'b'_1 ]
I created the following code to get the output. Its messyyy..
for index in range(len(l1)):
counter = 1
list_of_duplicates_for_item = [dup_index for dup_index, item in enumerate(l1) if item == l1[index] and l1.count(l1[index]) > 1]
for dup_index in list_of_duplicates_for_item[1:]:
l1[dup_index] = l1[dup_index] + '_' + str(counter)
counter = counter + 1
Is there a more pythonic way of doing this? I couldnt find anything on the web.
I have some cs files in my project that are not set to be built (Properties - Build Action = None). They contain bits of code that don't compile as a whole and are there merely for reference. I don't care about any compilation errors in them, but they appear in the "Error List" window, cluttering it. Is there some way to tell VS to ignore errors in that file? Or in all files not set to be built, at that ?
I'm using VS 2010
Thanks
Usually when I'm typing a Java import statement in Eclipse or otherwise referencing a class via the packages that it is in, Eclipse shows a context menu with a list of all classes within that package. There have been several times, however, that it would only shows subpackages within a package and would not show classes within that package.
Does anyone know why this is? It sounds like a setting/preference was changed, but I never knowingly changed anything related to this.
hi ther - this is a "strange question"... :)
I WANT to get on a wiki spammers list for a test project i'm trying to do with some folks - how do i go about doing that?? :)
Hi,
I want to get a list with all the threads (except the main, GUI thread) from within my application in order to do some action(s) with them. (set priority, kill, pause etc.)
How to do that?
The amount of records to be displayed in drop-down combo boxes affect the performance of internet applications. What are the current best practices to solve this problem? Are paginated drop-downs the only solution? What is considered a large list? 100 or 1000?
Hello, python newbie here.
I'm going through python and I was wondering what are the advantages of using the *args as a parameter over just passing a list as a parameter, besides aesthetics?
My aim is to list all elements of the array a whose values are greater than their index positions. I wrote a Haskell code like this.
[a|i<-[0..2],a<-[1..3],a!!i>i]
When tested on ghci prelude prompt, I get the following error message which I am unable to understand.
No instance for (Num [a]) arising from the literal 3 at <interactive>:1:20 Possible fix: add an instance declaration for (Num [a])
hello mates i am trying to store value from dropdown list to an integer but i am getting an exception Input string was not in a correct format.
int experienceYears = Convert.ToInt32("DropDownList1.SelectedValue");
please help.
I'm writing a simple linear linked list implementation in PHP. This is basically just for practice... part of a Project Euler problem. I'm not sure if I should be using unset() to help in garbage collection in order to avoid memory leaks. Should I include an unset() for head and temp in the destructor of LLL?
I understand that I'll use unset() to delete nodes when I want, but is unset() necessary for general clean up at any point?
Is the memory map freed once the script terminates even if you don't use unset()?
I saw this SO question, but I'm still a little unclear. Is the answer that you simply don't have to use unset() to avoid any sort of memory leaks associated with creating references?
I'm using PHP 5.. btw.
Unsetting references in PHP
PHP references tutorial
Here is the code - I'm creating references when I create $temp and $this-head at certain points in the LLL class:
class Node
{
public $data;
public $next;
}
class LLL
{
// The first node
private $head;
public function __construct()
{
$this->head = NULL;
}
public function insertFirst($data)
{
if (!$this->head)
{
// Create the head
$this->head = new Node;
$temp =& $this->head;
$temp->data = $data;
$temp->next = NULL;
} else
{
// Add a node, and make it the new head.
$temp = new Node;
$temp->next = $this->head;
$temp->data = $data;
$this->head =& $temp;
}
}
public function showAll()
{
echo "The linear linked list:<br/> ";
if ($this->head)
{
$temp =& $this->head;
do
{
echo $temp->data . " ";
} while ($temp =& $temp->next);
} else
{
echo "is empty.";
}
echo "<br/>";
}
}
Thanks!
I have a list containing version strings, such as things:
versions_list = ["1.1.2", "1.0.0", "1.3.3", "1.0.12", "1.0.2"]
I would like to sort it, so the result would be something like this:
versions_list = ["1.0.0", "1.0.2", "1.0.12", "1.1.2", "1.3.3"]
The order of precendece for the digits should obviously be from left to right, and it should be decending. So 1.2.3 comes before 2.2.3 and 2.2.2 comes before 2.2.3.
How do I do this in Python?
I'd like to list the items in a tuple in Python starting with the back and go to front.
Similar to:
foo_t = tuple(int(f) for f in foo)
print foo, foo_t[len(foo_t)-1] ...
I believe this should be possible without Try ...-4, except ...-3.
Thoughts? suggestions?
What is the advantage of using a ConcurrentBag(Of MyType) against just using a List(Of MyType)?
The MSDN page on the CB (http://msdn.microsoft.com/en-us/library/dd381779(v=VS.100).aspx) states that
ConcurrentBag(Of T) is a thread-safe
bag implementation, optimized for
scenarios where the same thread will
be both producing and consuming data
stored in the bag
So what is the advantage? I can understand the advantage of the other collection types in the Concurrency namespace, but this one puzzled me.
Thanks.
I am creating a pricing program. I need to calculate the amounts according to the current tax list in the US (in various places).
I want to have a button 'Update taxes' in the administrative settings of the application, so when the user clicks it, it should download from somewhere the active tax amounts.
So I actually want to have a function decimal GetTax(string zip).
Any resources, ideas are welcommed.
Thanks