ADL error while loading initial content Adobe air - air

I am new to AdobeAir. I started with helloworld app by just following the following link.
http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc4c0afd1212601c9a36f-8000.html
I am able to compile HelloWorld.mxml file successfully, but i am not able to run the app by following command adl HelloWorld-app.xml . the error message says .. error while loading initial content.
Also I am attaching the HelloWorld-app.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/1.0">
<id>samples.flex.HelloWorld</id>
<version>0.1</version>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.swf</content>
<visible>true</visible>
<systemChrome>none</systemChrome>
<transparent>true</transparent>
<width>400</width>
<height>200</height>
</initialWindow>
</application>
and HelloWorld.mxml is
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://`enter code here`ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Hello World">
<s:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0"/>
</s:WindowedApplication>
Please help me.

The AIR namespace number found in xmlns is only half the story. That defines the minimum runtime version required to display the content. The other half of the story is what -swf-version was the content compiled with.
If the SWF is compiled with a newer -swf-version than the AIR adl can handle, you'll get the
"error while loading initial content" message.
I picked up this table from another answer and added AIR version info (source):
SWF Version | Flash Player Version | AIR Version
---------------+------------------------+---------------
9 | 9.0.115.0 | N/A
10 | 10.0, 10.1 | 1.5, 2.0
11 | 10.2 | 2.6
12 | 10.3 | 2.7
13 | 11.0 | 3
14 | 11.1 | 3.1
15 | 11.2 | 3.2
16 | 11.3 | 3.3
17 | 11.4 | 3.4
18 | 11.5 | 3.5
19 | 11.6 | 3.6
20 | 11.7 | 3.7
21 | 11.8 | 3.8
22 | 11.9 | 3.9
23 | 12 | 4
24 | 13 | 13
25 | 14 | 14
26 | 15 | 15
27 | 16 | 16
28 | 17 | 17
29 | 18 | 18
30 | 19 | 19
31 | 20 | 20
32 | 21 | 21
33 | 22 | 22
34 | 23 | 23
35 | 24 | 24
36 | 25 | 25
37 | 26 | 26
38 | 27 | 27
39 | 28 | 28
40 | 29 | 29
41 | 30 | 30
42 | 31 | 31
You can determine the -swf-version of a SWF file using the swfdump utility included in the Flex and AIR SDKs.
> swfdump example.swf | grep -i '<swf'
<swf xmlns='http://macromedia/2003/swfx' version='18' framerate='24' size='10000x7500' compressed='false' >
The above SWF is compiled with -swf-version=18 and hence will require AIR 3.5 or newer, and xmlns="http://ns.adobe.com/air/application/3.5"
Also note that newer tools can still target older -swf-versions. So you can build SWFs compatible with older AIR and Flash Players. Just be careful to check the APIs you use in the documentation. Some newer APIs (like BitmapData.drawWithQuality) list a minimum player version requirement under Runtime Versions.

According to this blog post you should check if the namespace line in the HelloWorld-app.xml matches your AIR version.
For example, with the mxml/adl tools that come with the Flex 4.6 distribution, the correct namespace line seems to be
<application xmlns="http://ns.adobe.com/air/application/3.1">
It is also necessary that your mxmlc or amxmlc compiler is not from a newer SDK than the adl.
For example, you can't run AIR apps compiled with Flex 4.6 in adl from AIR 2.6, you need the Flex 4.5 tools for that.

Thank you, your answer helped to solve my issue with IntelliJ Idea and the latest FLEX/AIR package.
To solve that error I had to provide a modified application descriptor file for my module, since the automatically generated one had this setting:
<application xmlns="http://ns.adobe.com/air/application/2.0">
Here the steps needed to create a custom application descriptor file:
File - Projext Structure - Modules - AIR Package - Custom template - Create
Pick your minimal AIR version (actually for Flex 4.10 I think it is AIR 3.8) and your module will compile and run without problems.
See screenshot here

Related

Error converting pandoc tables from .md to PDF

