Menu

Graded Response Action Plan (GRAP)

Stage IV of the Graded Response Action Plan (GRAP) has been activated in Delhi-NCR due to severe air pollution, with the Air Quality Index (AQI) reaching 457. Here are the key measures and restrictions under GRAP Stage IV:

  1. Education: Physical classes are suspended for all students except those in Classes 10 and 12.
  2. Traffic Restrictions:
    • Entry of truck traffic into Delhi is banned, except for trucks carrying essential commodities or providing essential services.
    • Light commercial vehicles registered outside Delhi, except for EVs, CNG, and BS-VI diesel vehicles, are prohibited from entering.
    • Delhi-registered BS-IV and below diesel-operated medium and heavy goods vehicles are banned, except for those carrying essential services.
  3. Work-from-Home: Governments and private offices may allow 50% of employees to work from home.
  4. Additional Measures: State governments may consider closing colleges, educational institutions, and non-emergency commercial activities. They may also implement odd-even vehicle restrictions.
  5. Health Advisory: Vulnerable groups, including children, the elderly, and those with chronic diseases, are advised to stay indoors and avoid outdoor activities.

These measures aim to curb the worsening air quality and protect public health in the region.

How to start AEM in debug mode? Adobe Experience Manager start guide

There are multiple approaches to start or tune Adobe Experience Manager (AEM) instance in debug mode. we will cover few of them in this tutorial.

  1. We could start AEM using the command prompt by using the below command line.
  2.  java -jar aem63-author-p4502.jar -debug <port#>
  3. Another way to start or tune AEM instance in debug mode is, we could update the start.bat file and start AEM by clicking on the start.bat file in crx-quickstart folder. To do so we have to do the following.
  • First we need to update the start file; go to \crx-quickstart\bin\start.bat and append this command "-debug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=<port#>" with line 25, default JVM options.
  • Save the file
  •  Now double click on the start.bat file to start your AEM instance.
After changes, your start.bat file will look like following.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@echo off
:: This script configures the start information for this server.
::
:: The following variables may be used to override the defaults.
:: For one-time overrides the variable can be set as part of the command-line; e.g.,
::
::     SET CQ_PORT=1234 & ./start.bat
::
setlocal

::* TCP port used for stop and status scripts
if not defined CQ_PORT set CQ_PORT=4502

::* hostname of the interface that this server should listen to
:: if not defined CQ_HOST set CQ_HOST=

::* runmode(s)
::* will not be used if repository is already present
if not defined CQ_RUNMODE set CQ_RUNMODE=author

::* name of the jarfile
:: if not defined CQ_JARFILE set CQ_JARFILE=

::* default JVM options
if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx2048m -XX:MaxPermSize=512M -Djava.awt.headless=true -debug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303

::* ------------------------------------------------------------------------------
::* authentication
::* ------------------------------------------------------------------------------
::* when using oak (crx3) authentication must be configured using the
::* Apache Felix JAAS Configuration Factory service via the Web Console
::* see http://jackrabbit.apache.org/oak/docs/security/authentication/externalloginmodule.html

::* use jaas.config (legacy: only used for crx2 persistence)
:: if not defined CQ_USE_JAAS set CQ_USE_JAAS=true

::* config for jaas (legacy: only used for crx2 persistence)
if not defined CQ_JAAS_CONFIG set CQ_JAAS_CONFIG=etc\jaas.config

::* ------------------------------------------------------------------------------
::* persistence mode
::* ------------------------------------------------------------------------------
::* the persistence mode can not be switched for an existing repository
set CQ_RUNMODE=%CQ_RUNMODE%,crx3,crx3tar
:: set CQ_RUNMODE=%CQ_RUNMODE%,crx3,crx3mongo

::* settings for mongo db
:: if not defined CQ_MONGO_HOST set CQ_MONGO_HOST=127.0.0.1
:: if not defined CQ_MONGO_PORT set CQ_MONGO_PORT=27017
:: if not defined CQ_MONGO_DB   set CQ_MONGO_DB=aem6

::* ------------------------------------------------------------------------------
::* do not configure below this point
::* ------------------------------------------------------------------------------

