Questions tagged [declare]

Use this tag for questions related to declare, which is usually meant for declaring variables, statements, etc.

736 questions
0
votes
2 answers

Dojo declare - the scope of default properties (instance or static)

I've spent a lot of time debugging strage error in my component. That component have disabled/enabled buttons, but I haven't seen the effect. After a while, I've noticed, the buttons are changed in the last component instance I've created. The…
Danubian Sailor
  • 1
  • 38
  • 145
  • 223
0
votes
1 answer

How to declare and initialize integer variable in Decision Table?

I want to declare and initialize integer variable in Decision Table. I created a sample rule in .drl file. It's working fine but i want that rule in drool spreadsheet. Anybody know How to do it? Sample Rule code. rule "GoodBye1" salience 5 …
Raj
  • 252
  • 1
  • 5
  • 20
0
votes
1 answer

MySQL Delcare causing error

I am trying to create a trigger that marks items as deleted when they are inserted into the database. Sadly I can't get my DECLARE to stop erroring, I have looked at the DECLARE docs and also at a few examples but I must be missing something. The…
Luke
  • 22,826
  • 31
  • 110
  • 193
0
votes
2 answers

How the object created by dojo.declare can access its own properties?

I have some conceptual problem with using Dojo's class-like objects created with dojo/_base/declare. I have created the following module: define(["dojo/_base/declare", ....], function(declare,....){ return declare('my.widget', null…
Danubian Sailor
  • 1
  • 38
  • 145
  • 223
0
votes
1 answer

Equivalence of powershell += on vb.net when declaring variables

I have the following code that I'm translating from powershell to vb.net for ($a=1; $a -le $intPasswordLength; $a++) { if ($a -gt 3) { $b = $rand.next(0,3) + $a $b = $b % 3 + 1 } else { $b = $a } …
FerMelon
  • 93
  • 3
  • 13
0
votes
1 answer

Easiest way to get two arrays have the same length?

There are two arrays in my projects. One is of static const type which contain more or less entries on different projects, like static const array_A[] = { ... }; I do not like the style of array_A[N] = { ... } since I do not want to count the…
Pan Ruochen
  • 1,990
  • 6
  • 23
  • 34
0
votes
1 answer

How do I declare strings of data

I have a long code that is creating financial accounting data. The code uses multiple unions to breakout data to different company groupings. There are 5-6 account groupings that are reference multiple times. Anytime there is a change to the…
0
votes
2 answers

Getting errors on trying to declare a class in java

I got this part of code: import java.util.*; import java.io.*; public class Oblig2 { Meny menyen = new Meny(); public static void main (String[] args) { Scanner input = new Scanner (System.in); int menyvalg=0; //Lager filen ved navn…
Makri
  • 331
  • 2
  • 4
  • 15
0
votes
1 answer

C++/Qt how to declare and initialize a global array of objects

How can I make it a global arrays of objects, like QPoint point[5][6]; global.h #include extern QPoint point[5][6];//Am I correct? global.cpp #include // How to initialize??? main.cpp #include use them;
Zhang LongQI
  • 494
  • 1
  • 11
  • 25
0
votes
1 answer

SQL printing error message with bad record code

Working with SQL Server 2005 Creating Trigger which checks if inserting not already exist. Having problem getting record parameter, there is the code: CREATE TRIGGER t_MFShiftTypeOperation ON [CAST$MFShiftTypeOperation] FOR INSERT, UPDATE…
Edgar
  • 1,120
  • 4
  • 28
  • 53
0
votes
2 answers

what is the best and how declare const in function of c++

I have these code #include using namespace std; class Ex; class Exx; class Ex { public: int _val; int const *_p_val; void setPtrVal(int * const &val) { _p_val=val; } }; class Exx { public: Ex const *_ex; …
quano1
  • 1
  • 1
0
votes
3 answers

Comparing Sum from 2 different Columns

I'm trying to compare the sum of 2 different columns and I'm getting an error saying that I must declare @Base. Then I have tried to do something like @Base AS B, the error will disappear. But I'm not retrieving any data. Can anyone help me with if…
pancake
  • 590
  • 7
  • 24
0
votes
3 answers

Why does this basic 'Select Into' stored procedure not work?

I'm running Oracle SQL developer and I've got the following Stored Procedure. I'm quite new to this but really not sure why this isn't working: CREATE OR REPLACE PROCEDURE CHECKDUPLICATE( username1 IN USERS.USERNAME%TYPE, o_username…
DeaIss
  • 2,525
  • 7
  • 27
  • 37
0
votes
1 answer

How do I declare a global matrix in NETLOGO? (Using matrix extension)

I found an example using the following sintax: let A matrix: from-row-list [[3 5] [0 1]] let B matrix: from-row-list [[3 0] [5 1]] But it keeps showing: Expected keyword. It selects the let reserved word. Thanks.
Jorge Cespedes
  • 547
  • 1
  • 11
  • 21
0
votes
2 answers

SQL call a SP from another SP

Can I please have some help with the syntax of a SP in SQL. Here is my code: CREATE PROCEDURE usp_GetValue ( @ID VARCHAR(10), @Description VARCHAR(10) ) AS BEGIN return @ID + @Description END CREATE PROCEDURE usp_InsertValue ( @ID…