« first day (3188 days earlier)      last day (1977 days later) » 

00:00
Save energy: Drive a smaller shell. (source)
 
2 hours later…
01:49
Morning.
Morning.
I'm writing fucking document again.
 
3 hours later…
05:03
@Michael oh! thats something new. what's the use of finalize then, why should one use it when it might not do what
's required
05:42
Ah.
I'm thinking that maybe the programme which running cmd commands doesn't need to be started as a spring boot service. It even takes up a port.
 
1 hour later…
06:54
@萝莉w well if you don't need it, don't run it
I think not knowing what it does technically qualifies as "don't need it" :)
Now I use thread.
07:10
What's the encode of this fucking mess code?
I would try with UTF-8
It seems that this is what UTF-8 would look like with chinese characters converted to ASCII
but just a guess :)
I would rule out UTF-16 or higher because otherwise every other character would be a control character
Not UTF-8.
I'm looking for wired silent mouse, can you recommend me any?
I'm afraid that it may be cp1388.
07:23
As I see logitech has couple of them in their offer, but all are wireless
That fucking encode cannot be translated at Windows.
@萝莉w use english (more formally, use \w regex characters) when defining names lol.
many IT systems are built on top of UTF-8 or even ASCII such as that IBM db
I want to know what is it the mess code expresses.
I guess that you have an invalid server name
the error code is still from IBM server AFAIK
> com.ibm.as400.access.AS400JDBCSQLSyntaxErrorException
@KarelG could be anything really
but yeah, definitely related to as400 jdbc
thank god for .repeat
seems like such a silly thing to have to want from a framework
but when it's there and I need it, I'm happy to use it
07:41
You always have Wietlol complaining about excel... I wonder if he has ever touched Access.
Because that is the biggest piece of shit I have ever seen calling itself database.
07:56
I like to think of Access as Microsoft's first real attempt at a database
poor guys, they gave it a shot, didn't they?
admittedly, for a "casual" database for small businesses, Access could still work okay
that said, why pick something which may be fine now but will be a pain in the ass should you ever need to convert it later?
08:13
@QuyTang Hey, yes indeed. Hows it going ?
morn
morn
mornings
@Neil Ask the people who made the decision idk how many years ago...
I only have to live with the consequences.
@geisterfurz007 I think there are tools to convert to a formal SQL Server database
All of the access things here will likely be rewritten as JavaEE applications.
08:25
It isn't that you can't convert, but the hard part isn't the conversion, it's making all the existing programs and tools work for the new database that's the hard part
So there is no need for that. Most of the database structures are an absolute mess, so there is no reason to keep the old stuff around.
08:37
Still gotta fix that old rubbish so people can work with it until their fancy new things are ready.
08:59
Hey guys, I got a question about a Java construction. I simply wonders what it is called.
https://pastebin.com/FN68GkL5
On line 6-16, what is it called?
Handler Expression of some sort?
@sockevalley looks like it's registering a URL factory, and the logic for the creation of the URL is nested in an inner handler which does the actual creating
registering the factory is sort of a strategy pattern I suppose you'd call it
@Neil Alright cheers. It is causing quite some conundrum for me as I am parsing the code as an AST and try to analzye it....I am confused to how I should parse this correctly. It identifies the whole block 6-16 as a methodCallExpr because URL calls the setURLStreamHandlerFactory() function.
@sockevalley well I mean it is a method call
that whole thing is just setting a URLStreamHandlerFactory
the inner part is the declaration of a anonymous factory class, complete with the creation of a second URLStreamHandler anonymous class inside of it
The main issue is that my program thinks it is inside testJarVisitorFactory but the it tranverses into the scope of openConnection which is inside testJarVisitorFactory, so I have to figure out how to deal with this properly.
09:14
@sockevalley well formally members of the outer class and variables declared final should be accessible from inside openConnection
Yeah that's correct. I think my problem is that the statements under line 6-16 is skipped for some reason. I think the program tranverses down some branch and skipps the following statements
oh I see now my bug.
Always good to have someone to talk to. Cheers Neil.
maybe it lacks a handler for that case
glad to hear it :)
Hi
Everyone
Hi @Hans1984 i have a little doubt i need to read a captacha image in java can we do that i have not tried!
is it possible?
Actually am Automation Test Engineer
09:28
@koushick I dont know. I've never tried that before.
in future if you got any way to do that. let me know
and is This open Group or i need to joinm
?
It's a open group
everyone can ask and participate
That's Good to hear :)
Maybe this might help?
Hello I am facing a error 'BitmapStub' does not exist in the namespace 'Android.Graphics'
Zoe
Zoe
09:33
This is not an Android room. Please take your question to a room dedicated to Android. If you came here because you don't have access to the Android room, remember that there are other rooms too with Android as the topic.
@geisterfurz007 is dependency Available in MVn Repository for that?
@koushick No. You have to download it manually according to the readme.
you can put it in your local repository or host it yourself on github for example
I do the latter with my own libs
09:34
how can access BitmapStub
You are. In the wrong place.
Zoe
Zoe
2 mins ago, by Zoe
This is not an Android room. Please take your question to a room dedicated to Android. If you came here because you don't have access to the Android room, remember that there are other rooms too with Android as the topic.
This is not the place for android questions, sorry.
@geisterfurz007 am trying now i'll you know once i got
:)
thanks
You don't have to. You're welcome :)
09:36
Ok i am leaving
Oh, I also found this.
Thanks :)
and Also @geisterfurz007 we can use "Tesseract OCR"
or reading images
You can! I don't have that requirement at all :)
i came across about in google
Okay anyway thanks buddy :)
09:54
does anybody selenium people here?
i sometimes selenium people
but people dont like it when I selenium them
thats because you are a green Lion !
@Hans1984 Lol
Why is this lion green?
09:59
noone knows
@萝莉w Who knows
green is the colour of envy
I know.
Zoe
Zoe
because reasons. (/-_-)/
In China, green also can be the color of one whose lover run away with another one.
10:00
Lol not a big joke.
@萝莉w see thats the same
he/she is jealous because of that = envy
lion is green because I is green and I is lion
Lemon is a fruit of envy.
green == lion == Wietlol
@萝莉w yes
thats why its so sour
its very jealous
10:05
u jelly?
hehe
haha
huhu
hihi
hoho
loool
10:17
Lol
10:36
Red Luigi
haha
 
