Questions tagged [routines]
103 questions
0
votes
1 answer
Replace a routine declared in a DB2 module
I am developing an application in DB2 with SQL PL, and the routines (procedures and functions) are being defined in a module.
However, each time I change a routine, I cannot replace it, and I have to drop the module body, and recreated.
Is there any…

AngocA
- 7,655
- 6
- 39
- 55
0
votes
1 answer
Cannot create function in MySQL
I cannot add custom function to my MySql database,
I have problems even with simple function like this
DELIMITER $$
DROP FUNCTION IF EXISTS `foo`$$
CREATE FUNCTION `foo`(IN doWork boolean) RETURNS boolean
NO SQL
DETERMINISTIC
BEGIN
return…

vilshadov
- 31
- 1
- 5
0
votes
1 answer
Sub-routines being skipped during form load
I have a form load sub routine here and the problem is that the program executes the first one (namely, LoadProgrammes()) and then skips the rest of the subroutine. There is something about the subroutine LoadProgrammes() that makes the rest of…

Pejman Poh
- 493
- 2
- 8
- 20
0
votes
2 answers
Order of execution lines of code
I don't get this :
In a ShakeListener class, I execute a routine in the containing class.
The routine is :
public void showWord(){
myShakeListener.stop();
flipper.showNext();
v.vibrate(countdown5, -1);
try…

Kees Koenen
- 772
- 2
- 11
- 27
0
votes
1 answer
MySQL multiple statement execution order
I have created a routine which inserts a record in one table, and after that it searches for that id (with a select statement) and updates another table's field with that id.Is this possible? It's one routine so my question is if the statements are…

user1337210
- 241
- 3
- 6
- 11
-1
votes
1 answer
Swap Concurrent Function
I am trying to figure out how to make concurrent the forward Swap function in Go for learning concepts purpose:
package main
import "fmt"
func Swap(a, b int) (int, int) {
return b, a
}
func main() {
for i := 0; i <10; i++ {
…

Nicholas Fernandes Paolillo
- 941
- 9
- 20
-1
votes
1 answer
How to convert the following Thread statement in go
I am trying to convert the following java statement of threads in go;
int num = 5;
Thread[] threads = new Thread[5];
for (int i = 0; i < num; i++)
{
threads[i] = new Thread(new NewClass(i));
threads[i].start();
}
…

Sucheta
- 11
- 7
-1
votes
1 answer
What happens when you pass a negative number to `inc`?
There's a routine in Pascal called inc. It is used to increment numbers. There is another routine called dec, which is used to decrement numbers.
With only one argument, inc will increment the argument by one. Similarly, dec will decrement by one.…

DCShannon
- 2,470
- 4
- 19
- 32
-1
votes
1 answer
Intercepting mouse events in windows
Well the title seems pretty clear about what I want to do.
More precisely: I want to create a program (c++ or java is preferred) that manipulates the mouse in two ways, like: changing its position and doing clicks.
I was thinking about using allegro…

Patrick Bassut
- 3,310
- 5
- 31
- 54
-2
votes
1 answer
How can I read from a channel after my GoRoutines have finished running?
I currently have two functions pushNodes(node) and updateNodes(node). In the pushNodes function, I am pushing values through a channel that are to be used in updateNodes. In order to have accurate channel values saved, I need all pushNodes go…

mringes
- 1
- 1
-2
votes
2 answers
What are self contained functions?
So I've been assigned to talk about adding new code routines into a program such as self contained functions and new classes, yet I haven't actually been taught this kind of programming terminology yet. I've tried looking online everywhere but it…

SirTiggs
- 105
- 1
- 2
- 10
-3
votes
1 answer
c# - splitting a large list into smaller sublists
Fairly new to C# - Sitting here practicing. I have a file with 10 million passwords listed in a single file that I downloaded to practice with.
I want to break the file down to lists of 99. Stop at 99 then do something. Then start where it left off…
-4
votes
2 answers
What is the need to synchronise Go Routines
This particular Go code uses a channel to synchronise goroutines.
// We can use channels to synchronize execution
// across goroutines. Here's an example of using a
// blocking receive to wait for a goroutine to finish.
package main
import…

amrx
- 673
- 1
- 9
- 23