# Ponch

Patron

3,344

\$0.00

## Posts posted by Ponch

### optimizing moves in a queue/stack (sorting TV channels)

Thanks. But 7 is not the answer I'm looking for.

I can already see a example of 17;

7, 8, 9, 16,18, 44,55,82, 83; 84, 123, 134, 138, 165, 166, 517, 518

there is most probably more.

### optimizing moves in a queue/stack (sorting TV channels)

I tried, I tried. I got dropbox and TurboC (Im on Win7 here), I tried to compile the C bit on that page I linked. It says there is an error (warning). There seems to be a typo on line 30; that "%d" seems to be coming from nowhere but I don't know what it should be replaced with.

`#include <stdio.h>#include <stdlib.h> struct node {	int val, len;	struct node *next;}; void lis(int *v, int len){	int i;	struct node *p, *n = calloc(len, sizeof *n);	for (i = 0; i < len; i++)		n[i].val = v[i]; 	for (i = len; i--; ) {		// find longest chain that can follow n[i]		for (p = n + i; p++ < n + len; ) {			if (p->val > n[i].val && p->len >= n[i].len) {				n[i].next = p;				n[i].len = p->len + 1;			}		}	} 	// find longest chain	for (i = 0, p = n; i < len; i++)		if (n[i].len > p->len) p = n + i; 	do printf(" %d", p->val); while ((p = p->next));	putchar('\n'); 	free(n);} int main(void){	int x[] = { 3, 2, 6, 4, 5, 1 };	int y[] = { 7,8,9,1,2,49,16,139,140,141,142,143,74,18,81,90,68,69,70,92,14,61,120,3,11,4,5,17,12,13,76,72,73,116,117,10,45,170,44,55,85,121,122,128,82,34,83,59,136,75,151,80,169,84,172,161,35,52,43,164,56,53,54,37,38,71,123,134,138,165,152,15,166,79,167,163,133,36,40,126,144,88,67,517,518}; 	lis(x, sizeof(x) / sizeof(int));	lis(y, sizeof(y) / sizeof(int));	return 0;}`

### optimizing moves in a queue/stack (sorting TV channels)

I'll probably do that tomorrow night.

I'm not familiar at all with any of those methods to find out the "Longest Increasing Subsequence".

The existing sequence is this (those should get from 1 to 85);

7,8,9,1,2,49,16,139,140,141,142,143,74,18,81,90,68,69,70,92,14,61,120,3,11,4,5,17,12,13,76,72,73,116,117,10,45,170,44,55,85,121,122,128,82,34,83,59,136,75,151,80,169,84,172,161,35,52,43,164,56,53,54,37,38,71,123,134,138,165,152,15,166,79,167,163,133,36,40,126,144,88,67,517,518

I'm sure lots of people here could do that in 3 copy/paste.

### optimizing moves in a queue/stack (sorting TV channels)

I'll read most of that (I studied physics few years long time ago but my brain's sharpness is very far from what it was at the time).

The actual commands you have available on that TV set may make one way simpler than another.

The fact I have to navigate through the channel's list to go "fetch" them is a factor. I can "page up/page down" 10 channels at a time in that purpose.

### optimizing moves in a queue/stack (sorting TV channels)

I know I'm going to loose more time than I'll win by discussing this, but just for the curiosity...

I'm sorting the channels on a relative's TV (he's in hospital so I have a few days to do that  hopefully he'll appreciate). We've all done that 30 times in our lives (on VCRs and others), you move them like mad until you're done or the remote's batteries are dead.

I was wondering if there was a method to do as few moves as possible.

Normally, I'd start with the channel I want to place in #1 and go fetch it and place it there, that is...unless I see an obvious best move. That's where logic becomes vague and I stop thinking.

An "obvious best move" would be this kind of thing; if 1-2-3-4-5 has to become 2-3-4-5-1, moving 1 to the end is the best move (instead of moving 2 to 1, 3 to 2 etc) but you have to see it and that was a really obvious one.

Are there methods to do that in a sensible way ? I'm talking about 85 channels I'm moving to front from a list of 175. Google doesn't seem to be my friend.

### PC connections lifecycle

