-- http://hup.hu/node/144645?comments_per_page=9999#comment-1941528Pedig igaza van. Amíg nem fogják fel a felsőoktatásban, hogy bizony létezik egy olyan szakma, hogy szoftvermérnökség, ami nem csak abból áll, hogy a ciklus leállási feltételét bizonyítjuk be papíron, hanem abból is, hogy hogyan írunk tiszta kódot, hogyan írunk tesztelhető kódot, hogyan és mit dokumentálunk, hogyan keresünk hibát és oldunk meg problémát, addig ne is várd, hogy a cégek elvárják a diplomát az állásokhoz. A cégeknek szoftvermérnökök kellenek. Az egyetemi oktatás nem képest ezt megadni nekik.
According to The Directive 2009/24/EC of the European Parliament and of the Council, and Sec.103(f) of the DMCA (17 U.S.C. § 1201 (f)), the reverse engineering act committed to creating these blog posts is considered legal, as this is an original attempt to improve interoperability, and cannot be waived by license agreements.
The views expressed on this blog are my own and do not necessarily reflect the views of my past and present employers.
2016-01-02
hupquote #1
2015-12-10
2015-10-13
Some Hungarian laws
A "2010. évi CXXX. törvény a jogalkotásról" alapján a szolgáltató nem jogalkotó és nem jogforrás. Következményként az ÁSZF/EULA törvényt nem írhat felül.
2015-09-16
javascript: What is the type of this thing?!?!
So you wonder, what the hell is the type of a something? Stack Overflow to the rescue!
The full explanation and other ideas are here: http://stackoverflow.com/a/332429/357403
Object.prototype.toString.call('abc') // [object String]
Object.prototype.toString.call(/abc/) // [object RegExp]
Object.prototype.toString.call([1,2,3]) // [object Array]
The full explanation and other ideas are here: http://stackoverflow.com/a/332429/357403
2015-06-23
java: Field Type Descriptors
A field descriptor represents the type of a class, instance, or local variable.
| FieldType term | Type | Interpretation |
|---|---|---|
| B | byte | signed byte |
| C | char | Unicode character code point in the Basic Multilingual Plane, encoded with UTF-16 |
| D | double | double-precision floating-point value |
| F | float | single-precision floating-point value |
| I | int | integer |
| J | long | long integer |
| LClassName; | reference | an instance of class ClassName eg. for Object ⇒ Ljava/lang/Object; |
| S | short | signed short |
| Z | boolean | true or false |
| [ | reference | one array dimension eg. for double[][][] ⇒ [[[D |
2015-06-11
Oracle: JIRA issue activity breakdown
So you need how many issues get created, changed or commented per hour, each day.
Not my best, but what do you expect in ten minutes?
SELECT * FROM (
SELECT * FROM (
SELECT
ID AS "ISSUEID",
TO_CHAR(CREATED, 'YYYY-MM-DD') AS CREATED ,
TO_CHAR(CREATED, 'HH24') AS HOURS ,
TO_CHAR(CREATED, 'DAY') AS DOW ,
'NEW' AS "TYPE"
FROM JIRAISSUE
WHERE CREATED >= TO_DATE('2015-01-01', 'YYYY-MM-DD')
UNION ALL
SELECT
ISSUEID ,
TO_CHAR(CREATED, 'YYYY-MM-DD') AS CREATED,
TO_CHAR(CREATED, 'HH24') AS HOURS ,
TO_CHAR(CREATED, 'DAY') AS DOW ,
'CHANGE' AS "TYPE"
FROM CHANGEGROUP
WHERE CREATED >= TO_DATE('2015-01-01', 'YYYY-MM-DD')
UNION ALL
SELECT
ISSUEID ,
TO_CHAR(CREATED, 'YYYY-MM-DD') AS CREATED,
TO_CHAR(CREATED, 'HH24') AS HOURS ,
TO_CHAR(CREATED, 'DAY') AS DOW ,
'COMMENT' AS "TYPE"
FROM JIRAACTION
WHERE CREATED >= TO_DATE('2015-01-01', 'YYYY-MM-DD')
)
PIVOT (
COUNT(ISSUEID) FOR (HOURS)
IN ('00', '01', '02', '03', '04', '05', '06', '07',
'08', '09', '10', '11', '12', '13', '14', '15',
'16', '17', '18', '19', '20', '21', '22', '23')
)
) ORDER BY CREATED DESC, "TYPE" DESC;
Not my best, but what do you expect in ten minutes?
2015-06-10
java: How to bulk load the Java Exception Site List
This guide comes handy if you have a big site list that utilizes a Java applet as the primary entry point (Netscaler, Agile, HP BPM/PPM, etc), those you want to allow in browsers but latest Java blocks them, because they are not containing a security manifest.
Good to know
- No wildcards at all in the exception file.
- Specify the port if needed (like :8080), as the default is the protcol's default port (80 for http, 443 for https).
- End URL-s with / to also allow subdirectories.
- Your own (default) exception.sites file is at: C:\Users\<user>\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites, this is what the Java Control Panel uses by default. You have to copy your existing stuff from here.
- No comments are allowed in the exception.sites file... :-( If you try to have one, the exception file gets corrupted and will be skipped.
Step-by-step guide
- Create the file: C:\Users\<user>\AppData\LocalLow\Sun\Java\Deployment\deployment.config
- Set it's contents to be:
deployment.system.config=file\:C\:/Windows/Sun/Java/Deployment/deployment.properties
- Create the file: C:\Windows\Sun\Java\Deployment\deployment.properties
- Set it's contents to be:
#C:\Windows\Sun\Java\Deployment\deployment.properties deployment.webjava.enabled=true deployment.security.level=MEDIUM deployment.security.level.locked deployment.user.security.exception.sites=C\:/Windows/Sun/Java/Deployment/exception.sites install.disable.sponsor.offers=true
- Create the file: C:\Windows\Sun\Java\Deployment\exception.sites
- Now, you can copy your previous site list. You can even populate it by a login script.
2015-05-27
C: fun on the 404 page of stackoverflow
I found this fun on the SO's 404 page:
Of course, it is a pretty lightly obfuscated C code printing out "404".
This is what will get effectively compiled and executed (you can verify with
Of course, it is a pretty lightly obfuscated C code printing out "404".
This is what will get effectively compiled and executed (you can verify with
gcc -E -P):main(){putchar(4+putchar(putchar(52)-4));return 0;};exit();
As putc returns the character it printed out, the magic is easy:- Print the character dec 52 (which is the digit four)
- Print the character dec 52-4 = dec 48 (which is the digit zero)
- Print the character dec 48+4 = dec 52 again
2015-05-12
Shell: Get threaddump directly from the java process
Inspecting the Java source, I found a pretty easy way to skip java in the process of extracting info from another java process :-)
Possible options and variations I know about:
PID=`pgrep java` SCKT=/tmp/.java_pid$PID SGNL=/tmp/.attach_pid$PID CMD='1\0threaddump\0\0\0\0' if [ ! -r $SCKT ]; then touch $SGNL || exit 2 kill -s SIGQUIT $PID sleep 5 rm $SGNL if [ ! -r $SCKT ]; then echo Cannot read $SCKT ... either you are not the correct user for this, or the java process does not 'see' our attach request. exit 1 fi echo Done fi echo -ne "$CMD" | nc -U "$SCKT"
Possible options and variations I know about:
1\0threaddump\0-l\0\0\0small L for the jstack -L option1\0inspectheap\0\0\0\01\0inspectheap\0-live\0\0\0
2015-05-05
Oracle: ANSI JOIN recommended since 9.2?
Look at this gem I found in the Oracle 9i (!!!) [released in 2001] documentation.
http://docs.oracle.com/cd/B10501_01/server.920/a96540/queries7.htm#2054065
It is The ANSI JOIN syntax.
Lol.
http://docs.oracle.com/cd/B10501_01/server.920/a96540/queries7.htm#2054065
Oracle Corporation recommends that you use theAlso, http://docs.oracle.com/cd/B10501_01/server.920/a96540/statements_103a.htm#2091953FROMclauseOUTER JOINsyntax rather than the Oracle join operator. Outer join queries that use the Oracle join operator(+)are subject to the following rules and restrictions(...)
Oracle Corporation strongly recommends that you use the more flexible Oracle9i FROM clause join syntax shown in the former example.What is this "FROM clause join syntax"?It is The ANSI JOIN syntax.
Lol.
Subscribe to:
Posts
(
Atom
)