Questions tagged [global-functions]
23 questions
5
votes
1 answer
Are all functions in C global?
Is it possible that a function in ANSI C cannot be accessed from some other file? How and when functions have limited access? At first I thought that if a function is not included in any header it's private. But it doesn't seem to be the case.

avivgood2
- 227
- 3
- 19
3
votes
1 answer
How to set dynamic position of snackbar in jetpack compose?
I have a Scaffold with a NavHost as its content. NavHost host 2 screens. One screen contains the bottomNavigationBar and another screen doesnot.
How can I display create a snack bar that can be used globally which is displayed at the bottom of the…

Diken Mhrz
- 327
- 2
- 14
3
votes
1 answer
React Typescript, Call a function from external script
In my react application, I fetch a custom javascript file from the server and append it as a script tag to the body of document.
this newly added custom file contains a method called manipulator. Now in one of the components, I want to call that…

Amir-Mousavi
- 4,273
- 12
- 70
- 123
2
votes
1 answer
Where are Lua's "global" local values stored?
I need to call a Lua function from C and as long the function is global I can find it in the global table, but if it is declared local, how can I push the address on the stack to call it?
function MyGlobal()
print("Global")
end
local function…

Max Kielland
- 5,627
- 9
- 60
- 95
1
vote
1 answer
Importing a global function vs. Defining a global function (Python)
I found an interesting behavior in Python which I would like to fully understand.
setup.py:
good='hello'
def isGood(testGood): return testGood == good
print(isGood('hello'))
print(isGood('bye'))
good='bye'
print(isGood('bye'))
Output…

Aviram Tal
- 31
- 2
1
vote
0 answers
How to declare a global function in vue js to access from any where?
When working with Vue.js, the biggest problem I have faced is declaring a global function that can be used anywhere in the Vue application without any import.
I have tried Vue plugin. Custom Vue plugin's function can only be used in templates. It…

Efthakhar Bin
- 21
- 1
- 3
1
vote
1 answer
Nodejs Set a global function and call a nested function
My Main function
import AppLauncher from './Applauncher'
function Mainfunc() {
global.app= AppLauncher()
global.app.start('index')
}
AppLauncher.js
function AppLauncher() {
function start(opts){
console.log('functions…

Sai Krishna
- 547
- 1
- 12
- 26
1
vote
1 answer
Making a function (A particular view to perform same function when used in activities) universal in Android (Java)
I have been recently thinking about, how can I make my code more efficient? I have a Floating Action Button which does a common task when clicked on. I want this button to be present in all activities. When pressed this FAB button it opens a…

SIDDHARTH SINGH
- 138
- 3
- 8
1
vote
1 answer
Vue 3: How to implement a function that modifies all input fields in the DOM?
I'm new to Vue and want to add an onfocus function to all input fields. When I use mixin, the function is called every time a component is mounted.
createApp(App).mixin({
mounted() {
myFunction() {
…

NicOwen
- 171
- 1
- 3
- 8
1
vote
2 answers
Can you somehow use a local function on a global level in python?
I'm writing a program and I'm using espeak library to make it speak. The thing is I've already written my program but now I want to make a way to ask the user in the beginning if he wants the program to talk to him or just rely on reading. So if he…

Mr_You
- 13
- 3
1
vote
1 answer
In react native, How to make function in Component to global?
Main javascript soure code like this,
import React from 'react'
import LoadingScreen from './components/LoadingScreen'
import './js/Login'
import './js/XHR'
class App extends React.Component {
constructor(props) {
super(props);
…

nkSong
- 23
- 5
1
vote
1 answer
How I can make a function Global in Aurelia
Here is a scenario. I want to access Aurelia function, outside the Aurelia Application. Like while running my application if I call a method "GetNotification(string Message)" through browser Console, then it should get called.
The reason is that my…

Rehman Gull
- 63
- 7
1
vote
0 answers
Implement inline grid editing as global function
Hello I have tried to implement inline grid editing in my datatable .It's working.... But I need to implement the inline editing in other tables .... So I would like to make a global function for this .....
But it shows some error .... This is my…

Anoop
- 505
- 8
- 23
1
vote
3 answers
Create a popup message in Powershell
I'm attempting to make a function that will allow me to popup a please wait message run some more script then close the popup
Function Popup-Message {
param ([switch]$show,[switch]$close)
Add-Type -AssemblyName System.Windows.Forms
…

frasernator
- 11
- 1
- 4
0
votes
2 answers
Dataflow Streaming Job Error: name 'function' is not defined. How to create a global function for all Dataflow steps
I'm developing a Dataflow streaming job for CSV check triggered by a creation of an object in Cloud Storage (via Pub\Sub notification).
I'm using Dataflow because is a business requirement and for the message de-duplication management (could be…

Kla1998
- 1
- 1