Reply
Old Jun 8, 2008, 03:26am Default Re: Today !
Cat-tranz's Avatar
Tech-Babe

Posts: 2,700
Name: Cindy
Karma: Cat-tranz is a jewel in the roughCat-tranz is a jewel in the roughCat-tranz is a jewel in the rough
No working hun
__________________
.
.New Members please read > TNT Rules
Cat-tranz is offline
Reply With Quote
View Public Profile Send a private message to Cat-tranz
 
Old Jun 8, 2008, 08:33am Default Re: Today !
sepulchre's Avatar
Elite Member

Posts: 489
Name: Ken
Karma: sepulchre will become famous soon enough
Well my parts arrived yesterday so today I take a trip into hardware land. It's been a while so it will be nice to hang with my old friends oscilloscope, volt / ohm meter, and soldering iron. We'll be customizing some electric guitars with on-board active preamps.
I love getting my hands into the wires and guts of fine instruments. We'll see if I am still the electronics surgeon I was 30 years ago. (Can there be any doubt?!) It's even more fun than working in the garden!
__________________
(\__/)
(='.'=)
(")_(")
sepulchre is offline
Reply With Quote
View Public Profile Send a private message to sepulchre
 
Old Jun 8, 2008, 09:37am Default Re: Today !
APK
APK's Avatar
Elite Member

Posts: 368
Name: The Duke of URL
Karma: APK will become famous soon enough
Quote:
Originally Posted by sepulchre View Post
Well my parts arrived yesterday so today I take a trip into hardware land. It's been a while so it will be nice to hang with my old friends oscilloscope, volt / ohm meter, and soldering iron. We'll be customizing some electric guitars with on-board active preamps.
I love getting my hands into the wires and guts of fine instruments. We'll see if I am still the electronics surgeon I was 30 years ago. (Can there be any doubt?!) It's even more fun than working in the garden!
Heh, I have a friend that's "into" guitar refurb'ing & modifying...

He's nearly CONSTANTLY putting on better things into his guitars (better "POTS" & pickups (which I think give the best 'boost', on the latter one)) if not that of others too...

He also adds things on the outside of his "axes" (like better string/fret locks (whatever the stuff is that helps you tune the strings that you crank/turn etc.)) & better strings + neck adjustments et al...

* It's kind of cool, & one of my life's regrets is NOT having pursued music as a hobby @ least...

(I think it would be a GREAT "2nd job" though, imo @ least, to go out on weekends & play to a crowd + be paid for it to top THAT off!)

APK

P.S.=> I love "PRS" guitars... pricey, but they're like a "work-of-art" imo, in how they're carved & when done with the "flame maple top" type wood? Unreal... a wonder to just LOOK @... apk
__________________
"I'm Reese: Sgt. TechComVN38416, assigned to protect you - You've been TARGETTED FOR TERMINATION!"

Last edited by APK; Jun 8, 2008 at 09:38am.
APK is offline
Reply With Quote
View Public Profile Visit APK's homepage! Send a private message to APK
 
Old Jun 8, 2008, 12:56pm Default Re: Today !
ianm's Avatar
Just Cuddly Old Me™

Posts: 1,502
Karma: ianm is on a distinguished road
absolutely boiling out there, been to the country park and it was absolutely packed
__________________
blog | flickr | fazyluckers | graphic design forum | graphic design links | The Photo Forum


MCP | MCDST | MCTS
ianm is offline
Reply With Quote
View Public Profile Visit ianm's homepage! Send a private message to ianm
 
Old Jun 9, 2008, 05:03am Default Re: Today !
Cat-tranz's Avatar
Tech-Babe

Posts: 2,700
Name: Cindy
Karma: Cat-tranz is a jewel in the roughCat-tranz is a jewel in the roughCat-tranz is a jewel in the rough
Today i jot acquainted with a very nice guy called Jordie
__________________
.
.New Members please read > TNT Rules
Cat-tranz is offline
Reply With Quote
View Public Profile Send a private message to Cat-tranz
 
Old Jun 9, 2008, 02:41pm Default Re: Today !
ianm's Avatar
Just Cuddly Old Me™

Posts: 1,502
Karma: ianm is on a distinguished road
you jot?

today was hot and boring at work
__________________
blog | flickr | fazyluckers | graphic design forum | graphic design links | The Photo Forum


MCP | MCDST | MCTS
ianm is offline
Reply With Quote
View Public Profile Visit ianm's homepage! Send a private message to ianm
 
Old Jun 10, 2008, 12:55am Default Re: Today !
Flamingo Rinse's Avatar
Elite Member

