Questions tagged [user-defined]
253 questions
0
votes
0 answers
Not able to attach on user defined bridge attach command
I tried to attach in container. But while i attach it's come out.
Here is the network below
NETWORK ID NAME DRIVER SCOPE
7ab1dac4166d alpine-net bridge local
Below are my containers
CONTAINER ID IMAGE COMMAND …
0
votes
2 answers
Making User Variable From config.toml Show Up In Page Body
I'm creating a page. I have a site-wide parameter defined in my default config.toml file like this.
[Params]
tdName= "Mr. Tournament Director"
In my page I'm writing:
{{ .Site.Params.tdName }}
Rather than the string in quotes, the code below that…

jimhomme
- 3
- 2
0
votes
3 answers
(python) User-defined exception not working, using class { don't know why the exception is not working when i enter a string }
User defined exception if the user enters a string in input instead of a number
Here I am using class for a user-defined exception, I know that if I use ==> except Exception: it will work but i want to use user-defined exception ==> except…

Shubham-Misal
- 33
- 1
- 7
0
votes
1 answer
How to print(dump) a list of interactively~ user-defined (not imported) function names and definitions?
in answer to:
Can Python print a function definition?
What's wrong with this?
# Get a list of all user-defined functions and print their definitions
import inspect, sys, types
#…

BlipBertMon
- 1
- 1
0
votes
2 answers
VB6 and COM: cannot use user-defined type parameter in COM function
I am using a COM object in VB6. The COM object has a function Foo(Long, Long, Rect). Rect is a struct defined in the COM object implementation. My VB6 code (a button on a form) is like below:
Private Sub btnTestCom_Click()
Set ComObj =…

Charlie
- 764
- 2
- 13
- 24
0
votes
1 answer
Creating @X rows with future years
I am trying to create a SQL which would display @X rows with future years:
year(now())+1
year(now())+2
year(now())+3
...
@X is a user-defined variable.
I came only to using union select but it looks nasty and works for reasonably low @x:
set…

Ivo Brabec
- 1
- 2
0
votes
1 answer
UNION SELECT and initializing user-defined variable
I have a relatively long union select:
select A, B from table1 where C='xxx'
union select A, B from table2 where C='xxx'
union select A, B from table3 where C='xxx'
...
I would like to define xxx as a user-defined variable so I don't have to repeat…

Ivo Brabec
- 1
- 2
0
votes
1 answer
User-defined variable in ranking statement
I will appreaciate any help on this issue. I already spent hours without any real solution.
I have a SQL
SELECT to_place, rank
FROM
(SELECT g1.to_place as to_place, g1.pcount as pcount,
@rank := IF(@current_to_place = g1.to_place,…

Ivo Brabec
- 1
- 2
0
votes
2 answers
MySQL: Updating Query with user defined variable
I am new to SQL and wasn't able to find a direct way of using User Defined Variable without using stored procedure.
SUBSTRING_INDEX(REFERENCE) is being called multiple times and it looks inefficient.
Below is sample code from my previous…

Relinwar
- 93
- 5
0
votes
1 answer
Assigning user declared variable inside mysql while loop results in null
I am trying the following mysql function, which includes a while loop.
BEGIN
SET @total := 5000;
SET @count := 1;
SET @total := (SELECT price from item_prices WHERE id=SUBSTRING_INDEX(items,";",1));
INSERT INTO mytest values…

Chamila Wijayarathna
- 1,815
- 5
- 30
- 54
0
votes
1 answer
notepad ++ - User defined language "If" found in every word
I've created a user defined language, but the "if" condition is found also inside the normal text, or variable names. Is there a way to define that is has to be coupled with "if ..... Then"?
i tried:
if then
"if * then"
if * then
{if then}
{if *…

sharkyenergy
- 3,842
- 10
- 46
- 97
0
votes
1 answer
Can I define a gdb command that works with pointer or object?
Suppose I create a gdb user-defined command like this:
define pfoo
call foo_printer($arg0)
end
where foo_printer takes a pointer argument. Then if I have a pointer variable pf I can do:
pfoo pf
But if I have a non-pointer variable f, I need to…

John H.
- 1,551
- 1
- 12
- 18
0
votes
1 answer
C++ User defined function to populate an array
I'm just using cout to check if the function worked correctly. The cout that's in the function works and the output is 17 which is the first number in the text file. However, the cout in the main() function outputs 0. Why is this?
#include…

keyrimee
- 11
- 4
0
votes
1 answer
User-defined function sorting column problem
I have taken reference from the internet about one user-defined function to locate 'nth occurrence of a string to do the sort column name in the database. I am using MySQL 5.5 version, not the latest version. Here is my sample database link…

Pi Network Crytocurrency
- 583
- 1
- 8
- 25
0
votes
0 answers
MySQL decrement user variable on value change?
I have a problem with MySQL user defined variables!
My table looks like this ..
plz | uid
4000 1
4000 2
9000 3
7000 4
Desired output ..
rownum | plz | uid
1000 4000 1
1000 4000 …

Aldee
- 61
- 9