Questions tagged as 'static'

1
answer

How do I concatenate a variable in a class with a static function?

I have a problem, I have a function that, when I pass the card number, returns the name of the flag (visa, mastercard etc) And I need to return the flag name inside a static function $bandeira = getBandeiraByNumber("55523131232131"); retor...
asked by 09.05.2016 / 19:31
1
answer

What's the difference in leaving a variable in the protocol marked static or non-static in Swift 4?

I'm learning about protocol s now, and I saw a code snippet in Swift 4 that defines a protocol, below the snippet of code. protocol AnotherProtocol { static var someTypeProperty: Int { get set } } Note that the variable someType...
asked by 11.08.2018 / 22:11
1
answer

How do I call a function in swift xcode

Good night, I have a function that is linked to a button, I would like to call it directly without the need of the button, what do I do? The function ... static func goToTutorialOrTo(market: Market, from viewController: UIViewController) {...
asked by 16.05.2018 / 00:30
1
answer

Django does not render static files that are in subfolders within / static /

I'm working on a Django project that has static files (css / js / imgs) in the following structure: File Structure django_project | +apps | +django_project | +media | +static |...
asked by 30.01.2017 / 15:11
1
answer

Define an abstract attribute in a non-abstract class

I want to be able to instantiate an employee class (so this can not be abstract) and have an abstract salary attribute that will be static for each employee type. I can do (in the official class): private abstract int salario; and its su...
asked by 19.11.2017 / 14:52
1
answer

Calling non-static function inside a Handler

I'm developing a code in android studio where I get data through a buetooth transmission. The data goes to a function called Handler, which is static. public static Handler handler = new Handler() { @Override public void handleMessage...
asked by 22.09.2017 / 22:25
0
answers

Django MEDIA_URL is not working

Until yesterday I was working quietly on the /media/ route in DEV, and went to do a deploy for production and a production dump for my environment to match, and started to give that problem. I also had to add new features of several branc...
asked by 23.08.2017 / 19:56
1
answer

Assigning and updating static variable in java

I have a problem with a Static variable. In the code I assign to a variable that is not static, the contents of a Static variable. Then I update the static variable, but the variable that received the value of static there at the beginning is up...
asked by 15.08.2017 / 20:56
0
answers

Load bank table per session system

I am developing an application, where one of the modules is the product register, and within that register, I have the fiscal part. In this fiscal part, I have to define an NCM, and consequently the IPI rate, so I created a table with NCM cod...
asked by 11.08.2016 / 04:30
1
answer

Static Objects in Activities with View Pagers

I have an activity with a view pager, and this controls 3 fragments, f1, f2, f3. Fragment f1 shows items added by the user, fragment f2 loads all items from an external server, showing them in a list, and finally fragment f3 shows the items that...
asked by 14.09.2016 / 15:27