Do you get the same with that cord not connected to your PC (only to the wall socket ?)

### PC connections lifecycle

touching the cable gives me shocks.

Can you elaborate on this ? Touching an insulated (I guess it is) cable gives you shocks ?

Do you mean "holding the metal case of my PC while pushing the plug gives me shocks"?

### Windows 7 laptop over heating

That computer with 4Gig of RAM should run Win7 just fine. Obviously,

-Win7 is unlikely to have introduced a ton of dust in your laptop.

-Dust is unlikely to get your CPU to 93%

If your CPU is 93% when doing nothing, something went wrong with your install or you have wrong/missing drivers or you have malware or unwanted/unneeded programs.

### nuhi is back, post your suggestions here

topic started at :17 August 2013 - 05:40 AM

Well have you even read that 1st post to know what the topic was about ? If not, why post ? Have you read the answers ? If not, why post ?

### PC connections lifecycle

almost every other day I connect and disconnect all my I/O plugs.

"The eSATA connector has a design-life of 5,000 matings"

That's 27 years, ...sounds OK to me.

### Windows 7 laptop over heating

95°C is bad, very bad. Were your 47° measured long time ago or a few days/weeks before the Windows7 install ?

Does the CPU hit the roof as well (in Task Manager) ? Does the fan run all the time? The battery is not an issue unless you have the impression that the battery heats up itself.

### XP64 + nLite Question: "Program Files"

See if this is your case. Otherwise you might get a faster answer by trying it yourself as I guess very few people are using XP64 and that option.

### nuhi is back, post your suggestions here

If I was to guess, I would say 2 more months

Oh my God, it's now been more than 3 months,... it's the end of the world!

Can you people please stop yourselves from wasting our time by posting entire pages of whining?

Nuhi is working on it. Period.

### USB to Ethernet Adapters and PXE

I think you'd need to add the drivers into your PE with dism

I think you're confused between PXE and PE x.

The goal here is to "PXE boot" from the device (NIC / LAN). What OS and drivers are loaded from there do not matter at this point.

### Question - Best Flash Player Version For XP ?

The experts at Adobe will probably say that the last version is the best choice.Unless you have specific issue, it is difficult to say something else..

### Broken IE 11, can't connect to internet

Removed  and reinstalled IE 11

So was it working when it reverted back to IE10 or IE9 ?

### Integrate drivers to the XP installation CD?

"Gelieve niet aan scare mongering te doen."

From the program's author own FAQ page; http://www.nliteos.com/faq.html#Q8.

I'll also leave it here as I know you'll answer again and again. And again.

### Integrate drivers to the XP installation CD?

AFAIK:

1. you cannot (should not) EVER run nlite on an already nlited source

This is a bit extreme. I'm not encouraging doing it but in most cases you can for instance add drivers to an already nLited disc, as long as the .inf files don't have the same names. You can also remove more components. You can use modules you didn't use before (for example you add drivers and a Service Pack, next you add hotfixes and/or remove components).

Let's say it's never EVER recommended.

### Avira 14 seems to cause slow startup

Does anyone notice a serious delay and unresponsive system before Avira's little umbrella gets open? I get high CPU from Avira's services for several minutes on 2 different computers running XP. This is since little less than a week. Avira (Antivir free) is up to date. On one of those systems, a dual boot with Avira 9 sees no delay.

### Windows scan for disc slowing boot times

I diagnose using the Windows Performance Kit,

You could wait for Magic Andre to pass by. Or you could post a link to this thread in the 1st pinned topic.

### Why is the pcmcia.sys file missing after a sp3 slipstream?

Simply because it was missing before the sp3 slipstream with nLite1.4.9.3.

Do not slipstream SP3 to an already modified source. +If you are not aware that the source was modified... it's most probably not yours.

### Windows scan for disc slowing boot times

Is it any cd/dvd that makes it boot faster ? That's weird.

### Windows scan for disc slowing boot times

Laptop, desktop? Has this always been the case ? Can you tell if the 5seconds difference are before or after Windows starts (you say "Windows scans for a the disc")?

×
• Home

• Donation
• #### Subscription

• Contact
×
• Create New...