Skip to content

Instantly share code, notes, and snippets.

2018-11-27 11:21:42,742 WARN org.apache.jackrabbit.core.SessionImpl : Unclosed session detected. The session was opened here:
java.lang.Exception: Stack Trace
at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:279) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:239) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:101) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1614) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:957) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1502) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at org.apache.jackrabbit.core.jndi.BindableRepository.login(BindableRepository.java:162) ~[jackrabbit-core-2.16.1.jar:2.16.1]
at info.magnolia.jackrabb
/**
* Kostra programu pro 3. projekt IZP 2018/19
*
* Jednoducha shlukova analyza: 2D nejblizsi soused.
* Single linkage
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h> // sqrtf
@rah003
rah003 / content
Last active December 3, 2018 09:35
what is difference between notation 1) ```&(*arr[i])``` and 2) ```arr[i]``` ?
Why does 1) work and 2) fail w/ Segmentation fault?
works:
```
...
int load_arr(char *filename, struct arr_t **arr)
{
...
*arr = malloc(arr_size * sizeof(struct arr_t));
@rah003
rah003 / Virtual URI mapping listing
Last active January 11, 2019 14:10
Lists all virtual URI mapping defined in given instance of Magnolia that would fire for URI provided as parameter
import java.net.URI;
import info.magnolia.virtualuri.VirtualUriMapping;
import info.magnolia.virtualuri.VirtualUriRegistry;
import info.magnolia.objectfactory.Components;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
//** Set your URI here **//
2019-01-29 22:16:36,547 ERROR info.magnolia.module.InstallContextImpl : [521/522 tasks - Magnolia Webapp Module (version 6.0.0)]> Error while installing or updating webapp module. Task 'Webapp bootstrap' failed. (ItemExistsException: Node with the same UUID exists:node /modules/enterprise/license)
java.lang.RuntimeException: Error importing /Users/had/tmp/60split/webapps/magnoliaPublic/WEB-INF/bootstrap/common/config.modules.enterprise.license.xml: Node with the same UUID exists:node /modules/enterprise/license
at info.magnolia.importexport.DataTransporter.importXmlStream(DataTransporter.java:388) ~[magnolia-core-6.0.jar:?]
at info.magnolia.importexport.DataTransporter.importXmlStream(DataTransporter.java:245) ~[magnolia-core-6.0.jar:?]
at info.magnolia.importexport.DataTransporter.importFile(DataTransporter.java:170) ~[magnolia-core-6.0.jar:?]
at info.magnolia.importexport.DataTransporter.executeBootstrapImport(DataTransporter.java:197) ~[magnolia-core-6.0.jar:?]
at info.magnolia.importexport.
@rah003
rah003 / content
Last active June 3, 2019 07:59
generate list of urls for given site
wget -m https://www.magnolia-cms.es 2>&1 | grep '^--' | awk '{ print $3 }' | grep -iv '\.\(css\|js\|png\|mp4\|gif\|jpg\|mov\|jpeg\|eot\|woff\|ttf\|svg\)$' > urls.txt
@rah003
rah003 / content
Last active May 21, 2019 09:39
Restructure workspace
s = ctx.getJCRSession("foflinks")
topPage = "/"
level = 30
root = s.getNode(topPage)
println("start with " + topPage)
listChildren(root, "")
println("done")
@rah003
rah003 / content
Created May 21, 2019 09:39
Aggregate times
import java.util.Calendar;
cal = Calendar.getInstance();
def currentYear = cal.get(Calendar.YEAR) % 100;
s = ctx.getJCRSession("foflinks");
n = s.getNode("/")
println ("at root")
// consolidate years first
Magnolia Dx Core Demo Webapp 6.1 (Snapshot: 2019.06.21 09:44:59)
Copyright 2003-2019 Magnolia International Ltd.
This product includes/uses software(s) developed by 'an unknown organization'
- stream-lib (https://github.com/addthis/stream-lib)
License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- parso (https://github.com/epam/parso)
License: Apache License v2 (http://www.apache.org/licenses/LICENSE-2.0.html)
- null (https://github.com/fge/btf)
License: Lesser General Public License, version 3 or greater (http://www.gnu.org/licenses/lgpl.html)
Magnolia Enterprise Pro Webapp 5.7
Copyright 2003-2018 Magnolia International Ltd.
This product includes/uses software(s) developed by 'Andrey Somov' (https://bitbucket.org/asomov/snakeyaml)
- SnakeYAML
License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
This product includes/uses software(s) developed by 'Andy Clark, Marc Guillemot' (http://nekohtml.sourceforge.net)
- Neko HTML
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)