File size: 211,501 Bytes
ad6baab |
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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 |
[
{
"url": "https://www.coderanch.com/t/192517/certification/Marcus-tutorial",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi , In the marcus tutorial of java io he asked a question at last Which of the following statements are true? 1) Java uses a system called UTF for I/O to support international character sets 2) The RandomAccessFile is the most suitable class for supporting international character sets 3) An InputStream class may not be chained to an OutputClass 4) File I/O activities requires use of Exception trapping and given answer is 1,3,4. i have question on answer '3'. In the explanation of answer he said : InputStreams can only be chained to other OutputStreams and OutputStreams can only be chained to other OutputStreams. I think he wants to say InputStreams can only be chained to other InputStreams and �... please correct me if I am wrong. Please help me. vivek\n\nHi ,\n\nIn the marcus tutorial of\n\njava\nio he asked a question at last\n\nWhich of the following statements are true?\n\n1) Java uses a system called UTF for I/O to support international character sets\n\n2) The RandomAccessFile is the most suitable class for supporting international character sets\n\n3) An InputStream class may not be chained to an OutputClass\n\n4) File I/O activities requires use of Exception trapping\n\nand given answer is 1,3,4. i have question on answer '3'.\n\nIn the explanation of answer he said :\n\n> \n\nInputStreams can only be chained to other OutputStreams and OutputStreams can only be chained to other OutputStreams.\nI think he wants to say\n\nInputStreams can only be chained to other InputStreams and �..\n. please correct me if I am wrong.\n\nPlease help me.\n\nvivek",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/402265/java/java/error",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nIt means that something on the left side of a dot (.) is 'null' -- either a variable is set to null, or a function is returning null. The stack trace (the error message) tells you what line the error happened at: the top line will say something like\n\nat MyClass.main (MyClass.java:21)\n\nthat means the error happened on line 21 of MyClass.java . Look at any dots on that line -- that's where the problem is. We'd be happy to look at the code for you, if you want -- paste it into a reply in this thread. Put [ CODE ] [/ CODE ] tags around the code to preserve formatting in your post (take out the spaces in the tags.)\n\nYou didn't show the stack trace or tell me what line it says the error is on, so I have to guess!\n\nThe method \"contains\" references a member variable named \"list\" (different from the local variable in main of the same name). The member variable \"list\" is an array. My first guess is that either that member variable is \"null\" (does anything ever assign a value to it?) or one of the elements of that array is \"null\" (remember that constructing an array makes an array of null references; there are no objects in the array until they are created.\n\nBut it looks like \"contains\" is as method in some kind of a collection class; it's likely that there's a separate variable that tells how many elements are really in the array; this number is smaller than or equal to the size of the array. The member variable that hold this count should be used as the upper limit of the for loop, not the array length.\n\nOriginally posted by Victoria Preston: so instead of .length it needs to be .size\n\nWell, no, not exactly. I'm imagining that EmployeeClass looks like\n\nSo I'm talking about using \"size\" in place of \"list.length\" -- but this is only if my guess is right that there is a member like \"size\". Maybe you should show us the whole \"EmployeeList\" class (unless you figure this out by yourself now.)",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/417499/java/java/abt-path-classpath-system-DSN",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\n1. The PATH to the Java Runtime (JRE) bin catalogue should be set when installing it. At least it declares the system environment variable JAVA_HOME that can be used in your start script. 2. You should set the classpath for the application when you start the application and NOT in the system classpath. Use a launcher or a bat-file for this. 3. You should not use a system DNS (JDBC DBC type 1 DB driver) in your programs. Instead, you should take a look at DataSource and have a configuration file that holds the data on how to connect to the database and then have a declared DataSource that any part of your application that needs to access the database needs to access.\n\n1. The PATH to the Java Runtime (JRE) bin catalogue should be set when installing it. At least it declares the system environment variable JAVA_HOME that can be used in your start script.\n\n2.\n\nYou should\nset the classpath for the application when you start the application and NOT in the system classpath. Use a launcher or a bat-file for this.\n\n3. You should not use a system DNS (\n\nJDBC\nDBC type 1 DB driver) in your programs. Instead, you should take a look at DataSource and have a configuration file that holds the data on how to connect to the database and then have a declared DataSource that any part of your application that needs to access the database needs to access.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/572370/ORM/databases/JPA-Query-isolation",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 12 years agoI have question connected with Query features. May Query's results (for example some kind of Select order) contain some uncommited to the datebase records (or uncommitted updates)? Even if the datebase's isolation level is at least READ_COMMITTED? Let's look at such situation: in scope of transaction I perform some updates to the database. I also create new entity and call persist() on it. Then I call a \"select\" Query to EntinityManger in this transaction. Quer has an ability to call flush() before it is performed (as I know) to ensure that the Query result is the most \"up to date\". The \"flush()\" method flushes all the changes to the datebase (including new persisted entity) but all writes to the datebas are made in uncommitted mode (as I know) and they will be committed at the end of transaction. But Query is called during that transaction so the changes are still uncomitted. What will be the result of that Query? Will it contain uncommitted changes made by \"flush()\" method? It seems that \"yes\" because that is why the autoFlush was introduced into Queries , but on the other hand it looks strange to get uncomitted changes from datebase as a result of Query. So, how is it?\nI have question connected with Query features. May Query's results (for example some kind of Select order) contain some uncommited to the datebase records (or uncommitted updates)? Even if the datebase's isolation level is at least READ_COMMITTED?\n\nLet's look at such situation: in scope of transaction I perform some updates to the database. I also create new entity and call persist() on it. Then I call a \"select\" Query to EntinityManger in this transaction. Quer has an ability to call flush() before it is performed (as I know) to ensure that the Query result is the most \"up to date\". The \"flush()\" method flushes all the changes to the datebase (including new persisted entity) but all writes to the datebas are made in uncommitted mode (as I know) and they will be committed at the end of transaction. But Query is called during that transaction so the changes are still uncomitted. What will be the result of that Query? Will it contain uncommitted changes made by \"flush()\" method? It seems that \"yes\" because that is why the autoFlush was introduced into Queries , but on the other hand it looks strange to get uncomitted changes from datebase as a result of Query.\n\nSo, how is it?",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/360614/Servlets/java/Servlet-generate-HTA",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nIs anybody else here using a servlet to create an HTA (html application)? Thanks to security issues in Internet Explorer, we had to change one of our main programs to use an HTA for delivering high-stakes certifications. Overall, this is working out great. However, for myself, and most of our international users, the behavior of the HTA is very inconsistent. Although it never works for me, many of our international users get it to work sometimes, and sometimes it bombs out on them. The usual problem is either that the application freezes up. Or the HTA throws a scripting error. If this sounds familiar to anybody, I could sure use some help. I've got one very irate client and dozens of unhappy users, and no answers at this point. Thanks! William\n\nIs anybody else here using a\n\nservlet\nto create an HTA (html application)? Thanks to security issues in Internet Explorer, we had to change one of our main programs to use an HTA for delivering high-stakes certifications. Overall, this is working out great.\n\nHowever, for myself, and most of our international users, the behavior of the HTA is very inconsistent. Although it never works for me, many of our international users get it to work sometimes, and sometimes it bombs out on them. The usual problem is either that the application freezes up. Or the HTA throws a scripting error.\n\nIf this sounds familiar to anybody, I could sure use some help. I've got one very irate client and dozens of unhappy users, and no answers at this point.\n\nThanks!\n\nWilliam",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/631673/certification/Depth-subjects",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nIt seems you like the backend better than designing user interface forms. If this is true, focus on SOA , Enterprise Service Bus, Web Services, queuing , loose coupling, MySQL/Oracle/DB2 database via JDBC. Some people paint pretty pictures, others make the plumbing work. If you are a plumber, follow what I said. If you are a painter, PrimeFaces and jQuery would be a good thing to work on in your spare time.\n\nIt seems you like the backend better than designing user interface forms. If this is true, focus on SOA , Enterprise Service Bus, Web Services, queuing , loose coupling, MySQL/Oracle/DB2 database via\n\nJDBC\n.\n\nSome people paint pretty pictures, others make the plumbing work. If you are a plumber, follow what I said. If you are a painter, PrimeFaces and jQuery would be a good thing to work on in your spare time.",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/679280/mobile/PDF-Viewer-Android",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI'm making an application that consists of the first page that will be a list of books. When you click on a picture book users will be able to flip through, something like a free sample. I was planning to do with Intent.So when someone clicks on a book picture, using the click listener and intent opens a new java class with PDF file. It displayed using PDF VIewer. But although I have no run-time error, on the phone throws an error that my application is stopped. Surely my logic is wrong. I inculded library main_activity.xml with book list: XML code with PDF viewer: My JAVA class Mainctivity: Second java class with pdf viewer:\n\nI'm making an application that consists of the first page that will be a list of books. When you click on a picture book users will be able to flip through, something like a free sample. I was planning to do with Intent.So when someone clicks on a book picture, using the click listener and intent opens a new\n\njava\nclass with PDF file. It displayed using PDF VIewer. But although I have no run-time error, on the phone throws an error that my application is stopped.\n\nSurely my logic is wrong.\n\nI inculded library\n\nmain_activity.xml with book list:\n\nXML code with PDF viewer:\n\nMy JAVA class Mainctivity:\n\nSecond java class with pdf viewer:",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/217750/databases/ORM-comparisons",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI tried googling many times to just have a comparison out of the existing ORM tools for Java. Is there any such site that you guys might probably know about such a comparison? Please put it here. Thanks for your help!\n\nSCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master Did a rm -R / to find out that I lost my entire Linux installation!",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/482165/os/regular-expression",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, We need to mask credit card numbers.Masking all but last 4 digits. I am trying to use SED. As credit card number length varies from 12 digits to 19,I am trying to write regular expression.Following code will receive the String. If it contains String of the form \"CARD_NUMBER=3737291039299199\", it will mask first 12 digits. Problem is how to write regular expression for credit card-12 to 19 digits long? If I write another expression for 12 digits, it doesn't work.that means for 12 digit credit card- first 8 digits should be masked. for 15 digit credit card, first 11 digits should be masked.\n\nHi,\n\nWe need to mask credit card numbers.Masking all but last 4 digits. I am trying to use SED. As credit card number length varies from 12 digits to 19,I am trying to write regular expression.Following code will receive the\n\nString\n. If it contains String of the form \"CARD_NUMBER=3737291039299199\", it will mask first 12 digits.\n\nProblem is how to write regular expression for credit card-12 to 19 digits long? If I write another expression for 12 digits, it doesn't work.that means for 12 digit credit card- first 8 digits should be masked. for 15 digit credit card, first 11 digits should be masked.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/599704/open-source/Apache-httpClient",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I am trying to log onto http://mobile.lufthansa.com using apache HttpClient. Ist there anyone out there who could give me a help or at least a hint? DefaultHttpClient httpclient = new DefaultHttpClient(); HttpGet httpGet = new HttpGet( \"http://mobile.lufthansa.com/mma/account.do\"); HttpResponse response1 = httpclient.execute(httpGet); try { System.out.println(response1.getStatusLine()); HttpEntity entity1 = response1.getEntity(); EntityUtils.consume(entity1); } finally { httpGet.releaseConnection(); } //working fine so far but then... HttpPost httpPost = new HttpPost( \"http://mobile.lufthansa.com/mma/account.do\"); List<NameValuePair> nvps = new ArrayList<NameValuePair>(); nvps.add(new BasicNameValuePair(\"userid\", \"xxxx\")); nvps.add(new BasicNameValuePair(\"password\", \"xxxx\")); httpPost.setEntity(new UrlEncodedFormEntity(nvps)); HttpResponse response2 = httpclient.execute(httpPost); is giving me a 302 error all the time. I believe it has something to do with the session as the form method calls: /mma/account.do;jsessionid=FAFCF62744FA4FF96CA73A7AA9F33254.portal14a?l=en but i lack the experience to know how to handle this. Thank you in advance!\n\nHi,\n\nI am trying to log onto\n\nhttp://mobile.lufthansa.com\nusing apache HttpClient.\n\nIst there anyone out there who could give me a help or at least a hint?\n\nDefaultHttpClient httpclient = new DefaultHttpClient();\n\nHttpGet httpGet = new HttpGet(\n\n\"http://mobile.lufthansa.com/mma/account.do\");\n\nHttpResponse response1 = httpclient.execute(httpGet);\n\ntry {\n\nSystem.out.println(response1.getStatusLine());\n\nHttpEntity entity1 = response1.getEntity();\n\nEntityUtils.consume(entity1);\n\n} finally {\n\nhttpGet.releaseConnection();\n\n}\n\n//working fine so far but then...\n\nHttpPost httpPost = new HttpPost(\n\n\"http://mobile.lufthansa.com/mma/account.do\");\n\nList<NameValuePair> nvps = new ArrayList<NameValuePair>();\n\nnvps.add(new BasicNameValuePair(\"userid\", \"xxxx\"));\n\nnvps.add(new BasicNameValuePair(\"password\", \"xxxx\"));\n\nhttpPost.setEntity(new UrlEncodedFormEntity(nvps));\n\nHttpResponse response2 = httpclient.execute(httpPost);\n\nis giving me a 302 error all the time. I believe it has something to do with the session as the form method calls:\n\n/mma/account.do;jsessionid=FAFCF62744FA4FF96CA73A7AA9F33254.portal14a?l=en\n\nbut i lack the experience to know how to handle this.\n\nThank you in advance!",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/253816/certification/polymorphism",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nAmisha Shah.<br />SCJP 1.4\n\nOfCourse Learner...<br />SCJP 5, SCWCD1.4<br />Blogs: <a href=\"http://sandeepkunwar.blogspot.com\" target=\"_blank\" rel=\"nofollow\">http://sandeepkunwar.blogspot.com</a>\n\nThe man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress\n\nThe man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress\n\nThe man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress\n\nAmisha Shah.<br />SCJP 1.4\n\nThe man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress\n\n> \n\npolymorphism, meaning that an object of a given class can have multiple forms, either as its own class or as any class it extends. The new class is a subclass or extended class of the class it extends; the class that is extended is its superclass.\nSCJP 1.4,SCWCD\n\n> \n\nOriginally posted by swapnil paranjape:\n\ni have read this in one of the textbooks..\n\nthere are two types of polymorphism:\n\n1)static polymorphism\n\n2)dynamic or runtime polymorphism\nThanks<br />-Swosti\n\nI'm full of tinier men! And a tiny ad:Smokeless wood heat with a rocket mass heater https://woodheat.net",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/469816/certification/Locking-client-identification",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHowdy , I'm facing the following pb: The locking code is supposed to be within that Data class. This means that when a record is locked ( lock(recNo) is called) no other client except the one that invoked the lock() is allowed to update/delete this record. The question is how can I check in the update() and delete() methods who the client is? Which raises 2 scenarios : The stand-alone application, when we would like to reuse the code from the Data class. I would like to avoid passing a parameter to the Data class specifying whether we are in stand-alone mode. We lock a record, and we try to update it. When performing the update, the code checks to see whether that record is locked and is available for this client. How can he do that as in a stand-alone context we only have one client and cannot hold a Map<cliendId,recordId> or something of that kind... The code in the business layer would be : The code in the persistence layer would be : and the second scenario, when running in server mode The code in the business layer would be : The code in the persistence layer would be :\n\nHowdy ,\n\nI'm facing the following pb:\n\nThe locking code is supposed to be within that Data class. This means that when a record is locked ( lock(recNo) is called) no other client except the one that invoked the\n\nlock()\nis allowed to update/delete this record.\n\nThe question is how can I check in the\n\nupdate()\nand\n\ndelete()\nmethods who the client is?\n\nWhich raises 2 scenarios :\n\n> \nThe stand-alone application, when we would like to reuse the code from the Data class. I would like to avoid passing a parameter to the Data class specifying whether we are in stand-alone mode. We lock a record, and we try to update it. When performing the update, the code checks to see whether that record is locked and is available for this client. How can he do that as in a stand-alone context we only have one client and cannot hold a Map<cliendId,recordId> or something of that kind...\n\nThe code in the business layer would be :\n\nThe code in the persistence layer would be :\nand the second scenario, when running in server mode\n\n> \n\nThe code in the business layer would be :\n\nThe code in the persistence layer would be :",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/440892/java/strange-behavior-ArrayList",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI am making a small program for one of my CS classes that basically demonstrates mastery of java and programming and such. I have been programming for slightly over a decade, so I assumed that as long as I read the manual I would do fine. This program lets the user create shapes on a board, drag them around, and resize them. I have all of those operations working except for a small bug in the dragging that I cannot seem to work out. I use an arraylist to store all my shapes that are currently being displayed. At all times the shapes have to be depth sorted with the lowest y values being at the back. To do this I created a Comparable which does a comparison on the shape's position. I then sort the Arraylist using this every time I make a change to the positions of the shapes. However, if I click on a shape with a high y value and move it up, it then acts like a kind of pushbar and pushes all shapes that match it's y at any given time to keep going with it. I don't understand how this can happen. My code can only support modifying one object at once, but it seems to be modifying all objects that don't match a certain condition. Can anyone explain this to me? EDIT: I just commented out the sort lines and it works properly. That points to the sorter as the culprit. Can a sorter place two items \"next\" to eachother in a 1D array like an ArrayList? That doesn't exactly seem intuitive. My MouseAdapter and Comparator (they are inside a class which contains the ArrayList shapes along with the booleans fill and mode:\n\nI am making a small program for one of my CS classes that basically demonstrates mastery of\n\njava\nand programming and such. I have been programming for slightly over a decade, so I assumed that as long as I read the manual I would do fine. This program lets the user create shapes on a board, drag them around, and resize them. I have all of those operations working except for a small bug in the dragging that I cannot seem to work out.\n\nI use an arraylist to store all my shapes that are currently being displayed. At all times the shapes have to be depth sorted with the lowest y values being at the back. To do this I created a Comparable which does a comparison on the shape's position. I then sort the Arraylist using this every time I make a change to the positions of the shapes. However, if I click on a shape with a high y value and move it up, it then acts like a kind of pushbar and pushes all shapes that match it's y at any given time to keep going with it. I don't understand how this can happen. My code can only support modifying one object at once, but it seems to be modifying all objects that don't match a certain condition. Can anyone explain this to me?\n\nEDIT: I just commented out the sort lines and it works properly. That points to the sorter as the culprit. Can a sorter place two items \"next\" to eachother in a 1D array like an ArrayList? That doesn't exactly seem intuitive.\n\nMy MouseAdapter and Comparator (they are inside a class which contains the ArrayList shapes along with the booleans fill and mode:",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/207619/sockets/java/Security-Datagrams",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHello, its been ages I'm in the process of understanding Datagrams, and i understand that it is connectionless protocol... so my question is, if i send some data to a server, and leave that socket open for continuous listening, can an unauthorized host spam my socket? In Java will it though any kind of exception to reject data from the unauthorized host? hope the questions are clear thanks HannaH\n\nHello, its been ages\n\nI'm in the process of understanding Datagrams, and i understand that it is connectionless protocol...\n\nso my question is, if i send some data to a server, and leave that socket open for continuous listening, can an unauthorized host spam my socket?\n\nIn\n\nJava\nwill it though any kind of exception to reject data from the unauthorized host?\n\nhope the questions are clear\n\nthanks\n\nHannaH",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/601791/java/java/SuppressedException",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 12 years agoHi You do not generate any exceptions, by using try and catch keywords you monitor piece of code which may create an exception and by using catch, you can \"catch\" this exception and handle it in some appropriate way. If you are referring to try with resources statement, then in try clause you declare and initialize objects whose resources are automatically managed. For example, if you create an instance of FileOutputStream, then any resources which are associated with this object (such as files in this case, but there also may be other resources such as network sockets, etc) are automatically closed. There is no need to call close() method in finally block. for example:\nHi\n\nYou do not generate any exceptions, by using try and catch keywords you monitor piece of code which may create an exception and by using catch, you can \"catch\" this exception and handle it in some appropriate way. If you are referring to try with resources statement, then in try clause you declare and initialize objects whose resources are automatically managed. For example, if you create an instance of FileOutputStream, then any resources which are associated with this object (such as files in this case, but there also may be other resources such as network sockets, etc) are automatically closed. There is no need to call close() method in finally block.\n\nfor example:",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/543406/certification/Functionality-Stock-Intentory-System-Factory",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 13 years agoConcerning following line in Factory Homes Requirement: \".... that control all inventory and valid combination of inventory in the Factory Homes catalog\" - though was prone to accept that stock inventory system validates a valid Product, BUT I decided later a) Does not make sense to have a inventory system validate my transactional data (house design). It gets tightly coupled to the application also. Hence I am interpreting as the stock inventory is set up to have valid combination as a group ,only for the purpose of managing stocks as a group etc.., BUT the inventory system does not have the logic determine applicability . It is done in Online Housing Design application. Please give input.\nConcerning following line in Factory Homes Requirement:\n\n\".... that control all inventory and valid combination of inventory in the Factory Homes catalog\"\n\n- though was prone to accept that stock inventory system validates a valid Product, BUT I decided later\n\na) Does not make sense to have a inventory system validate my transactional data (house design). It gets tightly coupled to the application also.\n\nHence I am interpreting as the stock inventory is set up to have valid combination as a group ,only for the purpose of managing stocks as a group etc.., BUT the inventory system does not have the logic determine applicability . It is done in Online Housing Design application.\n\nPlease give input.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/244259/java-programmer-SCJP/certification/Java-Command",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 21 years agoLiza, I also had this problem initially. It had everything to do with my path settings, and my classpath settings. I'll give you an explanation of what I did on my windows2000 laptop to get things going. Open cmd prompt and type path <enter> verify that the path to the JDK is in there... C:\\j2sdk1.4.1_02\\bin if not, you may set it by typeing set Path=......... OR right click my computer, properties, environmental variables. ensure that something like the following is included in the PATH variable (if not edit it) C:\\j2sdk1.4.1_02\\bin . Keep in mind that entries are separated by semicolons. Then open a cmd prompt, and move to a directory where your java file lives. Then compile it... Now, if you can compile, but when you java TheFile... and you get an error... this may be due to the ClassPath setting. Open up a cmd prompt, make sure your in the root directory, and type in set ClassPath= <enter> Yes, you just cleared out the classPath. This is what allowed me to execute the class files. Before that I was getting 'no such method, main' errors when there was absolutely a main method. Hope this helps, it came from the Java2 Bible.\nLiza,\n\nI also had this problem initially. It had everything to do with my path settings, and my classpath settings. I'll give you an explanation of what I did on my windows2000 laptop to get things going.\n\nOpen cmd prompt and type path <enter>\n\nverify that the path to the JDK is in there... C:\\j2sdk1.4.1_02\\bin\n\nif not, you may set it by typeing set Path=.........\n\nOR\n\nright click my computer, properties, environmental variables.\n\nensure that something like the following is included in the PATH variable (if not edit it) C:\\j2sdk1.4.1_02\\bin . Keep in mind that entries are separated by semicolons.\n\nThen open a cmd prompt, and move to a directory where your java file lives. Then compile it...\n\nNow, if you can compile, but when you java TheFile... and you get an error... this may be due to the ClassPath setting. Open up a cmd prompt, make sure your in the root directory, and type in set ClassPath= <enter>\n\nYes, you just cleared out the classPath. This is what allowed me to execute the class files. Before that I was getting 'no such method, main' errors when there was absolutely a main method.\n\nHope this helps, it came from the Java2 Bible.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/477537/java/java/Problems-reading-locale-specific-characters",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 15 years agoHi, We are facing problems in reading locale specific characters from a file. We are using the Buffered Reader to read the file, but the locale specific chars in the file are read as some wrong characters. for Example the char: é is read as ý by the Buffered Reader. We are using the Jdk1.3. Could you please help me in resolving this problem. Many Thanks, CHandra\nHi,\n\nWe are facing problems in reading locale specific characters from a file.\n\nWe are using the Buffered Reader to read the file, but the locale specific chars in the file are read as some wrong characters.\n\nfor Example the char: é is read as ý by the Buffered Reader. We are using the Jdk1.3.\n\nCould you please help me in resolving this problem.\n\nMany Thanks,\n\nCHandra",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/u/183451/sanjana-suman",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\n> \n\nHi sanjana,\n\nThanks for your feedback. Good to know that one can skip and come back to the previous questions. It is also useful to know that questions from various sections are laid out in random order (unlike practice tests, which seem to club them together).\n\nSo if I understand your messages on this topic correctly, you took your SCJA exam recently? So how did it go? Hope you passed it with flying colors.\n\nWhat training materials did you use to prepare for the exam? Can you please share your experiences of taking the exam? Any list of DOs and DON'Ts will be really helpful.\n\nThanks much!> \n\nHi,\n\nCongrats on passing the exam!\n\nI am taking my SCJA exam in two weeks. I just have a few general questions and I would appreciate any guidance.\n\n1) In the SCJA exam, will I be able to skip any question and come back to it later (there seems no point in wasting time if a question seems to be tough - I would prefer to answer the easy ones first and come back to the tough ones later)?\n\n2) How many questions do we need to get right, in order to pass the exam? Is it 35 or 39 OR something else?\n\n3) Are the questions from a particular objective clubbed together, OR are the questions laid out in random?\n\n4) Do we get enough scratch paper and other materials for doing any scratch work?\n\n5) Do we get instant feedback about the results, after the exam?\n\nThanks!",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/537428/languages/dynamic-lists-populated-servlet-ajax",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nmy problem is with the selected index property of a dynamic list that is populated from a servlet. Let's say a list A is populated from a servlet. The inner HTML comes from the servlet as responseText and is used in the callBack function of ajax: Here's the script: s = xmlHttpRequest.responseText; var drop = '<select name=\"' + dynaDiv + '\" id=\"' + dynaDiv + '\">' + s + '</select>';document.getElementById(dynaDiv).innerHTML = drop; where s comes from the servlet as: Now if I want to create another list dynamically, let's say B, based on the selection in A, how do I retrieve the selected index of A in a script? I tried but it gives null. The aim is to generate a link of such lists. Moreover, I thought that since the list has been populated as a string(responseText rather than responseXML) the problem lies here. But if I change it to responseXML, how do return values from the servlet? (Given that I need one set for value and one for text) Please help. It's a little Urgent.\n\nmy problem is with the selected index property of a dynamic list that is populated from a\n\nservlet\n.\n\nLet's say a list A is populated from a servlet. The inner HTML comes from the servlet as responseText and is used in the callBack function of ajax:\n\nHere's the script:\n\ns = xmlHttpRequest.responseText;\n\nvar drop = '<select name=\"' + dynaDiv + '\" id=\"' + dynaDiv + '\">' + s + '</select>';\n\ndocument.getElementById(dynaDiv).innerHTML = drop;\nwhere s comes from the servlet as:\n\nNow if I want to create another list dynamically, let's say B, based on the selection in A, how do I retrieve the selected index of A in a script? I tried but it gives null. The aim is to generate a link of such lists. Moreover, I thought that since the list has been populated as a\n\nstring\n(responseText rather than responseXML) the problem lies here. But if I change it to responseXML, how do return values from the servlet? (Given that I need one set for value and one for text)\n\nPlease help. It's a little Urgent.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/47191/Struts/dicussion-forums-struts",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nSearch... FAQs Subscribe Pie FAQs Recent topics Flagged topics Hot topics Best topics Search... Search within Struts Search Coderanch Advance search Google search Register / Login Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums this forum made possible by our volunteer staff, including ... Marshals: Campbell Ritchie Tim Cooke paul wheaton Jeanne Boyarsky Ron McLeod Sheriffs: Paul Clapham Liutauras Vilda Devaka Cooray Saloon Keepers: Tim Holloway Roland Mueller Bartenders: Forum: Struts other dicussion forums for struts manasa teja Ranch Hand Posts: 325 posted 21 years ago Number of slices to send: Optional 'thank-you' note: Send Frinds, Other than Java Ranch, what other sites do you guys refer for doubts/clarifications in Struts ? Apprceiate your help. MT sandy gupta Ranch Hand Posts: 228 posted 21 years ago Number of slices to send: Optional 'thank-you' note: Send You can subscribe to the Struts Users Mailing List. Adios What? What, what, what? What what tiny ad: Smokeless wood heat with a rocket mass heater https://woodheat.net reply reply Bookmark Topic Watch Topic New Topic Boost this thread! Similar Threads Webworks Vs Struts question regarding looping what are struts? Struts Tutorial Struts and eclipse, best choices??? More...",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/132761/gc/Changing-launches-files-Word-Excel",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nWe have Windows XP/2000 users accessing files like Word, Excel, etc. on an intranet using IE. Sometimes these files open in the browser window, and other times the associated application is launched. I know that this can be set from Windows Explorer (or My Computer) by selecting Tools > Folder Options > File Types. Then selecting the desired file type (e.g., DOC or XLS), clicking on the \"Advanced\" button, and checking or unchecking \"Browse in same window.\" However, some of our users are on \"locked down\" Citrix desktops and are not able to access these settings. Is there another way to change the way IE launches files?\n\nWe have Windows XP/2000 users accessing files like\n\nWord\n, Excel, etc. on an intranet using IE. Sometimes these files open in the browser window, and other times the associated application is launched.\n\nI know that this can be set from Windows Explorer (or My Computer) by selecting Tools > Folder Options > File Types. Then selecting the desired file type (e.g.,\n\nDOC\nor XLS), clicking on the \"Advanced\" button, and checking or unchecking \"Browse in same window.\"\n\nHowever, some of our users are on \"locked down\" Citrix desktops and are not able to access these settings.\n\nIs there another way to change the way IE launches files?",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/333718/java/image-zoom",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI've never done this. I'd try to construct a new image of whatever size I am displaying using a clipping region of the original image effectively zooming in on the original image. To zoom in some more, repeat using some clipping region of the new image. To zoom out, either maintain a collection of images and step backwards through them, or use some clipping region from the original image to construct a new image, etc. For a more sophisticated approach, you might want to see what the group at Koala Graphics did. They provide an open source, high end, 2D graphics package. Good Luck.\n\nI've never done this.\n\nI'd try to construct a new image of whatever size I am displaying using a clipping region of the original image effectively zooming in on the original image. To zoom in some more, repeat using some clipping region of the new image. To zoom out, either maintain a collection of images and step backwards through them, or use some clipping region from the original image to construct a new image, etc.\n\nFor a more sophisticated approach, you might want to see what the group at\n\nKoala Graphics\ndid. They provide an open source, high end, 2D graphics package.\n\nGood Luck.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/587419/java/java/large-number-results",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nDears, Hope this finds you well. I posted this also in JDBC forum, I have an issue and I need an architectural solution or opinion for this. I have these three tables 1- Users table 2- Groups table 3- UserGroups table The issue is that I have service allows users(these users are in Users table) to subscribe in specific groups (these groups are in Groups table), I managed this in UserGroups table. The UserGroups contains two columns, group id (which is unique in Groups table) and user id (which is unique in Users table) -- one to many relationship -- The user table may contain over 1 000 000 of users. The group id is number (1,2,....,8), so I use this SQL statement I'm using this SQL statement to get the whole stuff as one record. I'm using JDBC (prepared statement and result set), setting setFetchSize for both with specific parameter, The return type is like this \"Map<UserTO,List<GroupsTO>>\", UserTO contains the details of the user, and GroupsTO contains a list of subscribe group. The problem is when I execute this task, it takes very very long time and then a timeout exception thrown ! Any better solution? or any suggestion? from both sides the database and java code ! May environment is : Database: 9.5, application server: IBM - WebSphere Application Server 7, the task is hosted by EJB component as scheduler deployed in the application server. Your quick help is highly appreciated.\n\nDears,\n\nHope this finds you well.\n\nI posted this also in\n\nJDBC\nforum,\n\nI have an issue and I need an architectural solution or opinion for this.\n\nI have these three tables\n\n1- Users table 2- Groups table 3- UserGroups table\n\nThe issue is that I have service allows users(these users are in Users table) to subscribe in specific groups (these groups are in Groups table), I managed this in UserGroups table.\n\nThe UserGroups contains two columns, group id (which is unique in Groups table) and user id (which is unique in Users table) -- one to many relationship --\n\nThe user table may contain over 1 000 000 of users.\n\nThe group id is number (1,2,....,8), so I use this SQL statement\n\nI'm using this SQL statement to get the whole stuff as one record.\n\nI'm using JDBC (prepared statement and result set), setting setFetchSize for both with specific parameter,\n\nThe return type is like this \"Map<UserTO,List<GroupsTO>>\", UserTO contains the details of the user, and GroupsTO contains a list of subscribe group.\n\nThe problem is when I execute this task, it takes very very long time and then a timeout exception thrown !\n\nAny better solution? or any suggestion? from both sides the database and\n\njava\ncode !\n\nMay environment is : Database: 9.5, application server: IBM - WebSphere Application Server 7, the task is hosted by\n\nEJB\ncomponent as scheduler deployed in the application server.\n\nYour quick help is highly appreciated.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/665321/certification/EPractice-Lab-quiz-filter",
"domain": "coderanch.com",
"file_source": "part-00559-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nYou want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true? [ Choose two ] a. Your filter class must implement an init method and a destroy method. b. Your filter class must also implement javax.servlet.FilterChain. c. When your filter chains to the next filter, it should pass the same arguments it received in its doFilter method. d. The method that your filter invokes on the object it received that implements javax.servlet.FilterChain can invoke either another filter or a servlet. e. Your filter class must implement a doFilter method that takes, among other things, an HTTPServletRequest object and an HTTPServletResponse object. Choice A and Choice D are correct A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both. Filters perform filtering in the doFilter method. Every Filter has access to a FilterConfig object from which it can obtain its initialization parameters, and a reference to the ServletContext which it can use, for example, to load resources needed for filtering tasks. Filters are configured in the deployment descriptor of a web application. Examples that have been identified for this design are: 1. Authentication Filters 2. Logging and Auditing Filters 3. Image conversion Filters 4. Data compression Filters 5. Encryption Filters 6. Tokenizing Filters 7. Filters that trigger resource access events 8. XSL/T filters 9. Mime-type chain Filter A FilterChain is an object provided by the servlet container to the developer giving a view into the invocation chain of a filtered request for a resource. Filters use the FilterChain to invoke the next filter in the chain, or if the calling filter is the last filter in the chain, to invoke the resource at the end of the chain. Your filter class must implement an init method and a destroy method. The method that your filter invokes on the object it received that implements javax.servlet.FilterChain can invoke either another filter or a servlet. I think C is also correct. For example: Reference: http://tutorials.jenkov.com/java-servlets/servlet-filters.html\n> \n\nYou want to create a filter for your web application and your filter will implement javax.servlet.Filter.\n\nWhich two statements are true?\n\n[ Choose two ]\n\na. Your filter class must implement an init method and a destroy method.\n\nb. Your filter class must also implement javax.servlet.FilterChain.\n\nc. When your filter chains to the next filter, it should pass the same arguments it received in its doFilter method.\n\nd. The method that your filter invokes on the object it received that implements javax.servlet.FilterChain can invoke either another filter or a servlet.\n\ne. Your filter class must implement a doFilter method that takes, among other things, an HTTPServletRequest object and an HTTPServletResponse object.\n\nChoice A and Choice D are correct\n\nA filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both.\n\nFilters perform filtering in the doFilter method. Every Filter has access to a FilterConfig object from which it can obtain its initialization parameters, and a reference to the ServletContext which it can use, for example, to load resources needed for filtering tasks.\n\nFilters are configured in the deployment descriptor of a web application.\n\nExamples that have been identified for this design are:\n\n1. Authentication Filters\n\n2. Logging and Auditing Filters\n\n3. Image conversion Filters\n\n4. Data compression Filters\n\n5. Encryption Filters\n\n6. Tokenizing Filters\n\n7. Filters that trigger resource access events\n\n8. XSL/T filters\n\n9. Mime-type chain Filter\n\nA FilterChain is an object provided by the servlet container to the developer giving a view into the invocation chain of a filtered request for a resource. Filters use the FilterChain to invoke the next filter in the chain, or if the calling filter is the last filter in the chain, to invoke the resource at the end of the chain.\n\nYour filter class must implement an init method and a destroy method.\n\nThe method that your filter invokes on the object it received that implements javax.servlet.FilterChain can invoke either another filter or a servlet.\nI think C is also correct.\n\nFor example:\n\nReference:\n\nhttp://tutorials.jenkov.com/java-servlets/servlet-filters.html",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/90000/application-servers/book",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nThat's OK, I'll answer your question. Our book shows how to develop a single a application, iteratively adding new technologies (JSP, Servlet, JDBC, Hibernate, Stateless Session Bean, JMS, Security, Web Services) and showing how to deploy it on JBoss. We feel that showing how to add one technology at a time makes it easier to learn rather than showing everything all at once. We have the only JBoss book that isn't a reference. This book is for J2EE developers who want to develop/deploy applications on JBoss. Tom\n\nThat's OK, I'll answer your question.\n\nOur book shows how to develop a single a application, iteratively adding new technologies (\n\nJSP\n,\n\nServlet\n,\n\nJDBC\n, Hibernate, Stateless Session Bean, JMS, Security, Web Services) and showing how to deploy it on\n\nJBoss\n. We feel that showing how to add one technology at a time makes it easier to learn rather than showing everything all at once.\n\nWe have the only JBoss book that isn't a reference. This book is for\n\nJ2EE\ndevelopers who want to develop/deploy applications on JBoss.\n\nTom",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/11653/careers/Websphere-Unix-Admin-NCR-India",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nWebsphere Administrator A minimum of 4 years IT experience including: A minimum of 24 months Websphere administration and development experience incorporating the following: An in depth understanding of the J2EE and Web sphere architecture (security model, Work Load Management etc), for version 4.0/5.0 Ability to carry out day to day administration of Web sphere and automation of administration activities in a Unix environment. Detailed experience of setting up Application servers (MQ, JDBC, CICS etc) and resolving issues in a timely manner. Detailed experience of code packaging and deployment. Ability to provide advice and guidance to development project teams on application design, application server set-up, deployment, performance tuning for all Web sphere interaction. Provide ongoing support in terms of performance tuning, assessing impacts of new Web sphere versions, application of patches, liasing with IBM support. Required Skills/Knowledge - IBM Websphere - Weblogic - Sun Solaris Unix - Unix Shell/Perl Shell Scripting - Apache - Java - Iplanet Web Server - Microsoft Internet Information Server (IIS) - J2ee - Experience with patching, migrations, and new product rollouts at enterprise level - Experience Troubleshooting All Of The Above - Excellent troubleshooting skills - Understanding of web technologies at conceptual and detailed levels Key Skills - Excellent Voice and Communication Skills - Problem solving and analysis - Global orientation - Process oriented - Ability to stay focused - Willingness to handle repetitive account administration tasks Location: Delhi/NCR & Chennai , India HP-UX administration Profile: HP-UX (Level � 3) Should have around 6+ year of Unix Experience with 4+ years of demonstrated experience and proficiency in managing and maintaining HP-Unix (V11.x or later), will be responsible for. - Installing, configuring and maintaining HP servers - Installation and configuration of High Availability environment using MC \\Service Guard. - Configuration and administration of HP Logical volume manager - Installation and Configuration of ignite backup - Patch and Package administration - Printer Administration - Writing shell scripts for day to day system administration task - Configuring and supporting HP Super dome Servers - Installation and configuration of HP -ignite environment and able to create and verify Golden image. - Troubleshooting Hardware and Operating system related issue - Capacity planning and Fine tune system for optimal performance - Installation, configuration and Administration of Veritas, Netbackup environment - Configuring Unix Security baseline - Experience in System Fault Tolerance Design, Business continuity and Disaster recovery planning Profile: HP-UX: (Level � 2) Should have minimum 3-5 year of Unix Administration experience with 3+ years of demonstrated experience and proficiency in managing and maintaining HP-Unix (V11.x or later) will be responsible for. - Installing, configuring and maintaining HP servers - Account and Printer administration - Patch and package administration - Configuration and administration of HP Logical volume manager - Fine tune the system for optimal performance - Changing kernel parameters - Understanding of SAN environment - Day to day administration task on MC /Service guard environment - Able to write basic shell scripting to accomplish day to day administration task - Understanding of Ignite backupsss - Understanding of Unix Security baseline - Troubleshooting Hardware and Operating system related issue Additional skills for HP-UX (Level 3 and Level 2) Experience on following will be added advantage - CIFS - DNS - NIS - Sendmail - LDAP - HP Glance - Monitoring Tools (like BMC Patrol, HP openview, IBM Tivoli) Location: Delhi/NCR & Chennai , India Please PM me you CV in text format .\n\nWebsphere Administrator\n\nA minimum of 4 years IT experience including: A minimum of 24 months Websphere administration and development experience incorporating the following: An in depth understanding of the\n\nJ2EE\nand Web sphere architecture (security model, Work Load Management etc), for version 4.0/5.0 Ability to carry out day to day administration of Web sphere and automation of administration activities in a Unix environment. Detailed experience of setting up Application servers (MQ,\n\nJDBC\n, CICS etc) and resolving issues in a timely manner. Detailed experience of code packaging and deployment. Ability to provide advice and guidance to development project teams on application design, application server set-up, deployment, performance tuning for all Web sphere interaction. Provide ongoing support in terms of performance tuning, assessing impacts of new Web sphere versions, application of patches, liasing with IBM support.\n\nRequired Skills/Knowledge\n\n- IBM Websphere\n\n- Weblogic\n\n- Sun Solaris Unix\n\n- Unix Shell/Perl Shell Scripting\n\n- Apache\n\n-\n\nJava\n- Iplanet Web Server\n\n- Microsoft Internet Information Server (IIS)\n\n- J2ee\n\n- Experience with patching, migrations, and new product rollouts at enterprise level\n\n- Experience Troubleshooting All Of The Above\n\n- Excellent troubleshooting skills\n\n- Understanding of web technologies at conceptual and detailed levels\n\nKey Skills\n\n- Excellent Voice and Communication Skills\n\n- Problem solving and analysis\n\n- Global orientation\n\n- Process oriented\n\n- Ability to stay focused\n\n- Willingness to handle repetitive account administration tasks\n\nLocation: Delhi/NCR & Chennai , India\n\nHP-UX administration\n\nProfile: HP-UX (Level � 3)\n\nShould have around 6+ year of Unix Experience with 4+ years of demonstrated experience and proficiency in managing and maintaining HP-Unix (V11.x or later), will be responsible for.\n\n- Installing, configuring and maintaining HP servers\n\n- Installation and configuration of High Availability environment using MC \\Service Guard.\n\n- Configuration and administration of HP Logical volume manager\n\n- Installation and Configuration of ignite backup\n\n- Patch and Package administration\n\n- Printer Administration\n\n- Writing shell scripts for day to day system administration task\n\n- Configuring and supporting HP Super dome Servers\n\n- Installation and configuration of HP -ignite environment and able to create and verify Golden image.\n\n- Troubleshooting Hardware and Operating system related issue\n\n- Capacity planning and Fine tune system for optimal performance\n\n- Installation, configuration and Administration of Veritas, Netbackup environment\n\n- Configuring Unix Security baseline\n\n- Experience in System Fault Tolerance Design, Business continuity and Disaster recovery planning\n\nProfile: HP-UX: (Level � 2)\n\nShould have minimum 3-5 year of Unix Administration experience with 3+ years of demonstrated experience and proficiency in managing and maintaining HP-Unix (V11.x or later) will be responsible for.\n\n- Installing, configuring and maintaining HP servers\n\n- Account and Printer administration\n\n- Patch and package administration\n\n- Configuration and administration of HP Logical volume manager\n\n- Fine tune the system for optimal performance\n\n- Changing kernel parameters\n\n- Understanding of SAN environment\n\n- Day to day administration task on MC /Service guard environment\n\n- Able to write basic shell scripting to accomplish day to day administration task\n\n- Understanding of Ignite backupsss\n\n- Understanding of Unix Security baseline\n\n- Troubleshooting Hardware and Operating system related issue\n\nAdditional skills for HP-UX (Level 3 and Level 2)\n\nExperience on following will be added advantage\n\n- CIFS\n\n- DNS\n\n- NIS\n\n- Sendmail\n\n- LDAP\n\n- HP Glance\n\n- Monitoring Tools (like BMC Patrol, HP openview, IBM Tivoli)\n\nLocation: Delhi/NCR & Chennai , India\n\nPlease PM me you CV in text format .",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/401613/java/java/Java-applications",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 19 years agoIf your ultimate goal is to be able to write things that integrate well on the desktop with Office, seriously consider learning C# instead of Java. Although this kind of thing is not absolutely impossible with Java, it's vastly harder to do than in a .NET language. Doing it in Java will entail various workarounds and compromises, so if you're just starting out, consider taking another path.\n\nIf your ultimate goal is to be able to write things that integrate well on the desktop with Office, seriously consider learning C# instead of Java. Although this kind of thing is not absolutely impossible with Java, it's vastly harder to do than in a .NET language. Doing it in Java will entail various workarounds and compromises, so if you're just starting out, consider taking another path.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/314418/java/java-io-InvalidClassException",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I am trying to implement 1:N relationship. Ex: Plane -- Seats Seat Bean would be having a plane id as the foriegn key. The client code is as below : Ejb create of Seat Bean is as follows : Exception occurs when the method setPlane () is invoked. java.io.InvalidClassException: javax.ejb.EJBException; local class incompatible: stream classdesc serialVersionUID = -9219910240172116449, local class serialVersionUID = 796770993296843510 Could any one suggest why does the exception occur.. However the same code works if I invoke setPlane() from the client.i.e. Thanks for the help in advance. Regards Atul\n\nHi,\n\nI am trying to implement 1:N relationship.\n\nEx: Plane -- Seats\n\nSeat Bean would be having a plane id as the foriegn key.\n\nThe client code is as below :\n\nEjb\ncreate of Seat Bean is as follows :\n\nException occurs when the method setPlane () is invoked.\n\njava.io.InvalidClassException: javax.ejb.EJBException; local class incompatible: stream classdesc serialVersionUID = -9219910240172116449, local class serialVersionUID = 796770993296843510\n\nCould any one suggest why does the exception occur..\n\nHowever the same code works if I invoke setPlane() from the client.i.e.\n\nThanks for the help in advance.\n\nRegards\n\nAtul",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/416282/sockets/java/Client-Server-Chat-Network",
"domain": "coderanch.com",
"file_source": "part-00559-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nPlaying with the Head First Java Chat program, I have run into a network problem: How do I run the Chat Server on my computer, and allow my roommate to run the client on her computer, so we can chat? I have a motorola router on a wireless network with two desktop computers running Windows XP. Each has its own internal IP address.\n\nPlaying with the Head First\n\nJava\nChat program, I have run into a network problem: How do I run the Chat Server on my computer, and allow my roommate to run the client on her computer, so we can chat?\n\nI have a motorola router on a wireless network with two desktop computers running Windows XP. Each has its own internal IP address.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/436017/certification/SCWCD-Reference-books",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi Rocky, Check out the link http://faq.javaranch.com/java/ScwcdLinks I've also just been researching the book to use for the SCWCD, and i think most ranchers are using the Head First Servlets & JSP by Bryan Basham, Kathy Sierra, Bert Bates. I'll be getting that book for my prep. Of course there are other books, but i think this is the one i'll definately be using. Check out the link for more information and the FAQ section for other useful information as well. Happy prepping. Regards, Siphiwe Madi SCJP 5\n\nHi Rocky,\n\nCheck out the link\n\nhttp://faq.javaranch.com/java/ScwcdLinks\nI've also just been researching the book to use for the SCWCD, and i think most ranchers are using the\n\nHead First\n\nServlets\n&\n\nJSP\nby Bryan Basham, Kathy Sierra, Bert Bates. I'll be getting that book for my prep. Of course there\n\nare other books, but i think this is the one i'll definately be using. Check out the link for more information and the FAQ section for\n\nother useful information as well.\n\nHappy prepping.\n\nRegards, Siphiwe Madi SCJP\n5\n\nRegards, Siphiwe Madi [SCJP, SCWCD, __] Next ... scjwsd\nRegards, Siphiwe Madi\n\n[SCJP, SCWCD, __] Next ... scjwsd",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/349554/java/Windows-server-JSP-page-displaying",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI have just installed tomcat to work with IIS. If I go to the server that I just installed this on and view (through IE) one of the example jsp pages that came with tomcat, I see the 'source' for jsp and the html. I don't see a nice web page. Secondly, if I go to another computer and enter the IP address followed by the path to this same example, i get a 404 file not found. In my isapi.log I am seeing an error message that reads as follows: /tomcat/webapps/examples//jsp/num/numguess.jps is not a servlet url. check is /tomcat/webapps/examples/jsp/num/numguess.jsp points to the web-inf directory. Any suggestions on solving this one?\n\nI have just installed\n\ntomcat\nto work with IIS.\n\nIf I go to the server that I just installed this on and view (through IE) one of the example\n\njsp\npages that came with tomcat, I see the 'source' for jsp and the html. I don't see a nice web page.\n\nSecondly, if I go to another computer and enter the IP address followed by the path to this same example, i get a 404 file not found.\n\nIn my isapi.log I am seeing an error message that reads as follows:\n\n/tomcat/webapps/examples//jsp/num/numguess.jps is not a\n\nservlet\nurl.\n\ncheck is /tomcat/webapps/examples/jsp/num/numguess.jsp points to the web-inf directory.\n\nAny suggestions on solving this one?",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/40/46568/frameworks/Error-NewsLetter",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 21 years agoOk everyone. It is finally working. Here was my problem and it was NOT A TYPO on Thomas' part. In my struts-config.xml file I had <form-beans> but never started the <form-bean> within that element. So I fixed that and I believe all is working. Except I don't know my own username and password. LOL. Anyway, thanks to everyone for the tremendous amount of help solving this problem.\nOk everyone. It is finally working. Here was my problem and it was NOT A TYPO on Thomas' part.\n\nIn my struts-config.xml file I had <form-beans> but never started the <form-bean> within that element.\n\nSo I fixed that and I believe all is working. Except I don't know my own username and password. LOL.\n\nAnyway, thanks to everyone for the tremendous amount of help solving this problem.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/412365/java/java/difference-arraylist-vector",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nSearch... FAQs Subscribe Pie FAQs Recent topics Flagged topics Hot topics Best topics Search... Search within Beginning Java Search Coderanch Advance search Google search Register / Login Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums this forum made possible by our volunteer staff, including ... Marshals: Campbell Ritchie Tim Cooke paul wheaton Jeanne Boyarsky Ron McLeod Sheriffs: Paul Clapham Liutauras Vilda Devaka Cooray Saloon Keepers: Tim Holloway Roland Mueller Bartenders: Forum: Beginning Java difference between arraylist and vector praveena reddyk Greenhorn Posts: 11 posted 16 years ago Number of slices to send: Optional 'thank-you' note: Send Hi can anybody explain me about arraylist and vector other than arraylist is unsynchronized whereas vector is not. Ravikanth kolli Ranch Hand Posts: 179 I like... posted 16 years ago Number of slices to send: Optional 'thank-you' note: Send A similar question was already in the forum and can be found here [ October 21, 2008: Message edited by: Ravikanth kolli ] -kolli praveena reddyk Greenhorn Posts: 11 posted 16 years ago Number of slices to send: Optional 'thank-you' note: Send Thanks thats i know instead of going to vector for synchronization we can use collections framework methods other than this is there any other difference since in an interview i got this who is expecting more There is no \"i\" in denial. Tiny ad: Smokeless wood heat with a rocket mass heater https://woodheat.net reply reply Bookmark Topic Watch Topic New Topic Boost this thread! Similar Threads type casting array Multiple Thread allow to change single variable Array List vs Vector performance : arraylist vs vector More...",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/496927/Flex/Callback-Methods-called-UI-Componet",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 14 years agoHi , There are 3 callback methods called as preInitialize , initialize and creationComplete that will come into picture when a UI Component is initialized . Can anybody clarify my confusion here , what does a UI Component Mean here ?? Is it a Container like a Application or a control like Button ?? Please share your ideas . Thanks for reading .Save India From Corruption - Anna Hazare.\nHi ,\n\nThere are 3 callback methods called as preInitialize , initialize and creationComplete that will come into picture when a UI Component is initialized .\n\nCan anybody clarify my confusion here , what does a UI Component Mean here ??\n\nIs it a Container like a Application or a control like Button ??\n\nPlease share your ideas . Thanks for reading .Save India From Corruption - Anna Hazare.\n\nSave India From Corruption - Anna Hazare.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/145854/po/certification/Sun-Certified-Java-CAPS-Integrator",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHizey<br />........................<br />SCJP/SCWCD/SCBCD/SCDJWS<br />IBM RAD Cert Assoc. Dev.<br />........................",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/269855/certification/output-mock-tests",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi All, I was going through some of the programs. The following two program's output caught me confused. 1) The answer is: 0 0 3 0. I could not understand why does it print 3 at the 2nd index. 2) Answer: It does not compile. But if we replace Boolean by string it complies. Why we cant sort a boolean array? About quote the source: I am sorry, I dont remember the exact source. I have been solving from miscellaneous sources on the internet and I put all my doubts in a word file as and when I encounter them. Henceforth, I will take the responsibility of making a note of the source too. (Its unlikely to get the real questions though ) MOCK TESTS: I had previously also posted queries regarding mock tests. I got the following link as a reference http://faq.javaranch.com/java/ScjpMockTests. Can someone tell me precisely which mock exams (that are free and available online) map with the objectives of SCJP 5? I have purchased Javabeat's 350 mock questions. Can someone tell me how much does it map with the SCJP 5 objectives? I would appreciate if some one could thoroughly guide me as after reading K&B, which mock exams should be practiced before appearing for SCJP 5.0? Thanks All for your time. Regards [ August 10, 2008: Message edited by: Badal Chowdhary ]\n\nHi All,\n\nI was going through some of the programs. The following two program's output caught me confused.\n\n1)\n\nThe answer is:\n\n0 0 3 0.\n\nI could not understand why does it print 3 at the 2nd index.\n\n2)\n\nAnswer:\n\nIt does not compile.\n\nBut if we replace Boolean by\n\nstring\nit complies. Why we cant sort a boolean array?\n\nAbout quote the source:\n\nI am sorry, I dont remember the exact source. I have been solving from miscellaneous sources on the internet and I put all my doubts in a\n\nword file\nas and when I encounter them. Henceforth, I will take the responsibility of making a note of the source too. (Its unlikely to get the real questions though\n\n)\n\nMOCK TESTS:\n\nI had previously also posted queries regarding mock tests. I got the following link as a reference\n\nhttp://faq.javaranch.com/java/ScjpMockTests.\nCan someone tell me precisely which mock exams (that are free and available online) map with the objectives of\n\nSCJP\n5?\n\nI have purchased Javabeat's 350 mock questions. Can someone tell me how much does it map with the SCJP 5 objectives?\n\nI would appreciate if some one could thoroughly guide me as after reading K&B, which mock exams should be practiced before appearing for SCJP 5.0?\n\nThanks All for your time.\n\nRegards\n\n[ August 10, 2008: Message edited by: Badal Chowdhary ]",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/102565/Enabling-assertions",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI have set the compliance setting to 1.4, but I am not able to run and trigger an assertion error. Even if the assertion fails, the console does not report the assertion failure. Is there some option in eclipse which I am not setting properly? Thanks in advance...",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/115902/languages/chat",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHello sir, I am developing a chat application using JSP and Servlets. Currently we have reached a stage where the common ie general chat works quite fine using servlet as message transporter Now we are trying for the one to one chat module in the same. if you could tell me that is it possible to use SIMULTANEOUSLY :the HTML forms action attribute to call a servlet & make available the page for sending the message continuosly in front of the user as its for a Chat Application. I have tried using XMLHttpRequest concept which can simultaneously call a server side component and also makes visible HTML page on which the user is currently working. As i've seen some examples on the internet using this concept but in all of them common thing was that they were only \"GETTING\" from the server side like the search engines & not posting anything. So is it possible to use Ajax concept to \"POST\" on the Serverside as at present i'm not able to even store the messages on the server side which previously got stored. If you do have another fruitful idea that i could use to send a one to one message without the usage of servlets and using any new concept that you suggest then plz tell. So please guide me how to approach. Waiting for your reply..... Thanking you, Siddharth [ April 16, 2005: Message edited by: Bear Bibeault ]\n\nHello sir,\n\nI am developing a chat application using\n\nJSP\nand\n\nServlets\n. Currently we have reached a stage where the common ie general chat works quite fine using servlet as message transporter\n\nNow we are trying for the one to one chat module in the same.\n\nif you could tell me that is it possible to use SIMULTANEOUSLY :the HTML forms action attribute to call a servlet & make available the page for sending the message continuosly in front of the user as its for a Chat Application.\n\nI have tried using XMLHttpRequest concept which can simultaneously call a server side component and also makes visible HTML page on which the user is currently working.\n\nAs i've seen some examples on the internet using this concept but in all of them common thing was that they were only \"GETTING\" from the server side like the search engines & not posting anything.\n\nSo is it possible to use Ajax concept to \"POST\" on the Serverside as at present i'm not able to even store the messages on the server side which previously got stored.\n\nIf you do have another fruitful idea that i could use to send a one to one message without the usage of servlets and using any new concept that you suggest then plz tell.\n\nSo please guide me how to approach.\n\nWaiting for your reply.....\n\nThanking you,\n\nSiddharth\n\n[ April 16, 2005: Message edited by: Bear Bibeault ]",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/u/16762/Wilfried-LAURENT",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nAccording to Peter Coad:\n Choose Inheritance when it satisfy all of the following:\n 1. A subclass represents \"Is a special kind of\" and not \"is a role of\"\n 2. An object of one class never needs to transmute to another class\n 3. The derived class extends rather than overrides or nullyfies the responsabilities of its base class \n 4. A subclass does not extend a utility class\n 5. For a class in the actual Problem Domain, the subclass specializes a role, a transaction or device.\n So make up your mind \n W.\n\nAccording to Peter Coad:\n\nChoose Inheritance when it satisfy all of the following:\n\n1. A subclass represents \"Is a special kind of\" and not \"is a role of\"\n\n2. An object of one class never needs to transmute to another class\n\n3. The derived class extends rather than overrides or nullyfies the responsabilities of its base class\n\n4. A subclass does not extend a utility class\n\n5. For a class in the actual Problem Domain, the subclass specializes a role, a transaction or device.\n\nSo make up your mind\n\nW.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/209787/java/JXTA",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHello folks, I am hereby looking forward to take my first step to develop a sample application using JXTA, so can anyone guide me with some sample code so that i can get started.I could not get much help from jxta.org site. Also please let me know to test a P2P application, can i use a single PC to do the testing or do i need 2 networks for testing . I am intending to develop a file transfer application across the peers. Please help me as i am not getting my work started. Thanks in advance ,... Saurabh\n\nHello folks,\n\nI am hereby looking forward to take my first step to develop a sample application using JXTA, so can anyone guide me with some sample code so that i can get started.I could not get much help from jxta.org site.\n\nAlso please let me know to\n\ntest\na P2P application, can i use a single PC to do the testing or do i need 2 networks for testing .\n\nI am intending to develop a file transfer application across the peers.\n\nPlease help me as i am not getting my work started.\n\nThanks in advance ,...\n\nSaurabh",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/218306/databases/Unit-test-patterns-Hibernate",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I have a simple question for folks who have strong experience with using Hibernate. My question relates to best practices in terms of unit testing Hibernate code, particularly when the DAO pattern is used. In general, should unit tests be written just for the DAOs, just for the entities, or for both? We are beginning a project, and I want to ensure that we provide good test coverage, while at the same time not spending more time than we need. I'd imagine that one answer to my question is \"if you want complete coverage, then test the entity and the DAO layer\", but I'm curious if, in practice, anyone has found it more efficient to omit tests for one or the other. Thanks in advance!\n\nHi,\n\nI have a simple question for folks who have strong experience with using Hibernate. My question relates to best practices in terms of\n\nunit\ntesting Hibernate code, particularly when the DAO\n\npattern\nis used. In general, should unit tests be written just for the DAOs, just for the entities, or for both?\n\nWe are beginning a project, and I want to ensure that we provide good test coverage, while at the same time not spending more time than we need. I'd imagine that one answer to my question is \"if you want complete coverage, then test the entity and the DAO layer\", but I'm curious if, in practice, anyone has found it more efficient to omit tests for one or the other.\n\nThanks in advance!",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/344584/java/Centering-dialogs-multi-monitor-environment",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 17 years agoCurrently, all of our dialogs seem to center themselves in the primary display. This is bad because the button that triggers the dialog may be 4 monitors away. I'm trying to get the dialog box to center on the screen where the action occured. My current solution involves passing a Point object that represents the location of the action into the method that eventually shows the dialog. From this Point, I'm trying get the object (GraphicsConfiguration?) that represents the screen that contains this Point. My current code looks something like this: As you can see, it's pretty much a mess. It works in some cases, but is unpredictable in others. If the main window is resized so that it takes up less than 1 screen, then everything seems OK. If I drag this window between monitors and try to show the dialog, it seems to center correctly on the proper display. There is a problem when the window is stretched to take up more than one screen, however. The dialog does not always appear on the correct display. I can't possibly be the only person having this problem, but any information on how to properly support multi-monitor environments is pretty hard to come by. Is my understanding of the GraphicsConfiguration object correct? Does it represent the current display? Any one have any ideas? Thanks!\nCurrently, all of our dialogs seem to center themselves in the primary display. This is bad because the button that triggers the dialog may be 4 monitors away. I'm trying to get the dialog box to center on the screen where the action occured.\n\nMy current solution involves passing a Point object that represents the location of the action into the method that eventually shows the dialog. From this Point, I'm trying get the object (GraphicsConfiguration?) that represents the screen that contains this Point. My current code looks something like this:\n\nAs you can see, it's pretty much a mess. It works in some cases, but is unpredictable in others. If the main window is resized so that it takes up less than 1 screen, then everything seems OK. If I drag this window between monitors and try to show the dialog, it seems to center correctly on the proper display. There is a problem when the window is stretched to take up more than one screen, however. The dialog does not always appear on the correct display.\n\nI can't possibly be the only person having this problem, but any information on how to properly support multi-monitor environments is pretty hard to come by. Is my understanding of the GraphicsConfiguration object correct? Does it represent the current display? Any one have any ideas? Thanks!",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/399144/java/Decision-tree",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nOriginally posted by kiennjal shah: is this something popular that is related to binary trees?\n\n No, binary trees specifically involve sorting the values in the tree for faster lookup, insertion, etc. \n A decision tree instead labels each edge (connection from one node to another). A node has a question (decision) with multiple edges leading to other nodes. Once you have an answer to the question, you navigate the edge with the matching answer.\n> \nOriginally posted by kiennjal shah:\n\nis this something popular that is related to binary trees?\nNo, binary trees specifically involve sorting the values in the tree for faster lookup, insertion, etc.\n\nA decision tree instead labels each edge (connection from one node to another). A node has a question (decision) with multiple edges leading to other nodes. Once you have an answer to the question, you navigate the edge with the matching answer.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/206564/sockets/java/java-net-SocketException-open-files",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI'm running some simple but fast-pounding test programs against our Tomcat server from a machine on the same network, and we've been tuning our database, etc, based on this. But right now, I'm seeing a new one coming out of our Java code whenever we try to open a URL: java.net.SocketException: Too many open files at java.net.Socket.createImpl(Socket.java:331) at java.net.Socket.connect(Socket.java:450) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA12275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(DashoA12275) at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(DashoA12275) at sun.net.www.protocol.https.HttpsClient.doConnect(DashoA12275) at sun.net.www.http.HttpClient.openServer(HttpClient.java:402) at sun.net.www.http.HttpClient.openServer(HttpClient.java:618) at sun.net.www.protocol.https.HttpsClient.<init>(DashoA12275) at sun.net.www.protocol.https.HttpsClient.a(DashoA12275) at sun.net.www.protocol.https.HttpsClient.a(DashoA12275) at sun.net.www.protocol.https.HttpsClient.a(DashoA12275) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA12275) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA12275) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA12275) We're opening lots of these, and it appears we're opening more than a maximum number of connections to the internet. Is there a way to bump this up? Or maybe we're just pounding this harder than it will ever get hit in the real world? I'm also seeing this as well: SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=80] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:356) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) Feb 1, 2005 4:53:08 PM org.apache.tomcat.util.net.PoolTcpEndpoint closeServerSocket SEVERE: Caught exception trying to unlock accept. java.net.SocketException: Too many open files at java.net.Socket.createImpl(Socket.java:331) at java.net.Socket.<init>(Socket.java:304) at java.net.Socket.<init>(Socket.java:124) at org.apache.tomcat.util.net.PoolTcpEndpoint.closeServerSocket(PoolTcpEndpoint.java:326) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:397) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) Feb 1, 2005 4:53:08 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket\n\nI'm running some simple but fast-pounding\n\ntest\nprograms against our\n\nTomcat\nserver from a machine on the same network, and we've been tuning\n\nour database, etc, based on this. But right now, I'm seeing a new one\n\ncoming out of our\n\nJava\ncode whenever we try to open a URL:\n\njava.net.SocketException: Too many open files\n\nat java.net.Socket.createImpl(Socket.java:331)\n\nat java.net.Socket.connect(Socket.java:450)\n\nat com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA12275)\n\nat com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(DashoA12275)\n\nat com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(DashoA12275)\n\nat sun.net.www.protocol.https.HttpsClient.doConnect(DashoA12275)\n\nat sun.net.www.http.HttpClient.openServer(HttpClient.java:402)\n\nat sun.net.www.http.HttpClient.openServer(HttpClient.java:618)\n\nat sun.net.www.protocol.https.HttpsClient.<init>(DashoA12275)\n\nat sun.net.www.protocol.https.HttpsClient.a(DashoA12275)\n\nat sun.net.www.protocol.https.HttpsClient.a(DashoA12275)\n\nat sun.net.www.protocol.https.HttpsClient.a(DashoA12275)\n\nat sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA12275)\n\nat sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA12275)\n\nat sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA12275)\n\nWe're opening lots of these, and it appears we're opening more than a\n\nmaximum number of connections to the internet. Is there a way to bump\n\nthis up? Or maybe we're just pounding this harder than it will ever get\n\nhit in the real world? I'm also seeing this as well:\n\nSEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=80]\n\nignored exception: java.net.SocketException: Too many open files\n\njava.net.SocketException: Too many open files\n\nat java.net.PlainSocketImpl.socketAccept(Native Method)\n\nat java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)\n\nat java.net.ServerSocket.implAccept(ServerSocket.java:448)\n\nat java.net.ServerSocket.accept(ServerSocket.java:419)\n\nat org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:107)\n\nat org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:356)\n\nat org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529)\n\nat org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)\n\nat java.lang.Thread.run(Thread.java:534)\n\nFeb 1, 2005 4:53:08 PM org.apache.tomcat.util.net.PoolTcpEndpoint\n\ncloseServerSocket\n\nSEVERE: Caught exception trying to unlock accept.\n\njava.net.SocketException: Too many open files\n\nat java.net.Socket.createImpl(Socket.java:331)\n\nat java.net.Socket.<init>(Socket.java:304)\n\nat java.net.Socket.<init>(Socket.java:124)\n\nat org.apache.tomcat.util.net.PoolTcpEndpoint.closeServerSocket(PoolTcpEndpoint.java:326)\n\nat org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:397)\n\nat org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529)\n\nat org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)\n\nat java.lang.Thread.run(Thread.java:534)\n\nFeb 1, 2005 4:53:08 PM org.apache.tomcat.util.net.PoolTcpEndpoint\n\nacceptSocket\n\nWARNING: Reinitializing ServerSocket",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/634538/vc/Package-Options-NetBeans-BeanInfo-Classes",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 10 years agoI have created a simple JavaBean and its associated BeanInfo class. When their source files are contained in the same package, the icon provided by the BeanInfo class appears in the NetBeans palette after I add the JavaBean to the palette. I would like to locate the BeanInfo class in another package. When I do this, however, NetBeans can't seem to find it. The javadoc on the Introspector class says there is a BeanInfo search path that starts in the same package, but looks to sun.beans.infos when that fails. I've confirmed that's where the Introspector is looking with this bit: ); Which gives me this: sun.beans.infos \"Core Java\" simply says, \"The bean info class must be part of the same package as the bean itself.\" If true, then I'm stuck. But that's not what the javadoc seems to suggest. Where else can I put my BeanInfo class, other than the same package that contains the JavaBean itself, and still have NetBeans find it?\"Il y a peu de choses qui me soient impossibles...\"\nI have created a simple JavaBean and its associated BeanInfo class. When their source files are contained in the same package, the icon provided by the BeanInfo class appears in the NetBeans palette after I add the JavaBean to the palette. I would like to locate the BeanInfo class in another package. When I do this, however, NetBeans can't seem to find it. The javadoc on the Introspector class says there is a BeanInfo search path that starts in the same package, but looks to sun.beans.infos when that fails. I've confirmed that's where the Introspector is looking with this bit:\n\n);\n\nWhich gives me this:\n\nsun.beans.infos\n\n\"Core Java\" simply says, \"The bean info class must be part of the same package as the bean itself.\" If true, then I'm stuck. But that's not what the javadoc seems to suggest.\n\nWhere else can I put my BeanInfo class, other than the same package that contains the JavaBean itself, and still have NetBeans find it?\"Il y a peu de choses qui me soient impossibles...\"\n\n\"Il y a peu de choses qui me soient impossibles...\"",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/2371/Mail-Notification-topics",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nOriginally posted by Gregg Bolinger: Read our FAQ to find out about this feature or lack there of. Thanks a lot! I got the answer: QuestionCan I be notified via E-mail about replies to threads other than my own? AnswerOur current forum software does not support this feature. The forum software we are developing does.\n> \nOriginally posted by Gregg Bolinger:\n\nRead our FAQ to find out about this feature or lack there of.\nThanks a lot! I got the answer:\n\nQuestionCan I be notified via E-mail about replies to threads other than my own? AnswerOur current forum software does not support this feature. The forum software we are developing does.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/317500/java/Isolation-EARs-EJB",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nPlease help me out with this then: Below are two persistence.xml files which are each within an EJB3 archive within an EAR. Aside from this file, the contents of both EARs are identical. Am I missing anything?\n The deployment scenario in which I've made the most progress is:\n Two EAR files each with its own copy of:\n 1. a WAR (JSPs, Servlets)\n 2. a skeleton EJB3 archive which contains only a META-INF/persistence.xml and no classes\n 3. a helper JAR file. \n Altogether, I deploy three items to JBoss at the same time. Both EARs, and a full EJB3 archive with only the entity and session classes and no persistence.xml. \n Everything deploys without any problem. However, when I try to access either EAR from a browser, the datasource both end up connecting to is the default hypersonic database which comes built-in with JBoss. \n Am I messing up on the persistence.xml deployment descriptors somehow? \n I'm sorry if my questions are confusing. I'm only an intern trying to do all this\n\nPlease help me out with this then: Below are two persistence.xml files which are each within an EJB3 archive within an EAR. Aside from this file, the contents of both EARs are identical. Am I missing anything?\n\nThe deployment scenario in which I've made the most progress is:\n\nTwo EAR files each with its own copy of:\n\n1. a WAR (JSPs, Servlets)\n\n2. a skeleton EJB3 archive which contains only a META-INF/persistence.xml and no classes\n\n3. a helper JAR file.\n\nAltogether, I deploy three items to JBoss at the same time. Both EARs, and a full EJB3 archive with only the entity and session classes and no persistence.xml.\n\nEverything deploys without any problem. However, when I try to access either EAR from a browser, the datasource both end up connecting to is the default hypersonic database which comes built-in with JBoss.\n\nAm I messing up on the persistence.xml deployment descriptors somehow?\n\nI'm sorry if my questions are confusing. I'm only an intern trying to do all this",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/109273/maven-inheritance-packaging",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, Hope someone can help. I am new to maven2 and am having some problems with inheritance and packaging. I have a parent project and a number of child projects. The child projects have different packaging values - jar, ear, war etc. The parent project has a plugin org.apache.maven.plugins.maven-antrun-plugin that calls the 'run' goal during the test phase when a certain parameter is passed in to the mvn command at the command line. I want all child projects to be able to pass this parameter in to the mvn command and trigger the plugin during the test phase. This is where the problems arise - I have a child project that should produce a jar file when built: 1. I do not specify a packaging value for parentProjetc(defaults to jar) and deploy it. I set the child packaging to jar. I install the parentProject but when I try to build the child project I get the error: org.apache.maven.reactor.MavenExecutionException: Parent: parentProject:jar:1.0 of project: childProject has wrong packaging: jar. Must be 'pom'. for project childProject 2. I set the parentProject packaging to pom and deploy it. I set the childProject packaging to jar and build it. No errors this time, the project's unit tests are run but the plugin is not run during the test phase. It does not seem to be inheriting the plugin. 3. I set the parentProject packaging to pom and deploy it. I set the childProject packaging to pom and build it. No errors, the plugin is triggered but the childProject's unit tests are not run. I'm not sure if I am doing something wrong or my whole approach is wrong. I want to be have the plugin in the parentProject, the childProject to inherit the plugin, the childProject to run it's unit tests and the childProject to produce a jar (or an ear or a war etc.). I can post pom.xml entries if required. Thanks in advance for any suggestions.\n\nHi,\n\nHope someone can help. I am new to maven2 and am having some problems with inheritance and packaging.\n\nI have a parent project and a number of child projects. The child projects have different packaging values - jar, ear, war etc.\n\nThe parent project has a plugin org.apache.maven.plugins.maven-antrun-plugin that calls the 'run' goal during the\n\ntest\nphase when a certain parameter is passed in to the mvn command at the command line.\n\nI want all child projects to be able to pass this parameter in to the mvn command and trigger the plugin during the test phase.\n\nThis is where the problems arise - I have a child project that should produce a jar file when built:\n\n1. I do not specify a packaging value for parentProjetc(defaults to jar) and deploy it. I set the child packaging to jar. I install the parentProject but when I try to build the child project I get the error:\n\norg.apache.maven.reactor.MavenExecutionException: Parent: parentProject:jar:1.0 of project: childProject has wrong packaging: jar. Must be 'pom'. for project childProject\n\n2. I set the parentProject packaging to pom and deploy it. I set the childProject packaging to jar and build it. No errors this time, the project's unit tests are run but the plugin is not run during the test phase. It does not seem to be inheriting the plugin.\n\n3. I set the parentProject packaging to pom and deploy it. I set the childProject packaging to pom and build it. No errors, the plugin is triggered but the childProject's unit tests are not run.\n\nI'm not sure if I am doing something wrong or my whole approach is wrong.\n\nI want to be have the plugin in the parentProject, the childProject to inherit the plugin, the childProject to run it's unit tests and the childProject to produce a jar (or an ear or a war etc.).\n\nI can post pom.xml entries if required.\n\nThanks in advance for any suggestions.",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/u/112342/Kevin-DesLauriers",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI have done a few hours reading different tutorials. I was just not sure how to download the jars, property and log files into a particular directory and then place a shortcut in the Start Up. I want as little user interaction as possible. I was hoping to house the complete client application on the local machine. The properties file and the log file need to be accessed by the user on their local machine. I was under the impression that everything had to be located in the jar where the actual code is located. I want a single click to download and install the application on the client machine. How do I specify where the application is installed and how to install it? Do I have to use the JNLP API or is it just about creating a .jnlp file in my web-app and supplying a link to it via one of my jsps? The installed structure currently is: installation folder     lib folder        main client jar        dependency jars (ie. log4j, axis2 etc)     logs        error.log        info.log     application.properties     application.bat <- batch file that calls javaw with the main class, etc If you could point me in the direction of a tutorial that does something like this I would appreciate it. Thanks\nI have done a few hours reading different tutorials. I was just not sure how to download the jars, property and log files into a particular directory and then place a shortcut in the Start Up. I want as little user interaction as possible. I was hoping to house the complete client application on the local machine. The properties file and the log file need to be accessed by the user on their local machine.\n\nI was under the impression that everything had to be located in the jar where the actual code is located. I want a single click to download and install the application on the client machine. How do I specify where the application is installed and how to install it? Do I have to use the JNLP API or is it just about creating a .jnlp file in my web-app and supplying a link to it via one of my jsps?\n\nThe installed structure currently is:\n\ninstallation folder\n\n    lib folder\n\n       main client jar\n\n       dependency jars (ie. log4j, axis2 etc)\n\n    logs\n\n       error.log\n\n       info.log\n\n    application.properties\n\n    application.bat <- batch file that calls javaw with the main class, etc\n\nIf you could point me in the direction of a tutorial that does something like this I would appreciate it.\n\nThanks",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/376804/java/Java-performance-issues",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\n> \n\nOriginally posted by Mark Wuest:\n\nThere have been articles with tests supposedly showing Java to be faster than C++. If you search slashdot.org, there was enlightened discussion there about the merits (or lack thereof) of these tests.> \n\nThis is my opinion: all other things being equal, a well-written program coded in C++ is probably going to be more cpu and memory effecient than the same program in Java.> \n\nOriginally posted by Ernest Friedman-Hill:\n\nMy bottom line is that nothing beats measurement. Don't believe anybody who posts here, including me. If your Java code is too slow, and you know there's no way to write it faster in Java, then go ahead and try to do better in native code. You may find out that you can -- but you may find out that you can't.> \n\nOriginally posted by Gregg Bolinger:\n\nIf you think JNI and EJB's are the cool aspects of Java, I'd question much of anything you say.Leandro Melo\n\nSCJP 1.4, SCWCD 1.4\nThat new kid is a freak. Show him this tiny ad:We need your help - Coderanch server fundraiser https://coderanch.com/wiki/782867/Coderanch-server-fundraiser",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/215056/databases/Hibernate-Smart-Handle-Concrete-Parent",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 20 years agoWe have a table-per-subclass mapping strategy. Client --> CLIENT_TABLE | -- ClientTypeA --> CLIENT_A_TABLE ( joined on CLIENT_ID ) -- ClientTypeB --> CLIENT_B_TABLE ( joined on CLIENT_ID ) -- ClientTypeC --> CLIENT_C_TABLE ( joined on CLIENT_ID ) However, our Client class is NOT abstract because when we first insert the Client into the DB, we do not know which type of client it is. Later on, the user inputs more information which determines which type it is. At this point, we construct a ClientTypeX object from the Client object and want to update it. Not too surprisingly, we get a StaleObjectStateException...the desired behavior is for Hibernate to be smart enough to update the Client table and insert into the joined-subclass table for the given Client type. Can Hibernate be configured to handle this?? Thanks. [ September 22, 2004: Message edited by: Ogi Kavazovic ]\nWe have a table-per-subclass mapping strategy.\n\nClient --> CLIENT_TABLE\n\n|\n\n-- ClientTypeA --> CLIENT_A_TABLE ( joined on CLIENT_ID )\n\n-- ClientTypeB --> CLIENT_B_TABLE ( joined on CLIENT_ID )\n\n-- ClientTypeC --> CLIENT_C_TABLE ( joined on CLIENT_ID )\n\nHowever, our Client class is NOT abstract because when we first insert the Client into the DB, we do not know which type of client it is. Later on, the user inputs more information which determines which type it is. At this point, we construct a ClientTypeX object from the Client object and want to update it.\n\nNot too surprisingly, we get a StaleObjectStateException...the desired behavior is for Hibernate to be smart enough to update the Client table and insert into the joined-subclass table for the given Client type. Can Hibernate be configured to handle this??\n\nThanks.\n\n[ September 22, 2004: Message edited by: Ogi Kavazovic ]",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/305919/JDBC/databases/data-xml-java",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 17 years agoHai friends, I have a doubt regarding how to take data from xml file just like taking data from Access Database or Oracle database. Kindly send to me this code because this is given to me in the evaluation of my job period. And also how to dispay data in XML format. Although this site is not ment for sending codes. but this is very important for me. Please send me the response . Regards, ChakraPani.\nHai friends,\n\nI have a doubt regarding how to take data from xml file just like taking data from\n\nAccess Database or Oracle database.\n\nKindly send to me this code because this is given to me in the evaluation of my job period.\n\nAnd also how to dispay data in XML format.\n\nAlthough this site is not ment for sending codes. but this is very important for me.\n\nPlease send me the response .\n\nRegards,\n\nChakraPani.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/560863/JSP/java/Displaying-object-properties-fields-JSP",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi \"callFlowDetails.callFlowMasterDataList\" is a list of objects which I am returning from my controller. List is populated correctly in controller and set back in model attribute used in jsp form, but I am not able to view the list data on jsp. I am using following code in jsp, Please advise what I might be doing wrong below:\n\nHi\n\n\"callFlowDetails.callFlowMasterDataList\" is a list of objects which I am returning from my controller. List is populated correctly in controller and set back in model attribute used in\n\njsp\nform, but I am not able to view the list data on jsp.\n\nI am using following code in jsp, Please advise what I might be doing wrong below:",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/642023/java/SOLVED-Entity-relations",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I have the following problem: I need to make a relation (OneToMany) between a entity on my server and a entity in my library (ManyToOne). My program consists of 3 main components: - a client (who uses session beans to query the server) - a server (which contains entity's) - a lib which is shared between the client and the server. (which also contains entity's) Here is the thing I want to do: Class on my Server: Class on my Library: It's not an option to move ClassOnServer to my lib because this would ruin the whole architecture. Do you guys have any suggestions on how to solve this? I solved it! thanks anyway.\n\nHi,\n\nI have the following problem:\n\nI need to make a relation (OneToMany) between a entity on my server and a entity in my library (ManyToOne).\n\nMy program consists of 3 main components:\n\n- a client (who uses session beans to query the server)\n\n- a server (which contains entity's)\n\n- a lib which is shared between the client and the server. (which also contains entity's)\n\nHere is the thing I want to do:\n\nClass on my Server:\n\nClass on my Library:\n\nIt's not an option to move ClassOnServer to my lib because this would ruin the whole architecture.\n\nDo you guys have any suggestions on how to solve this?\n\nI solved it! thanks anyway.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/489919/java/daily-horoscope-code-neede",
"domain": "coderanch.com",
"file_source": "part-00559-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHello, You can use the following: 1. Web horoscope services, I don't know any but you can look at here. 2. RSS/Atom - subscribe to the RSS channel(s) and parse by your needs When you create user's account just put additional info like date of birth in DB/users.properties or any other place and after a user is logged in, take this info and query. Show retrieved data using some \"widgets\" (Flex, JSF, JavaFX, DoJo, RAP ...). Hope it helps. Cheers, Oleg.\n\nHello,\n\nYou can use the following:\n\n1. Web horoscope services, I don't know any but you can look at\n\nhere\n.\n\n2. RSS/Atom - subscribe to the RSS channel(s) and parse by your needs\n\nWhen you create user's account just put additional info like date of birth in DB/users.properties or any other place and after a user is logged in, take this info and query. Show retrieved data using some \"widgets\" (Flex,\n\nJSF\n, JavaFX, DoJo, RAP ...).\n\nHope it helps.\n\nCheers,\n\nOleg.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/332733/java/unicode-HTMLEditorKit",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nMy program use StringWriter to get the unicode in a HTMLEditorKit by this code: Writer textOut = new StringWriter(); htmlEditorkit.write(str, doc, start, end); The string I got from this method is in the format of decimal unicode (e.g. 雅). Actually, I do not mind that it is in this format. However, I need to save this string into a file with the format of UTF-8. I have tried to use the following codes: FileOutputStream fos = new FileOutputStream(new File(fileName)); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos, \"UTF-8\")); out.write(str); ... However, the content in the file saved is still in the format of decimal unicode. How can I get the file with the content in the UTF-8? Thanks!\n\nMy program use StringWriter to get the unicode in a HTMLEditorKit by this code:\n\nWriter textOut = new StringWriter();\n\nhtmlEditorkit.write(str,\n\ndoc\n, start, end);\n\nThe\n\nstring\nI got from this method is in the format of decimal unicode (e.g. 雅). Actually, I do not mind that it is in this format. However, I need to save this string into a file with the format of UTF-8. I have tried to use the following codes:\n\nFileOutputStream fos = new FileOutputStream(new File(fileName));\n\nBufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos, \"UTF-8\"));\n\nout.write(str);\n\n...\n\nHowever, the content in the file saved is still in the format of decimal unicode.\n\nHow can I get the file with the content in the UTF-8? Thanks!",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/534998/ol/language-bring-table",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi John, With so many new languages, limited time, and the steep learning curves often involved, this is a very valid question. In the scheme (no pun intended) of things, R has been around for long time, but with its increasing popularity (Forbes called it a name to know in 2011), more people are hearing about it. I would make a distinction between data processing and manipulation, and data analysis. R excels at the later - summarizing data, identifying patterns and trends, predicting outcomes (along with estimates of the accuracy of those predictions), and visualizing the results. Here are a few examples from my everyday work world (off the top of my head). Senario 1 I often need to identify and understand the missing data contained in a database. This includes which fields (variables) have no missing data, which have moderate amounts of missing data, and which have large amounts of missing data. I also want to see any patterns that might exist in the missing data. For example: young white males are reluctant to answer questions about salary; people who skip questions about gender also do not answer questions about marital status and age; a large percentage of people give up after filling out the 3rd screen of a on-line form. Functions in the VIM (visualization of missing data) package allow me to create a visual map of the missing data in a database, highlighting any patterns present, with 2 or 3 lines of code. Senario 2 I often want to access an external database, run a SQL select statement, and generate a report on the results that tell me: (1) for each numeric variable, what are number of valid and invalid values, minimum, maximum, mean, standard deviation, and median (2) for each categorical variable, what are the number and percentage of observations present for each unique level of the categorical variable (3) what are the ten most unusal observations (cases with unique and/or unlikely combinations of values) (4) for a specified subset of variables, what is the percentage of observations above a specified set of threshold values I want the report to be succinct and I may (or may not) want the results broken down by the levels of an additional categorical variable (e.g., geographic location) I can write a short script (usually a page or less) that will do all this, and save it as a function in my \"library\". In the future, I can generate these reports with a one line invocation: summarize(database, sql_query, optional_by_variable) Senario 3 I manage a subscription based website for my organization. When I analyze the log files, I would like to generate a single graph that (1) lets me see usage over time (2) identifies usage patterns by gender and age (separate trend lines with indications of variability around the trend lines) (3) contrasts usage by country (separate graphs by country, all on a single page, arranged to faciliate comparisons) Additionally, I want the graph to be compelling, attractive, and (given the level of detail), relatively uncluttered. Using the qplot (quick plot) function in the ggplot2 (grammar of graphics, 2) package, I can create this graph with a single line of code. Conclusion I am a strong believer in using the right tool for the right job. I once created an entire office management system entirely in csh, but I wouldn't do it again. R is an amazing tool for data analysis. There are better tools for data manipulation and processing. My personal goal is to find tools that make my life easier, are fun to use, and expand my horizons with regard to what is possible. Working with R has been a rewarding, and frankly, humbling experience. I hope that this relatively long post helps. Rob\n\nHi John,\n\nWith so many new languages, limited time, and the steep learning curves often involved, this is a very valid question. In the scheme (no pun intended) of things, R has been around for long time, but with its increasing popularity (Forbes called it a name to know in 2011), more people are hearing about it.\n\nI would make a distinction between data processing and manipulation, and data analysis. R excels at the later - summarizing data, identifying\n\npatterns\nand trends, predicting outcomes (along with estimates of the accuracy of those predictions), and visualizing the results.\n\nHere are a few examples from my everyday work world (off the top of my head).\n\nSenario 1\nI often need to identify and understand the missing data contained in a database. This includes which fields (variables) have no missing data, which have moderate amounts of missing data, and which have large amounts of missing data. I also want to see any patterns that might exist in the missing data. For example: young white males are reluctant to answer questions about salary; people who skip questions about gender also do not answer questions about marital status and age; a large percentage of people give up after filling out the 3rd screen of a on-line form. Functions in the VIM (visualization of missing data) package allow me to create a visual map of the missing data in a database, highlighting any patterns present, with 2 or 3 lines of code.\n\nSenario 2\nI often want to access an external database, run a SQL select statement, and generate a report on the results that tell me:\n\n(1) for each numeric variable, what are number of valid and invalid values, minimum, maximum, mean, standard deviation, and median\n\n(2) for each categorical variable, what are the number and percentage of observations present for each unique level of the categorical variable\n\n(3) what are the ten most unusal observations (cases with unique and/or unlikely combinations of values)\n\n(4) for a specified subset of variables, what is the percentage of observations above a specified set of threshold values\n\nI want the report to be succinct and I may (or may not) want the results broken down by the levels of an additional categorical variable (e.g., geographic location)\n\nI can write a short script (usually a page or less) that will do all this, and save it as a function in my \"library\". In the future, I can generate these reports with a one line invocation:\n\nsummarize(database, sql_query, optional_by_variable)\n\nSenario 3\nI manage a subscription based website for my organization. When I analyze the log files, I would like to generate a single graph that\n\n(1) lets me see usage over time\n\n(2) identifies usage patterns by gender and age (separate trend lines with indications of variability around the trend lines)\n\n(3) contrasts usage by country (separate graphs by country, all on a single page, arranged to faciliate comparisons)\n\nAdditionally, I want the graph to be compelling, attractive, and (given the level of detail), relatively uncluttered.\n\nUsing the qplot (quick plot) function in the ggplot2 (grammar of graphics, 2) package, I can create this graph with a single line of code.\n\nConclusion\nI am a strong believer in using the right tool for the right job. I once created an entire office management system entirely in csh, but I wouldn't do it again. R is an amazing tool for data analysis. There are better tools for data manipulation and processing.\n\nMy personal goal is to find tools that make my life easier, are fun to use, and expand my horizons with regard to what is possible. Working with R has been a rewarding, and frankly, humbling experience.\n\nI hope that this relatively long post helps.\n\nRob",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/273007/java/java/experience-Jsyn",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nSearch... FAQs Subscribe Pie FAQs Recent topics Flagged topics Hot topics Best topics Search... Search within Java API Search Coderanch Advance search Google search Register / Login Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums this forum made possible by our volunteer staff, including ... Marshals: Campbell Ritchie Tim Cooke paul wheaton Jeanne Boyarsky Ron McLeod Sheriffs: Paul Clapham Liutauras Vilda Devaka Cooray Saloon Keepers: Tim Holloway Roland Mueller Bartenders: Forum: Other JSE/JEE APIs Anyone have experience with Jsyn? Daniel Prene Ranch Hand Posts: 241 posted 19 years ago Number of slices to send: Optional 'thank-you' note: Send Anyone know anything about jsyn? Or specificaly, incorperating realtime midi control? Thank you for atleast reading this, D.P. Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters ? reply reply Bookmark Topic Watch Topic New Topic Boost this thread! Similar Threads JBOSS Bangalore Documents Required Working with consulting company Alphametics Rounding decimal number to nearest 0.05 More...",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/705519/careers/BAE-Systems-Senior-Engineer-Common",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nWould you like the chance to play a crucial role in supporting the development of our cutting-edge submarine programmes? We are looking for a Senior Engineer with IT skills and systems engineering knowledge to join us at our site in Ash Vale, Surrey. As a Senior Engineer, you will be breaking down requirements, designing documented solutions, and developing the product ready for test activities. This is a long term, large scale engineering project, offering you the chance to work on novel equipment and provide solutions to unique challenges, such as those posed in a submarine environment. In this role you will be conducting systems engineering activities through the engineering life cycle. You’ll be responding to customer requirements, architecting the solution, and working closely with subcontractors to provide a design solution that meets the needs of a submarines combat system. Your main responsibilities as Senior Engineer - Test Equipment will involve: Producing system specifications derived from technical requirements, decomposing these into system and subsystem design descriptions, and software/hardware specifications Developing and testing software components on hardware modules ensuring that both functional and non‑functional requirements have been met prior to submission into formal test Preparing and presenting design review material at product phase reviews to allow progression through the engineering lifecycle Investigating and addressing technical issues by modifying existing designs or correcting defects, accurately tracking and maintaining all change records Ensuring traceability of requirements to their parent system-level requirements and aiding the test team to produce sufficient quality control evidence to allow the production of the system’s certificate of design Technical input to the project management team to produce robust cost estimates, technical risk assessment and reduction While not limited to the below, ideally we would like you to have some of the following skills and experience: Experience of working within an engineering life cycle framework Experience in producing system specifications from technical requirements and implementing designs from specifications Programming knowledge (eg C++, C#) on Windows/Linux Programming for equipment and device control Experience in the following would also be advantageous. Experience of scripting (e.g. PowerShell, Bash) and/ or experience with UML modelling Windows 10 configuration and lockdown Familiarisation with virtualisation, networking and storage What we are looking for in you: We are looking for someone with an interest in the industry, and looking to work on large scale, long term projects. We want you to be a key part of an incredibly complex engineering project, within which you’ll have an innovative approach to problem solving, and will be keen to find novel solutions. You should also be a strong communicator, able to present your ideas and collaborate effectively. Further information: https://express.candarine.com/campaign/url/forward/d97cb96ac47d\n\nWould you like the chance to play a crucial role in supporting the development of our cutting-edge submarine programmes? We are looking for a Senior Engineer with IT skills and systems engineering knowledge to join us at our site in Ash Vale, Surrey.\n\nAs a Senior Engineer, you will be breaking down requirements, designing documented solutions, and developing the product ready for\n\ntest\nactivities. This is a long term, large scale engineering project, offering you the chance to work on novel equipment and provide solutions to unique challenges, such as those posed in a submarine environment.\n\nIn this role you will be conducting systems engineering activities through the engineering life cycle. You’ll be responding to customer requirements, architecting the solution, and working closely with subcontractors to provide a design solution that meets the needs of a submarines combat system.\n\nYour main responsibilities as Senior Engineer - Test Equipment will involve:\nProducing system specifications derived from technical requirements, decomposing these into system and subsystem design descriptions, and software/hardware specifications\n\nDeveloping and testing software components on hardware modules ensuring that both functional and non‑functional requirements have been met prior to submission into formal test\n\nPreparing and presenting design review material at product phase reviews to allow progression through the engineering lifecycle\n\nInvestigating and addressing technical issues by modifying existing designs or correcting defects, accurately tracking and maintaining all change records\n\nEnsuring traceability of requirements to their parent system-level requirements and aiding the test team to produce sufficient quality control evidence to allow the production of the system’s certificate of design\n\nTechnical input to the project management team to produce robust cost estimates, technical risk assessment and reduction\n\nWhile not limited to the below, ideally we would like you to have some of the following skills and experience:\nExperience of working within an engineering life cycle framework\n\nExperience in producing system specifications from technical requirements and implementing designs from specifications\n\nProgramming knowledge (eg C++, C#) on Windows/Linux\n\nProgramming for equipment and device control\n\nExperience in the following would also be advantageous.\nExperience of scripting (e.g. PowerShell, Bash) and/ or experience with UML modelling\n\nWindows 10 configuration and lockdown\n\nFamiliarisation with virtualisation, networking and storage\n\nWhat we are looking for in you:\nWe are looking for someone with an interest in the industry, and looking to work on large scale, long term projects. We want you to be a key part of an incredibly complex engineering project, within which you’ll have an innovative approach to problem solving, and will be keen to find novel solutions.\n\nYou should\nalso be a strong communicator, able to present your ideas and collaborate effectively.\n\nFurther information: https://express.candarine.com/campaign/url/forward/d97cb96ac47d",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/32131/careers/contract-perm-job",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 17 years agoYou never know. Sometimes it's one of those \"trial\" scenarios where after a few months they are pretty sure they want you and you know you'll be hired on. Other times it's just a ploy not to hire any FTE. You stay as a contractor, they like you, they keep extending your contract, but never hire you as a FTE because maybe the budget isn't there or maybe the company doesn't want FTE. I was on a 4 month contract one time that got extended for 6 more months, then another 6 months, and so on. Everything was going great but the fact was a contractor was looked at differently in the budget compared to a FTE. So they could keep me on as a contractor but they couldn't bring me on as a FTE. Semantics, politics, and money is what it is all about. Sometimes they will hire you after your contract is up, but sometimes that's just not feasible and it's used because some people don't like contracting. Therefore if it's a possible Contract to Hire after six months more people might be interested and in reality, maybe they do want to hire you but can't or maybe they wanted to but things changed. Like I said, many times contractors aren't on the same budget as FTE and certain money issues can be avoided. Instead of counting as a Human Resource head count a contractor might be a services headcount or something like that. It all really depends. It might be true, it might not, things might change, they might not. The fact is, if it's a contract, take it at that. If you do get hired in 6 months, great. But don't assume if you do great that you'll be hired as a FTE. Sometimes it's not about what you do or who likes you.\nYou never know. Sometimes it's one of those \"trial\" scenarios where after a few months they are pretty sure they want you and you know you'll be hired on. Other times it's just a ploy not to hire any FTE. You stay as a contractor, they like you, they keep extending your contract, but never hire you as a FTE because maybe the budget isn't there or maybe the company doesn't want FTE.\n\nI was on a 4 month contract one time that got extended for 6 more months, then another 6 months, and so on. Everything was going great but the fact was a contractor was looked at differently in the budget compared to a FTE. So they could keep me on as a contractor but they couldn't bring me on as a FTE. Semantics, politics, and money is what it is all about.\n\nSometimes they will hire you after your contract is up, but sometimes that's just not feasible and it's used because some people don't like contracting.\n\nTherefore if it's a possible Contract to Hire after six months more people might be interested and in reality, maybe they do want to hire you but can't or maybe they wanted to but things changed.\n\nLike I said, many times contractors aren't on the same budget as FTE and certain money issues can be avoided. Instead of counting as a Human Resource head count a contractor might be a services headcount or something like that.\n\nIt all really depends. It might be true, it might not, things might change, they might not. The fact is, if it's a contract, take it at that. If you do get hired in 6 months, great. But don't assume if you do great that you'll be hired as a FTE. Sometimes it's not about what you do or who likes you.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/614066/Javarevisited-Blogpost-Object-Oriented-Design",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi Guys, Thought to submit one of my post for this awesome contest. This post is about object oriented design principles, including SOLID principles given by Uncle bob. Let me know how do you find it, here is the link http://javarevisited.blogspot.de/2012/03/10-object-oriented-design-principles.html Thanks Javin\n\nHi Guys,\n\nThought to submit one of my post for this awesome contest. This post is about object oriented design principles, including SOLID principles given by Uncle bob.\n\nLet me know how do you find it, here is the link\n\nhttp://javarevisited.blogspot.de/2012/03/10-object-oriented-design-principles.html\nThanks\n\nJavin",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/177319/certification/isUserInRole",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nOn broader level isUserInRole() is related to authorization or authentication?I think it is authorization as it returns boolean depending whether user is in specified role or not.But in specifications its written that even if user is not authenticated it will return false ( which is logical).\n\nSo is this concept related to authentication or authorization?\n\nAuthorization. Authentication concerns itself with verifying that the user is who he says he is. Authorization is about determining which rights a particular user has AFTER he is authenticated (e.g., which roles he's in).\n\nstraws are for suckers. tiny ads are for attractive people.",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/476692/java/FTP-file-copy-timestamp",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 15 years agoHi, Can any one tell me how to set file lastModifiedTime after copying files through FTP. I am using commons-net-1.4.1.jar to copy files from local system to server. Eg: local file name “test.doc” (Today, December 29, 2009, 5:09:33 PM) when I moving this file to server, the files are moved successfully but the time is updated as server current time. But I need local file time like (Today, December 29, 2009, 5:09:33 PM). Below code I am using for uploading files to server. Can any one please help me to overcome this issue?\nHi,\n\nCan any one tell me how to set file lastModifiedTime after copying files through FTP. I am using commons-net-1.4.1.jar to copy files from local system to server.\n\nEg: local file name “test.doc” (Today, December 29, 2009, 5:09:33 PM) when I moving this file to server, the files are moved successfully but the time is updated as server current time. But I need local file time like (Today, December 29, 2009, 5:09:33 PM). Below code I am using for uploading files to server.\n\nCan any one please help me to overcome this issue?",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/336883/java/Scroll-Pane-visible-Frame-window",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI have a class extending from JFrame. I created a JPanel and created a JscrollPane like foll..\n\npanelInput=new JPanel(); scrollPane = new JScrollPane(panelInput); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); getContentPane().add(scrollPane); The scrollpane is not visible when i execute the program..what may be happened?? any help??\n\nWelcome to the Ranch visu. No problem at all. Call setSize and setVisible on the parent container. [ November 23, 2003: Message edited by: Jose Botella ]",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/692168/java/Kafka-certification",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nChris Mathews wrote:Confluent (most prominent Kafka vendor) has a certification: https://www.confluent.io/certification\n\n Thanks Chris! \n Yeah, I looked into confluent, but that does not give any idea about any existing certifications stuffs. \n Tim, \n I can definitely read few books to master up. I do understand that. \n But just to have a certification on the resume definitely adds value to my profile is what I felt and hence posted that question. \n Infact, I gain most of the know-hows either while working or while trying to prepare for some certification. \n Thanks!\n> \n\nChris Mathews wrote:Confluent (most prominent Kafka vendor) has a certification: https://www.confluent.io/certification\n\nThanks Chris!\n\nYeah, I looked into confluent, but that does not give any idea about any existing certifications stuffs.\n\nTim,\n\nI can definitely read few books to master up. I do understand that.\n\nBut just to have a certification on the resume definitely adds value to my profile is what I felt and hence posted that question.\n\nInfact, I gain most of the know-hows either while working or while trying to prepare for some certification.\n\nThanks!",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/615041/build-tools/variable-calculated",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nRun this from a command line in you basedir and post the result: mvn dependency:tree Most likely some other dependency is also referencing the same dependency and Maven is choosing the non-snapshot version over the snapshot version. The other thing you can do is run mvn with the -v option, redirect the output to a file and examine it looking for reference to that dependency to see how Maven is going about choosing a version to use.\n\nRun this from a command line in you basedir and post the result:\n\nmvn dependency:tree\n\nMost likely some other dependency is also referencing the same dependency and\n\nMaven\nis choosing the non-snapshot version over the snapshot version.\n\nThe other thing you can do is run mvn with the -v option, redirect the output to a file and examine it looking for reference to that dependency to see how Maven is going about choosing a version to use.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/36660/typical-programmer-personality",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nAssociate Instructor - Hofstra University\n\nAmazon Top 750 reviewer - Blog - Unresolved References - Book Review BlogMake visible what, without you, might perhaps never have been seen.\n\n- Robert Bresson\n\"JavaRanch, where the deer and the Certified play\" - David O'Meara\n\n-Surfing the JavaRanch in a sunny garden with a cold drink and laptop can't be beat. by Frank Carver(sheriff)\n\nMatthew Phillips\n\nPourquoi voulez-vous mon nom?\n\n> \n\nOriginally posted by Michael Ernest:\n\nWho on JavaRanch would think Map is an introvert?Uncontrolled vocabularies\n\n\"I try my best to make *all* my posts nice, even when I feel upset\" -- Philippe MaquetMake visible what, without you, might perhaps never have been seen.\n\n- Robert Bresson\nPounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.\n\nSCJP\n\nVisit my download page\nJason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href=\"http://alia.iwarp.com\" target=\"_blank\" rel=\"nofollow\">http://alia.iwarp.com</a>\n\nAshik Uzzaman\n\nDirector of Engineering, Twin Health, Mountain View, CA, USAUncontrolled vocabularies\n\n\"I try my best to make *all* my posts nice, even when I feel upset\" -- Philippe MaquetTake a Minute, Donate an Hour, Change a Life\n\nhttp://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81> \n\nOriginally posted by Axel Janssen:\n\nLike your explanation about introvert Map. If you write a book \"Interesting things from various topics\" I would buy.Uncontrolled vocabularies\n\n\"I try my best to make *all* my posts nice, even when I feel upset\" -- Philippe MaquetUncontrolled vocabularies\n\n\"I try my best to make *all* my posts nice, even when I feel upset\" -- Philippe Maquet\nWhat's a year in metric? Do you know this metric stuff tiny ad?We need your help - Coderanch server fundraiser https://coderanch.com/wiki/782867/Coderanch-server-fundraiser",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/476133/java/JSF-Error",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I am trying to run following JSF hello world simple example. I am getting following error when i run the application on server at index page as following my index.jsp code is HelloWorld.jsf code looks like HelloWorldBean code looks like Web.xml looks like How can I resolve above error. Any ideas, suggestions, sample code, resources highly appreciated. Thanks in advance\n\nHi,\n\nI am trying to run following\n\nJSF\nhello world simple example. I am getting following error when i run the application on server at index page as following\n\nmy index.jsp code is\n\nHelloWorld.jsf code looks like\n\nHelloWorldBean code looks like\n\nWeb.xml looks like\n\nHow can I resolve above error. Any ideas, suggestions, sample code, resources highly appreciated. Thanks in advance",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/401280/java/java/run-simple-class-method",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi Folks, I work with a product that requires jdk 1.3. Yet I also need to use jdk 1.4 for other work. I've had jdk 1.3 installed and working fine. I downloaded the 1.4 jdk from sun and installed it. I created a simple hello world app that uses a String split() method in it to confirm that 1.4 is working. I'm able to compile the class ok, but when I run it I get a NoSuchMethodError on the line calling split(). I've set my classpath to have the jdk1.4 before my 1.3 jdk and after. I've taken the 1.3 jdk line out altogether, but nothing seems to work. Any ideas would be greatly appreciated, thanks.\n\nHi Folks,\n\nI work with a product that requires jdk 1.3. Yet I also need to use jdk 1.4 for other work. I've had jdk 1.3 installed and working fine. I downloaded the 1.4 jdk from sun and installed it. I created a simple hello world app that uses a\n\nString\nsplit() method in it to confirm that 1.4 is working. I'm able to compile the class ok, but when I run it I get a NoSuchMethodError on the line calling split(). I've set my classpath to have the jdk1.4 before my 1.3 jdk and after. I've taken the 1.3 jdk line out altogether, but nothing seems to work. Any ideas would be greatly appreciated, thanks.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/194379/certification/SCJP-Exam-Guess",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nDear friends, In Marcus's tutorial you can see notes(to objectives) like these: \" The 1.1 objective seemed to make more sense in that they...... I have a feeling that they did not re- write every question in the bank to match the new objectives so you will get similar questions for the Java2 exam.\"(Thanks Mr.Green) Now I guess (guessing only) the whole question bank would have been written strictly as per the Java2 objectives. So before writing the exam go through the objectives(word by word) and see that you have covered everything. Hope it helps you all friends. ------------------\n\nDear friends,\n\nIn Marcus's tutorial you can see notes(to objectives)\n\nlike these:\n\n\" The 1.1 objective seemed\n\nto make more sense in that they......\n\nI have a feeling that they did not re-\n\nwrite every question in the bank to match\n\nthe new objectives so you will get similar\n\nquestions for the Java2 exam.\"(Thanks Mr.Green)\n\nNow I guess (guessing only) the whole question bank would have been\n\nwritten strictly as per the Java2 objectives.\n\nSo before writing the exam go through the objectives(\n\nword\nby word)\n\nand see that you have covered everything.\n\nHope it helps you all friends.\n\n------------------",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/591623/Aspose-Newsletter-September-Edition",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nAspose Newsletter for September 2012 has now been published that highlights all the newly supported features offered in the recent releases of its JasperReports exporters, SQL Server rendering extensions, .NET, Java & SharePoint components. This month’s technical article shows recognizing Barcodes in PDFs with Aspose.Pdf & Aspose.BarCode. A migration tip for Adding Tasks to Projects with Aspose.Tasks for .NET vs VSTO & video tutorial shows How to create Mail Merge template for use in Aspose.Words. Aspose New Ventures Aspose has developed a number of different tools that help us work and communicate more effectively within the company. We have decided to share some of these tools. Our new ventures, Saaspose, GroupDocs, Codeporting and Banckle, give developers and individuals access to the products that we use the most. Visitors to Aspose.com are probably already familiar with Banckle, the venture that provides the website’s Live Chat feature, as well as other collaborative tools. Developers working in the cloud benefit from Saaspose, cloud-based file management APIs based on Aspose’s most popular products. Codeporting is also aimed at developers and helps port .NET code to Java. GroupDocs is a suite of online document management tools and APIs aimed at professionals who need to sign, convert, assemble and collaborate on documents. Click to View complete details about Aspose’s New Ventures . Product Spotlight: Aspose.Cells Aspose.Cells for .NET and Aspose.Cells for Java gives you control of Microsoft Excel spreadsheets so that you can work with them easily in your applications. Open, read, save and create spreadsheets, add or remove data, control formatting, work with charts and drawings, control formulas, add pivot tables and much more. The easy-to-use APIs saves time and effort by giving you access to our file format expertise. We also have Aspose.Cells available for SharePoint, SQL Server Reporting Services and JasperReports so that you can output files to native Microsoft Excel formats. Click here to view complete details about Aspose.Cells Product Family . Technical Article – Recognize Barcodes in PDFs with Aspose.Pdf and Aspose.BarCode Aspose.Pdf for .NET works with our other .NET components to provide powerful document management features. Several of our customers embed barcodes into PDF files and then need to be able to read those barcodes. We have a technical article that explains how to use Aspose.Pdf with Aspose.BarCode to perform this task. Click below to read the complete article about ecognize Barcodes in PDFs with with Aspose.Pdf and Aspose.BarCode. Updates about new product releases - Aspose.Total for .NET - a compilation of our latest .NET products. - Aspose.Cells for .NET v7.3.1 - improvements to conditional formatting, HTLM and PDF output and various fixes. - Aspose.Words for .NET - our monthly Aspose.Words release. - Aspose.Pdf for .NET 7.2.0 - adds support for extended form fill-in and save in Acrobat Reader, list of imported fields and a number of fixes. - Aspose.Slides for .NET 6.5.0 - set gap width and depth in 3D column charts, and a number of fixes. - Aspose.Imaging for .NET 1.7.0 - flip GIF files and scale GIF and TIFF files. - Aspose.BarCode for .NET 5.0.0 - support for Database Expanded generation and improved Code128 recognition. - Aspose.Diagram for .NET 2.5.0 - render diagram to SWF, with or without SWF viewer. - Aspose.Tasks for .NET 4.5.0 - write updated data back to MPPs. - Aspose.Email for .NET 1.9.0 - adds a number of enhancements that improves stability. - Aspose.Total for Java - a compilation of our latest Java products. - Aspose.Cells for Java 7.3.1 - improvements to conditional formatting, HTLM and PDF output and various fixes. - Aspose.Words for Java - our monthly Aspose.Words release. - Aspose.Slides for Java 2.9.6 - various fixes that improves rendering and output issues. - Aspose.BarCode for Java 4.5.1 - a maintenance release that improves cross-product interactions.. - Aspose.Email for Java 2.0.0 - create standard folders in PST files, check if PST is Unicode or ASCII and a number of improvements and fixes. - Aspose.Total for SharePoint - a compilation of our latest SharePoint products. - Aspose.Words for SharePoint 2.6.0 - improved EMF rendering, support for embedded EMF+ rendering, support for hidden rows and a number of other improvements. - Aspose.Slides for SharePoint 1.2.0 - adds user interface elements for a slide viewer. - Aspose.Pdf for SharePoint 1.5.0 - add a barcode to PDF files in a document library. - Aspose.Total for Reporting Services 3.5.0 - a compilation of our latest Reporting Services products. - Aspose.Slides for SSRS 4.4.0 - display Aspose.Slides export option in ReportViewer 2010 and a couple of fixes. - Aspose.BarCode for SSRS 5.0.0 - support for Database OmniDirectional, Limited and Expanded generation, and Code32 (Pharmacode). - Aspose.Total for JasperReports - a compilation of our latest JasperReports products. - Aspose.BarCode for JasperReports 1.6.0 - supports ITF6 generation and automatic checksum calculation for ITF14. Tutorial Video – How to Create a Mail Merge Template for use in Aspose.Words for .NET Aspose.Words for .NET helps developers automate a lot of document activities, for example mail merges. Before performing a mail merge, you need to add fields to a template which is then populated from a data source. The mail merge process helps you create large runs of letters, contracts, reports and so on. We have a tutorial video that shows you how to prepare a mail merge template. Click here to watch Video Migration Tip – Adding Tasks to Projects with Aspose.Tasks for .NET vs VSTO Aspose.Tasks for .NET lets developers work with Microsoft Project files directly, independently of Microsoft Office Automation. Aspose.Tasks gives you the power to create, open and manipulate project files. A crucial activity when working with projects is adding tasks. Aspose.Tasks and VSTO both lets you do this and we have an article that shows how the two approaches differ. Read the complete migration tip about Adding Tasks to Projects with Aspose.Tasks vs VSTO Collect your copy of Aspose Newsletter, September 2012 edition – Collect the English version of this newsletter. – Collect the Japanese version of this newsletter. Keep in Touch There are several ways for you to keep in touch with us. The monthly newsletter is a way for us to keep in touch with you, but we are always interested in hearing from you. - Post a question on our forums - Connect with us on Post a question on our Facebook Contact Information Aspose Pty Ltd Suite 163, 79 Longueville Road Lane Cove, NSW, 2066 Australia Aspose - Your File Format Experts [email protected] Phone: 888.277.6734 Fax: 866.810.9465\n\nhas now been published that highlights all the newly supported features offered in the recent releases of its JasperReports exporters, SQL Server rendering extensions, .NET,\n\nJava\n& SharePoint components. This month’s technical article shows recognizing Barcodes in PDFs with Aspose.Pdf & Aspose.BarCode. A migration tip for Adding Tasks to Projects with Aspose.Tasks for .NET vs VSTO & video tutorial shows How to create Mail Merge template for use in Aspose.Words.\n\nAspose New Ventures\nAspose has developed a number of different tools that help us work and communicate more effectively within the company. We have decided to share some of these tools. Our new ventures, Saaspose, GroupDocs, Codeporting and Banckle, give developers and individuals access to the products that we use the most. Visitors to Aspose.com are probably already familiar with Banckle, the venture that provides the website’s Live Chat feature, as well as other collaborative tools. Developers working in the cloud benefit from Saaspose, cloud-based file management APIs based on Aspose’s most popular products. Codeporting is also aimed at developers and helps port .NET code to Java. GroupDocs is a suite of online document management tools and APIs aimed at professionals who need to sign, convert, assemble and collaborate on documents. Click to View complete details about\n\nAspose’s New Ventures\n.\n\nProduct Spotlight: Aspose.Cells\nAspose.Cells for .NET and Aspose.Cells for Java gives you control of Microsoft Excel spreadsheets so that you can work with them easily in your applications. Open, read, save and create spreadsheets, add or remove data, control formatting, work with charts and drawings, control formulas, add pivot tables and much more. The easy-to-use APIs saves time and effort by giving you access to our file format expertise. We also have Aspose.Cells available for SharePoint, SQL Server Reporting Services and JasperReports so that you can output files to native Microsoft Excel formats. Click here to view complete details about\n\nAspose.Cells Product Family\n.\n\nTechnical Article – Recognize Barcodes in PDFs with Aspose.Pdf and Aspose.BarCode\nAspose.Pdf for .NET works with our other .NET components to provide powerful document management features. Several of our customers embed barcodes into PDF files and then need to be able to read those barcodes. We have a technical article that explains how to use Aspose.Pdf with Aspose.BarCode to perform this task. Click below to read the complete article about\n\necognize Barcodes in PDFs\nwith with Aspose.Pdf and Aspose.BarCode.\n\nUpdates about new product releases - Aspose.Total for .NET\n- a compilation of our latest .NET products.\n\n- Aspose.Cells for .NET\nv7.3.1 - improvements to conditional formatting, HTLM and PDF output and various fixes.\n\n- Aspose.Words for .NET\n- our monthly Aspose.Words release.\n\n- Aspose.Pdf for .NET\n7.2.0 - adds support for extended form fill-in and save in Acrobat Reader, list of imported fields and a number of fixes.\n\n- Aspose.Slides for .NET\n6.5.0 - set gap width and depth in 3D column charts, and a number of fixes.\n\n- Aspose.Imaging for .NET\n1.7.0 - flip GIF files and scale GIF and TIFF files.\n\n- Aspose.BarCode for .NET\n5.0.0 - support for Database Expanded generation and improved Code128 recognition.\n\n- Aspose.Diagram for .NET\n2.5.0 - render diagram to SWF, with or without SWF viewer.\n\n- Aspose.Tasks for .NET\n4.5.0 - write updated data back to MPPs.\n\n- Aspose.Email for .NET\n1.9.0 - adds a number of enhancements that improves stability.\n\n- Aspose.Total for Java\n- a compilation of our latest Java products.\n\n- Aspose.Cells for Java\n7.3.1 - improvements to conditional formatting, HTLM and PDF output and various fixes.\n\n- Aspose.Words for Java\n- our monthly Aspose.Words release.\n\n- Aspose.Slides for Java\n2.9.6 - various fixes that improves rendering and output issues.\n\n- Aspose.BarCode for Java\n4.5.1 - a maintenance release that improves cross-product interactions..\n\n- Aspose.Email for Java\n2.0.0 - create standard folders in PST files, check if PST is Unicode or ASCII and a number of improvements and fixes.\n\n- Aspose.Total for SharePoint\n- a compilation of our latest SharePoint products.\n\n- Aspose.Words for SharePoint\n2.6.0 - improved EMF rendering, support for embedded EMF+ rendering, support for hidden rows and a number of other improvements.\n\n- Aspose.Slides for SharePoint\n1.2.0 - adds user interface elements for a slide viewer.\n\n- Aspose.Pdf for SharePoint\n1.5.0 - add a barcode to PDF files in a document library.\n\n- Aspose.Total for Reporting Services\n3.5.0 - a compilation of our latest Reporting Services products.\n\n- Aspose.Slides for SSRS\n4.4.0 - display Aspose.Slides export option in ReportViewer 2010 and a couple of fixes.\n\n- Aspose.BarCode for SSRS\n5.0.0 - support for Database OmniDirectional, Limited and Expanded generation, and Code32 (Pharmacode).\n\n- Aspose.Total for JasperReports\n- a compilation of our latest JasperReports products.\n\n- Aspose.BarCode for JasperReports\n1.6.0 - supports ITF6 generation and automatic checksum calculation for ITF14.\n\nTutorial Video – How to Create a Mail Merge Template for use in Aspose.Words for .NET\nAspose.Words for .NET helps developers automate a lot of document activities, for example mail merges. Before performing a mail merge, you need to add fields to a template which is then populated from a data source. The mail merge process helps you create large runs of letters, contracts, reports and so on. We have a tutorial video that shows you how to prepare a mail merge template. Click here to\n\nwatch Video Migration Tip – Adding Tasks to Projects with Aspose.Tasks for .NET vs VSTO\nAspose.Tasks for .NET lets developers work with Microsoft Project files directly, independently of Microsoft Office Automation. Aspose.Tasks gives you the power to create, open and manipulate project files. A crucial activity when working with projects is adding tasks. Aspose.Tasks and VSTO both lets you do this and we have an article that shows how the two approaches differ. Read the complete migration tip about\n\nAdding Tasks to Projects with Aspose.Tasks vs VSTO Collect your copy of Aspose Newsletter, September 2012 edition –\nCollect the\n\nEnglish version\nof this newsletter.\n\n–\nCollect the\n\nJapanese version\nof this newsletter.\n\nKeep in Touch\nThere are several ways for you to keep in touch with us. The monthly newsletter is a way for us to keep in touch with you, but we are always interested in hearing from you.\n\n- Post a question on our\n\nforums\n- Connect with us on Post a question on our\n\nFacebook Contact Information\nAspose Pty Ltd\n\nSuite 163, 79 Longueville Road\n\nLane Cove, NSW, 2066\n\nAustralia\n\nAspose - Your File Format Experts [email protected]\nPhone: 888.277.6734\n\nFax: 866.810.9465",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/u/375037/Koen-Ursem",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\n> \n\nSam Peterson wrote:\n\nAlso, since we still have the R3 object that's not eligible for garbage collection at the end of this program, what is the lifespan of that object and the two reference variable after the program finishes?> \n\nDaniel Demesmaecker wrote:I you have a seperate class for your courses who have enrolled students in them it's not enough to pass only the student. You have to create an array who keeps track of the course and the enrolled students (I would use a hashmap).\n\nso you have to pass both student and course, then in the function looping the hasmap searching for the course and adding the student, but the way I descriped before is way easier.> \n\nJunilu Lacar wrote:\n\nKoen Ursem wrote:My guess is either your current app location is read with single backlashes where there is a '\\u' in the path name from a folder or file starting with a 'u'. Or there is a property in one of the config files that points to a folder with a occurrence of '\\u' like '\\user' in the path.\n\nThat is a very good guess. In fact, it's what I would call an \"informed and highly-probable guess.\" Way to think outside the box, Koen! In fact, I'm giving you some Thanksgiving Pie for it, even if it doesn't pan out (which I think it will).\n\n@OP: If you can run the grep command, use it check if your properties file contains \"\\u\" at all. On Windows, I believe the equivalent command is \"findstr\", at least according to what Google tells me.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/u/94121/Vengan-Krish",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi Vishwa, 1. How can a <servlet-name> tag in a filter definition contain an url-pattern? Is it not supposed to contain the name of the servlet to which the filter applies? Your initial posting has a mistake. Filter 2 mapping has <servlet-name> in the HFS book, not <url-pattern>. 2. The url-pattern /* (the last one) is defined as the last. So this filter would be included in every request but only as the LAST!. Isn't it? No. Here is the filter spec in the DD in a matrix. DD <url-pattern> DD <servlet-name> Filter 1 /Recipes/* - Filter 2 - /Recipes/HopsList.do Filter 3 /Recipes/Add/* - Filter 4 - /Recipes/Modify/ModRecipes.do Filter 5 /* - Let's say we get a request URL /Recipes/HopsList.do. Applying rule 1, Container goes thro' the <url-pattern> column looking for match. Filter 1 and 5 match. Applying rule 2, Container goes thro' the <servlet-name> column. Filter 2 match. So the order is 1 5 2. Isn't it straightforward ? Makes sense?\nHi Vishwa,\n\n1. How can a <servlet-name> tag in a filter definition contain an url-pattern? Is it not supposed to contain the name of the servlet to which the filter applies?\n\nYour initial posting has a mistake. Filter 2 mapping has <servlet-name> in the HFS book, not <url-pattern>.\n\n2. The url-pattern /* (the last one) is defined as the last. So this filter would be included in every request but only as the LAST!. Isn't it?\n\nNo.\n\nHere is the filter spec in the DD in a matrix.\n\nDD <url-pattern> DD <servlet-name>\n\nFilter 1 /Recipes/* -\n\nFilter 2 - /Recipes/HopsList.do\n\nFilter 3 /Recipes/Add/* -\n\nFilter 4 - /Recipes/Modify/ModRecipes.do\n\nFilter 5 /* -\n\nLet's say we get a request URL /Recipes/HopsList.do.\n\nApplying rule 1, Container goes thro' the <url-pattern> column looking for match. Filter 1 and 5 match.\n\nApplying rule 2, Container goes thro' the <servlet-name> column. Filter 2 match.\n\nSo the order is 1 5 2. Isn't it straightforward ?\n\nMakes sense?",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/58056/frameworks/Struts-Action-Form",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi All, I have a general question about the action forms. Suppose i have an action which builds up a form by setting its properties and then it forwards the control to a JSP which uses the same form. But i have kept the form in the request scope. So would i be able to retrieve the set values from the action class.? Please help Saurav\n\nHi All,\n\nI have a general question about the action forms.\n\nSuppose i have an action which builds up a form by setting its properties and then it forwards the control to a\n\nJSP\nwhich uses the same form.\n\nBut i have kept the form in the request scope.\n\nSo would i be able to retrieve the set values from the action class.?\n\nPlease help\n\nSaurav",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/399402/java/java/String-double-quotes",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nSegal: Expanding on Mark's comment, in Java, a string literal is represented in a program's source code by enclosing the desired string within quotes. In the compiled version of the program, a String object is created that corresponds to that string literal. This object does not include the quotes. For example, consider this line: Here, \"a test string\" is a string literal. However, what str refers at runtime will be a String object that contains the characters a test string. It will not include quotes. Thus, a quoted string is simply a source code mechanism.\n\nSegal:\n\nExpanding on Mark's comment, in Java, a\n\nstring literal\nis represented in a program's\n\nsource code\nby enclosing the desired string within quotes. In the compiled version of the program, a\n\nString\nobject is created that corresponds to that string literal. This object\n\ndoes not\ninclude the quotes.\n\nFor example, consider this line:\n\nHere, \"a\n\ntest\nstring\" is a string literal. However, what\n\nstr\nrefers at runtime will be a\n\nString\nobject that contains the characters\n\na test string\n. It will not include quotes. Thus, a quoted string is simply a source code mechanism.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/466134/java/java/HashTable-null-values",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nAs we know that Hashtable does not allow null values as keys and values,Kindly tell me why they made the implementation like that other than Hashmap which allows null\n\n\"numm value\"? Please take the time to proof-read your posts.\n\nOf what utility would they be? Null values would be indistinguishable from missing values except during iteration, and of what use would a null key be?\n\nI want the reason behind that why they made to allow null values in hashmap i had gone through the API that while putting they are going to check the null values.\n\nI think the more important question is: why would you NOT want to allow null keys and values? Using null values for defaults (if there is no value for a non-null key, check the value for the null key) isn't uncommon. If you want to disallow them, use Collections.checkedMap - that one forbids null as well.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/656033/Android/mobile/Developing-Indoor-Navigation-App",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nThank you for your reply! Yes, ive read that link. I think GPS wont be enough to locate the user inside the school, as our school has 3 floors, which makes it pretty hard for the signals to come trough correctly. \n\n Right, only military grade gps-like chipsets and devices, sometimes using classified satellites, can accomplish that and it doesn't work if the building is lead shielded although I don't think your school would be. Forget about it for a typical Android device. \n\n Do you have any \"tutorial\" on how to write code for locating the user with other techniques ? Like, triangulation for example ? \n\n Not really, but you seem on the right track. Choose the technique (algorithm) e.g. triangulation etc.. you are going to use before looking for code. \n\n EDIT:: Im starting on my application now and I wonder how I should mark the map with the coordinates ? I guess this is my problem now lol\n\n The sky is the limit, you could have a 0,0,0 point in the middle of the school second floor or find out your school accurate elevation and longitude/latitude and map based on that. I would probably choose the latter. \n The main challenge that I see is that I assume you won't have control over the Android devices. It would be much easier if you provided the devices to the users. You are basically left with triangulation based on the different Wi-Fi access points in your school given their signal strength. I don't even know if the Android devices would be able to handle that. \n Another option would be a facial recognition-like program where the user would point his Android device camera to a barcode-like sign on the wall to let the application know where the user is. Edit: using that, you wouldn't even need and accurate positioning system. You would only need a high-level knowledge of the school layout, more like a human mind would do. \n Let us know what you come up with please,\n> \n\nThank you for your reply!\n\nYes, ive read that link.\n\nI think GPS wont be enough to locate the user inside the school, as our school has 3 floors, which makes it pretty hard for the signals to come trough correctly.\nRight, only military grade gps-like chipsets and devices, sometimes using classified satellites, can accomplish that and it doesn't work if the building is lead shielded although I don't think your school would be. Forget about it for a typical Android device.\n\n> \n\nDo you have any \"tutorial\" on how to write code for locating the user with other techniques ? Like, triangulation for example ?\nNot really, but you seem on the right track. Choose the technique (algorithm) e.g. triangulation etc.. you are going to use before looking for code.\n\n> \n\nEDIT::\n\nIm starting on my application now and I wonder how I should mark the map with the coordinates ? I guess this is my problem now lol\nThe sky is the limit, you could have a 0,0,0 point in the middle of the school second floor or find out your school accurate elevation and longitude/latitude and map based on that. I would probably choose the latter.\n\nThe main challenge that I see is that I assume you won't have control over the Android devices. It would be much easier if you provided the devices to the users. You are basically left with triangulation based on the different Wi-Fi access points in your school given their signal strength. I don't even know if the Android devices would be able to handle that.\n\nAnother option would be a facial recognition-like program where the user would point his Android device camera to a barcode-like sign on the wall to let the application know where the user is. Edit: using that, you wouldn't even need and accurate positioning system. You would only need a high-level knowledge of the school layout, more like a human mind would do.\n\nLet us know what you come up with please,",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/275833/java-io/java/GZIPOutputStream-size-compressed-data",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 22 years agoHello, I compress data using GZIPOutputStream. Is there any way to find out the size of the compressed data? here is what I do sb ( StringBuffer )has some data... GZIPOutputStream gzos = new GZIPOutputStream(response.getOutputStream()); gzos.write(sb.toString().getBytes()); gzos.close(); Kindly let me know.. I need to find out how good the compression is.. Ram\nHello,\n\nI compress data using GZIPOutputStream. Is there any way to find out the size of the compressed data?\n\nhere is what I do\n\nsb ( StringBuffer )has some data...\n\nGZIPOutputStream gzos =\n\nnew GZIPOutputStream(response.getOutputStream());\n\ngzos.write(sb.toString().getBytes());\n\ngzos.close();\n\nKindly let me know.. I need to find out how good the compression is..\n\nRam",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/166178/java-Web-Component-OCEJWCD/certification/SCWCD-worth",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nWhat were your reasons when you got your SCJP? I think skills/experience is the one that is finally going to speak for you. Being certified, just gives the added comfort that somebody will actually pickup your resume for futher consideration. Good luck. Looks like you might breeze thru this test. Is it the cost or the process that is making you consider its worth ? Rama\n\nWhat were your reasons when you got your SCJP?\n\nI think skills/experience is the one that is finally going to speak for you.\n\nBeing certified, just gives the added comfort that somebody will actually pickup your resume for futher consideration.\n\nGood luck.\n\nLooks like you might breeze thru this\n\ntest\n.\n\nIs it the cost or the process that is making you consider its worth ?\n\nRama",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/477483/JSP/java/Auto-login-Page",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 15 years agoThank you paul . I found the script with respect to this requirement . But please tell me how this particular line can be useful in this ?? Calling a Javascript function on a checkbox (Remember Me) on to the form . But can you please tell me what is the meaning of this line with so many parameters cookie.setMaxAge(365 * 24 * 60 * 60); Thanks . Save India From Corruption - Anna Hazare.\nThank you paul .\n\nI found the script with respect to this requirement .\n\nBut please tell me how this particular line can be useful in this ??\n\nCalling a Javascript function on a checkbox (Remember Me) on to the form .\n\nBut can you please tell me what is the meaning of this line with so many parameters cookie.setMaxAge(365 * 24 * 60 * 60);\n\nThanks .Save India From Corruption - Anna Hazare.\n\nSave India From Corruption - Anna Hazare.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/591466/Web-Services/java/hyperlink-working",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI use Tomcat + perl cgi to write a website. The cgi activates a server code in language C. The C process and generate a zip file for the user. A file is different for different users. Here is the problem. The site is working. cgi accepts user's input with method POST but the hyperlink is not working. I am not sure if there is some descriptor or something I don't know that I didn't do. Anyone has any idea? Sharon\n\nI use\n\nTomcat\n+ perl cgi to write a website. The cgi activates a server code in language C. The C process and generate a zip file for the user. A file is different for different users.\n\nHere is the problem. The site is working. cgi accepts user's input with method POST but the hyperlink is not working. I am not sure if there is some descriptor or something I don't know that I didn't do. Anyone has any idea?\n\nSharon",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/528562/XML/Jing",
"domain": "coderanch.com",
"file_source": "part-00559-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nThese three ingredients would suffice to get validation going for relax ng schema. \n [1] Add jing.jar to the classpath. That probably is what everybody would do at the first instance. \n [2] Then this is crucial. Let the system knows the whereabout of the schema validating engine for the purpose. \n [2.1] If the rng schema is written in compact syntax, do this. \n\n 1\n 2\n\n System.setProperty(SchemaFactory.\n class\n .getName()+\n \":\"\n +XMLConstants.RELAXNG_NS_URI,\n\n \"com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory\"\n );\n\n [2.2] If the rng schema is written in xml syntax, do this instead. \n\n 1\n 2\n\n System.setProperty(SchemaFactory.\n class\n .getName()+\n \":\"\n +XMLConstants.RELAXNG_NS_URI,\n\n \"com.thaiopensource.relaxng.jaxp.XMLSyntaxSchemaFactory\"\n );\n\n [3] Instantiate the schema factory for relax ng explicitly. \n\n 1\n\n SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);\n\n With the above, it should be ready to do the validation as what we would proceed with wxsl, not much difference.\n\nThese three ingredients would suffice to get validation going for relax ng schema.\n\n[1] Add jing.jar to the classpath. That probably is what everybody would do at the first instance.\n\n[2] Then this is crucial. Let the system knows the whereabout of the schema validating engine for the purpose.\n\n[2.1] If the rng schema is written in compact syntax, do this.\n\n1\n 2\n\n System.setProperty(SchemaFactory.\n class\n .getName()+\n \":\"\n +XMLConstants.RELAXNG_NS_URI,\n\n \"com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory\"\n );\n1\n 2\n\n System.setProperty(SchemaFactory.\n class\n .getName()+\n \":\"\n +XMLConstants.RELAXNG_NS_URI,\n\n \"com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory\"\n );\n\n| | |\n| --- | --- |\n\n[2.2] If the rng schema is written in xml syntax, do this instead.\n\n1\n 2\n\n System.setProperty(SchemaFactory.\n class\n .getName()+\n \":\"\n +XMLConstants.RELAXNG_NS_URI,\n\n \"com.thaiopensource.relaxng.jaxp.XMLSyntaxSchemaFactory\"\n );\n1\n 2\n\n System.setProperty(SchemaFactory.\n class\n .getName()+\n \":\"\n +XMLConstants.RELAXNG_NS_URI,\n\n \"com.thaiopensource.relaxng.jaxp.XMLSyntaxSchemaFactory\"\n );\n\n| | |\n| --- | --- |\n\n[3] Instantiate the schema factory for relax ng explicitly.\n\n1\n\n SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);\n1\n\n SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);\n\n| | |\n| --- | --- |\n\nWith the above, it should be ready to do the validation as what we would proceed with wxsl, not much difference.",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/266594/certification/PGJC-mock-exam",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nOriginally posted by Meher Parveen: The answer has to be A. If the object obj has been instantiated using class B, it will return a true on only 2 checks, those being: obj instanceof B obj instanceof A All other instanceof checks will fail anyways. We cannot choose option B, since an object of class A will also return true for this case! Unfortunately, that's not the right answer. Perhaps this phrasing will help you understand the question better: suppose you know that obj can be an instance of any of A, B, C, or D. How would you write an if statement whose body gets executed only if obj is a B object (and not an A, C, or D)? In other words, how would you fill in the condition below?\n> \nOriginally posted by Meher Parveen:\n\nThe answer has to be A. If the object obj has been instantiated using class B, it will return a true on only 2 checks, those being:\n\nobj instanceof B\n\nobj instanceof A\n\nAll other instanceof checks will fail anyways.\n\nWe cannot choose option B, since an object of class A will also return true for this case!\nUnfortunately, that's not the right answer. Perhaps this phrasing will help you understand the question better: suppose you know that obj can be an instance of any of A, B, C, or D. How would you write an if statement whose body gets executed\n\nonly\nif obj is a B object (and not an A, C, or D)? In other words, how would you fill in the condition below?",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/281667/java/jsp-displayed",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I'm facing the same problem (jsp not fully displayed) and still have not been able to solve it. What I'm doing is to bring into the page a Vector consisting of strings (each about 150 characters long), loop through its elements and print them on the page. The whole Vector is brought OK into the page, I checked it. When the vector contains more than about 35 elements, the page is not fully displayed. Changing the page buffer from its default value (8 kb) to 64 and subsequently 128 kb resulted in nothing at all being displayed in the page and a '500 internal server error' appearing on the browser window. It therefore seems to produce some effect, but I don't know what to make out of it. Whenever the problem occurs, Tomcat complains about an exception in StringTokenizer, which I am using to manipulate the contents of the strings. This suggests some error in the JSP/HTML code; however, if this were the case, wouldn't the error have affected the whole page? After all, I'm doing exactly the same thing to all the strings in the vector. I don't understand how the code could work for the first 30 or so elements and _then_ get stuck. By the way, I also checked the strings for characters like \"<\", \">\" etc. that could possibly interfere with the HTML in the page, but have found none. Also, I tested the page with both IE 6 and Opera 7.11 browsers and they display exactly the same output. Any ideas? Thanks in advance. Constantine\n\nHi,\n\nI'm facing the same problem (jsp not fully displayed) and still have not been able to solve it.\n\nWhat I'm doing is to bring into the page a Vector consisting of strings (each about 150 characters long), loop through its elements and print them on the page. The whole Vector is brought OK into the page, I checked it.\n\nWhen the vector contains more than about 35 elements, the page is not fully displayed.\n\nChanging the page buffer from its default value (8 kb) to 64 and subsequently 128 kb resulted in nothing at all being displayed in the page and a '500 internal server error' appearing on the browser window. It therefore seems to produce some effect, but I don't know what to make out of it.\n\nWhenever the problem occurs,\n\nTomcat\ncomplains about an exception in StringTokenizer, which I am using to manipulate the contents of the strings. This suggests some error in the JSP/HTML code; however, if this were the case, wouldn't the error have affected the whole page? After all, I'm doing exactly the same thing to all the strings in the vector. I don't understand how the code could work for the first 30 or so elements and _then_ get stuck.\n\nBy the way, I also checked the strings for characters like \"<\", \">\" etc. that could possibly interfere with the HTML in the page, but have found none. Also, I tested the page with both IE 6 and Opera 7.11 browsers and they display exactly the same output.\n\nAny ideas?\n\nThanks in advance.\n\nConstantine",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/u/271655/Rahul-Guliani",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nCampbell Ritchie wrote:Try it and see what happens.\n\nCompile time error : \"the local variable 'event' may not have been initialized\"\n\nBut, 'event' is initialized inside try-block, then, why this error? And, if the scope of local variable is within the try-block, then, we've declared event outside try-block, can't we just declare outside try-block and initialize inside try-block?\n\nEdit: So i tried on other blocks than try, like inside for-loop, or some other functional blocks, we have to initialize the local reference variable to NULL, then only we can use that local variable outside the block. Like in the example below :\n\nBut, i'm not getting it why we have to initialize the local variable to NULL, as inside the block the reference of that local variable is ultimately given to some other concrete object. Then, why first we are giving reference to NULL??\n\nP.S.: Sorry for grammatical mistakes, m not a native English speaker ;)\n\nHey! @Campbell can you clear my another doubt :/ it's not related to array or list. Why we declare \"MidiEvent event = null\" outside try bock, why not directly declare n initialize inside try-block as \"MidiEvent event = new MidiEvent(message, tick)\". :/\n\nThanks @Campbell for your response No there is not any difference. But i confused here why in the book they used ArrayList, whereas they could simply use Array. The code would be much simpler. yeah i know ArrayList can grow dynamically, but there is no need to it.\n\nHey! i wrote this code for making a beat-box as written in head first java, instead of using using ArrayList for check-boxes, i applied simple array. Will there be any difference in the final app.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/330340/java/layout-manager",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nhi srilatha, can u tell me how u are going to place the components. i suggest u to use separate panel for combobox, separate panel for label and use vertical layout(avialable free in the net). Add the two panels to an outer panel in east and west.in another panel add the textfield to the center. Add the two buttons in a separate panel using flowlayout.add this panel and textfield panel to another panel in north and south. Add the 2 outer panel to an another outer panel in north and south. Add this panel to the frame in center. If u want the vertical layout class, mail me to this id [email protected] bye. ------------------ sashkamal\n\nhi srilatha,\n\ncan u tell me how u are going to place the components.\n\ni suggest u to use separate panel for combobox, separate panel for label and use vertical layout(avialable free in the net).\n\nAdd the two panels to an outer panel in east and west.in another panel add the textfield to the center.\n\nAdd the two buttons in a separate panel using flowlayout.add this panel and textfield panel to another panel in north and south.\n\nAdd the 2 outer panel to an another outer panel in north and south.\n\nAdd this panel to the frame in center.\n\nIf u want the vertical layout class, mail me to this id\n\n[email protected]\nbye.\n\n------------------\n\nsashkamal",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/266656/certification/locks-threads",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nHi, I am not able to understand this passage from K&B, Can you please help me understand this: Every object in Java has a built-in lock that only comes into play when the object has synchronized method code. When we enter a synchronized non-static method, we automatically acquire the lock associated with the current instance of the class whose code we're executing (the this instance). Acquiring a lock for an object is also known as getting the lock, or locking the object, locking on the object, or synchronizing on the object. Since there is only one lock per object, if one thread has picked up the lock, no other thread can pick up the lock until the first thread releases (or returns) the lock. my understanding is like this..that when a set of statements are to be executed in an atomic manner, except for one thread all other threads should not have access to the atomic section, and so the thread that executes the atomic section(synchronized method) takes up a lock... [ December 10, 2007: Message edited by: Vishwa Nath ] [ December 10, 2007: Message edited by: Vishwa Nath ]\n\nHi,\n\nI am not able to understand this passage from K&B, Can you please help me understand this:\n\n> \nEvery object in Java has a built-in lock\n\nthat only comes into play when the object has synchronized method code. When\n\nwe enter a synchronized non-static method, we automatically acquire the lock\n\nassociated with the current instance of the class whose code we're executing (the\n\nthis instance). Acquiring a lock for an object is also known as getting the lock,\n\nor locking the object, locking on the object, or synchronizing on the object.\n\nSince there is only one lock per object, if one thread has picked up the lock, no\n\nother thread can pick up the lock until the first thread releases (or returns) the lock.\nmy understanding is like this..that when a set of statements are to be executed in an atomic manner, except for one\n\nthread\nall other threads should not have access to the atomic section, and so the thread that executes the atomic section(synchronized method) takes up a lock...\n\n[ December 10, 2007: Message edited by: Vishwa Nath ]\n\n[ December 10, 2007: Message edited by: Vishwa Nath ]",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/48632/Struts/Action-Form-passed-execute-null",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nSearch... FAQs Subscribe Pie FAQs Recent topics Flagged topics Hot topics Best topics Search... Search within Struts Search Coderanch Advance search Google search Register / Login Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums this forum made possible by our volunteer staff, including ... Marshals: Campbell Ritchie Tim Cooke paul wheaton Jeanne Boyarsky Ron McLeod Sheriffs: Paul Clapham Liutauras Vilda Devaka Cooray Saloon Keepers: Tim Holloway Roland Mueller Bartenders: Forum: Struts Action Form being passed to execute is null Brian Quinn Ranch Hand Posts: 32 posted 20 years ago Number of slices to send: Optional 'thank-you' note: Send I have a simple 3 text field form, that I fill in and hit submit. I get null ponter errors when trying to extract the data on the form. I tested the form object that gets passed to the execute() method and it is null. Not sure why that would happen. Junilu Lacar Sheriff Posts: 17734 302 I like... posted 20 years ago Number of slices to send: Optional 'thank-you' note: Send Double check your action mapping and make sure that there is a valid value for the name attribute. You can't have everything. Where would you put it? We need your help - Coderanch server fundraiser https://coderanch.com/wiki/782867/Coderanch-server-fundraiser reply reply Bookmark Topic Watch Topic New Topic Boost this thread! Similar Threads Form Params not passed properly Passed Passed ... :-) .... Passed 88% passed More...",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/348505/java/Ideas",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nWe want to build an Application using JSP and Servlets in Websphere environment. Our application will have about 150 tables. One method we are considering is to have the Servlet as the controlling module, JSP for the presentation. All the business logic will be placed in a bean which will be accessed from JSP. It will be very helpful if you can suggest any other possible methods to implement.\n\nWe want to build an Application using\n\nJSP\nand\n\nServlets\nin Websphere environment.\n\nOur application will have about 150 tables.\n\nOne method we are considering is to have the Servlet as the controlling module, JSP for the presentation. All the business logic will be placed in a bean which will be accessed from JSP.\n\nIt will be very helpful if you can suggest any other possible methods to implement.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/355381/java/Query-Port-Number",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nThere are 2 parts to the answer: 1. General info about use of ports < 1024. In the dim early ages of TCP/IP, it was thought that one way to make systems more secure was to place the \"dangerous\" services in a zone where only an administrative (root) user could use them. Thus, in many OS's, if I found that the main webserver on port 80 wasn't up, I could try, as an ordinary user, to startup a bogus webserver, but my bogus server wouldn't be allowed to start because access to port 80 was denied. A related condition is that since many servers operate in a many-clients/one-server mode, the server port number is fixed so that it can be easily found, but each client is using a (high-numbered) dynamically-assigned port ID. So these ports can be assigned attributes more appropriate to clients. 2. The whole concept of which port number to use is based on convention. When you specify a URL beginning with \"http:\", for example, your computer's resolver knows that unless you specifically supply a port number, Port 80 is the port you mean. This is known as a \"Well-Known Port Number\", and you can find lists of them with any Internet search engine. The Well-Known port is just a convention, however, and (subject to the <1024) rule and whatever firewalls may be in the way) actually any port number can be used. Conventionally, while the main http port is port 80, certain alternative ports are common for secondary servers and test servers. For HTTP, ports 8000, 8008, 8080, and 8180 are popular. Since Tomcat is often paired with Apache, a common configuration is to have Tomcat serve HTTP on port 8080 or 8180 for test and debug purposes, but have Apache forward production requests which were made through port 80. Note that Tomcat, like many servers, is not limited to using only one port. You can add and/or change ports and services in the Tomcat server.xml file.\n\nThere are 2 parts to the answer:\n\n1. General info about use of ports < 1024.\n\nIn the dim early ages of TCP/IP, it was thought that one way to make systems more secure was to place the \"dangerous\" services in a zone where only an administrative (root) user could use them. Thus, in many OS's, if I found that the main webserver on port 80 wasn't up, I could try, as an ordinary user, to startup a bogus webserver, but my bogus server wouldn't be allowed to start because access to port 80 was denied.\n\nA related condition is that since many servers operate in a many-clients/one-server mode, the server port number is fixed so that it can be easily found, but each client is using a (high-numbered) dynamically-assigned port ID. So these ports can be assigned attributes more appropriate to clients.\n\n2. The whole concept of which port number to use is based on convention. When you specify a URL beginning with \"http:\", for example, your computer's resolver knows that unless you specifically supply a port number, Port 80 is the port you mean. This is known as a \"Well-Known Port Number\", and you can find lists of them with any Internet search engine. The Well-Known port is just a convention, however, and (subject to the <1024) rule and whatever firewalls may be in the way) actually any port number can be used.\n\nConventionally, while the main http port is port 80, certain alternative ports are common for secondary servers and\n\ntest\nservers. For HTTP, ports 8000, 8008, 8080, and 8180 are popular. Since Tomcat is often paired with Apache, a common configuration is to have Tomcat serve HTTP on port 8080 or 8180 for test and debug purposes, but have Apache forward production requests which were made through port 80.\n\nNote that Tomcat, like many servers, is not limited to using only one port. You can add and/or change ports and services in the Tomcat server.xml file.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/406721/java/order-classes-loaded",
"domain": "coderanch.com",
"file_source": "part-00317-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI have defined a class Father and another class Son extending Father. They both have static blocks. When creating the first Son-instance always the static block of the Father-class is executed and after that Son's static block. As far as I understand that means that the Class Loader loads the Father-class first and then the Son-class. Right? If so:\n\nWill that always be that way? Is there a specification for the JVM that will garantie such a performance or is it unpredictable in what way classes will be loaded on an arbitrary system?\n\nDear Reader, I guess it follows the hierarchy of the Son object. If 3 extends 2 extends 1.. then static method of 1 will be called first (if any).. and then down the hierarchy.. Not too sure though..\n\nWith Best Regards, Shyam Prasad Murarka\n\nIt's exactly the same and completely different as this tiny ad:",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/401014/java/SE-SDK",
"domain": "coderanch.com",
"file_source": "part-00830-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nposted 19 years agoThanks Paul. I went through few exercises and it worked. I was confused, since the asked me to look for j2SDK1.5.0 directory for setting the PATH env variable to point to \\bin under that. I was working under j2sdk1.4.2_09, I will switch to jdk1.5.0 environment. Thanks, nuj\nThanks Paul. I went through few exercises and it worked. I was confused, since the asked me to look for j2SDK1.5.0 directory for setting the PATH env variable to point to \\bin under that. I was working under j2sdk1.4.2_09, I will switch to jdk1.5.0 environment.\n\nThanks,\n\nnuj",
"content_format": "markdown"
},
{
"url": "https://www.coderanch.com/t/432547/certification/EntityManager-joinTransaction-application-managed-EntityManagers",
"domain": "coderanch.com",
"file_source": "part-00626-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nPage no 46 of \"ejb-3_0-fr-spec-persistence.pdf\" Entity Operaions\n\n/** * Indicate to the EntityManager that a JTA transaction is * active. This method should be called on a JTA application * managed EntityManager that was created outside the scope * of the active transaction to associate it with the current * JTA transaction. * @throws TransactionRequiredException if there is * no transaction. */ public void joinTransaction();\n\nThanks tiny ad, for helping me escape the terrible comfort of this chair.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/609433/Jobs-Offered/careers/hands-training-bangalore-india",
"domain": "coderanch.com",
"file_source": "part-00747-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI need to learn Java web development. Self learning is tiresome and, most training institutes don't deliver developer level training.So, i'm looking for an experienced trainer who can teach Struts along with unit testing. Expectation is to be able to build demo applications (will get to spring and hibernate later) after training. My requirement is thorough hands on training on the following: Struts 2, Junit 4 (automated with ant) In other words, need development training. Location: Bangalore.\n\nI need to learn\n\nJava\nweb development. Self learning is tiresome and, most training institutes don't deliver developer level training.So, i'm looking for an experienced trainer who can teach\n\nStruts\nalong with\n\nunit\ntesting.\n\nExpectation is to be able to build demo applications (will get to spring and hibernate later) after training.\n\nMy requirement is thorough hands on training on the following:\n\nStruts 2,\n\nJunit\n4 (automated with\n\nant\n)\n\nIn other words, need development training.\n\nLocation: Bangalore.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/u/175209/Epifanio-Guzman",
"domain": "coderanch.com",
"file_source": "part-00331-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\n> \n\nDharmenrda kumar wrote:congrates Bro...\n\nnext week i have to also give the exam so will you please tell me what mock test you have given during preparation?\n\nis there any Drag & Drop type question?> \n\nRohit Mehta wrote:As suggested above- 'Spring in Action' is really a good point to start with.\n\nYou can start with one module at a time - like DI, MVC, DAO, Restful Services etc. There are tutorials on net for each of them.\n\nHappy learning.> \n\nJeanne Boyarsky wrote:\n\nWouter Oet wrote:And I copied that straight out of a Wikipedia page. So no guarantee that it is any good.\n\nDid you mean to post something else here? This is all you have and not the wikipedia info.> \n\nMark Spritzler wrote:I like a lot of professional sports athletes.\n\nI think the majority of them should stay in jail....\n\nI appreciate the effort to give information.\n\nbut I really do not understand your point...\n\nthe question is to know about certifications for development with Spring,> \n\nshort called: OCEJEE6JSPSD ;-) with 84%.",
"content_format": "markdown"
},
{
"url": "https://coderanch.com/t/88505/Deploying-Dynamic-file",
"domain": "coderanch.com",
"file_source": "part-00017-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nI have a war file for my application ex. test.war in jboss (dir c:\\jboss) which i put in deploy directory and it works fine. However i need to create a dynamic image file in my application and want to set the location where the image should be copied in my properties file. I suppose it should be possible to create dynamic files in my application. What path/location do i set for dynamic files ? Do i have to update any configuration files.\n\nI have a war file for my application ex. test.war in\n\njboss\n(dir c:\\jboss) which i put in deploy directory and it works fine. However i need to create a dynamic image file in my application and want to set the location where the image should be copied in my properties file.\n\nI suppose it should be possible to create dynamic files in my application. What path/location do i set for dynamic files ? Do i have to update any configuration files.",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/533159/java/java/Unchecked-Exception-Xlint",
"domain": "coderanch.com",
"file_source": "part-00687-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nThat's because List is a generic type, but you aren't using generics. If you change List to List<String> everywhere the warnings will go away. Remember they're only warnings...but you should always use the generic version (unless you have to work with legacy libraries that don't).\n\nThat's because\n\nList\nis a generic type, but you aren't using generics. If you change\n\nList\nto\n\nList<String>\neverywhere the warnings will go away. Remember they're only warnings...but\n\nyou should\nalways use the generic version (unless you have to work with legacy libraries that don't).",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/212553/JSF/java/JSF-IBM-EAD",
"domain": "coderanch.com",
"file_source": "part-00397-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nCan we use both the IBM's EAD4J framework and JSF framework in a single project? Mainly we are trying to use teh capabilities of the JSF in the presentation layer and fit into EAD4J.\n\nIf so what are all the dependencies and limitation we might face.\n\nThanks in Advance...\n\nInr...\n\na fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:",
"content_format": "markdown"
},
{
"url": "http://www.coderanch.com/t/506821/Spring/Spring-security-file-downloads",
"domain": "coderanch.com",
"file_source": "part-00619-d9b45f53-efdc-4ae8-a3e4-b1d5d9e13869-c000",
"content": "# \n\nDate: \nCategories: \nTags: \n\nWe have a Java/Spring application that has a secure area that we allow users to download certain files, if their LDAP entry has the proper role(s). It seems to work just fine - EXCEPT - if you right click and copy the link to the file, then go to another browser session and paste the link into the browser address bar, you get the file download dialog box, as if you are logged in and have been checked for role assignment (even works from an entirely different PC). What is missing from this application that would allow an un-authenticated user to merely copy in a url to the file and be able to download it? BTW - I am not a well versed Java programmer and have never used Spring. I have looked in the Spring in Action book, but many of the things in the security chapter are not in this particular application. I do see some filters and filter mappings in the web.xml (none are the file download directory), and I see some security: intercept-url in the security.xml - and those seem to have the directories in question and proper LDAP role(s) for access. Can someone point me on a trouble-shooting methodology to track down this embarrasing failure in this application? Thanks.\n\nWe have a Java/Spring application that has a secure area that we allow users to download certain files, if their LDAP entry has the proper role(s). It seems to work just fine - EXCEPT - if you right click and copy the link to the file, then go to another browser session and paste the link into the browser address bar, you get the file download dialog box, as if you are logged in and have been checked for role assignment (even works from an entirely different PC). What is missing from this application that would allow an un-authenticated user to merely copy in a url to the file and be able to download it?\n\nBTW - I am not a well versed\n\nJava\nprogrammer and have never used Spring. I have looked in the Spring in Action book, but many of the things in the security chapter are not in this particular application. I do see some filters and filter mappings in the web.xml (none are the file download directory), and I see some security: intercept-url in the security.xml - and those seem to have the directories in question and proper LDAP role(s) for access.\n\nCan someone point me on a trouble-shooting methodology to track down this embarrasing failure in this application? Thanks.",
"content_format": "markdown"
}
] |