Tag: c

53 votes
18 answers
3.1K views
What is the difference between '@' and '=' in directive scope in AngularJS?

I've read the AngularJS documentation on the topic carefully, and then fiddled around with a directive. H

avatar
Luis
0 1 0 9
asked 07 September, 2021
60 votes
15 answers
1.5K views
What is the difference between angular-route and angular-ui-router?

I'm planning to use AngularJS in my big applications. So I'm in the process to find out the right mo

avatar
Cortez
0 1 0 9
asked 07 September, 2021
52 votes
6 answers
2.9K views
How do I use $scope.$watch and $scope.$apply in AngularJS?

I don't understand how to use $scope.$watch and $scope.$apply. The official documentation isn't help

avatar
Omar
0 1 0 9
asked 07 September, 2021
58 votes
19 answers
2.2K views
How do I access the $scope variable in browser's console using AngularJS?

I would like to access my $scope variable in Chrome's JavaScript console. How do I do that? I can neithe

avatar
Joseph
0 1 0 9
asked 07 September, 2021
57 votes
14 answers
1.5K views
How does data binding work in AngularJS?

How does data binding work in the AngularJS framework? I haven't found technical details on their site.

avatar
Clarice
0 1 0 9
asked 07 September, 2021
66 votes
30 answers
2.8K views
AngularJS: Service vs provider vs factory

What are the differences between a Service, Provider and Factory in AngularJS?

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
55 votes
11 answers
1.5K views
Why is "1000000000000000 in range(1000000000000001)" so fast in Python 3?

It is my understanding that the range() function, which is actually an object type in Python 3, generates its

avatar
Elicia
0 1 0 9
asked 07 September, 2021
57 votes
29 answers
1.6K views
How do I parse a string to a float or int?

In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or par

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
522 views
How to print colored text to the terminal?

How can I output colored text to the terminal in Python?

avatar
Hallie
0 1 0 9
asked 07 September, 2021
52 votes
30 answers
1.2K views
How do you split a list into evenly sized chunks?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There a

avatar
Lawanda
0 1 0 9
asked 07 September, 2021
55 votes
13 answers
586 views
How to delete a file or folder in Python?

How do I delete a file or folder in Python?

avatar
Boyd
0 1 0 9
asked 07 September, 2021
49 votes
10 answers
970 views
Manually raising (throwing) an exception in Python

How can I raise an exception in Python so that it can later be caught via an except block?

avatar
Royal
0 1 0 9
asked 07 September, 2021
58 votes
16 answers
535 views
55 votes
23 answers
893 views
What does ** (double star/asterisk) and * (star/asterisk) do for parameters?

In the following method definitions, what does the * and ** do for param2? def foo(param1, *param2): def bar(

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
65 votes
7 answers
1.7K views
Understanding Python super() with __init__() methods

I'm trying to understand the use of super(). From the looks of it, both child classes can be created,

avatar
Nidia
0 1 0 9
asked 07 September, 2021
59 votes
12 answers
1.4K views
What is __init__.py for?

What is __init__.py for in a Python source directory?

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
52 votes
22 answers
1.7K views
List changes unexpectedly after assignment. Why is this and how can I prevent it?

While using new_list = my_list, any modifications to new_list changes my_list every time. Why is this, and how

avatar
Elicia
0 1 0 9
asked 07 September, 2021
67 votes
17 answers
847 views
How to make function decorators and chain them together?

How can I make two decorators in Python that would do the following? @makebold @makeitalic def say(): retu

avatar
Shanita
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
1.4K views
How do I pass a variable by reference?

The Python documentation seems unclear about whether parameters are passed by reference or value, and the foll

avatar
Gigi
0 1 0 9
asked 07 September, 2021
47 votes
19 answers
1.3K views
How do I copy a file in Python?

How do I copy a file in Python? I couldn't find anything under os.

avatar
Robt
0 1 0 9
asked 07 September, 2021