Questions tagged [user-defined]
253 questions
1
vote
6 answers
Deleting user-defined vectors - C++
I have 2 classes, say A & B. Class B has a destructor of its own. Within class A, I have a vector of pointers to objects of class B. The vector is as follows:
vector vect;
In the destructor for class A, how do I retrieve memory? If I cycle…

Sriram
- 10,298
- 21
- 83
- 136
1
vote
1 answer
Defining a User Defined Language on top of SQL
Ok, so our basic idea is to construct a language on top of SQL. The main goal is for us to pre-process a string containing SQL mixed up with different stuff, parse our "invented" language, produce SQL on the other end and eventually execute that SQL…

tfrascaroli
- 1,178
- 1
- 14
- 26
1
vote
2 answers
PHP Sorting array of arrays based on another user-defined array
Hoping I am not opening a duplicate question but I didn't see this type of question being asked or the answers I saw didn't seem to work with my dataset (but I'm very new at this).
I am hoping to sort the following data set (array of arrays) based…

Kurt W
- 321
- 2
- 15
1
vote
3 answers
Convert Array to User Defined Object in PHP
I have an array as below -
$xml= array(
'name'=> 'Arun',
'roll' => '12345',
'id' => '1'
);
I want this to be converted to User Defined Object [Not stdClass Nor SimpleXMLObject]
I want it…
user4832609
1
vote
1 answer
How to parse user defined html attributes using html DOM with '-' in that attribute?
For example:
$html = "
test a
test b
test c
";
$htmldom =…
1
vote
0 answers
PostgreSQL 8.1 (Greenplum) - User defined type as an array example
How do one create an array of a user defined type in PostgreSQL 8.1 (Greenplum)?
I have the type:
create type tp_keyval as (
key_nm text
,key_vals text[]
);
I would like an array something like:
v_keyval_set tp_keyval[];
According to the…

Johan Swart
- 43
- 3
1
vote
2 answers
SAS User defined informat to read in phone numbers
Hello I have an issue with reading in data
I have a csv that im trying to read into sas and the phone number is in the form of (###)###-#### and I want to create an informat that reads in the #'s only.

user3648688
- 69
- 1
- 5
1
vote
2 answers
Get raised error in a class to main()
Hi im currently doing a program like this.
class MyError(Exception):
def __init__(self, text = "Correct")
self.text = text
def __str__(self):
return (self.kod)
class Atom(self):
.
.
.
try:
function()
else:
…

Keexarian
- 17
- 5
1
vote
3 answers
User defined top level control in XAML
A normal UserControl looks like this in XAML:
I'd like to be able to define my own top level object, along the lines of:

luke
- 36,103
- 8
- 58
- 81
1
vote
3 answers
Kettle to encrypt file using PGP
I want to encrypt files using PGP in Pentaho.
I have a Java program to encrypt the file through command line.
Kettle recommends to encrypt row by row using user defined call, Is there a way to encrypt whole file as such using kettle user defined…

Ganesh
- 1,654
- 2
- 19
- 32
1
vote
3 answers
Using a user-set variable in an awk command
I'm trying to use awk with a user-defined variable ($EVENT, where $EVENT is a filename and also a column in a textfile) in the if condition, but it doesn't seem to recognize the variable. I've tried with various combinations of ', ", { and ( but…

user3058007
- 11
- 1
- 2
1
vote
1 answer
PyYaml Expect scalar but found Sequence
I am trying to load with user defined tags in my python code, with PyYaml. Dont have much experience with pyYaml loader, constructor, representer parser, resolver and dumpers.
Below is my code what i could come up with:
import yaml, os
from…

Vivek
- 910
- 2
- 9
- 26
1
vote
1 answer
How can I print instance of class that has user defined attributes?
I'm trying to figure out how to print out the instance of a class with user defined attributes in Python 3.
Here is the code I have:
class Attendie:
def __init__(self, fname, lname, company, state, email):
self.fname = fname
…

Al GoRhythm
- 133
- 2
- 4
- 12
1
vote
1 answer
retrieve user defined datatype from table
SQL> -- CASE 1
SQL>select nest_test.id.num from nest_test;
select nest_test.id.num from nest_test
*
ERROR at line 1:
ORA-00904: "NEST_TEST"."ID"."NUM": invalid identifier
SQL> -- CASE 2
SQL>select n.id.num from nest_test n;
…

Ravi
- 30,829
- 42
- 119
- 173
1
vote
3 answers
User-defined callback function is being fired multiple times in Javascript/jQuery
There are some similar questions, but they all seem like regarding native jQuery callback functions.
So I have this code which (live) creates a div containting some form elements.
Values of these elements should be retrieved inside a callback…

user1643156
- 4,407
- 10
- 36
- 59