ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. cheeser except there are no bots allowed here.
  2. cheeser but yeah. it looks like the web part is busted.
  3. * javabot joined #java
  4. * javabot joined #java
  5. * cheeser joined #java
  6. * javabot joined #java
  7. * ferdna joined #java
  8. NeXeN one could have their client message a bot that's in no channel, the entire time, to keep a log then
  9. NeXeN * NeXeN shrugs. not difficult technically. i dunno about the bot tho, probably some cloudflareups
  10. cheeser or just have your client log it like i have for decades.
  11. NeXeN hey i need to do some research
  12. cheeser the bot's web interface is fucked because it uses an old dropwizard and the logging libraries don't work with it. i don't wanna fix because i'm actively (as in, in another tab in my terminal) replacing that UI as we speak.
  13. NeXeN cool, i wanna see it
  14. cheeser the UI itself is "done." i just have to fix the oauth stuff that's there.
  15. cheeser then probably the UI could use a new skin
  16. NeXeN what is the fe? vaadin or react/vue/angular ?
  17. NeXeN or just vanilla cheese(r)
  18. NeXeN * NeXeN suddenly gets a craving for cheese cake
  19. dreamreal There ARE logs for #java, just not through javabot for now
  20. cheeser freemarker. 0ld sk00l
  21. cheeser it's going to be quarkus/qute, though.
  22. * arkadio joined #java
  23. sbalmos cheeser: What was it before Freemarker? I forget what it was called, and I used to work with it too.
  24. sbalmos Wicket! It just came to me
  25. jreicher cheeser: do you prefer freemarker over mustache? Or did mustache just not do enough?
  26. NeXeN cheeser: hey you know.....if something works it works....if you're confident in it then it's a good target
  27. cheeser jreicher: this UI code is *old* :)
  28. * hwpplayer1 joined #java
  29. * five618480339176 joined #java
  30. NeXeN legacy isn't a four letter word, it's a track record
  31. * michele joined #java
  32. NeXeN i will have to say i have used vaadin and it's pretty good. it's not the best in the world for everything but it makes dashboards, consoles, and various apps that fit a standard format (content sites) that makes it easy to spin up stuff knowing nothing but java. it's a little like swing/javafx so those skills kinda port over
  33. NeXeN no need to know any front end or js, and you can get typesafe all the way up and down
  34. * Zapek joined #java
  35. * sa02irc joined #java
  36. * iusr joined #java
  37. * Ragnor joined #java
  38. * PyR3X joined #java
  39. * tux100 joined #java
  40. * computelabs_in joined #java
  41. * iusr joined #java
  42. * iusr joined #java
  43. * sa02irc joined #java
  44. * MikeBux joined #java
  45. * metalmaniac joined #java
  46. * stfstfm joined #java
  47. * Wbooze joined #java
  48. * computelabs_in joined #java
  49. * Inline joined #java
  50. * five618480339176 joined #java
  51. * stfstfm_ joined #java
  52. * TechDev99 joined #java
  53. * TechDev99 joined #java
  54. * redj joined #java
  55. * Adrian35 joined #java
  56. * computelabs_in joined #java
  57. * jreicher joined #java
  58. * mwnaylor joined #java
  59. * grogu1 joined #java
  60. * computelabs_in joined #java
  61. * iwtga joined #java
  62. * Maxdamantus joined #java
  63. * Inline joined #java
  64. * Wbooze joined #java
  65. * stfstfm joined #java
  66. * mwnaylor joined #java
  67. * simon816 joined #java
  68. hassoon 'morning
  69. jreicher I hope not. I'm on my third glass of wine.
  70. * onu joined #java
  71. * jamezp joined #java
  72. * acidsys joined #java
  73. Para You can get your daily dose of natrium by drinking 45,5 kilograms of wine.
  74. * stfstfm_ joined #java
  75. nimaje But you would overshoot your daily dose of sugar by a factor of 4 or something, I don't think thats a good idea
  76. jreicher I'll try it and let you know
  77. Para Hmm, maybe do lots of cardio to offset the carbs?
  78. Para I think something like 160 hours should do it.
  79. jreicher There's carbs in wine?!
  80. * GreenResponse joined #java
  81. Para Well it sure ain't protein.
  82. jreicher I know. I drink white russians for that.
  83. * ramontjunior joined #java
  84. * ramontjunior joined #java
  85. * ChaiTRex joined #java
  86. * ramontjunior1 joined #java
  87. * jamezp joined #java
  88. * stfstfm joined #java
  89. * computelabs_in joined #java
  90. * jamezp joined #java
  91. * MikeBux joined #java
  92. * tronexte joined #java
  93. * stfstfm joined #java
  94. * stfstfm joined #java
  95. dreamreal ~69
  96. javabot dreamreal, 69 is the expected class file format version number of class files emitted when compiling targeting Java 25, which is expected to be released in September 2025. Nice!
  97. ernimril hmmm, a bit out of date
  98. * stfstfm joined #java
  99. * dostoyevsky2 joined #java
  100. * xeno joined #java
  101. * five618480339176 joined #java
  102. * stfstfm_ joined #java
  103. * stfstfm joined #java
  104. * stfstfm_ joined #java
  105. * hwpplayer1 joined #java
  106. * Adrian35 joined #java
  107. * m2 joined #java
  108. * ferdna joined #java
  109. * stfstfm joined #java
  110. * Fiji joined #java
  111. * computelabs_in joined #java
  112. * Joel joined #java
  113. * ferdna joined #java
  114. * iusr joined #java
  115. * iusr joined #java
  116. * metalmaniac joined #java
  117. * hwpplayer1 joined #java
  118. * mwnaylor joined #java
  119. * ChaiTRex joined #java
  120. * stfstfm joined #java
  121. * ChaiTRex joined #java
  122. * iusr joined #java
  123. * ChaiTRex joined #java
  124. * iusr joined #java
  125. * Adrian35 joined #java
  126. * Adrian35 joined #java
  127. * kathadris joined #java
  128. * Gaz7051122720067 joined #java
  129. * mwnaylor joined #java
  130. * BadboyKAS joined #java
  131. * jreicher joined #java
  132. * pr070cal joined #java
  133. pr070cal hi guys i need some help
  134. pr070cal ive made an arraylist that take an array of objects
  135. pr070cal i write the objects into the array ("", "", "", "", "")
  136. pr070cal then i add the array to the arraylist arrList.add(values)
  137. pr070cal when i print value[0] after ive written to it i can see it has the correct value
  138. pr070cal if i print this System.out.println((((Object[])arrlist.get(i))[0]));
  139. pr070cal the value is always the same the last element i set it to for all 991 of them ?
  140. pr070cal https://www.irccloud.com/pastebin/4J0RxuUB/
  141. nevet Snippet | IRCCloud
  142. pr070cal it prints
  143. pr070cal MLK-USDT
  144. pr070cal MLK-USDT
  145. pr070cal MLK-USDT
  146. pr070cal MLK-USDT
  147. pr070cal MLK-USDT
  148. pr070cal MLK-USDT
  149. pr070cal 900 times
  150. pr070cal but System.out.println(values[0]);
  151. pr070cal outputs
  152. NeXeN ok, first off. use a pastebin if you're going to paste
  153. pr070cal https://www.irccloud.com/pastebin/9nWmL9dO/
  154. nevet Snippet | IRCCloud
  155. NeXeN i look up and you've posted 50 lines
  156. pr070cal do you know what is going wrong here
  157. jreicher pr070cal: to begin with I would recommend not using casts, as a general rule. It stops the compiler telling you about your mistakes.
  158. jreicher What happens if you remove the cast?
  159. pr070cal it says it must be resolved as an object
  160. pr070cal they are all stings though
  161. jreicher Exact error please
  162. pr070cal the last one is just repeated over and over again
  163. jreicher I think we need to talk about precisely what the error means, which depends on knowing its exact wording, so if you could provide that...
  164. pr070cal i added after this arrlist.add(i, values);
  165. pr070cal System.out.println((((Object[])arrlist.get(i))[0]));
  166. pr070cal and it prints al the correct variables
  167. jreicher The error please
  168. jreicher After you've removed the cast
  169. jreicher You should not use casts
  170. * marcel1 joined #java
  171. * lord4163 joined #java
  172. NeXeN ok the values array look
  173. NeXeN where is it defined? somewhere outside the loop?
  174. NeXeN you don't need toString() on a getString() btw since it's already string. but now look at this line, arrlist.add(i, values); ?
  175. NeXeN you're adding the exact same values array refrence to the list on every iteration
  176. NeXeN at the end of the loop, every single index in arrlist points to the same memory address
  177. NeXeN like jreicher pointed out the complex and unsafe casting
  178. pr070cal but i increments
  179. pr070cal i just added that in to make sure it iterates
  180. pr070cal i was using add()
  181. pr070cal it all works if i print the value straight after i set it
  182. pr070cal its only after the for loop when i check the array
  183. nimaje and where do you *set* values? (set not modify)
  184. * lord4163_ joined #java
  185. NeXeN if you instantiate values inside the loop it will work
  186. jreicher pr070cal: have you removed the cast, and if you have an error, what is it?
  187. NeXeN String[] values = new String[1]; or something
  188. jreicher There might still be other problems, but a compiler error is the easiest one to solve, because the compiler is helping.
  189. NeXeN System.out.println(((String[]) arrlist.get(i))[0]) then i think, is what you will ...hold on did i miss a parens?
  190. nimaje (but why would you even have that as an array if you only care about one element from it?)
  191. NeXeN yeah, but my point is that's why it's printing the same thing 900 times
  192. NeXeN you're simply just assigning the same reference over and over
  193. NeXeN pr070cal: what is this for, what are you trying to accomplish? are you avoiding using an ArrayList ?
  194. * mwnaylor joined #java
  195. * lord4163 joined #java
  196. pr070cal i had to add this inside the loop Object[] values = {"","","","","","","","","",""};
  197. pr070cal thanks guys
  198. pr070cal i would have never have thought it a reference to the array[]
  199. * iwtga4 joined #java
  200. NeXeN yeah but you can do better
  201. nimaje where would you have expected the copy? And why Object[] when all you store in there are Strings?
  202. pr070cal i have doubles too
  203. pr070cal and integers
  204. pr070cal why doesnt it store the values into the arraylist
  205. pr070cal i mean if it has to set a pointer
  206. pr070cal why doesnt it just add the value in there
  207. nimaje the value is a reference to the array `values` you pass it
  208. nimaje and you probably want to write a record or a class instead of hammering your data into an Object[]
  209. NeXeN yeah a custom record would save you headaches
  210. NeXeN you can group mixed types in a record
  211. NeXeN ok, so this is how i would build a record if i had those various data types and i wanted to decompose a json object and create a record for type safe use, which is what you seem to be trying to do: https://paste.linux.chat/?cdc263ea989c545c#GtRBn6EfmKM3bENmW6ux7WUR88hsv79V2US3kiKC6dYD
  212. javabot NeXeN's title: "Linux.Chat PrivateBin"