1 hour later…
12:00
Swiftlet nests are made from strands of saliva from the male swiftlet bird. Swiftlet nests collected from Thai caves can fetch more than $900 per pound. It is one of the world's most coveted and expensive food items. (source)
That's disgusting, OakBot
Hi
This is my CustomList method for set.
	@Override
	public E set(int index, E element) throws IndexOutOfBoundsException {
		internal[index] = element;
		return element;
	}
and this is my test code:
Throwable exception = assertThrows(IndexOutOfBoundsException.class, () -> list.set(0, 111));
System.out.println(exception.getMessage());
assertEquals("expected messages", exception.getMessage());
Zoe
Zoe
Ok.
I have an empty list.
Therefore set() should not be possible.
@kame ok, well you know there are many other ways to test that method
probably the most important being that after the call to set, you can also call get and get it back
12:14
@Neil I have the get() method already.
@kame well get and set kind of go together, unless you have access to the internal array
How do I get the correct exception?
@kame is IndexOutOfBoundsException not getting thrown here?
@nei
@Neil I got a 0 as answer.
Hmmmm
@Neil I just started with testing in Java
@kame ok, well when the test doesn't "pass", even if the test is verifying proper exception failure, you have to decide whether the test is wrong or the code is wrong
So which is it? you expected internal.length to be 0, but it has been initialized apparently
therefore it won't cause an IndexOutOfBoundsException because you're not exceeding the limits of the array
12:18
internal[index] = element; exceeds the limits.
did you verify this?
Because I didnot add the first element. list.length is still 0
Not yet
careful here.. list.length() is part of your class
don't make assumptions like that
internal holds the actual data
what is internal.length?
it is the list size
again, it may be that it has a default capacity of 10 (even if it doesn't technically have anything in it)
12:19
No I add a test and it says size is 0.
Really?!?!?! This is a difference to C# (where I come from)
lol yeah, maybe
you can override what .length() does
Zoe
Zoe
If it holds an array, it's likely initialized to size-holding value
length off the array is the initialized size, and doesn't necessarily represent the number of items.
you have capacity and you have size/length
you should understand the relationship between these, they're not the same
Zoe
Zoe
Object[] x = new Object[10]; for an instance will create an array with a length of 10 with null-initialized value
List<Object> list = new CustomList<Object>();
But this has a length of 0.
12:24
yes
Lists dont have a predefined length
they grow when you add items to it
there are 0 items in the list, so your length is 0
your capacity might be a lot more tho
the capacity (which you can pass by the constructor) is how much it can store before it has to do a replace on its internal data
Zoe
Zoe
/javadoc ArrayList
@kame can you show your entire class?
Zoe
Zoe
> Constructs an empty list with an initial capacity of ten.
Which means the list has an initial potential to contain 10 items. ArrayList specifically expands its capacity when its size (contained items) increases up towards the capacity. Capacity doesn't have to be equal to size
12:29
@kame do you mind me asking why you're making your own List implementation?
I mean, you're free to do it, but I've never had to do so in my entire career as a java programmer
@Neil I sit at home and learn Java and randomly got this example
.D
> private Object[] internal = {};
hmm...
you cant just set on an empty array
you first need to increase its length
@Wietlol Yes I know. I want to test if an exception is thrown.
I want a message like "ArrayIndexOutOfBoundsException" but I got "0"
Throwable exception = assertThrows(ArrayIndexOutOfBoundsException.class, () -> list.set(0, 111),
"Expected doThing() to throw, but it didn't");
System.out.println(exception.getMessage());
assertEquals("expected messages", exception.getMessage());
12:39
assert based on type, not on message?
printing stuff shouldnt be necessary in your unit tests
@Wietlol yes give me the type please! :)
hmm... you already do a type check tho... assertThrows deals with that
But how can I print this type in the console?
@Wietlol
you shouldnt have to
the type is ArrayIndexOutOfBoundsException
because of assertThrows(ArrayIndexOutOfBoundsException.class,
Throwable exception =
should be replaced with
ArrayIndexOutOfBoundsException exception =
@Wietlol Thank you
12:52
doesn't matter if internal has capacity 10
you should throw if the index passed is greater or equal to the .length()
I mean you should check yourself and in that case, throw the exception yourself :P
@Neil yes
list.add(1);
list.removeAt(0);
list.set(0, 1);
make a test for this
@Wietlol An exception should be thrown
ok, test it
an ArrayIndexOutOfBoundsException will still be thrown, but only if you exceed internal.length
for any number less than the capacity but higher than .length(), there will be no exception thrown unless you yourself throw it
12:55
or rather
list.add(1);
list.isEmpty(); << assert false
list.removeAt(0);
list.isEmpty(); << assert true
@Wietlol how is this testing that ArrayIndexOutOfBoundsException will get thrown?
it will show the difference between length() (capacity) and internal.length()
13:07
I have to learn the Java basics first now.
13:34
concat two arrays in Java is difficult
@kame we don't generally use arrays that often in Java
use them if you want it to be immutable mostly
we tend to use Lists or Collections for everything
I also use lists for immutable stuff
I dont use arrays except for byte[]
List<Byte> has too much overhead
it generates a boxed object (with a pointer to the class) and a pointer to point at that object
from 1 byte to 17 is a pretty big difference
I don't like lists as output from my library for instance
i find arrays are more elegant
but of course there are always exceptions
I would think the opposite
make libraries use lists
Suppose your library list implementation is weird and is dependent upon a connection to the database in order to continue giving consistent results.
Or suppose your library changes the results of that list
while it's true that lists can be immutable, what the library shows is List<Something> and not that it's immutable
therefore if I'm given a list, I feel required to copy it if I intend to hold onto it
and again, you can lookup in the documentation, but I just feel that that's all entirely unnecessary if you simply return an array
Same could be said for using Lists as input to your library calls
13:46
why arrays instead of lists?
lists is more flexible to work with.
@KarelG I literally just mentioned the reasons why arrays instead of lists
if you are worried about something that adds data to it, you can use a wrapper that makes it read only
return Collections.unmodifiableList(urList)
@KarelG this returns List though
yes, but those changes can occur at arrays too
Look at it from the perspective of the user of the library who calls a method and receives a List..
13:49
getList().stream().filter(). done
You don't know it's readable or not based purely on this.. you'd have to look it up, or try to write to it, or simply make a copy
Yeah, and if the list contains ten thousand elements, copying it isn't very koscher
but arrays? bah Arrays.stream(getArray()).filter()
I like code to speak for itself. I don't want to look in documentation to know if I have to worry about thread safety or not
you have to clone each mutable entity in your array too tho
as the writer of a library, I want it to be clear that it's immutable without looking it up or something
@KarelG maybe, maybe not, depending on how you did it
but it's clear using arrays that the existing instances aren't getting swapped or removed or added
13:51
o.O
array[i] = otherObject
if you passed back array before
got changed
If you wanted to also ensure that they'd know the data itself won't be modified, you'd make a point to give them a read-only interface of an implementation with only getters
@KarelG wat?
If I create an array, save it as a class member, return it, then modify it afterwards, the caller didn't see the change
in terms of the number of instances, and what they refer to, that can't change using an array
not unless the caller himself assigns to the array
caller knows some sneaky thread underhandedness isn't possible using an array
it's still possible for the mutable instances to change of course
but you can avoid that too if so choose (and generally advisable for a library unless there is reason not to)
14:37
@TBag I don't know. I've never used it before myself.
15:03
Guys, do you have some recommended reading material on basic OO, polymorphism, DI, SOLID principles?
15:32
its short, easy to read and covers most important principles
15:58
Short question about super classes... Our prof gave us a little example about it... media.discordapp.net/attachments/517738408466972682/… in case of AA c = new BB(); | c is basically a AA, right ? Why does c.foo1(b) return A but c.foo2() return B ?
@genaray c is of type AA, and so the method is dispatched to the AA class
Thats exactly what i thought... but the hell does c.foo2(); returns B then ? ^^
Thats what doesnt make sense... atleast for me :/
Any ideas ?
Its kinda important, writing my exam tommorow and i have no clue why :)
 
