Questions tagged [routines]
103 questions
2
votes
6 answers
What is a good naming convention for a routine that sets a global variable in the same class
Code Complete (Chapter 7, Section 3) says that a good function should be named for the value it returns and a good procedure name in a class should be named for what it does.
When I write synchronized methods in Delphi (pre 2009) I sometimes need…

Peter Turner
- 11,199
- 10
- 68
- 109
2
votes
1 answer
Can I test queries in goroutine with sqlmock?
I have this code in my application, I use goroutine because that queries are very slow. The code works correctly but I've been trying to test that function with sqlmock and that been having a lot of false positives and a lot of dificulties, what can…
2
votes
4 answers
User-defined Table Variables in MySQL 5.5?
I've recently moved from MSSQL to MySQL.
I would like to use a table variable (or equivalent) inside a MySQL 5.5 stored routine, to populate a dataset for an online report.
In MS SQL, I would do it this way
...
...
DECLARE @tblName TABLE
WHILE…

colonel_px
- 305
- 4
- 16
2
votes
1 answer
Using rate.NewLimiter rate limiter with channels
I'm using a rate limiter to throttle the number of requests that are routed
The requests are sent to a channel, and I want to limit the number that are processed per second but i'm struggling to understand if i'm setting this correctly, I don't get…

SuperSecretAndNotSafeFromWork
- 1,211
- 1
- 16
- 31
2
votes
2 answers
Recommended way of closing redundant sql.Rows object after Go routine
I'm using Go routines to send queries to PostgreSQL master and slave nodes in parallel. The first host that returns a valid result wins. Error cases are outside the scope of this question.
The caller is the only one that cares about the contents of…

Tim
- 1,585
- 1
- 18
- 23
2
votes
1 answer
What are routine and subroutine in program?
I am learning stack and hearing this word called "Subroutine" too much. I am confused: what are exactly "routine" and "subroutine" ?
Let's suppose I have a program :
def tav(x):
if x==0:
return 19
else:
u=1
tav(x-1)
…
user7026515
2
votes
3 answers
How to use Java classes in Talend
I have the following three classes :
I tried making the routine of 1 & 2 and used tjava to call the main class and the method from 1 & 2 but I am unable to fetch those methods.
1)
package page_scraper;
import…

user1538020
- 515
- 1
- 9
- 25
2
votes
2 answers
How to use a sub query as part of a stored procedure MySQL
I am trying to create a procedure (called a routine in phpMyAdmin) and currently have this query:
BEGIN
INSERT INTO `users` (`username`, `password`, `email`, `user_role_id`,` date_registered`)
VALUES (_username, _password, _email, (SELECT `ID`…

Can O' Spam
- 2,718
- 4
- 19
- 45
2
votes
1 answer
code signing in java EAR
We are trying to implement code signing routines for our project. The archive is EAR. When I research in google, we are seeing jar code signing certificates free or paid. Can anyone help whether we can do code signing for EAR, If yes, How?

Neelima Sridhar
- 19
- 1
2
votes
2 answers
Rails - Find missing keys between different locales (.yml files)
I have 2 locale files en.yml and pt.yml. There are some keys that exist only on pt.yml and other keys that exist only on en.yml
Is there a method or routine to list all these keys? (Just comparing the two files)
Example…

Mauricio Moraes
- 7,255
- 5
- 39
- 59
2
votes
1 answer
Using SELECT INTO in HSQL 2.2 routines
When I migrate a Oracle Function to HSQLDB I need translate the "Select into" for HSQLDB. The Oracle script may look like:
CREATE FUNCTION getId()
RETURN NUMBER IS
temp_id NUMBER;
...
BEGIN
....
SELECT id id INTO temp_id from ( select…

villim
- 23
- 6
1
vote
2 answers
Problem synchronizing between Goroutines, one blocks the other
Im trying to process a CSV file im reading from AWS S3, for every line of text i would like to activate the worker function to do some work and return a results
ideally i would want the results to be ordered as the original CSV, but its not a…

Or Shemtov
- 55
- 4
1
vote
1 answer
GCP - load table from file and variable in BQ routine
I want to load table from file and variable . As the file schema is not same as table to be loaded hence extra columns needs to be filled by variable inside stored procedure.
Like below example pty is not part of csv file and other 2 columns mt and…

Mudgal
- 35
- 4
1
vote
0 answers
LinqToSQL definition for INFORMATION_SCHEMA.ROUTINES
I've been able to successfully create definitions for Tables and Views. I'm trying to finish a Class definition for Routines. I've compared my property definitions to the information at MSDN and it looks correct. It compiles successfully, but…

BermudaLamb
- 33
- 3
1
vote
1 answer
Python routine on matrix diagonalization
Good morning!
I have a doubt about the python routine…

lgotta
- 47
- 5