I try to convert Markdown files to PDF with
FOR %%i IN (*.md) DO pandoc "%%~fi" -o "%%~dpni.pdf" --template=weber-export.tex --pdf-engine=xelatex
But it wont convert pandoc-tables. instead there occurs an error saying
Error producing PDF.
! Missing number, treated as zero.
<to be read again>
(
l.357 ...columnwidth - 2\tabcolsep) * \real{0.33}}
Simply Version of the tables it wont convert are :
Consumption / yield
---------------------
+--+---+--+
| | | |
| | | |
| | | |
+--+---+--+
| | | |
| | | |
| | | |
+--+---+--+
| | | |
| | | |
| | | |
+--+---+--+
and
-------------------------------------------------------------------
Type Sales unit Number
------------------------------- ------------ ----------------------
Plastic bucket 30 liters 18 buckets
-------------------------------------------------------------------
like its explained in the Pandoc User's Guid
I have installed Miktex 2.9 and pandoc 2.11.2 on Win 10
Without the tables, the conversion is doing well, even when i try out tables without the first line like
Type Sales unit Number
------------------------------- ------------ ----------------------
Plastic bucket 30 liters 18 buckets
-------------------------------------------------------------------
it works.
any suggestions? Is it a bug, or what am i doing wrong?
It seems that your custom template does not load all necessary packages.
Add
\usepackage{calc,array}
to your template to ensure the necessary commands are available.

Is there a way to show the range of major.minor class versions supported by a jvm?

Can the java command print the range of class versions supported by it?
Or is there a list of this information for each jvm version somewhere online?
The requirements on supported class file versions are described in JVM specification ยง4.1:
+---------+-----------------------------+--------------------------+
| Java SE | Corresponding major version | Supported major versions |
+---------+-----------------------------+--------------------------+
| 1.0.2 | 45 | 45 |
| 1.1 | 45 | 45 |
| 1.2 | 46 | 45 .. 46 |
| 1.3 | 47 | 45 .. 47 |
| 1.4 | 48 | 45 .. 48 |
| 5.0 | 49 | 45 .. 49 |
| 6 | 50 | 45 .. 50 |
| 7 | 51 | 45 .. 51 |
| 8 | 52 | 45 .. 52 |
| 9 | 53 | 45 .. 53 |
| 10 | 54 | 45 .. 54 |
| 11 | 55 | 45 .. 55 |
| 12 | 56 | 45 .. 56 |
| 13 | 57 | 45 .. 57 |
+---------+-----------------------------+--------------------------+
For a class file whose major_version is 56 or above, the minor_version
must be 0 or 65535.
For a class file whose major_version is between 45 and 55 inclusive,
the minor_version may be any value.
A historical perspective is warranted on JDK support for class file
format versions. JDK 1.0.2 supported versions 45.0 through 45.3
inclusive. JDK 1.1 supported versions 45.0 through 45.65535 inclusive.
When JDK 1.2 introduced support for major version 46, the only minor
version supported under that major version was 0. Later JDKs continued
the practice of introducing support for a new major version (47, 48,
etc) but supporting only a minor version of 0 under the new major
version. Finally, the introduction of preview features in Java SE 12
(see below) motivated a standard role for the minor version of the
class file format, so JDK 12 supported minor versions of 0 and 65535
under major version 56. Subsequent JDKs introduce support for N.0 and
N.65535 where N is the corresponding major version of the implemented
Java SE Platform. For example, JDK 13 supports 57.0 and 57.65535.

Excel advanced lookup/reference formula required

I am not sure which function is needed, either Vlookup or Match to bring a value from one report to another. For example, I am trying to introduce these values into another report that is more comprehensive and includes more categories. I am looking for a formula that would correctly identify a value such as the quantity of Hot Tea but also take into consideration the header of Morning versus Evening as the results are quite different and thus a plain vlookup won't work.
Chart 1
Morning | Quantity
Hot tea | 10
Hot pie | 15
Mac and Cheese | 20
Afternoon |
Hot chocolate | 30
Hot pie | 35
Mac and Cheese | 40
Evening |
Hot tea | 25
Croissants | 20
Broccoli | 20
Chart 2
Morning |Quantity |Regular | No Trans Fat |No Corn Syrup
Hot tea | 10 | 3 | 2 | 5
Hot pie | 15 | 5 | 2 | 8
Mac and Cheese| 20 | 15 | 5 | 0
Afternoon
Hot chocolate | 30 | 25 | 2 | 3
Hot pie | 35 | 30 | 5
Mac and Cheese| 40 | 38 | 1 | 1
Evening
Hot tea | 25 | 20 | 2 | 3
Croissants | 20 | 17 | 2 | 1
Broccoli | 20 | 16 | 1 | 3
allright you need to have a work around so here's my suggestion. let's pretend that your table starts at A1 with Morning. C1 i want you to type "Morning"
then in C2 use this formula
=IF(B2="",A2,C1)
then drag down to the end of your list and you should get something like this
Now not knowing what your other sheet looks like the last part you may need to rework. but i would set up a table like this
and in cell B2 use this formula
=SUMIFS(Sheet1!$B:$B,Sheet1!$A:$A,Sheet2!$A2,Sheet1!$C:$C,B$1)
and drag to fill up rest of the table. like i said not knowing how you're table us set up it's difficult to say