3 hours later…
19:30
Hi Guys
I want to do a search operation using criteria in spring data jpa
I want this search to be on numeric value column
I have tried with following but not working
Criteria.where("primaryMobileNum").in(phoneNumbers)
Criteria.where("primaryMobileNum").is(phoneNumber)
Zoe
Zoe
20:20
Ok.
 
1 hour later…
21:43
@genaray the object instance that c is pointing to, is by no means an AA
it is assigned to a BB
but independent of what it is assigned to, it at least satisfies the contract of AA
so, the object will have all methods that the AA class defined
therefor, you can safely call the foo1 and foo2 functions on it
the class BB overrides foo2 originally declared in class AA
therefor, instances of class BB, on which you call the foo2 method, will use the BB version
independent of what the variable tells you what type the instance is
so, AA c = new BB(); in this case, we are dealing with an object that satisfies the AA contract (as defined by the variable c)
but the actual object is BB
so, we can call foo2 and it will run the foo2 method from BB
and print out "B" to the console
...
the foo1 is slightly more annoying
BB::foo1 does not override AA::foo1
instead, it creates an overload
if you are dealing with a variable declared as AA (for example, our c variable)
then you can only see and use AA::foo1
it is not overridden, so the function AA::foo1 will be called (not BB::foo1)
theferor, c.foo1(any) will print "A"
if the variable is declared as BB (for example, our b variable)
then you can see and use both AA::foo1 and BB::foo1
if you call b.foo1(any), the compiler will look at any and find out what type it is
if any is declared as AA (for example, our c variable), then it will use AA::foo1 and not BB::foo1 because the compiler cannot guarantee that a variable declared as AA will actually hold a BB pointer
if any is declared as BB (for example, our b variable), then the compiler will say "hey, AA::foo1 is fine for this call, but I have an overload that is even better, which is BB::foo1"
in that case, BB::foo1 will be used
on a side note, if you have an exam tomorrow... you might have started studying too late... especially if you have no clue (your words) about the stuff that you need to learn
@SumanthVarada what Zoe is trying to say is "oh hey, that looks like an interesting problem. however, because we dont really know what you really want, we cant really help you. please explain what you are trying to achieve and ask for the specific thing you need to achieve it, best regards, Zoe"

« first day (3188 days earlier)      last day (1977 days later) »