<?xml version="1.0" encoding="utf-8" ?><?xml-stylesheet type="text/xsl" href="/build/rss/v963.xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb
									Topics
			Tagged java			
					</title>
		<link>https://www.daniweb.com/tags/java</link>

		<atom:link rel="self" href="https://www.daniweb.com/rss?tag=java" type="application/rss+xml" />				
				
		<description>Discussion forums for IT professionals and programmers.</description>
		<language>en-US</language>
		<copyright>Copyright 2026, DaniWeb LLC</copyright>
		<managingEditor>dani@daniwebmail.com (Dani Wolkowicki)</managingEditor>
		<webMaster>dani@daniwebmail.com (Dani Wolkowicki)</webMaster>
		<docs>https://www.daniweb.com/welcome/api</docs>
		<ttl>60</ttl>
		    		<item>
    			<title>Building Passive Income That Actually Shares the Profits</title>
    			<link>https://www.daniweb.com/programming/threads/545458/building-passive-income-that-actually-shares-the-profits</link>
    			<pubDate>Sat, 12 Sep 2026 04:43:34 +0000</pubDate>
    			<description>Ive been looking for online income that doesnt feel one-sided. Most opportunities keep the majority of the money for the people running them. This one is different  its structured as a 35% profit partnership and focuses on long-term, sustainable value. If youre trying to grow income online in a ...</description>
    			    			<content:encoded><![CDATA[ <p>Ive been looking for online income that doesnt feel one-sided. Most opportunities keep the majority of the money for the people running them. This one is different  its structured as a 35% profit partnership and focuses on long-term, sustainable value. If youre trying to grow income online in a way that benefits everyone involved, this might be worth checking out: bit.ly/4gMvbet</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>mihaicrazy</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/545458/building-passive-income-that-actually-shares-the-profits</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I’m Yelton</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/545411/hi-everyone-i-m-yelton</link>
    			<pubDate>Mon, 31 Aug 2026 08:03:46 +0000</pubDate>
    			<description>Hello everyone, Im new to DaniWeb and wanted to introduce myself. Im interested in Web Development Im mainly here to learn from discussions, share knowledge, and connect with other members. Looking forward to being part of the community!</description>
    			    			<content:encoded><![CDATA[ <p>Hello everyone,</p>&#10;<p>Im new to DaniWeb and wanted to introduce myself.<br>&#10;Im interested in Web Development<br>&#10;Im mainly here to learn from discussions, share knowledge, and connect with other members.</p>&#10;<p>Looking forward to being part of the community!</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>Yelton</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/545411/hi-everyone-i-m-yelton</guid>
    		</item>
    		    		<item>
    			<title>What changes when a software project moves from prototype to production?</title>
    			<link>https://www.daniweb.com/programming/threads/545381/what-changes-when-a-software-project-moves-from-prototype-to-production</link>
    			<pubDate>Tue, 25 Aug 2026 19:48:53 +0000</pubDate>
    			<description>One thing I&#39;ve noticed with software projects is that getting a prototype working is often the easy part. The difficult decisions tend to appear later: architecture, testing, monitoring, security, deployment, technical debt, and making sure the system can handle real users. I&#39;m curious how other developers here approach that transition. ...</description>
    			    			<content:encoded><![CDATA[ <p>One thing I've noticed with software projects is that getting a prototype working is often the easy part. The difficult decisions tend to appear later: architecture, testing, monitoring, security, deployment, technical debt, and making sure the system can handle real users.</p>&#10;<p>I'm curious how other developers here approach that transition. At what point do you start treating a project as production software rather than an experiment?</p>&#10;<p>For example, do you prioritize observability and automated testing early, or wait until the product has proven demand? And how much architecture do you consider necessary before the first version goes live?</p>&#10;<p>I've been looking at how teams such as Software Developers Pro approach this problem, and their emphasis on production engineering rather than stopping at the prototype stage got me thinking about it.</p>&#10;<p>For developers who have taken projects from prototype to production, what was the biggest issue you didn't anticipate?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>wyattlewiiss</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/545381/what-changes-when-a-software-project-moves-from-prototype-to-production</guid>
    		</item>
    		    		<item>
    			<title>MirrorFly vs Chanty: is MirrorFly actually better?</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/545014/mirrorfly-vs-chanty-is-mirrorfly-actually-better</link>
    			<pubDate>Tue, 02 Jun 2026 09:27:28 +0000</pubDate>
    			<description>Hi everyone, I&#39;ve been comparing MirrorFly and Chanty recently, and I&#39;m a bit confused about where each one fits. Chanty seems to be a straightforward team messaging platform, whereas MirrorFly appears to offer more customization and communication APIs. Has anyone here actually used both? Is MirrorFly genuinely better, or is ...</description>
    			    			<content:encoded><![CDATA[ <p>Hi everyone,</p>&#10;<p>I've been comparing MirrorFly and Chanty recently, and I'm a bit confused about where each one fits.</p>&#10;<p>Chanty seems to be a straightforward team messaging platform, whereas MirrorFly appears to offer more customization and communication APIs.</p>&#10;<p>Has anyone here actually used both?</p>&#10;<p>Is MirrorFly genuinely better, or is it only better if you need custom chat, voice, and video features?</p>&#10;<p>Interested to hear what people like (or dislike) about each platform and which one you'd recommend.</p>&#10;<p>Thanks!</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>kathrininfanta</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/545014/mirrorfly-vs-chanty-is-mirrorfly-actually-better</guid>
    		</item>
    		    		<item>
    			<title>Need help with a quote for a SharePoint project</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/544929/need-help-with-a-quote-for-a-sharepoint-project</link>
    			<pubDate>Wed, 13 May 2026 18:58:49 +0000</pubDate>
    			<description>Getting an accurate quote for a SharePoint project depends heavily on clearly defining the scope first. The biggest pricing differences usually come from factors such as the number of users, document migration requirements, workflow automation, integrations with other systems, custom branding, permission structure, and whether youre using SharePoint Online or ...</description>
    			    			<content:encoded><![CDATA[ <p>Getting an accurate quote for a SharePoint project depends heavily on clearly defining the scope first. The biggest pricing differences usually come from factors such as the number of users, document migration requirements, workflow automation, integrations with other systems, custom branding, permission structure, and whether youre using SharePoint Online or on-premises.<br>&#10;If you're preparing requirements or evaluating vendors, it helps to involve someone experienced early in the planning stage. Many companies choose to hire SharePoint consultant resources first to properly scope the architecture, governance, automation, and migration effort before finalising development estimates.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>rocktfr582</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/544929/need-help-with-a-quote-for-a-sharepoint-project</guid>
    		</item>
    		    		<item>
    			<title>I Built a Desktop Multi-Agent System.Conceptually Goes Beyond Codex Desktop</title>
    			<link>https://www.daniweb.com/programming/threads/544786/i-built-a-desktop-multi-agent-system-conceptually-goes-beyond-codex-desktop</link>
    			<pubDate>Mon, 30 Mar 2026 03:24:03 +0000</pubDate>
    			<description>One Person = One Company? I Made It Happen. Just open-sourced a new project: github: https://github.com/golutra/golutra Video demo: https://www.youtube.com/watch?v=KpAgetjYfoY&#38;t=113s With this system, you can create your own AI swarm (agent team) that collaborates automatically to: write code run tasks maintain projects manage content or social media perform role-based workflows produce ...</description>
    			    			<content:encoded><![CDATA[ <p>One Person = One Company? I Made It Happen.<br>&#10;Just open-sourced a new project:</p>&#10;<p>github: <a href="https://github.com/golutra/golutra">https://github.com/golutra/golutra</a><br>&#10;Video demo: <a href="https://www.youtube.com/watch?v=KpAgetjYfoY&amp;t=113s">https://www.youtube.com/watch?v=KpAgetjYfoY&amp;t=113s</a></p>&#10;<p>With this system, you can create your own AI swarm (agent team) that collaborates automatically to:</p>&#10;<p>write code</p>&#10;<p>run tasks</p>&#10;<p>maintain projects</p>&#10;<p>manage content or social media</p>&#10;<p>perform role-based workflows</p>&#10;<p>produce videos, novels, and more continuously</p>&#10;<p>The key is not a single AI.</p>&#10;<p>It is a complete multi-agent architecture with fully customizable workflows.</p>&#10;<p>What it can already do:<br>&#10;Multi-agent collaboration: agents divide tasks and work like a real team</p>&#10;<p>Flexible workflows: adaptable to any industry or use case</p>&#10;<p>Reusable CLI templates: no need to rebuild workflows from scratch</p>&#10;<p>Long-running execution: agents can operate continuously like real employees</p>&#10;<p>And one of the coolest parts is this:</p>&#10;<p>In most desktop apps, you cant really see whats happening in the CLI. Its all hidden behind the UI.</p>&#10;<p>In this system, you can click on any agent avatar and directly inspect its terminal output in real time.</p>&#10;<p>Even more important for multi-agent setups:<br>&#10;the biggest problem is when a sub-agent goes off track or fails silently.</p>&#10;<p>Here, you can talk to any individual agent at any time and adjust its behavior on the fly  effectively fine-tuning the workflow while its still running.</p>&#10;<p>In the future, I will develop my own CLI and agent. This is a product for the future. It's not entirely unrealistic to run it autonomously for a month . I independently developed maintained this project all by myself. So there is only one contributor.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>seeksky</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/544786/i-built-a-desktop-multi-agent-system-conceptually-goes-beyond-codex-desktop</guid>
    		</item>
    		    		<item>
    			<title>Improving Clarity in Online Eligibility Verification Systems</title>
    			<link>https://www.daniweb.com/programming/code/544691/improving-clarity-in-online-eligibility-verification-systems</link>
    			<pubDate>Mon, 02 Mar 2026 07:26:32 +0000</pubDate>
    			<description>Many online eligibility systems fail not because of technical errors, but because of unclear content structure. When users visit a verification portal, they usually want quick answers. If instructions are long, confusing, or poorly formatted, users lose trust immediately. From an SEO and usability perspective, structured headings, short paragraphs, and ...</description>
    			    			<content:encoded><![CDATA[ <p>Many online eligibility systems fail not because of technical errors, but because of unclear content structure. When users visit a verification portal, they usually want quick answers. If instructions are long, confusing, or poorly formatted, users lose trust immediately.</p>&#10;<p>From an SEO and usability perspective, structured headings, short paragraphs, and clear call-to-action steps improve both readability and engagement. For example, guides explaining the 8171 web portal status check process work best when the steps are broken down into simple instructions rather than large blocks of text.</p>&#10;<p>Search engines also favor well-structured informational content. Clean hierarchy, proper internal linking, and optimized metadata contribute to better visibility.</p>&#10;<p>In community-driven platforms, we often focus on code and backend solutions, but content clarity is equally important for user satisfaction.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Zubi_1</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/code/544691/improving-clarity-in-online-eligibility-verification-systems</guid>
    		</item>
    		    		<item>
    			<title>Looking for Senior Full Stack Developers - Full Time Position</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/544641/looking-for-senior-full-stack-developers-full-time-position</link>
    			<pubDate>Wed, 18 Feb 2026 21:53:03 +0000</pubDate>
    			<description>No Freelancers this is full time employment (Part time is also available). NO Agency, No third party, No businesses, we are only looking to hire individuals, senior roles only. English speaking should be intermediate C2</description>
    			    			<content:encoded><![CDATA[ <p>No Freelancers this is full time employment (Part time is also available). NO Agency, No third party, No businesses, we are only looking to hire individuals, senior roles only. English speaking should be intermediate C2</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Mochi_2</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/544641/looking-for-senior-full-stack-developers-full-time-position</guid>
    		</item>
    		    		<item>
    			<title>Free programing courses</title>
    			<link>https://www.daniweb.com/programming/threads/544275/free-programing-courses</link>
    			<pubDate>Mon, 17 Nov 2025 15:38:09 +0000</pubDate>
    			<description>Hi everyone, my name is Daniel and I am a programmer. I started a Telegram group with another friend (also a programmer) where we provide free courses mainly in development, AI and programming. Happy to be here and meet you all, have a wonderful day!  https://t.me/+rx6TwJzuiZI5Mjc8</description>
    			    			<content:encoded><![CDATA[ <p>Hi everyone, my name is Daniel and I am a programmer. I started a Telegram group with another friend (also a programmer) where we provide free courses mainly in development, AI and programming. Happy to be here and meet you all, have a wonderful day! </p>&#10;<p><a href="https://t.me/+rx6TwJzuiZI5Mjc8">https://t.me/+rx6TwJzuiZI5Mjc8</a></p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Daniel_207</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/544275/free-programing-courses</guid>
    		</item>
    		    		<item>
    			<title>How to Drive Organic Traffic to Calendar/Productivity Tools?</title>
    			<link>https://www.daniweb.com/programming/threads/544242/how-to-drive-organic-traffic-to-calendar-productivity-tools</link>
    			<pubDate>Tue, 11 Nov 2025 17:05:55 +0000</pubDate>
    			<description>I&#39;ve been working on growing organic reach for a calendar and productivity platform, and I wanted to share some insights and challenges I&#39;ve encountered. The productivity tools niche is incredibly competitive, with giants like Google Calendar, Notion, and Microsoft dominating search results. However, I&#39;ve discovered that there&#39;s still significant opportunity ...</description>
    			    			<content:encoded><![CDATA[ <p>I've been working on growing organic reach for a calendar and productivity platform, and I wanted to share some insights and challenges I've encountered. The productivity tools niche is incredibly competitive, with giants like Google Calendar, Notion, and Microsoft dominating search results. However, I've discovered that there's still significant opportunity for smaller tools if you approach SEO and content marketing strategically.</p>&#10;<div class="h2">Understanding User Search Intent</div>&#10;<p>One of the biggest revelations in my journey has been understanding that users searching for calendar solutions have very different intent levels. Someone typing "calendar" into Google is likely looking for something completely different than someone searching "printable monthly calendar 2025 with holidays."</p>&#10;<p>The key is identifying these intent patterns:</p>&#10;<p><strong>Informational Intent</strong>: Users looking for knowledge ("how to organize daily schedule," "benefits of time blocking," "what is a productivity system")</p>&#10;<p><strong>Navigational Intent</strong>: Users seeking specific tools ("Google Calendar alternative," "free calendar app")</p>&#10;<p><strong>Transactional Intent</strong>: Users ready to use something ("download printable calendar," "create event calendar," "free monthly planner template")</p>&#10;<p>In my experience, targeting transactional and specific informational queries has generated the most valuable traffic. These users know what they want and are more likely to engage with your tool.</p>&#10;<div class="h2">Long-Tail Keywords: The Hidden Goldmine</div>&#10;<p>Here's where most productivity tools miss the mark - they chase broad, impossible-to-rank keywords like "calendar app" or "productivity tool." Instead, I've found tremendous success with long-tail variations:</p>&#10;<ul>&#10;<li>"printable calendar with large spaces for writing"</li>&#10;<li>"monthly calendar template for meal planning"</li>&#10;<li>"academic calendar with semester breaks"</li>&#10;<li>"fiscal year calendar for small business"</li>&#10;<li>"blank weekly schedule with time slots"</li>&#10;</ul>&#10;<p>These longer, more specific phrases have several advantages. First, they face less competition from established brands. Second, users searching these terms have clear intent and know exactly what solution they need. Third, you can create highly targeted content that perfectly matches their needs.</p>&#10;<p>The question becomes: how do you find these golden keywords? I use a combination of approaches. Google's "People Also Ask" section reveals real questions users have. Looking at autocomplete suggestions when typing calendar-related terms uncovers popular variations. Analyzing competitor content shows gaps where they haven't created resources. Forum discussions on productivity communities reveal pain points that aren't being addressed.</p>&#10;<div class="h2">Content Strategy That Actually Works</div>&#10;<p>Creating content for a productivity tool isn't just about writing blog posts. You need to think about the entire user journey and create resources at every stage.</p>&#10;<p><strong>Template and Resource Pages</strong>: This is where productivity tools can truly shine. Create actual downloadable resources - printable calendars for different purposes, planning templates, scheduling worksheets. These pages rank well because they provide immediate value and users share them naturally.</p>&#10;<p><strong>How-To Guides</strong>: Write comprehensive tutorials that solve specific problems. Instead of generic "how to be productive," target specific scenarios like "how to schedule content creation as a solo entrepreneur" or "how to plan weekly meals with a family calendar."</p>&#10;<p><strong>Comparison Content</strong>: Users often search for comparisons when evaluating tools. Create honest, helpful comparison content that positions your tool appropriately. Don't bash competitors - instead, highlight different use cases where various tools excel.</p>&#10;<p><strong>Use Case Studies</strong>: Show how different professionals use calendar tools. "How teachers organize lesson plans," "Project manager scheduling techniques," or "How freelancers manage multiple client deadlines." These attract specific audience segments and demonstrate practical applications.</p>&#10;<p><strong>Seasonal and Timely Content</strong>: Calendar tools have natural seasonal peaks. Back-to-school planning, new year organization, tax season scheduling, holiday planning - create content that aligns with when people actively seek these solutions.</p>&#10;<div class="h2">Technical SEO Considerations</div>&#10;<p>Even the best content won't rank if your technical foundation is weak. For calendar and productivity tools, several technical factors matter significantly.</p>&#10;<p><strong>Page Speed</strong>: Users expect planning tools to be fast and responsive. A slow-loading calendar defeats the purpose. Optimize images, minimize JavaScript, and ensure your site loads quickly on mobile devices.</p>&#10;<p><strong>Mobile Optimization</strong>: Most users now access productivity tools on phones. Your calendar views must work seamlessly on small screens. Test thoroughly on various devices and screen sizes.</p>&#10;<p><strong>Structured Data</strong>: Implement schema markup for your content. Event schema for calendar-related content helps search engines understand your pages better. FAQ schema for help content increases visibility in search results.</p>&#10;<p><strong>Site Architecture</strong>: Organize your content logically. Group related calendar types together, create clear navigation paths, and use internal linking to help users and search engines understand relationships between pages.</p>&#10;<div class="h2">Building Topical Authority</div>&#10;<p>Search engines increasingly favor sites that demonstrate expertise in specific topics. For calendar and productivity tools, this means creating comprehensive coverage of related subjects.</p>&#10;<p>Think beyond just calendars. Cover time management, productivity systems, scheduling strategies, work-life balance, planning methodologies, and organization techniques. This broader approach positions your site as an authority on productivity while naturally incorporating your calendar tool.</p>&#10;<p>Create content clusters around main topics. For example, a cluster on "time blocking" might include: introduction to time blocking, time blocking for different professions, tools for time blocking, common mistakes, templates, and advanced techniques. Each piece links to the others, creating a robust information hub.</p>&#10;<div class="h2">User-Generated Content and Community Building</div>&#10;<p>One underutilized strategy for productivity tools is fostering community contribution. Users who successfully implement productivity systems love sharing their approaches.</p>&#10;<p>Consider featuring user stories, accepting guest posts about productivity techniques, or creating a gallery of user-customized calendar templates. This generates fresh content, provides social proof, and creates engagement that search engines value.</p>&#10;<p>Discussion forums or comment sections where users share tips create naturally keyword-rich content that you didn't have to write. Moderate these spaces to ensure quality, but let organic conversations develop.</p>&#10;<div class="h2">The Power of Visual Content</div>&#10;<p>Calendar and productivity tools are inherently visual. Leverage this by creating content that showcases your tool visually.</p>&#10;<p>Create infographics about productivity statistics, visual guides showing different calendar layouts, Pinterest-friendly template previews, and YouTube tutorials demonstrating features. These assets attract traffic from image and video search while providing additional entry points to your site.</p>&#10;<div class="h2">Local and Niche Opportunities</div>&#10;<p>While it seems counterintuitive for a digital tool, local search opportunities exist for calendar applications. Students searching for academic calendars with their university's specific dates, parents looking for school district calendars, or professionals seeking industry-specific planning tools all present targeting opportunities.</p>&#10;<p>Similarly, niche-specific versions of your content can capture underserved audiences. Medical professionals, lawyers, real estate agents, and teachers all have unique scheduling needs. Content targeting these specific use cases faces less competition and attracts highly relevant users.</p>&#10;<div class="h2">Link Building Without Being Spammy</div>&#10;<p>Building authority requires backlinks, but productivity tools must approach this carefully. The key is creating genuinely linkable resources.</p>&#10;<p>Original research about productivity trends, comprehensive guides that become reference materials, free tools that complement your main offering, and beautiful templates that people want to share all naturally attract links.</p>&#10;<p>Reach out to productivity bloggers, time management coaches, and organization experts. Offer to create custom calendar templates for their audiences or contribute expert insights to their content. These relationships build authentic links over time.</p>&#10;<div class="h2">Measuring What Matters</div>&#10;<p>Finally, tracking the right metrics makes all the difference. Don't just monitor traffic volume. Pay attention to engaged sessions, feature usage, template downloads, return visits, and actual tool adoption.</p>&#10;<p>Some high-traffic keywords might bring visitors who immediately bounce. Other lower-volume terms might attract users who become regular users. Prioritize content that drives meaningful engagement rather than vanity metrics.</p>&#10;<div class="h2">Questions for the Community</div>&#10;<p>I'm curious about others' experiences in this space. Have you found particular content types that drive exceptional results for productivity tools? What's your approach to balancing SEO optimization with genuine user value? How do you identify which features or templates to highlight in content marketing?</p>&#10;<p>The productivity tools space continues evolving, and I believe there's still tremendous opportunity for well-executed organic growth strategies. What's worked - or hasn't worked - in your experience?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>bakhatyar</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/544242/how-to-drive-organic-traffic-to-calendar-productivity-tools</guid>
    		</item>
    		    		<item>
    			<title>How to write java code without NPE?</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/544225/how-to-write-java-code-without-npe</link>
    			<pubDate>Wed, 05 Nov 2025 18:05:27 +0000</pubDate>
    			<description>Hey everybody, Recently I keep running into NullPointerException. It always happens when I forget to check if something is null  and its driving me crazy </description>
    			    			<content:encoded><![CDATA[ <p>Hey everybody,<br>&#10;Recently I keep running into NullPointerException.<br>&#10;It always happens when I forget to check if something is null  and its driving me crazy </p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Cheol</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/544225/how-to-write-java-code-without-npe</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m yenaidong</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/544183/hi-everyone-i-m-yenaidong</link>
    			<pubDate>Tue, 28 Oct 2025 01:10:07 +0000</pubDate>
    			<description>I heard about the DaniWeb community from a friend and I&#39;m very interested in it. I am a self-taught female web scraper and I&#39;m excited to join the community. I hope to engage with everyone and share our experiences in the future!</description>
    			    			<content:encoded><![CDATA[ <p>I heard about the DaniWeb community from a friend and I'm very interested in it. I am a self-taught female web scraper and I'm excited to join the community. I hope to engage with everyone and share our experiences in the future!</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>yenaidong</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/544183/hi-everyone-i-m-yenaidong</guid>
    		</item>
    		    		<item>
    			<title>Best database for Uber for roadside assistance real-time tracking?</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/544160/best-database-for-uber-for-roadside-assistance-real-time-tracking</link>
    			<pubDate>Fri, 24 Oct 2025 07:12:52 +0000</pubDate>
    			<description>Im researching database design for an Uber for roadside assistance app that can handle high-volume location updates and nearby service provider queries. Should I use NoSQL like MongoDB, or are there better options for geospatial queries?</description>
    			    			<content:encoded><![CDATA[ <p>Im researching database design for an Uber for roadside assistance app that can handle high-volume location updates and nearby service provider queries. Should I use NoSQL like MongoDB, or are there better options for geospatial queries?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>jameswhitman</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/544160/best-database-for-uber-for-roadside-assistance-real-time-tracking</guid>
    		</item>
    		    		<item>
    			<title>Hi all, I am Norm</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/544100/hi-all-i-am-norm</link>
    			<pubDate>Thu, 09 Oct 2025 23:00:13 +0000</pubDate>
    			<description>Returning after having been away for several years. I mostly code in java at the 1.8 level. Also try to do some html and javascript with the latest project a webpage that uses Leaflet&#39;s javascript library to show a map using OpenStreet&#39;s Map tiles.</description>
    			    			<content:encoded><![CDATA[ <p>Returning after having been away for several years.  I mostly code in java at the 1.8 level. Also try to do some html and javascript with the latest project a webpage that uses Leaflet's javascript library to show a map using OpenStreet's Map tiles.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>NormR1</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/544100/hi-all-i-am-norm</guid>
    		</item>
    		    		<item>
    			<title>When Speed Replaces Satisfaction in Coding</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/543404/when-speed-replaces-satisfaction-in-coding</link>
    			<pubDate>Tue, 20 May 2025 16:55:15 +0000</pubDate>
    			<description>Before ChatGPT or DeepSeek existed, successfully completing a coding task was a very fulfilling experience, even if it took a long time. Now that things can be done quickly, the sense of accomplishment feels diminished.</description>
    			    			<content:encoded><![CDATA[ <p>Before ChatGPT or DeepSeek existed, successfully completing a coding task was a very fulfilling experience, even if it took a long time. Now that things can be done quickly, the sense of accomplishment feels diminished.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>John_165</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/543404/when-speed-replaces-satisfaction-in-coding</guid>
    		</item>
    		    		<item>
    			<title>JForum release for JakartaEE 10</title>
    			<link>https://www.daniweb.com/hardware-and-software/cloud-based-apps/threads/543389/jforum-release-for-jakartaee-10</link>
    			<pubDate>Sat, 17 May 2025 14:50:02 +0000</pubDate>
    			<description>Since this is a discussion forum, I dare use it to announce a new release of the best (IMO) Java open source discussion software, JForum. There isn&#39;t much new in terms of functionality or bug fixes, but it now runs natively on JakartaEE 10 - meaning you need Tomcat 10.1 ...</description>
    			    			<content:encoded><![CDATA[ <p>Since this is a discussion forum, I dare use it to announce a new release of the best (IMO) Java open source discussion software, JForum. There isn't much new in terms of functionality or bug fixes, but it now runs natively on JakartaEE 10 - meaning you need Tomcat 10.1 or comparable to run it. Previous versions ran fine using the <em>webapps-javaee</em> mechanism of Tomcat, but that's supposed to be something of a temporary hack. And for JForum, it's no longer needed now :-)</p>&#10;<p>You can find a ready-to-run war file at <a href="https://sourceforge.net/projects/jforum2/">https://sourceforge.net/projects/jforum2/</a>, along with documentation.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/hardware-and-software/cloud-based-apps/8">Cloud-based Apps</category>
    			<dc:creator>Ulfson</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/hardware-and-software/cloud-based-apps/threads/543389/jforum-release-for-jakartaee-10</guid>
    		</item>
    		    		<item>
    			<title>Hello, I&#039;m Ulf Dittmer</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/543375/hello-i-m-ulf-dittmer</link>
    			<pubDate>Wed, 14 May 2025 16:15:50 +0000</pubDate>
    			<description>I used to be a long-time moderator and administrator on JavaRanch/CodeRanch, where I got to know Tim and Ron who recently introduced themselves here. Over there I was heavily involved in moving the Ranch from UBB to [JForum](https://sourceforge.net/projects/jforum2/); I&#39;m a committer to the open source version to this day. The ...</description>
    			    			<content:encoded><![CDATA[ <p>I used to be a long-time moderator and administrator on JavaRanch/CodeRanch, where I got to know Tim and Ron who recently introduced themselves here. Over there I was heavily involved in moving the Ranch from UBB to <a href="https://sourceforge.net/projects/jforum2/">JForum</a>; I'm a committer to the open source version to this day. The general demise of public forums -which Dani voiced on the Ranch- has tempered the pace of that project, though.</p>&#10;<p>Having worked in numerous industries, these days I freelance in various capacities, almost exclusively on web-based Java projects. I also dabble in Android on the side, but more for fun than profit.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>Ulfson</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/543375/hello-i-m-ulf-dittmer</guid>
    		</item>
    		    		<item>
    			<title>Hello, I&#039;m Tim Cooke</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/543373/hello-i-m-tim-cooke</link>
    			<pubDate>Wed, 14 May 2025 15:43:15 +0000</pubDate>
    			<description>Like Ron McLeod, [who we met yesterday](https://www.daniweb.com/community-center/say-hello/threads/543368/hi-everyone-i-m-ron-mcleod), I&#39;m a moderator and administrator over at the CodeRanch.com forums. I&#39;m a Software Engineer, currently working as a Software Architect for a medical technology company in Belfast, Northern Ireland. We use Java, JavaScript, TypeScript, Python, we have used many of the related tooling ...</description>
    			    			<content:encoded><![CDATA[ <p>Like Ron McLeod, <a href="https://www.daniweb.com/community-center/say-hello/threads/543368/hi-everyone-i-m-ron-mcleod">who we met yesterday</a>, I'm a moderator and administrator over at the CodeRanch.com forums.</p>&#10;<p>I'm a Software Engineer, currently working as a Software Architect for a medical technology company in Belfast, Northern Ireland. We use Java, JavaScript, TypeScript, Python, we have used many of the related tooling for those languages, and our runtime environment is AWS following an "as serverless as possible" policy.</p>&#10;<p>I've recently started doing some manuscript review work for Manning, for new books that they have in development, which has turned out to be quite enjoyable.</p>&#10;<p>I learned of this forum only recently so thought I'd drop in and see what's going on over here.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>trcooke</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/543373/hello-i-m-tim-cooke</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m Ron McLeod</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/543368/hi-everyone-i-m-ron-mcleod</link>
    			<pubDate>Tue, 13 May 2025 23:12:22 +0000</pubDate>
    			<description>I&#39;m a moderator and forum software developer at CodeRanch. In my day job, I work in the telecom sector, working on core network and related solutions for mostly 4G and 5G cellular networks. I am currently spending a lot of time working with distributed microservice based solutions, often using a ...</description>
    			    			<content:encoded><![CDATA[ <p>I'm a moderator and forum software developer at CodeRanch.</p>&#10;<p>In my day job, I work in the telecom sector, working on core network and related solutions for mostly 4G and 5G cellular networks.  </p>&#10;<p>I am currently spending a lot of time working with distributed microservice based solutions, often using a Java/Quarkus/GraalVM/Buildah/Podman/Linux stack.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>Ron McLeod</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/543368/hi-everyone-i-m-ron-mcleod</guid>
    		</item>
    		    		<item>
    			<title>Null Pointer Exception in Java Application – Need Fixing</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/543210/null-pointer-exception-in-java-application-need-fixing</link>
    			<pubDate>Thu, 27 Mar 2025 05:18:24 +0000</pubDate>
    			<description>My Java application crashes with a NullPointerException when trying to access an object property. Here&#39;s the problematic code: public class Test { public static void main(String[] args) { String text = null; System.out.println(text.length()); // NullPointerException here } } How can I properly handle this scenario?</description>
    			    			<content:encoded><![CDATA[ <p>My Java application crashes with a NullPointerException when trying to access an object property. Here's the problematic code:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">    public class Test {&#10;        public static void main(String[] args) {&#10;            String text = null;&#10;            System.out.println(text.length()); // NullPointerException here&#10;        }&#10;    }</code></pre>&#10;<p>How can I properly handle this scenario?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>YashSmith</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/543210/null-pointer-exception-in-java-application-need-fixing</guid>
    		</item>
    		    		<item>
    			<title>How to Optimize Minecraft Server for Low-End PC?</title>
    			<link>https://www.daniweb.com/programming/game-development/threads/543042/how-to-optimize-minecraft-server-for-low-end-pc</link>
    			<pubDate>Thu, 13 Feb 2025 06:59:12 +0000</pubDate>
    			<description>I&#39;m hosting a Minecraft server on a PC with 4GB RAM and an Intel Core i3, but it&#39;s lagging with 3+ players. How can I optimize it? Should I adjust Java arguments, tweak server.properties, or switch to PaperMC? Any tips to reduce mob/entity lag?</description>
    			    			<content:encoded><![CDATA[ <p>I'm hosting a Minecraft server on a PC with 4GB RAM and an Intel Core i3, but it's lagging with 3+ players. How can I optimize it? Should I adjust Java arguments, tweak server.properties, or switch to PaperMC? Any tips to reduce mob/entity lag?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/game-development/71">Game Development</category>
    			<dc:creator>Hassan_62</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/game-development/threads/543042/how-to-optimize-minecraft-server-for-low-end-pc</guid>
    		</item>
    		    		<item>
    			<title>Page Speed Issue</title>
    			<link>https://www.daniweb.com/digital-media/digital-marketing/threads/543021/page-speed-issue</link>
    			<pubDate>Fri, 07 Feb 2025 04:39:04 +0000</pubDate>
    			<description>**Is it true that a java website faces much more page speed and core web vitals issues as compared to a wordpress website? ** I have seen many wordpress websites doing nothing on technical seo issues but having very good page speed whereas my website is a java website and ...</description>
    			    			<content:encoded><![CDATA[ <p><strong>Is it true that a java website faces much more page speed and core web vitals issues as compared to a wordpress website? </strong></p>&#10;<p>I have seen many wordpress websites doing nothing on technical seo issues but having very good page speed whereas my website is a java website and i am struggling to fix my core web vitals.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/digital-media/digital-marketing/25">Digital Marketing</category>
    			<dc:creator>MasoodDidThat</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/digital-media/digital-marketing/threads/543021/page-speed-issue</guid>
    		</item>
    		    		<item>
    			<title>I built a kafka GUI client for operating kafka, welcome to use</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/542810/i-built-a-kafka-gui-client-for-operating-kafka-welcome-to-use</link>
    			<pubDate>Sun, 22 Dec 2024 09:28:53 +0000</pubDate>
    			<description>This project is a cross-platform Kafka GUI client. A star would be appreciated to support the open-source effort by the author. Thank you! # Features of Kafka-King * View the list of cluster nodes, dynamically configure broker and topic settings. * Support for consumer clients to consume messages from specified ...</description>
    			    			<content:encoded><![CDATA[ <p>This project is a cross-platform Kafka GUI client. A star would be appreciated to support the open-source effort by the author. Thank you!</p>&#10;<div class="h1">Features of Kafka-King</div>&#10;<ul>&#10;<li>View the list of cluster nodes, dynamically configure broker and topic settings.</li>&#10;<li>Support for consumer clients to consume messages from specified topics with group, size, and timeout parameters, displaying message details in tabular form.</li>&#10;<li>Support for PLAIN, SSL, SASL, Kerberos, sasl_plaintext, etc.</li>&#10;<li>Create (supports batch operations) and delete topics, specifying replicas and partitions.</li>&#10;<li>Statistics on each topic's total message count, committed offset, and lag for each consumer group.</li>&#10;<li>Detailed information about topic partitions (offsets), with support for adding additional partitions.</li>&#10;<li>Simulate producer behavior, send messages in batches with headers and partition specifications.</li>&#10;<li>Topic and partition health checks (completed).</li>&#10;<li>View consumer groups and individual consumers.</li>&#10;<li>Offset inspection reports.</li>&#10;<li>Support Chinese, Japanese, English, Korean, Russian and other languages</li>&#10;</ul>&#10;<p>Currently supports Windows, macos, and Linux environments</p>&#10;<p>HomePagegithub.com/Bronya0/Kafka-King</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>勾玉</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/542810/i-built-a-kafka-gui-client-for-operating-kafka-welcome-to-use</guid>
    		</item>
    		    		<item>
    			<title>how do i get this to write and save to the same file</title>
    			<link>https://www.daniweb.com/programming/threads/542792/how-do-i-get-this-to-write-and-save-to-the-same-file</link>
    			<pubDate>Wed, 18 Dec 2024 22:32:18 +0000</pubDate>
    			<description>i am using bluej and this code compiles but doesnt save the input and unique file extension to the same document. I am new so this may seem elementary but any help would be appreciated. thank you // File with a timestamp in the filename import java.io.IOException; import java.nio.file.Files; import ...</description>
    			    			<content:encoded><![CDATA[ <p>i am using bluej and this code compiles but doesnt save the input and unique file extension to the same document. I am new so this may seem elementary but any help would be appreciated. thank you</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">// File with a timestamp in the filename&#10;import java.io.IOException;&#10;import java.nio.file.Files;&#10;import java.nio.file.Path;&#10;import java.nio.file.Paths;&#10;import java.text.SimpleDateFormat;&#10;import java.util.Date;&#10;import java.io.BufferedWriter;&#10;import java.io.FileWriter;&#10;import java.util.Scanner;&#10;import java.time.LocalDate;&#10;&#10;&#10;&#10;// Class definition for UniqueFileNameExampleOne&#10;public class SampleMix {&#10;    // Main method&#10;    public static void main(String[] args) {&#10;                try&#10;&#10;                (Scanner scanner = new Scanner(System.in);&#10;                     BufferedWriter writer = new BufferedWriter(new FileWriter(generateUniqueFileName()))) &#10;                     {&#10;&#10;                     while (true) {&#10;&#10;                        System.out.print("Press Enter to enter job info or type 'exit'): ");&#10;                        String answerdate = scanner.nextLine();&#10;&#10;                        if (answerdate.equalsIgnoreCase("exit")) {&#10;                            break;&#10;                        }&#10;&#10;                    System.out.print("Job Applied for: ");&#10;                    String answer1 = scanner.nextLine();&#10;                    System.out.print("Company: ");&#10;                    String answer2 = scanner.nextLine();&#10;                    System.out.print("Platform: ");&#10;                    String answer3 = scanner.nextLine();&#10;&#10;                    writer.write("Date:" + LocalDate.now());&#10;&#10;                    writer.newLine();&#10;                    writer.write("Job Applied For: " + answer1);&#10;                    writer.newLine();&#10;                    writer.write("Company: " + answer2);&#10;                    writer.newLine();&#10;                    writer.write("Platform: " + answer3);&#10;                    writer.newLine();&#10;                    writer.write(answerdate);&#10;                    writer.newLine();&#10;                    writer.newLine();&#10;                    }&#10;&#10;                //} catch (IOException e) {&#10;                 //   System.err.println("Error writing to file: " + e.getMessage());&#10;&#10;&#10;&#10;             //try {   &#10;                    // Specify the directory where you want to create the file&#10;            String directoryPath = "C:\\Users\\brett\\Documents";&#10;&#10;            // Generate a unique file name using timestamp&#10;            String uniqueFileName = generateUniqueFileName();&#10;&#10;            // Combine the directory path and unique file name to get the full file path&#10;            Path fullPath = Paths.get(directoryPath, uniqueFileName);&#10;&#10;            // If the directory does not exist, create the directory&#10;            if (!Files.exists(fullPath.getParent())) {&#10;                Files.createDirectories(fullPath.getParent());&#10;            }&#10;&#10;            // Create the file&#10;            Files.createFile(fullPath);&#10;&#10;            System.out.println("File created successfully: " + fullPath);&#10;&#10;        } &#10;               // Handle file creation errors&#10;        catch (IOException e) &#10;        {&#10;            e.printStackTrace();&#10;        }&#10;&#10;    }&#10;&#10;          // Helper method to generate a unique file name using a timestamp&#10;    private static String generateUniqueFileName() &#10;    {&#10;        SimpleDateFormat dateFormat = new SimpleDateFormat("-yyyyMMddHHmmss");&#10;        String timestamp = dateFormat.format(new Date());&#10;        return "file_" + timestamp + ".txt";&#10;    }&#10;&#10;}</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Bdill7</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/542792/how-do-i-get-this-to-write-and-save-to-the-same-file</guid>
    		</item>
    		    		<item>
    			<title>Necessary tips for a Java programming learning application</title>
    			<link>https://www.daniweb.com/programming/threads/542771/necessary-tips-for-a-java-programming-learning-application</link>
    			<pubDate>Fri, 13 Dec 2024 17:21:55 +0000</pubDate>
    			<description>Hello everyone, Im working on a project to develop an educational software aimed at teaching programming logic to beginners. The app will focus on short questions and mini-games to make learning engaging and interactive. Its targeted at university students in their first semesters and will primarily use Java as the ...</description>
    			    			<content:encoded><![CDATA[ <p>Hello everyone,</p>&#10;<p>Im working on a project to develop an educational software aimed at teaching programming logic to beginners. The app will focus on short questions and mini-games to make learning engaging and interactive. Its targeted at university students in their first semesters and will primarily use Java as the teaching language.</p>&#10;<p>I would love to hear your opinions or advice on:</p>&#10;<p>What types of mini-games or interactive activities would be most effective for teaching programming logic?<br>&#10;Are there any frameworks, libraries, or tools in Java that you recommend for developing such an app?<br>&#10;Any tips on making the content fun and accessible while maintaining educational value?<br>&#10;Looking forward to your insights and suggestions.<br>&#10;Thank you in advance!</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>mateopg</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/542771/necessary-tips-for-a-java-programming-learning-application</guid>
    		</item>
    		    		<item>
    			<title>Best Android phone for starting to test a Java app?</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/542757/best-android-phone-for-starting-to-test-a-java-app</link>
    			<pubDate>Wed, 11 Dec 2024 08:07:43 +0000</pubDate>
    			<description>What model of Android phone would you start with for testing a Java app? Is there one phone of which you can say, &#34;Well, it works fine on here. Theres a good chance itll work on 75% of other Android phones and tablets&#34;?</description>
    			    			<content:encoded><![CDATA[ <p>What model of Android phone would you start with for testing a Java app? Is there one phone of which you can say, "Well, it works fine on here. Theres a good chance itll work on 75% of other Android phones and tablets"?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>blockard</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/542757/best-android-phone-for-starting-to-test-a-java-app</guid>
    		</item>
    		    		<item>
    			<title>webp browser support is far less than popular statistics suggest</title>
    			<link>https://www.daniweb.com/programming/web-development/threads/542681/webp-browser-support-is-far-less-than-popular-statistics-suggest</link>
    			<pubDate>Sat, 23 Nov 2024 20:11:53 +0000</pubDate>
    			<description>Recently I started to rewrite the core of a web app in Java (not including the Admin part). I have discussed ideas with colleagues and friends and one thing that seemed to be an agreement was that it is time to stop keeping the same image in two formats jpg ...</description>
    			    			<content:encoded><![CDATA[ <p>Recently I started to rewrite the core of a web app in Java (not including the Admin part). I have discussed ideas with colleagues and friends and one thing that seemed to be an agreement was that it is time to stop keeping the same image in two formats jpg or png or gif and in webp format. Not for this , but for other browser features like SharedWorkers support , WebSockets support e.t.c. I decided  six months ago to put a tracker client side reporting back server side all this various technologies that the actual browser support , in some of our apps with rather heavy traffic . So I added the webp support expecting that the percentage of clients that don't support it is really low as the statics of the popular "can I use " suggest.</p>&#10;<p>But the results are really weird to me , it seems between 7% and 15% of clients, depending on the app's audience, don't support WebP. In almost all of these cases, both client-side and server-side detection methods agree. It seems that the majority of them are in mobile in WebView or a similar technology. </p>&#10;<p>I am writing about this because I found it extremely weird that something like this is happening but it is not reported (in my knowledge at least). I'm curious if anyone else has encountered similar issues or has real life data to confirm or refute this finding.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/web-development/6">Web Development</category>
    			<dc:creator>jkon</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/web-development/threads/542681/webp-browser-support-is-far-less-than-popular-statistics-suggest</guid>
    		</item>
    		    		<item>
    			<title>Hello Everyone, I&#039;m Ray Brad</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/542382/hello-everyone-i-m-ray-brad</link>
    			<pubDate>Wed, 04 Sep 2024 11:34:16 +0000</pubDate>
    			<description>My name is Ray Brad. I am a learner in Salesforce development and administration, and I also have knowledge of Java concepts. If anyone has questions related to these topics, feel free to comment, and I will do my best to answer them.</description>
    			    			<content:encoded><![CDATA[ <p>My name is Ray Brad.<br>&#10;I am a learner in Salesforce development and administration, and I also have knowledge of Java concepts. If anyone has questions related to these topics, feel free to comment, and I will do my best to answer them.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Ray brad</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/542382/hello-everyone-i-m-ray-brad</guid>
    		</item>
    		    		<item>
    			<title>Preparing for the upcoming Java Interview in September 2024 with BlackRock</title>
    			<link>https://www.daniweb.com/programming/threads/542353/preparing-for-the-upcoming-java-interview-in-september-2024-with-blackrock</link>
    			<pubDate>Wed, 28 Aug 2024 14:01:01 +0000</pubDate>
    			<description>Hello, i&#39;ve cleared my java certification exam and got the job interview. The interview will be held in the next month on 22 September 2024. I want to prepare for each every questions because i believe it would be the toughest round with BlackRock. This is my best call and ...</description>
    			    			<content:encoded><![CDATA[ <p>Hello, i've cleared my java certification exam and got the job interview. The interview will be held in the next month on 22 September 2024. I want to prepare for each every questions because i believe it would be the toughest round with BlackRock. This is my best call and I don't want to miss it. Anyone has any helpful resource related to Java Interview Questions please share.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>sarfaraz_2</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/542353/preparing-for-the-upcoming-java-interview-in-september-2024-with-blackrock</guid>
    		</item>
    		    		<item>
    			<title>Java Language Course</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/542249/java-language-course</link>
    			<pubDate>Tue, 06 Aug 2024 09:22:43 +0000</pubDate>
    			<description> What prerequisites are needed for a Java course?</description>
    			    			<content:encoded><![CDATA[ <p>What prerequisites are needed for a Java course?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Kajal_14</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/542249/java-language-course</guid>
    		</item>
    		    		<item>
    			<title>Which is the best tutorial to learn Java DSA?</title>
    			<link>https://www.daniweb.com/programming/threads/542204/which-is-the-best-tutorial-to-learn-java-dsa</link>
    			<pubDate>Thu, 25 Jul 2024 19:08:30 +0000</pubDate>
    			<description>Hello !! &#34;I want to learn Java data structures and algorithms (DSA). I have recently learned Java object-oriented programming (OOP). Suggest me best tutorials for learning.</description>
    			    			<content:encoded><![CDATA[ <p>Hello !!<br>&#10;"I want to learn Java data structures and algorithms (DSA). I have recently learned Java object-oriented programming (OOP). Suggest me best tutorials for learning.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>ASubhan</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/542204/which-is-the-best-tutorial-to-learn-java-dsa</guid>
    		</item>
    		    		<item>
    			<title>OOP Concepts in Java</title>
    			<link>https://www.daniweb.com/programming/threads/542189/oop-concepts-in-java</link>
    			<pubDate>Mon, 22 Jul 2024 17:31:27 +0000</pubDate>
    			<description>Reflect on your experience with object-oriented programming (OOP) in Java. Discuss how concepts like inheritance, polymorphism, and abstraction have helped you in your projects. Share examples and personal insights.</description>
    			    			<content:encoded><![CDATA[ <p>Reflect on your experience with object-oriented programming (OOP) in Java. Discuss how concepts like inheritance, polymorphism, and abstraction have helped you in your projects. Share examples and personal insights.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>ASubhan</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/542189/oop-concepts-in-java</guid>
    		</item>
    		    		<item>
    			<title>Opengl, java background color rendering problem</title>
    			<link>https://www.daniweb.com/programming/game-development/threads/542135/opengl-java-background-color-rendering-problem</link>
    			<pubDate>Sat, 29 Jun 2024 20:07:56 +0000</pubDate>
    			<description>Hello, I have simple problem for professionalist (that i think ) but i asked all available AI about it and none was able to help and solve problem. so nothing is able to help me in this. I have simple app that show 3 colored axes and camera that move ...</description>
    			    			<content:encoded><![CDATA[ <p>Hello,</p>&#10;<p>I have simple problem for professionalist (that i think ) but i asked all available AI about it and none was able to help and solve problem. so nothing is able to help me in this.</p>&#10;<p>I have simple app that show 3 colored axes and camera that move around this scene by mouse click-hold . the problem is that after run appear first white backfround of frame for a second then its normal black background. i dont want this white at beginning.<br>&#10;can you tell me what in code change to get rid of this white flash at beginning ? I tried already plenty things.</p>&#10;<p>This is the project code IntellJ, java , maven , with additional newest libraries lwjgl (lwjgl-release-3.31) and joml ( joml-1.10.61 ), this is whole code of 3d opengl - app 2 classes : Main and Camera , code is :</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">package org.example;&#10;&#10;import org.joml.Matrix4f;&#10;import org.lwjgl.glfw.GLFWVidMode;&#10;import org.lwjgl.glfw.GLFWErrorCallback;&#10;import org.lwjgl.opengl.GL;&#10;import org.lwjgl.system.MemoryStack;&#10;&#10;import java.nio.FloatBuffer;&#10;import java.nio.IntBuffer;&#10;import java.util.Objects;&#10;&#10;import static org.lwjgl.glfw.Callbacks.glfwFreeCallbacks;&#10;import static org.lwjgl.glfw.GLFW.*;&#10;import static org.lwjgl.opengl.GL11.*;&#10;import static org.lwjgl.system.MemoryStack.stackPush;&#10;import static org.lwjgl.system.MemoryUtil.NULL;&#10;&#10;public class Main {&#10;&#10;    private long window;&#10;    private Camera camera;&#10;    private float lastMouseX, lastMouseY;&#10;    private boolean firstMouse = true;&#10;    private boolean mousePressed = false;&#10;&#10;    public void run() {&#10;        init();&#10;        loop();&#10;&#10;        glfwFreeCallbacks(window);&#10;        glfwDestroyWindow(window);&#10;&#10;        glfwTerminate();&#10;        Objects.requireNonNull(glfwSetErrorCallback(null)).free();&#10;    }&#10;&#10;    private void init() {&#10;        GLFWErrorCallback.createPrint(System.err).set();&#10;&#10;        if (!glfwInit()) {&#10;            throw new IllegalStateException("Unable to initialize GLFW");&#10;        }&#10;&#10;        glfwDefaultWindowHints();&#10;        glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);&#10;        glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);&#10;        // Request a double-buffered window&#10;        glfwWindowHint(GLFW_DOUBLEBUFFER, GL_TRUE);&#10;&#10;        window = glfwCreateWindow(800, 600, "3D Scene", NULL, NULL);&#10;        if (window == NULL) {&#10;            throw new RuntimeException("Failed to create the GLFW window");&#10;        }&#10;&#10;        glfwSetCursorPosCallback(window, (window, xpos, ypos) -&gt; {&#10;            if (firstMouse) {&#10;                lastMouseX = (float) xpos;&#10;                lastMouseY = (float) ypos;&#10;                firstMouse = false;&#10;            }&#10;&#10;            if (mousePressed) {&#10;                float dx = (float) xpos - lastMouseX;&#10;                float dy = (float) ypos - lastMouseY;&#10;                lastMouseX = (float) xpos;&#10;                lastMouseY = (float) ypos;&#10;&#10;                camera.rotate(dy * 0.1f, dx * 0.1f);&#10;            }&#10;        });&#10;&#10;        glfwSetMouseButtonCallback(window, (window, button, action, mods) -&gt; {&#10;            if (button == GLFW_MOUSE_BUTTON_LEFT) {&#10;                if (action == GLFW_PRESS) {&#10;                    mousePressed = true;&#10;                    firstMouse = true; // Reset firstMouse when the button is pressed&#10;                } else if (action == GLFW_RELEASE) {&#10;                    mousePressed = false;&#10;                }&#10;            }&#10;        });&#10;&#10;        glfwSetScrollCallback(window, (window, xoffset, yoffset) -&gt; {&#10;            camera.zoom((float) yoffset * -0.5f);&#10;        });&#10;&#10;        glfwSetKeyCallback(window, (window, key, scancode, action, mods) -&gt; {&#10;            if (key == GLFW_KEY_ESCAPE &amp;&amp; action == GLFW_RELEASE) {&#10;                glfwSetWindowShouldClose(window, true);&#10;            }&#10;        });&#10;&#10;        try (MemoryStack stack = stackPush()) {&#10;            IntBuffer pWidth = stack.mallocInt(1);&#10;            IntBuffer pHeight = stack.mallocInt(1);&#10;&#10;            glfwGetWindowSize(window, pWidth, pHeight);&#10;&#10;            GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());&#10;&#10;            glfwSetWindowPos(&#10;                    window,&#10;                    (vidmode.width() - pWidth.get(0)) / 2,&#10;                    (vidmode.height() - pHeight.get(0)) / 2&#10;            );&#10;        }&#10;&#10;        glfwMakeContextCurrent(window);&#10;        glfwSwapInterval(1);&#10;        glfwShowWindow(window);&#10;&#10;        GL.createCapabilities();&#10;&#10;        glEnable(GL_DEPTH_TEST);&#10;&#10;        // Set the projection matrix&#10;        glMatrixMode(GL_PROJECTION);&#10;        glLoadIdentity();&#10;        float aspectRatio = 800.0f / 600.0f;&#10;        glFrustum(-aspectRatio, aspectRatio, -1, 1, 1, 100);&#10;&#10;        camera = new Camera(20, 30, 45);&#10;    }&#10;&#10;    private void loop() {&#10;        // Set the clear color explicitly&#10;        glClearColor(0.0f, 0.0f, 0.0f, 1.0f);&#10;&#10;        while (!glfwWindowShouldClose(window)) {&#10;            // Clear the color and depth buffers&#10;            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#10;&#10;            Matrix4f viewMatrix = camera.getViewMatrix();&#10;            FloatBuffer fb = org.lwjgl.BufferUtils.createFloatBuffer(16);&#10;            viewMatrix.get(fb);&#10;&#10;            glMatrixMode(GL_MODELVIEW);&#10;            glLoadMatrixf(fb);&#10;&#10;            drawAxes();&#10;&#10;            glfwSwapBuffers(window);&#10;            glfwPollEvents();&#10;        }&#10;    }&#10;&#10;&#10;    private void drawAxes() {&#10;        glBegin(GL_LINES);&#10;&#10;        // X axis in red&#10;        glColor3f(1.0f, 0.0f, 0.0f);&#10;        glVertex3f(-20.0f, 0.0f, 0.0f);&#10;        glVertex3f(20.0f, 0.0f, 0.0f);&#10;&#10;        // Y axis in green&#10;        glColor3f(0.0f, 1.0f, 0.0f);&#10;        glVertex3f(0.0f, -20.0f, 0.0f);&#10;        glVertex3f(0.0f, 20.0f, 0.0f);&#10;&#10;        // Z axis in yellow&#10;        glColor3f(1.0f, 1.0f, 0.0f);&#10;        glVertex3f(0.0f, 0.0f, -20.0f);&#10;        glVertex3f(0.0f, 0.0f, 20.0f);&#10;&#10;        glEnd();&#10;    }&#10;&#10;    public static void main(String[] args) {&#10;        new Main().run();&#10;    }&#10;}</code></pre>&#10;<p>and Camera code :</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">package org.example;&#10;import org.joml.Matrix4f;&#10;import org.joml.Vector3f;&#10;&#10;public class Camera {&#10;&#10;private Vector3f position;&#10;private float pitch;&#10;private float yaw;&#10;private float distance;&#10;&#10;public Camera(float distance, float pitch, float yaw) {&#10;    this.position = new Vector3f(0, 0, 0);&#10;    this.pitch = pitch;&#10;    this.yaw = yaw;&#10;    this.distance = distance;&#10;}&#10;&#10;public Matrix4f getViewMatrix() {&#10;    Matrix4f viewMatrix = new Matrix4f();&#10;    viewMatrix.identity();&#10;&#10;    // Calculate the camera position based on spherical coordinates&#10;    float x = (float) (distance * Math.sin(Math.toRadians(pitch)) * Math.cos(Math.toRadians(yaw)));&#10;    float y = (float) (distance * Math.cos(Math.toRadians(pitch)));&#10;    float z = (float) (distance * Math.sin(Math.toRadians(pitch)) * Math.sin(Math.toRadians(yaw)));&#10;&#10;    position.set(x, y, z);&#10;&#10;    viewMatrix.lookAt(position, new Vector3f(0, 0, 0), new Vector3f(0, 1, 0));&#10;    return viewMatrix;&#10;}&#10;&#10;public void rotate(float pitchDelta, float yawDelta) {&#10;    this.pitch += pitchDelta;&#10;    this.yaw += yawDelta;&#10;}&#10;&#10;public void zoom(float distanceDelta) {&#10;    this.distance += distanceDelta;&#10;    if (this.distance &lt; 1.0f) {&#10;        this.distance = 1.0f; // Prevent camera from getting too close&#10;    }&#10;}&#10;&#10;public Vector3f getPosition() {&#10;    return position;&#10;}&#10;&#10;public float getPitch() {&#10;    return pitch;&#10;}&#10;&#10;public float getYaw() {&#10;    return yaw;&#10;}&#10;&#10;public float getDistance() {&#10;    return distance;&#10;}&#10;&#10;&#10;}</code></pre>&#10;<p>and pom.xml file is : </p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">4.0.0&#10;&lt;groupId&gt;org.example&lt;/groupId&gt;&#10;&lt;artifactId&gt;3dscene&lt;/artifactId&gt;&#10;&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;&#10;&#10;&lt;properties&gt;&#10;    &lt;maven.compiler.source&gt;17&lt;/maven.compiler.source&gt;&#10;    &lt;maven.compiler.target&gt;17&lt;/maven.compiler.target&gt;&#10;&lt;/properties&gt;&#10;&#10;&lt;dependencies&gt;&#10;    &lt;!-- LWJGL dependencies --&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl-glfw&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl-opengl&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl-stb&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;        &lt;classifier&gt;natives-windows&lt;/classifier&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl-glfw&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;        &lt;classifier&gt;natives-windows&lt;/classifier&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl-opengl&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;        &lt;classifier&gt;natives-windows&lt;/classifier&gt;&#10;    &lt;/dependency&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.lwjgl&lt;/groupId&gt;&#10;        &lt;artifactId&gt;lwjgl-stb&lt;/artifactId&gt;&#10;        &lt;version&gt;3.3.1&lt;/version&gt;&#10;        &lt;classifier&gt;natives-windows&lt;/classifier&gt;&#10;    &lt;/dependency&gt;&#10;&#10;    &lt;!-- JOML dependency --&gt;&#10;    &lt;dependency&gt;&#10;        &lt;groupId&gt;org.joml&lt;/groupId&gt;&#10;        &lt;artifactId&gt;joml&lt;/artifactId&gt;&#10;        &lt;version&gt;1.10.5&lt;/version&gt;&#10;    &lt;/dependency&gt;&#10;&lt;/dependencies&gt;&#10;&#10;&lt;repositories&gt;&#10;    &lt;repository&gt;&#10;        &lt;id&gt;sonatype&lt;/id&gt;&#10;        &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots/&lt;/url&gt;&#10;    &lt;/repository&gt;&#10;&lt;/repositories&gt;</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/game-development/71">Game Development</category>
    			<dc:creator>varone</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/game-development/threads/542135/opengl-java-background-color-rendering-problem</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m Karen and I&#039;m a newbie who is learning java 😊</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/542039/hi-everyone-i-m-karen-and-i-m-a-newbie-who-is-learning-java</link>
    			<pubDate>Wed, 05 Jun 2024 02:26:21 +0000</pubDate>
    			<description>Hi everyone, I&#39;m Karen and I&#39;m a newbie who is learning java </description>
    			    			<content:encoded><![CDATA[ <p>Hi everyone, I'm Karen and I'm a newbie who is learning java </p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>Karen Morrow</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/542039/hi-everyone-i-m-karen-and-i-m-a-newbie-who-is-learning-java</guid>
    		</item>
    		    		<item>
    			<title>i need to transform specific code for mltiplr classes to GUI</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/541757/i-need-to-transform-specific-code-for-mltiplr-classes-to-gui</link>
    			<pubDate>Wed, 03 Apr 2024 13:27:35 +0000</pubDate>
    			<description>if i provide you with my project OOP java can you transform him for me to GUI</description>
    			    			<content:encoded><![CDATA[ <p>if i provide you with my project OOP java can you transform him for me to GUI</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>JILA</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/541757/i-need-to-transform-specific-code-for-mltiplr-classes-to-gui</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m kasmar45</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/541478/hi-everyone-i-m-kasmar45</link>
    			<pubDate>Sat, 17 Feb 2024 08:15:24 +0000</pubDate>
    			<description>I have not been active on the site for sometime now. That is because I ended my previous project and didn&#39;t have another ready to go. Now I do have a new project and that is Java so I will be around more often.</description>
    			    			<content:encoded><![CDATA[ <p>I have not been active on the site for sometime now. That is because I ended my previous project and didn't have another ready to go. Now I do have a new project and that is Java so I will be around more often.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>kasmar45</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/541478/hi-everyone-i-m-kasmar45</guid>
    		</item>
    		    		<item>
    			<title>NullPointerExcepter, why did my code suddenly stopped working?</title>
    			<link>https://www.daniweb.com/programming/threads/541186/nullpointerexcepter-why-did-my-code-suddenly-stopped-working</link>
    			<pubDate>Sat, 16 Dec 2023 16:46:30 +0000</pubDate>
    			<description> Exception in thread &#34;AWT-EventQueue-0&#34; java.lang.NullPointerException: Cannot invoke &#34;java.net.URL.toExternalForm()&#34; because &#34;location&#34; is null. The error is from this line of code: home.addItem(new ModelItem(ID++, &#34;Original Nuggets Meal&#34;, &#34;&#34;, 90, &#34;KFC&#34;, new ImageIcon(getClass().getResource(&#34;icon/img2.png&#34;)))); i use the correct folder as it is in a package in the same source of the file. please help!</description>
    			    			<content:encoded><![CDATA[ <pre class="language-clike line-numbers"><code class="language-clike">Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null.</code></pre>&#10;<p>The error is from this line of code:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">home.addItem(new ModelItem(ID++, "Original Nuggets Meal", "", 90, "KFC", new ImageIcon(getClass().getResource("icon/img2.png"))));</code></pre>&#10;<p>i use the correct folder as it is in a package in the same source of the file. please help!</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Shawne</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/541186/nullpointerexcepter-why-did-my-code-suddenly-stopped-working</guid>
    		</item>
    		    		<item>
    			<title>i need to help please</title>
    			<link>https://www.daniweb.com/programming/threads/540592/i-need-to-help-please</link>
    			<pubDate>Wed, 30 Aug 2023 14:17:52 +0000</pubDate>
    			<description>Hello, I am a programmer, but I stopped a long time ago due to the situation in our country, and I want to work again. Please help me with some money to buy your brothers laptop from Syria.</description>
    			    			<content:encoded><![CDATA[ <p>Hello, I am a programmer, but I stopped a long time ago due to the situation in our country, and I want to work again. Please help me with some money to buy your brothers laptop from Syria.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>abod_1</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/540592/i-need-to-help-please</guid>
    		</item>
    		    		<item>
    			<title>which programming language is best to build texting platform?</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/540532/which-programming-language-is-best-to-build-texting-platform</link>
    			<pubDate>Mon, 14 Aug 2023 09:14:46 +0000</pubDate>
    			<description>If any of you have hands-on experience in developing texting platforms or have insights into the considerations involved, I would greatly appreciate your input. Factors such as real-time capabilities, scalability, integration with messaging protocols, and compatibility across devices are of utmost importance.</description>
    			    			<content:encoded><![CDATA[ <p>If any of you have hands-on experience in developing texting platforms or have insights into the considerations involved, I would greatly appreciate your input. Factors such as real-time capabilities, scalability, integration with messaging protocols, and compatibility across devices are of utmost importance.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>raj_41</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/540532/which-programming-language-is-best-to-build-texting-platform</guid>
    		</item>
    		    		<item>
    			<title>BufferedReader Skips first line</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/540187/bufferedreader-skips-first-line</link>
    			<pubDate>Wed, 17 May 2023 07:51:11 +0000</pubDate>
    			<description>I am trying to import a list from a txt file, but the reader skips the first line and also adds the last &#34;null&#34; line that the file writer adds. I fixed the null part but I can&#39;t seem to be able to add the first line in the list. ...</description>
    			    			<content:encoded><![CDATA[ <p>I am trying to import a list from a txt file, but the reader skips the first line and also adds the last "null" line that the file writer adds.</p>&#10;<p>I fixed the null part but I can't seem to be able to add the first line in the list. </p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">BufferedReader bf = new BufferedReader( new FileReader(importpath+"\\additional_info\\"+name+".txt"));&#10;            //System.out.println(importpath+"\\"+name+".txt");&#10;            String line = bf.readLine();&#10;            listModel.removeAllElements();&#10;            while (line != null) {&#10;                line = bf.readLine();&#10;                if(line == null){&#10;&#10;                }else{&#10;                    listModel.addElement(line);&#10;                }&#10;            }&#10;            bf.close();&#10;            System.out.println(listModel);&#10;            clipsLineList.setModel(listModel);</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>epsilonb</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/540187/bufferedreader-skips-first-line</guid>
    		</item>
    		    		<item>
    			<title>what are the different types of java applications</title>
    			<link>https://www.daniweb.com/programming/web-development/threads/540173/what-are-the-different-types-of-java-applications</link>
    			<pubDate>Mon, 15 May 2023 06:04:15 +0000</pubDate>
    			<description>Hi guys, what are the different types of java applications</description>
    			    			<content:encoded><![CDATA[ <p>Hi guys,<br>&#10;what are the different types of java applications</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/web-development/6">Web Development</category>
    			<dc:creator>Mindmade</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/web-development/threads/540173/what-are-the-different-types-of-java-applications</guid>
    		</item>
    		    		<item>
    			<title>two java springboot projects （one jar project referenced by another project</title>
    			<link>https://www.daniweb.com/programming/threads/540015/two-java-springboot-projects-one-jar-project-referenced-by-another-project</link>
    			<pubDate>Mon, 10 Apr 2023 06:04:30 +0000</pubDate>
    			<description>I have two projects (one project Referenced in the form of a jar package.jar project can be referenced by multiple projects). mybatis interface code is written in the jar project(common project). datebase properties at war project. In the beginning, all the actual operations of the database were called in the ...</description>
    			    			<content:encoded><![CDATA[ <p>I have two projects (one project Referenced in the form of a jar package.jar project can be referenced by multiple projects). mybatis interface code is written in the jar project(common project). datebase properties at war project.<br>&#10;In the beginning, all the actual operations of the database were called in the war project, but now it is necessary to directly obtain the database data in the jar project Now I want to do query database operations in the jar project.how should i write? (Can I pass the interface class as a parameter into the jar project?)</p>&#10;<p>I can only configure the database connection in the war project.What parameters should I pass to the jar project so that I can implement database query operations in the jar project.ask for advice!</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/e3f0937e42e6d7e33e6b90b9d1b6b492.png" alt="20230410144912.png" loading="lazy"></p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>j_834</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/540015/two-java-springboot-projects-one-jar-project-referenced-by-another-project</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m Maviscoe</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/540009/hi-everyone-i-m-maviscoe</link>
    			<pubDate>Fri, 07 Apr 2023 21:30:48 +0000</pubDate>
    			<description>Hi everyone I&#39;m new here .I&#39;m majoring on c++, I like python and Java too .but for now I&#39;m busy with c++ programmingthanx for having me here.Regsrds...</description>
    			    			<content:encoded><![CDATA[ <p>Hi everyone I'm new here .I'm majoring on c++, I like python and Java too .but for now I'm busy with c++ programmingthanx for having me here.Regsrds...</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>Maviscoe</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/540009/hi-everyone-i-m-maviscoe</guid>
    		</item>
    		    		<item>
    			<title>How to detect window minimize</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/539733/how-to-detect-window-minimize</link>
    			<pubDate>Tue, 07 Feb 2023 00:31:13 +0000</pubDate>
    			<description>Hi, I have an application with one JFrame and two modeless JDialogs. When I mimimize the JFrame, the dialogs are still there, not minimized. So i need to hide them. I can hide them with WindowDeactivated event which runs one time when the JFrame is minimized but when I want ...</description>
    			    			<content:encoded><![CDATA[ <p>Hi,</p>&#10;<p>I have an application with one JFrame and two modeless JDialogs. When I mimimize the JFrame, the dialogs are still there, not minimized.<br>&#10;So i need to hide them. I can hide them with WindowDeactivated event which runs one time when the JFrame is minimized but when I want to set the dialogs visible again I cannot use WindowActivated event because it's running continuously so the dialogs and JFrame start to flicker...</p>&#10;<p>I need to minimize the dialogs when the JFrame is minimized and maximize them after the JFrame is maximized or has normal state again. Please help.</p>&#10;<p>Thanks</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Sam_417</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/539733/how-to-detect-window-minimize</guid>
    		</item>
    		    		<item>
    			<title>How to deploy PySpark Spark 1.3 machine learning on Yarn executors without</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/539554/how-to-deploy-pyspark-spark-1-3-machine-learning-on-yarn-executors-without</link>
    			<pubDate>Sat, 07 Jan 2023 12:18:55 +0000</pubDate>
    			<description>I&#39;m trying to create a neural network of two hidden layers on Java. The data would be separated into two sets, training set and testing set. Both sets has 75 set of 4 data each row, and each class has their desired output (target). In terms of calculation, it will ...</description>
    			    			<content:encoded><![CDATA[ <p>I'm trying to create a neural network of two hidden layers on Java. The data would be separated into two sets, training set and testing set. Both sets has 75 set of 4 data each row, and each class has their desired output (target). In terms of calculation, it will be doing forward and back propagation respectively, using Sigmoid function as its' activation function. Doing so, I have the initialization part in the following :</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> public static void main(String[] args) {&#10;    // TODO Auto-generated method stub&#10;    // Declaration and Initiation&#10;    double[][] training = new double[75][4];&#10;    double[][] testing = new double[75][4];&#10;    double[][] target = new double[75][3];&#10;&#10;    BufferedReader br = null;&#10;    BufferedReader br2 = null;&#10;    try {&#10;        br = new BufferedReader(new FileReader("filepathhere\\training.csv"));&#10;        br2 = new BufferedReader(new FileReader("filepathhere\\testing.csv"));&#10;&#10;    } catch (FileNotFoundException e1) {&#10;        // TODO Auto-generated catch block&#10;        e1.printStackTrace();&#10;    }&#10;    String line = "";&#10;    int row = 0, i;&#10;&#10;    try {&#10;        while ((line = br.readLine()) != null) {&#10;            String[] token = line.split(",");&#10;            for (i = 0; i &lt; 4; i++) {&#10;                training[row][i] = Double.parseDouble(token[i]);&#10;            }&#10;            if (row &lt; 75) {&#10;                row++;&#10;            } else {&#10;                break;&#10;            }&#10;        }&#10;    } catch (IOException e) {&#10;        // TODO Auto-generated catch block&#10;        e.printStackTrace();&#10;    }&#10;    try {&#10;        br.close();&#10;    } catch (IOException e) {&#10;        // TODO Auto-generated catch block&#10;        e.printStackTrace();&#10;    }&#10;&#10;    String line2 ="";&#10;    int row2 = 0, j;&#10;    try {&#10;        while ((line2 = br2.readLine()) != null) {&#10;            String[] token = line2.split(",");&#10;            for (j = 0; j &lt; 4; j++) {&#10;                testing[row2][j] = Double.parseDouble(token[j]);&#10;            }&#10;            if (row2 &lt; 75) {&#10;                row2++;&#10;            } else {&#10;                break;&#10;            }&#10;        }&#10;    } catch (IOException e) {&#10;        // TODO Auto-generated catch block&#10;        e.printStackTrace();&#10;    }&#10;    try {&#10;        br2.close();&#10;    } catch (IOException e) {&#10;        // TODO Auto-generated catch block&#10;        e.printStackTrace();&#10;    }&#10;&#10;    // Defining desired output on each classes&#10;    for (int k = 0; k &lt; 25; k++) {&#10;        target[k][0] = 1.0;&#10;        target[k][1] = 0.0;&#10;        target[k][2] = 0.0;&#10;    }&#10;    for (int k = 25; k &lt; 50; k++) {&#10;        target[k][0] = 0.0;&#10;        target[k][1] = 1.0;&#10;        target[k][2] = 0.0;&#10;    }&#10;    for (int k = 50; k &lt; 75; k++) {&#10;        target[k][0] = 0.0;&#10;        target[k][1] = 0.0;&#10;        target[k][2] = 1.0;&#10;    }&#10;    ...</code></pre>&#10;<p>Input is as follows for training.csv (<a href="https://drive.google.com/open?id=1zwdcnm_tVcPZD5N0Mt2O9DXE9tBEGVBh">https://drive.google.com/open?id=1zwdcnm_tVcPZD5N0Mt2O9DXE9tBEGVBh</a>) and testing.csv (<a href="https://drive.google.com/open?id=1OGMAygObZVwvwGB6uQffmGX3Zie-GpIw">https://drive.google.com/open?id=1OGMAygObZVwvwGB6uQffmGX3Zie-GpIw</a>).</p>&#10;<p>For output, there will be three : base value, followed by values on first &amp; second layer respectively. I have this one that is unsatisfactory :</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">Results are follows :&#10;&#10;    1 : 1.0 00&#10;    1 : 1.0 00&#10;    1 : 1.0 00&#10;&#10;    2 : 1.0 00&#10;    2 : 1.0 00&#10;    2 : 1.0 00&#10;&#10;    3 : 1.0 00&#10;    3 : 1.0 00&#10;    3 : 1.0 00&#10;&#10;    4 : 1.0 00&#10;    4 : 1.0 00&#10;    4 : 1.0 00&#10;&#10;    5 : 1.0 00&#10;    5 : 1.0 00&#10;    5 : 1.0 00&#10;&#10;    6 : 1.0 00&#10;    6 : 1.0 00&#10;    6 : 1.0 00&#10;    .&#10;    .&#10;    .&#10;    .&#10;&#10;&#10;    75 : 1.0        00&#10;    75 : 1.0        00&#10;    75 : 1.0        00</code></pre>&#10;<p>How can I achieve target output, which will become three different values each, and shows how each neural networks differs each in terms of their output values?</p>&#10;<p>Here is the core programming, including the Sigmoid and Derivative-Sigmoid part. I am convinced that something is wrong with the propagations' part:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">// Forward Propagation&#10;&#10;        int bias = 1;&#10;        double learningrate = 0.03;&#10;&#10;        for (int count = 1; count &lt; 10000; count++) {&#10;            for (int k = 0; k &lt; 75; k++) {&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    op_H1[l] = bias;&#10;                    for (int m = 0; m &lt; 4; m++) {&#10;                        op_H1[l] += training[k][m] * weight_I_H1[l][m];&#10;                        op_H1[l] = Sigmoid(op_H1[l]);&#10;                    }&#10;                }&#10;&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    op_H2[l] = bias;&#10;                    for (int m = 0; m &lt; 3; m++) {&#10;                        op_H2[l] += op_H1[l] * weight_H1_H2[l][m];&#10;                        op_H2[l] = Sigmoid(op_H2[l]);&#10;                    }&#10;                }&#10;&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    op_O[l] = bias;&#10;                    for (int m = 0; m &lt; 3; m++) {&#10;                        op_O[l] += op_H2[l] * weight_H2_O[l][m];&#10;                        op_O[l] = Sigmoid(op_O[l]);&#10;                    }&#10;&#10;&#10;            // Back Propagation&#10;&#10;                }&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    delta3[l] = (target[k][l] - op_O[l] * DSigmoid(op_O[l]));&#10;                }&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    for (int m = 0; m &lt; 3; m++) {&#10;                        weight_H2_O[l][m] += learningrate * op_H2[m] * delta3[l];&#10;                    }&#10;                }&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    for (int m = 0; m &lt; 3; m++) {&#10;                        delta2[l] = DSigmoid(op_H2[l]) * weight_H2_O[m][l] * delta3[m];&#10;                    }&#10;                }&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    for (int m = 0; m &lt; 3; m++) {&#10;                        weight_H1_H2[l][m] += learningrate * op_H1[m] * delta2[l];&#10;                    }&#10;                }&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    for (int m = 0; m &lt; 3; m++) {&#10;                        delta1[l] = DSigmoid(op_H1[l]) * weight_H1_H2[m][l] * delta2[m];&#10;                    }&#10;                }&#10;                for (int l = 0; l &lt; 3; l++) {&#10;                    for (int m = 0; m &lt; 4; m++) {&#10;                        weight_I_H1[l][m] += learningrate * training[l][m] * delta1[l];&#10;                    }&#10;                }&#10;            }&#10;        }&#10;&#10;        // Results Displaying&#10;&#10;        System.out.println("Results are follows :");&#10;        System.out.println("");&#10;&#10;        for (int k = 0; k &lt; 75; k++) {&#10;            for (int l = 0; l &lt; 3; l++) {&#10;                op_H1[l] = 1;&#10;                for (int m = 0; m &lt; 4; m++) {&#10;                    op_H1[l] += testing[k][m] * weight_I_H1[l][m];&#10;                    op_H1[l] = Sigmoid(op_H1[l]);&#10;                }&#10;            }&#10;            for (int l = 0; l &lt; 3; l++) {&#10;                op_H2[l] = 1;&#10;                for (int m = 0; m &lt; 3; m++) {&#10;                    op_H2[l] += op_H1[m] * weight_H1_H2[l][m];&#10;                    op_H2[l] = Sigmoid(op_H2[l]);&#10;                }&#10;            }&#10;            for (int l = 0; l &lt; 3; l++) {&#10;                op_O[l] = 1;&#10;                for (int m = 0; m &lt; 3; m++) {&#10;                    op_O[l] += op_H2[m] * weight_H2_O[l][m];&#10;                }&#10;                op_O[l] = Sigmoid(op_O[l]);&#10;                System.out.print((k + 1) + " : " + op_O[l] + "\t");&#10;                System.out.println("00");&#10;            }&#10;            System.out.println("");&#10;        }&#10;&#10;    }&#10;&#10;    static double Sigmoid(double output) {&#10;        return 1 / (1 + Math.pow(Math.E, -output));&#10;    }&#10;&#10;    static double DSigmoid(double output) {&#10;        return output * (1 - output);&#10;    }&#10;}</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>ammusk354</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/539554/how-to-deploy-pyspark-spark-1-3-machine-learning-on-yarn-executors-without</guid>
    		</item>
    		    		<item>
    			<title>java project 2023 fff</title>
    			<link>https://www.daniweb.com/programming/threads/539346/java-project-2023-fff</link>
    			<pubDate>Fri, 09 Dec 2022 23:04:34 +0000</pubDate>
    			<description>I need help with a java project as soon as possible. Please help if absolutely necessary. Please, please ![Java_Project_Fall2022_page-0002.jpg](https://static.daniweb.com/attachments/4/e1636f48d3cb06c972c29cf47fa9f44c.jpg) ![Java_Project_Fall2022_page-0001.jpg](https://static.daniweb.com/attachments/4/4e7d8604a518555e648b8cfe86711934.jpg)</description>
    			    			<content:encoded><![CDATA[ <p>I need help with a java project as soon as possible. Please help if absolutely necessary. Please, please</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/e1636f48d3cb06c972c29cf47fa9f44c.jpg" alt="Java_Project_Fall2022_page-0002.jpg" loading="lazy"></p>&#10;<p><img src="https://static.daniweb.com/attachments/4/4e7d8604a518555e648b8cfe86711934.jpg" alt="Java_Project_Fall2022_page-0001.jpg" loading="lazy"></p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>fouad_4</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/539346/java-project-2023-fff</guid>
    		</item>
    		    		<item>
    			<title>Program technical</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/539302/program-technical</link>
    			<pubDate>Fri, 02 Dec 2022 19:56:21 +0000</pubDate>
    			<description>thank you.</description>
    			    			<content:encoded><![CDATA[ <p>thank you.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>David_270</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/539302/program-technical</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m AngadChaturvedi</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/539289/hi-everyone-i-m-angadchaturvedi</link>
    			<pubDate>Thu, 01 Dec 2022 09:07:27 +0000</pubDate>
    			<description>Web Consultant I work with clients to promote the success of their business through web development and design. I have Advance proficiency in code writing and programming languages such as HTML, Java, or PHP.</description>
    			    			<content:encoded><![CDATA[ <p>Web Consultant<br>&#10;I work with clients to promote the success of their business through web development and design. I have Advance proficiency in code writing and programming languages such as HTML, Java, or PHP.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>AngadChaturvedi</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/539289/hi-everyone-i-m-angadchaturvedi</guid>
    		</item>
    		    		<item>
    			<title>Java game not loading</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/539249/java-game-not-loading</link>
    			<pubDate>Sat, 26 Nov 2022 05:12:17 +0000</pubDate>
    			<description>I am not quite sure why I am getting this error package tile; import java.awt.Graphics2D; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import javax.imageio.ImageIO; import main.GamePanel; import main.UtilityTool; public class TileManager { GamePanel gp; public Tile[] tile; public int mapTileNum[][]; public TileManager(GamePanel gp) { this.gp = gp; tile = ...</description>
    			    			<content:encoded><![CDATA[ <p>I am not quite sure why I am getting this error</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">package tile;&#10;&#10;import java.awt.Graphics2D;&#10;import java.io.BufferedReader;&#10;import java.io.IOException;&#10;import java.io.InputStream;&#10;import java.io.InputStreamReader;&#10;&#10;import javax.imageio.ImageIO;&#10;&#10;import main.GamePanel;&#10;import main.UtilityTool;&#10;&#10;public class TileManager {&#10;    GamePanel gp;&#10;    public Tile[] tile;&#10;    public int mapTileNum[][];&#10;&#10;    public TileManager(GamePanel gp) {&#10;&#10;        this.gp = gp;&#10;&#10;        tile = new Tile[42];&#10;        mapTileNum = new int[gp.maxWorldCol][gp.maxWorldRow];&#10;&#10;        getTileImage();&#10;        loadMap("/maps/worldV2.txt");&#10;&#10;    }&#10;    public void getTileImage() {&#10;&#10;            //Placeholder&#10;            setup(0,"grass00", false);&#10;            setup(1,"grass00", false);&#10;            setup(2,"grass00", false);&#10;            setup(3,"grass00", false);&#10;            setup(4,"grass00", false);&#10;            setup(5,"grass00", false);&#10;            setup(6,"grass00", false);&#10;            setup(7,"grass00", false);&#10;            setup(8,"grass00", false);&#10;            setup(9,"grass00", false); &#10;            setup(10,"grass00", false);&#10;            setup(11,"grass01", false);&#10;            setup(12,"water00", true);&#10;            setup(13,"water01", true);&#10;            setup(14,"water02", true);&#10;            setup(15,"water03", true);&#10;            setup(16,"water04", true);&#10;            setup(17,"water05", true);&#10;            setup(18,"water06", true);&#10;            setup(19,"water07", true);&#10;            setup(20,"water08", true);&#10;            setup(21,"water09", true);&#10;            setup(22,"water10", true);&#10;            setup(23,"water11", true);&#10;            setup(24,"water12", true);&#10;            setup(25,"water13", true);&#10;            setup(26,"road00", false);&#10;            setup(27,"road01", false);&#10;            setup(28,"road02", false);&#10;            setup(29,"road03", false);&#10;            setup(31,"road04", false);&#10;            setup(32,"road05", false);&#10;            setup(33,"road06", false);&#10;            setup(34,"road07", false);&#10;            setup(35,"road08", false);&#10;            setup(36,"road09", false);&#10;            setup(37,"road10", false);&#10;            setup(38,"road11", false);&#10;            setup(39,"road12", false);&#10;            setup(40,"wall", true);&#10;            setup(41,"tree", true);&#10;&#10;&#10;    }&#10;    public void setup( int index, String imageName, boolean collision) {&#10;&#10;        UtilityTool uTool = new UtilityTool();&#10;&#10;        try {&#10;            tile[index] = new Tile();&#10;            tile[index].image = ImageIO.read(getClass().getResourceAsStream("/tiles/" + imageName + ".png"));&#10;            tile[index].image = uTool.scaleImage(tile[index].image, gp.tileSize, gp.tileSize);&#10;            tile[index].collision = collision;&#10;        }catch (IOException e){&#10;            e.printStackTrace();&#10;        }&#10;    }&#10;    public void loadMap(String filepath) {&#10;        try {&#10;            InputStream is = getClass().getResourceAsStream(filepath);&#10;            BufferedReader br = new BufferedReader (new InputStreamReader(is));&#10;&#10;            int col = 0;&#10;            int row = 0;&#10;&#10;            while (col &lt;gp.maxWorldCol &amp;&amp; row &lt; gp.maxWorldRow) {&#10;                String line = br.readLine();&#10;&#10;                while (col &lt; gp.maxWorldCol) {&#10;                    String numbers[] = line.split(" ");&#10;&#10;                    int num = Integer.parseInt(numbers[col]);&#10;&#10;                    mapTileNum[col][row] = num;&#10;                    col ++;&#10;                }&#10;                if (col == gp.maxWorldCol) {&#10;                    col = 0;&#10;                    row++;&#10;                }&#10;            }&#10;            br.close();&#10;        } catch (Exception e) {&#10;&#10;        }&#10;    }&#10;&#10;    public void draw(Graphics2D g2) {&#10;&#10;        int worldcol = 0;&#10;        int worldrow = 0;&#10;&#10;&#10;        while(worldcol &lt; gp.maxWorldCol &amp;&amp; worldrow &lt; gp.maxWorldRow) {&#10;&#10;            int tileNum = mapTileNum[worldcol][worldrow];&#10;&#10;            int worldX = worldcol * gp.tileSize;&#10;            int worldY = worldrow * gp.tileSize;&#10;            int screenX = worldX - gp.player.worldX + gp.player.screenX;&#10;            int screenY = worldY - gp.player.worldY + gp.player.screenY;&#10;            if (worldX + gp.tileSize &gt; gp.player.worldX - gp.player.screenX &amp;&amp;&#10;                worldX - gp.tileSize &lt; gp.player.worldX + gp.player.screenX &amp;&amp;&#10;                worldY + gp.tileSize &gt; gp.player.worldY -gp.player.screenY &amp;&amp;&#10;                worldY - gp.tileSize &lt; gp.player.worldY + gp.player.screenY) {&#10;                g2.drawImage(tile[tileNum].image, screenX, screenY, null);&#10;            }&#10;&#10;            worldcol++;&#10;&#10;            if(worldcol == gp.maxWorldCol) {&#10;                worldcol =0;&#10;                worldrow ++;&#10;&#10;            }&#10;        }&#10;&#10;    }&#10;}&#10;&#10;&#10;&#10;&#10;&#10;public void paintComponent(Graphics g) {&#10;        super.paintComponent(g);&#10;&#10;        Graphics2D g2 = (Graphics2D)g;&#10;&#10;        tileM.draw(g2);&#10;&#10;        for(int i = 0; i &lt; obj.length; i++){&#10;            if(obj[i] != null) {&#10;                obj[i].draw(g2, this);&#10;            }&#10;        }&#10;&#10;        player.draw(g2);&#10;&#10;        g2.dispose();&#10;    }</code></pre>&#10;<p>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot read field "image" because "this.tile[tileNum]" is null<br>&#10;at tile.TileManager.draw(TileManager.java:138)<br>&#10;at main.GamePanel.paintComponent(GamePanel.java:109)</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Justin_44</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/539249/java-game-not-loading</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m ashishhhroe</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/539244/hi-everyone-i-m-ashishhhroe</link>
    			<pubDate>Fri, 25 Nov 2022 07:02:52 +0000</pubDate>
    			<description>I am really thankful to become a member of this community. I am a developer, learning new programming languages to push my professional growth. I have 2 years of experience as a Java developer. Now I am learning new technologies like Python and Ruby on Rails. I will help community ...</description>
    			    			<content:encoded><![CDATA[ <p>I am really thankful to become a member of this community. I am a developer, learning new programming languages to push my professional growth. I have 2 years of experience as a Java developer. Now I am learning new technologies like Python and Ruby on Rails. I will help community members with the useful solutions.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>ashishhhroe</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/539244/hi-everyone-i-m-ashishhhroe</guid>
    		</item>
    		    		<item>
    			<title>Anyone can answer to this question??</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/539204/anyone-can-answer-to-this-question</link>
    			<pubDate>Mon, 21 Nov 2022 06:38:52 +0000</pubDate>
    			<description>Create three classes the Calculation class, Conversion class and Menu Class. The Conversion class should have the following methods. double KMToMiles(double distance) double MilesToKM(double distance) double FeetToMetres(double distance) double MetresToFeet(double distance) double KgToPounds(double weight) double PoundsToKg(double weight) double CelciusToFahrenheit(double temperature) double FahrenheightToCelcius(double temperature) The Calculation class should have the following ...</description>
    			    			<content:encoded><![CDATA[ <p>Create three classes the Calculation class, Conversion class and Menu Class.<br>&#10;The Conversion class should have the following methods.<br>&#10;double KMToMiles(double distance)<br>&#10;double MilesToKM(double distance)<br>&#10;double FeetToMetres(double distance)<br>&#10;double MetresToFeet(double distance)<br>&#10;double KgToPounds(double weight)<br>&#10;double PoundsToKg(double weight)<br>&#10;double CelciusToFahrenheit(double temperature)<br>&#10;double FahrenheightToCelcius(double temperature)</p>&#10;<p>The Calculation class should have the following methods.<br>&#10;int SumOfSeries(int start, int end, int incr)<br>&#10;int SumOfArray(int data[], int size)<br>&#10;int ProductOfSeries(int start, int end, int incr)<br>&#10;int ProductOfArray(int data[], int size)<br>&#10;e.g. SumOfSeries(10,20,2) should produce the answer 90<br>&#10;Hint : 10+12+14+16+18+20<br>&#10;Similary ProductOfSeries(100,200,50) should produce 3,000,000<br>&#10;Hint : 100x150x200 = 3,000,000<br>&#10;The Menu class should have the following methods.<br>&#10;void displayMainMenu()<br>&#10;void displayConversionSubMenu()<br>&#10;void displayCalculationSubMenu()<br>&#10;void displayConversionLengthSubmenu()<br>&#10;void displayConversionWeightSubmenu()<br>&#10;void displayConversionTemperatureSubmenu()</p>&#10;<p>The menu class methods should display the options available under each selected menu.<br>&#10;e.g. The displayConversionSubMenu() method should display the following.<br>&#10;Conversion Sub Menu</p>&#10;<ol>&#10;<li>Sum of Series</li>&#10;<li>Sum of Array</li>&#10;<li>Product of Series</li>&#10;<li>Product of Array</li>&#10;<li>Exit<br>&#10;If the user selects the sum of array option (option 2), your program should input the size of the array, get<br>&#10;values to the array from the keyboard, create a Calculation type object and invoke the SumOfArray()<br>&#10;method to calculate the sum of the Array element and to display it. After displaying the answer the same<br>&#10;sub menu should be displayed. When the user selects Exit (option 0), you should exit from that sub menu.</li>&#10;</ol> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>cyrennex</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/539204/anyone-can-answer-to-this-question</guid>
    		</item>
    		    		<item>
    			<title>CS Project Pension Date Calculator</title>
    			<link>https://www.daniweb.com/programming/threads/539198/cs-project-pension-date-calculator</link>
    			<pubDate>Sun, 20 Nov 2022 21:35:23 +0000</pubDate>
    			<description>I&#39;m working on a class project where I am supposed to determine how long it will take for someone to be fully vested in their pension. I have to take the time they started working as a string mm/yyyy and then calculate the date they will be fully vested. The ...</description>
    			    			<content:encoded><![CDATA[ <p>I'm working on a class project where I am supposed to determine how long it will take for someone to be fully vested in their pension. I have to take the time they started working as a string mm/yyyy and then calculate the date they will be fully vested. The number of years they have left can be an int but my problem is that I can't use charAt to get the numbers from mm/yyyy to do the math because it comes out in the ASCII values. If the input is 12 then the 1 will print as 97 or something after using charAt. Is there a way to convert back to the string from the ASCII numbers where I can still keep the first integer?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Abdullah_66</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/539198/cs-project-pension-date-calculator</guid>
    		</item>
    		    		<item>
    			<title>Java Derby DB is perfectly working on Virtual Mac but not on Physical Mac</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/539150/java-derby-db-is-perfectly-working-on-virtual-mac-but-not-on-physical-mac</link>
    			<pubDate>Tue, 15 Nov 2022 11:11:39 +0000</pubDate>
    			<description>I developed a Java Application to run on Mac BigSur. I used Java Derby as database for this application. The Application gives an Exception: java.lang.ClassNotFoundException:org.apache.derby.jdbc.EmbeddedDriver The interesting fact is that When I run this application on my MacBigSur(Which I have installed on Virtual Box) then the application runs perfectly. But ...</description>
    			    			<content:encoded><![CDATA[ <p>I developed a Java Application to run on Mac BigSur. I used Java Derby as database for this application. The Application gives an Exception: </p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">java.lang.ClassNotFoundException:org.apache.derby.jdbc.EmbeddedDriver</code></pre>&#10;<p>The interesting fact is that When I run this application on my MacBigSur(Which I have installed on Virtual Box) then the application runs perfectly. But when I run the application on Physical Mac BigSur, then it gives the above mentioned exception.<br>&#10;I am pasting the code Iused for Creating connection to Database.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">String dbdriver = "org.apache.derby.jdbc.EmbeddedDriver";&#10;Class.forName(dbdriver).newInstance();&#10;con = DriverManager.getConnection("jdbc:derby:/users/daniyalumar/4DSOFTECHDB; create = true");</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Saboor880</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/539150/java-derby-db-is-perfectly-working-on-virtual-mac-but-not-on-physical-mac</guid>
    		</item>
    		    		<item>
    			<title>Hi guys can you help me pls here is the topic java programming just give an</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/539132/hi-guys-can-you-help-me-pls-here-is-the-topic-java-programming-just-give-an</link>
    			<pubDate>Sun, 13 Nov 2022 17:08:41 +0000</pubDate>
    			<description>Grading Sheet With Passed and Failed Using If Else Statement FOLLOWING INPUT: FOR REMARKS: -FULLNAME -75 UPTO 100(PASSED) -SECTION -74 DOWN TO 65(FAILED) -SUBJECT DESCRIPTION -OTHER GRADES(INVALID GRADE EX.105) -SUBJECT CODE -1ST MONTHLY EXAM -1ST PRELIM EXAM -2ND PRELIM EXAM -MIDTERM -PRE-FINALS -FINALS</description>
    			    			<content:encoded><![CDATA[ <p>Grading Sheet With Passed and Failed Using If Else Statement </p>&#10;<p>FOLLOWING INPUT:         </p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">                            FOR REMARKS:</code></pre>&#10;<p>-FULLNAME                    -75 UPTO 100(PASSED)<br>&#10;-SECTION                     -74 DOWN TO 65(FAILED)<br>&#10;-SUBJECT DESCRIPTION         -OTHER GRADES(INVALID GRADE EX.105)<br>&#10;-SUBJECT CODE<br>&#10;-1ST MONTHLY EXAM<br>&#10;-1ST PRELIM EXAM<br>&#10;-2ND PRELIM EXAM<br>&#10;-MIDTERM<br>&#10;-PRE-FINALS<br>&#10;-FINALS</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Denji</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/539132/hi-guys-can-you-help-me-pls-here-is-the-topic-java-programming-just-give-an</guid>
    		</item>
    		    		<item>
    			<title>How would you write this into pseudo code?</title>
    			<link>https://www.daniweb.com/programming/threads/539005/how-would-you-write-this-into-pseudo-code</link>
    			<pubDate>Thu, 27 Oct 2022 17:54:12 +0000</pubDate>
    			<description>How would you write this into pseudo code #include #include #include using namespace std; int main(int nNumberofArgs, char* pszArgs[]) //variables string var, var1; float cm, mile, kilometer, inch, meter, AU, fahrenheit, celsius, foot, quit, i; //program i = 1; while (i </description>
    			    			<content:encoded><![CDATA[ <p>How would you write this into pseudo code</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">#include&lt;cstdio&gt;&#10;#include&lt;cstdlib&gt;&#10;#include&lt;iostream&gt;&#10;using namespace std;&#10;int main(int nNumberofArgs, char* pszArgs[])&#10;&#10;    //variables&#10;    string var, var1;&#10;    float cm, mile, kilometer, inch, meter, AU, fahrenheit, celsius, foot, quit, i;&#10;    //program&#10;    i = 1;&#10;    while (i &lt;= 1000000000) &#10;        cout &lt;&lt; "Enter the starting unit. For a list of all units and commands, type list. To exit, type quit. Please note that this program will only loop one billion times." &lt;&lt; endl &lt;&lt;endl;&#10;        cin &gt;&gt; var;&#10;        cout &lt;&lt; endl;&#10;&#10;            if (var == "quit")&#10;&#10;                    return 0;&#10;&#10;            //list of functions&#10;            if  (var == "list")&#10;&#10;                cout &lt;&lt; "For cm to inch type centimeter. For inch to cm type inch. For miles to km type mile. For km to miles type kilometer. For meters to AU or feet type meter. For AU to meters type AU. For feet to meters type feet. For fahrenheit to celsius type fahrenheit. For Celsius to Fahrenheit type celsius then rerun the program." &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl;&#10;&#10;            //inches to centimeters&#10;            if  (var == "inch")&#10;&#10;                cout &lt;&lt; "Please enter the number of inches" &lt;&lt; endl;&#10;               cin &gt;&gt; inch;&#10;                cm = inch * 2.54;&#10;                cout &lt;&lt; "Distance in centimeters:" &lt;&lt; endl;&#10;                cout &lt;&lt; cm &lt;&lt; endl;&#10;&#10;            //centimeters to inches&#10;            if  (var == "centimeter")&#10;&#10;                cout &lt;&lt; "Please enter the number of centimeters" &lt;&lt; endl;&#10;                cin &gt;&gt; cm;&#10;                inch = cm / 2.54;&#10;                cout &lt;&lt; "Distance in inches:" &lt;&lt; endl;&#10;                cout &lt;&lt; inch &lt;&lt; endl;&#10;&#10;            //miles to kilometers&#10;            if  (var == "mile")&#10;&#10;                cout &lt;&lt; "Please enter the number of miles" &lt;&lt; endl;&#10;               cin &gt;&gt; mile;&#10;                kilometer = mile * 1.609344;&#10;                cout &lt;&lt; "Distance in kilometers:" &lt;&lt; endl;&#10;                cout &lt;&lt; kilometer &lt;&lt; endl;&#10;&#10;            //kilometers to miles&#10;            if  (var == "kilometer")&#10;&#10;                cout &lt;&lt; "Please enter the number of kilometers" &lt;&lt; endl;&#10;                cin &gt;&gt; kilometer;&#10;                mile = kilometer / 1.609344;&#10;                cout &lt;&lt; "Distance in miles:" &lt;&lt; endl;&#10;                cout &lt;&lt; mile &lt;&lt; endl;&#10;&#10;            //meters to AU or feet&#10;            if  (var == "meter")&#10;&#10;                cout &lt;&lt; "Please select which unit you would like to convert meters to out of Astronomical units and feet" &lt;&lt; endl;&#10;                cin &gt;&gt; var1;&#10;                //AU&#10;                if  (var1 == "AU");&#10;&#10;                    cout &lt;&lt; "Please enter number of meters" &lt;&lt; endl;&#10;                   cin &gt;&gt; meter;&#10;                    AU = meter / 149598000000;&#10;                    cout &lt;&lt; "Distance in AU:" &lt;&lt; endl;&#10;                    cout &lt;&lt; AU &lt;&lt; endl;&#10;&#10;                //feet&#10;                if  (var1 == "feet")&#10;&#10;                    cout &lt;&lt; "Please enter number of meters" &lt;&lt; endl;&#10;                    cin &gt;&gt; meter;&#10;                    foot = meter * 3.2808399;&#10;                    cout &lt;&lt; "Distance in feet:" &lt;&lt; endl;&#10;                    cout &lt;&lt; foot &lt;&lt; endl;&#10;&#10;            //AU to meters&#10;            if  (var == "AU")&#10;&#10;                cout &lt;&lt; "Please enter number of AU" &lt;&lt; endl;&#10;                cin &gt;&gt; AU;&#10;                meter = AU * 149598000000;&#10;                cout &lt;&lt; "Distance in meters:" &lt;&lt; endl;&#10;                cout &lt;&lt; meter &lt;&lt; endl;&#10;&#10;            //feet to meters&#10;            if  (var == "feet")&#10;&#10;                cout &lt;&lt; "Please enter number of feet" &lt;&lt; endl;&#10;                cin &gt;&gt; foot;&#10;                meter = foot / 3.2808399;&#10;                cout &lt;&lt; "Distance in meters:" &lt;&lt; endl;&#10;                cout &lt;&lt; meter &lt;&lt; endl;&#10;&#10;            //fahrenheit to celsius&#10;            if  (var == "fahrenheit")&#10;&#10;                cout &lt;&lt; "Please enter temperature in Fahrenheit." &lt;&lt; endl;&#10;                cin &gt;&gt; fahrenheit;&#10;                celsius = (fahrenheit - 32) * (5 / 9);&#10;                cout &lt;&lt; "Temperature in celsius:" &lt;&lt; endl;&#10;                cout &lt;&lt; celsius &lt;&lt; endl;&#10;&#10;            //celsius to fahrenheit&#10;            if  (var == "celsius")&#10;&#10;                cout &lt;&lt; "Please enter temperature in Celsius." &lt;&lt; endl;&#10;                cin &gt;&gt; celsius;&#10;                fahrenheit = (celsius * (9 / 5)) + 32;&#10;                cout &lt;&lt; "Temperature in Fahrenheit:" &lt;&lt; endl;&#10;                cout &lt;&lt; fahrenheit &lt;&lt; endl;&#10;&#10;        i++;&#10;&#10;    system("PAUSE");</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Uzo J</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/539005/how-would-you-write-this-into-pseudo-code</guid>
    		</item>
    		    		<item>
    			<title>How to create XSD classes for Jackson.</title>
    			<link>https://www.daniweb.com/programming/web-development/threads/538904/how-to-create-xsd-classes-for-jackson</link>
    			<pubDate>Mon, 17 Oct 2022 09:16:34 +0000</pubDate>
    			<description>Jackson does not provide a tool for generating Jackson classes from XSD or JSON, as JAXB does for a specific XSD. The JAXB class generator was used to generate a set of classes for the specified XSD schema. For polymorphic types, for example, JAXB provides the following annotation to identify ...</description>
    			    			<content:encoded><![CDATA[ <p>Jackson does not provide a tool for generating Jackson classes from XSD or JSON, as JAXB does for a specific XSD.</p>&#10;<p>The JAXB class generator was used to generate a set of classes for the specified XSD schema. For polymorphic types, for example, JAXB provides the following annotation to identify the name based on the name of an XML element.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@XmlElements({&#10;    @XmlElement(name = "Dog", type = Dog.class),&#10;    @XmlElement(name = "Cat", type = Cat.class)&#10;})&#10;protected List&lt;Animal&gt; animal;</code></pre>&#10;<p>Can such courses be offered in Jackson? Specifically, determining the type based on the name of an XML element.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/web-development/6">Web Development</category>
    			<dc:creator>Vandiun</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/web-development/threads/538904/how-to-create-xsd-classes-for-jackson</guid>
    		</item>
    		    		<item>
    			<title>I have just started learning java and need some help</title>
    			<link>https://www.daniweb.com/programming/threads/538815/i-have-just-started-learning-java-and-need-some-help</link>
    			<pubDate>Wed, 05 Oct 2022 02:25:40 +0000</pubDate>
    			<description>and was trying to find a way to make bubble sorting short as it is wayyy to long? so can anyone show me a code to do that?</description>
    			    			<content:encoded><![CDATA[ <p>and was trying to find a way to make bubble sorting short as it is wayyy to long? so can anyone show me a code to do that?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Aarya_1</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538815/i-have-just-started-learning-java-and-need-some-help</guid>
    		</item>
    		    		<item>
    			<title>I would like to code this python code and change it to Java</title>
    			<link>https://www.daniweb.com/programming/threads/538806/i-would-like-to-code-this-python-code-and-change-it-to-java</link>
    			<pubDate>Tue, 04 Oct 2022 09:38:26 +0000</pubDate>
    			<description>This questions contains probability and I dont know how to work with it in Java import numpy import random def cup_game(): cashprice = [0.5, 1.0 , 2.0 , 5.0] n_turn = numpy.random.randint(5,11) n_mult = numpy.random.randint(3,6) cups = list(range(0,15)) x = numpy.random.choice(cashprice, 15, p=[0.3, 0.4, 0.2, 0.1]) x = list(x) turn ...</description>
    			    			<content:encoded><![CDATA[ <p>This questions contains probability and I dont know how to work with it in Java</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">import numpy &#10;import random &#10;&#10;def cup_game():&#10;&#10;    cashprice = [0.5, 1.0 , 2.0 , 5.0]&#10;&#10;    n_turn = numpy.random.randint(5,11)&#10;    n_mult = numpy.random.randint(3,6)&#10;&#10;    cups = list(range(0,15))&#10;    x = numpy.random.choice(cashprice, 15, p=[0.3, 0.4, 0.2, 0.1])&#10;    x = list(x)&#10;&#10;    turn = ["t" for i in range(n_turn)]&#10;    mult = ["m" for i in range(n_mult)]&#10;&#10;    perks = turn + mult&#10;    perk_assignment = random.sample(cups, n_turn + n_mult)&#10;&#10;    perk_list = [0 for i in cups]&#10;    for i in perk_assignment:&#10;        perk_list[i] = perks[perk_assignment.index(i)]&#10;&#10;    picks = 5&#10;    multiplier = 1&#10;    winnings = 0 &#10;    total_picks = 0&#10;&#10;    while picks &gt; 0 and len(x)&gt; 0:&#10;        choice = x.pop()&#10;        p = perk_list.pop()&#10;        #print("cup:", choice, "perk:", p)&#10;        if p == "m":&#10;            multiplier += 1&#10;        elif p == "t":&#10;            picks += 1&#10;        winnings += choice &#10;        picks -= 1&#10;        total_picks +=1&#10;        #print("winnings:", winnings, "multiplier:", multiplier, "picks:", picks, "total picks:", total_picks)&#10;&#10;    jackpot = 0 &#10;    if total_picks == 10:&#10;        jackpot = 20&#10;    elif total_picks == 11:&#10;        jackpot = 50&#10;    elif total_picks == 12:&#10;        jackpot = 100&#10;    elif total_picks == 13:&#10;        jackpot = 200&#10;    elif total_picks == 14:&#10;        jackpot = 500&#10;    elif total_picks == 15:&#10;        jackpot = 1000&#10;    else:&#10;        jackpot = 0&#10;&#10;    winnings = (winnings * multiplier) + jackpot&#10;    return winnings&#10;n = 10000&#10;total = 0 &#10;for i in range(n):&#10;    total += cup_game()&#10;&#10;print(total/n)</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Member #1236512</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538806/i-would-like-to-code-this-python-code-and-change-it-to-java</guid>
    		</item>
    		    		<item>
    			<title>Canadian and US postal code Java</title>
    			<link>https://www.daniweb.com/programming/computer-science/threads/538804/canadian-and-us-postal-code-java</link>
    			<pubDate>Tue, 04 Oct 2022 05:05:17 +0000</pubDate>
    			<description>hello, I am currently struggling so bad in understanding Java and how to implement the codes. I have to implement two subclasses for Canadian and US postal code in Java. For Canadian Postal code, a valid postal postal code has the rule: positions at 0,2,5 are letters. Positions at 1,4,6 ...</description>
    			    			<content:encoded><![CDATA[ <p>hello, I am currently struggling so bad in understanding Java and how to implement the codes. I have to implement two subclasses for Canadian and US postal code in Java.<br>&#10;For Canadian Postal code, a valid postal postal code has the rule: positions at 0,2,5 are letters. Positions at 1,4,6 are digits. Position at 3 is white space.<br>&#10;(eg: V9A 7N2)<br>&#10;For a valid USA postal code, it starts with two letter, then white space and followed by 5 digits. (eg: WA 98001)<br>&#10;I only need to do implementation on the Canadian and US class.<br>&#10;I have included the parent class and main.java for reference.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/4b63484859cbff49db8ddb99f72cfebe.png" alt="Screenshot_(286).png" loading="lazy"></p>&#10;<p><img src="https://static.daniweb.com/attachments/4/a4f654bc825dc3210b1fe6811e500a77.png" alt="Screenshot_(285).png" loading="lazy"></p>&#10;<p><img src="https://static.daniweb.com/attachments/4/3d110dc948dd8a8acadfe075419c1af3.png" alt="Screenshot_(284).png" loading="lazy"></p>&#10;<p>These are what was given:</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/ccf82fd810ea3e40982548c3703be06d.png" alt="Screenshot_(283).png" loading="lazy"></p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/computer-science/14">Computer Science</category>
    			<dc:creator>asqinanuramni</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/computer-science/threads/538804/canadian-and-us-postal-code-java</guid>
    		</item>
    		    		<item>
    			<title>converting python code to java?</title>
    			<link>https://www.daniweb.com/programming/threads/538802/converting-python-code-to-java</link>
    			<pubDate>Mon, 03 Oct 2022 16:54:01 +0000</pubDate>
    			<description>Hi, I am new to Java but familiar with python, I need to convert my code from python to Java can anyone help me? Much appreciated! import random suits = [&#39;C&#39;, &#39;S&#39;, &#39;H&#39;, &#39;D&#39;] val = list(range(1,14)) class Card: def __init__(self, suits, val): self.suit = suits self.value = val def ...</description>
    			    			<content:encoded><![CDATA[ <p>Hi, I am new to Java but familiar with python, I need to convert my code from python to Java can anyone help me? Much appreciated!</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">import random&#10;&#10;&#10;suits = ['C', 'S', 'H', 'D']&#10;val = list(range(1,14))&#10;&#10;&#10;class Card:&#10;    def __init__(self, suits, val):&#10;        self.suit = suits&#10;        self.value = val&#10;&#10;    def show(self):&#10;        print("{} of {}". format(self.value, self.suit))&#10;&#10;&#10;class Deck:&#10;    def __init__(self):&#10;        self.cards = []&#10;        self.build()&#10;&#10;    def build(self):&#10;        for s in ['C', 'S', 'H', 'D']:&#10;            for v in list(range(1,14)):&#10;                self.cards.append(Card(s, v))&#10;&#10;    def show(self):&#10;        for c in self.cards:&#10;            c.show()&#10;&#10;    def shuffle(self):&#10;        for i in range(len(self.cards) - 1, 0, -1):&#10;            r = random.randint(0, i)&#10;            self.cards[i], self.cards[r] = self.cards[r], self.cards[i]&#10;&#10;    def drawCard(self):&#10;        if len(self.cards) &gt; 0:&#10;            return self.cards.pop(0)&#10;        else:&#10;            return None&#10;&#10;    def returnCard(self, card):&#10;        self.cards.append(card)&#10;&#10;&#10;# %%&#10;&#10;def game():&#10;    deck = Deck()&#10;    deck.shuffle()&#10;    matches = [False for i in range(13)]&#10;    table = [[] for i in range(13)]&#10;&#10;    win = 0&#10;&#10;    while len(deck.cards) &gt; 0 and win == 0:&#10;        for i in range(1,14):&#10;            if all(matches) == True:&#10;                win = 1&#10;                break&#10;            else:&#10;                if len(deck.cards) &gt; 0:&#10;                    if matches[i-1] == False:&#10;                        card = deck.drawCard()&#10;                        if card.value == i:&#10;                            matches[i-1] = True&#10;                            for j in table[i-1]:&#10;                                deck.returnCard(j)&#10;                            table[i-1].clear()&#10;                        table[i-1].append(card)&#10;                    else:&#10;                        continue&#10;    return(win)&#10;&#10;#%%&#10;wins = 0 &#10;n = 100000&#10;for i in range(n):&#10;    wins += game()&#10;&#10;winrate = wins/n&#10;print(winrate)</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Member #1236512</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538802/converting-python-code-to-java</guid>
    		</item>
    		    		<item>
    			<title>Code for HTML website</title>
    			<link>https://www.daniweb.com/programming/threads/538678/code-for-html-website</link>
    			<pubDate>Wed, 14 Sep 2022 13:23:07 +0000</pubDate>
    			<description>HTML JAVA CSS</description>
    			    			<content:encoded><![CDATA[ <p>HTML<br>&#10;JAVA<br>&#10;CSS</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Ranniel</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538678/code-for-html-website</guid>
    		</item>
    		    		<item>
    			<title>How To Send Messages In RabbitMQ</title>
    			<link>https://www.daniweb.com/programming/web-development/tutorials/538621/how-to-send-messages-in-rabbitmq</link>
    			<pubDate>Fri, 09 Sep 2022 18:54:03 +0000</pubDate>
    			<description>## Introduction ## In the last tutorial, we learned [how to set up our own RabbitMQ exchanges and queues](https://www.daniweb.com/programming/web-development/tutorials/538620/how-to-create-exchanges-and-queues-in-rabbitmq-server). In this tutorial, we will learn how to send messages to our custom **daniweb-exchange**. ## Goals ## At the end of the tutorial, you would have learned: 1. How to send ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>In the last tutorial, we learned <a href="https://www.daniweb.com/programming/web-development/tutorials/538620/how-to-create-exchanges-and-queues-in-rabbitmq-server">how to set up our own RabbitMQ exchanges and queues</a>. In this tutorial, we will learn how to send messages to our custom <strong>daniweb-exchange</strong>.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to send messages in RabbitMQ.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>A RabbitMQ server with the same custom exchange and queue from <a href="https://www.daniweb.com/programming/web-development/tutorials/538620/how-to-create-exchanges-and-queues-in-rabbitmq-server">this tutorial</a>.</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>RabbitMQ Exchanges and Queues.</li>&#10;<li>Basic Java (only second part).</li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Log into RabbitMQs management interface.</li>&#10;</ol>&#10;<h2>Send Message Using The Management Interface</h2>&#10;<p>The most convenient method to send a message is via the management interface itself. Keep in mind that this is only possible to users who have permission to access the management interface.</p>&#10;<p>To send a message to the <strong>daniweb-exchange</strong>, follow the steps below.</p>&#10;<ol>&#10;<li>&#10;<p>Go to <strong>Exchanges</strong>, and then select <strong>daniweb-exchange</strong>.<br>&#10;<img src="https://static.daniweb.com/attachments/4/921dd05fd14d77602c3e3dbea1799191.png" alt="Screen_Shot_2022-09-08_at_5.47.55_PM.png" loading="lazy"></p>&#10;</li>&#10;<li>&#10;<p>Scroll down until you see <strong>Publish Message</strong>. Fill in the information exactly like the screenshot below. The <strong>Routing key</strong> and the <strong>Properties</strong> must be valid. <strong>Payload</strong> and <strong>Headers</strong> can be set with your value of choice.<br>&#10;<img src="https://static.daniweb.com/attachments/4/f03adfb2a28e986724e413a2044e8425.png" alt="Screen_Shot_2022-09-08_at_5.50.53_PM.png" loading="lazy"></p>&#10;</li>&#10;<li>&#10;<p>Hit <strong>Publish message</strong>.</p>&#10;</li>&#10;</ol>&#10;<p>Because we used the routing key <strong>daniweb-to-my-queue</strong>, the message is automatically sent to <strong>my-queue</strong>. If we switched back to the <strong>my-queue</strong> view, then we can see the message that we just sent in the <em>ready</em> status.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/c0e73d75cd3fbdcfd951c37922fd41f9.png" alt="Screen_Shot_2022-09-08_at_6.03.04_PM.png" loading="lazy"></p>&#10;<p>This message will stay in the queue until it is consumed and acked.</p>&#10;<h2>Creating A New User</h2>&#10;<p>The admin <strong>user</strong> that we have been using is fine for tasks that can be done on the management interface, but for sending or receiving messages from outside the management interface, it is probably better to create a different user. To create a new user, follow the steps below.</p>&#10;<ol>&#10;<li>Select the <strong>Admin</strong> tab.</li>&#10;<li>On the right-hand-side navigation bar, select <strong>Users</strong>.</li>&#10;<li>Expand <strong>Add a user</strong>.</li>&#10;<li>Set the username to <strong>sender</strong>.</li>&#10;<li>Sett the password to <strong>password</strong>.</li>&#10;<li>Hit <strong>Add user</strong>.</li>&#10;</ol>&#10;<p><img src="https://static.daniweb.com/attachments/4/d6507676cd095784f85cc01e7a3900d8.png" alt="Screen_Shot_2022-09-08_at_4.59.12_PM.png" loading="lazy"></p>&#10;<p>After the user <strong>sender</strong> is created, the management interface will show that this user has no access to any <strong>virtual host</strong>.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/2e767ce368dec0cdd5a6599d8f66ed2b.png" alt="Screen_Shot_2022-09-08_at_5.05.35_PM.png" loading="lazy"></p>&#10;<p>In RabbitMQ, <strong>virtual hosts</strong> are used to isolate exchanges, queues, authorization (authentication is still shared among all virtual hosts) and many more properties. This feature is useful when you are running a multi-tenant setup. </p>&#10;<p>For example, if you own a paid weather data streaming service and charges your clients to access this data, then it probably makes more sense to have two different clients, Weather Channel and AccuWeather, on different virtual hosts, so each client can have their own queues and exchanges.</p>&#10;<p>Because our project system is simple, we are only going to be concerned about the default virtual host <em>slash</em> (<code class="language-clike">/</code>). In order to send messages, then the <strong>sender</strong> user would need the <em>write</em> permission to a virtual host <code class="language-clike">/</code>.</p>&#10;<ol>&#10;<li>Click on the Name <strong>sender</strong> to go into its configuration.</li>&#10;<li>Leave <strong>Configure regex</strong> and <strong>Read regex</strong> blank.</li>&#10;<li>The <strong>Write regex</strong> needs to have <code class="language-clike">.*</code> as the value.</li>&#10;<li>Finally, hit <strong>Set permission</strong>.</li>&#10;</ol>&#10;<p><img src="https://static.daniweb.com/attachments/4/e71b137f70a0d6feeacba0be3244fdcf.png" alt="Screen_Shot_2022-09-08_at_5.29.07_PM.png" loading="lazy"></p>&#10;<p>We can now see that the use has permission to send messages to the virtual host <code class="language-clike">/</code>.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/f422513520ceca4cb802c2f5c29ee8db.png" alt="Screen_Shot_2022-09-08_at_5.36.51_PM.png" loading="lazy"></p>&#10;<h2>Send Message In Code</h2>&#10;<p>A more normal method of sending messages with a program. Follow the steps below to create a small Java program.</p>&#10;<ol>&#10;<li>&#10;<p>Create a new text file called <strong>PublishSample.java</strong> under the <strong>~/Downloads</strong> directory for your system.</p>&#10;</li>&#10;<li>&#10;<p>Copy and paste the code below into the file.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> import com.rabbitmq.client.AMQP;&#10; import com.rabbitmq.client.ConnectionFactory;&#10;&#10; import java.io.IOException;&#10; import java.nio.charset.StandardCharsets;&#10; import java.util.concurrent.TimeoutException;&#10;&#10; public class PublishSample {&#10;    private static final String USERNAME = "sender";&#10;    private static final String PASSWORD = "password";&#10;    private static final String ROUTING_KEY = "daniweb-to-my-queue";&#10;    private static final String EXCHANGE_NAME = "daniweb-exchange";&#10;    private static final String BODY = "Hello World From Java!";&#10;&#10;    public static void main(String... args){&#10;        var factory = new ConnectionFactory();&#10;        factory.setUsername(USERNAME);&#10;        factory.setPassword(PASSWORD);&#10;        factory.setHost(ConnectionFactory.DEFAULT_HOST);&#10;        factory.setVirtualHost(ConnectionFactory.DEFAULT_VHOST);&#10;        factory.setPort(ConnectionFactory.DEFAULT_AMQP_PORT);&#10;&#10;        try(var conn = factory.newConnection();&#10;            var channel = conn.createChannel()){&#10;            var props = new AMQP.BasicProperties.Builder()&#10;                    .deliveryMode(1)&#10;                    .build();&#10;            channel.basicPublish(EXCHANGE_NAME, ROUTING_KEY, props, BODY.getBytes(StandardCharsets.UTF_8));&#10;        } catch (IOException | TimeoutException e) {&#10;            throw new RuntimeException(e);&#10;        }&#10;    }&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p>Download the amqp-client-5.15.0.jar from <a href="https://www.rabbitmq.com/java-client.html">https://www.rabbitmq.com/java-client.html</a>.</p>&#10;</li>&#10;<li>&#10;<p>Download the slf4j-simple-2.0.0.jar from <a href="https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/2.0.0/">https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/2.0.0/</a>.</p>&#10;</li>&#10;<li>&#10;<p>Download the slf4j-api-2.0.0.jar from <a href="https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.0/">https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.0/</a>.</p>&#10;</li>&#10;<li>&#10;<p>Place all three jars under the <strong>~/Downloads</strong> directory in your system.</p>&#10;</li>&#10;<li>&#10;<p>In your terminal, execute the program using the command <code class="language-clike">java -cp "Downloads/*" Downloads/PublishSample.java</code>. You might need to modify the directories in the command, depending on your current working directory or operating system.</p>&#10;</li>&#10;</ol>&#10;<p>After the command is executed, then you can see another message in the RabbitMQ management system (two messages in total).</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/d6738d93157c7893379d2f26d4494216.png" alt="Screen_Shot_2022-09-08_at_10.44.26_PM.png" loading="lazy"></p>&#10;<h2>Summary</h2>&#10;<p>You have learned how to send messages using two different ways in RabbitMQ, as well as how to create a new user. In the next tutorial, we will learn <a href="https://www.daniweb.com/programming/web-development/tutorials/538622/how-to-consume-rabbitmq-messages-in-kotlin">how to consume these messages</a>.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/web-development/6">Web Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/web-development/tutorials/538621/how-to-send-messages-in-rabbitmq</guid>
    		</item>
    		    		<item>
    			<title>what am gonna do will this kindly help me for my project</title>
    			<link>https://www.daniweb.com/programming/computer-science/threads/538594/what-am-gonna-do-will-this-kindly-help-me-for-my-project</link>
    			<pubDate>Wed, 07 Sep 2022 08:04:39 +0000</pubDate>
    			<description>Create a simple java calculator console application that will use the four (4) basic math operators: Addition, Subtraction, Multiplication and Division. If conditional statements will not be use since it wasnt discussed yet,</description>
    			    			<content:encoded><![CDATA[ <p>Create a simple java calculator console application that will use the four (4) basic math operators: Addition,<br>&#10;Subtraction, Multiplication and Division. If conditional statements will not be use since it wasnt discussed<br>&#10;yet,</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/computer-science/14">Computer Science</category>
    			<dc:creator>queency zyrel</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/computer-science/threads/538594/what-am-gonna-do-will-this-kindly-help-me-for-my-project</guid>
    		</item>
    		    		<item>
    			<title>how do a java application</title>
    			<link>https://www.daniweb.com/programming/computer-science/threads/538593/how-do-a-java-application</link>
    			<pubDate>Wed, 07 Sep 2022 08:01:52 +0000</pubDate>
    			<description>Create a java application that will convert unit length from Metric to English system. The user will be asked to enter a Metric unit and then it will display the equivalent value to unit of English System. Use metric system like centimer, diameter, meter, etc. while use English system such ...</description>
    			    			<content:encoded><![CDATA[ <p>Create a java application that will convert unit length from Metric to English system. The user will be asked to enter a Metric unit and then it will display the equivalent value to unit of English System. Use metric system like centimer, diameter, meter, etc. while use English system such as inches, feet, yard,</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/computer-science/14">Computer Science</category>
    			<dc:creator>queency zyrel</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/computer-science/threads/538593/how-do-a-java-application</guid>
    		</item>
    		    		<item>
    			<title>HTTP Web Server: Java</title>
    			<link>https://www.daniweb.com/programming/software-development/code/538518/http-web-server-java</link>
    			<pubDate>Wed, 31 Aug 2022 01:29:12 +0000</pubDate>
    			<description>The program below is written in **Java** and is used to develop a Web Server that supports these status codes: **200** OK, **302** Moved Temporarily, and **404** NOT FOUND. The code can emulate an **HTTP** server in your local machine. Let me know if you find the code below helpful ...</description>
    			    			<content:encoded><![CDATA[ <p>The program below is written in <strong>Java</strong> and is used to develop a Web Server that supports these status codes: <strong>200</strong> OK, <strong>302</strong> Moved Temporarily, and <strong>404</strong> NOT FOUND. The code can emulate an <strong>HTTP</strong> server in your local machine. Let me know if you find the code below helpful and if you have any additional suggestions:</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>jnbgames.dev</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/code/538518/http-web-server-java</guid>
    		</item>
    		    		<item>
    			<title>Class Rectangle that computes the Area</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538501/class-rectangle-that-computes-the-area</link>
    			<pubDate>Sun, 28 Aug 2022 20:50:57 +0000</pubDate>
    			<description>I need help to create a class named rectangle that contains -fields for length and width -setters and getters for the fields -a constructor that accepts length and width as parameters -an overloaded 0-arg constructor that sets field values to 0 -a method named computeArea that accepts no parameters and ...</description>
    			    			<content:encoded><![CDATA[ <p>I need help to create a class named rectangle that contains<br>&#10;-fields for length and width<br>&#10;-setters and getters for the fields<br>&#10;-a constructor that accepts length and width as parameters<br>&#10;-an overloaded 0-arg constructor that sets field values to 0<br>&#10;-a method named computeArea that accepts no parameters and returns the area </p>&#10;<p>This is what I had so far:<br>&#10;Rectangle.java</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">public class Rectangle {&#10;&#10;  private double length;&#10;  private double width;&#10;&#10;  public void getLength(){&#10;    return length;&#10;  }&#10;&#10;  public void getWidth(){&#10;    return width;&#10;  }&#10;&#10;  public void setLength(double newLength){&#10;    this.length = newLength;&#10;  }&#10;&#10;  public void setWidth(double newWidth){&#10;    this.width = newWidth;&#10;  }&#10;&#10;  public Rectangle(double length, double width){&#10;    this.length = length;&#10;    this.width = width;&#10;  }&#10;&#10;&#10;  public Rectangle(){&#10;    length = 0;&#10;    width = 0;&#10;  }&#10;&#10;  double area = length * width;&#10;&#10;  public double computeArea(){&#10;    return area;&#10;  }&#10;}</code></pre>&#10;<p>TestRectangle.java</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">public class TestRectangle{&#10;  public static void main(String[] arg){&#10;&#10;    Rectangle rect1 = new Rectangle();&#10;&#10;    rect1.setLength = 4.0;&#10;    rect1.setWidth = 5.0;&#10;&#10;    System.out.println("Length: " + rect1.getLength());&#10;  }&#10;}</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Dysiah</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538501/class-rectangle-that-computes-the-area</guid>
    		</item>
    		    		<item>
    			<title>Waiting For Elements In Selenium</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538450/waiting-for-elements-in-selenium</link>
    			<pubDate>Sun, 21 Aug 2022 15:56:51 +0000</pubDate>
    			<description>## Introduction ## When working with Selenium, you might have run into a situation where you have to wait for long-running tasks to complete before you can interact with elements. Fortunately, Selenium has support for such situations via its many *waits* API. In this tutorial, we will learn how to ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>When working with Selenium, you might have run into a situation where you have to wait for long-running tasks to complete before you can interact with elements. Fortunately, Selenium has support for such situations via its many <em>waits</em> API. </p>&#10;<p>In this tutorial, we will learn how to wait for the web page with Selenium.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to wait for long-running tasks with Selenium.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>A Java IDE such as <strong>IntelliJ IDEA</strong> version <strong>2022.2</strong> (<em>Community Edition</em>).</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>Basic Java.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium#post2287042">Basic Selenium</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/535964/how-to-create-a-restful-api-with-spring-boot#post2280489">Basic Spring</a>.</li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Clone <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/scrolling">this</a> repository, switching to the <strong>waits</strong> branch.</li>&#10;</ol>&#10;<h2>Explicit Wait</h2>&#10;<p>First, let us get started with learning about Explicit Waits. The word <em>explicit</em> here refers to the element that you are waiting on, and not about the waiting time. Whether you are using explicit wait or implicit wait, you must specify a timer.</p>&#10;<p>In our project, the end point /waits would take up to 5 seconds to load the words Hello World!. What do you think will happen to the test below when run?</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void explicitWait(){&#10; driver.get("http://localhost:" + port + "/waits");&#10;&#10; new WebDriverWait(driver, Duration.ofSeconds(4))&#10;       .until(_d -&gt; driver.findElement(By.cssSelector("p")));&#10;}</code></pre>&#10;<p>Well, because we have only waited for four seconds, it obviously would fail with a <strong>TimeOutException</strong> because the timer has elapsed before the <code class="language-clike">&lt;p&gt;</code> is added to the page.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">org.openqa.selenium.TimeoutException: Expected condition failed: waiting for com.daniweb.selenium.SeleniumApplicationTests$$Lambda$1358/0x00000008007e7c18@fd0e118 (tried for 4 second(s) with 500 milliseconds interval)</code></pre>&#10;<p>For the test to work properly, we can simply wait for 6 seconds instead, so that the <code class="language-clike">&lt;p&gt;</code> element would have loaded already.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void explicitWait(){&#10; driver.get("http://localhost:" + port + "/waits");&#10;&#10; new WebDriverWait(driver, Duration.ofSeconds(6))&#10;       .until(_d -&gt; driver.findElement(By.cssSelector("p")));&#10;}</code></pre>&#10;<p>The explicit condition inside <code class="language-clike">until()</code> is what makes this wait an <em>explicit</em> wait.</p>&#10;<h2>Implicit Wait</h2>&#10;<p>Similarly to an explicit wait, an <em>implicit wait</em> would also have to specify a timeout amount. There are two main differences between an explicit and an implicit wait:</p>&#10;<ol>&#10;<li>An implicit wait is set using a different API, <code class="language-clike">driver().manage().implicitWait()</code>, instead of the <code class="language-clike">WebDriverWait</code> class.</li>&#10;<li>Once you set an implicit wait, it is valid for the life of the session.</li>&#10;<li>You do not have to specify an element for implicit waits. The wait simply applies to all elements that you try to find.</li>&#10;</ol>&#10;<p>Here is a sample test that uses implicit wait.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void implicitWait(){&#10;  driver.get("http://localhost:" + port + "/waits");&#10;  driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(6));&#10;&#10;  var p = driver.findElement(By.cssSelector("p"));&#10;}</code></pre>&#10;<p>Implicit wait can be particularly useful when you do not want to repeatedly type out explicit waits that have the same duration. For example, the explicit wait test below waits for three different elements with the same duration of 5 seconds.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void repeatedExplicitWaits(){&#10;  driver.get("http://localhost:" + port + "/waits");&#10;&#10;  new WebDriverWait(driver, Duration.ofSeconds(5))&#10;        .until(_d -&gt; driver.findElement(By.cssSelector("p")));&#10;&#10;  new WebDriverWait(driver, Duration.ofSeconds(5))&#10;        .until(_d -&gt; driver.findElement(By.cssSelector("a")));&#10;&#10;  new WebDriverWait(driver, Duration.ofSeconds(5))&#10;        .until(_d -&gt; driver.findElement(By.cssSelector("h1")));&#10;}</code></pre>&#10;<p>We could save a couple of lines and use implicit waits, like below.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void shortImplicitWait(){&#10;  driver.get("http://localhost:" + port + "/waits");&#10;  driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(5));&#10;&#10;  var p = driver.findElement(By.cssSelector("p"));&#10;  var a = driver.findElement(By.cssSelector("a"));&#10;  var h1 = driver.findElement(By.cssSelector("h1"));&#10;}</code></pre>&#10;<h2>Summary</h2>&#10;<p>We have learned how to use implicit and explicit waits in Selenium. The full project code can be found at <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/waits">https://github.com/dmitrilc/Daniweb_Selenium/tree/waits</a>.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538450/waiting-for-elements-in-selenium</guid>
    		</item>
    		    		<item>
    			<title>Perform Scrolling Actions In Selenium - Part 2</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538449/perform-scrolling-actions-in-selenium-part-2</link>
    			<pubDate>Sun, 21 Aug 2022 15:54:50 +0000</pubDate>
    			<description>## Introduction ## Welcome to part 2 of the Selenium scrolling tutorial. Please follow the directions in [part 1](https://www.daniweb.com/programming/software-development/tutorials/538448/perform-scrolling-actions-in-selenium-part-1) to set up your project. In part 1, we learned how to let Selenium decide how it wants to scroll to elements. In this part 2, we will learn about a ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>Welcome to part 2 of the Selenium scrolling tutorial. Please follow the directions in <a href="https://www.daniweb.com/programming/software-development/tutorials/538448/perform-scrolling-actions-in-selenium-part-1">part 1</a> to set up your project.</p>&#10;<p>In part 1, we learned how to let Selenium decide how it wants to scroll to elements. In this part 2, we will learn about a couple more scrolling use cases, which includes scrolling by the amount of pixels.</p>&#10;<h2>Scrolling Along The Y Axis</h2>&#10;<p>In Selenium scripts, a common use case is scrolling by an amount of pixels vertically. To do this, you can use the method <code class="language-clike">scrollByAmount()</code> by the <strong>Actions</strong> API. For example, if you want to scroll down by 10 pixels and then 500 pixels, then you can use the code below.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void scrollByDown() throws InterruptedException {&#10;  driver.get("http://localhost:" + port + "/start");&#10;&#10;  new Actions(driver)&#10;        .scrollByAmount(0, 10)&#10;        .perform();&#10;&#10;  new Actions(driver)&#10;        .scrollByAmount(0, 500)&#10;        .perform();&#10;&#10;  Thread.sleep(5000);&#10;}</code></pre>&#10;<p>The example shows how to scroll down, but if you want to scroll up, simply use a negative <em>y delta</em> instead. The test below initially scrolls all the way to the end, and then all the way back up.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void scrollByUp() throws InterruptedException {&#10;  driver.get("http://localhost:" + port + "/start");&#10;&#10;  // Scrolls to end of page&#10;  new Actions(driver)&#10;        .sendKeys(Keys.END)&#10;        .perform();&#10;&#10;  Thread.sleep(2000);&#10;&#10;  new Actions(driver)&#10;        .scrollByAmount(0, -1000)&#10;        .perform();&#10;&#10;  Thread.sleep(5000);&#10;}</code></pre>&#10;<h2>Scrolling Along The X Axis</h2>&#10;<p>Similarly, if you want to scroll horizontally, you can simply do that by changing the <em>x delta</em> to another value besides <em>0</em>. The example below shows how scrolling along the X axis looks like.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void scrollByXDown() throws InterruptedException {&#10;  driver.get("http://localhost:" + port + "/start");&#10;&#10;  new Actions(driver)&#10;        .scrollByAmount(100, 0)&#10;        .perform();&#10;&#10;  Thread.sleep(1000);&#10;&#10;  new Actions(driver)&#10;        .scrollByAmount(100, 0)&#10;        .perform();&#10;&#10;  Thread.sleep(5000);&#10;}</code></pre>&#10;<h2>Scrolling With Keyboard</h2>&#10;<p>Some users with certain physical disabilities might not be able to use the mouse for scrolling. So it might be beneficial to test whether the browser scrolls correctly using the commands sent by the keyboard. One way to achieve this is by sending virtual keys with Selenium.</p>&#10;<p>To send keys to the browser, you can use the Actions APIs <code class="language-clike">sendKeys()</code> method, passing in one of the enums in <a href="https://github.com/SeleniumHQ/selenium/blob/selenium-4.2.0/java/src/org/openqa/selenium/Keys.java">this</a> list.</p>&#10;<p>Below are some examples of Selenium tests sending scrolling keys to the browser.</p>&#10;<ol>&#10;<li>&#10;<p>Page Down Key:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Test&#10; void scrollByPgDnKey() throws InterruptedException {&#10;   driver.get("http://localhost:" + port + "/start");&#10;&#10;   new Actions(driver)&#10;         .sendKeys(Keys.PAGE_DOWN)&#10;         .perform();&#10;&#10;   Thread.sleep(1000);&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p>Page Up Key.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Test&#10; void scrollByPgUpKey() throws InterruptedException {&#10;   driver.get("http://localhost:" + port + "/start");&#10;&#10;   // Scrolls to end of page&#10;   new Actions(driver)&#10;         .sendKeys(Keys.END)&#10;         .perform();&#10;&#10;   Thread.sleep(1000);&#10;&#10;   new Actions(driver)&#10;         .sendKeys(Keys.PAGE_UP)&#10;         .perform();;&#10;&#10;   Thread.sleep(1000);&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p>Arrow Down Key.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Test&#10; void scrollByArrowDnKey() throws InterruptedException {&#10;   driver.get("http://localhost:" + port + "/start");&#10;&#10;   new Actions(driver)&#10;         .sendKeys(Keys.ARROW_DOWN);&#10;&#10;   Thread.sleep(1000);&#10;&#10;   new Actions(driver)&#10;         .sendKeys(Keys.ARROW_DOWN);&#10;&#10;   Thread.sleep(1000);&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p>Arrow Up Key.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Test&#10; void scrollByArrowUpKey() throws InterruptedException {&#10;   driver.get("http://localhost:" + port + "/start");&#10;&#10;   // Scrolls to end of page&#10;   new Actions(driver)&#10;         .sendKeys(Keys.END)&#10;         .perform();&#10;&#10;   new Actions(driver)&#10;         .sendKeys(Keys.ARROW_UP);&#10;&#10;   Thread.sleep(1000);&#10;&#10;   new Actions(driver)&#10;         .sendKeys(Keys.ARROW_UP);&#10;&#10;   Thread.sleep(1000);&#10; }</code></pre>&#10;</li>&#10;</ol>&#10;<h2>Summary</h2>&#10;<p>We have learned a couple of different ways to perform scrolling automation on the browser. The full project code can be found at <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/scrolling">https://github.com/dmitrilc/Daniweb_Selenium/tree/scrolling</a>.</p>&#10;<p><em>Please ignore my use of <code class="language-clike">Thread.sleep()</code> in the tutorial. I only use it to see what Selenium is doing because it runs really fast.</em></p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538449/perform-scrolling-actions-in-selenium-part-2</guid>
    		</item>
    		    		<item>
    			<title>Perform Scrolling Actions In Selenium - Part 1</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538448/perform-scrolling-actions-in-selenium-part-1</link>
    			<pubDate>Sun, 21 Aug 2022 15:53:55 +0000</pubDate>
    			<description>## Introduction ## In the [last Selenium tutorial](https://www.daniweb.com/programming/software-development/tutorials/538447/basic-interactions-with-web-elements-in-selenium), we learned how to perform basic actions such as clicking and sending keystrokes. In this tutorial, we will learn how to do another action, which is the scrolling action. ## Goals ## At the end of the tutorial, you would have learned: ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>In the <a href="https://www.daniweb.com/programming/software-development/tutorials/538447/basic-interactions-with-web-elements-in-selenium">last Selenium tutorial</a>, we learned how to perform basic actions such as clicking and sending keystrokes. In this tutorial, we will learn how to do another action, which is the scrolling action.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to perform scroll actions in Selenium</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>A Java IDE such as <strong>IntelliJ IDEA</strong> version <strong>2022.2.1</strong> (<em>Community Edition</em>).</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium#post2287042">Basic Selenium</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/538412/how-to-use-the-selenium-ide-to-generate-tests#post2287043">Selenium IDE</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/535964/how-to-create-a-restful-api-with-spring-boot#post2280489">Basic Spring</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/software-development/tutorials/538447/basic-interactions-with-web-elements-in-selenium">Selenium Interactions</a>.</li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Clone <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/scrolling">this</a> repository, switching to the <strong>scrolling</strong> branch.</li>&#10;</ol>&#10;<h2>Selenium Cannot Interact With Elements Outside The Viewport</h2>&#10;<p>Because Selenium follows the <a href="https://w3c.github.io/webdriver/#element-click"><strong>WebDriver</strong> specs</a>, it cannot interact with elements that are outside the <strong>viewport</strong>. The <strong>WebDriver</strong> specification states,</p>&#10;<blockquote>&#10;<p>If the element is outside the viewport, an element not interactable error is returned. </p>&#10;</blockquote>&#10;<p>If you want to interact with elements outside the viewport, then you should instruct Selenium to scroll the page until those elements are visible. We will learn how to do this next.</p>&#10;<h2>Let Selenium Decides How To Scroll To Elements</h2>&#10;<p>Even though Selenium cannot interact with elements outside the viewport, it can obviously still see all the element in the DOM tree. If an element is not <em>interactable</em>, and Selenium can see it in the DOM, then Selenium will attempt to scroll until the element is in the viewport. The beauty of this is that you do not have to tell Selenium which direction to scroll to.</p>&#10;<ol>&#10;<li>&#10;<p>In the screenshot below, the link <strong>Last Link</strong> is all the way at the bottom of the viewport.<br>&#10;<img src="https://static.daniweb.com/attachments/4/b155815909301e04bf23ac8e8b8ec627.png" alt="Screen_Shot_2022-08-20_at_2.32.40_PM.png" loading="lazy"></p>&#10;</li>&#10;<li>&#10;<p>To have Selenium scroll down and then click on the Final resource link, you can use the code below.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Test&#10; void automaticScrollDown() {&#10;   driver.get("http://localhost:" + port + "/start");&#10;&#10;   var link = driver.findElement(By.linkText("Last Link"));&#10;&#10;   //link.click(); //First way&#10;&#10;   //Second way&#10;   new WebDriverWait(driver, Duration.ofSeconds(5))&#10;         .until(ExpectedConditions.elementToBeClickable(link))&#10;         .click();&#10; }</code></pre>&#10;</li>&#10;</ol>&#10;<p>Note that the example above shows two different ways of doing this. <code class="language-clike">click()</code> is super simple and should work in most cases. At some other times, though, you might need to <a href="https://www.daniweb.com/programming/software-development/tutorials/538450/waiting-for-elements-in-selenium">wait</a> until the content of the page is loaded after scrolling (think of lazy news feed). This is when you should have to wait.</p>&#10;<p>Not only Selenium can scroll down, we can also have Selenium automatically scroll up to find the element. In the screenshot below, the First Link link is all the way at the top of the page.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/bacfec0732e102e3074d5c4dce0e06d0.png" alt="Screen_Shot_2022-08-20_at_2.43.46_PM.png" loading="lazy"></p>&#10;<p>The code example below is an example of how to have Selenium automatically scrolls up. Because Selenium first opens the browser at the top, we will have to make the browser scrolls to the bottom first by sending over the End key.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">   @Test&#10;  void automaticScrollUp(){&#10;     driver.get("http://localhost:" + port + "/start");&#10;&#10;     // Scrolls to end of page&#10;     new Actions(driver)&#10;           .sendKeys(Keys.END)&#10;           //.keyDown(Keys.COMMAND) // For Mac&#10;           //.sendKeys(Keys.DOWN)&#10;           .perform();&#10;&#10;     var link = driver.findElement(By.linkText("First Link"));&#10;     link.click();&#10;&#10;/*    new WebDriverWait(driver, Duration.ofSeconds(5))&#10;           .until(ExpectedConditions.elementToBeClickable(link))&#10;           .click();*/&#10;  }</code></pre>&#10;<p>Notice that, in both examples, we did not have to tell Selenium which direction to scroll (<em>up or down</em>) at all. Selenium can automatically figure this out by itself.</p>&#10;<h2>Summary</h2>&#10;<p>We have learned how to perform a scrolling action using Selenium. If you want to learn more scrolling use cases, check out <a href="https://www.daniweb.com/programming/software-development/tutorials/538449/perform-scrolling-actions-in-selenium-part-2">Part 2</a>. The full project code can be found at <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/scrolling">https://github.com/dmitrilc/Daniweb_Selenium/tree/scrolling</a>.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538448/perform-scrolling-actions-in-selenium-part-1</guid>
    		</item>
    		    		<item>
    			<title>Basic Interactions With Web Elements In Selenium</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538447/basic-interactions-with-web-elements-in-selenium</link>
    			<pubDate>Sun, 21 Aug 2022 15:52:24 +0000</pubDate>
    			<description>## Introduction ## When creating a Selenium test, it is common for developers to want their scripts to take the same actions as a real human user would take. These action often includes clicking on elements or inputting text data into forms. In this tutorial, we will learn how to ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>When creating a Selenium test, it is common for developers to want their scripts to take the same actions as a real human user would take. These action often includes clicking on elements or inputting text data into forms.</p>&#10;<p>In this tutorial, we will learn how to perform both clicks and sending text on a web page.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to perform <em>click</em> and sending text actions using Selenium.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<p>A Java IDE such as <strong>IntelliJ IDEA</strong> version <strong>2022.2.1</strong> (<em>Community Edition</em>).</p>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium#post2287042">Basic Selenium</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/538412/how-to-use-the-selenium-ide-to-generate-tests#post2287043">Selenium IDE</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/535964/how-to-create-a-restful-api-with-spring-boot#post2280489">Basic Spring</a>.</li>&#10;</ol>&#10;<p><em>I expect that you already know how to set up your project with Selenium and how to spy elements, so how I will not show how to do that in this tutorial.</em></p>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Clone <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/element_interactions">this</a> repository, switching to the <strong>element_interactions</strong> branch.</li>&#10;</ol>&#10;<h2>Clicking On Elements</h2>&#10;<p>Clicking on an element is the easiest and probably most common that your scripts need to take. Calls to <code class="language-clike">findElement()</code> from the <strong>WebDriver</strong> will often result in a <strong>WebElement</strong> (<em>unless any Exceptions are thrown</em>). The <strong>WebElement</strong> interface has the <code class="language-clike">click()</code> that you can call to perform the <em>click</em> action on the respective element.</p>&#10;<p>The <code class="language-clike">click()</code> test in the <strong>SeleniumApplicationTests</strong> file demonstrates how to perform the <em>click</em> action.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void click(){&#10;  driver.get("http://localhost:" + port);&#10;&#10;  driver.findElement(By.cssSelector(".btn-outline-primary"))&#10;        .click();&#10;}</code></pre>&#10;<h2>Verifying After Click</h2>&#10;<p>Oftentimes, we would like to verify whether something on the page has changed after a <em>click</em> action. </p>&#10;<p>In our project, clicking on Get Started </p>&#10;<p><img src="https://static.daniweb.com/attachments/4/71439d70e6f5ee51373cd610417ab11d.png" alt="Screen_Shot_2022-08-19_at_8.25.30_PM.png" loading="lazy"></p>&#10;<p>will open up a new page called <strong>start.html</strong>.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/4c77f5c815d96e6ba496b24198015fdd.png" alt="Screen_Shot_2022-08-19_at_8.26.55_PM.png" loading="lazy"></p>&#10;<p>Here is the code for loading the /start endpoint.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@GetMapping("/start")&#10;public String start() {&#10;  return "start";&#10;}</code></pre>&#10;<p>If the <em>click</em> action leads the user to a new page, such as in the case of the Get Started button on our home page, you can verify the new pages title or URL via <strong>WebDriver</strong>s convenient methods <code class="language-clike">getTitle()</code> or <code class="language-clike">getUrl()</code>.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void clickThenVerify(){&#10;  driver.get("http://localhost:" + port);&#10;&#10;  driver.findElement(By.xpath("//button[contains(.,'Get started')]"))&#10;        .click();&#10;&#10;  var title = driver.getTitle();&#10;  assertEquals(title, "Get Started");&#10;}</code></pre>&#10;<h2>Input Text Using Selenium</h2>&#10;<p>Another common use case for Selenium is to use input some text into text boxes. In our project, the end point /checkout will load a form.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/bb02a0f9124d699b03e67c8db225e163.png" alt="Screen_Shot_2022-08-19_at_8.29.03_PM.png" loading="lazy"></p>&#10;<p>To input text, we can simply use the <code class="language-clike">sendKeys()</code> method from the <strong>WebDriver</strong> object. This will only work if the element is one that you can key in text to.</p>&#10;<p>The test below send keys into the First name and Last name fields using <code class="language-clike">sendKeys()</code>.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void inputText(){&#10;  driver.get("http://localhost:" + port + "/checkout");&#10;&#10;  // More organic if you click on&#10;  // the text box before sending text&#10;  driver.findElement(By.id("firstName"))&#10;        .click();&#10;&#10;  driver.findElement(By.id("firstName"))&#10;        .sendKeys("Anne");&#10;  driver.findElement(By.id("lastName"))&#10;        .sendKeys("Chan");&#10;}</code></pre>&#10;<h2>Test Fidelity</h2>&#10;<p>Did you notice that we have only clicked on the First name text box and not the second? A real human user will not, theoretically, send text to the second field, Last name without focusing on it first via one of the following ways:</p>&#10;<ol>&#10;<li>Clicking on the Last name text box.</li>&#10;<li>Press Tab while having the focus on the First name text box.</li>&#10;<li>Using some accessibility service.</li>&#10;</ol>&#10;<p>Our test will still pass with flying colors, but because we did not replicate the same behavior as a real human user, our test now have reduced <strong>fidelity</strong>, which is often used to describe how real-worlds a test is. It is very possible that the website will show some a popup after clicking on the First name to show some important information.</p>&#10;<h2>Summary</h2>&#10;<p>We have learned how to perform <em>click</em> and <strong>input text</strong> actions using Selenium. The full project code can be found at <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/element_interactions">https://github.com/dmitrilc/Daniweb_Selenium/tree/element_interactions</a>.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538447/basic-interactions-with-web-elements-in-selenium</guid>
    		</item>
    		    		<item>
    			<title>How to Use The Selenium IDE To Generate Tests</title>
    			<link>https://www.daniweb.com/programming/web-development/tutorials/538412/how-to-use-the-selenium-ide-to-generate-tests</link>
    			<pubDate>Tue, 16 Aug 2022 02:37:22 +0000</pubDate>
    			<description>## Introduction ## While creating Selenium tests, you might have found that inspecting elements manually using the web browsers inspector could be tedious. Even after you have found the element, you still have to go through the pain of looking up the correct **xpath** syntax for this specific element. To ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>While creating Selenium tests, you might have found that inspecting elements manually using the web browsers inspector could be tedious. Even after you have found the element, you still have to go through the pain of looking up the correct <strong>xpath</strong> syntax for this specific element.</p>&#10;<p>To solve this problem, you can employ the use of a tool called the <strong>Selenium IDE</strong>. This program can run inside your Chrome, FireFox, and Edge browsers as a plugin.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to use Selenium IDE to generate test code.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>One of the following web browsers: Chrome, FireFox, Edge.</li>&#10;<li>A Java IDE such as <strong>IntelliJ IDEA</strong> version <strong>2022.2</strong> (<em>Community Edition</em>).</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium#post2287042">Basic Selenium</a>.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/535964/how-to-create-a-restful-api-with-spring-boot#post2280489">Basic Spring</a>.</li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>If you have FireFox, download the IDE as a plugin from the official <a href="https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/">extensions page</a>.</li>&#10;<li>If you have Chrome or Edge, install the IDE from the official <a href="https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd">web store</a>.</li>&#10;<li>This tutorial is a continuation of the <a href="https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium">basic Selenium tutorial</a>, so go ahead and clone this <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/setup_maven_it">repository</a>, switching to the <code class="language-clike">setup_maven_it</code> branch.</li>&#10;<li>After you are finished cloning the repo, start the server by running the <strong>SeleniumApplication</strong> class. You should see the <strong>Pricing Example</strong> home page at this point.</li>&#10;</ol>&#10;<h2>Start The Selenium IDE</h2>&#10;<p>After you have installed the Selenium IDE, it should show up on your browsers plugins section, usually at the top right. To start the Selenium IDE, </p>&#10;<ol>&#10;<li>&#10;<p>Click on the plugins icon.</p>&#10;</li>&#10;<li>&#10;<p>Select <strong>Record a new test in a new project</strong>.<br>&#10;<img src="https://static.daniweb.com/attachments/4/fbdf8ee506c16e19f3a48925ce62bc21.png" alt="Screen_Shot_2022-08-14_at_9.30.31_PM.png" loading="lazy"></p>&#10;</li>&#10;<li>&#10;<p>When prompted for the <strong>Project Name</strong>, use any name that you like.</p>&#10;</li>&#10;<li>&#10;<p>When prompted for the <strong>Base URL</strong>, use <code class="language-clike">http://localhost:8080**</code>, and then select <strong>Start Recording</strong>.</p>&#10;</li>&#10;<li>&#10;<p>You should now see a pop up that says <code class="language-clike">Selenium is Recording</code> at the bottom right of the page.<br>&#10;<img src="https://static.daniweb.com/attachments/4/76bb2c5353bd2e86c6d12d0ecb76305c.png" alt="Screen_Shot_2022-08-14_at_9.43.16_PM.png" loading="lazy"></p>&#10;</li>&#10;<li>&#10;<p>Your browser should have opened another tab, which is the IDEs user interface. This interface is for managing the steps recorded.</p>&#10;</li>&#10;</ol>&#10;<p><img src="https://static.daniweb.com/attachments/4/1dd277be6bfeed5647d4aea24dc740b2.png" alt="Screen_Shot_2022-08-14_at_9.49.04_PM.png" loading="lazy"></p>&#10;<h2>Record Steps</h2>&#10;<p>To record the steps that you take on the site, simply click on any element you want. The screenshot below shows the steps that I took on the web browser, clicking on random elements from the left to the right.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/f7de1dd03283b830e1460a880ce871d3.png" alt="Screen_Shot_2022-08-14_at_10.02.24_PM.png" loading="lazy"></p>&#10;<p>For each element that you spied, the IDE generates a few options for matching that element on the web browser.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/d260b7643e1a0d95973adc5bef7d46c5.png" alt="Screen_Shot_2022-08-14_at_10.04.39_PM.png" loading="lazy"></p>&#10;<p>You should put <a href="https://www.selenium.dev/documentation/test_practices/encouraged/">performance</a> and flakiness into consideration when choosing one locator over another. The topic over performance is large and cannot be covered in this tutorial.</p>&#10;<h2>Generate Code From Recorded Steps</h2>&#10;<p>When you are done with the test, you can right-click on the test name and select <strong>Export</strong>.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/ba1e7c86fcc38aa45d8b75284685dbf0.png" alt="Screen_Shot_2022-08-14_at_10.17.20_PM.png" loading="lazy"></p>&#10;<p>The IDE can export more than just Java code. A few other languages are also supported.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/65fd865b748d858ccef4039972617461.png" alt="Screen_Shot_2022-08-14_at_10.19.05_PM.png" loading="lazy"></p>&#10;<p>The exported file might look like this:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">public class TestTest {&#10; private WebDriver driver;&#10; private Map&lt;String, Object&gt; vars;&#10; JavascriptExecutor js;&#10; @Before&#10; public void setUp() {&#10;   driver = new ChromeDriver();&#10;   js = (JavascriptExecutor) driver;&#10;   vars = new HashMap&lt;String, Object&gt;();&#10; }&#10; @After&#10; public void tearDown() {&#10;   driver.quit();&#10; }&#10; @Test&#10; public void test() {&#10;   driver.get("http://localhost:8080/");&#10;   driver.manage().window().setSize(new Dimension(1728, 1015));&#10;   driver.findElement(By.cssSelector("body")).click();&#10;   driver.findElement(By.cssSelector(".fs-4")).click();&#10;   driver.findElement(By.linkText("Features")).click();&#10;   driver.findElement(By.linkText("Enterprise")).click();&#10;   driver.findElement(By.linkText("Support")).click();&#10;   driver.findElement(By.linkText("Pricing")).click();&#10;   driver.findElement(By.cssSelector(".border-primary .w-100")).click();&#10;   driver.findElement(By.cssSelector(".btn-outline-primary")).click();&#10; }&#10;}</code></pre>&#10;<p>This is human-readable code, so all you need to do is to copy and paste the content of the <code class="language-clike">test()</code> method into your own code. You should modify the <code class="language-clike">driver.get()</code> call because our test uses a different port number.</p>&#10;<p>After copying the recorded test into our project, we have the new test below.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void automatedTest(){&#10;  driver.get("http://localhost:" + port);&#10;  driver.manage().window().setSize(new Dimension(1728, 1015));&#10;  driver.findElement(By.cssSelector("body")).click();&#10;  driver.findElement(By.cssSelector(".fs-4")).click();&#10;  driver.findElement(By.linkText("Features")).click();&#10;  driver.findElement(By.linkText("Enterprise")).click();&#10;  driver.findElement(By.linkText("Support")).click();&#10;  driver.findElement(By.linkText("Pricing")).click();&#10;  driver.findElement(By.cssSelector(".border-primary .w-100")).click();&#10;  driver.findElement(By.cssSelector(".btn-outline-primary")).click();&#10;}</code></pre>&#10;<p>You can switch to the <code class="language-clike">ide_record</code> branch of the repository to see this test in your project.</p>&#10;<h2>Summary</h2>&#10;<p>We have learned how to record automation steps using the Selenium IDE in this tutorial. The full project code can be found at <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/ide_record">https://github.com/dmitrilc/Daniweb_Selenium/tree/ide_record</a>.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/web-development/6">Web Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/web-development/tutorials/538412/how-to-use-the-selenium-ide-to-generate-tests</guid>
    		</item>
    		    		<item>
    			<title>Run Automated Browser Tests With Spring And Selenium</title>
    			<link>https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium</link>
    			<pubDate>Tue, 16 Aug 2022 02:36:28 +0000</pubDate>
    			<description>## Introduction ## Selenium is one of the most popular web browser automation tools out there. There is no restriction on what you can use Selenium for. You can use it to build a GPU scalping bot (*please dont*) or build e2e tests for your website. In this tutorial, we ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>Selenium is one of the most popular web browser automation tools out there. There is no restriction on what you can use Selenium for. You can use it to build a GPU scalping bot (<em>please dont</em>) or build e2e tests for your website.</p>&#10;<p>In this tutorial, we will be learning how to set up a Maven Spring project to automatically start and stop the server when selenium tests are run.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to set up your Maven Spring project for automated browser tests.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>A Java IDE such as <strong>IntelliJ IDEA</strong> version <strong>2022.2</strong> (<em>Community Edition</em>).</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>Basic Java.</li>&#10;<li><a href="https://www.daniweb.com/programming/web-development/tutorials/535964/how-to-create-a-restful-api-with-spring-boot#post2280489">Basic Spring</a>.</li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Clone the project on from this <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/setup_maven_it">repository</a>.</li>&#10;<li>Make sure that you switch to the <strong>setup_maven_it</strong> branch.</li>&#10;</ol>&#10;<h2>Project Overview</h2>&#10;<p>This is a very minimal Spring Boot project. It only contains three dependencies:</p>&#10;<ol>&#10;<li>&#10;<p>Spring Boot Starter Web.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">     &lt;dependency&gt;&#10;       &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;       &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;&#10;     &lt;/dependency&gt;</code></pre>&#10;</li>&#10;<li>&#10;<p>Thymeleaf.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> &lt;dependency&gt;&#10;   &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;   &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;&#10; &lt;/dependency&gt;</code></pre>&#10;</li>&#10;<li>&#10;<p>Spring Boot Starter Test.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> &lt;dependency&gt;&#10;   &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;   &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;&#10;   &lt;scope&gt;test&lt;/scope&gt;&#10; &lt;/dependency&gt;</code></pre>&#10;</li>&#10;</ol>&#10;<p>The homepage was downloaded from Bootstrap.</p>&#10;<p><img src="https://static.daniweb.com/attachments/4/7144152481f70557e740a1f9795078ec.png" alt="Screen_Shot_2022-08-14_at_4.30.23_PM.png" loading="lazy"></p>&#10;<p>We will not be doing too much testing in this tutorial, because this tutorial is mainly about setting up the project.</p>&#10;<h2>Selenium Library</h2>&#10;<p>The first thing that we will need to do in our project is to add the Selenium dependency into Mavens <strong>pom.xml</strong> file.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">&lt;dependency&gt;&#10;  &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;&#10;  &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;&#10;  &lt;version&gt;4.4.0&lt;/version&gt;&#10;&lt;/dependency&gt;</code></pre>&#10;<p>The Selenium library includes an interface called <strong>WebDriver</strong>. It is via this interface that we can interact with real web browsers.</p>&#10;<h2>Easily Load Web Browser Drivers Using WebDriverManager</h2>&#10;<p>To interact with the web browsers programmatically, we can use specific web drivers released by browser vendors themselves. There are a couple of ways to install drivers, but the easiest way would be to use <strong>WebDriverManager</strong>, which is a library that will automatically download the drivers for us.</p>&#10;<p>Now, lets add the <strong>WebDriverManager</strong> dependency below into your <strong>pom.xml</strong>.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">&lt;dependency&gt;&#10;  &lt;groupId&gt;io.github.bonigarcia&lt;/groupId&gt;&#10;  &lt;artifactId&gt;webdrivermanager&lt;/artifactId&gt;&#10;  &lt;version&gt;5.2.3&lt;/version&gt;&#10;&lt;/dependency&gt;</code></pre>&#10;<h2>Configure Tests To Start The Web Server</h2>&#10;<p>Spring Boot comes with the ability to launch a web server when running tests. Spring Boot will automatically do this if you annotate the test with <code class="language-clike">@SpringBootTest(webEnvironment = RANDOM_PORT)</code>.</p>&#10;<p>Our empty test class now looks like this.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@SpringBootTest(webEnvironment = RANDOM_PORT)&#10;class SeleniumApplicationTests {&#10;&#10;&#10;}</code></pre>&#10;<p>We will need to know the port number of the started web server at runtime. To inject this port number, we can use the <code class="language-clike">@LocalServerPort</code> on an <code class="language-clike">int</code> instance variable.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@LocalServerPort&#10;int port;</code></pre>&#10;<h2>Write The Selenium Test</h2>&#10;<p>Follow the steps below to set up the Selenium test.<br>&#10;First, we create an instance variable for the <strong>WebDriver</strong>. This is the object that will interact with the web browsers for us.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">WebDriver driver;</code></pre>&#10;<p>Next, we create a method to have the <strong>ChromeDriver</strong> downloaded and made available at runtime. Note that this also means that the driver can only interact with Chrome.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@BeforeAll&#10;static void setupAll() {&#10;  WebDriverManager.chromedriver().setup();&#10;}</code></pre>&#10;<p>For each test, we need to create a new session.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@BeforeEach&#10;void setup() {&#10;  driver = new ChromeDriver();&#10;}</code></pre>&#10;<p>We also need to close the session after each test.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@AfterEach&#10;void teardown() {&#10;  driver.quit();&#10;}</code></pre>&#10;<p>Finally, we create the test logic. This test will wait until the browsers title matches the text.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@Test&#10;void test() {&#10;  driver.get("http://localhost:" + port);&#10;&#10;  new WebDriverWait(driver, ofSeconds(5))&#10;        .until(titleIs("Pricing example  Bootstrap v5.2"));&#10;}</code></pre>&#10;<p>To run the test, you can simply use the run button in your IDE or use the command <code class="language-clike">mvn test</code>.</p>&#10;<h2>Solution Code</h2>&#10;<p><strong>SeleniumApplicationTests.java</strong></p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@SpringBootTest(webEnvironment = RANDOM_PORT)&#10;class SeleniumApplicationTests {&#10;&#10;  @LocalServerPort&#10;  int port;&#10;&#10;  WebDriver driver;&#10;&#10;  @BeforeAll&#10;  static void setupAll() {&#10;     WebDriverManager.chromedriver().setup();&#10;  }&#10;&#10;  @BeforeEach&#10;  void setup() {&#10;     driver = new ChromeDriver();&#10;  }&#10;&#10;  @AfterEach&#10;  void teardown() {&#10;     driver.quit();&#10;  }&#10;&#10;  @Test&#10;  void test() {&#10;     driver.get("http://localhost:" + port);&#10;&#10;     new WebDriverWait(driver, ofSeconds(5))&#10;           .until(titleIs("Pricing example  Bootstrap v5.2"));&#10;  }&#10;&#10;}</code></pre>&#10;<p><strong>pom.xml</strong></p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#10;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&#10;  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;&#10;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;&#10;  &lt;parent&gt;&#10;     &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;     &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;&#10;     &lt;version&gt;2.7.2&lt;/version&gt;&#10;     &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;&#10;  &lt;/parent&gt;&#10;  &lt;groupId&gt;com.daniweb&lt;/groupId&gt;&#10;  &lt;artifactId&gt;selenium&lt;/artifactId&gt;&#10;  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;&#10;  &lt;name&gt;selenium&lt;/name&gt;&#10;  &lt;description&gt;A project teaching Selenium&lt;/description&gt;&#10;  &lt;properties&gt;&#10;     &lt;java.version&gt;18&lt;/java.version&gt;&#10;  &lt;/properties&gt;&#10;  &lt;dependencies&gt;&#10;     &lt;dependency&gt;&#10;        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;        &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;&#10;     &lt;/dependency&gt;&#10;     &lt;dependency&gt;&#10;        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;        &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;&#10;     &lt;/dependency&gt;&#10;&#10;     &lt;dependency&gt;&#10;        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;        &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;&#10;        &lt;scope&gt;test&lt;/scope&gt;&#10;     &lt;/dependency&gt;&#10;     &lt;dependency&gt;&#10;        &lt;groupId&gt;io.github.bonigarcia&lt;/groupId&gt;&#10;        &lt;artifactId&gt;webdrivermanager&lt;/artifactId&gt;&#10;        &lt;version&gt;5.2.3&lt;/version&gt;&#10;     &lt;/dependency&gt;&#10;     &lt;dependency&gt;&#10;        &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;&#10;        &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;&#10;        &lt;version&gt;4.4.0&lt;/version&gt;&#10;     &lt;/dependency&gt;&#10;  &lt;/dependencies&gt;&#10;&#10;  &lt;build&gt;&#10;     &lt;plugins&gt;&#10;        &lt;plugin&gt;&#10;           &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;&#10;           &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;&#10;        &lt;/plugin&gt;&#10;     &lt;/plugins&gt;&#10;  &lt;/build&gt;&#10;&#10;&lt;/project&gt;</code></pre>&#10;<h2>Summary</h2>&#10;<p>We have learned how to configure Spring Boot to run automated browser tests in this tutorial. The full project code can be found at <a href="https://github.com/dmitrilc/Daniweb_Selenium/tree/setup_maven_it">https://github.com/dmitrilc/Daniweb_Selenium/tree/setup_maven_it</a>.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/web-development/6">Web Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/web-development/tutorials/538411/run-automated-browser-tests-with-spring-and-selenium</guid>
    		</item>
    		    		<item>
    			<title>How To Use Kotlin Function Literals</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538410/how-to-use-kotlin-function-literals</link>
    			<pubDate>Tue, 16 Aug 2022 02:35:01 +0000</pubDate>
    			<description>## Introduction ## While **Functional Interfaces** and **Function Types** are used to declare the types of a function, **Function Literals** create the actual implementations of these types. In this tutorial, we will learn what Kotlin **Function Literals** are and how to create them. ## Goals ## At the end of ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>While <strong>Functional Interfaces</strong> and <strong>Function Types</strong> are used to declare the types of a function, <strong>Function Literals</strong> create the actual implementations of these types.</p>&#10;<p>In this tutorial, we will learn what Kotlin <strong>Function Literals</strong> are and how to create them. </p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to create lambdas.</li>&#10;<li>How to create anonymous functions.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>A Kotlin IDE such as <strong>IntelliJ IDEA</strong> version <code class="language-clike">2022.2</code> (<em>Community Edition</em>).</li>&#10;<li>The Kotlin version used in this tutorial is <code class="language-clike">1.7.10</code>.</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>Basic Kotlin</li>&#10;<li><a href="https://www.daniweb.com/programming/software-development/tutorials/538409/how-to-use-kotlin-function-types">Function Types</a></li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Create a new Kotlin project using Gradle as the build system.</li>&#10;<li>For the Project JDK, use JDK 18.</li>&#10;</ol>&#10;<h2>Lambda Expressions</h2>&#10;<p>The syntax for a lambda expression includes the following rules:</p>&#10;<ol>&#10;<li>Must always be surrounded by curly braces.</li>&#10;<li>Parameters go inside the curly braces, to the left of the arrow (<code class="language-clike">-&gt;</code>). Type annotation is optional if no explicit function type is declared on the variable, parameter, and return type.</li>&#10;<li>The body goes inside the curly braces, after the arrow (<code class="language-clike">-&gt;</code>).</li>&#10;<li>Unless the return type of the lambda is Unit, the lambda implicitly returns the last expression or the single value.</li>&#10;</ol>&#10;<p>Here is an example of a lambda expression:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">val timesTwo: (Int) -&gt; Int = { x: Int -&gt; x * 2 }</code></pre>&#10;<p><img src="https://static.daniweb.com/attachments/4/ecc1c44ae1119efe7102c86849d69dae.png" alt="Screen_Shot_2022-08-14_at_10.42.21_AM.png" loading="lazy"></p>&#10;<p>Because the type declaration already specified the parameter type, we can skip that in the lambdas parameter as well.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">val timesThree: (Int) -&gt; Int = { x -&gt; x * 2 }</code></pre>&#10;<p>The type declaration can be skipped entirely when the lambda contains enough information for the compiler to infer the parameter and return type.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">val timesFour = { x: Int -&gt; x * 2}</code></pre>&#10;<p>Here is an example of lambda expression being used as function arguments.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun onClick(listener: (Any)-&gt;Unit){}&#10;&#10;onClick (&#10;   { any -&gt; }&#10;)&#10;</code></pre>&#10;<p>And here is an example of lambda expression being used as return values</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun getLambda(): (Int)-&gt;String {&#10;   return { x -&gt; "$x" }&#10;}</code></pre>&#10;<p>This is an even shorter version of <code class="language-clike">getLambda()</code>.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun getLambda() = { x: Int -&gt; "$x" }</code></pre>&#10;<h2>Passing Trailing Lambda Syntax</h2>&#10;<p>When the last parameter of a function is a function, then you can use a special syntax called <em>passing trailing lambda</em>, which allows you to place the lambda expression outside the parentheses.</p>&#10;<p>The <code class="language-clike">onClick()</code> function used in the previous section </p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">onClick (&#10;   { any -&gt; }&#10;)</code></pre>&#10;<p>can be we rewritten using the <em>passing trailing lambda</em> syntax</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">onClick { any -&gt;  }</code></pre>&#10;<p>Since the listener was the only parameter on <code class="language-clike">onClick()</code>, we can skip the parentheses entirely.</p>&#10;<h2>Anonymous Functions</h2>&#10;<p>Anonymous functions are similar to lambdas, but with only a few differences:</p>&#10;<ol>&#10;<li>You do not need to wrap it inside curly braces.</li>&#10;<li>It looks exactly the same as a regular function, but without a name.</li>&#10;<li>You can use the <code class="language-clike">return</code> keyword directly in the function body.</li>&#10;</ol>&#10;<p>Below is an example of an anonymous function being used with a variable.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">val timesTwo = fun(x: Int): Int {&#10;   return x * 2&#10;}&#10;&#10;timesTwo(1)</code></pre>&#10;<p>Here is an example of an anonymous function being used as a return value.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun getLambda3(): (Int)-&gt;String {&#10;   return fun(x: Int): String{&#10;       return "$x"&#10;   }&#10;}</code></pre>&#10;<p>and its shorter version</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun getLambda4() = fun(x: Int): String { return "$x" }</code></pre>&#10;<p>Finally, this is how you can pass an anonymous function as an argument to another function.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">onClick(fun(any){})</code></pre>&#10;<h2>Summary</h2>&#10;<p>We have learned Kotlins lambda expressions and anonymous functions in this tutorial. </p>&#10;<p>When working on real code, I rarely see anonymous function being used over lambda expressions because anonymous functions are much more verbose.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538410/how-to-use-kotlin-function-literals</guid>
    		</item>
    		    		<item>
    			<title>How To Use Kotlin Function Types</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538409/how-to-use-kotlin-function-types</link>
    			<pubDate>Tue, 16 Aug 2022 02:33:39 +0000</pubDate>
    			<description>## Introduction ## Whenever I want to express method parameters, return type or variables as a *method* in Java, I often find myself having to do a bit of work: 1. If I cannot remember which pre-made **functional interface** to use, then I will have to look up the list ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>Whenever I want to express method parameters, return type or variables as a <em>method</em> in Java, I often find myself having to do a bit of work:</p>&#10;<ol>&#10;<li>If I cannot remember which pre-made <strong>functional interface</strong> to use, then I will have to look up the list of pre-made functional interfaces from the Java SE <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/util/function/package-summary.html">documentation</a>.</li>&#10;<li>But the problem does not stop there. If none of the functional interfaces on the list fit my use case, then I would have to resort to making my own functional interface. This is tedious and pollute my project with functional interfaces, especially if they are only used once.</li>&#10;</ol>&#10;<p>Kotlin (<em>and a few other languages</em>) have a feature called <strong>Function Type</strong>, which allows you to declare function <em>parameters</em>, function <em>return value</em>, and <em>variables</em> as having a function as their types. With function types, we can skip creating our own functional interfaces, reducing boilerplate.</p>&#10;<p>In this tutorial, we will learn how to use Function Types in our code.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>How to create and use Function Types.</li>&#10;</ol>&#10;<h2>Tools Required</h2>&#10;<ol>&#10;<li>A Kotlin IDE such as <strong>IntelliJ IDEA</strong> version <code class="language-clike">2022.2</code> (<em>Community Edition</em>).</li>&#10;<li>The Kotlin version used in this tutorial is <code class="language-clike">1.7.10</code>.</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>Basic Kotlin.</li>&#10;<li>Java Functional Interfaces (optional).</li>&#10;</ol>&#10;<h2>Project Setup</h2>&#10;<p>To follow along with the tutorial, perform the steps below:</p>&#10;<ol>&#10;<li>Create a new Kotlin project using Gradle as the build system.</li>&#10;<li>For the Project JDK, use JDK 18.</li>&#10;</ol>&#10;<h2>Function Type As Function Parameter</h2>&#10;<p>The code below illustrates how Functional Interfaces can be used on Java method parameters.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">void functionalParams(Function&lt;Integer,Integer&gt; timesTwo){&#10;  timesTwo.apply(1);&#10;}</code></pre>&#10;<p>This is the Kotlin equivalence.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun functionalParams(timesTwo: Function&lt;Int, Int&gt;){&#10;   timesTwo.apply(1)&#10;}</code></pre>&#10;<p>Using Function Type, the Kotlin equivalence can be rewritten as.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun functionTypeParams(timesTwo: (Int)-&gt;Int){&#10;   timesTwo(1)&#10;}</code></pre>&#10;<p>As you can see, <code class="language-clike">Function&lt;Int,Int&gt;</code> has been replaced with <code class="language-clike">(Int)-&gt;Int</code>, which has the same parameter type and return type as <code class="language-clike">Function&lt;Int,Int&gt;</code>s SAM (<em>single abstract method</em>) <code class="language-clike">Integer apply(Integer t)</code>.</p>&#10;<p>In my opinion, <code class="language-clike">(Int)-&gt;Int</code> is easier to read than <code class="language-clike">Function&lt;Int,Int&gt;</code> as well because the SAM is completely exposed as you are reading the code. When encountering Javas functional interfaces, I often find myself looking up the method signature of the SAM as a sanity check.</p>&#10;<p>As an added bonus, we were able to skip the <code class="language-clike">apply()/invoke()</code> function call as well because of the convenient <code class="language-clike">invoke()</code> operator.</p>&#10;<p>Function Type is not an exclusive to Kotlin, other languages that I am familiar with also have a similar feature. TypeScript and Swift versions of <code class="language-clike">functionTypeParams()</code> are shown below.</p>&#10;<p>TypeScript:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">function functionTypeParams(timesTwo: (n: number) =&gt; number) {&#10;timesTwo(1)&#10;}</code></pre>&#10;<p>Swift:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">func functionTypeParams(_ timesTwo: (Int)-&gt;Int) {&#10;    timesTwo(1)&#10;}</code></pre>&#10;<h2>Function Type As Function Return Type</h2>&#10;<p>Function Types can also appear as a functions return type. The code below shows how this looks like.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun returnFunctionType(): (Int)-&gt;Int = { n -&gt; n * 2 }</code></pre>&#10;<p>Kotlin allows us to skip explicit type declaration for return types as well, so we can have the return type inferred by the compiler, producing a shorter version below.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">fun returnFunctionTypeAlt() = { n: Int -&gt; n * 2 }</code></pre>&#10;<h2>Function Type As Variable Type</h2>&#10;<p>Lastly, you can also assign Function Types to variables.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">val timesTwo: (Int)-&gt;Int = { n -&gt; n * 2 }&#10;timesTwo(1)</code></pre>&#10;<p>Similarly to how we were able to skip the explicit type declaration, we can also skip the explicit type declaration on variables.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">val timesThree = { n: Int -&gt; n*3 }&#10;timesThree(1)</code></pre>&#10;<h2>Higher-Order Functions</h2>&#10;<p>A function is also considered a Higher-Order Function when it either receives a function as a parameter or returning a function.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538409/how-to-use-kotlin-function-types</guid>
    		</item>
    		    		<item>
    			<title>Cam someone please assist me? what I have so far is dreadful</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538359/cam-someone-please-assist-me-what-i-have-so-far-is-dreadful</link>
    			<pubDate>Fri, 05 Aug 2022 22:00:36 +0000</pubDate>
    			<description>You must write a small application in JAVA for items and their prices. Your program must: 1. Create an array of item names. Use the following item names: Bread, Milk, Butter, Chips, Honey, Soap, Towel, Carrots, Beans, Samp, Dress, Pants, Shoes, Socks. 2. Create an array of item prices. Use ...</description>
    			    			<content:encoded><![CDATA[ <p>You must write a small application in JAVA for items and their prices. Your program must:</p>&#10;<ol>&#10;<li>Create an array of item names. Use the following item names: Bread, Milk, Butter, Chips,<br>&#10;Honey, Soap, Towel, Carrots, Beans, Samp, Dress, Pants, Shoes, Socks.</li>&#10;<li>Create an array of item prices. Use the following item prices: 15.50, 12.00, 56.00, 20.00, 45.00,<br>&#10;7.00, 75.00, 8.00, 5.00, 12.00, 200.00, 150.00, 400.00, 25.00.</li>&#10;<li>Display every item name and its corresponding price. See the sample output given.</li>&#10;<li>Print the average price of all the items.</li>&#10;<li>&#10;<div class="h2">Find and display the price of a specific item<br>&#10;a. Read in the name of the item.<br>&#10;b. Loop through the items array and look for the specific item.<br>&#10;c. If the item is found, display the price of the item.<br>&#10;SAMPLE OUTPUT<br>&#10;Display every item name and its corresponding price.<br>&#10;Items in stock with prices</div>&#10;<p>Bread - R15.5<br>&#10;Milk - R12.0<br>&#10;Butter - R56.0<br>&#10;Chips - R20.0<br>&#10;Honey - R45.0<br>&#10;Soap - R7.0<br>&#10;Towel - R75.0<br>&#10;Carrots - R8.0<br>&#10;Beans - R5.0<br>&#10;Samp - R12.0<br>&#10;Dress - R200.0<br>&#10;Pants - R150.0<br>&#10;Shoes - R400.0<br>&#10;Socks - R25.0<br>&#10;Display the average price of all the items<br>&#10;The average price of all the items is R73.6<br>&#10;Find and display the price of a specific item  Sample input and output<br>&#10;Sample run 1 Sample run 2<br>&#10;Item Look-up<br>&#10;What item are you looking for?<br>&#10;Dress<br>&#10;The price of item Dress is R200.0<br>&#10;Item Look-up<br>&#10;What item are you looking for?<br>&#10;hjgjg<br>&#10;Item hjgjg is not stocked in the shop.</p>&#10;</li>&#10;</ol>&#10;<p>What I have:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">public class ShopApp&#10;&#10;&#10;public static void main(String args[])&#10;&#10;&#10;Shop items[]=new Shop[14];&#10;items[0]=new Shop("Bread", (int) 15.00);&#10;items[1]=new Shop("Milk", (int) 12.00);&#10;items[2]=new Shop("Butter", (int) 56.00);&#10;items[4]=new Shop("Chips", (int) 20.00);&#10;items[5]=new Shop("Honey", (int) 45.00);&#10;items[6]=new Shop("Soap", (int) 7.00);&#10;items[7]=new Shop("Towel", (int) 75.00);&#10;items[8]=new Shop("Carrots", (int) 8.00);&#10;items[9]=new Shop("Beans", (int) 5.00);&#10;items[10]=new Shop("Samp", (int) 12.00);&#10;items[11]=new Shop("Dress", (int) 200.00);&#10;items[12]=new Shop("Pants", (int) 150.00);&#10;items[13]=new Shop("Shoes", (int) 400.00);&#10;items[14]=new Shop("Socks", (int) 25.00);&#10;&#10;    for (Shop item : items) {&#10;        System.out.println("Item: " + item.item + ", Price:" + item.price);&#10;    } &#10;&#10;    }&#10;&#10;class Shop&#10;&#10;&#10;String item;&#10;int price;&#10;&#10;public Shop(String item,int price)&#10;&#10;this.item=item;&#10;this.price=price;</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Zunnie</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538359/cam-someone-please-assist-me-what-i-have-so-far-is-dreadful</guid>
    		</item>
    		    		<item>
    			<title>SSH command to pass rsa key</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538327/ssh-command-to-pass-rsa-key</link>
    			<pubDate>Tue, 02 Aug 2022 07:42:46 +0000</pubDate>
    			<description>I don&#39;t want to pass ssh key through a file. I want to pass it along with the ssh command only along with user@ip. Can I modify that ssh command? Can anyone provide me the command to pass rsa key along with user?</description>
    			    			<content:encoded><![CDATA[ <p>I don't want to pass ssh key through a file. I want to pass it along with the ssh command only along with user@ip. Can I modify that ssh command? Can anyone provide me the command to pass rsa key along with user?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Programmer18</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538327/ssh-command-to-pass-rsa-key</guid>
    		</item>
    		    		<item>
    			<title>Java code to open application(.exe file) placed inside eclipse framework</title>
    			<link>https://www.daniweb.com/programming/threads/538317/java-code-to-open-application-exe-file-placed-inside-eclipse-framework</link>
    			<pubDate>Mon, 01 Aug 2022 08:52:19 +0000</pubDate>
    			<description>Hi. So I want to open a application from Java code and open a new terminal for that application also through Java code. We can open the new terminal manually by entering ctrl+alt+t. But I need to do this via code without entering any keys. Can anyone suggest something?</description>
    			    			<content:encoded><![CDATA[ <p>Hi. So I want to open a application from Java code and open a new terminal for that application also through Java code. We can open the new terminal manually by entering ctrl+alt+t. But I need to do this via code without entering any keys. Can anyone suggest something?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Programmer18</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538317/java-code-to-open-application-exe-file-placed-inside-eclipse-framework</guid>
    		</item>
    		    		<item>
    			<title>Java Basics - Dependency Injection</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538278/java-basics-dependency-injection</link>
    			<pubDate>Wed, 27 Jul 2022 22:18:08 +0000</pubDate>
    			<description>## Introduction ## When following tutorials on Daniweb, you might have run into one that requires knowledge about **Dependency Injection** as a prerequisite. People might also sometimes use the term **Inversion of Control** interchangeably with DI. These terms are related to one another, but they are not the same. In ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>When following tutorials on Daniweb, you might have run into one that requires knowledge about <strong>Dependency Injection</strong> as a prerequisite. People might also sometimes use the term <strong>Inversion of Control</strong> interchangeably with DI.</p>&#10;<p>These terms are related to one another, but they are not the same. In this article, we will learn the basics of <strong>Dependency Injection</strong> and I will attempt to explain it in the simplest way possible.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the article, you would have learned:</p>&#10;<ol>&#10;<li>What dependency injection is.</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>Basic Java.</li>&#10;</ol>&#10;<h2>Dependency Injection vs. Inversion of Control</h2>&#10;<p>IoC refers to a programming principle where a framework calls your code instead of your code interacting with a particular device by itself. Because the framework is directly interacting with the device, but not your code, the control has been inverted from you to the framework. </p>&#10;<p>An example of this is the Android <strong>Activity</strong> class, where you are mostly responsible for defining what to do at lifecycle callbacks, such as <code class="language-clike">onStart()</code>, or <code class="language-clike">onPause()</code>. The Android system is responsible for calling your code when your App is started or paused.</p>&#10;<p>The opposite of IoC is when you open a database connection yourself, execute whatever queries that you need, and then closing the connection. You are in control here and no framework is calling your code.</p>&#10;<p>DI is a little different to IoC because with DI, you are only giving up the control of the creation of dependencies. You simply state what you need, and then an <strong>injector</strong> will provide the dependencies to you. You do not need to know what an injector is in this basic article. Furthermore, you can simply think of them as classes that provide dependencies to your class.</p>&#10;<h3>Common types of Dependency Injection</h3>&#10;<p>The three most common types of DI are:</p>&#10;<ol>&#10;<li>&#10;<p><strong>Constructor injection</strong>: the DI framework or injector will provide dependencies to the constructor on object creation. </p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> class Foo {&#10;&#10;    //Foo depends on Bar&#10;    private final Bar bar;&#10;&#10;    //Injector will provide an instance of Bar&#10;    //on creation of Foo&#10;    Foo(Bar bar){&#10;        this.bar = bar;&#10;    }&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p><strong>Setter injection</strong>: The DI framework or injector class will call the setter method, providing the dependency after the object has been created.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> class Foo {&#10;    private Bar bar;&#10;&#10;    public void setBar(Bar bar) {&#10;        this.bar = bar;&#10;    }&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p><strong>Field Injection</strong>: The DI framework or injector will set the value for the field directly via reflection. This type of DI incur a performance cost, so certain DI frameworks, such as Dagger 2, do not support it.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> class Foo {&#10;    private Bar bar;&#10; }</code></pre>&#10;</li>&#10;</ol>&#10;<p>There is also another type of DI called <strong>Interface Injection</strong>, but I have not seen it used widely, so I would not cover it here.</p>&#10;<h3>Manual Dependency Injection</h3>&#10;<p>Sometimes, Manual DI might be brought up. This refers to you creating your own dependency container, putting you in charge of managing the shared dependencies among your classes. This approach makes sense if you do not want to bring in a DI framework as a dependency, or maybe your app is small. Since this topic deserves its own tutorial, I will have to discuss in a separate article.</p>&#10;<p>Most of the time, I prefer to use a DI framework because I would rather focus on providing features in my application instead of re-inventing the wheel.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538278/java-basics-dependency-injection</guid>
    		</item>
    		    		<item>
    			<title>Java Basics - Annotations</title>
    			<link>https://www.daniweb.com/programming/software-development/tutorials/538277/java-basics-annotations</link>
    			<pubDate>Wed, 27 Jul 2022 22:18:02 +0000</pubDate>
    			<description>## Introduction ## Java annotations are often used to provide extra information for compilers, IDEs, and build tools. The extra information is often used to enhance the development cycle, such as reducing boilerplate, eliminating repetitive code, or warning against unsafe usage or mistakes. This tutorial aims to teach you the ...</description>
    			    			<content:encoded><![CDATA[ <h2>Introduction</h2>&#10;<p>Java annotations are often used to provide extra information for compilers, IDEs, and build tools. The extra information is often used to enhance the development cycle, such as reducing boilerplate, eliminating repetitive code, or warning against unsafe usage or mistakes.</p>&#10;<p>This tutorial aims to teach you the basic amount of knowledge about annotations, so that you can identify them and know what to search for in your coding journey.</p>&#10;<h2>Goals</h2>&#10;<p>At the end of the tutorial, you would have learned:</p>&#10;<ol>&#10;<li>What Java annotations are.</li>&#10;<li>When to use Java annotations.</li>&#10;</ol>&#10;<h2>Tools Used</h2>&#10;<ol>&#10;<li>A Java IDE. <strong>IntelliJ CE version #IC-221.6008.13</strong> was used for this tutorial.</li>&#10;<li><strong>Java 18</strong> was used.</li>&#10;</ol>&#10;<h2>Prerequisite Knowledge</h2>&#10;<ol>&#10;<li>Basic Java.</li>&#10;</ol>&#10;<h2>Annotation Interface vs Annotation</h2>&#10;<p>Before anything else, let us get a common source of confusion regarding terminology out of the way. What is commonly called <strong>Annotation</strong> by Java developers can refer to two different things:</p>&#10;<ol>&#10;<li>&#10;<p><strong>Annotation Interface</strong>: blueprints for creating instances of <strong>Annotations</strong>. For example:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> public @interface Override {&#10; }</code></pre>&#10;</li>&#10;<li>&#10;<p><strong>Annotation</strong>: instances of <strong>Annotation Interfaces</strong> that can used to mark elements in your code. For example, two instances of the <strong>Annotation Interface</strong> <code class="language-clike">@Override</code> are used below.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Override&#10; public String toString() {&#10;    return super.toString();&#10; }&#10;&#10; @Override&#10; public boolean equals(Object obj) {&#10;    return super.equals(obj);&#10; }</code></pre>&#10;</li>&#10;</ol>&#10;<h2>Annotation Interface</h2>&#10;<p>Most of the rules for <strong>interfaces</strong> also apply to <strong>annotation interfaces</strong>. However, a few key differences are:</p>&#10;<ol>&#10;<li>&#10;<p>The keyword <code class="language-clike">interface</code> must be preceded by an <code class="language-clike">@</code> character.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> interface Foo {}&#10; @interface Bar {}</code></pre>&#10;</li>&#10;<li>&#10;<p>An <strong>Annotation Interface</strong> can never be generic.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> interface Foo&lt;T&gt; {} //legal&#10; @interface Bar&lt;T&gt; {} //illegal</code></pre>&#10;</li>&#10;<li>&#10;<p>The direct super interface of all <strong>annotation interfaces</strong> is always <code class="language-clike">java.lang.annotation.Annotation</code>.</p>&#10;</li>&#10;<li>&#10;<p><strong>Annotation interfaces</strong> cannot use the <code class="language-clike">extends</code> clause.</p>&#10;</li>&#10;</ol>&#10;<h3>Annotation Interface Members</h3>&#10;<p>The body of <strong>Annotation Interfaces</strong> can only contain the members listed below:</p>&#10;<ol>&#10;<li>&#10;<p>Interface declarations.</p>&#10;</li>&#10;<li>&#10;<p>Class declarations.</p>&#10;</li>&#10;<li>&#10;<p>Constants.</p>&#10;</li>&#10;<li>&#10;<p>Method declarations. Each method declared is called an <strong>element</strong>.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> interface Foo extends java.lang.annotation.Annotation {}&#10; @interface Bar {&#10;    interface Animal {} //interface&#10;    @interface Foo {} //annotation interface is also an interface&#10;    class Dog {} //clas declaration&#10;    int NUM = 1; //constant&#10;&#10;    //method without default value. Instances must provide a value.&#10;    int customMethod();&#10;&#10;    //method with default value.&#10;    //Instances are not required to provide a value&#10;    int customMethod2() default 2;&#10; }</code></pre>&#10;</li>&#10;</ol>&#10;<h4>Annotation Interface Elements (Methods)</h4>&#10;<p><strong>Elements</strong> of an <strong>Annotation Interface</strong> have even further restrictions. Methods must return one of the types below:</p>&#10;<ol>&#10;<li>A <strong>primitive</strong> type</li>&#10;<li><strong>String</strong>.</li>&#10;<li><strong>Class</strong> or an invocation of Class.</li>&#10;<li>An <strong>enum</strong> class type.</li>&#10;<li>An <strong>annotation interface</strong> type.</li>&#10;<li>An <strong>array</strong> type whose component type is <strong>one of the preceding types</strong>.</li>&#10;</ol>&#10;<p>The method signature cannot override any method from <strong>Object</strong> or <strong>java.lang.annotation.Annotation</strong>.</p>&#10;<h4>Marker Annotation Interface</h4>&#10;<p>An <strong>Annotation Interface</strong> without any element is called a <strong>marker</strong> annotation interface.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">public @interface Override {&#10;}</code></pre>&#10;<h4>Single Element Interface</h4>&#10;<p>An <strong>Annotation Interface</strong> with only one element is called a <strong>single-element</strong> annotation interface. If you use the method name <code class="language-clike">value</code> in a single-element annotation interface, then the caller is not required to specify the element name when instantiating your annotation interface.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">@interface Name {&#10;   String value();&#10;}&#10;&#10;@interface Age {&#10;   int age();&#10;}&#10;&#10;@Name("Annie") //the element name "value" is not required&#10;@Age(age = 1) //the element name "age" is required&#10;class Person {}</code></pre>&#10;<h2>Default Java Annotations</h2>&#10;<p>Java SE comes with many pre-defined annotations. You are not required to know them all, but the most important ones are:</p>&#10;<ol>&#10;<li>&#10;<p><code class="language-clike">@Deprecated</code>: Mark part of your code as deprecated, so other developers will avoid using this part of your code.</p>&#10;</li>&#10;<li>&#10;<p><code class="language-clike">@Override</code>: You should always use this annotation when overriding a method. This enables the compiler and your IDE to warn you in cases where you think that you are overriding a super method, but maybe a typo created a completely new method instead of overriding.</p>&#10;</li>&#10;<li>&#10;<p><code class="language-clike">@Target</code>: This annotation can be used on other annotations to restrict the type of constructs that the other annotation be applied to. For example, the <code class="language-clike">@Target(ElementType.Method)</code> used on the <code class="language-clike">@Override</code> annotation interface indicates that <code class="language-clike">@Override</code> can only be used on methods.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike"> @Target(ElementType.METHOD)&#10; public @interface Override {&#10; }</code></pre>&#10;</li>&#10;</ol>&#10;<h2>When are Annotations Used</h2>&#10;<p>The main purpose of annotations are to provide extra information in your code. Different actors such as compilers, build tools, IDE, or other plugins use this extra information to provide something useful (<em>hopefully</em>) when compiling your code. A couple of examples include:</p>&#10;<ol>&#10;<li><strong>Java SE</strong>: <code class="language-clike">@Override</code> is used to reduce mistakes by developers.</li>&#10;<li><strong>Project Lombok</strong>: A lot of its features are delivered via annotations. <strong>getters</strong> and <strong>setters</strong> are automatically generated by Lombok if you annotate any field with <code class="language-clike">@Getter</code> or <code class="language-clike">@Setter</code>. This lessens the amount of code that you have to write. Less code to look at makes your code easier to read.</li>&#10;<li><strong>Spring framework</strong>: <code class="language-clike">@Controller</code>, <code class="language-clike">@Service</code>, <code class="language-clike">@Repository</code> are used to mark classes as fulfilling architectural duties, so Spring can set up the environment correctly.</li>&#10;<li><strong>Vaadin framework</strong>: <code class="language-clike">@Route</code> is used to configure navigation routes.</li>&#10;<li><strong>Android</strong>: <code class="language-clike">@Insert</code>, <code class="language-clike">@Update</code>, <code class="language-clike">@Query</code>, and <code class="language-clike">@Delete</code> are used on DAO methods, so that the compiler will generate appropriate CRUD code for you.</li>&#10;</ol>&#10;<p>Annotations are not language constructs limited to Java. Other languages also employ the same feature. For example, decorators in Typescript also serve the same purpose as Java annotations.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>dimitrilc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/tutorials/538277/java-basics-annotations</guid>
    		</item>
    		    		<item>
    			<title>Want a code to terminate my program after a time interval</title>
    			<link>https://www.daniweb.com/programming/threads/538259/want-a-code-to-terminate-my-program-after-a-time-interval</link>
    			<pubDate>Tue, 26 Jul 2022 14:11:14 +0000</pubDate>
    			<description>So I have a method which takes upto 4 hours to execute. I need to stop this method within the first 30 mins of execution and have the available results upto that 30 mins of time only. Can someone help me with this? I have tried many things to terminate ...</description>
    			    			<content:encoded><![CDATA[ <p>So I have a method which takes upto 4 hours to execute. I need to stop this method within the first 30 mins of execution and have the available results upto that 30 mins of time only. Can someone help me with this? I have tried many things to terminate my method but found no luck. I want the solution in Java.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Programmer18</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538259/want-a-code-to-terminate-my-program-after-a-time-interval</guid>
    		</item>
    		    		<item>
    			<title>Can someone kindly help me with this program (Java language arrays) I am st</title>
    			<link>https://www.daniweb.com/programming/threads/538248/can-someone-kindly-help-me-with-this-program-java-language-arrays-i-am-st</link>
    			<pubDate>Sun, 24 Jul 2022 21:33:57 +0000</pubDate>
    			<description>You must write a small application in JAVA for items and their prices. Your program must: 1. Create an array of item names. Use the following item names: Bread, Milk, Butter, Chips, Honey, Soap, Towel, Carrots, Beans, Samp, Dress, Pants, Shoes, Socks. 2. Create an array of item prices. Use ...</description>
    			    			<content:encoded><![CDATA[ <p>You must write a small application in JAVA for items and their prices. Your program must:</p>&#10;<ol>&#10;<li>Create an array of item names. Use the following item names: Bread, Milk, Butter, Chips, Honey, Soap, Towel, Carrots, Beans, Samp, Dress, Pants, Shoes, Socks.</li>&#10;<li>Create an array of item prices. Use the following item prices: 15.50, 12.00, 56.00, 20.00, 45.00, 7.00, 75.00, 8.00, 5.00, 12.00, 200.00, 150.00, 400.00, 25.00.</li>&#10;<li>Display every item name and its corresponding price. See the sample output given.</li>&#10;<li>Print the average price of all the items.</li>&#10;<li>Find and display the price of a specific item<br>&#10;a. Read in the name of the item.<br>&#10;b. Loop through the items array and look for the specific item.<br>&#10;c. If the item is found, display the price of the item.</li>&#10;</ol>&#10;<div class="h2">SAMPLE OUTPUT<br>&#10;Display every item name and its corresponding price.<br>&#10;Items in stock with prices</div>&#10;<p>Bread - R15.5<br>&#10;Milk - R12.0<br>&#10;Butter - R56.0<br>&#10;Chips - R20.0<br>&#10;Honey - R45.0<br>&#10;Soap - R7.0<br>&#10;Towel - R75.0<br>&#10;Carrots - R8.0<br>&#10;Beans - R5.0<br>&#10;Samp - R12.0<br>&#10;Dress - R200.0<br>&#10;Pants - R150.0<br>&#10;Shoes - R400.0<br>&#10;Socks - R25.0</p>&#10;<p>Display the average price of all the items<br>&#10;The average price of all the items is R73.0</p>&#10;<p>Find and display the price of a specific item  Sample input and output<br>&#10;Sample run 1<br>&#10;Sample run 2<br>&#10;Item Look-up<br>&#10;What item are you looking for?<br>&#10;Dress<br>&#10;The price of item Dress is R200.0<br>&#10;Item Look-up<br>&#10;What item are you looking for?<br>&#10;hjgjg<br>&#10;Item hjgjg is not stocked in the shop.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>qhayiyamc</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538248/can-someone-kindly-help-me-with-this-program-java-language-arrays-i-am-st</guid>
    		</item>
    		    		<item>
    			<title>Convert a temperature</title>
    			<link>https://www.daniweb.com/programming/computer-science/threads/538246/convert-a-temperature</link>
    			<pubDate>Sun, 24 Jul 2022 14:24:49 +0000</pubDate>
    			<description>Write a program that converts temperature from degrees Fahrenheit to degrees Celsius .The formula is C = (5.0/9.0) (F-32)</description>
    			    			<content:encoded><![CDATA[ <p>Write a program that converts temperature from degrees Fahrenheit to  degrees Celsius .The formula is C = (5.0/9.0) (F-32)</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/computer-science/14">Computer Science</category>
    			<dc:creator>Yolie_b</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/computer-science/threads/538246/convert-a-temperature</guid>
    		</item>
    		    		<item>
    			<title>programming , four digit positive integer</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538244/programming-four-digit-positive-integer</link>
    			<pubDate>Sat, 23 Jul 2022 19:54:49 +0000</pubDate>
    			<description>Write a program that prompts the user to input a four - digit positive integer.The program then outputs the digits of the number one digit per line</description>
    			    			<content:encoded><![CDATA[ <p>Write a program that prompts the user to input a four - digit positive integer.The program then outputs the digits of the number one digit per line</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Yolie_b</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538244/programming-four-digit-positive-integer</guid>
    		</item>
    		    		<item>
    			<title>Need Code for copy paste feature in Android java filemanager  app</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538225/need-code-for-copy-paste-feature-in-android-java-filemanager-app</link>
    			<pubDate>Wed, 20 Jul 2022 09:06:34 +0000</pubDate>
    			<description>Hello, I am developing android java filemanager app.. I used checkbox to check 1/file.mp4 2/folder(files+sub folders) . How can i add copy paste feature for checked 1, 2 file folder fully at same time ?like -google filemanager app.. Advance Thanks</description>
    			    			<content:encoded><![CDATA[ <p>Hello,</p>&#10;<p>I am developing android java  filemanager app..  I used checkbox to check 1/file.mp4<br>&#10;2/folder(files+sub folders)<br>&#10;. </p>&#10;<p>How can i  add copy paste feature for checked    1, 2 file folder fully at same time ?like -google filemanager app..</p>&#10;<p>Advance Thanks</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Sydul2000</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538225/need-code-for-copy-paste-feature-in-android-java-filemanager-app</guid>
    		</item>
    		    		<item>
    			<title>Programming error -Java</title>
    			<link>https://www.daniweb.com/programming/computer-science/threads/538194/programming-error-java</link>
    			<pubDate>Thu, 14 Jul 2022 13:31:05 +0000</pubDate>
    			<description> public class Clock { private int newHour; private int newMinutes; private int newSeconds; public Clock () { } public Clock (int newHour, int newMinutes, int newSeconds) { this.newHour = newHour; this.newMinutes = newMinutes; this.newSeconds = newSeconds; } public int getNewHour(int newHour){ return this.newHour; } public int getNewMinutes (int newMinutes){ return ...</description>
    			    			<content:encoded><![CDATA[ <pre class="language-clike line-numbers"><code class="language-clike">public class Clock&#10;{&#10;private int newHour;&#10;private int newMinutes;&#10;private int newSeconds;&#10;&#10;public Clock ()&#10;{&#10;}&#10;public Clock (int newHour, int newMinutes, int newSeconds)&#10;{&#10;this.newHour = newHour;&#10;this.newMinutes = newMinutes;&#10;this.newSeconds = newSeconds;&#10;}&#10;&#10;public int getNewHour(int newHour){&#10;return this.newHour;&#10;}&#10;public int getNewMinutes (int newMinutes){&#10;return this.newMinutes;&#10;}&#10;public int getNewSeconds (int newSeconds){&#10;return this.newSeconds;&#10;}&#10;&#10;public void setHour(int newHour){&#10;    this.setHour = setHour;&#10;}&#10;public void setMinutes (int newMinutes){&#10;    this.newMinutes = newMinutes;&#10;}&#10;public void setSeconds (int newSeconds){&#10;    this.newSeconds = newSeconds;&#10;}&#10;&#10;public void display (){&#10;System.out.println (int newHour + int newMinutes + int newSeconds);&#10;&#10;public String showTime (){&#10;System.out.println ("hh:"+ "mm:"+"ss");&#10;}&#10;&#10;public static void main(String[] args)&#10;{&#10;    Clock objClock = new Clock();&#10;    objClock.showTime();&#10;    objClock.display();&#10;}&#10;&#10;}</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/computer-science/14">Computer Science</category>
    			<dc:creator>N_765</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/computer-science/threads/538194/programming-error-java</guid>
    		</item>
    		    		<item>
    			<title>Programme for converting infix to postfix (java)</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538183/programme-for-converting-infix-to-postfix-java</link>
    			<pubDate>Tue, 12 Jul 2022 09:19:52 +0000</pubDate>
    			<description>I was working on an infix to postfix program (using stacks), but something went wrong somewhere. Please check whether my intopost technique is right because I am getting the output as infix without conversion. //stack class also containing the intopostfix method import java.util.*; public class Stack { int i,j; char ...</description>
    			    			<content:encoded><![CDATA[ <p>I was working on an infix to postfix program (using stacks), but something went wrong somewhere.<br>&#10;Please check whether my intopost technique is right because I am getting the output as infix without conversion.</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">    //stack class also containing the intopostfix method&#10;   import java.util.*;&#10;    public class Stack &#10;    {   int i,j;&#10;char postfix[];&#10;char stack[];&#10;int top;&#10;String post;&#10;public Stack(int n)&#10;{&#10;    stack=new char[n];&#10;    top=-1;&#10;}&#10;public void push(char item)&#10;{&#10;    if(top&gt;=stack.length)&#10;        System.out.println("Stack overflow");&#10;    else&#10;    {&#10;        stack[++top]=item;&#10;    }&#10;}&#10;public char pop()&#10;{&#10;    if(top==-1)&#10;    {       System.out.println("Stack underflow");&#10;            return 0;&#10;    }&#10;    else&#10;        return stack[top--];&#10;}&#10;boolean isAlpha(char ch)&#10;{&#10;    if((ch&gt;='a'&amp;&amp;ch&lt;='z')||(ch&gt;=0&amp;&amp;ch&lt;='9'))&#10;        return true;&#10;    else &#10;        return false;&#10;&#10;}&#10;boolean isOperator(char ch)&#10;{&#10;    if(ch=='+'||ch=='-'||ch=='*'||ch=='/')&#10;        return true;&#10;    else return false;&#10;&#10;}&#10;&#10;void intopost(String str)&#10;{&#10;    postfix=new char[str.length()];&#10;    char ch;&#10;&#10;    j=0;&#10;&#10;    for(i=0;i&lt;str.length();i++)&#10;    {&#10;        ch=str.charAt(i);&#10;        if(ch=='(')&#10;            push(ch);&#10;        else if(isAlpha(ch))&#10;        {&#10;            postfix[j++]=ch;&#10;        }&#10;        else if(isOperator(ch))&#10;        {&#10;            push (ch);&#10;        }&#10;        else if(ch==')')&#10;        {&#10;            while((pop())!='(')&#10;                    {&#10;                        postfix[j++]=pop();&#10;                    }&#10;        }&#10;&#10;    }&#10;&#10;}&#10;void disp()&#10;{&#10;    for(i=0;i&lt;postfix.length;i++)&#10;    {   &#10;        System.out.print(postfix[i]);&#10;    }&#10;}&#10;}</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Vandiun</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538183/programme-for-converting-infix-to-postfix-java</guid>
    		</item>
    		    		<item>
    			<title>ArrayList: Semantic Error</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538174/arraylist-semantic-error</link>
    			<pubDate>Sat, 09 Jul 2022 20:40:40 +0000</pubDate>
    			<description> ArrayList databas = new ArrayList(); //Add data into the databas databas.add(new MArry(&#34;Timothy&#34;, &#34;SS1&#34;)); databas.add(new MArry(&#34;Olayemi&#34;, &#34;SS2&#34;)); System.out.println(&#34;Student\tClass\n&#34;); for (MArry myarry: databas) { System.out.printf(&#34;%s \n&#34;, myarry); } /*Please I need someone to check this out. Each time I run the code the output I&#39;m getting is the memory address of the ...</description>
    			    			<content:encoded><![CDATA[ <pre class="language-clike line-numbers"><code class="language-clike">ArrayList&lt;MArry&gt; databas = new ArrayList&lt;MArry&gt;();&#10;        //Add data into the databas&#10;        databas.add(new MArry("Timothy", "SS1"));&#10;        databas.add(new MArry("Olayemi", "SS2"));&#10;        System.out.println("Student\tClass\n");&#10;&#10;        for (MArry myarry: databas) {&#10;            System.out.printf("%s \n", myarry);&#10;        }&#10;&#10;  /*Please I need someone to check this out.&#10;  Each time I run the code the output I'm getting is the memory address of the ArrayList */</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Shephard_1</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538174/arraylist-semantic-error</guid>
    		</item>
    		    		<item>
    			<title>Database Support in Python and Java</title>
    			<link>https://www.daniweb.com/programming/threads/538133/database-support-in-python-and-java</link>
    			<pubDate>Thu, 30 Jun 2022 07:19:23 +0000</pubDate>
    			<description>Hello All, I am working on a project which based on python and java both and I am good at java. I want to know which programming language support high database connectivity? According to this [source](https://www.interviewbit.com/blog/java-vs-python/), Java provides stable connectivity but not an idea about python? Can anyone tell me ...</description>
    			    			<content:encoded><![CDATA[ <p>Hello All, I am working on a project which based on python and java both and I am good at java. I want to know which programming language support high database connectivity? According to this <a href="https://www.interviewbit.com/blog/java-vs-python/">source</a>, Java provides stable connectivity but not an idea about python? Can anyone tell me about python connectivity?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>adisharma</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/538133/database-support-in-python-and-java</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m V</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/538120/hi-everyone-i-m-v</link>
    			<pubDate>Tue, 28 Jun 2022 09:53:59 +0000</pubDate>
    			<description>Hello, my name is V, and I&#39;m a Prolific Java programmer with 4+ years of experience and a solid background in RESTful and JSP development. OddPointer is looking for efficient programming. In recent years, I have built an average of 10+ native Java apps per year.</description>
    			    			<content:encoded><![CDATA[ <p>Hello, my name is V, and I'm a Prolific Java programmer with 4+ years of experience and a solid background in RESTful and JSP development. OddPointer is looking for efficient programming. In recent years, I have built an average of 10+ native Java apps per year.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>Vandiun</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/538120/hi-everyone-i-m-v</guid>
    		</item>
    		    		<item>
    			<title>Android development for beginner</title>
    			<link>https://www.daniweb.com/programming/mobile-development/threads/538091/android-development-for-beginner</link>
    			<pubDate>Tue, 21 Jun 2022 01:01:04 +0000</pubDate>
    			<description>Hi! I&#39;m here to ask for an opinion as someone who want to develop an Android app for the first time. Can someone suggest to me whether I should use Java or Kotlin to write my code? My app will constantly need to fetch and submit data to phpmyadmin which ...</description>
    			    			<content:encoded><![CDATA[ <p>Hi! I'm here to ask for an opinion as someone who want to develop an Android app for the first time.<br>&#10;Can someone suggest to me whether I should use Java or Kotlin to write my code? My app will constantly need to fetch and submit data to phpmyadmin which I put it in my online server. For now, I'm planning to use Retrovit for network library.</p>&#10;<p>Thank you in advance.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/mobile-development/181">Mobile Development</category>
    			<dc:creator>Pekja</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/mobile-development/threads/538091/android-development-for-beginner</guid>
    		</item>
    		    		<item>
    			<title>It&#039;s possible to sort just words in a language?</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538084/it-s-possible-to-sort-just-words-in-a-language</link>
    			<pubDate>Mon, 20 Jun 2022 10:07:11 +0000</pubDate>
    			<description>Hello, I search many days about this problem. I&#39;m curious if in a text file it&#39;s possible to sort words in a language in alphabetical order and in another language to ignore them using ArrayList?</description>
    			    			<content:encoded><![CDATA[ <p>Hello, I search many days about this problem. I'm curious if in a text file it's possible to sort words in a language in alphabetical order and in another language to ignore them using ArrayList?</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>mihailbog245</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538084/it-s-possible-to-sort-just-words-in-a-language</guid>
    		</item>
    		    		<item>
    			<title>ARRAY PROOGRAMMING CODE</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538046/array-proogramming-code</link>
    			<pubDate>Mon, 13 Jun 2022 04:17:05 +0000</pubDate>
    			<description>Jaluh is making a room inventory in the Hostel where she is working. They have 16 rooms labelled as A-P. She is doing this manually that it will consume more time. Make a program that will automatically be identified if the room is taken or not. An array code.. ANYONE ...</description>
    			    			<content:encoded><![CDATA[ <p>Jaluh is making a room inventory in the Hostel where she is working. They have 16 rooms<br>&#10;labelled as A-P. She is doing this manually that it will consume more time. Make a program<br>&#10;that will automatically be identified if the room is taken or not. An array code.. ANYONE COULD HELP ME THIS GUYS.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Braxy</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538046/array-proogramming-code</guid>
    		</item>
    		    		<item>
    			<title>Dictionary Java ArrayList Socket</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/538043/dictionary-java-arraylist-socket</link>
    			<pubDate>Sun, 12 Jun 2022 10:25:05 +0000</pubDate>
    			<description>I don&#39;t get what&#39;s the problem with this Dictionary created using Arraylist and Socket . I get SocketException error I don&#39;t know why also I tried to created a method to read.... ClientCode: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.util.Scanner; import java.net.SocketException; public class Client ...</description>
    			    			<content:encoded><![CDATA[ <p>I don't get what's the problem with this Dictionary created using Arraylist and Socket . I get SocketException error I don't know why also I tried to created a method to read....</p>&#10;<p>ClientCode:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">import java.io.BufferedReader;&#10;import java.io.IOException;&#10;import java.io.InputStreamReader;&#10;import java.io.PrintWriter;&#10;import java.net.Socket;&#10;import java.util.Scanner;&#10;import java.net.SocketException;&#10;&#10;public class Client {&#10;&#10;    public static void main(String[] args) {&#10;        int N;&#10;        Scanner sc=new Scanner(System.in);&#10;        Socket cs=null;&#10;        BufferedReader bfr=null;&#10;        PrintWriter pw=null;&#10;        try{&#10;            cs=new Socket("localhost",5000)  ;&#10;            InputStreamReader isr=&#10;                    new InputStreamReader(cs.getInputStream());&#10;            bfr=new BufferedReader(isr);&#10;            pw=new PrintWriter(cs.getOutputStream());&#10;            System.out.println("S-a setat reteaua!");&#10;            for(;;){&#10;&#10;                System.out.print("Cuvantul care trebuie tradus:");&#10;                String cuvant=sc.nextLine();&#10;                //daca este STOP : se va deconecta&#10;                if(cuvant.equals("STOP")) {pw.println(""); pw.flush();break;}&#10;                else  {pw.println(cuvant); pw.flush();}&#10;                //Citim raspuns server:&#10;                String textIn=bfr.readLine();&#10;                if(textIn==null)break;&#10;                System.out.println(textIn);&#10;            }//for;;&#10;        }catch( IOException e){&#10;            e.printStackTrace();&#10;        }&#10;        System.out.println("Clientul s-a deconectat!");&#10;    }//main&#10;}</code></pre>&#10;<p>ClientHandler code:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">import java.io.BufferedReader;&#10;import java.io.FileReader;&#10;import java.io.InputStreamReader;&#10;import java.io.PrintWriter;&#10;import java.net.Socket;&#10;import java.util.ArrayList;&#10;import java.net.SocketException;&#10;&#10;&#10;//Clasa firului de execuie pentru tratarea clientului conectat la server:&#10;class FirClient extends Thread {&#10;    private Socket cs;&#10;    private BufferedReader bfr;&#10;    private PrintWriter pw;&#10;    ArrayList&lt;String&gt; listacuvinte;//la creare firului incarcam datele&#10;&#10;    // din fisier intr-un ArrayList&#10;    public FirClient(Socket cs) {&#10;        try {&#10;            this.cs = cs;&#10;            pw = new PrintWriter(cs.getOutputStream());&#10;            InputStreamReader isr =&#10;                    new InputStreamReader(cs.getInputStream());&#10;            bfr = new BufferedReader(isr);&#10;            //incarcam fisierul cuvinte .txt in ArrayList:&#10;            listacuvinte = new ArrayList&lt;String&gt;();&#10;            System.out.println("Se copiaza fisier in al");&#10;            FileReader f = new FileReader("date.txt");&#10;            BufferedReader bf = new BufferedReader(f);&#10;            for (; ; ) {&#10;                String s = bf.readLine();&#10;                if (s == null) break;//s-a terminat fisier&#10;                listacuvinte.add(s);&#10;            }&#10;            bf.close();&#10;            f.close();&#10;        } catch (Exception e) {&#10;            e.printStackTrace();&#10;            System.exit(1);&#10;        }&#10;    }&#10;&#10;    public void run()&#10;    {&#10;        try{&#10;            for(;;){&#10;                String cuvant = bfr.readLine();&#10;                if(cuvant == null)break;&#10;                if(cuvant.equals(""))break;&#10;                //cautare cuvant in ArrayList:&#10;                boolean gasit=false;&#10;                for(int i=0;i&lt;listacuvinte.size();i+=2){&#10;                    if(listacuvinte.get(i).equals(cuvant)){&#10;                        String crt= listacuvinte.get(i+1);&#10;                        gasit=true;&#10;                        break;&#10;                    }&#10;&#10;                }&#10;&#10;            }//for;;&#10;        }catch(final Exception e){e.printStackTrace();}&#10;    }//run&#10;}</code></pre>&#10;<p>ServerCode:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">import java.net.ServerSocket;&#10;import java.net.Socket;&#10;import java.net.SocketException;&#10;&#10;&#10;public class Server {&#10;&#10;    public static void main(String[] args) {&#10;        System.out.println("Am pornit server...");&#10;           try{&#10;            ServerSocket ss=new ServerSocket(5000);&#10;            for(;;){&#10;             Socket cs=ss.accept();&#10;             FirClient firPtClient=new FirClient(cs);&#10;             firPtClient.start();&#10;             System.out.println("Avem o conectare!");&#10;            }//for;;&#10;           }catch(Exception e){&#10;               e.printStackTrace();&#10;           }&#10;&#10;&#10;    }&#10;&#10;}</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>mihailbog245</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/538043/dictionary-java-arraylist-socket</guid>
    		</item>
    		    		<item>
    			<title>Hi everyone, I&#039;m danNy045</title>
    			<link>https://www.daniweb.com/community-center/say-hello/threads/537773/hi-everyone-i-m-danny045</link>
    			<pubDate>Thu, 05 May 2022 17:04:40 +0000</pubDate>
    			<description>#java</description>
    			    			<content:encoded><![CDATA[ <p>#java</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/community-center/say-hello/all/_/165">Say Hello!</category>
    			<dc:creator>danNy045</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/community-center/say-hello/threads/537773/hi-everyone-i-m-danny045</guid>
    		</item>
    		    		<item>
    			<title>I have a homework please</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/537768/i-have-a-homework-please</link>
    			<pubDate>Thu, 05 May 2022 06:27:58 +0000</pubDate>
    			<description>trainSet = [[2, 2, 2, &#39;a&#39;], [4, 4, 4, &#39;b&#39;], [6, 6 , 6, &#39;b&#39;] testInstance = [5, 5, 5] Similarity: Calculate the Euclidian distances between the testInstance and all point of trainSet (Three points) In our case: Three distances between [5, 5, 5] and [2, 2, 2], [4, 4, ...</description>
    			    			<content:encoded><![CDATA[ <p>trainSet = [[2, 2, 2, 'a'], [4, 4, 4, 'b'], [6, 6 , 6, 'b'] testInstance = [5, 5, 5] Similarity: Calculate the Euclidian distances between the testInstance and all point of trainSet (Three points) In our case: Three distances between [5, 5, 5] and [2, 2, 2], [4, 4, 4], [6, 6 , 6] Neighbors: Locate k (Choose k=2 points in trainSet) most similar data instances by choosing the points of trainSet with the minimum distances between the testInstance and all point of trainSet. In our case: The two points are: [4, 4, 4], [6, 6 , 6]<br>&#10;Response: Generate a response from a set of data instances. In our case: The most similar data instances are [4, 4, 4, 'b'], [6, 6 , 6, 'b'], the testInstance will be affected by the letter b (method of majority voting). using java</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Hadil_1</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/537768/i-have-a-homework-please</guid>
    		</item>
    		    		<item>
    			<title>Search for the duplicate in a textfile and store it in another textfile</title>
    			<link>https://www.daniweb.com/programming/threads/537744/search-for-the-duplicate-in-a-textfile-and-store-it-in-another-textfile</link>
    			<pubDate>Sat, 30 Apr 2022 11:12:20 +0000</pubDate>
    			<description>I am new to coding and want some insights how can I find the duplicate in a text file and that duplicate will be store it to another text file.</description>
    			    			<content:encoded><![CDATA[ <p>I am new to coding and want some insights how can I find the duplicate in a text file and that duplicate will be store it to another text file.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>Princess Caissa</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/537744/search-for-the-duplicate-in-a-textfile-and-store-it-in-another-textfile</guid>
    		</item>
    		    		<item>
    			<title>Java(using eclipse), Arraylist, compareTo</title>
    			<link>https://www.daniweb.com/programming/threads/537740/java-using-eclipse-arraylist-compareto</link>
    			<pubDate>Fri, 29 Apr 2022 20:52:43 +0000</pubDate>
    			<description>Hello, I have project and user writes date(using scanner etc.) which saves to an ArrayList and I need to sort the dates. (There is the code (its in Czech) den = day, mesic = month, rok = year, datum = date) public class Ukoly { protected String predmet; protected String ...</description>
    			    			<content:encoded><![CDATA[ <p>Hello, I have project and user writes date(using scanner etc.) which saves to an ArrayList and I need to sort the dates.<br>&#10;(There is the code (its in Czech) den = day, mesic = month, rok = year, datum = date)</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">public class Ukoly {&#10;&#10;    protected String predmet;&#10;    protected String poznamka;&#10;    protected String stav;&#10;    protected int den;&#10;    protected int mesic;&#10;    protected int rok;&#10;    protected int znamka;&#10;&#10;    public Ukoly(int den, int mesic, int rok, String predmet, String poznamka, String stav, int znamka) {&#10;        super();&#10;        this.den = den;&#10;        this.mesic = mesic;&#10;        this.rok = rok;&#10;        this.predmet = predmet;&#10;        this.poznamka = poznamka;&#10;        this.stav = stav;&#10;        this.znamka = znamka;&#10;        }&#10;    public Ukoly() {&#10;        // TODO Auto-generated constructor stub&#10;    }&#10;    public  void setPredmet(String pred) {&#10;        this.predmet = pred;&#10;    }&#10;    public void setPoznamka(String pozn) {&#10;        this.poznamka = pozn;&#10;    }&#10;    public void setStav(String st) {&#10;        this.stav = st;&#10;    }&#10;    public void setDen(int den) {&#10;        this.den = den;&#10;    }&#10;    public void setMesic(int mesi) {&#10;        this.mesic = mesi;&#10;    }&#10;    public void setRok(int rok) {&#10;        this.rok = rok;&#10;    }&#10;    public void setZnamka(int zn) {&#10;        this.znamka = zn;&#10;    }&#10;    public String getPredmet() {&#10;        return this.predmet;&#10;    }&#10;    public String getPoznamka() {&#10;        return this.poznamka;&#10;    }&#10;    public String getStav() {&#10;        return this.stav;&#10;    }&#10;    public int getDen() {&#10;        return this.den;&#10;    }&#10;    public int getMesic() {&#10;        return this.mesic;&#10;    }&#10;    public int getRok() {&#10;        return this.rok;&#10;    }&#10;    public int getZnamka() {&#10;        return this.znamka;&#10;    }&#10;    @Override&#10;    public String toString() {&#10;        return "Ukoly [predmet=" + predmet + ", poznamka=" + poznamka + ", stav=" + stav + ", den=" + den + ", mesic="&#10;                + mesic + ", rok=" + rok + ", znamka=" + znamka + "]";&#10;    }&#10;&#10;&#10;}&#10;&#10;&#10;&#10;&#10;&#10;import java.util.ArrayList;&#10;import java.util.Scanner;&#10;&#10;&#10;public class Denik extends Ukoly{&#10;&#10;    public Denik(int den, int mesic, int rok, String predmet, String poznamka, String stav, int znamka) {&#10;        super(den, mesic, rok, predmet, poznamka, stav, znamka);&#10;&#10;    }&#10;&#10;    public static void main(String[] args) {&#10;&#10;        ArrayList&lt;Ukoly&gt; ukol = new ArrayList&lt;&gt;();&#10;        @SuppressWarnings("resource")&#10;        Scanner sken = new Scanner(System.in);&#10;        int vyber;&#10;        int vyber1 = 2;&#10;        int vyber2;&#10;        int vyber3;&#10;        int vyber4;&#10;        String datum;&#10;&#10;&#10;&#10;        while (vyber1 == 2) {&#10;&#10;            Ukoly novy = new Ukoly();&#10;&#10;&#10;            System.out.println("Stisknte 1 pro oteven seznamu kolu nebo 2 pro pidvn kol.");&#10;            vyber = Integer.parseInt(sken.nextLine());&#10;            if (vyber == 1) {&#10;&#10;&#10;&#10;                      }&#10;            if (vyber == 2) {&#10;&#10;                System.out.println("Zadejte z jakho pedmtu kol je: ");&#10;                novy.setPredmet(sken.nextLine());&#10;                System.out.println("Zadejte datum odevzdn ve tvaru 20.01.2000: ");&#10;                datum = sken.nextLine();&#10;                novy.setDen(Integer.parseInt(datum.substring(0, 2)));&#10;                novy.setMesic(Integer.parseInt(datum.substring(3, 5)));&#10;                novy.setRok(Integer.parseInt(datum.substring(6, 10)));&#10;                System.out.println("Zde mete zadat poznmku: ");&#10;                novy.setPoznamka(sken.nextLine());&#10;                System.out.println("Zde zadejte stav kolu(vypracovn, ale neodevzdn/nevypracovn): ");&#10;                novy.setStav(sken.nextLine());&#10;                System.out.println("Zde si zapite poku mte z kolu njakou znmku(ve tvaru 1/2/3/4/5/0): ");&#10;                novy.setZnamka(Integer.parseInt(sken.nextLine()));&#10;                ukol.add(novy);&#10;&#10;                System.out.println("Chce zobrazit svj kol/y kter m zapsan? Pokud ANO stiskni 1, pokud NE stiskni 2");&#10;                vyber2 = Integer.parseInt(sken.nextLine());&#10;&#10;                if (vyber2 == 1) {&#10;                    for (int i1 = 0; i1 &lt; ukol.size(); i1++)&#10;&#10;                        System.out.println(ukol.get(i1));&#10;                }&#10;&#10;                if (vyber2 == 2) {&#10;&#10;                }&#10;&#10;            }&#10;&#10;            System.out.println("Byli to vechny tv koly(stiskni 1), nebo si chce zapsat dal kol?(stiskni 2) ");&#10;            vyber1 = Integer.parseInt(sken.nextLine());&#10;            if (vyber1 == 1) {&#10;&#10;                System.out.println("Chce vypsat a seadit vechny sv koly? Pro ANO stiskni 1, pro NE stiskni 2.");&#10;                vyber3 = Integer.parseInt(sken.nextLine());&#10;                if (vyber3 == 1) {&#10;&#10;                    System.out.println("Chce seadit koly podle pedmtu(stiskni 1) nebo data odevzdn(stiskni 2)?");&#10;                    vyber4 = Integer.parseInt(sken.nextLine());&#10;                    if (vyber4 == 1) {&#10;&#10;&#10;&#10;&#10;                    }&#10;                    if (vyber4 == 2) {&#10;&#10;&#10;&#10;                    }&#10;                }&#10;                if (vyber3 == 2) {&#10;                    System.out.println("Dobe.");&#10;                }&#10;&#10;            }&#10;&#10;&#10;        }&#10;    }</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>MichaL_11</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/537740/java-using-eclipse-arraylist-compareto</guid>
    		</item>
    		    		<item>
    			<title>need it asap ;-;</title>
    			<link>https://www.daniweb.com/programming/threads/537696/need-it-asap</link>
    			<pubDate>Sun, 24 Apr 2022 17:55:07 +0000</pubDate>
    			<description>1. Methods to search for a book If the user chooses that option he should be asked of he wants to search for it using the books title (or part of it) or using the name of one of the authors (or part of the name) Depending on that search ...</description>
    			    			<content:encoded><![CDATA[ <ol>&#10;<li>Methods to search for a book<br>&#10;If the user chooses that option he should be asked of he wants to search for it using the books title (or part of it) or using the name of one of the authors (or part of the name)<br>&#10;Depending on that search the user should go through  the Library.txt file and print all the books matching that certain criteria. And if none was found an appropriate message should be printed. (the search needs to be case sensitive as the user can search using lower case letters or upper case one)</li>&#10;</ol> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/4">Programming</category>
    			<dc:creator>nouraaaaa</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/threads/537696/need-it-asap</guid>
    		</item>
    		    		<item>
    			<title>Create a dynamic list name</title>
    			<link>https://www.daniweb.com/programming/mobile-development/threads/537693/create-a-dynamic-list-name</link>
    			<pubDate>Sun, 24 Apr 2022 06:45:28 +0000</pubDate>
    			<description>Hi DW. Anyone who knows how can I achieve this? List dynamic[i]; The reason why I need this is that I&#39;m creating a dynamic list with nested lists so there&#39;s no fixed number of data the list can be, this is inside the for statement which receive the json data ...</description>
    			    			<content:encoded><![CDATA[ <p>Hi DW. Anyone who knows how can I achieve this? <code>List&lt;String&gt; dynamic[i];</code><br>&#10;The reason why I need this is that I'm creating a dynamic list with nested lists so there's no fixed number of data the list can be, this is inside the <code>for</code> statement which receive the json data which is multidimention array so I want for each item in the json data create 1st the parent list then create nested list for it.</p>&#10;<p>Currently it mixes data and I see that it because of this.</p> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/mobile-development/181">Mobile Development</category>
    			<dc:creator>Mr.M</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/mobile-development/threads/537693/create-a-dynamic-list-name</guid>
    		</item>
    		    		<item>
    			<title>Please help me, input == null!</title>
    			<link>https://www.daniweb.com/programming/software-development/threads/537653/please-help-me-input-null</link>
    			<pubDate>Tue, 19 Apr 2022 13:41:58 +0000</pubDate>
    			<description>Here is my code: package com.Main.tile; import com.Main.GamePanel; import com.Main.UtilityTool; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class TileManager { GamePanel gp; public Tile[] tile; public int mapTileNum[] []; public TileManager(GamePanel gp){ this.gp = gp; tile = new Tile[10]; mapTileNum = new ...</description>
    			    			<content:encoded><![CDATA[ <p>Here is my code:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">package com.Main.tile;&#10;&#10;import com.Main.GamePanel;&#10;import com.Main.UtilityTool;&#10;&#10;import javax.imageio.ImageIO;&#10;import java.awt.*;&#10;import java.awt.image.BufferedImage;&#10;import java.io.BufferedReader;&#10;import java.io.IOException;&#10;import java.io.InputStream;&#10;import java.io.InputStreamReader;&#10;&#10;public class TileManager {&#10;    GamePanel gp;&#10;    public Tile[] tile;&#10;    public int mapTileNum[] [];&#10;&#10;    public TileManager(GamePanel gp){&#10;        this.gp = gp;&#10;        tile = new Tile[10];&#10;        mapTileNum = new int [gp.maxWorldCol] [gp.maxWorldRow];&#10;&#10;        getTileImage();&#10;        loadMap("/maps/world01.txt");&#10;    }&#10;    public void getTileImage(){&#10;&#10;            setup(0, "grass", false);&#10;            setup(0, "wall", true);&#10;            setup(0, "water01", true);&#10;            setup(0, "earth", false);&#10;            setup(0, "tree", true);&#10;            setup(0, "sand", false);&#10;&#10;    }&#10;&#10;    public void setup(int index, String imageName, boolean collision){&#10;&#10;        UtilityTool uTool = new UtilityTool();&#10;&#10;        try {&#10;            tile[index] = new Tile();&#10;            tile[index].image = ImageIO.read(getClass().getResourceAsStream("/tiles/"+imageName+".png"));&#10;            tile[index].image = uTool.scaleImage(tile[index].image, gp.tileSize, gp.tileSize);&#10;            tile[index].collision = collision;&#10;&#10;        } catch (IOException e){&#10;            e.printStackTrace();&#10;        }&#10;    }&#10;    public void loadMap(String filePath){&#10;        try{&#10;            InputStream is = getClass().getResourceAsStream(filePath);&#10;            BufferedReader br = new BufferedReader(new InputStreamReader(is));&#10;&#10;            int col = 0;&#10;            int row = 0;&#10;&#10;            while(col &lt; gp.maxWorldCol &amp;&amp; row &lt; gp.maxWorldRow){&#10;                String line = br.readLine();&#10;                while(col &lt; gp.maxWorldCol){&#10;                    String numbers[] = line.split(" ");&#10;&#10;                    int num = Integer.parseInt(numbers[col]);&#10;                    mapTileNum[col] [row] = num;&#10;                    col++;&#10;                }&#10;                if(col == gp.maxWorldCol){&#10;                    col = 0;&#10;                    row++;&#10;                }&#10;            }&#10;            br.close();&#10;        }catch(Exception e){&#10;&#10;        }&#10;    }&#10;    public void draw(Graphics2D g2){&#10;        int worldCol = 0;&#10;        int worldRow = 0;&#10;&#10;        while(worldCol &lt; gp.maxWorldCol &amp;&amp; worldRow &lt; gp.maxWorldRow){&#10;            int tileNum = mapTileNum[worldCol] [worldRow];&#10;&#10;            int worldX = worldCol * gp.tileSize;&#10;            int worldY = worldRow * gp.tileSize;&#10;            double screenX = worldX - gp.player.worldX + gp.player.screenX;&#10;            double screenY = worldY - gp.player.worldY + gp.player.screenY;&#10;&#10;            if(worldX + gp.tileSize &gt; gp.player.worldX - gp.player.screenX &amp;&amp;&#10;               worldX - gp.tileSize &lt; gp.player.worldX + gp.player.screenX &amp;&amp;&#10;               worldY + gp.tileSize &gt; gp.player.worldY - gp.player.screenY &amp;&amp;&#10;               worldY - gp.tileSize &lt; gp.player.worldY + gp.player.screenY) {&#10;                g2.drawImage(tile[tileNum].image, (int)screenX, (int)screenY, null);&#10;            }&#10;            worldCol++;&#10;            //x += gp.tileSize; DISABLE FOR STABILITY&#10;            if(worldCol == gp.maxWorldCol){&#10;                worldCol = 0;&#10;                //x = 0;&#10;                worldRow++;&#10;                //y += gp.tileSize;&#10;&#10;            }&#10;        }&#10;    }&#10;}</code></pre>&#10;<p>and it always shows the error:</p>&#10;<pre class="language-clike line-numbers"><code class="language-clike">Exception in thread "main" java.lang.IllegalArgumentException: input == null!&#10;at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1358)&#10;at com.Main.tile.TileManager.setup(TileManager.java:44)&#10;at com.Main.tile.TileManager.getTileImage(TileManager.java:29)&#10;at com.Main.tile.TileManager.&lt;init&gt;(TileManager.java:24)&#10;at com.Main.GamePanel.&lt;init&gt;(GamePanel.java:30)&#10;at com.Main.Main.main(Main.java:13)</code></pre> ]]></content:encoded>
    			<category domain="https://www.daniweb.com/programming/software-development/2">Software Development</category>
    			<dc:creator>Hoàng_32</dc:creator>
    			<guid isPermaLink="true">https://www.daniweb.com/programming/software-development/threads/537653/please-help-me-input-null</guid>
    		</item>
    			</channel>
</rss>