Is there a termination character for bq in interactive mode? How do I set it?

I've just started using bigquery and I'm used to writing SQL across multiple lines. However, if I run
bq shell
to get into interactive mode, I can't put a query in that runs across multiple lines without bq reporting an error, as it evaluates the first line of the instruction and then complains there's no FROM or GROUP BY clauses.
In other database clients, I can set a termination character: eg in DB2,
db2 -t
allows me to run db2 with commands terminated with ;
Is there a way to run bq with a termination character for each statement? I've looked at https://developers.google.com/bigquery/bq-command-line-tool and although it refers to global flags, I don't see a reference to termination characters.
After delving in the source code for bq, I can confirm there's not such termination character that allows you to do multi-line queries.
It's a consequence of the cmd module on which bq shell is built upon.
As an alternative you could run queries directly from your shell with bq query YOUR QUERY as the shell allows multi-line commands when enclosed in double quotes (").
Example:
bq query "SELECT station_number, year, month, day
FROM [publicdata:samples.gsod]
LIMIT 10"
+----------------+------+-------+-----+
| station_number | year | month | day |
+----------------+------+-------+-----+
| 42420 | 2007 | 5 | 20 |
| 42080 | 2007 | 5 | 5 |
| 152990 | 1990 | 3 | 26 |
| 543110 | 1976 | 10 | 24 |
| 740430 | 1966 | 11 | 30 |
| 228540 | 1949 | 9 | 23 |
| 747809 | 2009 | 7 | 17 |
| 681120 | 1997 | 2 | 15 |
| 26070 | 2008 | 12 | 27 |
| 128430 | 1988 | 9 | 22 |
+----------------+------+-------+-----+

What is location of built in SQL functions and Oracle Packages in Oracle Database

I want to know location of file / table where definition of Built In Functions / Packages / Procedures of Oracle are stored like MAX(), DBMS_OUTPUT etc.
In the PL/SQL engine, the Oracle supplied functions such as MAX() are part of the package STANDARD in the SYS schema.
Most other supplied packages reside in the SYS schema, however you can find out where any individual package is located quite easily - for example:
SELECT *
FROM all_objects
WHERE object_name = 'DBMS_OUTPUT'
Results:
| OWNER | OBJECT_NAME | SUBOBJECT_NAME | OBJECT_ID | DATA_OBJECT_ID | OBJECT_TYPE | CREATED | LAST_DDL_TIME | TIMESTAMP | STATUS | TEMPORARY | GENERATED | SECONDARY | NAMESPACE | EDITION_NAME |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SYS | DBMS_OUTPUT | (null) | 4972 | (null) | PACKAGE | August, 27 2011 08:22:22+0000 | August, 27 2011 08:22:22+0000 | 2011-08-27:08:22:22 | VALID | N | N | N | 1 | (null) |
| PUBLIC | DBMS_OUTPUT | (null) | 4973 | (null) | SYNONYM | August, 27 2011 08:22:22+0000 | August, 27 2011 08:22:22+0000 | 2011-08-27:08:22:22 | VALID | N | N | N | 1 | (null) |
The following documentation page lists off most (if not all) PL/SQL supplied packages:
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/intro.htm#BABGEDBH
The scripts to create the build-in functions, packages and procedures are stored on the database server machine. You have to find the value of the environment variable $ORACLE_HOME, and then go to $ORACLE_HOME/rdbms/admin/. Just use grep to find the file you're looking for.
If the database server is a Windows machine, look at ECHO %ORACLE_HOME% at the command prompt and proceed from there.