Posts: 669
Name: nick
Karma: Flamingo Rinse will become famous soon enoughFlamingo Rinse will become famous soon enough
really busy at work - made some important project managers doubleplus happy (always good for the image) & got a few remote clients out of trouble. A feelgood day

(homegrown) Leek & (homegrown) Potato soup for dinner tonight (leftovers from last night...)
__________________
My Opera Blog
Flamingo Rinse is offline
Reply With Quote
View Public Profile Send a private message to Flamingo Rinse
 
Old Jun 10, 2008, 09:54am Default Re: Today !
APK
APK's Avatar
Elite Member

Posts: 368
Name: The Duke of URL
Karma: APK will become famous soon enough
Ha!

"Taking it e-z", today - hardest work I plan to do today, is to water my "octopus' garden" (in the shade, ala the Beatles tune) so my tomato plants don't die (that's right - I am "into it" now, the gardening bit) & to combine the functions of two of my programs (one old, since 2004 iirc, & a new one) into 1 single new one!

Why? Well, I used the programs below to FINALLY finalize my custom HOSTS file... took a while, & I found out "catch-22's" when using ACCESS SQL import/export (via select distinct queries for normalization/removal of duplicate entries) is why!

(Which I mentioned in this thread a couple pages back as a method I decided to try to use, since others' hosts file entries formats are NOT the same as my own - Heck, I'll be "bold about it" & state in fact, that they ARE LESS EFFICIENT, & "throw my 2nd app below for a loop" if NOT in the format I use as well when it goes to "normalize" the HOSTS file's internal entries).

-----------------------------------------------------------

So, to make other custom HOSTS file makers' entries in my HOSTS file the same as the format I use? Well - I did that via writing an app that "scrubs" out the format's others use when doing HOSTS file lines entries (rather than Access SQL exports after select distinct queries for normalization):



(Sourcecode is below... in my "P.S.", for anyone that's interested in that kind of thing!)

... &, I have to do that, because My custom HOSTS file, for line entries, uses this format:

IPAddress (singlespace) URL (cr+lf/enter keypress)

(& not all others do!)

I.E.-> Some folks who do HOSTS files have a TAB instead of the singlespace noted above...

OR

They leave a trailing space before the cr+lf (just after the URL), & this makes the file larger, especially over MANY entries! This happens after Ms-Access exports & adds unecessary size (slows load of HOSTS).

(I suspect strongly this format used by others is due to Ms-Access being used on import/select distinct queries/export back to HOSTS file imo (& experience from using it to do so earlier here in fact))...

That format I use, however? It is the MOST logically efficient I can think of in fact, especially for blocking bad sites &/or adbanners (127.0.0.1 vs, the 0.0.0.0 I use).

(e.g.-> Some folks use 127.0.0.1, which is fine, unless you have a TON of entries, & I do @ 533,000++ lines now - those extra 2 bytes of 127 vs. 0 on the first octet addup, & eat more RAM this way in DNS Cache memory occupancy + a longer loadtime from disk results).

-----------------------------------------------------------

Then, once the file entries' format is setup correctly?

I "normalize it" (removal of duplicate entries for size & memory efficiency + faster loadtime up from disk into your local DNSCache) !

That's done here by using this older app of mine, which then removes duplicated entries, which DO happen like mad, especially if you consolidate others' HOSTS file entries (which I do) first (once the file's line entries are in the form above I note):



& that 2nd app then helps you make or delete new entries as well (via checking if you already have an entry in the file that you intend to insert)):



-----------------------------------------------------------

My current CUSTOM HOSTS FILE (for both blocking out javascript/iframe poisoned websites &/or adbanners) is now 14mb in size, yes LARGE, but "super-comprehensive"!

It's composed of ALL of the other known & respected HOSTS files, listed here:

WIKIPEDIA HOSTS FILES:

http://en.wikipedia.org/wiki/Hosts_file

Plus:
  • SpyBot S&D entries
  • & those from various security sites (I listed them in this thread + the "HOW TO SECURE Windows 2000/XP/Server 2003 & VISTA" thread in the Operating System section here).


Works like a dream, this new HUGE custom HOSTS file of mine now... even @ that size (& even on a Celeron Pentium II with only 64mb (my main tester & friend Jack's machine))...

Plus, the new app I wrote (pictured first above, sourcecode below) to "scrub" & format others' HOSTS file entries for insertion into mine for speed + efficiency AND so my other app will "normalize it", w/ out erring out/abending, FLIES!

Which makes sense: I wrote it in a combination of Win32 API calls, & more importantly, in Borland Delphi 7.x!

(Delphi was proven, of ALL places, in "Visual Basic Programmer's Journal" Sept./Oct. 1997 issue "INSIDE THE VB COMPILER" to blow away both VB & even MSVC++ in tests, especially those of math & strings work (which EVERY PROGRAM DOES, but especially one of THIS nature no less) by over 2-3x the speed other languages manage on this type of processing... it was a "wise-choice" imo @ least, to use it for this type of app, based on the work it does (heavy string comparison & manipulation work in files)).

* Strange as that may sound? I am a "happy guy" about that!

APK Hosts File Rewriter 1.0++ - which tears thru 53,000++ entries in the HOSTS file in less than 2 minutes on my current system, @ roughly 36,000 lines a minute/ 600 lines a second (F A S T, try this with notepad.exe, written in C/C++, by way of comparison? It manages around 166 lines per second... thus, You'll be waiting 3-4 days)...

(Which is NOT bad, considering my CPU & system is NOT 'state-of-the-art' by any means (2++ yrs. old now))...

-----------------------------------------------------------

So - Other than downloading MS patches today & watering my garden (iirc, it is "patch tuesday" from MS, 2nd tuesday of every month)?

I am probably going to COMBINE the functions of both programs above into 1 single one (new rewrite most likely, as I have gotten better @ programmatic optimization since I wrote the 2nd app (APK Hosts File Optimization Engine 3.0++) & intend to make it run as fast as the first app shown above)...


APK

P.S.=> Code for my "APK Hosts File Rewriter 1.0++" is here (small, but F A S T):

{COPYRIGHT APK - Alexander Peter Kowalski 06/01/2008 onwards}

unit Unit1;

//HAND & COMPILER LEVEL OPTIMIZATIONS SWITCHES/#PRAGMA DIRECTIVES
{$define nodebug}
{$STACKCHECKS OFF}
{$D-}//will prevent placing Debug info to your code.
{$L-}//will prevent placing local symbols to your code.
{$O+}//will optimize your code, remove unnecessary variables etc.
{$Q-}//removes code for Integer overflow-checking.
{$R-}//removes code for range checking of strings, arrays etc.
{$S-}//removes code for stack-checking. USE ONLY AFTER TESTING !
{$Y-}//will prevent placing symbol information to your code
{$H-}//Forces ShortString usage (no heap usage)... apk

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls, StrUtils;

type
TForm1 = class(TForm)
OpenDialog1: TOpenDialog;
BitBtn1: TBitBtn;
StatusBar1: TStatusBar;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var //GLOBAL
Form1: TForm1;

implementation

{$R *.dfm}
{$H-}
{$h-} //FORCE SHORTSTRING USAGE (below 254 char) so it does not use stack, & keeps memory usage on local heap (faster)... apk

procedure TForm1.BitBtn1Click(Sender: TObject); register; //use register loading, equivalent of FastCall C/C++ stuff, & faster... apk
var

Save_Cursor:TCursor;
F1: TextFile;
F2: TextFile;
Ch: ShortString; {I can & did do this here, vs. String datatype cast (no url I use is over 110 characters + it matches the $h- compiler directive for optimization)... apk}
Flags: TReplaceFlags;
Counter: Integer; {Possible optimization: Use smaller numerical datatype, since I doubt I'll use the full capabilities of INTEGER in THIS program that works on a HOSTS file... apk}
begin inherited;
Save_Cursor := Screen.Cursor;
Screen.Cursor := crHourGlass;
Ch:= Trim('');
Counter:=0;
Label3.Caption:= Trim(DateTimeToStr(now));
Label3.Update;
Label2.Refresh;
Label4.Caption:= Trim('Waiting to complete...');
Label4.Update;
Label4.Refresh;
//Time slice - internally multitask here... apk
Application.ProcessMessages;
{ACTUAL "ACTIVE INGREDIENT" (code engine that does the actual work) HERE}
//==============================================

try
if OpenDialog1.Execute then
begin
If OpenDialog1.Filename <> '' then
begin
BitBtn1.Enabled:=False;
AssignFile(F1, OpenDialog1.Filename);
Reset(F1);
AssignFile(F2, 'B:\HOSTS\NewNormalizedFinalMinusTrailingBlanks.tx t');
Rewrite(F2); //Blanks out, no need for FileUtils unit If FileExists... apk
while not Eof(F1) do
begin

Counter:=Counter+1;
Readln(F1, Ch);
//Replace ANY 127.0.0.1(tab) with 0.0.0.0(space) 1st... apk
Ch:= StringReplace(Ch, '127.0.0.1', '0.0.0.0', Flags);
//Reverse the string first, & StringReplace will nail the trailing blank
Ch:= ReverseString(Ch);
Ch:= StringReplace(Ch, ' ', '', Flags);
//Reverse it again & write it (trailing blank is removed now)... apk
Ch:= ReverseString(Ch);
Ch:= StringReplace(Ch, '0.0.0.0', '0.0.0.0 ', Flags);
Ch:= StringReplace(Ch, '0.0.0.0 ', '0.0.0.0 ', Flags);
//Burn quotes from AccessExport (after normalize filedata) to text... apk
Ch:= StringReplace(Ch, '"', '', Flags);
Ch:= StringReplace(Ch, '"', '', Flags);
Ch:= StringReplace(Ch, '"', '', Flags);
Ch:= StringReplace(Ch, '"', '', Flags);
Writeln(F2, Ch);
Label4.Caption:= Trim(DateTimeToStr(now));
Label4.Update;
Label4.Refresh;
StatusBar1.SimpleText:= Trim(IntToStr(Counter) + ' ' + Ch );
StatusBar1.Update;
StatusBar1.Refresh;
end;
CloseFile(F2);
end;
CloseFile(F1);
end;
//==============================================
except //ERR TRAPPING VIA EXCEPTION/RAISE EXCEPTION/CUSTOM ERRHANDLER I BUILT HERE... apk
begin

Application.ProcessMessages;
//Time slice-multitask internally here, after loop is done, even after Exception catch on err/abend... apk
BitBtn1.Enabled:=True;
Screen.Cursor := Save_Cursor;
Screen.Cursor:=crHourGlass;
close;
end
end;
Application.ProcessMessages;
//Time slice-multitask internally here, after loop is done... apk
BitBtn1.Enabled:=True;
Screen.Cursor := Save_Cursor;
Screen.Cursor:=crDefault;
Application.ProcessMessages;
//Time slice-multitask internally here, after loop is done... apk
Application.MessageBox(PChar('Done: Total lines processed = ' + IntToStr(Counter)),nil);
end;

procedure TForm1.FormCreate(Sender: TObject); register; //use register loading, equivalent of FastCall C/C++ stuff, & faster... apk
var

ProcessID: DWORD;
ProcessHandle: THandle;
ThreadHandle: THandle;
begin inherited;
{RUNNING @ REALTIME CPU PRIORITY FOR UTMOST IN SPEED via Win32 API call usage for that below... apk}

ProcessID:= GetCurrentProcessID;
//Application.Handle SHOULD do this as well here... apk
ProcessHandle:= OpenProcess(PROCESS_SET_INFORMATION,
false, ProcessID);
SetPriorityClass(ProcessHandle, REALTIME_PRIORITY_CLASS);
ThreadHandle:= GetCurrentThread;
SetThreadPriority(ThreadHandle, THREAD_PRIORITY_TIME_CRITICAL);
end;

end.
Attached Images
File Type: jpg APKHostsFileRewriter.jpg (14.7 KB, 25 views)
__________________
"I'm Reese: Sgt. TechComVN38416, assigned to protect you - You've been TARGETTED FOR TERMINATION!"

Last edited by APK; Jun 28, 2008 at 10:51pm.
APK is offline
Reply With Quote
View Public Profile Visit APK's homepage! Send a private message to APK
 
Old Jun 11, 2008, 11:51am Default Re: Today !
DaveMo~'s Avatar
Witty Title

Posts: 1,548
Name: Dave
Karma: DaveMo~ is a jewel in the roughDaveMo~ is a jewel in the roughDaveMo~ is a jewel in the roughDaveMo~ is a jewel in the rough
Today, I got tired from reading the previous posts and all the stuff y'all have done. My order of things to do starts with me feeling better...and may go back to lay down to do that. Next thing, first make sure first thing is done.

I need to get my hayfield that I call my front yard mowed. The dog almost disappears when he goes outside. If I get that done, need to stir the compost, then put the grass clippings on top. And after that, I'll add that stuff on tomorrow's to-do list because I probably won't get it done today.

Dave
__________________
Trying this out: My Dollar Store Let me know what you think!


DaveMo~ is offline
Reply With Quote
View Public Profile Visit DaveMo~'s homepage! Send a private message to DaveMo~
 
Old Jun 11, 2008, 01:52pm Default Re: Today !
sepulchre's Avatar
Elite Member

Posts: 489
Name: Ken
Karma: sepulchre will become famous soon enough
I mowed mine this morning. Got a little sun, and a little hay fever..
__________________
(\__/)
(='.'=)
(")_(")
sepulchre is offline
Reply With Quote
View Public Profile Send a private message to sepulchre
 
Reply
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search





All times are GMT -4. The time now is 08:00am.

RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Copyright © 2006 - 2008 by The New Tech

vBulletin, Copyright © 2000-2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC5