im new to Java and have the following question regarding inner classes:
when implementing a inner class do i need to declare its attributes and methods scope i.e. public, private, protected?
I'm using Flash Builder 4 to build my AIR application.
For a certain reason, I need to declare my package name in camelcase, and class names in lowercase:
//test.as
package Core {
public class test {
}
}
The folder structure is like this (the dir 'Core' matches the package name):
src/
Core/
test.as
However, Flash Builder shows…
I have two distinct scenarios.
One, where there is a many to many case, you must create a third table. But I'm not familiar with MySQL syntaxis.
Two, is this one:
How can I declare using SQL code?
Ok, I have a hardcoded string I declare like this
name = u"Par Catégorie"
I have a # -- coding: utf-8 -- magic header, so I am guessing it's converted to utf-8
Down the road it's outputted to xml through
xml_output.toprettyxml(indent='....', encoding='utf-8')
And I get a
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in…
In Firebird we can declare custom exceptions like so:
CREATE EXCEPTION EXP_CUSTOM_0 'Exception: Custom exception';
these are stored at the database level. In stored procedures, we can raise the exception like so:
EXCEPTION EXP_CUSTOM_0 ;
Is there an equivalent in PostgreSQL ?
Is there a way to make jQuery use objects in a conditional statement as an object in a hierarchy. For Example, I want to validate that something exist then tell it to do something just using the this selector.
Like this
if ($(".tnImg").length) {
//i have to declare what object I am targeting here to get this to work
…
Is there any reason why you shouldn't use the "-std=c99" flag for compiling Objective-C programs on Mac? The one feature in C99 that I really like is the ability to declare variables anywhere in code, rather than just at the top of methods, but does this flag causes any problems or create incompatibilities for iPhone or Cocoa apps?
I was wondering if anyone knows of a caching proxy specifically for dealing with API responses?
Ideally, I'd be able to declare what caching policy to use for different API semantics, e.g. cache album art for 1 day, cache favorite tweets for 5 minutes, cache map tiles forever, except invalidate when this other API is called.
I…
From SP i need to get a row as as XML (Includeing all fileds.) Is there any way we can get like below.
Declare @xmlMsg varchar(4000)
select * into #tempTable from
dbo.order for xml raw
select @xmlMsg = 1 from #tempTable
print '@xmlMsg' + @xmlMsg
Row i would like to get it as XML output.
I've been using the Maven EAR plugin for creating my ear files for a new project. I noticed in the plugin documentation you can specify exclude statements for modules. For example the configuration for my plugin is as follows...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>…
My ERP Vendor has the following trigger on a table:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[SOItem_DeleteCheck]
ON [dbo].[soitem]
FOR DELETE
AS
BEGIN
DECLARE @RecCnt int, @LogInfo varchar(256)
SET @RecCnt = (SELECT COUNT(*) FROM deleted)
IF @RecCnt > 150
BEGIN
…
I am trying to understand what is going on with CREATE INDEX internally. When I create a NONCLUSTERED index it shows as an INSERT in the execution plan as well as when I get the query test.
DECLARE @sqltext VARBINARY(128)
SELECT @sqltext = sql_handle
FROM sys.sysprocesses s
WHERE spid = 73 --73 is the process creating the…
This is a strange one. I have a Dev SQL Server which has the stored proc on it, and the same stored proc when used with the same code on the UAT DB causes it to delete itself!
Has anyone heard of this behaviour?
SQL Code:
-- Check if user is registered with the system
IF OBJECT_ID('dbo.sp_is_valid_user') IS NOT…
I'm new to win32 API programming and I try to understand source code of treeview from codeproject.
But I really don't understand this :
BOOL TreeView::DoNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// blah blah
HTREEVIEW Selected =…
When trying to declare a static array in my program I receive a static forward reference error, i'm not sure what I am doing wrong here...
static Square fieldGrid [ ] [ ] = new Square [ ROWSIZE ] [ COLSIZE ];
this is what I am using.
Hello ,
I went through local variables and class variables concept.
But I had stuck at a doubt
" Why is it so that we cannot declare local variables as static " ?
For e.g
Suppose we have a play( ) function :
void play( )
{
static int…
here's my code:
DECLARE @SQL varchar(600)
SET @SQL =
'SELECT CategoryID, SubCategoryID, ReportedNumber
FROM tblStatistics
WHERE UnitCode = ' + @unitCode +
' AND FiscYear = ' + @currYEAR
EXEC (@SQL)
When i run this sproc with unitCode =…
hi all , i am trying to read a string from user in TASM assembly , i know i need a buffer to hold the input , max. length and actual length , but i seem to forgot how exactly we declare a buffer
my attempt was smth like this
Buffer db 80 ;max length
…
Hi,
i am using Core-plot . but when i declare the normal UIView as CPLayerHostingView,how can i
handle drawRect of that view , i cant give another custom UIview name and write code in drawRect of that view?please any help to handle drawRect of…
Hello, I need to find the indexes in the vector based on several boolean predicates.
ex:
vector<float> v;
vector<int> idx;
idx=where( bool_func1(v), bool_func2(v), ... );
What is the way to declare **where** function, in order…
We know that string is a reference type , so we have
string s="God is great!";
but on the same note if i declare class say Employee which is a reference type so why below piece of code does not work ?
Employee e = "Saurabh";
2- How do we…
My question is simple: What are void pointers for in C++? (Those things you declare with void* myptr;)
What is their use? Can I make them point to a variable of any type?
Why does an interface override a class definition and violate class encapsulation? I have included two samples below, one in C# and one in VB.net?
VB.net
Module Module1
Sub Main()
Dim testInterface As ITest = New TestMe
…
I would like to declare a template as follows:
template <typename T>
{
if objects of class T have method foo(), then
const int k=1
else
if class has a static const int L then
const int k=L
else
const int k=0;
…
At work, we 7 or 8 hardrives we dispatch over the country, each have unique labels which are not sequential.
Ideally drives are plugged in our desktop, then gets folders from the server that correspond to the drive name.
Sometimes, only…