chdir /D %~dp0
cd ..
if exist conf\controlport del conf\controlport
if not defined CQ_JARFILE     for %%X in (app\*.jar) do set CQ_JARFILE=%%X
for %%* in (.) do set CurrDirName=%%~n*
cd ..

set START_OPTS=start -c %CurrDirName% -i launchpad
if defined CQ_PORT            set START_OPTS=%START_OPTS% -p %CQ_PORT%
if defined CQ_RUNMODE         set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dsling.run.modes=%CQ_RUNMODE%
if defined CQ_HOST            set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dorg.apache.felix.http.host=%CQ_HOST%
if defined CQ_HOST            set START_OPTS=%START_OPTS% -a %CQ_HOST%
if defined CQ_MONGO_HOST      set START_OPTS=%START_OPTS% -Doak.mongo.host=%CQ_MONGO_HOST%
if defined CQ_MONGO_PORT      set START_OPTS=%START_OPTS% -Doak.mongo.port=%CQ_MONGO_PORT%
if defined CQ_MONGO_DB        set START_OPTS=%START_OPTS% -Doak.mongo.db=%CQ_MONGO_DB%
if defined CQ_USE_JAAS        set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Djava.security.auth.login.config=%CQ_JAAS_CONFIG%
set START_OPTS=%START_OPTS% -Dsling.properties=conf/sling.properties

if exist newTaskList.txt del newTaskList.txt
if exist oldTaskList.txt del oldTaskList.txt
tasklist /FI "IMAGENAME eq java.exe" /NH > oldTaskList.txt
start "CQ" cmd.exe /C java %CQ_JVM_OPTS% -jar %CurrDirName%\%CQ_JARFILE% %START_OPTS%

:: removing the delay until CQ-4202186 is solved
:: timeout /T 1 /NOBREAK >nul

tasklist /FI "IMAGENAME eq java.exe" /NH > newTaskList.txt
java -cp %~dp0 GetProcessID oldTaskList.txt newTaskList.txt java.exe > %CurrDirName%\conf\cq.pid
if exist newTaskList.txt del newTaskList.txt
if exist oldTaskList.txt del oldTaskList.txt

Once you have done with the above changes and started your aem in debug mode then you have to configure debugger in your IDE (Eclipse or IntelliJ). To configure the debugger with your local AEM instance please follow this article. Remote debugger in eclipse

Principal Component Analysis (PCA)

Principal Component Analysis (PCA) is a widely-used statistical technique in data science and machine learning for dimensionality reduction. It simplifies large datasets while retaining the most critical information. By transforming the data into a new set of variables called principal components, PCA helps uncover hidden patterns, reduce noise, and optimize computational efficiency for tasks like visualization, clustering, and classification.

Why Use PCA?

Modern datasets often have a high number of dimensions(features). High-dimensional data can be:

  • Redundant: Many features might be correlated, adding unnecessary complexity.
  • Noisy: Irrelevant or noisy features can obscure the signal in data.
  • Difficult to visualize: Beyond three dimensions, visualizing data becomes challenging.

PCA addresses these issues by:

  • Reducing redundancy.
  • Compressing datasets while preserving essential patterns.
  • Making data more manageable for analysis or machine learning.

Applications of PCA

  1. Data Visualization: Principal Component Analysis(PCA) reduces high-dimensional data to 2D or 3D, enabling visualization of complex datasets.
  2. Preprocessing for Machine Learning: Reduces overfitting by eliminating irrelevant features and speeds up training for models on high-dimensional data.
  3. Image Compression: PCA compresses images by representing them with fewer components.
  4. Noise Reduction: Principal Component Analysis(PCA) filters out noise by removing components with low variance.

Advantages of PCA

  1. Simplifies datasets without significant loss of information.
  2. Helps in visualizing high-dimensional data.
  3. Reduces computation time for downstream tasks.
  4. Minimizes the risk of overfitting in machine learning models.

Limitations of PCA

  1. Linearity: Principal Component Analysis (PCA) assumes linear relationships between features and may not perform well with non-linear data.
  2. Interpretability: Principal components are combinations of original features, making them harder to interpret.
  3. Scale Sensitivity: Principal Component Analysis(PCA) is sensitive to feature scaling and requires careful preprocessing.
  4. Loss of Information: If too few components are retained, important information may be lost.