|
I was one of those kids that took apart everything I could get my hands on, to learn how it works.
My father, being a pragmatic man, realized it was only a matter of time before I started to fiddle around with more dangerous stuff, decided to teach me how to handle explosives and guns in a safe way.
In hindsight that was probably one of the best decisions he made.
|
|
|
|
|
My dad, though a marksman in the Marines, didn't like guns. He just happened to be real good with them. We never had a gun in the house, I didn't know a cartridge from my a$$. I was extremely fortunate not to be seriously injured that day.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I have a coding problem that is hard to solve
Given an array of positive integers arr[900, 800, 700, 600, 500, 90, 80, 70, 60, 50, 9, 8, 7, 6, 5, 4, 3, 2, 1] anda sum 3400, find all unique combinations in the arr[] where the sum is equal to 3400. The same repeated number may be chosen from arr[] at most 5 times or thereafter x times-multiple(number), or excluded if not possible. Elements in a combination (a1, a2, …, ak) must be printed in non-descending order. (ie, a1 <= a2 <= … <= ak).
The combinations themselves must be sorted in ascending order, i.e., the combination with smallest first element should be printed first. If there is no combination possible the print "Empty" (without quotes).
Examples:
Input : arr[] = 2, 4, 5, 6, 8
x = 10
Output : [2, 2, 2, 2,2]
[2, 4,4]
[4, 6]
[5,5]
the challenge in this problem is to list the numbers or exclude them for the large sum when there is small numbers like 2, 4, 5
modified 1-Feb-22 10:19am.
|
|
|
|
|
Hmmm, it seems homework hasn't changed much over the years.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
Even if you were to post this in a the correct place, we won't do your homework for you.
What about [ 2 , 2 , 2 , 4 ] and [ 2 , 8 ] ?
Where did [ 4 , 6 ] come from?
|
|
|
|
|
PIEBALDconsult wrote: Where did [ 4 , 6 ] come from?
Maybe that is what makes it "hard to solve"?!?
Because the OP clearly understands the problem (as demonstrated by the rest of the example). Or maybe I am the one not understanding something
|
|
|
|
|
yah! focusing on the example to get a hint is a way of the novice, good try!
|
|
|
|
|
I think 2+4 is 6, from [2,4,4].
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Its an example.....recursion and backtracking would ring the bell not loudly!
|
|
|
|
|
That's not how coding specs work.
|
|
|
|
|
Questions about programming should be posted in the Q&A section for the language required.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Normally we'd point to the Lounge Rules post at the top of the page, but it's missing.
Where'd it go?
Also dude, if you don't have the mental determination to work out your own problems, I'm not sure that this would be the career for you.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
This is a valid discussion topic; I didn't post the codes here.. I don't claim to be the master of the art...and about mental determination how about you come up with your own coding reality instead of learning others' work and boasting to be its master...
|
|
|
|
|
I've always been a big fan of Microsoft's original Intellimouse from decades ago. When they stopped making them for (IMO) worse models, I feared the day my last one would die. Fortunately a few years ago MS has started making them again - same shape, same feel, same buttons in the same location. This is all important to me, so I figured I'd be smart and buy enough so I have a stack of spares that would outlast me. Given how long the previous ones lasted, I figured I'd have plenty buying a set of 5 of them. That was probably 3-4 years ago.
This morning I've switched over to my last spare.
There's 2 that are hooked up to systems I use constantly.
Of the three that went bad:
- One suddenly had the pointer stuttering - jumping all over the place - on both X and Y axis.
- The other two - including one I replaced this morning - has had the scroll wheel go bad. I'd scroll down one "tick" (if you wanna call it that), it would do it but then scroll back up again by 2 or 3 ticks. Incredibly annoying when you're trying to read through - well, anything that need scrolling through.
I'm unimpressed. I'll (eventually) take the time to open them up and clean them as best I can, but none of my (much) older generation ones ever even needed any sort of cleaning. The last one lasted longer than this entire set I bought all at once.
Not seeking any response. Just saying I'm annoyed at buying multiples of something that should outlast me, and turns out all need to be replaced after such a short amount of time.
|
|
|
|
|
Yeah. I have a Logitech Trackman Wheel - and it's at least ten years old, more probably over 20, I can;t remember back that far.
It's on it's third left-button microswitch (and easy job to replace if you can solder) and it's looking used where I've rubbed the textured surface smooth with my hand over the years.
But ... it's still working as well as the day I bought it. Which I can't say for any hardware I've ever bought with the MS logo on it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Of course your mice die - you've got a cat in the house.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Like you, I am annoyed with mice.
I too have a lot of dead mice from multiple brands. Most died still in warranty but the manufacturers say that they will not fix or replace them because they were damaged by "over using"!
dandy72 wrote: I'd scroll down one "tick" (if you wanna call it that), it would do it but then scroll back up again by 2 or 3 ticks
This is one of the most common problem I have. That and the "ghost scroll" where it moves up and down without anyone even touching the mouse. I have tried cleaning the mice and no joy
The other problem I usually have is the left button just stops clicking. It is like the 5 million clicks of lifetime expectancy wore off in less than two years.
Like I recently said in a post here, I still use a serial HP two button ball mouse (or it's PS/2 sibling) when I go on the field because it is the most durable mouse I have, and works in every surface. It has been drowned, run over, drop from heights, etc. Except some scratches, still works as new and it is 28 years old . Just clean it and go. The only downside is the lack of scroll wheel.
|
|
|
|
|
I reluctantly recently switched from a corded MS Comfort to a Bluetooth MS mouse of some kind...no model or name anywhere, just 'Made in China'. Anyhow, I'm learning to live with constant episodes where it becomes unresponsive. If I know where the cursor is, I just have to wait a few seconds. It's the times where I don't see it and wind up frantically moving the mouse around trying to find it that irritate me most...that and when the scroll just stops working sporadically...likely the same issue.
I'll eventually try another one and consider this one a waste of money.
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
I use a cheap-ish Logitech keyboard (solar) and mouse (2x AA batteries last about a year) that share a USB dongle. Both work great and have for years... just sayin'.
|
|
|
|
|
One of my favorite mice, in terms of durability, has been the Logitech M310. I bought one for college nearing 10 years ago. I liked it enough to make it a primary gaming mouse when another, more expensive one died. No fancy buttons and costs less than $20, but it's been a trooper. Recently, it has started having an issue with the right mouse click, and I'm torn with repairing or retiring it.
It'd be fascinating to see how many hours it's logged.
|
|
|
|
|
Kris Lantz wrote: It'd be fascinating to see how many hours it's logged.
I remember seeing some software on some machine that reported "distance travelled" - in miles (!)
|
|
|
|
|
I love their 4500 series, it's cheap and works like a charm. Though at home I definitely switched to gaming mice, given that's my primary occupation at home. Having 8 extra buttons helps a lot.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I've also been having the same infuriating scrolling issues with two different brands of mice seemingly resisting and fighting scrolling -- one tic down scrolls five up time and again, resisting whichever direction,for a half dozen trys, until I get rough pressing violently hard. Half the time it also fails to plant the cursor as well. Mostly in Firefox browser. Dunno if it may be a browser issue, or it may be something to do with how W10 handles the drivers in Firefox, because it doesn't seem to occur on my W7 machines. It would be great if someone else could confirm this on their systems. I may get fed up enough to try opening edge to see if it's ms trying a new P/A tactic to force edge on us...
I really miss those solid original MS Intelliamice with the good switches & tilt-wheel as well. ~jm
|
|
|
|
|
EKTO VR: Transforming Workforce Training with Wearable Technology[^]
"I once put instant coffee into the microwave and went back in time." - Steven Wright
"Shut up and calculate" - apparently N. David Mermin possibly Richard Feynman
My sympathies to the SPAM moderator
“I want to sing, I want to cry, I want to laugh. Everything together. And jump and dance. The day has arrive — yippee!” - Desmond Tutu
“When the green flag drops the bullshit stops!”
"It is cheaper to save the world than it is to ruin it."
|
|
|
|
|
There is "walking" in the metaverse? I thought the whole idea of the metaverse was to plugin, burnout and fade away.
|
|
|
|
|