text
stringlengths
20
1.01M
url
stringlengths
14
1.25k
dump
stringlengths
9
15
lang
stringclasses
4 values
source
stringclasses
4 values
Solving memory leaks using Flash builder 4 profiler Locating memory leaks section in FB4 docs provides an overview and few techniques for handling this issue. In this article I would like to offer another technique for using the object references view to quickly track down the root of a memory leak, straight down to the exact line of code causing it. In short: 1. Choose a repeatable sequence. 2. Use the "Generate object allocation stack traces" checkbox when starting the profiling session. 3. Execute the sequence several times, and take a first memory snapshot. Execute it few times more and take a second snapshot. 4. Locate a class whose instances are not being GCed. 5. Open this class in the object references view for both snapshots. 6. Expand the first instance's back reference list, and look for suspicious path. 7. Starting from top to root, go through the path, and for each object compare its instance count for both snapshots. The instance whose count is the same for both snapshots is causing the memory leak, and accumulates instances of the object it holds a reference to. it is a one-to-many-reference-holder. 8. By looking at the Allocation Trace view for the accumulated object, you can find where in the code the reference was added to it. 9. Make sure the reference is removed. Details: I assume you are already familiar with this view, and got to the point where you know which the object not being GCed is, and needs to find out who's preventing it from being released. In an average application, after running a sequence of steps a few times, you may find yourself with hundreds of instances of the same class, each has hundreds of back references listed in the object references view, which can be quite overwhelming. Where do you start? What should you look for? You came to the right place! I will show you a very quick and simple way to spot the bug: Before I start, there is an important concept you should get familiar with. I call it "the one to many reference holder". The idea is quite simple, and is best visualized by an illustration: Let's say you have a memory leak which results with 3 instances of the same object (class A) in the first snapshot, and 6 instances in the second snapshot (taken after repeating the same sequence of steps few more times) . A possible topology of these objects references may look like this in the first and second snapshots: In the above illustration, all three instances are referenced by a single object (of class B), which is referenced up to the GC root. Class B is a one–to-many-reference-holder,and is a good candidate for causing a memory leak. In case the number of class A instances keeps growing while you repeat the scenario, then class B has a memory leak. Another possible reference topology may end up with the same result of 3 and 6 instances: This time, the 3 instances are held by other 3 instances (class B), which in turn are held, again, by a single object (class C), which is held up to the root. In this topology, although class B does hold a reference to class A, we can clearly see that it is pointless to deal with it, since class C is the one accumulating references. He is a one-to-many-reference-holder and causes the memory leak. If we deal with class C, the class B instances along with class A instances are all gone. Having this concept clear, answers the question "what do we look for?". Although FB4 does not have this nice topology view for object references (Mihai Corlan kindly pointed me to Grant skinner's article on the flash sampler which might be used for allowing this kind of view), you'll see that finding these one-to-many-reference-holders is a matter of minutes. In the "object references" view, you open a suspected path to the object, and start following it to the root, checking the instance count of each object on this path. Let's look on a real life sample: Looking at this view(part of the namespaces is hidden for client's privacy sake), we see the following classes along this path: DatagridItemRenderer, CoverageMetricRenderer, SummaryFooter, ConfigurableDataGrid, DataGridContent, ProfilerExtendedQueryResultWrapper , TransactionclassesProxy and so on. We then go back to the Memory snapshot view, sort it by class name, and check the number of instances of each class (Instances column). The following table summarizes the number instances of the above mentioned classes for two snapshots (the second taken after few more scenario repeats): The picture become very clear now: ProfilerExtendedQueryResultWrapper remains with the same number of instances between snapshots, but the number of instances (of class DataGridContent) it holds, keeps growing. This is our one-to-many-reference-holder ! Resolving this will clear this path from this point up. Let's take a closer look at the suspected area: From looking at the object references view, we can see that ProfilerExtendedQueryResultWrapper has a property named _entries, which is of type ArrayCollection. This property accumulates references to DataGridContent instances. When you see the [savedThis] and [listener0] properties, it's an indication of reference made by adding event listeners, and should be read as follows: One of DataGridContent's functions was added as an event handler to an event dispatched by _entries property of ProfilerExtendedQueryResultWrapper. As a result, _entries holds a reference to DataGridContent instance through one of it's functions. In case you are familiar with the code, it will probably take you few minutes to locate where exactly in the code does this happen. However, FB4 can take you to the exact line of code, relieving you from the task of looking for it by yourself: In order to let FB4 find the buggy line of code, you should check the "Generate object allocation stack traces" checkbox when starting the profiler session: Turning this feature on, allows you to see where in the code was an instance created. In this case, the instance of interest is the instance of the function added to the arrayCollection's list of event listeners. Clicking on the "Function" row will show you it's allocation trace on the right "Allocation trace" pane. Clicking on the topmost line of this trace will open the code editor on the line where this function instance was created (line 99 in DataGridContent class): Let's examine this code excerpt: allResults = (value as IProfilerResult).entries; allResults.addEventListener(CollectionEvent.COLLECTION_CHANGE,handleCollectionChange) We can see that handleCollectionChange function, which belongs to DataGridContent class, is being added as a handler to the collection change event of the entries property. As it turns out, this event listener is not removed, and the entries property does not belong to a child of DataGridContent (adding an event listener to your child does not cause memory leaks due to the GC sweep mechanism). This is our memory leak bug ! Resolving event listener memory leaks: A memory leak caused by an event listener can be solved by one of these ways: 1. Take care of removing the event listener when it is no longer needed. 2. Use the useWeakReference parameter to create a weak event listener . In our case changing the code to the following solved the problem: allResults.addEventListener(CollectionEvent.COLLECTION_CHANGE,handleCollectionChange,false,0, true );
https://www.tikalk.com/posts/2010/05/10/solving-memory-leaks-using-flash-builder-4-profiler/
CC-MAIN-2018-34
en
refinedweb
Lambda Expressions in C++ 11 – Part 2 (Usage and Significance) In the previous article – Lambda Expressions in C++ 11 – Part 1 (Definition and Syntax), we discussed the meaning of lambda expressions and their syntax. Here, we shall discuss the usage of lambda expressions and the reasons why they are so significant. Usage and significance of Lambda Expressions As mentioned in the previous article, lambda expressions are, in a way, anonymous functions. A typical lambda has a parameter list, a body and can return values. It has a [] (known as the Capture Clause) in place of the function name, which contains the list of variables that are to be captured explicitly by the lambda (either by reference or by value). A typical lambda looks like:- [capture_clause] (parameter_list) {body of the lambda} [&x, &y] () {return x+y;} Now, why exactly do we need lambdas? What role do they play in our programs? The main use of lambdas is as a replacement for function objects. A lambda has a compact syntax and does not require us to define a class. Hence, it results in a better code that is easier to write and less prone to errors as compared to function objects. A lambda implicitly defines a function object class and then constructs a function object of that class type. For example, to count the no. of even numbers in a vector using a lambda expression, you would write the following program : #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { vector<int> v; // Create a vector object for (int i = 1; i <= 5; ++i) // Add 5 members { v.push_back(i); } int num_even = 0; // num_even stores the total no. of even numbers in the vector // The following code counts the no. of even numbers in the vector for_each(v.begin(), v.end(), [&num_even](int n) { cout << n; if (n % 2 == 0) { cout << " is even " << endl; ++num_even; } else { cout << " is odd " << endl; } return 0; }); // Now, display the total no. of even numbers in the vector cout << "This vector contains " << num_even << " even numbers " << endl; getchar(); return 0; } Output of this lambda example 1 is odd 2 is even 3 is odd 4 is even 5 is odd This vector contains 2 even numbers Creating the same program using a function object instead of lambda expression #include <iostream> #include <algorithm> #include <vector> using namespace std; class func_class { func_class& operator=(const func_class&); int& cnum_even; public: explicit func_class(int& num_even) : cnum_even(num_even) {} void operator() (int n) const { cout << n; if (n % 2 == 0) { cout << " is even " << endl; ++cnum_even; } else { cout << " is odd " << endl; } } }; int main() { vector<int> v; for (int i = 1; i <= 5; ++i) { v.push_back (i); } int num_even = 0; for_each (v.begin(), v.end(), func_class (num_even)); cout << " This vector has " << num_even << " even numbers. " << endl; getchar(); return 0; } Output of this function object example 1 is odd 2 is even 3 is odd 4 is even 5 is odd This vector has 2 even numbers. As is obvious from the two programs shown above, lambda expressions have significant advantages over function objects. However, there is one downside to using lambda expressions. If the functionality that is required in the program is complex, lambdas make it difficult to manage code properly. Therefore, if the required functionality is large and complex, it would be better to use function objects rather than lambdas. Don’t forget to provide us your feedback in your comments. Hey! Someone in my Myspace group shared this website with us so I came to check it out. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers! Exceptional blog and terrific style and design.
https://www.wincodebits.in/2015/07/lambda-expressions-in-c-11-part-2-usage-and-significance.html
CC-MAIN-2018-34
en
refinedweb
Code coverage is a multi-edged sword 🙂 There is no one right answer for how to do it and there are many ways to misuse it. Here I’ll talk about how to think about code coverage and then talk about what we do and reports we use to track it. Let’s say your test pass rate is 99.9%. Is that good? Well, maybe. It’s not nearly enough information to know. Are the tests testing the primary user scenarios? Do you have enough tests? Are you missing testing on entire modules? Code coverage is one tool in the toolshed to help answer the question “Is that good?” Code coverage data is collected while your tests are run (both automated and manual) and records what blocks in your code are covered (and not covered). It can be used in many scenarios: - To determine what parts of your code are not getting covered and allow you to make intelligent decisions about whether or not to do additional testing to cover that code. - To determine when you have too many tests – lots of tests that test basically the same code and don’t cover distinct scenarios. - Combined with pass rate, defect rate and code churn info, help prioritize where do direct your testing efforts. - Identify “dead” code that can never be called so it can be removed. How much is enough? Code coverage is often used as a metric to determine whether sufficient testing has been done to “release” software. The age old question is “How much is enough?” One size does not fit all. Except in the most extreme cases, 100% is not the right answer. Think about what would be involved in 100%. You’d have to write tests to execute every single exception handler, every single branch in your code. Your code probably includes machine generated code – for example, web service SOAP proxies that you don’t even use. There are other example of “dead” code that is hard or inadvisable to remove. So, if it’s not 100%, what is it? We use a minimum bar of 70%, with the vast majority of that coming from automated tests. We only use manual testing coverage to bridge gaps in our automated testing. Would more be better? Maybe. One thing to keep in mind is that every automated test you have comes with a tax – you have to write it, run it and maintain it indefinitely (but this is the subject of a whole different blog post – so I’ll try to get to that one in the next few months). Be careful how you use code coverage. No amount of code coverage will tell you if you have a well tested app. This is because there are tons of bugs that can’t be flagged by code coverage. The problem in these cases is not that the code isn’t being covered but rather that the data variation isn’t sufficient. Buffer overruns are a very simple example of bugs that can still exist in code that has 100% code coverage. This fact really hit me most as we were building TFS and I realized how susceptible SQL is to this problem. Running every query/stored procedure tells so little about the correctness of your SQL code. SQL depends so much on the data you have in the database and the values you query for. I’ve seen teams drive for exceptionally high code coverage numbers. Like everything else in this world, the closer you want to get to “perfect”, the harder it is. It’s much easier to go from 20%->30% than from 60%->70% and even harder to go from 80%->90%. Grinding out test after test to cover every block of code becomes an exercise of increasing effort and decreasing return (in terms of useful bugs found). At some point you are better off directing that extra effort at alternative testing approaches. For us, we’ve decided 70% is the min bar. Making that the min bar, of course means that our average is a bit higher than that. The DevDiv code coverage methodology As I mentioned before, we focus primarily on automated testing code coverage. The reason is that we have to test on such a wide range of configurations, we must be able to rely on our automated tests to find the vast majority of problems. We break things down at the DLL/Assembly level and our metrics are based around the percentage of component that have 70% or better code coverage. Our primary report looks like this and shows % of components and the % code coverage of that component by coverage band, trended by build: We classify each componentby % code coverage bands and track the trends over time. By the time we ship Orcas, the bar should be 100% green. Our goal for Beta 1 was 75% of components over 70% code coverage. Our goal for Beta 2 is 90% of components over 70% code coverage and our goal for RTM is 100% of components over 70% code coverage. We then break that down by feature team and factor in the pass rate on each run. Obviously, it lots of tests are failing, it’s going to affect your coverage numbers. And then we enumerate each of the binaries that are failing the 70% min bar and identify action plans for each. Summary Code coverage is a very useful tool in helping to spot areas of your code that need additional testing. Use it that way. Don’t be a slave to code coverage. Nothing replaces the value of having a person think through all of the scenarios the software supports and describing an appropriate test plan. The code coverage data is a tool to help you refine your test plan and identify areas you may not be thinking about. Brian Join the conversationAdd Comment You’re right on. Code coverage is a good metric to keep track of, but is just one piece of the pie. As for how much is enough, I have my teams strive to reach 90%, especially in areas deemed critical to the app. 100% coverage is usually unrealistic and trying to go from 90% – 100% coverage can be as time consuming as just getting to 90% in the first place. The Law of Diminishing Returns is definitely in effect there. Aaron Hallberg on Orcas Object Model Documentation. Martin Hinshelwood on TFS Event Handler: CTP1 Imminent…. I want to do coverage on my native VC++ 6.0 source code. Any idea how I can go about without using VSTS. I have been struggling to find out if VS6 or VS8 has some way of manually doing the coverage. I was also looking into the Profiler as an option. Do you think I get some way out to do this without VSTS? You can do code coverage on VC6 code using the VSTS code coverage tools. Here’a post on how to do it. Does this help? Brian How do I archive old branch in TFS 2010? @Rajiv – We don't have a true "archive" feature for branches in TFS 2010. If you're looking to prevent people from making any further checkins to the branch, you can apply a check-in lock at the root of the branch. We have an item on our backlog tracking the request to add and archive feature for branches, and I would also suggest visiting our UserVoice site and adding your support to the existing feature suggestion: visualstudio.uservoice.com/…/2980353-allow-marking-a-branch-as-obsolete-or-locked-or-a- -Matt
https://blogs.msdn.microsoft.com/bharry/2007/05/07/managing-quality-part-7-code-coverage/
CC-MAIN-2016-36
en
refinedweb
Opened 9 years ago Closed 6 years ago Last modified 6 years ago #5677 closed (fixed) Debugging with mod_python (apache) Description This is what the docs say:. This is not completely true. Everything you write to sys.stderr ends up in the apache error log, like this import sys sys.stderr.write('This goes to the apache error log') Attachments (4) Change History (23) comment:1 Changed 9 years ago by mtredinnick - Needs documentation unset - Needs tests unset - Patch needs improvement unset - Triage Stage changed from Unreviewed to Accepted comment:2 Changed 9 years ago by grahamd. comment:3 Changed 9 years ago by nickefford - Owner changed from nobody to nickefford comment:4 Changed 9 years ago by nickefford - Has patch set - Keywords sprintdec01 added Done, incorporating suggestions of Malcolm and grahamd. Changed 9 years ago by nickefford Patch to modpython.txt to clarify use of print statements comment:5 Changed 9 years ago by Simon G <dev@…> - Triage Stage changed from Accepted to Ready for checkin comment:6 follow-up: ↓ 7 Changed 9 years ago by dharris What about using standard python logging? Is there a way to get this to go to the error log (or elsewhere)? comment:7 in reply to: ↑ 6 Changed 8 years ago by adroffner@… - Component changed from Documentation to Contrib apps - Has patch unset - Keywords logging modpython mod_python added; sprintdec01 removed - Needs documentation set - Summary changed from Debugging with mod_python (apache) improperly documented to Logging errors with mod_python (apache) - Triage Stage changed from Ready for checkin to Unreviewed. comment:8 Changed 8 years ago by anonymous - Component changed from Contrib apps to Documentation - Has patch set - Keywords logging modpython removed - Needs documentation unset - Summary changed from Logging errors with mod_python (apache) to Debugging with mod_python (apache) - Triage Stage changed from Unreviewed to Ready for checkin comment:9 Changed 8 years ago by ubernostrum - Triage Stage changed from Ready for checkin to Unreviewed Please don't anonymously bump something to "ready for checkin"; that status implies a certain level of review by an experienced triager. comment:10 Changed 8 years ago by guettli - Triage Stage changed from Unreviewed to Accepted This ticket was already accepted (Triage Stage). comment:11 Changed 8 years ago by Camille Harang) Changed 7 years ago by timo updated patch, including new location of modpython.txt comment:12 Changed 7 years ago by timo - Triage Stage changed from Accepted to Ready for checkin I don't think we can expect to document every possible solution to debugging, but the current patch looks like a good addition. comment:13 Changed 7 years ago by kmtracey - Triage Stage changed from Ready for checkin to Accepted I do not like the current patch's inclusion of a vague reference to corrupting client output in "some WSGI hosting solutions". This is text going into the page describing mod_python deployment, specifically. It should limit itself to what happens under mod_python. Sure, adding prints to stdout is a bad idea in other hosting environments too, but that's irrelevant to someone trying to figure out how to debug a problem under mod_python and more likely to cause confusion than anything else. comment:14 Changed 6 years ago by Rupe - milestone set to 1.2 comment:15 Changed 6 years ago by russellm - milestone 1.2 deleted Deferring due to the absence of a trunk-ready patch. Changed 6 years ago by danielr Updated patch removing references to WSGI. comment:16 Changed 6 years ago by danielr Updated patch removing references to WSGI. Changed 6 years ago by timo updated danielr's patch to apply cleanly trunk comment:17 Changed 6 years ago by timo - Triage Stage changed from Accepted to Ready for checkin comment:18 Changed 6 years ago by DrMeers - Resolution set to fixed - Status changed from new to closed If somebody is going to create a patch for this, it must also mention that stderr is buffered in mod_python, so flushing the pipe each time is a necessity if you want to actually see the results in more-or-less realtime.
https://code.djangoproject.com/ticket/5677
CC-MAIN-2016-36
en
refinedweb
About URL Security Zones URL. - Terms - Security Zone Manager Extensibility - Default URL Security Zones - URL Actions and Policies - Registry Keys - Related topics Terms Here are terms used in the discussion of URL security zones. - URL action. A browser action that can pose a security risk to the local computer. - URL policy. A policy that determines which permission or trust level is set for a particular URL action. - URL security zone. A group of URL namespaces that are assigned an equal level of permissions (or trust). Each URL action for the zone has an appropriate URL policy assigned to it that reflects the level of trust given to the URL namespaces in that zone. - URL security zone template. A tool that allows users to specify levels of restriction using easy-to-understand terms: High, Medium-High, Medium, Medium-Low, and Low. Security Zone Manager Extensibility. Default URL Security Zones The following sections describe the default URL security zones. Local Intranet Zone. Trusted Sites Zone. Internet Zone Use the Internet zone for Web sites on the Internet that do not belong to another zone. This default setting causes Windows Internet Explorer to prompt the user whenever potentially unsafe content is about to download. Note: Web sites that are not mapped into other zones automatically fall into this zone. By default, the Internet zone uses the Medium Template. In addition to the settings that the default template defines, there is a hidden setting, URLACTION_SHELL_WEBVIEW_VERB, which is set to URLPOLICY_ALLOW. Restricted Sites Zone. In addition to the settings that the default template defines, there is a hidden setting, URLACTION_SHELL_WEBVIEW_VERB, which is set to URLPOLICY_ALLOW. Local Machine Zone. URL Actions and Policies. Aggregate URL Actions The following table contains the aggregate URL actions and their aggregates. URL Actions and Valid Policies The following table contains the URL actions that the default URL security zone manager uses and the URL policies that you can assign to them. (URL actions that are new for Internet Explorer 7 appear at the bottom.) Registry Keys The registry stores the URL security zone settings in the following key. HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER Software Microsoft Windows CurrentVersion Internet Settings Zones For Windows XP Service Pack 2 (SP2) and later, you can find the URL security lockdown zone settings in the registry in the following key. HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER Software Microsoft Windows CurrentVersion Internet Settings Lockdown_Zones You can determine the zones under which the Shell can open files (URLACTION_SHELL_EXECUTE_HIGHRISK) by checking the following registry values. These values correspond to the following zones, respectively: Local Machine zone, Local intranet, Trusted sites, Internet, Restricted sites. HKEY_LOCAL_MACHINE Software Microsoft Windows CurrentVersion Internet Settings Zones 0 1806 1 1806 2 1806 3 1806 4 1806 If a URL policy value is 0x00, the action is allowed; if a value is 0x01, the user is prompted; and if a value is 0x03, the action is not allowed. For a list of possible URL policy values, see URL Policy Flags. Security Warning: Setting these registry keys incorrectly can compromise the security of your application. The values for these registry keys are safe by default. By adjusting these values, you might put users at risk for an elevation of privilege attack. You should review Security Considerations: URL Security Zones API before continuing. Related topics
https://msdn.microsoft.com/library/ms537183(v=vs.85).aspx
CC-MAIN-2016-36
en
refinedweb
Let’s say there are two functions, Foo1 and Foo2. Foo2 needs to be called after Foo1, and only Foo1 can call Foo2: Foo1 Foo2 Foo2 Foo1 A realistic scenario might be when Foo1 is invoked using a web service. Foo1 is called and needs to return as quickly as possible so that the calling client doesn’t hang. This means both Foo1 and Foo2 must be asynchronous functions, and that Foo2 must run after Foo1 has returned. For Foo1 to be able to call Foo2 after Foo1 returns can be done in multiple ways. One way might be to have external queue into which tasks can be inserted so that they can be run when a certain state is set by a separate thread. This is good for scalable enterprise architecture, but seems a bit of an overkill when all we want to do is to call Foo2—after Foo1. Another way is using the timer object. A third way is using the relatively new ‘async’ method modifier. The “async” function modifier was introduced in Visual Studio 2012/2013. Before talking more about the async modifier, here is a complete listing of the code that is also attached to this tip. It's a console application: using System; namespace MyCSasync { using System.Threading; using System.Threading.Tasks; class MyClass { public static string[] Strings = new string[3]; public static int Count = 0; private async Task Foo2() { await Task.Yield(); Strings[Count++] = "Foo2 called at " + DateTime.Now.Ticks; } public async Task Foo1() { Strings[Count++] = "Foo1 at " + DateTime.Now.Ticks; // Call Foo2 asynchronously AND after this function returns. Foo2(); Strings[Count++] = "End of Foo1 at " + DateTime.Now.Ticks; } } class Program { static void Main(string[] args) { MyClass myclass = new MyClass(); myclass.Foo1(); while (MyClass.Count != 3) Thread.Sleep(1); foreach (string msg in MyClass.Strings) { Console.WriteLine(msg); } } } } While Foo1() is called asynchronously from the Main function, it could be called from a web service method which needs to return back to a client as quickly as possible so the client doesn't seem to hang. Foo2() is a private function that will need to be called after Foo1 completes. Foo1() Main Foo2() private Foo2 is partially executed so that Foo1 can return. This partial execution is just await Task.Yield() This allows Foo2 to temporarily exit so that Foo1 can finish. The "Yield" method, as described by Microsoft, "creates an awaitable task that asynchronously yields back to the current context when awaited." That's exactly what we would like to do. There are other ways to do this. Using a delay. The problem with that approach is the behavior of the code may change depending on how fast your computer is. This is easy to test. If you use Task.Delay(1), which is 1 millisecond, it is more than enough to make the code above seem to be behaving the same. If you change the Delay parameter to a TimeSpan object with 1 tick, you may see that the code no longer works as expected. Yield Task.Delay(1) Delay TimeSpan When you run the code above (ctrl-F5), you should see something similar to: Foo2 is called after Foo1. Note the tick difference, about 20,000. On my machine, that's about 3200th of a second. So a delay of 1 second would seem to work, but certainly not 1 tick. As an exercise, change the code "await Task.Yield()" to "await Task.Delay(1)" and you'll likely see that Foo2 is called after Foo1. Now change it to "await Task.Delay(TimeSpan.FromTicks(1))". You will see that Foo2 is called before "End of Foo1". This is because Foo2's await took less time than Foo1 could return. await Task.Yield() await Task.Delay(1) await Task.Delay(TimeSpan.FromTicks(1)) End of Foo1.
http://www.codeproject.com/Tips/768633/Function-A-Calling-Another-Function-B-After-A-Retu
CC-MAIN-2016-36
en
refinedweb
For a few years I used excellent shared memory IPC implementation by studio_ukc:. While it is really fast, there are several drawbacks. Also, many members were routinely asking for the working code of that class - the one available for the download needs to be fixed (although some fixes are available in comments section). I decided to go ahead and upload my own implementation based on the same idea, but with most of drawbacks eliminated. Please read original article before proceeding with this one. So, what are advantages of my implementation compared to the original? CSimpleIPC ipc; ipc.createConnectionPoint(blockSize, blockCount, maxExpansions, preAllocate, minExpansionDistance); As you can see, now block size and block count are function parameters, not template ones. But it's not all yet. The blockCount that you pass is in fact initial number of blocks. If value of maxExpansions is over 1, then this IPC will increase number of blocks-in-use when needed. For example, you can start with 256 blocks. When IPC will need to use more, it will allocate 256 more, and so on - as many times as you specify in maxExpansions. Obviously, value of maxExpansions cannot be less than 1. The last parameter - minExpansionDistance controls how expansion happen. Basically, once number of available blocks becomes less or equal to minExpansionDistance , expansion happens - if maxExpansions are not reached yet. You probably noticed one more parameter - preAllocate , but I will cover it later in the Tweaks section. blockCount maxExpansions minExpansionDistance preAllocate CSimpleIPC ipc; ipc.createConnectionPoint(blockSize, blockCount, maxExpansions, preAllocate, minExpansionDistance); ipc.write(&somedata, sizeof(somedata)); ipc.read(&somedata, sizeof(somedata)); requestStopCommunications() requestResumeCommunications() isCommunicationStopped() while (!ipc.isCommunicationStopped() && <some other condition>) { ... ipc.write(&somedata, sizeof(somedata)); ... } Download contains 6 files: std::wstring So, for usage in your project you'll need only first 3 files. Please excuse me for the code in IPCTest.cpp - it's quite crude and "not pretty", but it serves well for the purpose of testing and benchmarking. You can also look at it for usage example, but here is the general idea: //start with: CSimpleIPC ipcMain; if (!ipcMain.createConnectionPoint(blockSize, blockCount, maxExpansions, preAlocate, minExpansionDistance)) //signal error, decide on what to do in case of failure; // in some other place or thread: CSimpleIPC ipcClient1, ipcClient2, .. ipcClientN; if (!ipcClient1.attachToConnectionPoint(ipcMain.getConnectionPoint())) //<signal error, ...> .... if (!ipcClientN.attachToConnectionPoint(ipcMain.getConnectionPoint())) //<signal error, ...> // yet somewhere else - any thread: while (!ipc.isCommunicationStopped()&& <some other condition>) { ... if(!ipcClientX.write(&somedata, sizeof(somedata))) //<data was not written, do something> ... if (!ipcClientY.read(&somedata, sizeof(somedata))) //<data was not read, do something> } Now, to the important question: speed. Of course, extra features do not come for free. But how much is the degradation? I've tested free-flowing (i.e. just write/read, simplest processing) functionality on my desktop i7 3930 / 64Gb DDR3 1600 and my laptop - T7100 /4GB. Numbers were pretty close - about 4.6 mln (laptop) and about 5.9 mln (desktop) blocks per second for the best case scenario, going down to 2.4 mln blocks per second (laptop) and ~1mln (desktop) in the worst case (on how to avoid it see Tweaks section). Here I specifically mention number of blocks transferred per second, rather then bytes. The most load for any implementation happens when block size is very small - few bytes. In this case the actual memory copy takes about 0.1% of overall processing time. But, the bigger are the blocks, the more time is spent in memcpy - up to 99.9%, so for larger blocks you are basically looking for the raw memory speed, and can say nothing about how well IPC is implemented. Now, how this compares to the speed of original implementation by studio_ukc? I was quite surprised to see my implementation is about 50-60% faster on laptop and 30-40%faster on desktop (in the best case scenario) - kind of unexpected result, given that it's more complex. I included original implementation performance test as part of IPCTest.cpp, so you can compare results yourself. Tweaks Unfortunately, it is impossible to write an implementation that gives best results in all situations. So, there are several flags and values that you can set to tailor to your specific needs. Here is an explanation of what they are and when to use them: doSingleThread InterlockedIncrement InterlockedDecrement true setMaxExpansionsCount() So, when and why you need to use these flags? The fasted way to use this IPC is to use one instance of IPC per thread. Say, you create connection point in the main thread, and then in all working threads you create new IPC instance, connect it to that connection point and start sending/receiving data. Why not always use this scenario? Well, everything comes with price. In this case - too much memory. When you create IPC instance and connect it to connection point , it maps shared memory file into it's own memory space (to be exact, into memory space of that thread or process). So, if you allocated paltry 1Mb in one shared file, and then spawned 1000 threads, each of them using it's own IPC instance, then now your process(es) use 1Gb of memory. This is Not Good. But, if you can control number of threads/processes connected to the connection point, then you'd better use one IPC per thread. Now, if above scenario is not possible, i.e. you can't predict/limit number of threads connected, or you want to use pretty large number of (blocks count*expansions count), then you need to try to retreat to the second line of defence: use preAllocate . Now, you can use just one IPC per process, and have all threads using it with almost same performance as if they had their own IPC instance. Yes, you pay for it with extra allocated space that might never be used, but 12K or even 120K is much less than potential gigabytes of memory that you suddenly need to allocate. In fact, I recommend setting this flag (and then using single IPC instance from all threads) in almost any situation - unless you either highly pressed on space usage (which is quite unlikely nowadays, especially under Windows ), or you need the top best performance, where even 1% counts. In general, using preAllocate and then accessing one instance from all threads is about 3-4% slower than having one IPC per thread. Keep in mind, that if neither of these flags are set, i.e. you using default settings, performance is 4-5 times less than optimal, and fails to about 1 - 1.2 mln blocks per second for worst case scenario (single instance used by multiple threads). Interesting enough, performance of my desktop in this case is twice LESS than that of laptop. setMaxSpinLocksCount(uint32_t blockAccessSpinLock, uint32_t expansionAccessSpinLock) ::Sleep(0) blockAccessSpinLock expansionAccessSpinLock signleThread And one more thing for advanced users Instead of calling "write" function that will copy passed buffer to the shared memory (to be read via copy again by "read" function), you can use 2 additional functions with the following use pattern: BlockWriteDescriptor descriptor; if (void* buf = ipc.acquireBlock(descriptor)) { if (!(new (buf) MyType(<....>)))) //<Error. Mark this block somehow as unusable, i.e. zero it out> ipc.releaseLockedBlock(descriptor); } //.... // somewhere else: BlockReadDescriptor descriptor; if (void* buf = ipc.acquireBlock(descriptor)) { MyType* myVar = (MyType*)descriptor.result; <... do someting with myVar ...> myVar.~MyType(); ipc.releaseLockedBlock(descriptor); } Keep in mind, that all time between acquireBlock and releaseLockedBlock IPC might have other threads waiting, so use extreme caution and use this ability only if you know what you are doing. You might want to use it if you want to avoid memory fragmentation and save time on copying - this way you have only one memory manipulation (during call to "new") instead of 2 copies. But again - you were warned: this is extremely dangerous functionality, use with care. acquireBlock releaseLockedBlock Also, this code is suited for VC++ 2010 and newer. If you want to use older compilers, please do the following: #define uint32_t unsigned long to_wstring sprintf That's it, and happy coding! Updates: 07/15/2013: Version 1.1 - 2 bugfixes, both were prominent when INFINITE timeout was specified: 1) optional handle "stopOn" was ignored when INFINITE timeout was specified; 2) due to race conditions writer was not always informing reader that write operation was completed, thus causing reader to hang forever on the last unread block when INFINITE timeout was specified. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) inline bool CSimpleIPC::getNextAvailableBlock(uint32_t& blockIndex, void*& pData, VLONG*& pStatus, VUINT32& cursorStart, VUINT32& waitersCount, long valueCheck, HANDLE waitOn, DWORD& dwMillisecondsTimeout, HANDLE stopOn) throw() { cout<<"Before Calling WaitForMultipleObjects: pStatus:"<< *pStatus << " valueCheck:" << valueCheck <<endl; ::WaitForMultipleObjects((DWORD)(stopOn ? 3 : 2), handles, FALSE, dwMillisecondsTimeout); // special care: dwMillisecondsTimeout can be INFINITE cout<<"After Calling WaitForMultipleObjects: pStatus:"<< *pStatus << " valueCheck:" << valueCheck <<endl; } Before Calling WaitForMultipleObjects: pStatus:0 valueCheck:2 Write succeed, wake up reader After Calling WaitForMultipleObjects: pStatus:2 valueCheck:2 uint32_t totalMemSize = dataMemSize + (m_connectionPointBuffer->m_blocksCount * sizeof(long)); inline bool CSimpleIPC::getBlockByIndex(const uint32_t blockIndex, void*& pData, VLONG*& pStatus) throw() { if (m_preAllocateArray || m_isSingleThread) // either we guarantee that this is single thread, or we preallocated an array, { // and above code guaranteed to expand it without affecting those who currently hold valid pointers)); } else if (m_locker.enterSharedLock()) // we are SO unlucky to get here. Try to avoid at all costs - performance is 3-5 times less!!!!! {)); m_locker.leaveLock(); } #include <windows.h> #include <vector> #include <iostream> int main(int argc, char* argv[]) { std::wstring cpname = L"mymemtest"; std::vector<void*> maps; DWORD memsize = 100000000; // 100mb HANDLE m_hMapFile = ::CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, memsize, cpname.c_str()); int i=0; while (i<100) { void* mem = ::MapViewOfFile(m_hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, memsize); if (!mem) std::cout << "failed at i =" << i << "\n"; else { std::cout << (__int64)mem << "\n"; maps.push_back(mem); } ++i; } for (int j=0; j<maps.size(); ++j) ::UnmapViewOfFile(maps[j]); ::CloseHandle(m_hMapFile); return 0; } Mehuge wrote:So the process runs out of its own address space not [system] memory. General News Suggestion Question Bug Answer Joke Praise Rant Admin Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
http://www.codeproject.com/Articles/602005/Fast-IPC-New-implementation?msg=4585023
CC-MAIN-2016-36
en
refinedweb
an information system that relates information sources and services through the use of hypertext-style relationships, creating a web of information that spans the Internet. Architecture defines the desired operational behavior of components within this information system, including software, machine, and human components, and protocols for interactions between components. The Web architecture is influenced by social requirements and software engineering principles, leading to design choices that constrain the behavior of the Web in order for the system to achieve desired properties: an efficient, scalable, shared information space that will continue to grow indefinitely across languages, cultures, and information mediums. This document is organized to reflect the three dimensions of Web architecture: identification, interaction, and representation.. This draft contains substantial revisions based on discussion at the TAG's 21-23 July face-to-face meeting in Vancouver... A simple travel scenario is used throughout this document to illustrate typical behavior of Web components (e.g., servers, proxies, browsers, spiders, multimedia players, and other user agents -- programs acting on behalf of a person) and describe their interactions:'" in a glossy travel magazine. Dan has enough experience with the Web to recognize that "" is a URI. Given the context in which the URI appears, he can expect that it should allow him to access relevant weather information. This scenario (elaborated on throughout the document) illustrates the three architectural divisions of the Web that are discussed in this document:". Architecture defines the desired operational behavior of components within the system, including software, machine, and human components, and protocols for interactions between components. The Web architecture is influenced by social requirements and software engineering principles, leading to design choices that constrain the behavior of the Web in order for the system to achieve desired properties.. We assume readers are familiar with the rationale for some of the general design principles: minimal constraints (fewer rules make the system more flexible), modularity, minimum redundancy, extensibility, simplicity, and robustness. This document focuses on the architecture of the Web. Other groups inside and outside W3C also document principles related to specialized aspects of Web architecture, including accessibility, internationalization, device independence, and Web Services. The section on Architectural Specifications includes some references. This document is designed establish a shared vocabulary, i.e. a shared set of identifiers with agreed components. Web components that reach conclusions based on comparisons done through means other than those licensed by relevant specifications take responsibility for any problems that result. For instance, components should not assume that "" and "" identify the same resource, since none of the specifications involved states that the path part of an "http" URI is case-insensitive.; components components convey information about a resource. The more resource metadata is included in a URI, the more fragile the URI becomes (e.g., sensitive to changes in representation). Editor's note: When finding available on URI opacity, link from here. See TAG issue metadataInURI-31. There is a related principle that has not yet been captured: don't restrict (e.g., through specifications) the URI space allotted to resource owners. See TAG issue siteDate-26: Web site metadata improving on robots.txt, w3c/p3p and favicon etc. In the URI "", the "http" that appears before the colon (":") is a URI scheme name. The name refers to a URI scheme specification, which explains how to assign identifiers within that scheme. The URI syntax is thus a federated and extensible naming system wherein each scheme's specification may further restrict the syntax and semantics of identifiers within that scheme. Furthermore, the URI scheme specification specifies how a component NOT introduce a new URI scheme when an existing scheme specifies the desired properties of identifiers and their relation to resources. component component to launch a particular application when retrieving a representation, such dispatching can be accomplished at lower expense by registering a new Internet Media Type instead. The use of unregistered URI schemes is discouraged for a number of reasons: When navigating within the XHTML data that Dan receives as a representation of the resource identified by "", secondary resource may be some portion or subset of the primary resource, some view on representations of the primary resource, or some other resource. The URI that identifies the secondary resource consists of the URI of the primary resource with the additional identifying information as a fragment identifier. More precisely: For URI schemes that do specify the use of fragment identifiers, the syntax and semantics of those identifiers authority responsible browser and the server engage in HTTP content negotiation, so that Dan receives the best image format his browser can handle or the image format he usually prefers. The URI "" refers to a portion of the weather map that shows the Zicatela Beach, where Dan, a component Resource descriptions: Owners of important resources SHOULD make available representations of. to a newsletter, posting to a list, or modifying a database. Safe interactions are important because these are interactions where users can browse with confidence and where software programs (e.g., search engines and browsers that pre-cache data for the user) can follow links safely. Users (or components acting on their behalf) do not commit themselves to anything by querying a resource or following a link. Principle Safe retrieval: Components refers to the use of the same URI to refer to more than one distinct thing. Good practice URI ambiguity: Avoid URI ambiguity. Ambiguous use of a URI can be costly. Suppose that one division of Large Company, Inc. maintains data about company Web pages, including who created them and when. Another division in the company maintains data about companies, including who created them and when. The second data set uses the URIs of the organization's home page as though it was the URI of the organization itself. When the two data sets are merged, the reuse of the URI causes information about companies to be merged with that of the home pages, resulting in potentially costly nonsense. URI ambiguity differs from "indirect identification," which is common. For example, one may identify meeting participants by using their email addresses (e.g., " [email protected]"). In this case, all parties know that they are using a mailbox identifier to indirectly identify the person. In terms of Web architecture, " mailto:[email protected]" still identifies a mailbox, not a person. As another example of URI ambiguity, saying that the URI "" identifies "Moby Dick" can lead to confusion because this might be interpreted as any one of the following authority responsible for "weather.example.com" can offer Dan and Norm.. In the travel scenario, Dan retrieves a representation from the weather site "". He then follows the link labeled "satellite image" in the representation data and retrieves a representation of a secondary resource, a satellite photo of the Oaxaca region. The link to the satellite image is an HTML link encoded as <a href="">satellite image</a>. Dan (for example, 'Transfer-encoding: identity', which indicates that no compression has been applied) are descriptive of the message. The remainder of the headers and the message body together comprise a representation of the resource identified by "". The browser reads the headers, learns from the 'Content-Type' field that the Internet Media Type of the representation data is "text/jpeg", reads the sequence of octets that comprises the representation data, and renders the image. Dan decides to book a vacation to Oaxaca at "booking.example.com." He completes a series of HTML forms and is ultimately asked for credit card information to purchase the airline tickets. He provides this information in another HTML form. When he presses the "Purchase" button, his Dan wishes to change the state of the system by exchanging money for airline tickets. The server reads the POST request, and after performing the booking transaction returns a message to Dan's browser that contains a representation of the results of Dan's request. The representation data is in HTML so that it can be saved or printed out for Dan's records. Note that neither the data transmitted with the POST nor the data received in the response necessarily correspond to any resource named by a URI. Web components exchange information via messages that are constructed according to a non-exclusive set of messaging protocols (e.g., HTTP, FTP, NNTP, SMTP10, etc.). A message exchanged between Web components is an octet sequence consisting of: The representation of the state of a resource is an octet sequence consisting of: Web components. TAG finding "Client handling of MIME headers" for related discussion. In our travel scenario, the authority responsible for "weather.example.com" has license to create representations of this resource and assign their authoritative interpretation. Which representation(s) Dan Dan's browser detects a problem, Dan's browser must not silently ignore the problem and render the GIF image. Dan's browser can notify Dan of the problem, notify Dan component component linear sequence of characters. HTML, Internet e-mail, and all XML-based formats are textual. In modern textual data formats, the characters are usually taken from the Unicode repertoire [UNICODE].. components, whereas a SOAP envelope might provide nothing more than a container for a particular payload that has, Format compatibility: Format designers SHOULD define extensibility models that allow forwards compatible and backwards compatible changes. Naturally, even if M and N are compatible but different versions of a format, components components]... They are very easy to understand, however, and they can be authored by individuals (or other components) reference. Good practice Link mechanisms: Format specification designers SHOULD provide mechanisms for identifying links to other resources and to portions of representations (via fragment identifiers). Allow Web-wide linking, not just internal document linking. URI genericity: Format specification designers SHOULD allow authors to use URIs without constraining them to a limited set of URI schemes.. Many representations are encoded using data formats based on XML 1.0 [XML10]. This section discusses issues that are specific to such formats. Anyone seeking guidance in this area is urged to consult the "Guidelines For The Use of XML in IETF Protocols" [IETFXML], which [IETFXML]. authority responsible for "weather.example.com" realize that they can provide more interesting representations by creating instances that consist of elements defined in different published]." Format specification designers that declare namespaces thus provide a global context for instances of the data format. Establishing this global context allows those instances (and portions thereof) to be re-used and combined in novel ways not yet imagined. Failure to provide a namespace makes such re-use technologies become widely deployed, this drawback will diminish in significance. Dan receives a representation from "weather.example.com" in an unfamiliar data format. He knows enough about XML to recognize which XML namespace the elements belong to. Since the namespace is identified by a URI, he asks his browser to retrieve a representation of the namespace via that URI. He gets back some useful data that allows him to learn more about the data format; this is called a namespace document. Dan's browser may also be able to use machine-readable data automatically to perform useful tasks on Dan's behalf, such as download additional software components to process and render the format. There are many reasons why a person or other component might want more information about the namespace. A person might want to: A namespace document should also support the automatic retrieval of other Web resources that support the processing markup from this vocabulary. Useful information to processors includes: Good practice Namespace documents: XML namespace designers SHOULD make available human-readable and machine-readable material.]) as there is no normative specification of fragment semantics in this case.. Good practice XML and "text/*": In general, Internet Media Types beginning with text/ SHOULD NOT be assigned to XML representations. These Internet Media Types create two problems: First, intermediaries in the Web are allowed to "transcode", i.e., convert one character encoding to another. Since XML documents are designed to allow them to be self-describing, and since this is a good and widely-followed practice, any such transcoding will make the self-description false. Second, representations whose Internet/" Internet Media Types effectively precludes this good practice. There remain open questions regarding resource representations. The following sections identify a few areas of future work in the Web community. The TAG makes no commitment at this time to pursuing these issues..).
http://www.w3.org/2001/tag/2003/webarch-20030801
CC-MAIN-2016-36
en
refinedweb
As we promised a few weeks ago, a BlackBerry® WebWorks™ SDK would be released soon that would have compatibility of applications moving forward. That day has arrived with the latest update to the BlackBerry 10 WebWorks SDK! Applications that are built with this BlackBerry WebWorks SDK will run on the latest delivered BlackBerry® 10 OS beta version as well as future OS updates. Note that this does not mean that APIs don’t have the potential to change in the future, and there will certainly be more APIs added – but an application binary compiled with this SDK will continue to run on future OSes. With this guarantee, you can now build your BlackBerry WebWorks applications and submit them to the BlackBerry App World™ storefront for approval. You can now also apply for the Built For BlackBerry program before January 21st 2013 to take advantage of our 10k Developer Commitment to developers. However, no BlackBerry WebWorks release would be complete without some new API additions. We have a ton of great stuff so let’s dive in. Perhaps our biggest addition is the ability to integrate with the Calendar on the device. Create, edit, delete – it’s all there. It also delivers access to all calendars available on the device while of course respecting the work/personal boundary provided by BlackBerry Balance™. Combine this with the Contacts API delivered in the previous release for some very compelling applications that integrate with the BlackBerry 10 integrated PIM story. Everyone likes toast (well, they should), and BlackBerry 10 has brought a mobile flavor to this breakfast staple with the Toasts notification concept. Toasts are quick, non-blocking notifications to the user that your application has performed some action, which are displayed for a minimal amount of time and then disappear. You can also enhance your toast with butter a button that allows the user to take some action in relation to that toast (eg. a toast that notifies the user that an item was deleted, and provides an Undo action). Check out blackberry.ui.toast for more on this one. blackberry.ui.toast.show(“Pass the jam!”, options); Now, wouldn’t it be cool if you could have a sensor in your phone that would tell you that your toast is ready before it was burnt? Well, no, we can’t do that (yet). But with this release of BlackBerry WebWorks, you now have access to a whole host of new sensor APIs. Orientation, light, proximity, compass, space-time disturbances; okay, not space-time, but yes on the rest. Leverage these APIs to add some real value into your application based on the device environment. // Create a callback to handle each sensor function compassCallback(sensor, data) { alert("Current azimuth: " + data.value); } // Start listening to the compass sensor with a delay feedback of 1000 blackberry.sensors.setOptions("devicecompass", { delay : 1000 }); // Start the event listener for the sensors callback blackberry.event.addEventListener("devicecompass", compassCallback); In the previous release of BlackBerry WebWorks, we provided a way to lock the orientation of your application by setting a flag in the config.xml. We have now provided a full JavaScript® API that allows you to lock/unlock your application dynamically based on your own logic. There are a few things to note with this change: To have a good JavaScript API signature, we are putting the orientation functionality right on the blackberry.app namespace, but this is out of line with the current config.xml approach of putting the parameter on the blackberry.app.orientation feature. So we have deprecated this, and now you should put orientation in config.xml on the blackberry.app feature. Also, if you do choose to set it in config.xml, that is a constant value that cannot be overwritten by the API – what you set in config.xml is what you get. Speaking of config.xml, with this release we have all the pieces in place to allow for full localization of your application, including the display name of your application as well as the description. In the config.xml, you just need to put the localized text inside another element with the xml:lang attribute for the language. Furthermore, all of the built-in UI components are fully localized and reflect the current system language. <widget xmlns=""> <name> The Ultimate Weather Widget </name> <name xml: insérez Françaises ici </name> </widget> Let’s now take a look at some enhancements made to the underlying BlackBerry WebWorks platform. With this release, we have delivered a number of different optimizations to the runtime initialization process. Lots of highly technical, egghead type stuff. Long story short – your apps should load a whole bunch faster for your end users. Be sure to get the latest BlackBerry 10 OS build to see the full benefit. Perhaps even more interesting is the addition of a child web view control. If you have a link in your content with target=”_blank” or use the window.open function, the content will now be loaded in a child web view that looks much like a card and won’t overwrite your current content. The user can then cancel the view to return to the originating page. When you use window.open, you will receive a window object for the child web view. One of the more obvious use cases here is a more seamless method of supporting OAuth for authentication into social networks like Facebook®, foursquare, Twitter®, and so on. We have also added a new attribute to the element in config.xml that allows you to specify a single HTTP header key-value pair. This HTTP header will be added to every HTTP request sent from your application. This allows your backend system to key off of this header and perform any required customized processing for your app. <widget rim:header=”header:Goooallll!”> If that wasn’t enough on its own, we have also added a few new tooling features that should make your life a lot easier. First on deck is the ability to pass your application’s root folder into the bbwp tool to package your application. No more requirement to first zip your application content and risk feeling silly when you forget to update your zip file with your latest changes. The packager also supports ignoring folders and files within your application folder hierarchy; just create a “.bbwpignore” file in the root folder and list the folders and files you don’t want to be part of your application packager. The format of this file is essentially the same as the .gitignore file, with one or two very small differences. Another potential time saver and headache reliever is a new facility that will allow you to forget about ever needing to update the version of the webworks.js file you reference in your app. In your application files, reference the webworks.js file like so: <script src=”local:///chrome/webworks.js”> The packager tool will include the latest webworks.js into your package and put it at the appropriate location to be loaded. So there you have it. It is worth reiterating that with this release you can now submit your apps to BlackBerry App World and be assured they will run properly come launch of BlackBerry 10! So submit early so you can get your application approved, and then apply for the Built For BlackBerry program before January 21st, 2013. No time to waste – grab the SDK today!
http://devblog.blackberry.com/2012/11/blackberry-10-webworks-sdk-updated/
CC-MAIN-2016-36
en
refinedweb
This article shows a solution to the problem of programmatically attaching delegate handlers to an object's events. While building a prototype for an application framework, I came across a situation where I was creating a host process for multiple plug-in components. In the end-user implementation of these plug-ins, they would be exposing events to the rest of the framework. I wanted to provide both the option of tight-coupling to these events (manually adding handlers via += new ...) and loose-coupling to these events (through a publish/subscribe event-bus mechanism). I wanted to make the publishing of events as transparent as possible to the plug-in developers without having to dictate too much of their implementation. I decided I wanted to be able to support transparent publishing of events to the event bus for any plug-in that decorated its events with a particular attribute (PubEventAttribute). PubEventAttribute I wanted plug-in implementers to simply decorate their classes as shown: public class MyClass { ... [PubEvent] public event Action<int> Event1; } The loading of the plug-ins in my framework would use reflection at initialization time to inspect the plug-in's instance for this attribute on its events. When an event with this attribute is discovered, a delegate would be programmatically attached to the event that would publish the results of the event onto an event bus. All of this elegant designing on my part hit a road-block once I realized I had no idea how to generate a delegate for some arbitrary event. I realized I could narrow down the supported events to a specific type by limiting them to the Action<...> generic classes. Action<...> By narrowing down the format of the supported events, it occurred to me that I could simply match the Action<...> events to precompiled handlers that were themselves generic classes (called ActionPublisher<...>) that expose a public method matching the signature of the event. ActionPublisher<...> public Using the single parameter version of Action<...> as an example, I created a matching class: public class ActionPublisher<T> { public ActionPublisher( object sender, string topic ) { _sender = sender; _topic = topic; } private object _sender; private string _topic; public void PublishAction( T t ) { Program.HandleEvent( new object[] { t } ); } } Querying an instance of a class for its events is as simple as: MyClass c = new MyClass(); foreach( EventInfo e in c.GetType().GetEvents() ) { foreach( object o in e.GetCustomAttributes( true ) ) { if( o is PubEventAttribute ) { ... } } } Creating a delegate from some arbitrary type definition can be done using the Delegate class' static method CreateDelegate. The definition of the particular overload I'm using is: Delegate static CreateDelegate public static Delegate CreateDelegate( Type type, Object firstArgument, MethodInfo method ) The reason for using this particular delegate is because my specific application is for an embedded solution running on WinCE, and this is the only overload of CreateDelegate that is supported on WinCE. The type argument is the type of the delegate being created. This should match the type of the event itself (EventInfo.EventHandlerType). The next argument is the instance that implements the delegate you want to connect to the event, which in our case will be an instance of our ActionPublisher<...> class. The final argument is of the type MethodInfo that describes the public method of the ActionPublisher<...> class that will be called when the event is fired (PublishAction in this case). type EventInfo.EventHandlerType MethodInfo PublishAction The next problem to solve is creating an instance of the ActionPublisher<...> that matches our event type. This requires the ability to instantiate a generic type through reflection. Fortunately, I already wrote an article on this very topic. However, this method requires that I have an array of types describing the generic types of the generic class. Getting this information from the EventInfo class is non-intuitive, but I discovered it to be accessible from EventInfo.EventHandlerType.GetMethod( "Invoke" ).GetParameters() . This call actually returns us an array of ParameterInfo objects describing the generic arguments of the Action event. From this, I can instantiate a matching instance of the ActionPublisher class as follows: EventInfo EventInfo.EventHandlerType.GetMethod( "Invoke" ).GetParameters() ParameterInfo Action ActionPublisher Type publisherType = typeof( ActionPublisher<> ).MakeGenericType ( new Type[] { actionArgs[ 0 ].ParameterType } ); object publisher = Activator.CreateInstance( publisherType, c, "/Topic" ); Finally, adding the handler to the event can be done using the EventInfo class's AddEventHandler method. This method takes two arguments: the instance of the object implementing the callback and the delegate we just created. The full code is: EventInfo AddEventHandler ParameterInfo[] actionArgs = eInfo.EventHandlerType.GetMethod ( "Invoke" ).GetParameters(); if( actionArgs.Length == 1 ) { // create the ActionPublisher instance that matches our event Type publisherType = typeof( ActionPublisher<> ).MakeGenericType ( new Type[] { actionArgs[ 0 ].ParameterType } ); object publisher = Activator.CreateInstance( publisherType, c, "/Topic" ); // create a delegate to the PublishAction method of the publisher MethodInfo publisherInvoke = publisherType.GetMethod( "PublishAction" ); Delegate d = Delegate.CreateDelegate ( eInfo.EventHandlerType, publisher, publisherInvoke ); // wire up the delegate to the event eInfo.AddEventHandler( c, d ); break; } The included sample application performs all of these steps for a class that exposes a single event of type Action<int>. This event is decorated with the PubEvent attribute and so gets a dynamically instantiated instance of ActionPublisher<int> added to it. Calling the method DoIt() fires the event. From this, we can see that our dynamically created delegate handler is invoked. Action<int> PubEvent ActionPublisher<int> Do.
http://www.codeproject.com/Articles/121923/Using-Reflection-to-Manage-Event-Handlers?fid=1593782&df=90&mpp=10&noise=1&prof=True&sort=Position&view=Normal&spc=Relaxed
CC-MAIN-2016-36
en
refinedweb
Introduction This article is a detailed guide to the UML Profile Authoring support in the IBM® Rational® Software Architect (RSA) and IBM® Rational® Software Modeler (RSM) 6.x products. It covers both the UI support and programmatic support (for users extending the tool itself). It mainly targets profile authors, but it also offers some insight into profile usage. The covered versions (in chronological order as they were released) are 6.0 GA, iFix002, iFix003, 6.0.0.1 and 6.0.1. The 6.0.1 version is forward-looking -- it has not been officially released at the time this article was written. It is clearly indicated where there is a difference in behavior between versions. The article assumes that you have reasonable knowledge of the UML 2.0 specification, especially the part related to Profiles. It does not attempt to further describe or clarify the specification, but rather focuses on its implementation in RSA and RSM. General knowledge about Eclipse, RSA, and RSM will be useful as well. Eclipse PDE (plug-in development environment subproject) knowledge is required if you wish to create plug-in based profiles. Creating a profile This section covers how to create a profile and its content. It also explores various features available to you in regard to the profile definition. RSA and RSM UML Profiles are files with the .epx extension. The tool provides creating and editing capabilities only for files that are in the workspace. However, after you create a profile it does not necessarily have to be in the workspace to be used in models that are in the workspace -- more on this in the Deployment section below. RSA and RSM also support Eclipse's open source profile.uml2 format for the purpose of applying it to a UML Model. It does not directly support editing files in this format, although they could be edited by using the open source's editor. The rest of this article focuses on RSA and RSM's native profile format (.epx). For more details on the Eclipse’s open source format please see the Resources section. The Modeling perspective is the best equipped for profile authoring. The two main views used in profile authoring are the Model Explorer and the Properties view. The Model Explorer is used to build the elements of the profile and the Properties View is used to set their properties. Profile You can create a new profile either by launching the New UML Profile wizard (shown in Figure 1) or the New UML Profile Project wizard. To launch the New UML Profile wizard, click File -> New -> Other and then Modeling -> UML Extensibility -> UML Profile. Figure 1. New UML Profile wizard The New UML Profile wizard creates a profile in the specified folder. The name of the profile does not have to match the name of the file containing it, although it probably simplifies things if they are the same. The model libraries could be imported during the profile creation but that could be done afterwards as well. The New UML Profile Project wizard simply provides a shortcut to create a project and a profile in it at the same time. Please note that the profile does not have to be stored in Profile Project -- it could be placed in any project. After the profile is created, it will be selected in the Model Explorer. Also, Figure 2 shows the Profile Editor associated with the .epx file that will open. Figure 2. Profile Editor The Profile Editor is associated with the .epx file itself. It only offers some informational data about the profile: profile name, file location (full path) and size, the time when the file was last modified, and whether or not the file is editable. Please notice the (uml2) and the (UML2) entries under the profile in the Model Explorer. The (uml2) entry represents the imported UML 2.0 meta-model, which is the one being extended by the profile. The (UML2) entry represents imported UML2 Types model library. That is optional; the profile author does not have to import it. Note: Theoretically, UML profiles could extend various meta-models, although the RSM and RSA implementation supports only the UML 2.0 meta-model. The profile's properties (see Figure 3) are displayed in the Properties view when the profile entry (the item right below the profile file in the Model Explorer) is selected. Version- and Release-related properties are explained later (in the Change management section--see below). The Visibility property does not have any impact on your ability to apply the profile. Figure 3. Profile properties To add UML elements to the profile, select it in the Model Explorer, right-click it and click Add UML, as shown in Figure 4. The only UML types that can be created in a profile are Stereotypes, Classes, and Enumerations. Figure 4. Add UML menu for profiles Naming The names of certain element types (Stereotype, Class, Enumeration, and Attribute) have to be valid Java™ identifiers. The most common violation of this rule is using the space character in the name. Depending on the exact profile structure, invalid names can cause various problems. The most serious problem is caused by invalid attribute names, which can corrupt the model where the profile is applied. With version 6.0 iFix002 and later, model corruption is prevented and in version 6.0.1 the tool does not allow invalid names to be entered in the first place. Version 6.0.0.1 has problems with Enumeration Literals whose names are not a valid Java identifier: basically, those literals cannot be used. The versions prior to 6.0.0.1 (GA/iFix002/iFix003) and after (6.0.1) do not have such problems with the literals. Stereotypes To create a stereotype, select the profile in the Model Explorer and right-click it, then click Add UML -> Stereotype on the context menu. This results in the view shown in Figure 5. Figure 5. Stereotype properties A stereotype can be used simply to mark up the element to which it is applied. However, its real power is in the extension mechanism, through which it can actually modify the metaclass definition of one or more metaclasses. This extension is not automatically propagated to all instances of the metaclass (metaclasses); the stereotype first has to be applied to the modeling element that is an instance of the particular metaclass. Of course, you can make the extension required, in which case it is automatic -- for the model where the profile is applied. Abstract stereotypes cannot be applied to modeling elements. The abstract stereotype can be specialized by another stereotype (more on this in the Generalization section). The Leaf and Visibility fields are mostly ignored. Stereotypes marked as Leaf -- or with Visibility values other than the default (public) -- do not exercise any special behavior, although the stereotypes with the protected or package visibility are reported as errors when the profile is validated. You are discouraged from changing the default values for these two fields, since it is very likely that some sort of behavior will be associated with them in subsequent releases. The Icon and Shape Image fields are covered in the Presentation subsection, and the Category field is covered in the Stereotype attributes subsection. The metaclasses being extended by the stereotype are specified on the Extensions tab in the Properties view. The Metaclass Extensions table lists all existing extensions for the stereotype, as shown in Figure 6. Figure 6. Metaclass Extensions You can add a new extension by clicking the Add Extension button, which starts the Create Metaclass Extension dialog shown in Figure 7. The metaclasses available for extension are those defined by the UML 2.0 meta-model. Each extension can be marked as required or not (not required is the default). That flag can be set only when the extension is created. If it has to be changed, you must first remove the old extension and then create a new one. When an extension is required it means that the stereotype will be applied automatically to all modeling elements that are instances of that metaclass, given that the profile owning the stereotype is applied to the model. If the extension is not required then the stereotype has to be applied to the element either through a user gesture or programmatically. Figure 7. Create Metaclass Extension dialog An attribute with a name in the base$<metaclass name> format is created in the stereotype for each metaclass that the stereotype extends. Those attributes are used by the system and should not be modified. Please note that the stereotype can be applied only to the elements whose metaclass it extends. Of course, the profile (that owns the stereotype) itself has to be applied to the element's package hierarchy (most likely to the model itself) first. The main aspects in which a stereotype can modify the metaclass definition are: - Presentation - Additional properties - Additional constraints Each of these is discussed in a separate section. Presentation When a stereotype is applied to a modeling element it can affect its presentation in multiple ways. The most obvious way is that the system now displays (by default) the stereotype name in guillemets in the front of the element's name, where appropriate (for example, in Model Explorer or on diagrams). For example, if a stereotype S is applied to the element E, the system will display <<S>> E in Model Explorer and on diagrams for that element. Note: The tool does not automatically make the first character of the stereotype name lower-case for display purposes, as suggested by the UML 2.0 specification (see the Resources section). The name is displayed as is. However, the profile author can fully control the display name -- separately from the name -- using the localization mechanism (more on this in the Localization section). A stereotype can have an icon and a shape image attached to it -- please see the General tab in the Properties view for stereotypes. Next to the Icon and Shape Image field on the General tab are two buttons: Browse and Clear. The Browse button lets you find an image file in the file system to be associated with the stereotype. The Clear button removes the specified image from the stereotype. Supported formats are BMP, GIF, JPG, and PNG for both Icon and Shape Image fields. Shape Image additionally supports files in the SVG format. Of course, neither image has to be specified -- it is entirely up to the profile author. When a stereotype is applied to an element, the system will consult the preference settings to determine how to present the element. To invoke the preferences, click Window -> Preferences. For Model Explorer, click Modeling -> Views. The Stereotype Style combo box in the Model Explorer settings group offers the following choices: None, Text and Decoration. None tells Model Explorer to ignore the applied stereotypes. Text means that all applied stereotypes will be listed in the guillemets in the front of the element’s name. Decoration tells Model Explorer to use the image from the Icon field of the applied stereotype. If none of the applied stereotypes has a defined icon, it defaults back to display stereotype names. Please note that if multiple applied stereotypes have defined icons, only one of them will be used. Diagrams settings can be found in two places: by clicking Modeling -> Connectors for connectors and Modeling -> Shapes for shapes. The Stereotype style combo-box for connectors has only two options: None and Text. The shapes provide more choices: None, Text, Decoration, Decoration and Text, and Shape Image. Decoration displays the icon next to the element name -- the same as for Model Explorer, only one icon is used even when multiple applied stereotypes provide an icon. The difference is that it does not default back to stereotype name if there is no icon. Decoration and Text displays both the icon and the stereotype names, while the Shape Image option replaces the whole shape with the image specified in the stereotype. Another interesting presentation feature for stereotypes is the Suppressed flag (found on the General tab in the Properties view). When set, it turns off the presentation capabilities of the stereotype: even if the stereotype is applied to an element neither the Model Explorer nor diagrams display any information about it. This is most useful when the intent is to use the stereotypes programmatically, to hold information or mark up elements but not to change the element’s presentation. The suppressed stereotypes can still be seen as applied in the Properties View’s Stereotypes tab for the element, unless even that is turned off through the preference settings (Window -> Preferences -> Modeling -> Views -> Properties View settings -> Show suppressed properties). The suppressed stereotypes can be applied only programmatically (they do not show up on the list of the applicable stereotypes), but they can be removed manually. The version 6.0 iFix002 introduced an exception to this rule: suppressed stereotypes with the taggedValueSet keyword can be applied manually as well. This keyword can be set by selecting the stereotype in the Model Explorer and then going to the Stereotypes tab in the Properties view. Stereotype attributes Stereotype owned attributes are added to the metaclass definition as its properties, for the element instance where the stereotype is applied. For example, let's say that there is a stereotype S which extends the metaclass Actor and has an attribute named attr1. When this stereotype is applied to an actor in a model, the actor's set of properties will now include attr1 (in addition to all properties specified in the Actor metaclass, like name, visibility, and so on.) To create a stereotype attribute, select the stereotype in Model Explorer, right-click it and click Add UML -> Attribute, as shown in Figure 8. Figure 8. Attribute properties The most important properties for an attribute (in addition to the name) are Type, Default Value, Multiplicity, and Unique. Since the stereotype-owned attributes eventually become extended metaclass properties, their type cannot be just anything -- it has to be a type recognized by the system, for which it can provide proper handling of these properties. Supported types are: - Primitive types from the imported model libraries - Enumerations defined in the profile itself - Classes defined in the profile itself Attribute must have a type. If it is not specified, the tool will ignore that attribute when determining the stereotype-contributed properties for the element where the stereotype is applied. The default value does not have to be specified -- in that case the tool will use its own default depending on the type. For example, the default for a String typed attribute is blank string. The multiplicity indicates if the property will be treated as a singular value or a collection (multiplicity greater than 1). When the multiplicity indicates a collection, the user should also pay attention to the Unique field to indicate if the elements in the collection have to be unique or not. By default, this flag is set to require uniqueness. Note: The multiplicity cannot be set in RSA versions GA/iFix002/iFix003 using the General tab (even though the field is visible there) -- you are forced to use the Advanced tab. This is not the case in RSA versions 6.0.0.1 and 6.0.1, nor in RSM. The stereotype-contributed properties are displayed in the Properties view for the element to which the stereotype is applied, together with other properties. They can be found in two places: the Advanced tab and the Stereotypes tab (the Stereotype Properties table). In either case they are grouped together under the category named the same as the stereotype contributing the properties. You can override that rule: there is the Category field on the stereotype's General tab. If that value is specified then it will be used to group that stereotype's properties together instead of the stereotype name. An example when this is useful is when all stereotypes coming from the same profile need to group properties together under the same category. Model libraries Profiles support only 3 predefined model libraries: UML2 Types, Java Types, and Ecore Types. In order to use the types defined in one of those libraries, the library first has to be imported into the profile. The libraries can be imported when the profile is created through the New Profile wizard (by default it sets UML2 Types to be imported, but you can change that). They can also be imported at any other point by using the context menu in Model Explorer. Just select the profile and right-click it, then click Import Model Libraries. The UML2 Types model library contains the 4 primitive types defined by the UML 2.0 specification (again, see the Resources section for more information on UML 2.0): Boolean, String, Integer, and Unlimited Natural. The Java Types model library defines primitive types corresponding to the Java language primitive types, and the Ecore Types model library defines primitive types corresponding to the Eclipse's EMF types. UML2 and Java types are fully supported. The Ecore types are partially supported: they can all be specified, and the tool will provide read capability for all of them. However, it supports editing capability only for the types that have a direct Java type representation. For example, the tool provides editing capability for attributes whose type is EByte, but only the read capability for those whose type is ETreeIterator. It is envisioned that such types (like ETreeIterator) will be used only in conjunction with some sort of programmatic manipulation of the profile at the runtime. Figure 9. Selecting attribute type Enumerations Enumerations can be used to specify the type of stereotype attributes only if they are defined in the same profile as the stereotype itself. The values for attributes whose type is an enumeration would be enumeration literals owned by that enumeration. The profile-owned enumerations are not generally available outside of the profile itself. Classes Classes can be used to specify the type of stereotype attributes only if they are defined in the same profile as the stereotype itself. Any such class can (and should) have attributes of its own. The rules for those attributes (in terms of supported types and default values) are the same as for the stereotype attributes. The tool only partially supports stereotype attributes of a class type. Such attributes can be specified, and the tool offers the read capability. However, it does not provide any UI to manipulate such properties. So, typing stereotype attributes with a class type is useful only in conjunction with some sort of programmatic manipulation of the profile at runtime. The default value of an attribute typed as a class is null or empty collection (when the multiplicity is greater than 1). The profile-owned classes are not generally available outside of the profile itself. Generalization A stereotype can specialize or generalize only another stereotype: a class cannot participate in the generalization relationship with the stereotype. The tool will let you specify generalization between the stereotype and a class but the validation of the profile will fail. To specify a generalization relationship between the two stereotypes, select the stereotype that you wish to be the specialization in the Model Explorer and go to the Advanced tab in the Properties View. Select the Collections property and click the … button in the value field, as shown in Figure 10. Figure 10. Stereotype collections property This launches the Properties dialog. Select the Generalization collection and in the top right corner select the insert tool (the Generalization icon), as shown in Figure 11. Select the other stereotype and click OK. Figure 11. Generalization collection Profile constraints In a profile only stereotypes can own constraints. To create a constraint, select the stereotype in the Model Explorer, right-click it, and click Add UML -> Constraint. The constraint can be named, but it does not have to be. It is a good idea to provide the name, though, since the name could be used in reporting the constraint failure by the tool. It extends the meta-model to constrain the model where the stereotype is applied. The system automatically extends the meta-model if the specified language is supported. If the language is not supported, the constraint is ignored by the tool. The constraint is defined in the profile but evaluated in the model, where the stereotype (that owns it) is applied. The properties on the General tab (in the Properties view) are Name, Language, and Body, as shown in Figure 12. The two system-supported languages are OCL (Object Constraint Language) and Java. The content of the Body field depends on the specified language. The Java-based constraints should yield better performance, might be easier to use to express complex constraints, and offer greater flexibility. On the other hand, the Java-based constraints work only with the plug-in deployed profiles (please see the Deployment section) and are more time-consuming for initial tests performed by you. Figure 12. General constraint properties Important properties on the Advanced tab (in the Properties view shown in Figure 13) are Evaluation Mode, Message Key and Severity. They are grouped under the Metamodel Constraint category. The Evaluation Mode value could be either Batch (evaluated only on demand when you invoke the validation action) or Live (evaluated both when the change occurs and on demand). The default is Batch. The Message Key is used to for display purposes when the constraint fails. If it is not specified, the system uses the fully qualified constraint name. If it is specified, the system looks it up in the corresponding properties file if there is one (more on this in the Localization section). If no properties file is found, the key itself is used. The single quote in the message must be escaped with another single quote. The Severity could be Error, Warning, and Informational. The exact behavior for each of those values would depend on your preference settings. However, if a Live constraint with the Error severity is violated, the change is automatically rolled back. Figure 13. Advanced constraint properties Built-in OCL support Note: This article does not attempt to clarify or explain OCL. The readers of this section should be familiar with the OCL specification (see Resources). The supported version of the OCL is 2.0, matching the supported UML definition (2.0). The OCL statement is entered in the Body field of the constraint's General tab in the Properties view. The union of the user modeled stereotype and intersection of its meta-model extensions is used as the OCL context when the constraint is defined. For example: - Stereotype S1 has two attributes (a1: Integer, and a2 : Boolean), extends Class and Actor metaclasses, and has constraint profileCons1. - OCL statement in the profileCons1 constraint would have access to properties a1 and a2 and intersection of features defined in metaclasses Class and Actor. - The intersection of features defined in all extended metaclasses is used instead of the union to ensure that the constraint is syntactically valid, regardless of the element where the stereotype will be applied. The tool does not allow Class-specific features to be used in the constraint because the constraint would not be syntactically valid when the stereotype is applied to an Actor, and the other way around. The element with the constraint's stereotype applied to it is used as the OCL context during the evaluation of the constraint. For example: - Actor A1 has stereotype S1 applied to it. - The constraint profileCons1 is evaluated depending on the evaluation mode settings. At that time, actor A1 is used as the OCL context in the meta-model mode. The UI provides syntax highlighting, content assist, and syntax parsing. The constraint is evaluated during model validation in the model where the stereotype is applied. It is checked only for syntactical validity when the profile itself is validated. If the constraint has a message associated with it (through the Message Id), the {0} variable in the message is substituted by the context element -- unless it is between single quotes. Built-in Java support The user can specify the Java class in the Body field of the constraint's General tab in the Properties view. The Java class has to be specified using its fully qualified name. It has to extend the com.ibm.xtools.emf.validation.AbstractModelConstraint class. Both profile and the Java class have to be deployed through the same plug-in (more on this in the Deployment section). The element with the constraint's stereotype applied to it is used as the constraint context during evaluation of the constraint. The constraint is evaluated during model validation in the model where the stereotype is applied. It is not checked when the profile itself is validated. If the constraint has a message associated with it (through the Message Id), it can be obtained from the IValidationContext object that is passed to the constraint by the system. The constraint can then deal with any number of the {n} variables in the message using standard Java message formatting. Using UML profiles The intent of this section is to provide a short overview of using UML profiles, so that you can quickly start testing the new profile. More advanced topics are covered later in other sections. Applying profiles Before the content of a profile (for all practical purposes, that means stereotypes) can be used in a model, the profile itself has to be applied to the model. To be precise, the profile can be applied to any package in the model, including the model itself. When the profile is applied to the model itself, it is visible in the whole model. If it is applied to some package in the model, then it is visible only in that package's sub-tree. It is usually easier to manage if the profile is applied to the model, but it is entirely up to you. To apply a profile, select the model (package) in Model Explorer or on a diagram (if it is present there) and navigate to the Profiles tab in the Properties view, as shown in Figure 14. Figure 14. Profiles tab The Applied Profiles table lists all the profiles that have already been applied. Don't worry too much about the Version and Release Label columns for now, those concepts are covered later on in the Change management section. To unapply (remove) a profile, select the profile and click the Remove Profile button. Note: Not all profiles can be removed. There are certain profiles that are required by the system and the user cannot remove them. Three of those are Basic, Intermediate and Complete. These profiles are defined by the UML 2.0 specification. The other two (Default and Deployment) are defined by RSM and RSA. To apply (add) a new profile, simply click Add Profile, which will lunch the Select Profile dialog shown in Figure 15. Figure 15. Select Profile dialog You can either choose one of the available (system-known) deployed profiles, or browse the file system to select a profile. More details on deploying profiles can be found later in the Deployment section. For now, the simplest way to start is to select the File option and then browse the file system to find the profile in the workspace. Applying stereotypes To apply a stereotype, select the modeling element in Model Explorer or on a diagram, and navigate to the Stereotypes tab in the Properties View, as shown in Figure 16. Figure 16. Stereotypes tab The Applied Stereotypes table lists all of the stereotypes that have already been applied. The Stereotype Properties table lists the element’s properties that are contributed by those stereotypes. To unapply (remove) a stereotype, select the stereotype (s) and click the Remove Stereotypes button. If the stereotype is required (as indicated by the Required column) then it cannot be removed. To apply (add) a new stereotype, simply click Add Stereotypes, which will launch the Apply Stereotypes dialog shown in Figure 17. Figure 17. Apply Stereotypes dialog The list in the dialog contains all applicable stereotypes for that element that are not already applied. is being used.’s UML definition is linked to the model indirectly through the version. Only the latest version completely and accurately reflects the UML definition of the profile. All other versions only hold enough information to enable the smooth transition of a model -- with that version applied to it -- to the newest version of the profile. And that is assuming there were no incompatible changes made between the versions (more on this topic in the Compatibility rules section). To see the current (latest) version number of the profile, select it in the Model Explorer and navigate to the General tab in the Properties View. It has a read-only Version field. To compare it with the version that is actually applied to the model, select the model in the Model Explorer and navigate to the Profiles tab in the Properties View. One of the rows will represent the profile of interest (if it is actually applied), and there is a Version column in the table. Releasing a profile Releasing a profile creates a special version of the profile. It is invoked through the context menu shown in Figure 18: select the profile in the Model Explorer, right-click it and click Release. This launches the Release Profile dialog (Figure 19), where you can specify the release label that will be associated with the released version. The release label is completely arbitrary: it is any string you wish to enter. Figure 18. Releasing a profile Figure 19. Release Profile dialog Figure 20 shows how all released versions of the profile are listed in the Releases field on the General tab in the Properties View. Figure 20. Released profile If the most recent version is released, then the Release Label field displays the label associated with it. If the profile has not ever been released, or if it has been modified since the last release, then the Release Label field will indicate that. In addition to creating a new profile version (and marking it with the release label), all non-released versions are removed. Consequently, non-released versions of the profile should be applied only to test models. The models with intermediate profile versions applied will be able to migrate to the released version, but they will lose data: applied stereotypes and values of stereotype contributed properties., let's say that you create a profile with one stereotype (S1) and then release it. You then add another stereotype (S2) to the profile. The tool would let you delete (or rename) S2 but not S1. The compatibility rules are implemented through a live constraint: from the Preferences -> Window menu, click Modeling -> Validation -> Constraints. Next, click either UML 2.0 -> Modeling -> Profiles or UML 2.0 -> Model Quality Dimensions -> Compatibility. Finally, select the Profile Compatibility Restrictions constraint. If you must make a change that would be incompatible with a released version, for whatever reason, then there is a back door of temporarily disabling this constraint. Of course, it is strongly recommended not to go this route, but in case it is absolutely necessary the back door is there. However, be warned that in this case it is most likely that there will be data loss during profile migration. Migration Migration upgrades the applied profile version in the model. It upgrades the model model, 21, if the system detects that an older version of the profile is applied, it will prompt you to perform the migration. Of course, you may decline. Figure 21. Profile migration warning However, if the profile file does not have the previously applied version anymore, another dialog will precede the Profile Migration warning: the Unrecognized Schema error dialog shown in Figure 22. Figure 22. Unrecognized Schema error The most likely reason that a profile file would not contain the version is that you have either released or compressed the profile (more on those concepts in separate sections), and the old version was an intermediate version. The cause of the warning is that the profile extends the meta-model and the tool does not know how to treat certain data in the model file, since the schema defining them is missing. The tool is not even aware that the cause is a missing profile version at this point. If you choose to ignore the unrecognized content, the model will be opened in a special mode. At this point, if the warning was caused by a missing profile version, the system will offer the profile migration. Please note that the regular migration rules still apply; since the profile file does not contain the old version, the applied stereotypes (and the values of properties contributed by them) will be lost. Another cause of this warning might be that the profile is missing altogether. In that case, even if you open the model by ignoring the unrecognized content, the tool will simply inform you that a particular profile is missing: there will be no way to migrate. In either case, when a model with unrecognized content is opened in the special mode and the changes are made to it, you are prompted to discard or keep this information during the save operation, as shown in Figure 23. Figure 23. at any time from the Properties view (for the selected package). To perform the migration, select the package (model) to which the profile is applied in the Model Explorer and navigate to the Profiles tab in the Properties view, as shown in Figure 24. The table lists all applied profiles, and any profile that is out of sync is clearly marked as such. The Migrate Profile button is used to perform actual migration. Figure 24. Manual profile migration Compressing a profile It is possible to purge intermediate (non-released) versions without releasing the profile. To do so, select the profile in the Model Explorer, right-click it and click Compress. It will delete all non-released versions except the last one. If the profile is dirty, then it will first create a non-released version, then save it and keep both the version it created as well as the last non-released version before that one. This action is useful when there is a prolonged development of the profile. Since a new version is created every time the profile is saved, its size can grow quickly, which can significantly affect performance both in terms of memory usage and speed. The Compress menu item has been introduced in the 6.0.1 version of RSM and RSA. don. In some cases the tool will store a fully qualified path (prior to the 6.0.1 version) or a relative path (6.0.1 and later) highly recommended that the location containing the profiles is pointed to by a path-map. To create a path-map, click Window -> Preferences, then click Modeling -> Path Maps. The result is shown in Figure 25. Note: This list displays only user-defined path maps; it does not display tool-defined path maps. Figure 25. Path maps Click the New button to create a new path-map, opening the dialog shown in Figure 26. Again, the name is arbitrary – it is up to you to determine the naming convention. The location (folder) should point to the folder that will contain the profile. Figure 26. New Path Map dialog If the model and the applied profiles are shared, then the same path-map has to be created on every system where they are used. The tool will not enforce the existence or validity of the path map: it is up to your particular team to ensure that the path maps exist and point to valid locations. If the path map does not exist or is not valid, the model simply will not open properly since the tool will be unable to find the applied profile (please see the Change management section for details). Please note that the profile author cannot ensure path map. The profile author has an option to prevent the profile from showing up in this list (more on this later). Another useful feature is that the profile author can define the path map the profile author and the actual design. The author might create the plug-in with the sole purpose of deploying the profile, or the profile could be added to an existing plug-in where it will be just on of many artifacts. There could be code accompanying the profile, providing runtime manipulation of models where the profile is applied (again, if required). recommended for the user-created profiles as well. Note:This is a convention only. It is not required nor enforced. There is only one exception to this related to the localization in the 6.0 GA version (more on this in the Localization section).. Here is an example of the content of the build.properties file (it assumes that the profiles are in the profiles folder): bin.includes = plugin.xml,\ plugin.properties,\ <some file>,\ profiles/,\ <some file> The row defining the profile location is in bold font. Dependencies The plug-in hosting the profile will need dependencies to the com.ibm.xtools.emf.msl and com.ibm.xtools.uml2.msl plug-ins. If the profile is going to use Java-based constraints, it will also need a dependency to the com.ibm.xtools.emf.validation plug-in. Registering a path map Regardless of the location in the plug-in where the profile is stored, there should be a path map defined for that location. The path map can be registered through the plugin.xml file of the plug-in. Here is an example: <extension id="somePathmapExtensionId" name="somePathmapExtensionName" point="com.ibm.xtools.emf.msl.Pathmaps"> <pathmap name="MY_SAMPLE_PROFILES" path="profiles"> </pathmap> </extension> The extension point is com.ibm.xtools.emf.msl.Pathmaps. The extension's id and name are up to you. map pointing to a location in another plug-in. In that case, the pathmap element has another attribute: plugin. The value of the plugin attribute is the name of the referenced plug-in, without the version information. Here is an example: <extension id="somePathmapExtensionId2" name="somePathmapExtensionName2" point="com.ibm.xtools.emf.msl.Pathmaps"> <pathmap name="MY_SAMPLE_PROFILES_2" plugin="com.mycompany.myproduct.myplugin" path="profiles"> </pathmap> </extension> Registering a profile The profile itself is also registered through the plugin.xml file. Here is an example using the path map MY_SAMPLE_PROFILES from the previous section, and 3 profiles (MyProfileA, MyProfileB, and MyProfileC) deployed in the profiles subfolder of the plug-in: <extension name="someProfileExtensioName" point="com.ibm.xtools.uml2"> </UMLProfile> </extension> The extension point is com.ibm.xtools.uml2.msl.UMLProfiles. The extension's id and name are up to you. The UMLProfile element applying profiles. The value is used as is unless it is preceded with a percentage sign (%). The percentage sign indicates that the name is localized and will be retrieved from the plugin.properties file, using the remainder of the value as the key in the properties file (the standard Eclipse behavior for providing localized strings in the plugin.xml -- read more about Eclipse in the Resources section). So, in this example the name for MyProfileB is defined in the plugin.xml (MyProfileB) while the names for MyProfileA and MyProfileC are defined in the plugin.properties file using the specified keys (MyProfileA.name and MyProfileC.name, respectively). You can specify the path in a number of different formats but it is strongly recommended to use the path map format. In this example, all 3 profiles use path maps, although it might not seem so at first glance. The paths for MyProfileA and MyProfileB are specified relative to the plug-in's root (profiles/MyProfileA.epx and profiles/MyProfileB.epx). However, the folder profiles are covered by the MY_SAMPLE_PROFILES path map, so the tool will automatically use the path map. The registration for MyProfileC is even more explicit: it states the path map directly (pathmap://MY_SAMPLE_PROFILES/MyProfileC.epx). The required flag should not be used. offered in the list of deployed profiles when applying profiles. The default is false. The value obviously depends on the intent: if the profile should be applied only programmatically, then the value should be false, otherwise it should be true. Using the New Plug-in Project wizard and Plug-in editor The New Plug-in Project wizard and the Plug-in editor are Eclipse concepts, so for more details on this topic please see the Resources section. The only profile-specific information is the exact extensions for registering path maps 27. Note: To use the plug-in development capabilities, the Eclipse Plug-in Development capability has to be enabled. To do so, click Window -> Preferences, then click Workbench -> Capabilities, then click Eclipse Developer and select the Eclipse Plug-in Development capability. Figure 27. New project The values for the fields in the wizard (Figure 28) 28. New Plug-in Project wizard The next step is to create a folder in the plug-in to hold profile(s). map and the profile in the plugin.xml you need to launch the Plug-in editor. Simply double-click on the plugin.xml file and the editor will be started, as shown in Figure 29. Note: While you will do most of the work with the profile in the Modeling perspective, the modification of the plugin.xml file is easier done through some other perspectives, like Resource and Java perspective. Of course, nothing stops you from opening the proper view (for example, the Navigator view from the Basic category) in the Modeling perspective and using it to navigate to the plugin.xml file (Model Explorer does not display those files). Figure 29. Navigator and the Plug-in editor To work in the text mode, simply go to the plugin.xmland the build.properties tabs of the Plug-in editor. The syntax is the same as used in examples from the previous few sections. However, you may wish to take advantage of the more advanced features of the Plug-in editor. The dependencies can be specified on the Dependencies tab shown in Figure 30, and in the Plug-In Selection window in Figure 31. Figure 30. Dependencies tab Figure 31. Select plug-in for dependency You can register the path map and the profile through the Extensions tab. Figure 32. Extensions tab Also, make sure on the Build tab (Figure 33) that the folder containing the profile is included in the binary build. Figure 33. Build tab Once the plug-in is ready for deployment, the you can export it using Eclipse's plug-in exporter. To invoke the exporter shown in Figure 34, select the desired plug-in(s) in the Navigator view, then click File -> Export. Select the Deployable plug-ins and fragments entry from the list. Figure 34. Export plug-in wizard Of course, the plug-in could be part of a bigger application that has its own way of packaging plug-ins. Open-source UML2 format RSM and RSA also support the open-source UML2 format to a certain degree. The profiles in the uml2 format (the file naming convention is <profile name>.profile.uml2) can be directly applied to models in RSM and RSA (*.emx). Both file system deployment and plug-in deployment could be used. RSM and RSA also provide export and import functionality to and from the uml2 format. For more details on the open source UML2 format please see the Resources section. Export To invoke the Export wizard, click File -> Export -> UML2 Model. The wizard -- shown in Figure 35 -- will create a *.profile.uml2 file in the specified location. Note: The file will have the IDs regenerated. That is, the wizard cannot be used if you plan to maintain the RSM or RSA version (*.epx), make changes there, and re-export it on a regular basis. In this case, the exported file will always have different IDs, so the models where it is applied would not migrate correctly. The wizard is more of a one-time operation, which you would use if you intend to convert your model to the UML2 format (from the .epx) and then continue maintenance in that format. Figure 35. Export wizard Import The import functionality is very similar to the export – it just works in the opposite direction. To invoke the Import wizard, click File -> Import -> UML2 Model. The wizard will create a *.profile.epx file in the specified location. Note: As with the export, do not use the Import wizard if you plan to maintain the UML2 version, make changes there, and re-import on a regular basis. Rather, use it if you intend to convert the model to the .epx format and continue maintenance in that format. Localization Profiles use :: sequences replaced by double underscores (__). Any space characters are escaped (using the \ character). The IDs for stereotype categories and constraint messages are those strings themselves. Figure 36 presents an example. Figure 36. Example profile structure for localization The stereotype S1 has a category MyCategory. Its constraint has a message ID MyMsgId. Also, please notice space in the name of the enumeration literal L 1. Here is the content of a corresponding RSM and RSA can pre-populate the localization file. The action is invoked from the context. Also, the localization file has extension *.properties and as such is not visible in the Model Explorer. To view it you have to use some other view (like Navigator).. RSM and RSA mostly do not publicly expose its API for profile and stereotype support. However, there are a few classes that are exposed that would make life easier when you maps for its location. To use these APIs the plug-in will need dependencies on various other plug-ins. Please see the Deployment section for details about how to create a plug-in dependency. RSM and RSA Specific APIs UMLModeler The UMLModeler class can be used to obtain the profile. It is provided by the com.ibm.xtools.modeler plug-in. The following example obtains the MyProfileA profile from the location specified by the MY_SAMPLE_PROFILES path-map. If the profile is not already loaded, this code forces loading (the Boolean parameter of the getResource method) – assuming that the path provided in the URI constructor is right. import java.util.List; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.uml2.Profile; import com.ibm.xtools.modeler. AbstractModelConstraint Profile constraints implemented as Java classes have to extend this class. It is provided by the com.ibm.xtools.emf.validation plug-in. The method to override is: public IStatus validate(IValidationContext arg0) The argument ( arg0) can be used to return the status. The IValidationContext interface defines the createFailureStatus and createSuccessStatus methods. Open Source API For the full documentation for the open source the reader in the right direction in the terms of needed APIs. All of the classes listed in this chapter are provided by the org.eclipse.uml2 plug-in. org.eclipse.uml2.Package EList getAppliedProfiles(); public Set getAllAppliedProfiles(); public boolean isApplied(Profile profile); public String getAppliedVersion(Profile profile); public void apply(Profile profile); public void unapply(Profile profile); org.eclipse.uml2.Element public Set getApplicableStereotypes(); public Stereotype getApplicableStereotype(String qualifiedStereotypeName); public Set getAppliedStereotypes(); public Stereotype getAppliedStereotype(String qualifiedStereotypeName); public String getAppliedVersion(Stereotype stereotype); public boolean isApplied(Stereotype stereotype); public boolean isRequired(Stereotype stereotype); public void apply(Stereotype stereotype); public void unapply(Stereotype stereotype); public Object getValue(Stereotype stereotype, String propertyName); public void setValue(Stereotype stereotype, String propertyName, Object value); org.eclipse.uml2.Profile public String getVersion(); EList getOwnedStereotypes(); Stereotype getOwnedStereotype(String unqualifiedName); org.eclipse.uml2.Stereotype public Set getAllExtendedEClasses(); public Profile getProfile(); Best Practices The following is a list of recommended practices: - Avoid using special characters (like a space) in your profile. If the special characters are needed for display purposes, use localization mechanism. Version 6.0.1 prevents you from using special characters altogether anyway (except for the enumeration literals). - Keep profiles and models in separate locations. If possible at all, keep them on a separate change management life cycle. - Always use path maps, regardless of the deployment type (file system vs.. If you are using the 6.0.1 version, use the Compress option to reduce the size of the profile. If you have some older versions, the only recourse is to release the profile from time to time, but be aware about plug-in profile, create a path map with the same name pointing to the same location in both the development (IDE) and the runtime (target) environment. Preferably, the path map would be defined as a user path map (through the Preferences) in the development environment and in the plugin.xml file of the plug-in for the runtime environment. That way, the models can be easily shared between the two environments. Known issues The following is a list of profile-specific known issues. It does not list other general issues in RSM and RSA although they could (and often do) affect profiles as well. For those, please consult the release notes of the particular RSM or RSA version. - Naming problems. For more details, please see the Naming sub-section of the Profile Creation section. - OCL constraints do not support properly defined profile enumerations. - Only partial support for attributes of a class type. - There could be migration problems between non-released versions. - The tool prevents a profile from being applied to a package if it is already applied to one of the package’s ancestors, including the model. However, it lets the user do the opposite (that is, apply the profile to one of the package’s ancestors even if it is already applied to the package. That may lead to problems, especially when profile migration is involved. - The iFix002 and iFix003 versions unload non-RSM or RSA resources under certain conditions. This behavior affects the whole application, including profiles. Examples of non-RSM or RSA resources are the UML 2.0 meta-model and various model libraries. When that happens, the only way around is to restart the application. Final word UML profiles enable you to extend the UML meta-model for different purposes. In essence, that means the tool's behavior is extended as well. RSM and RSA offer extensive UI to build and use profiles. They can range from simple profiles providing some additional presentation functionality to the complex profiles deployed through plug-ins and with accompanying code taking advantage of the profile's meta-model extensions. Acknowledgments The author wishes to thank Kenneth Hussey, Christian Damus, Daniel Leroux, Alan Yeung, Michael Hanner, and Kim Letkeman. Resources Learn - Introducing IBM Rational Software Architect: Improved usability makes software development easier: This article is a basic introduction to the Rational Software Architect product. - IBM Rational Software Architect product page: Find technical documentation, how-to articles, education, downloads, and product information about Rational Software Architect - Official UML site: More information on the UML 2.0 specification can be found here. - Eclipse site: For general information about Eclipse. - Eclipse UML2 project: For information on the open source Eclipse UML2 project. Get products and technologies - IBM Rational Software Architect: Download a trial version from developerWorks. Discuss - Participate in the discussion forum. - Rational Software Architect, Software Modeler, Application Developer and Web Developer forum: Ask questions about Rational Software.
http://www.ibm.com/developerworks/rational/library/05/0906_dusko/index.html
CC-MAIN-2016-36
en
refinedweb
System-Level Fault Tolerant Measures Topic Last Modified: 2006-08-16 This section provides system-level considerations and strategies for increasing the fault tolerance of your Exchange 2003 organization. Specifically, system-level refers to your Exchange 2003 infrastructure and the recommended best practices for implementing fault tolerance within that infrastructure. The following figure illustrates a reliable Exchange 2003 infrastructure and lists the best practices for maintaining a high level of fault tolerance. System-level fault tolerant measures This section discusses methods for designing fault tolerance at each level in your Exchange 2003 infrastructure. Specifically, this section provides information about: Implementing firewalls and perimeter networks Ensuring reliable access to Active Directory and Domain Name System (DNS) Ensuring reliable access to Exchange front-end servers Configuring Exchange protocol virtual servers Implementing a reliable back-end storage solution Implementing a server clustering solution Implementing a monitoring strategy Implementing a disaster recovery strategy It is recommended that your Exchange 2003 topology includes a perimeter network and front-end and back-end server architecture. The following figure illustrates this topology, including the additional security provided by an advanced reverse-proxy server (in this case, Internet Security and Acceleration (ISA) Server 2000 Feature Pack 1). Exchange 2003 topology using a perimeter network Deploying ISA Server 2000 Feature Pack 1 in a perimeter network is just one way you can help secure your messaging system. Other methods include using transport-level security such as Internet Protocol security (IPSec) or Secure Sockets Layer (SSL). For complete information about designing a secure Exchange topology, see "Planning Your Infrastructure" in Planning an Exchange Server 2003 Messaging System. For information about using ISA Server 2000 with Exchange 2003, see Using ISA Server 2000 with Exchange Server 2003. Exchange relies heavily on Active Directory and Domain Name System (DNS). To provide reliable and efficient access to Active Directory and DNS, make sure that your domain controllers, global catalog servers, and DNS servers are well protected from possible failures. A domain controller is a server that hosts a domain database and performs authentication services that are required for clients to log on and access Exchange. (Users must be able to be authenticated by either Exchange or Windows.) Exchange 2003 relies on domain controllers for system and server configuration information. In Windows Server 2003, the domain database is part of the Active Directory database. In a Windows Server 2003 domain forest, Active Directory information is replicated between domain controllers that also host a copy of the forest configuration and schema containers. A domain controller can assume numerous roles within an Active Directory infrastructure: a global catalog server, an operations master, or a simple domain controller. A global catalog server is a domain controller that hosts the global catalog. A global catalog server is required for logon because it contains information about universal group membership. This membership grants or denies user access to resources. If a global catalog server cannot be contacted, a user's universal membership cannot be determined and logon access is denied. At least one global catalog server must be installed in each domain that contains Exchange servers. Because domain controllers contain essential Active Directory information, make sure that the domain controllers in your organization are well protected from possible failures. The following are best practices for deploying and configuring Active Directory domain controllers and global catalog servers: Unless it is a requirement for your organization, do not run Exchange 2003 on your domain controllers. For information about the implications of running Exchange on a domain controller, see "Running Exchange 2003 on a Domain Controller" later in this topic. Place at least two domain controllers in each Active Directory site. If a domain controller is not available within a site, Exchange will look for another domain controller. This is especially important if the other domain controllers in your organization can be accessed only across a WAN. This circumstance could cause performance issues and possibly introduce a single point of failure. Place at least two global catalog servers in each Active Directory site. If a global catalog server is not available within a site, Exchange will look for another global catalog server. This is especially important if the other global catalog servers in your organization can be accessed only across a WAN. This circumstance could cause performance issues and possibly introduce a single point of failure. There should generally be a 4:1 ratio of Exchange processors to global catalog server processors, assuming the processors are similar models and speeds. However, higher global catalog server usage, a large Active Directory database, or large distribution lists can necessitate more global catalog servers. In branch offices that service more than 10 users, one global catalog server must be installed in each location that contains Exchange servers. However, for redundancy purposes, deploying two global catalog servers is ideal. If a physical site does not have two global catalog servers, you can configure existing domain controllers as global catalog servers. If your architecture includes multiple subnets per site, you can add additional availability by ensuring that you have at least one domain controller and one global catalog server per subnet. As a result, even if a router fails, you can still access the domain controller access. Ensure that the server assigned to the infrastructure master role is not a global catalog server. For information about the infrastructure master role, see the topic "Global catalog and infrastructure master" in Windows 2000 Server Help. Consider monitoring the LDAP latency on all Exchange 2003 domain controllers. For information about monitoring Exchange, see Implementing Software Monitoring and Error-Detection Tools. Consider increasing the LDAP threads from 20 to 40, depending on your requirements. For information about tuning Exchange, see the Exchange Server 2003 Performance and Scalability Guide. Ensure that you have a solid backup plan for your domain controllers. As a best practice, you should not run Exchange 2003 on servers that also function as Windows domain controllers. Instead, you should configure Exchange servers and Windows domain controllers separately. However, if your organization requires that you run Exchange 2003 on a domain controller, consider the following limitations: If you run Exchange 2003 on a domain controller, it uses only that domain controller. As a result, if the domain controller fails, Exchange cannot fail over to another domain controller. If your Exchange servers also perform domain controller tasks in addition to serving Exchange client computers, those servers may experience performance degradation during heavy user loads. If you run Exchange 2003 on a domain controller, your Active Directory and Exchange administrators may experience an overlap of security and disaster recovery responsibilities. Exchange 2003 servers that are also domain controllers cannot be part of a Windows cluster. Specifically, Exchange 2003 does not support clustered Exchange 2003 servers that coexist with Active Directory servers. For example, because Exchange administrators who can log on to the local server have physical console access to the domain controller, they can potentially elevate their permissions in Active Directory. If your server is the only domain controller in your messaging system, it must also be a global catalog server. If you run Exchange 2003 on a domain controller, avoid using the /3GB switch. If you use this switch, the Exchange cache may monopolize system memory. Additionally, because the number of user connections should be low, the /3GB switch should not be required. Because all services run under LocalSystem, there is a greater risk of exposure if there is a security bug. For example, if Exchange 2003 is running on a domain controller, an Active Directory bug that allows an attacker to access Active Directory would also allow access to Exchange. A domain controller that is running Exchange 2003 takes a considerable amount of time to restart or shut down. (approximately 10 minutes or longer). This is because services related to Active Directory (for example, Lsass.exe) shut down before Exchange services, thereby causing Exchange services to fail repeatedly while searching for Active Directory services. One solution to this problem is to change the time-out for a failed service. A second solution is to manually stop the Exchange services before you shut down the server. Similar to domain controller and global catalog server services, Domain Name System (DNS) services are critical to the availability of your Exchange 2003 organization. On a Windows Server 2003 network, users locate resources by using DNS and Windows Internet Name Service (WINS). The failure of a DNS server can prevent users from locating your messaging system. To ensure that your Exchange 2003 topology includes reliable access to DNS, consider the following: Ensure that a secondary DNS server exists on the network. If the primary DNS server fails, this secondary server should be able to direct users to the correct servers. Integrate Windows Server 2003 DNS zones into Active Directory. In this scenario, each domain controller becomes a potential DNS server. Configure each client computer with at least two DNS addresses. Ideally, both DNS servers should be in the same site as the client. If the DNS servers are not in the same site as the client, the primary DNS server should be the server that is in the same site as the client. Ensure that name resolution and DNS functionality are both operating correctly. For more information, see Microsoft Knowledge Base article 322856, "HOW TO: Configure DNS for Use with Exchange Server." Before deploying Exchange, ensure that DNS is correctly configured at the hub site and at all branches. Exchange requires WINS. Although it is possible to run Exchange 2003 without enabling WINS, it is not recommended. There are availability benefits that result from using WINS to resolve NetBIOS names. (For example, in some configurations, using WINS removes the potential risk of duplicate NetBIOS names causing a name resolution failure.) For more information, see Microsoft Knowledge Base article 837391, "Exchange Server 2003 and Exchange 2000 Server require NetBIOS name resolution for full functionality." For information about deploying DNS and WINS, see "Deploying DNS" and "Deploying WINS" in the Microsoft Windows Server 2003 Deployment Kit. If your organization has more than one Exchange server, it is recommended that you use Exchange front-end and back-end server architecture. Front-end and back-end architecture provides several client access performance and availability benefits. Internet clients access their mailboxes through front-end servers. However, in default Exchange 2003 configurations, MAPI clients cannot use front-end servers; instead, these clients access their mailboxes through back-end servers directly. When front-end servers use HTTP, POP3, and IMAP4, performance is increased because the front-end servers offload some load processing duties from the back-end servers. If you plan to support MAPI, HTTP, POP3, or IMAP4, you can use Exchange front-end and back-end server architecture to take advantage of the following benefits: Front-end servers balance processing tasks among servers. For example, front-end servers perform authentication, encryption, and decryption processes. This improves the performance of your Exchange back-end servers. Your messaging system security is improved. For more information, see "Security Measures" later in this topic. To incorporate redundancy and load balancing in your messaging system, you can use Network Load Balancing (NLB) on your Exchange front-end servers. For information about planning an Exchange 2003 front-end and back-end architecture, see "Planning Your Infrastructure" in Planning an Exchange Server 2003 Messaging System. For information about deploying front-end and back-end servers, see Using Microsoft Exchange 2000 Front-End Servers. Although that document focuses on Exchange 2000, the content is applicable to Exchange 2003. To build fault tolerance into your messaging system, consider implementing Exchange front-end servers that use NLB. You should also configure redundant virtual servers on your front-end servers. Network Load Balancing (NLB) is a Windows Server 2003 service that provides load balancing support for IP-based applications and services that require high scalability and performance. When implemented on your Exchange 2003 front-end servers, NLB can address bottlenecks caused by front-end services. The following figure illustrates a basic front-end and back-end architecture that includes NLB. Basic front-end and back-end architecture including Network Load Balancing An NLB cluster dynamically distributes IP traffic to two or more Exchange front-end servers, transparently distributes client requests among the front-end servers, and allows clients to access their mailboxes using a single server namespace. NLB clusters are computers that, through their numbers, enhance the scalability and performance of the following: Web servers Computers running ISA Server (for proxy and firewall servers) Other applications that receive TCP/IP and User Datagram Protocol (UDP) traffic NLB cluster nodes usually have identical hardware and software configurations. This helps ensure that your users receive consistent front-end service performance, regardless of the NLB cluster node that provides the service. The nodes in an NLB cluster are all active. For more information about NLB, see "Designing Network Load Balancing" and "Deploying Network Load Balancing" in the Microsoft Windows Server 2003 Deployment Kit. With NLB, as the demand increases on your Exchange 2003 front-end servers, you can either scale up or scale out. In general, if your primary goal is to provide faster service to your Exchange users, scaling up (for example, adding additional processors and additional memory) is a good solution. However, if you want to implement some measure of fault tolerance to your front-end services, scaling out (adding additional servers) is the best solution. With NLB, you can scale out to 32 servers if necessary. Scaling out increases fault tolerance because, if you have more servers in your NLB cluster, a server failure affects fewer users. When configuring your Exchange 2003 messaging system, use Exchange System Manager to create a protocol virtual server for each protocol that you want to support on a specific front-end server. To maximize availability and performance of your front-end servers, consider the following recommendations when configuring protocol virtual servers: When configuring NLB for your Exchange 2003 front-end servers, you should make sure that all protocol virtual servers on your NLB front-end servers are configured with identical settings. If you are not using NLB on your front-end servers, do not create additional protocol virtual servers on each of your front-end servers. (For example, do not create two identical HTTP protocol virtual servers on the same front-end server.) Additional virtual servers can significantly affect performance and should be created only when default virtual servers cannot be configured adequately. For more information about configuring Exchange protocol virtual servers, see the Exchange Server 2003 Administration Guide. For information about tuning Exchange 2003 front-end servers, see the Exchange Server 2003 Performance and Scalability Guide. A reliable storage strategy is paramount to achieving a fault tolerant messaging system. To implement and configure a reliable storage solution, you should be familiar with the following: Exchange 2003 database technology Best practices for configuring and maintaining Exchange data Advanced storage technologies such as RAID and Storage Area Networks (SANs) For detailed information about planning and implementing a reliable back-end storage solution, see Planning a Reliable Back-End Storage Solution. By allowing the failover of resources, server clustering provides fault tolerance for your Exchange 2003 organization. Specifically, server clusters that use the Cluster service maintain data integrity and provide failover support and high availability for mission-critical applications and services on your back-end servers, including databases, messaging systems, and file and print services. The following figure illustrates an example of a four-node cluster where three nodes are active and one is passive. Example of a four-node 3 active/1 passive cluster In server clusters, nodes share access to data. Nodes can be either active or passive, and the configuration of each node depends on the operating mode (active or passive) and how you configure failover. A server that is designated to handle failover must be sized to handle the workload of the failed node. For information about planning Exchange server clusters, see Planning for Exchange Clustering. Server clustering provides two main benefits in your organization: failover and scalability. Failover is one of the most significant benefits of server clustering. If one server in a cluster stops functioning, the workload of the failed server fails over to another server in the cluster. Failover ensures continuous availability of applications and data. Windows Clustering technologies help guard against three specific failure types: Application and service failures. These failures affect application software and essential services. System and hardware failures. These failures affect hardware components such as CPUs, drives, memory, network adapters, and power supplies. Site failures in multi-site organizations. These failures can be caused by natural disasters, power outages, or connectivity outages. To protect against this type of failure, you must implement an advanced geoclustering solution. For more information, see "Using Multiple Physical Sites" later in this topic. By helping to guard against these failure types, server clustering provides the following two benefits for your messaging environment: High availability The ability to provide end users with dependable access services while reducing unscheduled outages. High reliability The ability to reduce the frequency of system failure. Scalability is another benefit of server clustering. Because you can add nodes to your clusters, Windows server clusters are extremely scalable. Rather than providing fault tolerance at the data level, server clustering provides fault tolerance at the application level. When implementing a server clustering solution, you must also implement solid data protection and recovery solutions to protect against viruses, corruption, and other threats to data. Clustering technologies cannot protect against failures caused by viruses, software corruption, or human error. Both clustering and fault tolerant hardware protect your system from component failures (such as CPU, memory, fan, or PCI bus failures). Although you can use clustering and fault tolerant hardware together as an end-to-end solution, be aware that the two methods provide high availability in different ways: Clustering can provide protection from an application or operating system failure. However, a stand-alone (non-clustered) server using fault tolerant hardware (or a server that uses hot-swappable hardware, which allows a device to be added while the server is running) cannot provide protection from these failure types. Clustering enables you to perform upgrades or installations on one of the cluster nodes, while maintaining full Exchange service availability for users. With stand-alone (non-clustered) servers, you must often stop Exchange services to perform these upgrades or installations. For specific information about how you can maintain Exchange service availability when performing upgrades or installations, see "Taking Exchange Virtual Servers or Exchange Resources Offline" in the Exchange Server 2003 Administration Guide. Continuous monitoring of your network, applications, data, and hardware is essential for high availability. Software-monitoring tools and techniques enable you to determine the health of your system and identify potential issues before an error occurs. To maximize availability, you must consistently manage, monitor, and troubleshoot your servers and applications. If a problem occurs, you must be able to react quickly so you can recover data and make it available as soon as possible. To help you monitor your Exchange 2003 organization, you could use the Exchange 2003 Management Pack for Microsoft Operations Manager. For complete information about Exchange 2003 Management Pack, Microsoft Operations Manager, and other monitoring tools, see Implementing Software Monitoring and Error-Detection Tools. To increase fault tolerance in your organization, you need to develop and implement a well-planned backup and recovery strategy. If you are prepared, you should be able to recover from most failures. After considering measures to increase fault tolerance in your Exchange 2003 infrastructure, consider the following additional system-level best practices: Safeguarding the physical environment of your servers Take precautions to ensure that the physical environment is protected. Security measures Implement permissions practices, security patching, physical computer security, antivirus protection, and anti-spam solutions. Message routing Use fault tolerant network hardware and correctly configure your routing groups and connectors. Use multiple physical sites Protect data from site failures by mirroring data to one or more remote sites or implementing geoclustering to allow failover in the event of a site failure. Operational procedures Maintain and monitor servers, use standardized procedures, and test your disaster recovery procedures. Laboratory testing and pilot deployments Before deploying your messaging system in a production environment, test performance and scalability in laboratory and pilot environments. To maintain the availability of your servers, you should maintain high standards for the environment in which the servers must run. To increase the longevity and reliability of your server hardware, consider the following: Temperature and humidity Install mission-critical servers in a room established for that purpose—specifically a room in which you can carefully control temperature and humidity. Computers perform best at approximately 70 degrees Fahrenheit (approximately 21 degrees Celsius). In an office setting, temperature is not usually an issue. However, consider the effects of a long holiday weekend in the summer with the air conditioning turned off. Dust or contaminants Where possible, protect servers and other equipment from dust and contaminants and check for dust periodically. Dust and other contaminants can cause components to short-circuit or overheat, which can cause intermittent failures. Whenever a server's case is open, quickly check to determine whether the unit needs cleaning. If so, check all the other units in the area. Power supplies As with any disaster-recovery planning, planning for power outages is best done long before you anticipate outages and involves identifying resources that are most critical to the operation of your business. When possible, provide power from at least two circuits to the computer room and divide redundant power supplies between the power sources. Ideally, the circuits should originate from two sources that are external to the building. Be aware of the maximum amount of power a location can provide. It is possible that a location could have so many servers that there is not sufficient power for any additional servers. Consider a backup power supply for use in the event of a power failure in your computer center. It may be necessary to continue providing computer service to other buildings in the area or to areas geographically remote from the computer center. You can use uninterruptible power supply (UPS) units to handle short outages and standby generators to handle longer outages. When reviewing equipment that requires backup power during an outage, include network equipment, such as routers. Maintenance of cables To prevent physical damage to cables, make sure the cables are neat and orderly, either with a cable management system or tie wraps. Cables should never be loose in a cabinet, where they can be disconnected by mistake. If possible, make sure that all cables are securely attached at both ends. Also, make sure that pull-out, rack-mounted equipment has enough slack in the cables, and that the cables do not bind and are not pinched or scraped. Set up good pathways for redundant sets of cables. If you use multiple sources of power or network communications, try to route the cables into the cabinets from different points. This way, if one cable is severed, the other can continue to function. Do not plug dual power supplies into the same power strip. If possible, use separate power outlets or UPS units (ideally, connected to separate circuits) to avoid a single point of failure. Security is a critical component to achieving a highly available messaging system. Although there are many security measures to consider, the following are some of the more significant: Permission practices Security patches Physical security Antivirus protection Anti-spam solutions For detailed information about these and other security measures, see the Exchange Server 2003 Security Hardening Guide. Your routing topology is the basis of your messaging system. As a result, you must plan your routing topology with network, bandwidth, and geographical considerations in mind. Routing describes how Exchange transfers messages from one server to another. When planning your routing topology, you must understand how messages are transferred within Exchange and then plan a topology for the most efficient transfer of messages. You must also plan the locations of connectors to messaging systems outside your Exchange organization. Careful planning can reduce the volume of network traffic and optimize Exchange and Windows services. To ensure that your message routing is reliable and available, consider the following high-level recommendations: Make sure that your physical network has built-in redundancy. For more information, see "Network Hardware" earlier in this topic. Make sure that you have correctly configured connectors and routing groups. For example, in some scenarios, using Exchange System Manager to configure redundant connector paths can limit a single point of failure. Configure your connectors to ensure there are multiple paths to all bridgehead servers. If applicable, make sure that your Simple Mail Transfer Protocol (SMTP) gateway servers are redundant. In large data centers, it is generally recommended that you dedicate specific Exchange 2003 servers to handle only inbound and outbound SMTP traffic. These servers are usually called SMTP gateway servers or SMTP hubs. These servers are responsible for moving SMTP e-mail between clients and Exchange 2003 mailbox servers (back-end servers). For information about planning your routing design and configuration (including recommendations for creating routing groups and connectors), see Planning an Exchange Server 2003 Messaging System. For information about how to configure message routing, see the Exchange Server 2003 Transport and Routing Guide. To improve disaster recovery and increase availability, some organizations use multiple physical sites. Most multi-site designs include a primary site and one or more remote sites that mirror the primary site. The level at which components and data are mirrored between sites depends on the SLA and the business requirements. Another option is to implement geographically dispersed clusters. With geographically dispersed clusters, in the event of a disaster, applications at one site can fail over to another site. The following sections provide more information about site mirroring and geoclustering. Site mirroring involves using either synchronous or asynchronous replication to mirror data (for example, Exchange 2003 databases and transaction log data) from the primary site to one or more remote sites. Using site mirroring to provide data redundancy in multiple physical sites If a complete site failure occurs at the primary site, the amount of time it takes to bring Exchange services online at the mirrored site depends on the complexity of your Exchange organization, the amount of preconfigured standby hardware you have, and your level of administrative support. For example, an organization may be able to follow a preplanned set of disaster recovery procedures and bring their Exchange messaging system online within 24 hours. Although 24 hours may seem like a lot of downtime, you may be able to recover data close to the point of failure. For information about synchronous and asynchronous replication of Exchange data, see "Exchange Data Replication Technologies" in Overview of Storage Technologies. A more advanced way to implement fault tolerance at the site level is to implement geographically dispersed clusters. To deploy geographically dispersed clusters with Windows Server 2003, you use virtual LANs (VLANs) to connect SANs over long distances. Using geographically dispersed clustering to provide application failover between physical sites Geographically dispersed cluster configurations can be complex, and the clustered servers must use only components supported by Microsoft. You should deploy geographically dispersed clusters only with vendors who provide qualified configurations. For more information about geographically dispersed cluster solutions with Exchange 2003, see Planning for Exchange Clustering. For information about Windows Server 2003 and geographically dispersed clusters, see Geographically Dispersed Clusters in Windows Server 2003. When operating and administering your Exchange 2003 messaging system, it is important that your IT staff use standard IP best practices. This section provides best practices for maximizing the availability of your applications and computers. (This information applies to both clustered and non-clustered environments.) - Minimize or eliminate support for multiple versions of operating systems, service packs, and out-of-date applications It is difficult to provide reliable support when multiple combinations of different software and hardware versions are used together in one system (or in systems that interact on the network). Out-of-date software, protocols, and drivers (and associated hardware) are impractical when they do not support new technologies. Set aside resources and time for planning, testing, and installing new operating systems, applications, and hardware. When planning software upgrades, work with users to identify the features they require. Provide training to ease users through software transitions. In your software and support budget, provide funds for upgrading applications and operating systems in the future. - Isolate unreliable applications An unreliable application is an application that your business cannot do without, but that does not meet appropriate standards for reliability. If you must work with such an application, there are two basic approaches you can take: Remove the unreliable applications from the servers that are most critical to your enterprise. If an application is known to be unreliable, take steps to isolate it, and do not run the application on a mission-critical server. Provide sufficient monitoring, and use automatic restarting options where appropriate. Sufficient monitoring requires taking snapshots of important system performance measurements at regular intervals. You can set up automatic restarting of an application or service by using the Services snap-in. For more information about Windows services, see "Services overview" in Windows Server 2003 Help. - Use current, standardized hardware Incompatible hardware can cause performance problems and data loss. Maintain and follow a hardware standard for new systems, spare parts, and replacement parts. - Plan for future capacity requirements Capacity planning is critical to the success of highly available systems. To understand how much extra capacity currently exists in the system, study and monitor your system during peak loads. - Maintain an updated list of operational procedures When a root system problem is fixed, make sure you remove any outdated procedures from operation and support schedules. For example, when software is replaced or upgraded, certain procedures might become unnecessary or no longer be valid. Pay special attention to procedures that may have become routine. Make sure that all procedures are necessary and not temporary fixes for issues for which the root cause has not been found. - Perform adequate monitoring practices If you do not adequately monitor your messaging system, you might not identify problems before they become critical and cause system failures. Without monitoring, an application or server failure could be your only notification of a problem. - Determine the nature of the problem before reacting If the operations staff is not trained and directed to analyze problems carefully before reacting, your personnel can spend large amounts of time responding inappropriately to a problem. They also might not be effectively using monitoring tools in the crucial time between the first signs of a problem and an actual failure. - Treat the root cause of problems instead of treating symptoms When an unexpected failure occurs or when performing short-term preventive maintenance, symptom treatment is an effective strategy for restoring services. However, symptom treatments that are added to standard operating procedures can become unmanageable. Support personnel can be overwhelmed with symptom treatments and might not be able to correctly react to new failures. - Avoid stopping and restarting services and servers to end error conditions Stopping and restarting a server may be necessary at times. However, if this process temporarily fixes a problem but does not address the root cause, it can create additional problems. Before you deploy any new solution, whether it is fault tolerant or network hardware, a software monitoring tool, or a Windows Clustering solution, you should thoroughly test the solution before deploying it in a production environment. After testing in an isolated lab, test the solution in a pilot deployment in which only a few users are affected, and then make any necessary adjustments to the design. After you are satisfied with the pilot deployment, perform a full-scale deployment in your production environment. Depending on the number of users in your Exchange organization, you may want to perform your full-scale deployment in stages. After each stage, verify that your system can accommodate the increased processing load from the additional users before deploying the next group of users. For complete information about setting up test and pilot environments, see "Designing a Test Environment" and "Designing a Pilot Project" in the Microsoft Windows Server 2003 Deployment Kit. To determine how many Exchange servers are required to manage user load, use the following capacity planning tools: Exchange Server Load Simulator 2003 (LoadSim) Exchange Server Stress and Performance (ESP) tool Jetstress With Exchange Server Load Simulator 2003 You can download LoadSim 2003 from the Downloads for Exchange Server 2003 Web site. The Exchange Server Stress and Performance (ESP) 2003 tool is a highly scalable stress and performance tool for Exchange. It simulates large numbers of client sessions by concurrently accessing one or more protocol services. Scripts control the actions that each simulated user performs.DAV Internet Message Access Protocol version 4rev1 (IMAP4) Lightweight Directory Access Protocol (LDAP) OLE DB Post Office Protocol version 3 (POP3) Simple Mail Transfer Protocol (SMTP) You can download ESP 2003 at. Exchange 2003 is a disk-intensive application. To function correctly, Exchange requires a fast, reliable disk subsystem. Jetstress (Jetstress.exe) is an Exchange tool that helps administrators verify the performance and stability of the disk subsystem prior to deploying Exchange servers in a production environment. For more information about Jetstress and Exchange back-end storage, see Planning a Reliable Back-End Storage Solution. You can download Jetstress at.
https://technet.microsoft.com/en-us/library/aa997234(v=exchg.65).aspx
CC-MAIN-2016-36
en
refinedweb
Here’s an interesting question I got the other day: We are writing code to translate old mainframe business report generation code written in a BASIC-like language to C#. The original language allows “goto” branching from outside of a loop to the interior of a loop, but C# only allows branching the other way, from the interior to the exterior. How can we branch to the inside of a loop in C#? I can think of a number of ways to do that. First, don’t do it. Write your translator so that it detects such situations and brings them to the attention of a human who can analyze the meaning of the code and figure out what was meant by the author of this bad programming practice. Branching into the interior of a loop is illegal in C# because doing so would skip all of the code that is necessary to ensure the correct behaviour of the loop. Odds are good that this pattern indicates a bug or at least some bad smelling code that should be looked at by an expert. Second, this pattern is not legal in C# or VB.NET, but perhaps it is legal in another useful modern language. You could write your translator to translate to some other language instead of C#. Third, if you want to do this automatically and you need to use C#, the trick is to change how you generate your loops. Remember, loops are nothing more than a more pleasant way to write a “goto”. Suppose your original code looks something like this pseudo-basic fragment: 10 J = 2 20 IF FOO THEN GOTO 50 30 FOR J = 1 TO 10 40 PRINT J 50 PRINT “—“ 60 NEXT 70 PRINT “DONE” The “obvious” way to translate this program fragment into C# doesn’t work: int J = 2; if (FOO) goto L50; for(J = 1 ; J <= 10; J = J + 1) { PRINT (J); L50: PRINT (“—“); } PRINT (“Done”); because there’s a branch into a block. But you can eliminate the block by recognizing that a “for” loop is just a sugar for “goto”. If you translate the loop as: int J = 2; if (FOO) goto L50; J = 1; L30: if (!(J <= 10)) goto L70; PRINT (j); L50: PRINT (“—“); J = J + 1; goto L30; L70: PRINT (“done”); and now, no problem. There’s no block to branch into, so there’s no problem with the goto. This code is hard to read so you probably want to detect the situation of branching into a loop and only do the “unsugared” loop when you need to. It is difficult to do a similar process that allows arbitrary branching in a world with try-finally and other advanced control flow structures, but hopefully you do not need to. Old mainframe languages seldom have complex control flow structures like “try-finally”. > Branching into the interior of a loop is illegal in C# because doing so would skip all of the code that is necessary to ensure the correct behaviour of the loop. Can you elaborate? Do you mean the loop condition for while-loops, and also the initializer for for-loops (in which case goto silently breaks the semantics of the loop – but this seemingly doesn’t apply to do-while), or some other code that the compiler generates undercover? It’s more general than loops. In C# it is illegal to branch into the middle of any block from outside the block. With loops, one wants to be able to reason about the invariants of a loop without having to understand how control could have entered the loop. More generally, one should be able to reason about the control flow within a given block solely by looking at that block. You should not have to look at the whole method to understand how a given block in it could be used. Another way to look at this is to think of the name of the label as being scoped to the block, just like the name of a local declared in the block is scoped to the block. Just as you cannot refer to a local by name outside of its scope, you cannot refer to a label by name outside of its scope. — Eric In a previous life, I had to do just such a beast and wound up doing exactly what you suggested. However I could do some static analysis and only write the IF/GOTO loop if there were a /targeted/ label inside of the original FOR loop. Otherwise, I’d write the more natural corresponding FOR loop. If I did have to write the IF/GOTO loop I would insert a comment block that indicated what it read originally (FOR) and where the reference to the inner label came from. This facilitated hand-massaging the code later into something more manageable. Thank goodness there were no COME FROM constructs! 🙂 You can’t do Duff’s Device in C#?! Jeez. Gotos are fun. I wrote a (lexer) state machine once with no loop. It just bounced around with gotos until it bounced into an endpoint. It’s weird, but good, that we’ve reached a point when gotos are an exotic construct that you never think about. Simple suggestion, unroll the part of the loop that is being jumped to, outside of the loop, and insert that part at the jump location … This could get a little complicated if the jump traverses many branches of code, but otherwise I think it could be an option … When you say this is legal in VB, you mean VB6, right – not VB.Net? Bizarre. The customer who asked me about this issue said that it worked in VB.Net, but I have just checked the documentation and clearly it does not. Thanks for noticing that. — Eric So how would you translate this into oh, FORTH, or Python, for example, neither of which has labels.. You need to figure out what the program REALLY needs to do and do it without spaghetti (even flying spaghetti monster) code. Personally if I was going to manually refactor that code then I’d ditch the GOTOs altogether and just do something like: IF (FOO) THEN PRINT "—" FOR J = 3 TO 10 PRINT J PRINT "—" ELSE FOR J = 1 TO 10 PRINT J PRINT "—" ENDIF PRINT "DONE" Sure it’s a lot more verbose, but I find it a lot easier to read than the translated block with the looping GOTOs in it. When people realize today’s if-else are also gotos, there’s gonna be rioting in the streets! 😉 Cleaner would be: INTEGER JBASE IF (FOO) THEN PRINT "—" JBASE = 3 ELSE JBASE = 1 END IF FOR J = JBASE TO 10 PRINT J PRINT "—" PRINT "DONE" Suppose you have something like this: int i = 0; if( j < 5 ) goto inside; for( ; i < 10 ; ++i ) { do_something( ); inside: do_more( ); } Then why can’t you translate it like this? int i = 0; if( j < 5 ) do_something( ); for( ++i ; i < 10 ; ++i ) { do_something( ); inside: do_more( ); } This is exactly what Pop Catalin suggested. It will vary on case by case basis, but it is easier to do and more easier to understand. @Malcolm Fitzsimmons: Agreed. I would probably pick between that style or my style depending on a few factors, such as how big the actual loop body was, how big the body of the FOO clause was and how often I expected FOO to be true. Read "Structured Programming with go to Statements". That goto breaks invariant reasoning techniques was established to be wrong. <Quote> Remember, loops are nothing more than a more pleasant way to write a "goto". </Quote> Your momma’s a "goto." On Error Goto Hell Hell: MsgBox "Before advanced control flow structures like try-finally, there were gotos." My favorite "goto loop" pattern: do { // you think that’s a loop? ha! … if (something) break; // look, no goto! … } while (false); // look, no label either! Yeah, I worked with a guy who really liked that one. Back in highschool, in my first programing class (Qbasic) our instructor forbade us from using goto’s… if your assignment had one goto in it…. he would trash it… THANK GOD! 8 years later MCAD certified, working for an awesome company… and i would have never gotten this far if I would have been allowed to think that goto was a good thing… Eliminating goto was supposed to be the panacea for spaghetti code, and yet it continues to plague what could otherwise be fabulous code… Curious… Guys, goto is not by itself a bad thing in any way. Its evilness is that it is very easy to misuse it, but by itself it is a useful tool in any imperative programming languages. Did you never have to break out of a nested loop? Or a switch nested inside a loop? And if you’re coding in C (not C++), goto is essentially the only robust way to do proper error handling, when you have to check for error (and potentially clean up) after every single function call. The extreme argument against goto ("Goto is always evil. Always!") is also the argument against break and return, and, to some extent, throw. If you are truly willing to go to these lengths, then you should go all the way, and claim that nothing less than the purity of Haskell is desirable. Which would at least be a consistent position, even though not a very pragmatic one. But, so long as you stick to an imperative language, some form of goto is necessary and desirable. By the way you can do a Duff’s device in c# static void DuffsDevice<T>(T[] from, T[] to) { int count = from.Length; int position = 0; switch (count % 8) { case 0: to[position] = from[position++]; goto case 7; case 7: to[position] = from[position++]; goto case 6; case 6: to[position] = from[position++]; goto case 5; case 5: to[position] = from[position++]; goto case 4; case 4: to[position] = from[position++]; goto case 3; case 3: to[position] = from[position++]; goto case 2; case 2: to[position] = from[position++]; goto case 1; case 1: to[position] = from[position++]; if ((count -= 8) > 0) goto case 0; else break; } @pminaev: An example of combined error-handling in C without using goto: bool got_error = FALSE; got_error = do_func_1(); got_error = got_error && do_func_2(); got_error = got_error && do_func_3(); got_error = got_error && do_func_4(); if (got_error) { // combined error handling } Oops, wrong logic (it’s early) but you get the idea. That’s assuming your functions return bool to indicate error – what about an int error code (note that in that case, && cannot be used, as it will coerce any non-0 "truth" value to 1)? In practice, most C code I’ve seen uses "if … goto error" and so on. Probably also because it’s far clearer than this trick, too. As I’ve said earlier, sometimes goto is the right way to solve the problem, and working around it only makes things more complicated, all for the sake of "not saying the dreaded word". We constantly use gotos in all forms except for jumping into a loop or back to the top of a function. This is our way of drastically reducing the nesting level of if then else/for loops/etc. This point is lost when must younger developers trust the framework to clean up their own objects/allocation and ignore the longer term support cost for a particular block of code. We’ve been burned with offshore written code that has 15+ levels of nesting in 500+ line functions because the developers refused to use gotos, returns and apparently got paid more for each line of code. Common code we’ve seen if (file open is ok) { 500+ lines of code } else { do some error handling } This would be nested inside of a loop or multiple levels down inside of an if/then else block. Another example would be multiple nested try/catch statements each to handle a resource allocation/connection failure instead the commonly used block: if allocate 1 fails goto cleanup_one if allocate 2 fails goto cleanup_two if allocate 3 fails goto cleanup_three body of function (or better a function call to the body to make it easier to see that the allocate and cleanup operations are done in the correct order) cleanup_three: do cleanup of object 3 cleanup_two: do cleanup of object 2 cleanup_one: do cleanup of object 1 return @pminaev: int error code can easily be handled in the same way by ANDing got_error with the result of comparing the function to the known good value e.g. if a negativereturn vale indicates error then: got_error = !got_error && (func1() < 0); If you dislike the "trick" with the logic short-circuiting then you can use a more explicit version: bool got_error = FALSE; got_error = do_func_1(); if (!got_error) got_error = do_func_2(); if (!got_error) got_error = (do_func_3() < 0); if (got_error) { // combined error handling } Either way, the only advantage to the goto approach is that it saves a couple of clock cycles. On most platforms, including most embedded system I’ve worked on, a few clock cycles in neglible. > Either way, the only advantage to the goto approach is that it saves a couple of clock cycles. You still miss my point. The advantage of the goto error handling approach is that it is usually more readable than any other workaround. Workarounds for the sake of them are not a good idea. I always used to think that the GOTO statement was a bad thing, and programming should only use loops and other "prettier" flow techniques. Over the last few weeks I was playing around writing an MSIL disassembler to look deeper into the code I write… and the first thing I noticed was that compiler translate loops into a seried of GOTO blocks. Typically a for loop would look something equivalent to: (Initialise looping variable) goto LABEL1; LABEL2: (Whatever instructions are inside the block) (Increment or decrement looping variable as required) LABEL1: if (Check for loop to be run) goto LABEL 2; So a trivial loop: for (int ix = 0; ix < 10; ix++) { do_something(); } do_loop_finished(); gets translated to: int ix = 0; goto LABEL1; LABEL2: do_something(); ix++; LABEL1: if (ix < 10) goto LABEL 2; do_loop_finished(); So I am now wondering why we are always told to you loops rather than gotos, when they are just converted back to gotos, thus adding an additional level of translation (and hence sub-optimal code)! I agree that gotos can be VERY evil… BUT, they are very useful. I had to write a parser for fiels that could reach up to 20 gigs. Their content was never known until they were read. I came up with a 400 line optimised function, each of the other programmers came up with 700+ line functions. They had similar flow patterns, except I used goto statements. <quote> Common code we’ve seen if (file open is ok) { 500+ lines of code } else { do some error handling } </quote> solution… if (!FileOpenIsOk) { error handling } function continues @pminaev: I agree that avoiding "goto" purely out of superstition is a bad idea. But I disagree that a goto version of that code is actually any more readable. @Russell Anscomb: Of course. And this is true of most languages. Loops are all just syntactic sugar for various Branch and Jump assembly instructions. Languages themselves are just abstractions of machine code. If you want absolute speed at all cost then why are you using a high-level language at all? You need to write directly in assembler (and you also need to be a genius to outperform most modern compilers). However the rest of us see the benefit of readable and maintainable high-level code over absolute performance. It’s probably also worth pointing out that in a modern language, like C#, most error handling will be done by exceptions – which in many ways offer all the same benefits as gotos in this scenario, with the added advantage of carrying information about why they were raised. Of course ALL flow control becomes "goto" (possibly conditional) at the machine level. Anyone who does not understand that, needs to just hang up their had. Much more dangerous than "goto" is the infamous "come from" instruction. When using this, you can cause an arbitrary transfer from any point in the code: 10 x = 1 20 y = 1 30 x = 2 40 Print x,y,z 5000 Come From 20 5001 y = 99 5002 GoBack (Sorry for posting this 14 days before it’s 35th original publication) So you cant jump to a goto label within a loop from outside the loop? I didnt know this. But whats that piece of code that Reflector happens to show when decompiling a yield return statemachine? private bool MoveNext() { try { switch (this.<>1__state) { case 0: this.<>1__state = -1; this.<>7__wrap4 = this.<>4__this.GetNodes().GetEnumerator(); this.<>1__state = 1; while (this.<>7__wrap4.MoveNext()) { this.<node>5__3 = this.<>7__wrap4.Current; this.<>4__this.m_alreadyReturnedNodes.Add(this.<node>5__3); this.<>2__current = this.<node>5__3; this.<>1__state = 2; return true; Label_008C: this.<>1__state = 1; } this.<>m__Finally5(); break; case 2: goto Label_008C; } return false; } fault { this.System.IDisposable.Dispose(); } } Is it just Reflector making up a while statement while the original il statements just are gotos? Regards Florian The discussion is moving a litle away from the first remark about automated migrated code. Yes excessive and wrong use of Goto is very bad. But looking manual at 10.000.000 lines to remove them is a huge task. Analyzing and refactoring code solves a number of them but still not all. The IL itself does allow it so why not the compiler. Let the programmer be the judge to use it or not. In vb.net indead the goto into a for is not allowed but a goto into an if is. And possible other code levels? Dim j As Integer j = 1 GoTo l50 ‘ <—- allowed If (1 = 1) Then j = 2 l50: j = 3 End If GoTo l60 ‘<———– not allowed For j = 1 To 5 l60: I’m suprised that people can be so ‘religious’ in their renouncing of gotos. I thought kind of singlemindedness was a Java guy’s thing. Yes, most of the time the higher level control flows are better, but there are exeptions. Take the example of a controlflow schema from Visio. When you want to implement that with functions, you have a problem because after the call ends, you end up where you called the function. That’s not what you want, you wanted to go to another Process or Decision. (note the use of the words ‘go’ and ‘to’ 😉 In those cases program with Gotos is much more readable than trying to do that with functions. Also, every function call is a push to the stack, they are not cheap. If you need really fast execution of your code, gotos can actually help you squeeze out that last bit of speed, although this can be at the expense of readabiliy, i’ll agree there. Regards Gert-Jan > The IL itself does allow it so why not the compiler. Let the programmer be the judge to use it or not. Because the compiler must enforce a semantic level of meaning on the code so that it can effectively generate IL code that does what you wrote in the higher level language. Consider the difference between for loops and if-else statements. There is quite a bit of difference in the amount of setup required to make each work. if-else: No setup required, beyond performing the test condition and branching to the else part. Since there’s no setup, it’s no problem to goto into either the if-body or else-body. for loop: At minimum, initializing the loop index and check that it meets the test condition. (foreach is even worse… find the appropriate enumerator, get that all setup, etc., etc…) With all this setup, how do you reasonably do a goto into the body of a for loop AND get provably correct code for EVERY case? Not too likely. (On the other hand, you can goto out of a for loop, because that amounts to little more than a break.) I meant flowchart from Visio to be precise. Nothing like stepping on a setjmp / longjump landmine. I’ve seen some pretty clever exception-like handling built around this construct using C/C++. It drove me nuts till I figured it out. Another developer had called setjmp from main, then whenever his deep library code encountered an error he’d call longjump. The longjump would set the instruction pointer back to the beginning of the program. What would people say at goto’s funeral? goto’s wife: "Oh my sweet goto, I can’t loop without you" goto’s kids: "we want our goto back" goto’s 3rd cousins’ brother in-laws’ 5th pets’ owner: "He was pure evil, evil I tell you!" I would suggest converting the code to MSIL, then decompiling the MSIL into C#. That way you get C# code, but it will still have loops where ever possible. This code 10 J = 2 20 IF FOO THEN GOTO 50 30 FOR J = 1 TO 10 40 PRINT J 50 PRINT "—" 60 NEXT 70 PRINT "DONE" can write on C# using new bool variable: j = 2; bool foo1 = foo; if (!foo) j = 1; for (; j <= 10; j ++) { if (!foo1) print (j); foo1 = false; print ("—"); } print ("DONE"); Any code do not repeates twice! You can use foo instead foo1, when this variable do not required in other code part. I don’t think anyone here fails to realize that all flow-of-control structures end up as GOTO’s at a machine level. The point is that the machine can manage the GOTO’s, but for humans its like reading a story, telling someone to jump two pages ahead, then jump three pages back. Yeah, you can do it, but geez, does that make it a good idea? Heavens – the computer can count to a zillion in binary, but that doesn’t mean its a good idea for human consumption. That aside, my personal beef isn’t with "goto’s" per se, but when they are being used in obviously lazy situations when just a few minutes’ effort would have created a more streamlined control flow structure. In *most* cases, a GOTO is a hack, an amputation of logic where a few stitches of design and discretion would have avoided an ugly and usually unnecessary scar. I’ve rarely seen a structure made *more* elegant with a blunt GOTO. But that’s just me… GOTO is all about sequence in the context of state. Code in this form is inimical to parallelisation. This is easy to automate with functional programming languages, where dependencies on evaluation sequence are necessarily explicit. It is damn near impossible to automate in procedural languages where many dependencies are not only implicit but often indirectly implicit (due to side effects). When a language requires explicit declaration of dependencies, laziness inhibits their spurious creation. Better quality code results, and it is incidentally more amenable to optimisation for multiple CPUs. As in life, time is the great enemy. I think people are confusing GOTO with branching. GOTO is a programming statement which allows unstructured branching. Other programming statements (if-then, for, while, throw) only allow branching within a particular context or programming structure. Unstructured branching allows you to write incomprehensible code *very* easily. For example (using pseudo-basic) 10 x = 110 20 if ( x is even ) goto 40 30 x = 3 * x + 1 40 x = x / 2 50 if ( x > 10 ) goto 20 60 print x I mean, never mind what x might be at the end, can we even be sure this will finish for different start values of x? (Please don’t get caught up on this being a mathematical example, BTW. Statements 20 to 50 could be totally non maths related – as long as they interfere with each other you are going to get a problem). It’s very easy with unstructured branching to start getting this sort of effect. Of course, you could use GOTO to duplicate structured branching (like duplicating a while loop), but why do it? It is far nicer when you come to look at your code to know there are *no* GOTOs in it rather than have to analyse whether each individual GOTO is sensible or not. As to the oft quoted example of error handling in a sequence of method calls, I believe this indicates bad design. First of all I think you need to carefully consider what *is* an error, then isolate your error handling in one group of methods or classes or whatever, so that the rest of your code isn’t burdened with constantly having to check whether things are happening ok. i.e., it is better to write: method_a() { method_a_1(); method_a_2(); etc } – than: method_a() { if ( method_a_1() == ok ) { if ( method_a_2() == ok ) { etc }}}}}}}}}}}}}}}. – or some equivalent using gotos. Where you simply are unable to pre-check for an error (like that nuclear refinery you were monitoring has just gone off-line), you should probably use an excepion and exit (gracefully) until somebody fixes the problem. Richard for(J = FOO ? 3 : 1; J <= 10; J++) PRINT (string.Format("{0}rn—",J)); PRINT ("Done"); What I was trying to say is that the code should be refactored properly. Using Goto is ugly and difficult to read. Simply check what the code is trying to achieve and find the best way to replicate that functionality. Which you will note was my first suggestion, yes. But what if you have five hundred thousand lines of goto-ridden mainframe code to translate? “Ugly and difficult to read” is better than “not working”, and cheaper and more accurate than “translate five hundred thousand lines of code by hand”. — Eric Just because the original code uses a Goto, that doesn’t mean our new code has to use any at all. We could similarly do this: int j = FOO ? 3 : 1; while (j<=10) PRINT (string.Format(“{0}rn—“,J++)); PRINT (“Done”); Using your human intelligence to create a goto-free program that matches the semantics of one particular code fragment is easy. Writing a program that does that to any arbitrary fragment is rather more difficult, I assure you. — Eric (with a lower case j in line 3, obviously) Your point about the difficulty in understanding convoluted code is well taken. In fact some of the coded solutions produced wrong results. In the case where FOO is true they fail to start and end the list with "—". Actually, your example and solution point out the fundamental translation problem and solution. Antique BASIC treated for a FOR loop index as a global variable and the loop condition was checked in the NEXT statement (Always on iteration was executed). The best way to handle the translation problem is to break the FOR loops into initialization, Value adjustment, and conditional jumps, much like you did ( I would check end conditions at the NEXT statement ). There are also wonderful dialect specific factors like what is the value of j after the loop? Is it 10 or 11? That would depend on the specific implementation and is unfortunately something that may matter for the code that followed. After all it was often possible to jump out of FOR loops before termination. if (StatusOK) { if (DataAvailable) { ImportantVariable = x; goto MID_LOOP; } } else { ImportantVariable = GetSomeValue(); MID_LOOP: //Lots of code } I’m disappointed that no-one has mentioned Steve McConnell yet. Eric: If you have 500,000 lines of working code which is riddled with GOTO statements, and you then replicate it on a line-by-line (or fragment-by-fragment if you prefer) basis, there’s no guarantee that it’s going to work in the target environment. There are other factors such as that pointed out by bmann: The value of J upon exit may be different, which means the code could fail catastrophically at its first run, or even at some later point when FOO eventually does equal True, and then you’d be left with the serious headache of having to debug it. If you untangled it properly, it would make that debugging much more simple and the code would be readable to anyone else who came to look at it. Aside from that, if it’s working, why would you move it to another language? bmann: Good point… but with our new refactored code we should be able to see exactly where the problem is and what the problem is at aa glance 🙂 Seriously, we have methods now…… If you need to jump to something inside a loop, then it should probably be in a separate method. With regard to Duff’s device (see comments from A.C.Hynes and Matthew Whited above) here is another C# version which is closer to the original. C# is surprisingly expressive at times: namespace DuffsDevice { using System; class Program { static void Main(string[] args) { unsafe { short[] data = new short[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; short register = -1; fixed (short* dataPtr = &data[0]) { DuffsDevice(®ister, dataPtr, data.Length); } Console.WriteLine(register); } } /// <summary> /// C# approximation to Duff’s device. /// ///); /// } /// } /// </summary> /// <param name="to"></param> /// <param name="from"></param> unsafe static void DuffsDevice(short* to, short* from, int count) { int n = (count + 7) / 8; switch (count % 8) { case 0: *to = *from++; goto case 7; case 7: *to = *from++; goto case 6; case 6: *to = *from++; goto case 5; case 5: *to = *from++; goto case 4; case 4: *to = *from++; goto case 3; case 3: *to = *from++; goto case 2; case 2: *to = *from++; goto case 1; case 1: *to = *from++; if (–n > 0) goto case 0; else break; } } } } re: Duff’s Device… Hand-rolled optimization in C#? You guys are funny. Turns out that a simple loop to iterate through a safe array can be a bit faster than my version of Duff’s Device in .NET. A loop to iterate through allocated stack space (using stackalloc) using an unsafe pointer is much faster. So, ‘Duff’s device’ in C# is sub-optimal. A case of hand-rolled de-optimization! Full marks to C# for being so expressive, but don’t use the technique! this is funny stuff. We are being guided to the old, frustrating, spider webs of looping with GOTOs. this shouldnt practically be an approach in professional development using C#. One time long ago I inherited a program written in C-tran. The author knew and thought in FORTRAN but had to code the app in C, and a veritable mess of code resulted that contained over 400 GO TO stetements. We stumbled along maintiaing it, never given the time to rewrite what was "working" but always allowed the time to analyze the mess of spaghetti for unintended consequences of the changes we were planning to make (and deal with the ones we did not foresee). We recruited a bright guy from the customer support team to come into the product development team and his soel condition for accepting the position was they he be allowed to rewrite that app. It was accepted and the final product after3 months was easier to understand, easier to maintain and easier to extend. GOTO is just a tool – but it is VERY dangerous in the hands of those who do not fear it. Bad code is bad code. One needs to understand what branching into a FOR statement in their compiler means. I have used languages where there is only the goto. I have also see bad FOR statements. 10 FOR i = 1 TO 10 20 PRINT i 30 NEXT i 40 LET i = i * 2 50 PRINT i What is the value of i? 20 or 22. This depends on the BASIC version. Of course we should not use i outside to loop. Reading most of this thread, I was amazed to discover how interesting it is to look at GOTO from 20 or 30 different points of view. Getting back to the question that started this thread: the reason she/he wants to convert the old BASIC code to C# is (presumably) so that it will use the .NET CLR and interoperate with other .NET code. The problem is a kind of "impedance mismatch" meaning that BASIC is so dumb, and C# is so smart, that conversion is impractical. What we need is a cruder version of C# (call it "C-dumb") that is closer to the BASIC code. Has anyone considered FORTRAN? Seriously, I once had to write a state machine once to handle Asterisk telephone events and it was a heck of a lot easier to write, read and modify using a few GOTOs versus keeping it "pure" with strange WHILEs. The argument that MSIL uses GOTO so we should use them too is suspect. Consider writing a specification for a steel screw. Yes, it is made of molecules but when you order a certain screw do you really want to describe how all the molecules relate to one another? It is the wrong level of abstraction. Maybe God Almighty will write the answer with fiery letters in the sky: "GOTO IS/IS NOT HARMFUL!" How much knowlege is available about how the original program works, or (more importantly) what it is supposed to be doing? A lot of old code can be reduced (in lines of codes) by 20 to 80%, purely on the basis that much of it was cut/pasted from other code that did the same thing on a different instance of data. This is why classes/objects/interfaces/etc came about to begin with. I agree it is painful to take in hand thousands of lines of code and re-design and re-write it, but it many cases it is well worth it, and would take a lot less time than one might think (there is a certain moment of inertia that begins to build once you get familiar with a coding style no matter how ugly it might seem). For the love of god!! Why would you do a direct translation of the code? Just use a loop and some if conditions in it to skip sections. DO NOT USE GOTO! Why? Well, suppose you have a million lines of code to translate. Your choices are (1) spend 10 hours writing a literal translator that generates ugly code, (2) spend 10 hours writing a literal translator and then 90 hours rewriting all the code that involves gotos, or (3) spend 10000 hours rewriting the whole system from scratch. The costs of those three choices are $1000, $10000 and $1000000, respectively. Suppose you have to pay for it. Which would you choose? How much are you willing to spend on beautifying code that already works just fine? — Eric
https://blogs.msdn.microsoft.com/ericlippert/2009/03/10/loops-are-gotos/
CC-MAIN-2016-36
en
refinedweb
On Sun, 2011-12-18 at 16:55 -0800, Eric W. Biederman wrote:> I expect by the time this makes it to "out of the box" experiences on> enterprise distros, useradd and friends will be giving out 1000 or so uids> to new accounts.Hmm...how would that work? Would it be something that would happen atPAM time, like a module that looks up some file in /etc and says "OKthis uid gets this range" and uploads that to the kernel? This whole idea of a normal uid getting *other* slave uids is cool butscary at the same time. So much infrastructure in what I think of as"General Purpose Linux"[1] is built up around a uid - resourcerestrictions and authentication for example.I guess as long as we're sure that all cases where a "uid" crosses auser namespace (say socket credentials) and appears as the right thing,it may be secure.> I think the user namespace will do what you need. Certainly it appears> that everything in your example binary will be allowed by the time it is> done.That's cool, I will keep an eye on what you guys are doing. Looks likethe containers list on linuxfoundation.org is the right one to follow?[1] The code that's shared between RHEL and Debian roughly between thekernel and GNOME, discarding the pointless "packaging" differences
https://lkml.org/lkml/2011/12/20/335
CC-MAIN-2016-36
en
refinedweb
public class InvalidMidiDataException extends Exception InvalidMidiDataExceptionindicates that inappropriate MIDI data was encountered. This often means that the data is invalid in and of itself, from the perspective of the MIDI specification. An example would be an undefined status byte. However, the exception might simply mean that the data was invalid in the context it was used, or that the object to which the data was given was unable to parse or use it. For example, a file reader might not be able to parse a Type 2 MIDI file, even though that format is defined in the MIDIMidiDataException() InvalidMidiDataExceptionwith nullfor its error detail message. public InvalidMidiDataException(String message) InvalidMidiDataExceptionwith the specified detail message. message- the string to display as an error.
http://docs.oracle.com/javase/8/docs/api/javax/sound/midi/InvalidMidiDataException.html
CC-MAIN-2016-36
en
refinedweb
/* * * */ /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. * * EventShmemLock.h - Shared memory area locks for use between the * WindowServer and the Event Driver. * * * HISTORY * 29 April 1992 Mike Paquette at NeXT * Created. * * Multiprocessor locks used within the shared memory area between the * kernel and event system. These must work in both user and kernel mode. * The locks are defined in an include file so they get exported to the local * include file area. * * This is basically a ripoff of the spin locks under the cthreads packages. */ #ifndef _IOKIT_IOSHAREDLOCKIMP_H #define _IOKIT_IOSHAREDLOCKIMP_H #include <architecture/i386/asm_help.h> #ifndef KERNEL #error this file for kernel only; comm page has user versions #endif TEXT /* * void * ev_unlock(p) * int *p; * * Unlock the lock pointed to by p. */ LEAF(_ev_unlock, 0) LEAF(_IOSpinUnlock, 0) #if __x86_64__ movl $0, (%rdi) #else movl 4(%esp), %ecx movl $0, (%ecx) #endif END(_ev_unlock) /* * int * ev_try_lock(p) * int *p; * * Try to lock p. Return zero if not successful. */ LEAF(_ev_try_lock, 0) LEAF(_IOTrySpinLock, 0) #if __x86_64__ xorl %eax, %eax orl $-1, %edx lock cmpxchgl %edx, (%rdi) setz %dl movzbl %dl, %eax #else movl 4(%esp), %ecx xorl %eax, %eax lock cmpxchgl %ecx, (%ecx) jne 1f movl $1, %eax /* yes */ ret 1: xorl %eax, %eax /* no */ #endif END(_ev_try_lock) #endif /* ! _IOKIT_IOSHAREDLOCKIMP_H */
http://opensource.apple.com//source/xnu/xnu-1456.1.26/iokit/IOKit/i386/IOSharedLockImp.h
CC-MAIN-2016-36
en
refinedweb
This article provides a drag and drop way of creating radio button GridView row selectors that behave in the same way as the GridView's own "Select" link buttons. GridView One thing that's always bothered me about the GridView control is the counter-intuitive appearance of the Select link provided to select a single row. Since pretty much every other time you ask your user to select one item in a list you do it with radio buttons, I couldn't help but feel it would have been more intuitive to make the Select button a radio button. As it happens, this was one of the first things I thought when I started learning ASP.NET two years ago. But now, it didn’t exactly prove trivial to implement. I found some articles telling me how to do it, but these involved a bit of wiring per control and, really, if you're going to apply radio button row selection across your entire site, it should be much simpler than that just from a maintainability point of view. Now that I've had more experience and studied for a few qualifications, I came up against the same issue again, and decided to solve it properly so I wouldn't have to worry about it anymore. I wanted a pure drag and drop control with no wiring, to replace the Select link, and this is what I came up with. Since it's a pretty simple piece of code all in all, you can see the control in all its glory below: [DefaultProperty("Text")] [ToolboxData("<{0}:GridViewRowSelector</{0}:GridViewRowSelector>")] public class GridViewRowSelector : RadioButton { protected override void Render(HtmlTextWriter writer) { GridViewRow row = (GridViewRow)this.NamingContainer; int currentIndex = row.RowIndex; GridView grid = (GridView)row.NamingContainer; this.Checked = (grid.SelectedIndex == currentIndex); this.Attributes.Add("onClick", "javascript:" + Page.ClientScript.GetPostBackEventReference(grid, "Select$" + currentIndex.ToString(), true)); base.Render(writer); } } Using the code is simple, just follow these steps: Then, just drag and drop the GridViewRowSelector from your toolbox into a template field on the GridView control. GridViewRowSelector To create the template field on the GridView, select the Common Functions menu for your GridView (the little arrow at the top right corner in Design view), select Add Column, and then add a TemplateColumn with no header text. To get the designer up that allows you to drag an element into the template field, select the Common Functions menu again for your GridView, then select “Edit Templates”. You should be able to select the ItemTemplate for your template column and drag the GridViewRowSelector into the appropriate box on the designer. Do not worry that it displays an error – this is simply because I haven’t yet added an appropriate control designer that deals with the design mode. I may do this later, but feel it’s not necessary since the control displays correctly at design time outside of template editing. If you set the GridView's SelectedRow Of course, you can’t just fire the same JavaScript command to impersonate a postback from the Select link as ASP.NET provides measures against this for security reasons (such as preventing XSS attacks), so you need to register the postback link. The simple bit was keeping radio button display in line with that of the selected row. The server control itself is just an extended radio button that updates its own Checked.
http://www.codeproject.com/Articles/22823/Simple-GridView-Radio-Button-Row-Selector
CC-MAIN-2016-36
en
refinedweb
Agenda See also: IRC log Date: 24 January 2008 <scribe> Meeting: 99 <scribe> Scribe: Norm <scribe> ScribeNick: Norm -> Accepted. -> Accepted. No regrets given <alexmilowski> Alex: Essentially, we want to get it right without describing a particular algorithm ... I took the text from the XML spec and tweaked it a bit ... The algorithm in the proposed Appendix G is based on Henry's proposal. Norm: I'm happy with the changes to section 5, I'll need to study the appendix more Alex: The appendix is non-normative, right? Norm: Yes. <ht> HST agrees Richard: About the retreival URIs, if you did it naively, you might think that you had to go and fetch the document every time to see if its retreival URI winds up being the same as one you've already got. ... But in practice, if its literal URI is the same, you can assume its actual URI is the same too. Alex: Do we have language elsewhere about consistency of resource? Richard: Even if it did change, there's no gaurantee that you'll see it. Norm: So we should say that in section 5 Richard: Either that, or some generral statement along the lines that Alex suggested Norm: I think a general statement is probably the way to go <MoZ> I think we cannot avoid caching neither Alex: Maybe we could do a special case for import. Shouldn't we say that however you get a URI, the declarations will be consistent. <scribe> ACTION: Alex to tweak the text of of p:import [recorded in] Norm: I thought we were clear on 95, but yes we should be <scribe> ACTION: Norm to check the clarity of the spec [recorded in] Norm: Static error 27. Richard: Namespaces don't appear in the attributes property in the infoset Alex: I think we should allow users to set xmlns: attributes. ... Namespace fixup will correct user errors. Richard: I don't think so. ... Namespaces aren't attributes as far as the infoset is concerned. Alex: I think p:add-attribute could add namespaces. Richard: Bad. Bad. Bad. Henry: Here's the question: can you use xsl:attribute to add a namespace decl? Norm: No. Henry: Right, then add-attribute shouldn't either. Alex: But you could still do it with a transform Henry: I think my analysis holds Norm: +1 Richard: The rule should be that you can't manipulate namespaces by manipulating namespace attributes Henry: The only circumstance you need it for is when you want to create a prefix for a QName that you're going to use in a value Alex: I think add-attribute needs a modification and set-attributes needs a clarification. <scribe> ACTION: Alex to consider the attribute steps and make appropriate changes [recorded in] Richard: In a sense this is already implicit in the infoset conformance section. Mohamed: I'm not sure I understand the path. The original question was do the namespace attributes get copied. The answer is 'no' Alex: Right. We're going to clarify that set-attributes doesn't copy them and clean up the other steps too. Norm: Yep Alex: Event/consequence ordering is determined by the connections. Norm: What I recall is that if you mandated document order, then you'd have to make forward reference an error. But the impl can fix the order, so why make theuser move teh steps around? ... It seems an unnecessary burden on the user. Henry: I still don't know what he means by "do things" Some discussion of what ordering actually means <MoZ> it is NOT a total order at all ! <MoZ> 1- parallele exection need this feature <MoZ> 2 - automatic generation would also need this Richard: I think there are straightforward cases where it's natural to write in the pipeline using forward references. ... Consider a straightforward pipeline with an XSLT step in the middle where the stylesheet is generated. It's natural to put the stylesheet generation at the end of the pipeline. ... Is it always possible to write pipelines without forward references? Norm: I think so. Richard: Another way to say this is that the XML syntax is just one representation of the pipelien. It could also be represented with a box-and-arrow diagram. Alex: We're all in agreement, right? ... Maybe a note? <scribe> ACTION: Henry to reply and close the issue [recorded in] Alex: We have comments that continue to straggle in. ... What is our plan? Norm: We're going to do another last call, as soon as that's ready we'll push it out ... Until then, I don't see any harm in looking at the comments that come in. Adjourned. rrsange, set logs world-visible This is scribe.perl Revision: 1.133 of Date: 2008/01/18 18:48:51 Check for newer version at Guessing input format: RRSAgent_Text_Format (score 1.00) Succeeded: s/setting/text of/ Succeeded: s/Pvie/p:vie/ Succeeded: s/sepc/spec/ Succeeded: s/the add/then add/ Found Scribe: Norm Inferring ScribeNick: Norm Found ScribeNick: Norm Default Present: +1.415.404.aaaa, Alessandro_Vernet, Norm, alexmilowski, ruilopes, richard, +95247aabb, Andrew, MoZ, Ht Present: Alex Alessandro Norm Rui Richard Andrew Mohamed Henry Regrets: Paul Agenda: Found Date: 24 Jan 2008 Guessing minutes URL: People with action items: alex henry norm[End of scribe.perl diagnostic output]
http://www.w3.org/2008/01/24-xproc-minutes.html
CC-MAIN-2016-36
en
refinedweb
Last edited 3/6/12. Code by Steven Lewis. Corresponding PI Brian Kuhlman [email protected]. The code is at rosetta/rosetta_source/src/apps/public/scenarios/FloppyTail/; there's an integration test+demo at rosetta/rosetta_source/test/integration/tests/FloppyTail/. Note that the integration test is vastly under-cycled relative to getting it to do anything useful: the number of cycles it demonstrates should be sufficient to show some remodeling but not enough to get anywhere useful. To run that demo, go to that directory and run [path to executeable] -database [path to database] (at-symbol)options You may want to look at the online supplemental info for that paper for a different presentation of how the code works. This paper uses FloppyTail but is not related to development. This code was written for a relatively singular application. The system in question was a protein with a long (dozens of residues) flexible tail, which was not seen in crystal structures. Biochemical evidence suggested a particular binding site for the tail on a known binding partner (the two binding partners also had a known binding interface separate from this tail). The code was intended to model the reach of the long flexible tail and determine whether the hypothesized binding site was plausible. The protocol is more useful for testing hypotheses about possible conformations, and exploring accessible conformation space, than for finding "the one true binding mode". If your tail is truly that flexible it might not have a "one true binding mode." The algorithm is fairly simple: small/shear/fragment moves in centroid mode to collapse the tail into some sort of folded conformation from an initially straight-out-into-space extended conformation, and small/shear moves with repacking to refine its position. This is conceptually similar to how abinitio folding works, although it is not refined for that purpose (and does not contain temperature scheduling, etc). The code is compatible with constraints during the centroid phase (passed in via commandline). Early modeling proceeded using constraints and some small hacks to help guide models to the hypothesized tail-binding site. Ultimately this was not necessary for the original system, but the code retains the ability to use constraints, etc. Your mileage may vary. UPDATE: The code is compatible with constraints in both phases. This code is NOT intended to do "half-abinitio" where you know half a structure and want to fold the other half. Although it is modeled on abinitio, it is only tested on a truly floppy tail, and I have no idea if it is able to fold compact structures. It is resolutely not supported for that purpose. See test/integration/tests/FloppyTail/ for example usage. Basically all you need is an input structure. This code was intended for a single purpose, but it may work if you have a similarly flexible tail. It can also model internal flexible regions between domains. FloppyTail supports three types of options: general rosetta options (packing, etc.), generic protocol options like "how many cycles" borrowed from the (unreleased) AnchoredDesign application, and FloppyTail specific options. FloppyTail options AnchoredDesign options (borrowed for simplicity, not tied to AnchoredDesign in any other way); all are in the AnchoredDesign namespace General options: All packing namespace options loaded by the PackerTask are respected. jd2 namespace options are respected. Anything very low-level, like the database paths, is respected. For release 3.4, FloppyTail supports multiple flexible linkers. To use these, you have to write your own MoveMap file to tell FloppyTail what is flexible, and pass it in via the flag in:file:movemap. The formatting is described in the header to the function core::kinematics::MoveMap::init_from_file (probably at core/kinematics/MoveMap.hh). Briefly, do this: 20 30 BBCHI 54 67 BBCHI to define flexible regions running from residues 20 to 30 and 54 to 67. This is in internal Rosetta residue numbering (from 1), not PDB numbering. To use this feature you must also NOT use the following flags, because the movemap handles these data, so the program is set up to ignore inputs from these flags if passing a movemap. You'll be using this application to model mostly unstructured regions. You should not put a lot of stock in any individual model. This is not the sort of application where you'll run it 10 times and then take the best-scoring result as an accurate guess for the actual protein structure. In general you should pick some metric predicted by the model (if you read the paper, you'll see that it was a distance between two residues later found to be chemically crosslinkable). You can then mine the model population to see what this metric looks like in the top-scoring fraction of models. The extra_analysis functionality will facilitate this. I suggest histograms. For 3.2, there was a major under-the-hood change which decreases runtime, scaling favorably for very long tails. For the publication case it decreases runtime 10-25%. For 3.3, the publication flag was added for simplicity. The C_root flag was added to speed computation on non-c-terminal tails. Constraints work in fullatom mode. Full support for domain assembly (internal linkers) was added. For 3.4, I added the ability to specify a custom MoveMap, which also allows for multiple rigid and flexible regions.
https://www.rosettacommons.org/manuals/archive/rosetta3.4_user_guide/d8/d39/_floppy_tail.html
CC-MAIN-2016-36
en
refinedweb
It is 6 AM. I am awake summarizing the sequence of events leading to my way-too-early wake up call. As those stories start, my phone alarm went off. Sleepy and grumpy me checked the phone to see whether I was really crazy enough to set the wake-up alarm at 5AM. No, it was our monitoring system indicating that one of. When you compile and launch the following Java code snippet on Linux (I used the latest stable Ubuntu version): package eu.plumbr.demo; public class OOM { public static void main(String[] args){ java.util.List l = new java.util.ArrayList(); for (int i = 10000; i < 100000; i++) { try { l.add(new int[100_000_000]); } catch (Throwable t) { t.printStackTrace(); } } } } then you will face. Interesting thing, thanks for sharing. Was the amount of memory allocated for this application (Xmx) higher than amount of memory actually available on this host minus some 500-1000m for the OS itself? Otherwise, I don’t get how the JVM wouldn’t crash with OOM itself when trying to allocate another array.
https://www.javacodegeeks.com/2014/06/out-of-memory-kill-process-or-sacrifice-child.html/comment-page-1/
CC-MAIN-2016-36
en
refinedweb
NAME bio - Basic I/O abstraction SYNOPSIS #include <openssl/bio.h>_*(); EXAMPLE Create a memory BIO: BIO *mem = BIO_new(BIO_s_mem()); SEE ALSO_mem, BIO_s_null, BIO_s_socket, BIO_set_callback, BIO_should_retry Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at.
https://www.openssl.org/docs/manmaster/crypto/bio.html
CC-MAIN-2016-36
en
refinedweb
Ticket #8976 (closed Bugs: fixed) interprocess::shared_ptr fails to compile if used with a scoped_allocator Description The following code will fail to compile using at least gcc 4.6.3 #include <memory> #include <boost/container/scoped_allocator.hpp> #include <boost/interprocess/smart_ptr/shared_ptr.hpp> namespace bip=boost::interprocess; int main(int argc, char* argv[]) { class MyDeleter { public: typedef std::allocator<void>::pointer pointer; void operator()(const pointer& ptr){}; }; typedef boost::container::scoped_allocator_adaptor< std::allocator<void> > Allocator; Allocator alloc; // next line will fail to compile due to a inaccessible base type error bip::shared_ptr<int,Allocator::outer_allocator_type,MyDeleter> test1(new int(),alloc); //using the outer_allocator will work fine bip::shared_ptr<int,Allocator::outer_allocator_type,MyDeleter> test2(new int(),alloc); }; Attachments Change History Changed 7 months ago by Markus Mathes <Markus.Mathes@…> - attachment interprocess_shared_ptr_scoped_alloc.patch added quick hack comment:2 Changed 7 months ago by Markus Mathes <Markus.Mathes@…> Another workaround ist to use: boost::interprocess:shared_ptr<int,container::outermost_allocator<Allocator>::type,MyDeleter> to remove the scoped allocator capabilities which anyway are not needed ... comment:3 Changed 7 months ago by igaztanaga Thanks for the report, the problem was in the "destroy" function, where a proper static_cast was needed. comment:4 Changed 7 months ago by igaztanaga - Status changed from new to closed - Resolution set to fixed Note: See TracTickets for help on using tickets. Typo while copying the code. The line to fail must read:
https://svn.boost.org/trac/boost/ticket/8976
CC-MAIN-2014-15
en
refinedweb
This weekend the most expected version of HMC was released for service providers to deploy it. With this version, service providers can offer OCS (IM, Collaboration, PC-toPC VoIP) services as part of their online services. At the same time support to Windows 2008 and WSS 3.0 SP1 is included in this solution. You can have access to the bits of the solution from the following location: Or for those who are interested in developing on top of MPS (i.e. self-service portal, namespaces, increase the business logic of the current APIs, etc.) there is a SDK available as well for developers to consume: The documentation to migrate from previous versions is still pending, but it will be released soon. If you have HMC 4.0, you shouldn't expect too much of impact in your APIs or portals already implemented. If what you have is HMC 3.5 or earlier, you should consider a similar migration path like to HMC 4.0 with the addition of migrating LCS to OCS 2007. Don't forget to consider these migrations paths while deploying the solution.
http://blogs.technet.com/b/alexmga/archive/2008/06/16/hmc-4-5-is-available-now-deploy-deploy-deploy.aspx
CC-MAIN-2014-15
en
refinedweb
...one of the most highly regarded and expertly designed C++ library projects in the world. — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards #include <boost/phoenix/bind/bind_function.hpp> Example, given a function foo: void foo(int n) { std::cout << n << std::endl; } Here's how the function foo may be bound: bind(&foo, arg1) This is now a full-fledged expression that can finally be evaluated by another function call invocation. A second function call will invoke the actual foo function. Example: bind(&foo, arg1)(4); will print out "4".
http://www.boost.org/doc/libs/1_55_0/libs/phoenix/doc/html/phoenix/modules/bind/binding_functions.html
CC-MAIN-2014-15
en
refinedweb
Hi all, A design question is with us tonight, I would like to have your opinion. Imagine a class Vector2,Vector3,Vector4, all of them has a global function to compute the dot product : VectorN VectorDot( const VectorN& A, const VectorN& B ); N is 2, 3 and 4. What is the best design, Make it global in the namespace or static for each class ? First option : Namespace::VectorDot( a, b ); Second option : Namespace::Vector2::Dot( a, b ); Same for math function (abs,clamp,sqrt...), global or static in a Math class ? I was a big user of global function and I have changed to static into a class recently, it's just a design question but it's nice to have differents opinion with experience of each.I have changed because the class can be seen like a scope. Thanks
http://www.gamedev.net/topic/639571-global-function-or-static-function/
CC-MAIN-2014-15
en
refinedweb
The visit framework is extensible via a plugin mechanism. Plugins objects can provide methods, which are called on every request. The plug-in mechanism can be useful for answering questions like ‘How long does a user browse my site?’, ‘What browsers do my users use?’, or ‘How effective is this page in generating a specific response?’. These questions might be difficult to answer using regular TurboGears controllers, but are greatly simplified using Visit. The tubogears.visit module has an enable_visit_plugin method that you can call to register an object with Visit. Your object only needs to implement one method, record_request. So, a very simple visit plugin could be implemented in as little as something like: simplevisit.py: import turbogears import logging log = logging.getLogger('myapp.simplevisit') class SimpleVisitPlugin(object): def record_request(self, visit): log.info("Visit key: %s" % visit.key) def add_simple_visit_plugin(): log.info("Registering the SimpleVisitPlugin") turbogears.visit.enable_visit_plugin(SimpleVisitPlugin()) turbogears.startup.call_on_startup.append(add_simple_visit_plugin) If you import this simplevisit.py module into your main controller.py, you should see information about the visit key show up in your log output. In the example above, record_request takes an argument visit. This visit object is not the same Visit as is in the default model.py, but rather a very simple object defined in turbogears.visit.api. It has only two properties: This object is also assigned to cherrypy.request.tg_visit, and so it can be accessed inside of any regular controller. Now that we have a start on what all the pieces are, we can flesh out a slightly more involved example. Say we have a requirement that we want to know what browsers our visitors are using. Ok, we could parse the log files right now for that information and get a pretty reasonable estimate. But, since we are talking about our Visit hammer, this problem is looking an awful lot like a nail. First let’s extend our model.Visit class just a bit by adding a browser column: class Visit(SQLObject): class sqlmeta: table = "visit" visit_key = StringCol(length=40, alternateID=True, alternateMethodName="by_visit_key") created = DateTimeCol(default=datetime.now) expiry = DateTimeCol() browser = StringCol(length=80, default=None) # new # rest of Visit continues ... Update your database with the new browser column. Next, add the following file to our project. browservisit.py: import turbogears import cherrypy import logging log = logging.getLogger('myapp.browservisit') from model import Visit class BrowserVisitPlugin(object): def record_request(self, visit): if visit.is_new: # fetch the the user-agent string the browser gave to cherrypy ua = cherrypy.request.headers.get('User-Agent', None) # The UserAgent class reduces the user-agent into a very coarse # list of types, Firefox, Safari, IE. # If you need more fine-grained information you will need to # write your own class to do it, or just comment the next line # out and store the raw user-agent string ua = turbogears.view.UserAgent(ua) # Find the appropriate model.Visit object mvisit = Visit.by_visit_key(visit.key) # store the browser in the database log.debug('Setting model.Visit.browser=%s' % ua.browser) mvisit.browser = ua.browser def add_browser_visit_plugin(): log.info("Registering the BrowserVisitPlugin") turbogears.visit.enable_visit_plugin(BrowserVisitPlugin()) turbogears.startup.call_on_startup.append(add_browser_visit_plugin) Import the browservisit.py module into controllers.py, and browser information should now be stored in each model.Visit object. Note above that we are using the is_new property to so that we only set the user agent information on the visitor’s first request. This check prevents a lot of redundant processing on the Visit object (fetching it and saving it back to the database), and should be incorporated any time you have an item that won’t change over the life of the visit. Another usage example would be adding the ability to track IP addresses for each new visit. Assuming you already have enabled visit tracking, here are the steps to create a visit plugin that does just that. Add the following in your app’s model.py: class VisitIP(SQLObject): class sqlmeta: # SQL object default naming is visitor_i_p, not pretty table = 'visit_ip' visit = ForeignKey('TG_Visit') ip_address = StringCol(length=20) Create the table in your database with tg-admin sql create --class=VisitIP. Make a new module in your project named visit_plugin.py. Its contents are as follows: import logging from turbogears import config, util, visit from model import VisitIP log = logging.getLogger('turbogears.visit') def ip_tracking_is_on(): """"Return True if IP tracking is properly enabled, False otherwise.""" return config.get('visit.on', False) and config.get('visit.ip_tracking.on', False) # Interface for the TurboGears extension def start_extension(): if not ip_tracking_is_on(): return log("Visit IP tracker starting.") # Register the plugin with the Visit Tracking framework visit.enable_visit_plugin(IPVisitPlugin()) def shutdown_extension(): if not ip_tracking_is_on(): return log("Visit IP tracker shutting down.") class IPVisitPlugin(object): def __init__(self): log("IPVisitPlugin extension loaded.") visit_class_path = config.get("visit.saprovider.model", "turbogears.visit.savisit.TG_Visit") self.visit_class = util.load_class(visit_class_path) def record_request(self, visit): # This method gets called on every single visit # we only want to record the IP if this is a new visitor if visit.is_new: # retrieve the actual Visit object v = self.visit_class.lookup_visit(visit.key) # add a new visit ip object to the database VisitIP(visit=v, ip_address=cherrypy.request.remoteAddr) # if you are using a SQLAlchemy model you might want to add # session.flush() def new_visit(self, visit_id): # This method gets called the first time the visit is started. # I think IP tracking makes sense in here. The start_extension and shutdown_extension functions are called by turbogears when starting up and shutting down. The key in this process is the visit.enable_visit_plugin call, which registers your plugin with the visit framework. In your project’s setup.py, add an entry_points parameter to the setup() function: setup( # [...] lots of stuff snipped test_suite = 'nose.collector', # begin new entry_points=""" [turbogears.extensions] my_visit_extension = ip_plugin.visit_plugin """, # end new ) My project’s package name is ip_plugin, you will need to adapt this to your project so that the entry point references the right module in your project. Add a configuration setting so that the tracking can be turned on and off. Somewhere in your app’s deployment configuration file add the line visit.ip_tracking.on = True This step just re-generates the egg information for your project so that the extension actually gets called at runtime. From the command line, at the root level of your project run python setup.py egg_info That’s it. Fire up your project and you should be tracking ip activity just like the NSA. It is also be possible to register the plugin simply by adding a call of visit.enable_visit_plugin() to the turbogears.startup.call_on_startup list somewhere in your app’s controller code as in example 1 above, but the solution in this example allows to keep your visit plugin in a completely separate package and enable it in your application’s setup.py without touching the code of your application (provided its Visit model is compatible). Suppose that we have a website where we are selling a service (e.g. something like Vonage or Netflix). We have a bunch of pages giving information about our service, and a sign-up process where people buy the service. What we want to know is “How many people visiting our site actually buy our service?” In other words, how effective is our website in converting visitors to clients? Fortunately, this is something that is relatively easy to to accomplish using Visit. First, let’s create a special model class for this specific project. model.py: class VisitSaleMonitor(SQLObject): visit_key = StringCol(length=40, alternateID=True, alternateMethodName="by_visit_key") pitch_time = DateTimeCol(default=None) sale_time = DateTimeCol(default=None) Nothing too spectacular is going on there; we are just creating a place-holder to store when the visitor hit the areas of the site we are interested in. Go ahead and add the new table to your database: tg-admin sql create --class=VisitSaleMonitor Now, we are going to build our Visit plug-in. There really isn’t too much to this, just some simple logic to log what our visitors do. Assume that our ‘pitch’ begins with the main page (i.e. /index or /) and the sales process ends with the /sale_complete controller. salemonitor.py: import logging from datetime import datetime import turbogears from cherrypy import request from turbogears import identity from sqlobject import SQLObjectNotFound from model import VisitSaleMonitor log = logging.getLogger('myapp.salemonitor') class SaleVisitPlugin(object): def record_request(self, visit): path = request.object_path # ignore requests for things in /static if path.startswith('/static/'): return # If we wanted to ignore registered users from our analysis, # we might do something like the following: # if not identity.current.anonymous: # try: # # find the User's record and delete it # idvisit = VisitSaleMonitor.by_visit_key(visit.key) # except SQLObjectNotFound: # pass # else: # idvisit.destroySelf() # return try: # see if the salemonitor obj has already been created salevisit = VisitSaleMonitor.by_visit_key(visit.key) except SQLObjectNotFound: # not found, so this must be the first visit salevisit = VisitSaleMonitor(visit_key=visit.key) if path in ('/', '/index') and not salevisit.pitch_time: salevisit.pitch_time=datetime.now() elif path=='/sale_complete' and not salevisit.sale_time: salevisit.sale_time=datetime.now() def add_sale_visit_plugin(): log.info('Starting SaleVisitPlugin') turbogears.visit.enable_visit_plugin(SaleVisitPlugin()) turbogears.startup.call_on_startup.append(add_sale_visit_plugin) And that’s it. Import salemonitor into your controllers.py, and you should be logging exactly when and what a visitor is doing. You now have information in your database that can be extracted via SQLObject queries or normal SQL. It isn’t hard to see how one might extend this simple example to do more complex click tracking and analysis. For instance, it could easily be extended to track how many visitors start entering their billing information, and then back out. For general information on how to use the visit framework see Using the Visit Framework. If you want to log more information about logged-in users, like e.g. the user name or permissions, have a look at the Identity documentation. If you want to store visit object in a different storage backend, customize how visit objeccts are created and updated or perform any house-keeping tasks while the visit framework is running, you need to implement your own visit manager. TurboGears comes with two standard visit managers, one with a SQLObject backend and another for SQLAlchemy. Which one is used is determined by the configuration setting visit.manager, whose value is normally sqlobject or sqlalchemy. When you want to use a custom visit manager, you have to register it as a plugin for the turbogears.visit.manager entry-point via the setup.py file of the package which includes the visit manager class. For example, if your custom visit manager class is MyVisitManager in the module mypackage.myvisit, you would add the following to the setup call: setup( # [...] entry_points=""" [turbogears.visit.manager] my_visit_mamager = mypkg.myvisit:MyVisitManager """, # end new ) You can then use my_visit_manager as the value for the visit.manager configuration setting. Since TurboGears 1.1 it is also possible to specify the visit manager class directly with visit.manager using a fully-qualified dotted-path notation, for example: visit.manager = 'mypkg.myvisit.MyVisitManager' The visit manager is responsible for keping track of visits, creating new ones, updating existing ones and handle the communication with the storage backend. Custom visit managers should be sub.classed from one of the standard visit managers (turbogears.visit.sovisit.SqlObjectVisitManager or turbogears.visit.savisit.SqlAlchemyVisitManager) or the abstract base class in turbogears.api.BaseVisitManager. The must provide the following methods: Should return an existing Visit object for this key. Should return None if the visit doesn’t exist or has expired. Since the visit manager runs i its own thread, care should be taken that updates to the storage backend are always made as atomic transactions.
http://www.turbogears.org/1.0/docs/Visit/Extending.html
CC-MAIN-2014-15
en
refinedweb
> When I try to implement this in a function I get something like: > > def mklist(num): > return map(lambda x:[] * num, range(num)) > > and mklist(4) yields [[], [], [], [], [], []] > > This works in 'Python interactive'. In a normal Python window I get a NameError. This is bound to be in an FAQ somewhere: the lambda has its own namespace, i.e. within the lambda body you can see (1) names within that body and (2) global names. So, you can't see the names in the intermedeate function. The workaround is to abuse the parameter mechanism: def mklist(num): return map(lambda x, num=num: []*num, range(num)) -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ [email protected] | ++++ if you agree copy these lines to your sig ++++ | see
https://mail.python.org/pipermail/pythonmac-sig/2000-February/001778.html
CC-MAIN-2014-15
en
refinedweb
THE SQL Server Blog Spot on the Web I have been stung by this scenario a few times, using SQL Server's typical sliding window to remove old backup files: If you want to have a point-in-time set of backups in near-line storage, this will not do, as you have an old Full backup, then a gap, then some transaction log backups that you can't restore. In the past, I've created various workarounds for this, but they usually involved some process external to SQL Server, and an extra script or executable, and perhaps even xp_cmdshell from SQL Agent. Kluges at best. Enter SQL Server 2005 and CLR. CLR integration, for all the controversy surrounding it, seems ideal to me for this type of thing - I need a utilitarian process that can interact with the OS, but that is safer than the shell and can be code-signed and so on. The .NET framework is a perfect fit. Before I delve into the details, I want to note some additional requirements: I've always worked in shops with a third-party backup compression tool such as Litespeed or Red Gate SQL Backup, so it's important that the solution work no matter how the backups get onto the disk. Second, I need to be able to disable (perhaps "leave disabled" is more accurate) xp_cmdshell in the configuration of SQL Server for security purposes. Finally, the solution should work from "inside" familiar SQL Server tools, like SQL Agent, so other DBAs don't face some cryptic solution that isn't simple and easy to find and understand. What I am after is a method that can more selectively delete the old backup files from disk, but take into account the dependencies between them, so that if there are full backups and differentials and log backups, I will always preserve a working sequence of files. I settled on a CLR stored procedure that can examine the backup files in a directory, and sort out this dependency before removing old files. A simple outline for this procedure looks something like this: In C#, with classes like FileInfo from the .NET Framework, this is quite simple to put together. I elected to use the file names to identify which files depend on which others, mainly because of the first requirement above that the procedure work on any type of native or third-part backup files. This does introduce requirements for naming conventions that might be avoidable if we could reliably read the data in the files themselves (i.e. if these were all SQL Server native files), but the conventions can be simple, and I customarily name files this way in any case. The names have to follow this pattern: <database name> <anything you like>_<chronological datetime>.<extension> <database name> <anything you like>_<chronological datetime>.<extension> For example: mydatabase_FullBackup_20090101.bak or mydatabase_2009-01-21.bak or myDatabase_arbitraryDescription_20090101023015.foo mydatabase_FullBackup_20090101.bak or mydatabase_2009-01-21.bak myDatabase_arbitraryDescription_20090101023015.foo The only important features are that the file names begin with the database name, end with an underscore (_) followed by a string representing a datetime that sorts in dictionary order, and that the extensions are unique for backup, log backup, and differential backup. Each set of files, per database, should be in its own folder to prevent the possibility of file names colliding. The solution is a fairly short C# function. I began by firing up Visual Studio 2005 and creating a solution with the C# SQL Server Project type. Within the new project I added a new Stored Procedure item, and that provided a template for a new CLR stored procedure, with the appropriate references and basic structure. Within the Stored Procedure template, I created code following the basic outline above. First I set up arguments for the function to receive when the user calls the stored procedure, including the database name, folder to search, how many backups to keep, what the file naming convention is, and so on. The trick to the method signature is that the arguments have to be of .NET types that match the SQL Server data types a Stored Proc will provide. B.O.L. has a very useful chart of what SQL Server types (varchar(), for example) map to what C# types (SqlString). Otherwise, the statement to create a C# function and the T-SQL statement to create a procedure are very similar: [Microsoft.SqlServer.Server.SqlProcedure] public static int DeleteAgedBackupFiles(SqlString databaseName, SqlString directory, SqlInt32 fullBackupsToRetain, SqlString fullBackupExt, SqlString trnBackupExt, SqlString diffBackupExt, SqlBoolean archivedFilesOnly) { } Next, DirectoryInfo and FileInfo provide ready-to-use functionality to interrogate files and folders, so I leveraged those to get lists of the files in the folder indicated, for the database indicated, and put the file lists into standard .NET Arrays: DirectoryInfo folder = new DirectoryInfo(directory.Value); FileInfo[] bakFiles; FileInfo[] diffFiles; FileInfo[] trnFiles; String bakPattern = databaseName.Value + "*." + fullBackupExt.Value; String trnPattern = databaseName.Value + "*." + trnBackupExt.Value; String diffPattern = databaseName.Value + "*." + diffBackupExt.Value; try { bakFiles = folder.GetFiles(bakPattern); trnFiles = folder.GetFiles(trnPattern); diffFiles = folder.GetFiles(diffPattern); } Having lists of the files in arrays makes it pretty simple to run through them and perform the needed work, with for() or foreach() loops. But one tricky bit first: if the arrays were ordered, it would save a lot of extra effort comparing file names. Like most things .NET, basic tasks practically always have a provided object or method, and so, unsurprisingly, Array has a built-in Sort. No need to reinvent that wheel. The only issue that is perhaps less than intuitive is that the sort function has to be told how to order the objects in the array, using a "helper" in the form of a Comparer. A comparer is just a way for the sort function to compare two objects and determine which is first and which is second in the order you intend. Making a comparer takes just a few lines of code. In this case we want the files in standard dictionary order. That means that if the file names are sorted with a standard string sort, we have what we need. A simple version of that comparer is: public class CompareFileNames : IComparer { public int Compare(object x, object y) { return ((FileInfo)x).Name.CompareTo(((FileInfo)y).Name); } } In plain English, this function says, given two FileInfo objects, fetch out the file names and compare them as strings. The order of the strings is the order we want. Having this class included in the code allows us to sort an array of file objects with one line: Array.Sort(bakFiles, new CompareFileNames()); Once the Arrays are ordered, I can do something like this to remove the oldest files: // Delete every full backup file older than the file that satisfies the // FullBackupsToRetain argument, taking into account the Archive attribute: if (bakFiles.Length > 0) { for (int i = 0; i <= bakFiles.GetUpperBound(0) - fullBackupsToRetain; i++) { if (archivedFilesOnly == false || bakFiles[i].Attributes != FileAttributes.Archive) { bakFiles[i].Delete(); } } } Similar loops can process the arrays of differential and log backup files, selectively deleting the appropriate files. That is the basic idea driving the whole stored procedure. I won't go into every detail here, but instead offer the entire function in the code listing at the end of this post. Once the procedure is written, the next step is to deploy it. This is where things perhaps get less familiar for the typical DBA, but I found this fairly simple once I did some reading. If .NET CLR code called from SQL Server is going to operate outside the SQL Server itself - for example, deleting files from the file system - it's important that the code be secure. For that reason, the SQL Server team created some special security categories for CLR procedures, and rules around those. In simplified terms, you have to do these things: The first time through I found this a little bumpy, but it's not too bad once you've done it once or twice, and each tool (Visual Studio and T-SQL) has methods that simplify the process. I won't repeat all the detailed instructions here, because others have, and it's in B.O.L. Here is a simple reference I found helpful, by Jonathan Kehayias: I agree with his advice that signing the code is better and more secure than the "Trustworthy" option within SQL Server. Plus, it's really not any more work. That's all there is to it. Extending SQL Server to do essentially anything that .NET libraries can do is quite straightforward, and might be a safer alternative to those xp_cmdshell-based jobs lurking around on your servers. [Shout out to my colleague Toby for code review and C# tips] If you would like to receive an email when updates are made to this post, please register here RSS What is the login for? It can not be the job owner, can not be used "with execute as"? The login enables code-signing the .NET assembly. It's basically so that SQL Server can validate the assembly with a key before executing it. If there were no key like the one managed by that login, some malicious code or person could potentially alter the assembly, sneak the new version in and the server might execute it. I haven’t posted for a while, but I hope that today I’ve got something really interesting to share. Even
http://sqlblog.com/blogs/merrill_aldrich/archive/2009/07/21/hole-in-your-backup-sequence.aspx
CC-MAIN-2014-15
en
refinedweb
On Mon, Aug 20, 2007 at 11:22:17AM -0400, David Roundy wrote: > On Sat, Aug 18, 2007 at 03:50:48PM +0200, Andrea Rossato wrote: > > The present behavior is incompatible with Tabbed (it forces a redraw > > of tabs every time the pointer enters a window). Moreover I don't like > > very much the fact that a keyboard driven WM gives such a power to the > > mice. > > Actually, the present behavior works as it is supposed to with Tabbed: > when focus changes, we *need* to redraw the tabs, so they will properly > reflect the focus. Sorry, I didn't mean this: what I meant is that mouse focus forces tabs to be redrawn whenever the pointer enters the focused windows coming from tabs (you've just sent a patch to correct that if I read correctly). > I like the idea of xmonad as a user-driven WM... I was just kidding when talking about mice's power...;-) If your patch will make mouse focus a bit less noticeable, I can live with it. > > I need it for my remote controlling stuff. But I'm not the only one. > > I think I can see this: you want to insert hooks that are not part of a > Layout? That's it. > > >. I'm quite aware that I seem not to get something about layout modifiers. I thought that adding a hook was just like: layoutModifier :: Layout a -> Layout a layoutModifier cl@(Layout {doLayout = dl , modifyLayout = ml}) = Layout {doLayout = dl , modifyLayout = modLay} where modLay sm | Just e <- fromMessage sm = do handle_event e ml sm | otherwise = ml sm handle_event e@(AnyEvent {ev_event_type = t}) | t == whatEverEvent = do io (putStrLn "Hello World") >> return () -- but focus w ??? handle_event _ = return () But if I change "putStrLn Hello..." with focus w, that is to say, if I change the stack of windows what should I do next? runlayout (with the need of recalculating the screen rectangle), for instance? This is not clear to me and I seem not to be able to get it only by studying the code (your code actually). Self-modifying layouts and layout transformers is precisely what I want to understand. Can you give me some directions, please? Thanks for your kind attention, Andrea
http://www.haskell.org/pipermail/xmonad/2007-August/001848.html
CC-MAIN-2014-15
en
refinedweb
- Code: Select all import android droid = android.Android() message = raw_input("search:") droid.webViewShow("",message) Is it any where near being right? Also if anyone could point me to a good tutorial for making apps with python 2.x would be much appreciate as that is what i would like to learn to do(iv tried searching but all i get is pygame tutorials i want to do apps and be able to do in on my android) kivy maybe, i dont know what it is but iv heard its something to do with apps. So basically is that code anywhere near being right? Is kivy a different language if not a tutorial on using it? I think thats it. Thanks anyone who answers
http://www.python-forum.org/viewtopic.php?p=4131
CC-MAIN-2014-15
en
refinedweb
Details Issue Links Activity Same issue in ipc.py Not sure about the performance impact of this patch, but it should do the trick. Bruce: if we don't import the module hashlib, then the hashlib name is undefined. If you subsequently say if hashlib, you're going to throw a NameError Lame error on my part then ... Your fix for that part looks good. Found another fun one: we use finally in test_protocol.py and test_schema.py Not important, but wouldn't {{ try: from hashlib import md5 except ImportError: from md5 import md5 }} be simpler and preferable? or "as compute_md5" if you're stuck on that. Michael: I'll check it out. The code currently calls hashlib.md5() or md5.new(), so your idea would not work as it currently stands, as the latter appears to use a factory. md5.new and md5.md5 are the same thing. Yep, that's what I wanted to confirm once I got in front of a computer. Your way is certainly cleaner, so I'll update the patch. I've addressed most of the issues (thanks for the comments!) but I'm stuck on how to modify our use of the uuid module, which appeared in Python 2.5. I've asked on Quora about the best way to generate RFC 4122-compliant UUIDs in Python 2.4:'s-the-best-way-to-generate-RFC-4122-compliant-UUIDs-in-Python-2.4. If you happen to know the answer, please let me know! Okay, added uuid_24.py by taking the source from. I need to figure out the right way to license it, but I'd love it if someone else could take this patch for a spin on a Python 2.4 installation and see if it works for them. The uuid code is under the PSF license: This requires that we include a copyright statement and a copy of the license in our distributions. HTTPD provides a good model. Look at the end of: So, in our LICENSE.txt file, we should add sections at the end for sub-components whose licenses differ, providing the relative path for each such subcomponent followed by its copyright and licence. We already have one such appended license, but it should probably be amended to provide the path, and we should add an introductory paragraph for all sub-component licenses. In short, we should model the structure of HTTPD's LICENSE. CentOS 5 is still shipping it, so we should make it work. Current issue is our use of struct.Struct objects in io.py.
https://issues.apache.org/jira/browse/AVRO-588?focusedCommentId=12884992&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
CC-MAIN-2014-15
en
refinedweb
Paul Rubin <> wrote... > The very existence of a "multitude" of Python web environments is a > serious shortcoming of Python as a PHP replacement. PHP comes with > one web environment, not a multitude, so you have just one manual to > read, not a multitude; one codebase to worry about keeping up with the > latest releases for, not a multitude, and so forth. PHP is largely a very flexible templating system with support for complex expressions and a huge catalogue of predefined procedures available in a flat namespace. The manual exists for the above functionality, and makes the assumption that you invent your 'web environment' ad hoc. Indeed the situation with the multitude of Python web CMSes and frameworks could improve, but I don't think you face half the difficulty in picking a specific Python one over a specific PHP one. Again, PHP CMSes tend to advertise their flashy featuresets and latest 'mods', whereas Python CMSes tend to list more practical goals. Take an example, the Google descriptions for Plone and PostNuke: Description: The Postnuke Content Management System offers full CSS support and HTML 4.01 transitional compliance... Description: Content Management Framework (CMF) that runs on top of Zope. Can be used as an intranet server, a... For someone vaguely familiar with Python, and aware of Zope's excellent reputation, which is the more obvious and affirming choice of these two? > That's ok, Python has no default support at all, intuitive or > otherwise, for ANY db operations, common or not. > > We could bring the PHP ADODB, or many of the other numerous PHP APIs > > for DB connectivity into the picture, but which of these are the > > obvious choice, and officially endorsed? > > That's precisely the situation Python is in now! "Obvious", being my favourite word for the month, could maybe have been put to good use previously. A quick search of Python.org will bring you up the DB-API docs, which is precisely what happened the first time I went searching for information about Python and databases. The same cannot be said for PHP, where you'll either get a tutorial for how to use the raw MySQL/Psql/Oracle API functions exported by the PHP engine, or you'll get faced with a choice between a plethora of DB 'middlewares'. > The site that I worked on spent TWO MILLION U.S. DOLLARS on its web > server hardware. Was this sometime between 1999-2000? ;) David.
https://mail.python.org/pipermail/python-list/2004-March/264624.html
CC-MAIN-2014-15
en
refinedweb
tag:code.tutsplus.com,2005:/categories/web-development 2014-04-14T15:00:13Z tag:code.tutsplus.com,2005:PostPresenter/cms-20465 How to Use New Relic With PHP & WordPress <p>We've previously covered how to <a target="_self" href="">set up New Relic for a Rails app</a>, as well as spent a lot of time looking at <a target="_blank" rel="external" href="">how to use the New Relic UI</a>. And while the UI is very similar regardless of the language and framework you're using, actually getting <a target="_blank" rel="external" href="">New Relic</a> set up can be radically different. Today, we will look at how to monitor a PHP application using New Relic. More specifically, we will set up a basic <a target="_blank" rel="external" href="">WordPress</a> installation and get some performance data about it, in the New Relic dashboards.<br></p><p>Getting New Relic set up for Ruby is very much environment agnostic. We simply add the agent gem to our application at which point no matter how we deploy our app (<a target="_blank" rel="external" href="">Passenger</a> + <a target="_blank" rel="external" href="">Apache</a>, <a target="_blank" rel="external" href="">Thin</a> + <a target="_blank" rel="external" href="">Nginx</a>. <br></p><p>Let's set up a sandbox for us to play with (using an <a target="_blank" rel="external" href="">EC2 instance</a>) and get a basic WordPress install up and running.<br></p><h2>Setting Up Our Sandbox<br></h2><p>We won't go into too much detail here as most of the things we need to do are well-documented elsewhere. But, here is a basic outline.<br></p><p>We need to launch an EC2 instance with <a target="_blank" rel="external" href="">Ubuntu Server 12.04 LTS</a> on it. If you don't want to set up an EC2 instance, you can just create a virtual machine instead using <a target="_blank" rel="external" href="">VirtualBox</a> (or your VM tool of choice). If you're setting up an EC2 instance, you need to remember to do the following:<br></p><ul><li>download your key (if you've created a new one during the set up process), so that you can SSH into your instance</li><li>add an extra rule to any security group you give to your instance to allow HTTP connections to the instance (so that we can actually access our WordPress blog via the browser later on)</li></ul><figure class="post_image"><img src="" alt=""></figure><p>Aside from that, everything else should be pretty straight forward and you should end up with a running instance (or virtual machine) that's ready for the next step.<br></p><p>We now need to install Apache, PHP and <a target="_blank" rel="external" href="">MySQL</a>. With Ubuntu Server, it should be a simple matter of running the following commands:</p><pre class="brush: bash">sudo apt-get install tasksel sudo tasksel install lamp-server</pre><p. </p><p>First check that Apache is installed:</p><pre class="brush: bash") ...</pre><p>Secondly, check that we have PHP:</p><pre class="brush: bash" ...</pre><p>And then check that we have MySQL:</p><pre class="brush: bash">ubuntu@ip-10-145-246-196:~$ mysql --version mysql Ver 14.14 Distrib 5.5.35, for debian-linux-gnu (x86_64) using readline 6.2</pre><p>We may also need to check that PHP is actually enabled in our Apache config, but since we installed <code class="inline">lamp-server</code> using <code class="inline">tasksel</code> we can be pretty sure that it is (and we can always do a quick <code class="inline">phpinfo()</code> script if we really want to check).</p><p>We can now install WordPress. Before we actually download it, we need to set up a database for it so. We can just follow the <a target="_blank" rel="external" href="">instructions from the Codex</a>:</p><pre class="brush: bash"</pre><p>I am going to call our new installation <code class="inline">myblog1</code> (so the database for it is also named <code class="inline">myblog1</code>). We now need to run the following commands to get our blog running (don't forget to <code class="inline">sudo</code> when necessary):</p><pre class="brush: bash">cd /var/www wget tar -xzvf latest.tar.gz mv wordpress myblog1 cd myblog1 mv wp-config-sample.php wp-config.php</pre><p>Now fill in your database name, username and password into the config file (the hostname is <code class="inline">localhost</code> which is there by default). At this point you should be able to go to your browser, hit the right URL (in my case <a href=""><code class="inline"></code></a>) and WordPress will do its thing (it might not hurt to restart Apache before doing this <code class="inline">sudo apache2 service restart</code>).</p><p>Our sandbox is now complete and we can get started with installing New Relic.<br></p><h2>Installing New Relic<br></h2><p>As I mentioned previously, the PHP New Relic agent resides on the box, it therefore makes sense that you can install it using the operating system's package manager (<code class="inline">apt-get</code> since we're using Ubuntu). The first thing to do is to import the New Relic repository key:</p><pre class="brush: bash">wget -O - | sudo apt-key add -</pre><p>Now we add the New Relic repository itself to the system: </p><pre class="brush: bash">sudo sh -c 'echo "deb newrelic non-free" > /etc/apt/sources.list.d/newrelic.list'</pre><p>At this point, we can use standard <code class="inline">apt</code> commands to install the agent:</p><pre class="brush: bash">sudo apt-get update sudo apt-get install newrelic-php5</pre><p>This fetches the PHP agent package from the repository and puts the agent install script on the system. The script is called <code class="inline">newrelic-install</code> and it lives in <code class="inline">/usr/bin</code>, so you should be able to run in from anywhere. The script is also somewhat unfortunately named, as you can use it to both install and uninstall New Relic from your system. In order to install New Relic, we need to run:</p><pre class="brush: bash">newrelic-install install</pre><p>The script is interactive and will ask you to input your license key. You can find this by pressing the <b>big red button</b> when you're setting up a new PHP application within the New Relic UI.</p><figure class="post_image"><img src="" alt=""></figure><p.<br></p><p>If everything goes well, you should see the following message:</p><pre class="brush: bash">New Relic is now installed on your system. Congratulations!</pre><p>The script will then print out some extra information for you including the location of the log files:</p><pre class="brush: bash">/var/log/newrelic/newrelic-daemon.log /var/log/newrelic/php_agent.log</pre><p>As well as the fact that you need to restart your web server (and PHP-FPM if you're using it).</p><p>If you do restart your server and tail the daemon log, you should see something like this:<:'</pre><p>Something named <i>PHP Application</i> <i>PHP Application</i>. </p><p.</p><h2>What a Healthy Install Looks Like<br></h2><p>There are two parts to the New Relic PHP agent. The first is a PHP extension, it's a shared object called <code class="inline">newrelic.so</code>. If we look at the agent configuration file:</p><pre class="brush: bash">/etc/php5/cli/conf.d/newrelic.ini</pre><p>We can see it listed right at the top:</p><pre class="brush: bash">;./etc/init.d/newrelic-daemon stop</pre><p).</p><h2>Configuring the Agent (and the Proxy Daemon)<br></h2><p>We've already seen the New Relic PHP agent configuration file <code class="inline">/etc/php5/cli/conf.d/newrelic.ini</code>. Both the agent and the daemon are configured using this file.<br></p><p>This file is very well documented with all the options and their default values listed. Let's talk about the format of this file. The New Relic Ruby agent can be configured via <a target="_blank" rel="external" href="">YAML</a>, which is a well-known format. The PHP agent is simply a text file, but we need a little bit of structure. Each variable in the file has one of four types (String, Boolean, Number, Duration). String and number are self-explanatory, boolean values can be <code class="inline">true</code>, on or <code class="inline">1</code> to indicate truthiness and <code class="inline">false</code>, off or <code class="inline">0</code> to indicate falsiness. Durations are strings with a particular format, for example: <code class="inline">"1w3d23h10m"</code> indicates one week, three days, 23 hours and ten minutes. The values for durations can be as granular as microseconds.<br></p><p.<br></p><p>For example, the most common configuration variable is <code class="inline">`newrelic.appname`</code>. This variable is a String type, it has a default value of <i>PHP Application</i> (now we know why we saw that value in the log file after we installed the agent and restarted the server). The scope of this variable is PERDIR which gives us an idea about how to override the application name for our WordPress blog. <br></p><p>There are many other variables controlling things like the location of the log files, whether or not sql queries are recorded, the log level of the log output and so . I encourage you to study the <code class="inline">newrelic.ini</code> file to familiarise yourself with the options.<br></p><h2>Configuring a Separate App for Our WordPress Blog <br></h2><p>We want to see a separate app in the New Relic UI for our WordPress blog, so let's see how we can get that going. Your options for per directory configuration are different depending on your stack, if you're using <a target="_blank" rel="external" href="">PHP-FPM</a>, the steps are different than if you're using Nginx. In our case, since we're running straight Apache, we have two options.<br></p><p>Firstly, if we have a virtual host for our app, we can insert an <code class="inline">IfModule</code> block into our virtual host block and modify the name of the app there:</p><pre class="brush: bash">... <IfModule php5_module> php_value newrelic.appname "My Blog 1" </IfModule> ...</pre><p>But I don't have a special virtual host just for the blog, so the other option is to use a <code class="inline">.htaccess</code> file. Ensure that you actually allow <code class="inline">.htaccess</code> files, by dumping the following in to your main virtual host:</p><pre class="brush: bash"><Directory /var/www/myblog1> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory></pre><p>We can now put an <code class="inline">.htaccess</code> file in the top level directory of our blog and put the following in it:</p><pre class="brush: bash">php_value newrelic.appname "My Blog 1"</pre><p>The format is exactly the same as if I was putting it into the <code class="inline">IfModule</code> block. Now we just need to bounce our server. If we tail the daemon logs when the server restarts, we will see the following:<:' 2014-03-23 06:07:58.768 (2008/connector) info: ['My Blog 1'] 'Reporting to:'</pre><p>The <i>PHP Application</i> is still there, but now it has a friend which is our WordPress blog. And here it is in the UI:</p><figure class="post_image"><img src="" alt=""></figure><p).<br></p><h2>Updating the Agent & Daemon<br></h2><p>New Relic is a complex piece of software and it's good to keep it up to date as bugs are fixed regularly and new features are added. Since we installed everything using <code class="inline">apt-get,</code> keeping things up to date is easy. We simply do the same thing we did to install it:</p><pre class="brush: bash">apt-get update apt-get install newrelic-php5</pre><p>If we haven't installed another PHP on the system, we now simply need to restart our server and we'll be up to date. If there is a new PHP, we may need to re-run the <code class="inline">newrelic-install</code> script.</p><p.<br></p><h2>Conclusion<br></h2><p <a target="_blank" rel="external" href="">Cake</a>, <a target="_blank" rel="external" href="">Symphony</a> and <a target="_blank" rel="external" href="">Laravel</a> (version 4 and up). It is also possible to use New Relic with an unsupported framework, but you will have to put in some serious effort to get the metrics to make sense.-14T15:00:13.175Z 2014-04-14T15:00:13.175Z Alan Skorkin tag:code.tutsplus.com,2005:PostPresenter/cms-20626 Alternatives to Prefixr <p>Awhile ago, the awesome Jeffrey Way created a tool called <a href="">Prefixr</a>.</p> <p>Unfortunately, now that the site has gone the way of the dodo bird and after having several users ping us about it, we wanted to provide some alternatives that can help provide similar capabilities.</p> <h2>The Express Prefixr Library</h2> <p>The first option which is closest to the functionality of Prefixr is a site called <a href="">Express Prefixr</a>. This was created by the awesome <a href="">TJ Holowaychuk</a> who apart from being an expert on Node.js development, also created the <a href="">Express</a> web application framework for <a target="_self" href="">Node.js</a>. </p> <p>With Express Prefixr, you're presented with two <i>textarea</i> fields, one for entering your styles and the second to receive the prefixed output from the service. This is very similar to the way that Prefixr worked:</p><figure class="post_image"><img src="" alt=""></figure> <p>To test this out, I'm taking the same code sample that Jeffrey used in his original article:</p> <pre class="brush: css">; } } </pre> <p>Then pressing on the "<b>Prefix it!</b>" button, I can immediately get my prefixed styles sent to me:</p><figure class="post_image"><img src="" alt=""></figure> <p>Here's the complete result:</p> <pre class="brush: css">; } } </pre> <p>Taking this further, Express Prefixr also provides an API that you can leverage to integrate into your applications or use third party tools like <code>curl</code>. So taking the following snippet:</p> <pre class="brush: bash">curl -d css='body { border-radius: 10px}'</pre> <p>And pasting it into my <code>terminal</code> window gives me the following results:</p> <pre class="brush: bash">reys-mbp:~ rey$ curl -d css='body { border-radius: 10px}' body { -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; -o-border-radius: 10px; </pre> <p>One final great thing about Express Prefixr, is that the <a href="">code is available on GitHub</a> allowing you to easily fork it and customize the software to your needs.</p> <h2>The Autoprefixer Library</h2> <p>The next option is actually designed to integrate more so into your workflow, rather than being a visual UI tool. <a href="">Autoprefixer</a> does in fact add prefixes where appropriate by using rules provided by the popular site, <a href="">Can I Use</a>. Autoprefixer's slogan is:</p> <p>"Write your CSS rules without vendor prefixes (in fact, forget about them entirely)"</p> <p>And it holds true. What this means is that in your stylesheets, you can focus on using the standards-based syntax and Autoprefixer will handle adding in the prefixed rules if necessary.</p><p>Let's look at some code:<br></p> <pre class="brush: css">:fullscreen a { transition: transform 1s }</pre> <p>The above code will be updated by Autoprefixer to the following:</p><pre class="brush: } </pre><p>Take a close look at the syntax. Notice that the <code>transition</code> rule was pretty much left alone except for the addition of the two Webkit-specific entries. That's because Autoprefixer only applies vendor prefixes when it's appropriate. In this case, <code>transition</code> is widely supported in modern browsers and doesn't really need to be prefixed.</p> <p>But, the <code><a href="">:fullscreen</a></code> pseudo-class is still evolving and does need to be properly prefixed. Autoprefixer, using the Can I Use data, is smart enough to determine when to prefix something based on a browser's level of support for a feature. Very cool!</p> <p>The thing to note is that Autoprefixer is meant to be incorporated into your normal deployment workflow. It's not a client-side library and you leverage it via any number of third party integrations. This includes:</p> <ul> <li>Grunt via the <a href="">grunt-autoprefixer plugin</a></li> <li>Compass via the <code>autoprefixer-rails</code> gem</li> <li>Stylus via the <a target="_self" href="">autoprefixer-stylus plugin</a></li> <li>Broccoli via the <a href="">broccoli-autoprefixer plugin</a></li> <li>Sublime Text with the <a href="">sublime-autoprefixer plugin</a></li> </ul> <p>And so many more options. Even the new Atom Editor now has the <a href="">atom-autoprefixer package</a> which shows that Autoprefixer is well-maintained.</p> <p>If you'd like to see Autoprefixer in action, jump on over to the following <a href="">demo</a> and add a bunch of CSS rules that you've traditionally had to vendor prefix and see how it works for you. </p> <h2>The -Prefix-Free Library</h2> <p>The final option is a great client-side library by <a href="">Lea Verou</a> called <a href="">-prefix-free</a>..</p> <p>The key difference between this and the two others I mentioned previously is that -prefix-free is a JavaScript library that looks at your stylesheets in runtime and adds the vendor prefixes when needed. </p> <p>Using the library is as simple as adding the following line to the <code>head</code> of your page:</p><pre class="brush: html"><script src="prefixfree.js"></script></pre> <p>No, seriously. That's it. The library handles the processing of every stylesheet in <code>link</code> or <code>style</code> elements and adds a vendor prefix where needed. This is especially useful for sites that are already deployed and it may not be possible to go back and update it.</p> <p>It also has solid browser support being compatible with IE9+, Opera 10+, Firefox 3.5+, Safari 4+ and Chrome on desktop and Mobile Safari, Android browser, Chrome and Opera Mobile on mobile.</p> <h2>Hoping Vendor Prefixes Go Away</h2> <p>It's great to have alternatives to Prefixr and these solutions certainly fit the bill. Ultimately, though, vendor prefixes have become more complicated than they're worth and with many developers not respecting the original intent of them (for example, to designate <i>experimental</i> features) and leveraging them in production systems, hopefully they'll go away in the near future. </p><p>Thankfully, Google <a href="">mentioned</a> when they announced their Blink rendering engine, that they would be shifting to a feature-flag model which would hide experimental features behind hard-to-set flags which aren't accessible via code. Thank goodness!<-09T14:00:03.958Z 2014-04-09T14:00:03.958Z Rey Bango tag:code.tutsplus.com,2005:PostPresenter/cms-20602 Componentizing the Web <p>This is the story about a project of mine. A big one. A mixture between <a href="">PHP</a> and <a href="">Node.js</a>..<br></p> <h2>The Beginning</h2> <p.</p> <p>Here is a rough structure of the project:</p><figure class="post_image"><img alt="" src=""></figure> <p>We put our client side code into different directories. The server side code was only PHP at the moment, so it went in to the <code>php</code> directory. We wrap everything into around 30 files and everything was OK. </p> <h2>The Journey</h2> <p>During the period of a few months, we were trying different concepts and changed the project's code several times. From the current point of view, I could spot four big issues which we met.</p> <h3>Problem #1 - Too Many Badly Structured Files</h3> <p.</p><figure class="post_image"><img alt="" src=""></figure> <p>For example, the CSS styles for the <em>about</em> page were in <code>css/about/styles.css</code>. The JavaScript in <code>js/about/scripts.js</code> and so on. We used a PHP script which concatenates the files. There were, of course, parts of the site that were on several pages and we put them in <code>common</code> directories. This was good for a while, but it did not work well for long because when the directories became full, it was slow to modify something. You had to search for three different directories to find what you needed. The site was still mainly written in PHP.</p> <h3>Problem #2 - The Big Turning Point or How We Messed Things Up</h3> <a href="">MEAN stack</a>). </p> <h3>Problem #3 - A Tough Working Process</h3> <p>We used <a href="">GruntJS</a> for a while, but migrated to <a href="">Gulp</a>.:</p><figure class="post_image"><img alt="" src=""></figure> .</p> <h3>Problem #4 - Angular vs. Custom Code</h3> <p <a href="">CSS preprocessor</a>. The project goes really, really fast. Very soon I ported my library for client side usage. Line by line, it was transformed to a small framework, which we started integrating into the project.</p><h4>Why Create a New Framework?</h4> <p. </p><p. </p><p>I like the words of <a href="">Jeremy Keith</a>, in his talk <a href="">The power of Simplicity</a>,. </p><p>We also tried Ember, but it did not work, because it is heavily based on its routing mechanisms. Backbone was a nice choice and it was the closest thing to our vision. However, when I introduced <a href="">AbsurdJS</a> we decided to use it.</p> <h2>What AbsurdJS Did For Us</h2> <p><a href="">AbsurdJS</a> was originally started as a <a href="">CSS preprocessor</a>, expanded to an <a href="">HTML preprocessor</a>.</p> <h3>Divide and Rule</h3> <p:</p> <pre class="brush: javascript">var absurd = Absurd(); var MyComp = absurd.component('MyComp', { constructor: function() { // ... } }); var instance = MyComp(); </pre> <p><code>absurd.component</code> defines a class. Calling the <code>MyComp()</code> method creates a new instance.</p> <h3>Let's Talk to Each Other</h3> <p>Having all these small components, we needed a channel for communication. The observer pattern was perfect for this case. So, every component is an event dispatcher.</p> <pre class="brush: javascript">var MyComp = absurd.component('MyComp', { doSomething: function() { this.dispatch('something-happen'); } }); var instance = MyComp(); instance.on('something-happen', function() { console.log('Hello!'); }); instance.doSomething(); </pre> <p.</p> <h3>Controlling the DOM</h3> <p>Along with the PHP served markup, we had dynamically created DOM elements. This means that we needed access to the existing DOM elements or new ones, that will be later added to the page. For example, let's say that we have the following HTML:</p> <pre class="brush: html"><div class="content"> <h1>Page title</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> </div></pre> <p>Here is a component which retrieves the heading:</p> <pre class="brush: javascript">absurd.component('MyComp', { html: '.content h1', constructor: function() { this.populate(); console.log(this.el.innerHTML); // Page title } })(); </pre> <p>The <code>populate</code> method is the only <em>magic</em> method in the whole library. It does several things like compiling CSS or HTML, it binds events and such things. In the example above, it sees that there is an <code>html</code> property and initializes the <code>el</code> variable which points to the DOM element. This works pretty good for us because once we got that reference, we were able to work with the elements and its children. For those components that needed dynamically created elements, the <code>html</code> property accepts an object.</p> <pre class="brush: javascript">absurd.component('MyComp', { html: { 'div.content': { h1: 'Page title', p: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' } }, constructor: function() { this.populate(); document.querySelector('body').appendChild(this.el); } })(); </pre> <p <a href="">templating engine</a>.</p> <pre class="brush: javascript">absurd.component('MyComp', { html: { 'div.content': { h1: '<% this.title %>', ul: [ '<% for(var i=0; i', { li: '<% this.availableFor[i] %>' }, '<% } %>' ] } }, title: 'That\'s awesome', availableFor: ['all browsers', 'Node.js'], constructor: function() { this.populate(); document.querySelector('body').appendChild(this.el); } })(); </pre> <p>The result is:</p> <pre class="brush: html"><div class="content"> <h1>That's awesome</h1> <ul> <li>all browsers</li> <li>Node.js</li> </ul> </div></pre> <p>The <code>this</code> keyword in the expressions above, points to the component itself. The code between <code><%</code> and <code>%></code> is valid JavaScript. So, features like computed properties could be easily developed directly into the template's definition. Of course, we are able to use the same template engine with already existing markup. For example:</p> <pre class="brush: html"><div class="content"> <h1><% this.title %></h1> <ul> <% for(var i=0; i&amp;lt;this.availableFor.length; i++) { %> <li><% this.availableFor[i] %></li> <% } %> </ul> </div></pre> <p>... could be controlled with the following component (the result is the same):</p> <pre class="brush: javascript">absurd.component('MyComp', { html: '.content', title: 'That\'s awesome', availableFor: ['all browsers', 'Node.js'], constructor: function() { this.populate(); } })(); </pre> <p>Anyway, the point is that we were able to define templates or create such from scratch. We are also able to control the data that is injected in an easy and natural way. Everything is just properties of the good old JavaScript object. </p> <h3>What About the Styling?</h3> <p. </p> <p>Then I thought, what will happen if we do the same thing with the CSS. It was of course possible because AbsurdJS was a CSS preprocessor and could produce CSS. We just got the compiled string, create a new <code>style</code> tag in the <code>head</code> of the current page and inject it there.</p> <pre class="brush: javascript">absurd.component('MyComp', { css: { '.content': { h1: { color: '#99FF00', padding: 0, margin: 0 }, p: { fontSize: '20px' } } }, html: '.content', constructor: function() { this.populate(); } })(); </pre> <p>Here is the <code>style</code> tag which is produced:</p> <pre class="brush: html"><style id="MyComp-css" type="text/css"> .content h1 { color: #99FF00; padding: 0; margin: 0; } .content p { font-size: 20px; } </style></pre> <p. </p> <h3>That Awkward Moment</h3> <p>... when everything works perfectly but you feel that something is wrong</p> <p?".</p><figure class="post_image"><img alt="" src=""></figure> <p>And what we did, is a little bit different. It looks more like the picture below.</p><figure class="post_image"><img alt="" src=""></figure> <p. </p><p. </p><p>We, as developers, will have to develop such components and probably connect with and use such components written by others. Projects like <a href="">AbsurdJS</a> or <a href="">Polymer</a> are showing that this is possible and I encourage you to experiment in this direction. </p> <h2>Back to Reality</h2> <p.</p> <p.</p> <h2>Conclusion</h2> <p>If you found this tutorial interesting, check out the official page of <a href="">AbsurdJS</a>. There are guides, documentation, and articles. You can even try the <a href="">library online</a>. <a href="">available at-07T14:00:09.593Z 2014-04-07T14:00:09.593Z Krasimir Tsonev tag:code.tutsplus.com,2005:PostPresenter/cms-20563 Creating an RSS Feed Reader With the MEAN Stack <p>This article is a continuation of <a href="">Introduction to the MEAN Stack</a>. The previous post covered the installation of the MEAN stack and also presented what we ended up with in terms of its directory structure, after installation. Now it's time for some actual coding!</p> <h2>What We'll Be Building</h2> <p>We will be building an RSS feed reader using the MEAN stack. The application will allow its user to manage their list of feeds by adding a new feed, deleting an existing one, modifying an existing one and, of course, seeing a list of all the feeds in which the user is interested in.</p> <p>The user has to authenticate in order to have access to the application, so that the feeds of one user are not visible to others and most importantly, to users that are not logged in. As we saw in the <a href="">previous</a> article, the stack comes with a full authentication mechanism already implemented, so we can use it without further modifications.</p> <p>The feed's URLs are stored in a Mongo database on the server so that they are available even after logging off, or after closing the browser.</p> <p>The last feeds are displayed to the user on the main page and they will show the article's title, an excerpt and allow the user to click on the title to read the entire post.</p> <p>The user will also have the possibility to filter the feeds on various criteria.</p> <p>In this first part, we will discuss the implementation of the server part of our application (the backend). We will implement a REST API to respond to the user's requests for viewing, creating, deleting and modifying feeds.</p> <p>Luckily for us, the MEAN stack gives us such an API for handling the articles that can be created. We will modify this API to respond to our need of handling the feed URLs. After all, this is why we are using boilerplate code, to modify and adapt it to the needs of our application. So let's do that!</p> <h2>The Routes</h2> <p>Let's spend a minute and think about what routes our app should to respond to. The picture below shows what we expect to have: </p><figure class="post_image"><img alt="" src=""></figure> <p>Now, let's open the file <code>app/routes/articles.js</code>. If we look at its contents, we see that this is what we want to have, but applied to the articles. So, we have to modify it a little to fit our needs. First, change its name from <code>articles.js</code> to <code>feeds.js</code>. Then modify it as shown below:</p> <pre class="brush: javascript"> // app/routes/feeds.js 'use strict'; var feeds = require('../controllers/feeds'); var authorization = require('./middlewares/authorization'); // Feeds authorization helpers var hasAuthorization = function(req, res, next) { if (req.feed.user.id !== req.user.id) { return res.send(401, 'User is not authorized'); } next(); }; module.exports = function(app) { app.get('/feeds', feeds.all); app.post('/feeds', authorization.requiresLogin, feeds.create); app.get('/feeds/:feedId', feeds.show); app.put('/feeds/:feedId', authorization.requiresLogin, hasAuthorization, feeds.update); app.del('/feeds/:feedId', authorization.requiresLogin, hasAuthorization, feeds.destroy); // Finish with setting up the feedId param app.param('feedId', feeds.feed); }; </pre> <p>For those familiar with the Express framework, this shouldn't be anything new, but just in case, let's go over it real quickly. We start by requiring the <code>feeds</code> controller (which we'll see in a moment) and the authorization middleware (which the MEAN stack gives us).</p> <p>Then we have the <code>hasAuthorization()</code> function, which compares the <code>id</code> of the user who wants to manipulate the feed with the <code>id</code> of the logged in user and returns an error if they are not the same. The <code>next()</code> function is a callback which allows the next layer in the middleware stack to be processed.</p> <p>In the last part, our code exports the routes as described in the table above, implementing the security requirements.</p> <h2>The Models</h2> <p>Creating the application's model using <code>mongoose</code> is a breeze. Rename the <code>app\models\article.js</code> to <code>app\models\feed.js</code> and perform the following modifications:</p> <pre class="brush: javascript"> 'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Feeds Schema. */ var FeedsSchema = new Schema ({ feedUrl: { type: String, default: '', trim: true }, user: { type: Schema.ObjectId, ref: 'User' } }); /** * Statics */ FeedsSchema.statics.load = function(id, cb) { this.findOne({ _id: id }).populate('user', 'name username').exec(cb); }; mongoose.model('Feeds', FeedsSchema); </pre> <p>We define our database structure here as follows: we will have a feeds table containing a <code>feedUrl</code> string type field and a reference to a <code>user</code> which will store the <code>id</code> of the current logged in user. Notice that we don't handle the creation of an <code>id</code> for our documents here, since this is taken care of for us by the MongoDB system.</p> <p>Finally, we define a <code>load()</code> function that filters the documents in the database based on the <code>id</code> of the current logged in user.</p> <h2>The Controller</h2> <p>The controller is responsible for implementing the functions called by the router, when a specific route is requested. All the necessary functions for the CRUD operations we perform are implemented in the controller. Let's take a look at them one by one and see the implementation details.</p> <p>You should be noticing a pattern by this point. First, don't forget to rename the <code>app/controllers/articles.js</code> file to <code>app/controllers/feeds.js</code>.</p> <h3>Creating a Feed</h3> <p>In order to create a feed we implement the <code>create()</code> function:</p> <pre class="brush: javascript"> /** * Create a feed */ exports.create = function(req, res) { var feed = new Feeds(req.body); feed.user = req.user; feed.save(function(err) { if (err) { return res.send('users/signup', { errors: err.errors, feed: feed }); } else { res.jsonp(feed); } }); }; </pre> <p>First, we create a <code>feed</code> variable based on the <code>Feeds</code> model. Then we add to this variable the reference to the current logged in user to be stored. Finally, we call the model's <code>save</code> method to store the document in the database. Upon error, we return to the signup form since most likely the user is not logged in. If the document is created successfully, we return the new document to the caller.</p> <h3>Modifying a Feed</h3> <pre class="brush: javascript"> /** * Update a feed */ exports.update = function(req, res) { var feed = req.feed; feed = _.extend(feed, req.body); feed.save(function(err) { if (err) { return res.send('users/signup', { errors: err.errors, feed: feed }); } else { res.jsonp(feed); } }); }; </pre> <p>We call Lodash's <code>extend</code> method in order to modify the feed's properties with the ones that came from the user. Then the <code>save</code> method of the model stores the modified data in to the database.</p> <h3>Deleting a Feed</h3> <pre class="brush: javascript"> /** * Delete a feed */ exports.destroy = function(req, res) { var feed = req.feed; feed.remove(function(err) { if (err) { return res.send('users/signup', { errors: err.errors, feed: feed }); } else { res.jsonp(feed); } }); }; </pre> <p>Quite simple, isn't it? The model has a <code>remove</code> method which solved our problem quite easily.</p> <h3>Showing Feeds</h3> <p>Showing all feeds will be the task of the client part of our application. The server will only return the necessary data:</p> <pre class="brush: javascript"> /** * List of Feeds */ exports.all = function(req, res) { Feeds.find().sort('-created').populate('user', 'feedUrl').exec(function(err, feeds) { if (err) { res.render('error', { status: 500 }); } else { res.jsonp(feeds); } }); }; </pre> <p>The code performs a find in the database returning the <code>user</code> and the <code>feedUrl</code>. If <code>find</code> fails, a server error is returned, otherwise all the found feeds will be returned.</p> <p>A single feed is displayed by using the following:</p> <pre class="brush: javascript"> /** * Show a feed */ exports.show = function(req, res) { res.jsonp(req.feed); }; </pre> <p>... which then uses a helper function:</p> <pre class="brush: javascript"> exports.feed = function (req, res, next, id) { Feeds.load(id, function (err, feed) { if (err) return next(err); if (!feed) return next(new Error('Failed to load feed ' + id)); req.feed = feed; next(); }); }; </pre> <p>... that loads a specific feed based on its <code>id</code> (which will come packaged in the URL).</p> <p>The complete code should like this:</p> <pre class="brush: javascript"> // app/controllers/feeds.js 'use strict'; var mongoose = require('mongoose'), Feeds = mongoose.model('Feeds'), _ = require('lodash'); exports.feed = function (req, res, next, id) { Feeds.load(id, function (err, feed) { if (err) return next(err); if (!feed) return next(new Error('Failed to load feed ' + id)); req.feed = feed; next(); }); }; /** * Show a feed */ exports.show = function(req, res) { res.jsonp(req.feed); }; /** * List of Feeds */ exports.all = function(req, res) { Feeds.find().sort('-created').populate('user', 'feedUrl').exec(function(err, feeds) { if (err) { res.render('error', { status: 500 }); } else { res.jsonp(feeds); } }); }; /** * Create a feed */ exports.create = function(req, res) { var feed = new Feeds(req.body); feed.user = req.user; feed.save(function(err) { if (err) { return res.send('users/signup', { errors: err.errors, feed: feed }); } else { res.jsonp(feed); } }); }; /** * Update a feed */ exports.update = function(req, res) { var feed = req.feed; feed = _.extend(feed, req.body); feed.save(function(err) { if (err) { return res.send('users/signup', { errors: err.errors, feed: feed }); } else { res.jsonp(feed); } }); }; /** * Delete a feed */ exports.destroy = function(req, res) { var feed = req.feed; feed.remove(function(err) { if (err) { return res.send('users/signup', { errors: err.errors, feed: feed }); } else { res.jsonp(feed); } }); }; </pre> <h2>Is the REST API Complete?</h2> <p>Well, almost. At this point we do not have the client part of the application implemented in order to prove that the code is working. I didn't present the unit tests for the code either, since it's not so complicated and I wanted to leave it up to you as an exercise.</p> <p>We can test the code using the Postman - REST Client application available on Google Chrome.</p> <h3>Creating a Feed</h3> <p>Install <a href="">Postman</a> if you don't have it already and configure it as follows:</p><figure class="post_image"><img alt="" src=""></figure> <h3>Viewing All Feeds</h3><figure class="post_image"><img alt="" src=""></figure> <h3>Viewing a Single Feed</h3><figure class="post_image"><img alt="" src=""></figure> <p>The remaining parts of the code are easy to verify, so please have some fun with Postman and your new application.</p> <h2>Conclusion</h2> <p>Using a framework or boilerplate code can, in some situations, be useful and make you very productive. As you've seen in this article, implementing the REST API needed for our application was reduced to performing minor modifications to the boilerplate code. Of course for more complex applications, it may be necessary to do more than that, but still, having a starting point can be useful.</p> <p>In the next tutorial, we will take a look at the client part of the application for displaying the data we will request from the server, showing forms for entering new feed URLs, handling events and so-04T14:00:04.955Z 2014-04-04T14:00:04.955Z Gabriel Cirtea tag:code.tutsplus.com,2005:PostPresenter/cms-20527 Refactoring Legacy Code: Part 2 - Magic Strings & Constants <p>Old code. Ugly code. Complicated code. Spaghetti code. Jibberish nonsense. In two words, <em>Legacy Code</em>. This is a series that will help you work and deal with it.</p> <p>We first met our legacy source code in our <a href="">previous lesson</a>. Then we ran the code to form an opinion about its basic functionality and created a Golden Master test suite to have a raw safety net for future changes. We will continue to work on this code and you can find it under the <code>trivia/php_start</code> folder. The other folder <code>trivia/php_start</code> is with this lesson's finished code.</p> <p.</p> <h2>Magic Strings</h2> <p>Magic strings are strings used directly in various expressions, without being assigned to a variable. This kind of string had a special meaning for the original author of the code, but instead of assigning them to a well named variable, the author thought the meaning of the string was obvious enough.</p> <h3>Identify the First Strings to Change</h3> <p>Let's start by looking at our <code>Game.php</code> and try to identify strings. If you are using an IDE (and you should) or a smarter text editor capable of highlighting source code, spotting the strings will be easy. Here is an image of how the code looks like on my display.</p><figure class="post_image"><img alt="" src=""></figure> <p>Everything with orange is a string. Finding each string in our source code is very easy this way. So, make sure highlighting is supported and enabled in your editor, whatever your application is.</p> <p>The first orange part in our code is immediately at line three. However the string contains only a newline character. This should be obvious enough in my opinion, so we can move on.</p> <p>When it comes to deciding what to extract and what to keep unchanged, there are few thumb-ups, but at the end it is your professional opinion that must prevail. Based on it, you will have to decide what to do with each piece of code you analyze.</p> <pre class="brush: php">for ($i = 0; $i < 50; $i++) { array_push($this->popQuestions, "Pop Question " . $i); array_push($this->scienceQuestions, ("Science Question " . $i)); array_push($this->sportsQuestions, ("Sports Question " . $i)); array_push($this->rockQuestions, $this->createRockQuestion($i)); } } function createRockQuestion($index) { return "Rock Question " . $index; }</pre> <p>So let's analyze lines 32 to 42, the snippet you can see above. For pop, science, and sports questions, there is just a simple concatenation. However, the action to compose the string for a rock question is extracted into a method. In your opinion, are these concatenations and strings clear enough so that we can keep all of them inside our for loop? Or, do you think extracting all strings into their methods would justify the existence of those methods? If so, how would you name those methods?</p> <h3>Update Golden Master and the Tests</h3> <p>Regardless of the answer, we will need to modify the code. It is time to put our <a href="">Golden Master</a> to work and write our test that actually runs and compares our code with the existing content.</p> <pre class="brush: php">class GoldenMasterTest extends PHPUnit_Framework_TestCase { private $gmPath; function setUp() { $this->gmPath = __DIR__ . '/gm.txt'; } function testGenerateOutput() { $times = 20000; $this->generateMany($times, $this->gmPath); } function testOutputMatchesGoldenMaster() { $times = 20000; $actualPath = '/tmp/actual.txt'; $this->generateMany($times, $actualPath); $file_content_gm = file_get_contents($this->gmPath); $file_content_actual = file_get_contents($actualPath); $this->assertTrue($file_content_gm == $file_content_actual); } private function generateMany($times, $fileName) {...} private function generateOutput($seed) {...} }</pre> <p>We created another test to compare the outputs, made sure <code>testGenerateOutput()</code> only generates the output once and does nothing else. We also moved the golden master output file <code>"gm.txt"</code> into the current directory because <code>"/tmp"</code> may be cleared when the system reboots. For our actual results, we can still use it. On most UNIX like systems <code>"/tmp"</code> is mounted into the RAM so it is much faster than the file system. If you did well, the tests should pass without a problem.</p><figure class="post_image"><img alt="" src=""></figure> <p>It is very important to remember to mark our generator test as "skipped" for future changes. If you feel more comfortable with commenting or even deleting it altogether, please do so. It is important that our <a href="">Golden Master</a> will not change when we change our code. It was generated once and we do not want to modify it, ever, so that we can be sure our newly generated code always compares to the original. If you feel more comfortable doing a backup of it, please proceed to do so.</p> <pre class="brush: php">function testGenerateOutput() { $this->markTestSkipped(); $times = 20000; $this->generateMany($times, $this->gmPath); }</pre> <p>I will just mark the test as skipped. This will put our test result to <code>"yellow"</code>, meaning all tests are passing but some are skipped or marked as incomplete.</p><figure class="post_image"><img alt="" src=""></figure> <h3>Making Our First Change</h3> <p>With tests in place, we can start changing code. In my professional opinion, all the strings can be kept inside the <code>for</code> loop. We will take the code from the <code>createRockQuestion()</code> method, move it inside the the <code>for</code> loop, and delete the method altogether. This refactoring is called <em>Inline Method</em>.</p> <p>"Put the method's body into the body of its callers and remove the method." ~ Martin Fowler</p> <p>There are a specific set of steps to do this type of refactoring, as defined by Marting Fowler in <a href="">Refactoring: Improving the Design of Existing Code</a>: </p> <ul> <li>Check that the method is not polymorphic.</li> <li>Find all calls to the method.</li> <li>Replace each call with the method body.</li> <li>Compile and test.</li> <li>Remove the method definition.</li> </ul> <p>We don't have subclasses extending <code>Game</code>, so the first step validates.</p><figure class="post_image"><img alt="" src=""></figure> <p>There is only a single use of our method, inside the <code>for</code> loop.</p> <pre class="brush: php">function __construct() { $this->players = array(); $this->places = array(0); $this->purses = array(0); $this->inPenaltyBox = array(0); $this->popQuestions = array(); $this->scienceQuestions = array(); $this->sportsQuestions = array(); $this->rockQuestions = array(); for ($i = 0; $i < 50; $i++) { array_push($this->popQuestions, "Pop Question " . $i); array_push($this->scienceQuestions, ("Science Question " . $i)); array_push($this->sportsQuestions, ("Sports Question " . $i)); array_push($this->rockQuestions, "Rock Question " . $i); } } function createRockQuestion($index) { return "Rock Question " . $index; }</pre> <p>We put the code from <code>createRockQuestion()</code> into the <code>for</code> loop in the constructor. We still have our old code. It is now time to run our test.</p> <p>Our tests are passing. We can delete our <code>createRockQuestion()</code> method.</p> <pre class="brush: php">function __construct() { // ... // for ($i = 0; $i < 50; $i++) { array_push($this->popQuestions, "Pop Question " . $i); array_push($this->scienceQuestions, ("Science Question " . $i)); array_push($this->sportsQuestions, ("Sports Question " . $i)); array_push($this->rockQuestions, "Rock Question " . $i); } } function isPlayable() { return ($this->howManyPlayers() >= 2); }</pre> <p>Finally we should run our tests again. If we missed a call to a method, they will fail.</p> <p>They should pass again. Congrats! We are done with our first refactoring.</p> <h3>Other Strings to Consider</h3> <p>Strings in the methods <code>add()</code> and roll() are only used to output them using the <code>echoln()</code> method. <code>askQuestions()</code> compares strings to categories. This seems acceptable also. <code>currentCategory()</code> on the other hand returns strings based on a number. In this method, there are a lot of duplicated strings. Changing any category, except Rock would require changing its name in three places, only in this method.</p> <pre class="brush: php">function currentCategory() { if ($this->places[$this->currentPlayer] == 0) { return "Pop"; } if ($this->places[$this->currentPlayer] == 4) { return "Pop"; } if ($this->places[$this->currentPlayer] == 8) { return "Pop"; } if ($this->places[$this->currentPlayer] == 1) { return "Science"; } if ($this->places[$this->currentPlayer] == 5) { return "Science"; } if ($this->places[$this->currentPlayer] == 9) { return "Science"; } if ($this->places[$this->currentPlayer] == 2) { return "Sports"; } if ($this->places[$this->currentPlayer] == 6) { return "Sports"; } if ($this->places[$this->currentPlayer] == 10) { return "Sports"; } return "Rock"; }</pre> <p>I think we can do better. We can use a refactoring method called <em>Introduce Local Variable</em> and eliminate the duplication. Follow these guidelines:</p> <ul> <li>Add a variable with the desired value.</li> <li>Find all uses of the value.</li> <li>Replace all uses with the variable.</li> </ul> <pre class="brush: php">function currentCategory() { $include_once __DIR__ . '/Game.php'; $notAWinner; $aGame = new Game(); $aGame->add("Chet"); $aGame->add("Pat"); $aGame->add("Sue"); do { $aGame->roll(rand(0, 5) + 1); if (rand(0, 9) == 7) { $notAWinner = $aGame->wrongAnswer(); } else { $notAWinner = $aGame->wasCorrectlyAnswered(); } } while ($notAWinner);</pre> <p>We'll start with <code>GameRunner.php</code> this time and our first focus is the <code>roll()</code> method that gets some random numbers. The previous author did not care to give those numbers a meaning. Can we? If we analyze the code:</p> <pre class="brush: php">rand(0, 5) + 1</pre> <p>It will return a number between one and six. The random part returns a number between zero and five to which we always add one. So it is surely between one and six. Now we need to consider the context of our application. We are developing a trivia game. We know there is some kind of board on which our players must move. And to do so, we need to roll the dice. A die has six faces and it can produce numbers between one and six. That seems like a reasonable deduction.</p> <pre class="brush: php">$dice = rand(0, 5) + 1; $aGame->roll($dice);</pre> <p>Isn't that nice? We used the Introduce Local Variable refactoring concept again. We named our new variable <code>$dice</code> and it represents the random number generated between one and six. This also made our next statement sound really natural: Game, roll dice.</p> <p>Did you run your tests? I didn't mention it, but we need to run them as frequently as possible. If you haven't, this would be a good time to run them. And they should pass.</p> <p>So, this was a case of nothing more than just exchanging a number with a variable. We took a whole expression that represented a number and extracted it into a variable. This can be technically considered a Magic Constant case, but not a pure case. What about our next random expression?</p> <pre class="brush: php">if (rand(0, 9) == 7)</pre> <p>This is more tricky. What are zero, nine and seven in that expression? Maybe we can name them. At first glance, I have no good ideas for zero and nine, so let's try seven. If the number returned by our random function is equal to seven, we will enter the first branch of the <code>if</code> statement which produces a wrong answer. So maybe our seven could be named <code>$wrongAnswerId</code>.</p> <pre class="brush: php">$wrongAnswerId = 7; if (rand(0, 9) == $wrongAnswerId) { $notAWinner = $aGame->wrongAnswer(); } else { $notAWinner = $aGame->wasCorrectlyAnswered(); }</pre> <p>Our tests are still passing and the code is somewhat more expressive. Now that we managed to name our number seven, it puts the conditional into a different context. We can think of some decent names for zero and nine also. They are just parameters to <code>rand()</code>, so the variables will probably be named min-something and max-something.</p> <pre class="brush: php">$minAnswerId = 0; $maxAnswerId = 9; $wrongAnswerId = 7; if (rand($minAnswerId, $maxAnswerId) == $wrongAnswerId) { $notAWinner = $aGame->wrongAnswer(); } else { $notAWinner = $aGame->wasCorrectlyAnswered(); }</pre> <p>Now that is expressive. We have a minimum answer ID, a maximum one and another for the wrong answer. Mystery solved.</p> <pre class="brush: php">do { $dice = rand(0, 5) + 1; $aGame->roll($dice); $minAnswerId = 0; $maxAnswerId = 9; $wrongAnswerId = 7; if (rand($minAnswerId, $maxAnswerId) == $wrongAnswerId) { $notAWinner = $aGame->wrongAnswer(); } else { $notAWinner = $aGame->wasCorrectlyAnswered(); } } while ($notAWinner);</pre> <p>But notice that all the code is inside a <code>do-while</code> loop. Do we need to re-assign the answer ID variables each time? I think not. Let's try to move them out of the loop and see if our tests are passing.</p> <pre class="brush: php">$minAnswerId = 0; $maxAnswerId = 9; $wrongAnswerId = 7; do { $dice = rand(0, 5) + 1; $aGame->roll($dice); if (rand($minAnswerId, $maxAnswerId) == $wrongAnswerId) { $notAWinner = $aGame->wrongAnswer(); } else { $notAWinner = $aGame->wasCorrectlyAnswered(); } } while ($notAWinner);</pre> <p>Yes. The tests pass like this as well.</p> <p>It's time to switch to <code>Game.php</code> and look for Magic Constants there also. If you have code highlighting, you surely have constants highlighted in some bright color. Mine are blue and they are pretty easy to spot.</p><figure class="post_image"><img alt="" src=""></figure> <p>Finding the magic constant 50 in that <code>for</code> loop was quite easy. And if we look at what the code does, we can discover that inside the <code>for</code> loop, elements are pushed to several arrays. So we have some kind of lists, each with 50 elements. Each list represents a question category and the variables are actually class fields defined above as arrays. </p> <pre class="brush: php">$this->popQuestions = array(); $this->scienceQuestions = array(); $this->sportsQuestions = array(); $this->rockQuestions = array();</pre> <p>So, what can 50 represent? I bet you already have some ideas. Naming is one of the most difficult tasks in programming, if you have more than one idea and you feel uncertain which one to choose, don't be ashamed. I also have various names in my head and I am evaluating possibilities for choosing the best one, even while writing this paragraph. I think we can go with a conservative name for 50. Something along the lines of<code>$questionsInEachCategory</code> or <code>$categorySize</code> or something similar.</p> <pre class="brush: php">$categorySize = 50; for ($i = 0; $i < $categorySize; $i++) { array_push($this->popQuestions, "Pop Question " . $i); array_push($this->scienceQuestions, ("Science Question " . $i)); array_push($this->sportsQuestions, ("Sports Question " . $i)); array_push($this->rockQuestions, "Rock Question " . $i); }</pre> <p>That looks decent. We can keep it. And the tests are of course are passing.</p> <pre class="brush: php">function isPlayable() { return ($this->howManyPlayers() >= 2); }</pre> <p>What is two? I am sure at this point the answer is clear to you. That is easy:</p> <pre class="brush: php">function isPlayable() { $minimumNumberOfPlayers = 2; return ($this->howManyPlayers() >= $minimumNumberOfPlayers); }</pre> <p>Do you agree? If you have a better idea, feel free to comment below. And your tests? Are they still passing?</p> <p>Now, in the <code>roll()</code> method we have some numbers also: two, zero, 11 and 12.</p> <pre class="brush: php">if ($roll % 2 != 0)</pre> <p>That is pretty clear. We will extract that expression into a method, but not in this tutorial. We are still in the phase of understanding and hunting for magic constants and strings. So what about 11 and 12? They are buried inside the third level of <code>if</code> statements. It is quite difficult to understand what they stand for. Maybe if we look at the lines around them.</p> <pre class="brush: php">if ($this->places[$this->currentPlayer] > 11) { $this->places[$this->currentPlayer] = $this->places[$this->currentPlayer] - 12; }</pre> <p>If the current player's place or position is greater than 11, then its position will be reduced to the current one minus 12. This sounds like a case of when a player reaches the end of the board or play field and it is repositioned in its initial position. Probably position zero. Or, if our game board is circular, going over the last marked position will put the player into the relative first position. So 11 could be the board size. </p> <pre class="brush: php">$boardSize = 11; if ($this->inPenaltyBox[$this->currentPlayer]) { if ($roll % 2 != 0) { // ... // if ($this->places[$this->currentPlayer] > $boardSize) { $this->places[$this->currentPlayer] = $this->places[$this->currentPlayer] - 12; } // ... // } else { // ... // } } else { // ... // if ($this->places[$this->currentPlayer] > $boardSize) { $this->places[$this->currentPlayer] = $this->places[$this->currentPlayer] - 12; } // ... // }</pre> <p>Don't forget to replace 11 in both places inside the method. This will force us to move the variable assignment outside of the <code>if</code> statements, right at the first indentation level.</p> <p>But if 11 is the board's size, what is 12? We subtract 12 from the player's current position, not 11. And why don't we just set the position to zero instead of subtracting? Because that would make our tests fail. Our previous guess that the player will end up in position zero after the code inside the <code>if</code> statement is run, was wrong. Let's say a player is in position ten and rolls a four. 14 is greater than 11, so the subtraction will happen. The player will end up in position <code>10+4-12=2</code>.</p> <p>This drives us toward another possible naming for 11 and 12. I think it is more appropriate to call 12 <code>$boardSize</code>. But what does that leave us for 11? Maybe <code>$lastPositionOnTheBoard</code>? A little bit long, but at least it tells us the truth about the magic constant.</p> <pre class="brush: php">$lastPositionOnTheBoard = 11; $boardSize = 12; if ($this->inPenaltyBox[$this->currentPlayer]) { if ($roll % 2 != 0) { // ... // if ($this->places[$this->currentPlayer] > $lastPositionOnTheBoard) { $this->places[$this->currentPlayer] = $this->places[$this->currentPlayer] - $boardSize; } // ... // } else { // ... // } } else { // ... // if ($this->places[$this->currentPlayer] > $lastPositionOnTheBoard) { $this->places[$this->currentPlayer] = $this->places[$this->currentPlayer] - $boardSize; } // ... // }</pre> <p>I know, I know! There is some code duplication there. It is quite obvious, especially with the rest of the code hidden. But please remember that we were after magic constants. There will be a time for duplicate code also, but not right now.</p> <h2>Final Thoughts</h2> <p>I left one last magic constant in the code. Can you spot it? If you look at the final code, it will be replaced, but of course that would be cheating. Good luck finding it-02T15:00:04.876Z 2014-04-02T15:00:04.876Z Patkos Csaba tag:code.tutsplus.com,2005:PostPresenter/cms-20475 Using Polymer to Create Web Components <p><b><i>Editors Note:</i></b> <i>This article was updated to remove references to deprecated components specifically polymer-ajax which has since been replaced by core-ajax. Thanks to </i><a target="_self" href=""><i>Rob Dodson</i></a><i>, developer advocate at Google, for the feedback.</i><br></p><p?</p> <p>Web Components aim to solve some of these complexities by providing a unified way to create new elements that encompass rich functionality without the need for all the extra libraries. Web components are comprised of four different specifications (<a href="">Custom Elements</a>, <a target="_self" href="">Templates</a>, <a href="">Shadow DOM</a> and <a href="">HTML imports</a>) which are being fleshed out in the W3C. </p> <p>To bridge the gap and give developers access to this rich functionality now, Google has created the <a href="">Polymer</a> library which serves as a set of polyfills to bring the promise of Web Components to you today. Let's dive a little deeper into.</p> <h2>What Is Polymer</h2> <p: </p> <ul> <li>Encapsulating much of the complex code and structure</li> <li>Allowing developers to use a simple-to-use tag style naming convention</li> <li>Providing a suite of predefined UI elements to leverage and extend</li> </ul> <p>But the important thing to remember, is that the framework itself is developed based on the direction of the individual specifications being vetted by the W3C, thus providing a foundation that should evolve with the direction of the main standards body.</p> <p>What this library can do, is allow us to create reusable components that work as true DOM elements while helping to minimize our reliance on JavaScript to do complex DOM manipulation to render rich UI results. </p> <p>Here's a quick example from the Polymer site. Say I wanted to render a working clock on my page. That would typically entail some heavy duty JavaScript code to do but by using Polymer, I can simply use the following syntax:</p> <pre class="brush: html"><polymer-ui-clock></polymer-ui-clock></pre> <p>This looks like the HTML tag syntax we've all grown up with and is far easier to implement, read and maintain than some complex JavaScript code. And the end result looks like this: </p><figure class="post_image"><img src="" alt=""></figure><p>And since it's a normal element in the DOM, you can style it as well using CSS like this:</p> <pre class="brush: css"> polymer-ui-clock { width: 320px; height: 320px; display: inline-block; background: url("../assets/glass.png") no-repeat; background-size: cover; border: 4px solid rgba(32, 32, 32, 0.3); } </pre> <p>It's certainly not the prettiest clock, but that's not the point. The fact is that you can customize the component to your liking and then reuse it via an easier and more maintainable syntax.</p> <h2>Installing Polymer</h2> <p>There are three ways to install and use Polymer:</p> <ul> <li>Use the Bower package manager (preferred)</li> <li>Use the libraries hosted on CloudFare's <a href="">cdnjs</a></li> <li>Install from Git</li> </ul> <p>Of the three, the easiest and recommended way is to use <a href="">Bower</a> because not only is it incredibly easy to do but Bower also manages any dependencies that Polymer might have. This means that if you choose to install a specific UI element which has a dependency on another one, Bower can handle that for you.</p> <p>Bower is installed as a Node Packaged Module, so you'll need to have <a href="">Node.js</a> installed. From the command line, type in the following:</p> <pre class="brush: bash">npm install -g bower </pre> <p>This should pull Bower from the npm registry and install it so it's globally available to you. From there, subsequent Bower-based installs take the following form:</p> <pre class="brush: bash">bower install </pre> <p>At a bare minimum, you're going to want to install Polymer's platform and core components since they provide the foundation for you to create and run your customer elements.</p><pre class="brush: bash">bower install --save Polymer/platform bower install --save Polymer/polymer</pre> <p>You can shortcut this by typing in:</p> <pre class="brush: bash">bower install --save Polymer/platform Polymer/polymer </pre> <p>Polymer also comes with a rich, predefined set of elements that you can begin taking advantage of immediately. They consist of <a target="_self" href="">UI and non-UI</a> based elements that provide functionality such as:</p> <ul> <li>Animation</li> <li>Accordions</li> <li>Grid layout</li> <li>Ajax capabilities</li> <li>Menus</li> <li>Tabs</li> </ul> <p>And that's only scraping the surface. There's a lot already in there with full source code available to serve as a learning tool, as well as allow you to customize the capabilities to your needs.</p> <p>You have a choice in how to install these components. You can install everything or only those you want to use. To install everything, you type in:</p> <pre class="brush: bash">bower install Polymer/core-elements bower install Polymer/polymer-ui-elements</pre> <p>This is the kitchen sink approach and when you're starting out learning Polymer, it's probably easiest just to do that, to help you get a feel for what's available.</p> <p>Once you're more familiar with the framework, you can cherry-pick the individual components you'd like to use and install them like this:</p> <pre class="brush: bash">bower install Polymer/polymer-ui-accordion </pre> <p>This is the beauty of using Bower. Every component comes with a <code>bower.json</code> configuration file that outlines its dependencies. So if you were installing the <code>accordion</code> component, looking at the config, we can see that it has dependencies on the main <code>polymer</code> component as well as the <code>selector</code> and <code>collapsible</code> components.</p> <pre class="brush: javascript">{ "name": "polymer-ui-accordion", "private": true, "dependencies": { "polymer": "Polymer/polymer#0.2.0", "polymer-selector": "Polymer/polymer-selector#0.2.0", "polymer-ui-collapsible": "Polymer/polymer-ui-collapsible#0.2.0" }, "version": "0.2.0" } </pre> <p>The key thing is that you don't have to worry about that because Bower manages that for you. This is why it's the preferred tool for installing Polymer.</p> <p>Installing via Bower will create a folder called <code>bower_components</code> in your project folder housing all of the stuff Polymer needs.</p> <h2>Making a New Polymer Element</h2> <p>The Polymer site pretty much nails the description of custom elements:</p> <p>“Custom Elements are the core building blocks of Polymer-based applications. You create applications by assembling custom elements together, either ones provided by Polymer, ones you create yourself, or third-party elements.”</p> <p>Polymer gives us the ability to create our own custom elements from scratch and even reuse other elements to extend our custom ones. This is done by first creating a template of the custom element. For all intents, this template is a combination of HTML, CSS and JavaScript and includes the functionality that will be available when you use the element. It's based off the <a href="">WhatWG HTML Templates specification</a> which is meant to provide native support for client-side templating.</p> <p>Let's look at this simple example of a Polymer template:</p> <pre class="brush: html"><link rel="import" href="../bower_components/polymer/polymer.html"> <polymer-element <template> > </template> </polymer-element></pre> <p>This Element allows you to easily add Lorem Ipsum text into your code by simply using the following tag:</p> <pre class="brush: html"><lorem-element></lorem-element></pre> <p>The first thing that needs to be included is Polymer core, which is the main API that allows you to define the Custom Elements:</p> <pre class="brush: html"><link rel="import" href="../bower_components/polymer/polymer.html"></pre> <p>The next step is defining the name of the new element using Polymer's <code>polymer-element</code> directive: </p> <pre class="brush: html"><polymer-element</pre> <p>In this case, I've named my new element <code>lorem-element</code>. The name is a required attribute and it must contain a dash (“-”). </p> <p>From there we use the <code>template</code> directive to wrap the main body tags and code that will make up our new element. For this simple example, I grab Lorem Ipsum text and wrapped it with paragraph tags.</p> <p>That's it! My custom element is done and I can now use it. </p> <h2>Using Your New Polymer Element</h2> <p>Keep in mind that this component will be imported into other pages in your web app that may want to leverage it. This is possible because of Polymer's implementation of the HTML Imports specification that allows you to include and reuse HTML documents in other HTML documents.</p> <p>First, you need to include <code>platform.js</code> which provides the polyfill that mimicks the native APIs:</p> <pre class="brush: html"><script src="bower_components/platform/platform.js"></script></pre> <p>Next, we need to import our custom element into our web page:</p> <pre class="brush: html"><link rel="import" href="lorem-element.html"></pre> <p>Once you've done this, your new custom element is now available allowing you to do something like this:</p> <pre class="brush: html"><div><lorem-element></lorem-element></div></pre> <p>You also have the ability to fully style the element as well: </p> <pre class="brush: html"><style> div { width: 300px;} lorem-element { font: bold 16px cursive;} </style></pre> <p>This is a pretty basic example. Let's take it a step further.</p> <h2>Adding More Functionality to Your Element</h2> <p>If you remember, I mentioned how you can leverage existing elements to enhance your custom one. Let's look at an example of this.</p> <p>Suppose I wanted to have an element that went out to Reddit and grabbed data from one of the subreddits. I could take advantage of Polymer's existing Ajax component by including that in my custom element like this:</p> <pre class="brush: html"><link rel="import" href="../bower_components/polymer/polymer.html"> <link rel="import" href="../bower_components/core-ajax/core-ajax.html"> <polymer-element <template> <core-ajax</core-ajax> <p>{{resp.data.public_description}}</p> </template> </polymer-element> </pre> <p:</p> <p>“Things that make you go AWW! Like puppies. And bunnies... and so on... A place for really cute pictures, videos and stories!”</p> <p>The response is returned and Polymer establishes a two-way data binding that allows me to be able to use the data by wrapping it in double curly braces like this <code>{{resp.data.public_description}}</code>.</p> <p>This is cool but in most cases, we're not going to hardcode a URL for a specific resource. Let's expand this further by adding attributes to our custom element. Doing this is incredibly simple. First, you need to update the <code>polymer-element</code> directive to reflect the attributes you want for your custom element:</p> <pre class="brush: html"><polymer-element</pre> <p>In this case, I want to be able to pass a subreddit to my element and have it pull back data based on that. I can now change the call to <code>polymer-ajax</code> like this:</p> <pre class="brush: html"><core-ajax</core-ajax></pre> <p>Notice how I'm using Polymer's data binding capabilities to dynamically build the URL based on the attribute value of <code>{{subreddit}}</code>. Now, I can update how I reference my custom element to pass in the subreddit that I want:</p> <pre class="brush: html"><reddit-element</reddit-element></pre> <p>The last thing I want to do is ensure there's a default value for my attribute so my code doesn't blow up. I do this by adding the following into my element template:</p> <pre class="brush: html"> <script> Polymer('reddit-element', { subreddit: "aww" }); </script></pre> <p>This ensures that I'll always have a default value for my element's public attribute. Here's how the final code looks like:</p> <pre class="brush: html">> </pre> <p>And there's quite a bit more stuff you can do including adding custom callback handlers, managing events, setting up Mutation Observers to process changes to the DOM and much more.</p> <h2>The Future Is Here</h2> <p-31T15:00:02.655Z 2014-03-31T15:00:02.655Z Rey Bango tag:code.tutsplus.com,2005:PostPresenter/cms-20442 Test Code Coverage: From Myth to Reality <p>There.</p> <p>But times have changed..</p> <p>Automated testing and test driven development (TDD) are some of the essential techniques Agile provided to us programmers. And a tool that comes with those methodologies is used to produce test code coverage, which is the topic of this article.</p> <h2>Definition</h2> <p>"In computer science, code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite." ~ Wikipedia </p> <p.</p> <p>Information can be presented in various ways, from simple percentages to nice graphics or even real-time highlighting in your favorite IDE.</p> <h2>Let's Check It in Action</h2> <p>We will use PHP as the language to exemplify our code. Additionally, we will need PHPUnit and XDebug to test our code and gather coverage data.</p> <h3>The Source Code</h3> <p>Here is the source code we will use. You can also find it in the attached archive.</p> <pre class="brush: php"; } }</pre> <p>The above code contains a simple function that wraps text to a specified number of characters, per line.</p> <h3>The Test Code</h3> <p>We wrote this code using <a href="">Test Driven Development (TDD)</a> and we have 100% code coverage for it. This means that by running our test, we exercise each and every line of the source code.</p> <pre class="brush: php")); } }</pre> <h3>Running the Tests in CLI With Text Only Coverage</h3> <p.</p> <p>Let's open a console and change directories in to your <code>test</code> folder. Then run <code>phpunit</code> with an option to generate coverage data as plain text.</p> <pre class="brush: bash">phpunit --coverage-text=./coverage.txt ./WordWrapTest.php</pre> <p>This should work out of the box on most systems if XDebug is installed, however in some cases, you may encounter an error related to time zones.</p> <pre class="brush: bash" phar:///usr/share/php/phpunit/phpunit.phar/ PHP_CodeCoverage-1.2.10/PHP/CodeCoverage/Report/Text.php on line 124 </pre> <p>This can be easily fixed by specifying the suggested setting in your <code>php.ini</code> file. You can find the way to specify your timezone in <a href="">this list</a>. I am from Romania, so I will use the following setting:</p> <pre class="brush: bash">date.timezone = Europe/Bucharest</pre> <p>Now, if you run the <code>phpunit</code> command again, you should see no error messages. Instead, the test results will be shown.</p> <pre class="brush: bash">PHPUnit 3.7.20 by Sebastian Bergmann. .. Time: 0 seconds, Memory: 5.00Mb OK (2 tests, 7 assertions) </pre> <p>And the coverage data will be in the specified text file.</p> <pre class="brush: bash">$ cat ./coverage.txt Code Coverage Report 2014-03-02 13:48:11 Summary: Classes: 100.00% (1/1) Methods: 100.00% (1/1) Lines: 2.68% (14/522) WordWrap Methods: 100.00% ( 1/ 1) Lines: 100.00% ( 7/ 7) </pre> <p>Let's analyze this a little bit.</p> <ul> <li><em>Classes</em>: refers to how many classes were tested and how many of them were covered. <code>WordWrap</code> is our only class.</li> <li><em>Methods</em>: same as with classes. We have only our <code>wrap()</code> method, nothing else.</li> <li><em>Lines</em>: same as above, but for lines of code. Here we have a lot of lines because the summary contains all the lines from PHPUnit itself.</li> <li>Then we have a section for each class. In our case, that is only <code>WordWrap</code>. Each section has its own methods and line details. </li> </ul> <p>Based on these observations, we can conclude that our code is 100% covered by tests. Exactly as we expected before analyzing the coverage data.</p> <h3>Generating HTML Coverage Output</h3> <p>By just changing a simple parameter for PHPUnit, we can generate nice HTML output.</p> <pre class="brush: bash">$ mkdir ./coverage $ phpunit --coverage-html ./coverage ./WordWrapTest.php </pre> <p>If you check your <code>./coverage</code> directory, you will find a lot of files there. I won't paste the list here because it is quite extensive. Instead, I will show you how it looks in a web browser.</p><figure class="post_image"><img alt="" src=""></figure><p>This is the equivalent of the summary section from the text version above. We can zoom in by following the proposed links and see more details.</p><figure class="post_image"><img alt="" src=""></figure><h3>Coverage Inside Our IDE</h3> <p>The previous examples were interesting and they are quite useful, <em>if</em> your code is built on some remote server to which you have only SHH or web access to. But wouldn't it be nice to have all this info, live in your IDE?</p> <p>If you use PHPStorm, everything is within the distance of a single click! Select to run your tests with coverage and all the info will just simply show up, magically.</p><figure class="post_image"><img alt="" src=""></figure><p>The coverage information will be present in your IDE, in several ways and in several places:</p><figure class="post_image"><img alt="" src=""></figure> <ol> <li>Test coverage percentage will be shown near each directory and file.</li> <li.</li> <li>On the right side there will be file browsers where you can quickly browse and sort files by coverage.</li> <li>In the test output, you will see a line of text announcing to you that code coverage was generated.</li> </ol> <h2>The Myths About Code Coverage</h2> <p.</p> <p.</p> <p?</p> <pre class="brush: php">function testItCanWrap() { $w = new WordWrap(); $this->assertEquals("a b\nc", $w->wrap('a b c', 3)); $this->assertEquals("a\nbc\nd", $w->wrap('a bc d', 3)); }</pre> <p>That's it. Two assertions and full coverage. This is not what we want. This test is so far from descriptive and complete, that it is ridiculous.</p> <h2>The Reality About Code Coverage</h2> <p>Code coverage is a status indicator, not a unit to measure performance or correctness.</p> <p>Code coverage is for programmers, not for managers. It is a way to spot problems in our code. A way to find old, untested classes. A way to find paths not exercised by the tests that could lead to problems.</p> <p>On real projects, code coverage will always be under 100%. Achieving perfect coverage is not possible, or if it is, it's rarely a must. However, to have 98% of coverage you must target 100%. Having anything else as your target is non-sense.</p> <p>Here is the code coverage on Syneto's StorageOS configuration application.</p><figure class="post_image"><img alt="" src=""></figure><p>The total is only about 35%, but the results need interpretation. Most of the modules are in the green, with more than 70% coverage. However there is a single folder, <code>Vmware</code>,.<br></p> <h2>Final Thoughts</h2> <p-28T15:00:12.697Z 2014-03-28T15:00:12.697Z Patkos Csaba tag:code.tutsplus.com,2005:PostPresenter/cms-20405 Easily Deploy Redis Backed Web Apps With Docker <p>The people who make <a href="">Docker</a> like to describe it using a metaphor to a pretty ancient piece of technology: the shipping container. </p> <p. </p> <p>Docker tries to take this same level of convenience and bring it to the server world. It's the natural extension of tools like <a href="">Vagrant</a>. </p> <h2>Introduction</h2> <p. </p> <p>We'll just be deploying a toy sample app, but the steps to deploy your own real apps would be very similar. </p> <p. </p> <h2>Installing Docker</h2> <p>The first step is to install Docker itself. Docker is under very quick development, so the easiest way to install it often changes quite quickly. Check out Docker's <a href="">getting started section</a> if you want to check out the cutting edge. </p> <p>Otherwise, follow the steps below and we'll set up a Vagrant virtual machine based install of Docker that will work on any of the major operating systems. First head over to <a href="">Vagrant's website</a> and install the latest Vagrant and VirtualBox for your OS. </p> <p>Once Vagrant is installed, make a new folder, open a command prompt there and do the following:</p> <pre class="brush: bash">vagrant init hashicorp/precise64 (... wait a while ...) vagrant up vagrant ssh </pre> <p>Vagrant just took care of creating a virtual machine running Ubuntu 12.04 for you and you're now SSH'd into its prompt. We can now follow Docker's Ubuntu installation instructions. Check <a href="">the website</a> in case there have been any changes since this was written, but most likely, you can directly paste the following commands into the terminal:</p> <pre class="brush: bash"># install the backported kernel sudo apt-get update sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring # reboot sudo reboot </pre> <p>You'll get dropped back to your local machine's prompt when the VM reboots, so wait a few moments and do another:</p> <pre class="brush: bash">vagrant ssh </pre> <p>... to SSH back into your VM. Now that Docker's prerequisites have been installed successfully, we need to go ahead and install Docker itself. Paste in the following command:</p> <pre class="brush: bash">curl -s | sudo sh </pre> <p>... which will grab a simple Docker install script from Docker's site and run it. Docker should now be installed successfully, so let's start playing with it. </p> <h2>Getting Started With Docker</h2> <p>Once <code>apt-get</code> has finished its magic, do the following:</p> <pre class="brush: bash">sudo Docker run -i -t ubuntu /bin/bash </pre> <p>... <code>root</code> and <code>#</code> sign in the prompt. You're running as the root user in a new virtual environment. If you issue a <code>users</code> command, you'll see that your other users are no longer present. </p> <p>It's worth taking a minute to explain what the <code>docker</code> command you just typed did and how this magic happened.</p> <h2>The <code>run</code> Command</h2> <p>The Docker utility seems to have taken a lot of inspiration from <code>git</code>'s command line interface and as a result, it makes use of subcommands. In this case, we ran the <code>run</code> subcommand. The <code>run</code> command requires two arguments: an image and a command. </p> <p>It's also smart, so if (as in this case) you don't have that image installed, it will query the central Docker repository and download one for you. Here we told it to run an <code>ubuntu</code> image and informed Docker that it should start <code>/bin/bash</code> inside that image. The <code>-t</code> and <code>-i</code> <code>chroot</code> command than to more traditional virtualization tools like VMWare or VirtualBox. </p> <p>There are some other key differences from standard virtualization tools. Let's do a quick experiment and create a file and print out the contents of it:</p> <pre class="brush: bash">echo An experiment > experiment.txt </pre> <p>Now when you do:</p> <pre class="brush: bash">cat experiment.txt </pre> <p>It will happily print out:</p> <pre class="brush: bash">An experiment </pre> <p>So far so good, our silly experiment is working exactly as expected. Let's exit Docker and get back to our host machine's command prompt:</p> <pre class="brush: bash">exit </pre> <p>If you restart Docker with the same command you used before: </p> <pre class="brush: bash">sudo Docker run -i -t ubuntu /bin/bash </pre> <p>... you'll notice that things are no longer behaving quite the way you would expect. If you try to cat the file we created last time, you now get an error message:</p> <pre class="brush: bash">root@e97acdf4160c:/# cat experiment.txt cat: experiment.txt: No such file or directory </pre> <p>So what's going on? Changes to Docker images don't persist by default. To save your changes to a Docker image, you have to <code>commit</code> them, <code>git</code> style. This might take a little getting used to, but it's quite powerful because it means you can also "branch" them <code>git</code> style (more on that later). </p> <h2>Saving New Images</h2> <p>For now, let's do something a little more useful. Let's install <code>python</code>, <code>redis</code> and a few other utilities that we'll use to run our demo app shortly. Afterwards, we'll <code>commit</code> to persist our changes. Start a copy of Docker up on the latest Ubuntu image:</p> <pre class="brush: bash">docker -t -i ubuntu /bin/bash </pre> <p>The Ubuntu base image may not include Python, so check if you've got a copy by typing <code>python</code> at the prompt. If you get an error message, then let's install it:</p> <pre class="brush: bash">apt-get update apt-get install python </pre> <p>So far, so good. It's possible that later we'll want to make other projects that make use of Python, so let's go ahead and save these changes. Open up another command prompt (if you're using the Vagrant install recommended above, you'll have to <code>vagrant ssh</code> again from a separate prompt) and do the following:</p> <pre class="brush: bash">docker ps </pre> <p>You'll get a list like below, of all the Docker containers that are currently running:</p> <pre class="brush: plain">ID IMAGE COMMAND CREATED STATUS PORTS 54a11224dae6 ubuntu:12.04 /bin/bash 6 minutes ago Up 6 minutes </pre> <p>The number under the ID column is important: this is the ID of your container. These are unique, if you exit your container and run the same image again, you'll see a new number there. </p> <p>So now that we have Python installed, let's save our changes. To do this you use the <code>commit</code> command which takes two arguments: the container whose changes you want to store and the image name. The Docker convention is to use a userid followed by a <code>/</code> and the short name of the image. So in this case, let's call it <code>tuts/python</code>. Issue the following command to save your Python installation, making sure to substitute the ID for your container from the last step</p> <pre class="brush: bash">docker commit tuts/python </pre> <p>After a few seconds, it will return with a series of letters and numbers. This is the ID of the image you just saved. You can run this image whenever you want and refer to it either by this ID number or by the easier to remember <code>tuts/python</code> name we assigned to it. </p> <p>Let's run a copy of the image we just made:</p> <pre class="brush: bash">docker run -t -i tuts/python /bin/bash </pre> <p>At this point, you should have two terminal windows open running two separate Docker sessions.</p> <p>You'll notice now that if you type <code>python</code> in either one, you won't get an error message anymore. Try creating a file in the second window: </p> <pre class="brush: bash">touch /testfile </pre> <p>Now switch back to your original Docker window and try to look at the file:</p> <pre class="brush: bash">cat /testfile </pre> <p>You'll get an error message. This is because you're running an entirely different "virtual machine" based on the image you created with the <code>docker commit</code> command. Your file systems are entirely separate. </p> <p>If you open up yet another terminal (again, you'll have to run <code>vagrant ssh</code> if using Vagrant) and do the following:</p> <pre class="brush: bash">docker ps </pre> <p>... you'll see that <code>docker</code> now lists two running images, not just one. You can separately commit to each of those images. To continue with the <code>git</code> metaphor, you're now working with two branches and they are free to "diverge". </p> <p>Let's go ahead and close the last window we opened. If you run <code>docker ps</code> again, there will now only be one ID listed. But what if you want to get back to a previous container? If you type:</p> <pre class="brush: bash">docker ps -a </pre> <p>Docker will list out all previous containers as well. You can't run a container that has exited, but you can use previous container's IDs to commit new images. Running the new image will then effectively get you back to your previous container's state.</p> <p <code>redis</code>, and the Redis server itself. </p> <pre class="brush: bash">apt-get install python-pip redis-server pip install redis bottle </pre> <p>Once these finish, let's commit this image. From another terminal window, run the following command:</p> <pre class="brush: bash">docker ps </pre> <p>... and take a note of the ID and commit it under the name <code>tuts/pyredis</code>:</p> <pre class="brush: bash">docker commit tuts/pyredis </pre> <p>So we now have a Docker image that contains the necessary tools to run a small Python web app with Redis serving as a backend. If you have any future projects that will use the same stack, all you have to do to get them started is: <code>docker run -t -i tuts/pyredis /bin/bash</code> and commit once you've added your source code. </p> <p>Ok, so our backend is set up. Now to set up the app itself!</p> <h2>Getting Your Source App Into the Image</h2> <p <code>vagrant ssh</code> session) first:</p> <pre class="brush: bash">cd git clone pyredis </pre> <p>In your host machine's home directory you'll now have a <code>pyredis</code> folder which contains the Python script we'll be using. So, how do we go about copying this app into our Docker image? </p> <p>Well, Docker has a nice feature that lets you mount a local directory inside your container. Let's run another Docker image and mount the folder:</p> <pre class="brush: bash">docker run -v ~/pyredis:/tuts:rw -t -i tuts/pyredis /bin/bash </pre> <p>This is just like our <code>run</code> commands from before, with the addition of the <code>-v</code> parameter. </p> <p>In effect, this command lets you share a folder between Docker and your host machine. The <code>:</code>'s indicate the paths to share. In our case, we're sharing our <code>pyredis</code> folder, located at <code>~/pyredis</code> on our machine, and mounting it at <code>/tuts</code> inside the Docker image. The <code>rw</code> on the end is for 'read-write' and means that changes made on the Docker image will also show up on our machine. </p> <p>At your Docker prompt, you can now do:</p> <pre class="brush: bash">cd /tuts ls </pre> <p>... and see the contents of the <code>~/pyredis</code> folder on your machine.</p> <p>This share is temporary though, if you run this Docker image on another computer or re-run this image without the <code>-v</code> option, the image will no longer have access to it. Let's copy it to another location inside the actual Docker image:</p> <pre class="brush: bash">cp -R /tuts/ /pyredis </pre> <p>Since changes to Docker file systems are ephemeral by default, let's save this to the image by again doing <code>docker ps</code> to get our container ID and committing our changes:</p> <pre class="brush: bash">docker commit tuts/pyredis </pre> <p>You'll notice here we committed to the same image name we committed to last time, <code>tuts/pyredis</code>. Docker will update the image and it will keep a log of all your changes for you. Like <code>git</code>, if you mess up, you can go back to a good version simply by <code>docker run</code>'ing its ID. To see the history of an image, try the following:</p> <pre class="brush: bash">docker history tuts/pyredis </pre> <p>You'll see something like this:</p> <pre class="brush: plain">ID CREATED CREATED BY tuts/pyredis:latest 17 seconds ago /bin/bash 4c3712e7443c 25 hours ago /bin/bash ubuntu:12.10 6 months ago /bin/bash 27cf78414709 6 months ago </pre> <p>This is a history of all the commits we made in the process of creating the <code>tuts/pyredis</code> image, including those we committed to different names like <code>tuts/python</code>. If you want to go back to the commit right before we copied our <code>pyredis</code> app into <code>/pyredis</code> you could try (changing the IDs to match what yours shows):</p> <pre class="brush: bash">docker run -t -i 4c3712e7443c /bin/bash </pre> <p>... and you'll find there's no <code>/pyredis</code> directory. </p> <h2>Running the App</h2> <p>So now we have all the pieces in place. The next step is to actually run the app from inside its container. Since we're deploying a web app, we're also going to need to specify some way to access the app over the web. The <code>run</code> command has got you covered (again). Docker's run command supports a <code>-p</code> option that lets you specify how ports will be mapped. </p> <p>If you're using Vagrant to run Docker, you'll need to set up Vagrant's port forwarding before we can do any meaningful tests. If you're not using Vagrant, then just skip this step.</p> <h3>Setting Up Vagrant Port Forwards</h3> <p <code>tuts/pyredis</code> Docker instance's port 8080. </p> <p>On your local machine, go back to the folder where you first typed <code>vagrant init</code>. You'll find a text file there called simply <code>Vagrantfile</code>. Open it up in your favorite text editor and look for the following portion:<, host: 8080 </pre> <p>Uncomment the final line and change the ports from 80 and 8080 to <code>8080</code> and <code>9000</code>. The result should look like this:<80, host: 9000 </pre> <p>Now run: </p> <pre class="brush: bash">vagrant reload </pre> <p>... which will cause the Vagrant VM to restart itself with the correct port forwards. Once this is complete, you can run <code>vagrant ssh</code> again and continue the tutorial. </p> <p>Our little <code>pyredis</code> app by default, opens a small web server on port 8080. The following command will let you access port 8080 via port 9000 on your host machine:</p> <pre class="brush: bash">docker run -t -i -p 9000:8080 tuts/pyredis /bin/bash </pre> <p>You'll get a Docker root prompt, so let's start up our app:</p> <pre class="brush: bash">redis-server 2>&1 > /dev/null & python /pyredis/app.py </pre> <p>If all goes well, you'll see the following:</p> <pre class="brush: bash">Bottle v0.11.6 server starting up (using WSGIRefServer())... Listening on Hit Ctrl-C to quit. </pre> <p>This means the server is running. On your local machine, fire up a web browser and point it to <code>localhost:9000</code> (if you're doing this tutorial on a remote server, then make sure you have network access to port 9000 and replace <code>localhost</code> with the address of your web server).</p> <p.</p> <h2>Saving Your Run Config</h2> <p>So this is all great for testing, but the goal here is to be able to deploy your app. You don't want to have to type in the commands to start your app manually each time. </p> <p>Docker again comes to the rescue. When you commit, Docker can automatically save some run info, such as which ports to map and what commands to run when the image starts. This way, all you have to do is type <code>docker <image_name></code> and Docker will take care of the rest. True containerization. </p> <p>For our script, we only have two commands to run at startup:</p> <pre class="brush: bash">redis-server 2>&1 > /dev/null & python /pyredis/app.py </pre> <p>The easiest way to do that is to create a small launch script that runs these two commands. Let's start our <code>tuts/pyredis</code> again and add a small launch script (just directly copy and paste the below, into the Docker prompt):</p> <pre class="brush: bash">docker run -t -i tuts/pyredis /bin/bash cat > /pyredis/launch.sh <&1 > /dev/null & #!/bin/sh python /pyredis/app.py EOF chmod +x /pyredis/launch.sh </pre> <p>This saved the commands we use to launch our Python server into a small bash script called <code>launch.sh</code> and sets the executable bit so that it's easier to run. </p> <p>Now that the script is in the image successfully, from another terminal, commit it so that it will persist (remember to do a <code>docker ps</code> to get your latest container's ID first):</p> <pre class="brush: bash">docker commit tuts/pyrdis </pre> <p>Let's test this. If you exit out of your Docker prompt and run it again with the following command, you should be able to access the pyredis web app at <code>localhost:9000</code>, just like last time.</p> <pre class="brush: bash">docker run -t -i -p 8000:8080 tuts/pyredis /bin/bash /pyredis/launch.sh </pre> <code>docker run <image_name></code> and Docker takes care of the rest. </p> <p>To configure this, you need to pass in some JSON information to the commit command. There are a <a href="">lot of parameters</a> you can use, but for now we'll just concern ourselves with mapping ports and initialization scripts. Fire up your favorite text editor and paste in the following:</p> <pre class="brush: bash">{ "cmd": [ "/bin/bash", "/pyredis/launch.sh" ], "PortSpecs": [ "9000:8080" ] } </pre> <p>This represents the information we typed in the <code>-p</code> option as well as the path to the launch script. One important bit to note is that for the <code>cmd</code> option, every place where you would normally use a space is actually being passed as a separate parameter. </p> <p>Save that JSON snippet to a file called <code>runconfig.json</code> and let's update Docker to use it.</p> <pre class="brush: bash">docker commit -run=$(cat runconfig.json) tuts/pyredis </pre> <p>Now if you do:</p> <pre class="brush: bash">docker run tuts/pyredis </pre> <p>You'll see <code>bottle</code> start up and you can access the app via the browser. </p> <h2>Deploying Public Images to a Server Via the Public Docker Registry</h2> <p. </p> <p>This is pretty straightforward, so I'll refer you to <a href="">Docker's own documentation</a>. If you instead want to deploy privately, then read on to the next section(s).</p> <h2>Deploying Private Images to a Server (the Easy Way)</h2> <p>Great, so now we've got an easy to use Docker image running on your machine. The next step is to deploy it to a server!</p> <p: </p> <ol> <li>You can bypass Docker's repository features entirely and manually transfer images.</li> <li>You can create your own repository. </li> </ol> <p. </p> <p>The first step is to export your container into a <code>.tar</code> archive. You can do this via Docker's <code>export</code> command. To deploy the example app we've been using in this tutorial, you would do something like this:</p> <pre class="brush: bash">docker export > pyredis.tar </pre> <p>Docker will sit and process for some time, but afterwards you will have a <code>pyredis.tar</code> file that contains the image you created. You can then copy <code>pyredis.tar</code> to your server and run the following:</p> <pre class="brush: bash">cat pyredis.tar | Docker import - </pre> <p>Docker will again sit for a while and eventually spit out the ID of the new image it has created. You can <code>commit</code> this to a more memorable name by doing this:</p> <pre class="brush: bash">docker commit tuts/pyredis </pre> <p>Our tutorial app is now deployed and you can run it with the same run command as before:</p> <pre class="brush: bash">docker run -t -i -p 8000:8080 tuts/pyredis /bin/bash /pyredis/launch.sh </pre> <h2>Deploying Private Images to a Server (the Cool Way)</h2> <p>The cooler way to deploy your app is to host your own Docker repository. Get Docker installed on a machine and run the following command:</p> <pre class="brush: bash">docker run -p 5000:5000 samalba/docker-registry </pre> <p>Wait a bit for it to download the pieces and you should soon see some messages about starting unicorn and booting workers. </p> <p</p> <pre class="brush: bash">docker login localhost:5000 </pre> <p>Go ahead and enter in the username, password and email you'd like to use with your Docker repository. </p> <p>In order to push the <code>tuts/pyredis</code> app into the repo, we first have to "tag" it with the private repository address information like so:</p> <pre class="brush: bash">docker tag tuts/pyredis localhost:5000/tuts/pyredis </pre> <p>This tells Docker to create a new "tag" of <code>tuts/pyredis</code> and associate it with the repo running at <code>localhost:5000</code>. You can think of this tag as this image's name in the repository. For consistency, I have kept the names the same and tagged it <code>localhost:5000/tuts/pyredis</code>, but this name could easily be something completely different (like <code>localhost:5000/pyredis_prod</code>.) </p> <p>If you run <code>docker images</code> now, you will see that there's a new image listed with the name <code>localhost:5000/tuts/pyredis</code>. Docker's mechanism for specifying repositories is closely linked to its mechanism for naming (or tagging as Docker puts it), so this is all you need. </p> <p>To push the image we've created into our repository, just do <code>docker push</code> and the full tagged image name (including the address):</p> <pre class="brush: bash">docker push localhost:5000/tuts/pyredis </pre> <p>Docker will connect to your repository running at <code>localhost:5000</code> and start to push your changes. You'll see a lot of messages about the various HTTP requests involved showing up in the other terminal window (the one running <code>samalba/docker-registry</code>), and information about the upload will go by in this one. This will take awhile, so you might want to grab a coffee. </p> <p <code>samalba/docker-registry</code> Docker container.</p> <p>To do this, do the usual <code>docker ps</code> to get the ID of the running <code>samalba/docker-registry</code> container and then commit it to a new container. This isn't ideal, if doing this in production you would want to configure Docker volumes or use the <code>-v</code> option from above to persist the repo's file directly to the server, instead of inside the container, but that's outside the scope of this tutorial.</p> <p>Now for the fun part: deploying our new Docker image on a new server. Since at the time of this writing, Docker repositories don't have any security or authentication mechanisms, we'll do our work over secure SSH tunnels. From the virtual machine where you set up the <code>tuts/pyredis</code> tutorial, <code>ssh</code> into your production server and forward port 5000 like so:</p> <pre class="brush: bash">ssh -R 5000:localhost:5000 -l </pre> <p>The <code>-R</code> flag to <code>ssh</code> means that when you connect to <code>localhost:5000</code> on your production server, SSH will forward the connection back to port 5000 on your virtual machine, which is in turn getting forwarded to the <code>samalba/docker-registry</code> container where our repo is living. </p> <p>If Docker is not installed on this server, go ahead and install it as per the installation directions. Once you have Docker running, deploying your image is as simple as:</p> <pre class="brush: bash">docker pull localhost:5000/tuts/pyredis </pre> :</p> <pre class="brush: bash">docker run tuts/pyredis </pre> <h2>Wrap-Up & Next Steps</h2> <p>So that's the basics of Docker. With this information you can now create and manage Docker images, push and pull them to public and private repos and deploy them to separate servers. </p> <p>This is an intro tutorial, so there are lots of Docker features that weren't covered here. Two of the most notable ones are Dockerfiles and volumes. </p> <p <a href="">own documentation</a>.</p> <p>The second feature is volumes. Volumes work a bit like the shared folders we covered with the <code>-v</code> option, in that they allow Docker containers to persist their data. Unlike folder sharing with <code>-v</code>, they don't share with the host system, but they can be shared between images. You can check out <a href="">this tutorial</a> for a good introduction. <-26T15:00:13.184Z 2014-03-26T15:00:13.184Z Nik van der Ploeg tag:code.tutsplus.com,2005:PostPresenter/cms-20369 Securely Handling User's Login Credentials <p.</p><h2>Securing the Username and Password</h2> <p.</p> <p.<. </p><h3>Disadvantages</h3> <p.</p> <p.</p> <p>Always be careful while using email as the login to not show it publicly, for both privacy reasons and spam prevention issues.</p> <h2>Logins Can Provide Too Much Info</h2> <p <em>and</em> when the password doesn't match the password for the given user. The message should indicate that the combination of username and password was not correct, to let the user know to verify both pieces of information, not just one or the other.</p> <p.</p><figure class="post_image"><img alt="" src=""><=""></figure>.<br></p> <p.</p> <p.</p> <h2>Securing Passwords</h2> <p.</p><h3>Salting and Hashing</h3> .</p> <p.</p><h3>Password Reset Links</h3> <p.</p> <h3>Resetting a Password Via Email</h3><p <a href=""></a>.</p> <h2>Two Step Authentication</h2> <p.<.</p> <p.</p> <h2>Conclusion</h2> <p.</p> <p-24T15:00:10.331Z 2014-03-24T15:00:10.331Z Bill Morefield tag:code.tutsplus.com,2005:PostPresenter/cms-20331 Refactoring Legacy Code: Part 1 - The Golden Master <p>Old code. Ugly code. Complicated code. Spaghetti code. Jibberish nonsense. In two words, <em>Legacy Code</em>. This is a series that will help you work and deal with it.</p> <p>In an ideal world, you would write only new code. You would write it beautiful and perfect. You would never have to revisit your code and you will never have to maintain projects ten years old. In an ideal world...</p> <p.</p> <h2>Definition of Legacy Code</h2> <p.</p> <blockquote>To me, <em>legacy code</em> is simply code without tests. ~ Michael Feathers</blockquote> <p>Well, that is the first formal definition of the expression <em>legacy code</em>, published by Michael Feathers in his book <a href="">Working Effectively with Legacy Code</a>..</p> <h2>Getting Our Legacy Code</h2> <p>This series will be based on the exceptional Trivia Game by <a href="">J.B. Rainsberger</a> designed for <a href="">Legacy Code Retreat</a> events. It is made to be like real legacy code and to also offer opportunities for a wide variety of refactoring, at a decent level of difficulty.</p> <h3>Check Out the Source Code</h3> <p.</p> <pre class="brush: bash"> $.</pre> <p>When you open the <code>trivia</code> directory you will see our code in several programming languages. We will work in PHP, but you are free to choose your favorite one and apply the techniques presented here.</p> <h2>Understanding the Code</h2> <p>By definition, legacy code is difficult to understand, especially if we don't even know what it's supposed to do. So the first step is to run the code and make some kind of reasoning, what it is about.</p> <p>We have two files in our directory.</p> <pre class="brush: bash">$</pre> <p><code>GameRunner.php</code> seems to be a good candidate for our attempt to run the code.</p> <pre class="brush: bash">$.</pre> <p>OK. Our guess was correct. Our code ran and produced some output. Analyzing this output will help us deduce some basic idea about what the code does.</p> <ol> <li>We know it's a Trivia game. We knew it when we checked out the source code.</li> <li>Our example has three players: Chet, Pat and Sue.</li> <li>There is some kind of rolling of a dice or similar concept.</li> <li>There is a current location for a player. Possibly on some kind of board?</li> <li>There are various categories from which questions are asked.</li> <li>Users answer questions.</li> <li>Correct answers give players gold.</li> <li>Wrong answers send players to the penalty box.</li> <li>Players can get out of penalty box, based on some not quite clear logic.</li> <li>It seems like the user that first reaches six gold coins wins.</li> </ol> <p.</p> <h2>Scanning the Code</h2> <p>Now that we have an idea about what the code outputs, we can start looking at it. We will start with the runner.</p> <h3>The Game Runner</h3> <p>I like to start with running all the code through the formatter of my IDE. This greatly improves readability by making the code's form familiar with what I am used to. So this:</p><figure class="post_image"><img alt="" src=""></figure><p>... will become this:<br></p><figure class="post_image"><img alt="" src=""></figure><p>... which is somewhat better. It may not be a huge difference with this small amount of code, but it will be on our next file.<br></p> <p>Looking at our <code>GameRunner.php</code>.</p> <h3>The Game File</h3> <p>We should do the same formatting on the <code>Game.php</code> file also.</p> <p. </p> <h2>The Golden Master</h2> <p>And the thought of change leads us to our lack of tests. The methods we saw in <code>Game.php</code>.</p> <h3>So What Is This Golden Master?</h3> <p.</p> <p.</p> <h3>Writing the Golden Master Generator</h3> <p.</p> <p>You will find in the attached code archive, inside the <code>source</code> folder but outside the <code>trivia</code> folder our <code>Test</code> folder. In this folder, we create a file: <code>GoldenMasterTest.php</code>.</p> <pre class="brush: php">class GoldenMasterTest extends PHPUnit_Framework_TestCase { function testGenerateOutput() { ob_start(); require_once __DIR__ . '/../trivia/php/GameRunner.php'; $output = ob_get_contents(); ob_end_clean(); var_dump($output); } }</pre> <p>We could do this in many ways. We could, for example, run our code from the console and redirect its output to a file. However, having it in a test that is easily run inside our IDE is an advantage we should not ignore.</p> <p>The code is quite simple, it buffers the output and puts it into the <code>$output</code> variable. The <code>require_once()</code> will also run all the code inside the the included file. In our var dump we will see some already familiar output.</p><figure class="post_image"><img alt="" src=""></figure><p>However on a second run, we can observe something odd:<br></p><figure class="post_image"><img alt="" src=""></figure><p>... the outputs differ. Even though we ran the same code, the output is different. The rolled numbers are different, the players' positions are different.<br></p> <h3>Seeding the Random Generator</h3> <pre class="brush: php">do { $aGame->roll(rand(0, 5) + 1); if (rand(0, 9) == 7) { $notAWinner = $aGame->wrongAnswer(); } else { $notAWinner = $aGame->wasCorrectlyAnswered(); } } while ($notAWinner);</pre> <p>By analyzing the essential code from the runner, we can see that it uses a the function <code>rand()</code> to generate random numbers. Our next stop is the official PHP documentation to research this <code>rand()</code> function.</p> <blockquote>The random number generator is seeded automatically.</blockquote> <p>The documentation tells us that seeding happens automatically. Now we have another task. We need to find a way to control the seed. The <code>srand()</code> function can help with that. Here is its definition from the documentation.</p> <blockquote>Seeds the random number generator with seed or with a random value if no seed is given.</blockquote> <p>It tells us, that if we run this before any call to <code>rand()</code>, we should always end up with the same results.</p> <pre class="brush: php">function testGenerateOutput() { ob_start(); srand(1); require_once __DIR__ . '/../trivia/php/GameRunner.php'; $output = ob_get_contents(); ob_end_clean(); var_dump($output); }</pre> <p>We put <code>srand(1)</code> before our <code>require_once()</code>. Now the output is always the same.</p><figure class="post_image"><img alt="" src=""></figure><h3>Put the Output in a File<br></h3> <pre class="brush: php"; } }</pre> <p>This change looks reasonable. Right? We extracted the code generation into a method, run it twice, and expected the output to be equal. However they won't be.</p><figure class="post_image"><img alt="" src=""></figure><p>The reason is that <code>require_once()</code> will not require the same file twice. The second call to the <code>generateOutput()</code> method will produce an empty string. So, what could we do? What if we simply <code>require()</code>? That should be run each time.<br></p><figure class="post_image"><img alt="" src=""></figure><p>Well, that leads to another problem: <code>"Cannot redeclare echoln()"</code>. But where is that coming from? It is right at the beginning of the <code>Game.php</code> file. The reason why this error is occurring is because in <code>GameRunner.php</code> we have <code>include __DIR__ . '/Game.php';</code>, which tries to include the Game file twice, each time when we call the <code>generateOutput()</code> method.<br></p> <pre class="brush: php">include_once __DIR__ . '/Game.php';</pre> <p>Using <code>include_once</code> in <code>GameRunner.php</code> will solve our problem. Yes, we needed to modify <code>GameRunner.php</code> without having tests for it, yet! However, we can be 99% sure that our change will not break the code itself. It is a small and simple enough change to not scare us very much. And most importantly, it makes the tests pass.</p><figure class="post_image"><img alt="" src=""></figure> <h3>Run It Several Times</h3> <p>Now that we have code we can run many times, it's time to generate some output.</p> <pre class="brush: php"--; } }</pre> <p>We extracted another method here: <code>generateMany()</code>..</p> <p>But wait! The same player wins every time? Is that possible?</p> <pre class="brush: bash".</pre> <p>Yes! It is possible! It is more than possible. It is a sure thing. We have the same seed for our random function. We play the same game over and over again.</p> <h3>Run It Differently Each Time</h3> <p.</p> <pre class="brush: php"; }</pre> <p>This still keeps our test passing, so we are sure we generate the same complete output each time, while the output plays a different game for each iteration. </p> <pre class="brush: bash".</pre> <p>There are various winners for the game in a random fashion. This looks good.</p> <h3>Getting to 20,000</h3> <p>The first thing you may try is to run our code for 20,000 game iterations.</p> <pre class="brush: php"); }</pre> <p>This will almost work. Two 55MB files will be generated.</p> <pre class="brush: bash">ls -alh /tmp/gm* -rw-r--r-- 1 csaba csaba 55M Mar 14 20:38 /tmp/gm2.txt -rw-r--r-- 1 csaba csaba 55M Mar 14 20:38 /tmp/gm.txt</pre> <p.</p><figure class="post_image"><img alt="" src=""></figure><p>In other words, we generate good files, but PHPUnit cannot compare them. We need a work-around.<br></p> <pre class="brush: php">$this->assertFileEquals('/tmp/gm.txt', '/tmp/gm2.txt');</pre> <p>That seems to be a good candidate, but it still fails. What a shame. We need to research the situation further.</p> <pre class="brush: php">$this->assertTrue($file_content_gm == $file_content_gm2);</pre> <p>This however, is working.</p><figure class="post_image"><img alt="" src=""></figure><div> <p>It can compare the two strings and fail if they are different. It has however, a small price. It won't be able to exactly tell what is wrong when the strings differ. It will just simply say <code>"Failed asserting that false is true."</code>. But we will deal with that in an upcoming tutorial.</p> <h2>Final Thoughts</h2> <p <code>gm.txt</code> file untouched and generate another one only once per run. But 12 seconds is still a huge amount of time for such a small code base. </p> <p>By the time we finish this series, our tests should run in less than a second and test all the code properly. So, stay tuned for our next tutorial when we will tackle problems like magic constants, magic strings and complex conditionals. Thanks for reading.<-21T15:00:02.747Z 2014-03-21T15:00:02.747Z Patkos Csaba tag:code.tutsplus.com,2005:PostPresenter/cms-20290 Testing Your Ruby Code With Guard, RSpec & Pry: Part 2 <p>Welcome back! If you missed the <a href="" target="_self">first part of our journey</a> so far, then you might want to go back and catch-up first.</p> <p.</p> <h2>Other RSpec Features</h2> <p>Let's take a moment to review some other RSpec features that we've not needed in this simple example application, but you may find useful working on your own project.</p> <h3>Pending Statement</h3> <p>Imagine you write a test but you're interrupted, or you need to leave for a meeting and haven't yet completed the code required to get the test to pass.</p> <p>You could delete the test and re-write it later when you're able to come back to your work. Or alternatively you could just comment the code out, but that's pretty ugly and definitely no good when using a version control system.</p> <p>The best thing to do in this situation is to define our test as 'pending' so whenever the tests are run, the test framework will ignore the test. To do this you need to use the <code>pending</code> keyword:</p> <pre class="brush: ruby">describe "some method" do it "should do something" pending end end </pre> <h3>Set-Up and Tear-Down</h3> <p>All good testing frameworks allow you to execute code before and after each test is run. RSpec is no different. </p> <p>It provides us <code>before</code> and <code>after</code> methods which allows us to set-up a specific state for our test to run, and to then clean up that state after the test has run (this is so the state doesn't leak and effect the outcome of subsequent tests).</p> <pre class="brush: ruby">describe "some method" do before(:each) do # some set-up code end after(:each) do # some tear-down code end it "should do something" pending end end </pre> <h3>Context Blocks</h3> <p>We've already seen the <code>describe</code> block; but there is another block which is functionally equivalent called <code>context</code>. You can use it every where you would use <code>describe</code>.</p> <p>The difference between them is subtle but important: <code>context</code> allows us to define a state for our test. Not explicitly though (we don't actually set the state by defining a <code>context</code> block - it instead is for readability purposes so the intent of the following code is clearer). </p> <p>Here is an example:</p> <pre class="brush: ruby">describe "Some method" do context "block provided" do it "yields to block" do pending end end context "no block provided" do it "calls a fallback method" do pending end end end </pre> <h3>Stubs</h3> <p>We can use the <code>stub</code> method to create a fake version of an existing object and to have it return a pre-determined value.</p> <p>This is useful in preventing our tests from touching live service APIs, and guiding our tests by giving predictable results from certain calls.</p> <p>Imagine we have a class called <code>Person</code> and that this class has a <code>speak</code> method. We want to test that method works how we expect it to. To do this we'll stub the <code>speak</code> method using the following code:</p> <pre class="brush: ruby">describe Person do it "speak()" do bob = stub() bob.stub(:speak).and_return('hello') Person.any_instance.stub(:initialize).and_return(bob) instance = Person.new expect(instance.speak).to eq('hello') end end </pre> <p>In this example, we say that 'any instance' of the <code>Person</code> class should have its <code>initialize</code> method stubbed so it returns the object <code>bob</code>.</p> <p>You'll notice that <code>bob</code> is itself a stub which is set-up so that any time code tries to execute the <code>speak</code> method it will return "hello".</p> <p>We then proceed to create a new <code>Person</code> instance and pass the call of <code>instance.speak</code> into RSpec's <code>expect</code> syntax.</p> <p>We tell RSpec that we're expecting that call to result in the String "hello".</p> <h3>Consecutive Return Values</h3> <p>In the previous examples we've use the RSpec feature <code>and_return</code> to indicate what our stub should return when it's called.</p> <p>We can indicate a different return value each time the stub is called by specifying multiple arguments to the <code>and_return</code> method:</p> <pre class="brush: ruby">obj = stub() obj.stub(:foo).and_return(1, 2, 3) expect(obj.foo()).to eq(1) expect(obj.foo()).to eq(2) expect(obj.foo()).to eq(3) </pre> <h3>Mocks</h3> <p>Mocks are similar to Stubs in that we are creating fake versions of our objects but instead of returning a pre-defined value we're more specifically guiding the routes our objects <em>must</em> take for the test to be valid.</p> <p>To do that we use the <code>mock</code> method:</p> <pre class="brush: ruby">describe Obj do it "testing()" do bob = mock() bob.should_receive(:testing).with('content') Obj.any_instance.stub(:initialize).and_return(bob) instance = Obj.new instance.testing('some value') end end </pre> <p>In the above example we create a new <code>Object</code> instance and then call its <code>testing</code> method.</p> <p>Behind the scenes of that code we expect the <code>testing</code> method to be called with the value <code>'content'</code>. If it isn't called with that value (which in the above example it's not) then we know that some piece of our code hasn't functioned properly.</p> <h3>Subject Block</h3> <p>The <code>subject</code> keyword can be used in a couple of different ways. All of which are designed to reduce code duplication.</p> <p>You can use it implicitly (notice our <code>it</code> block doesn't reference <code>subject</code> at all):</p> <pre class="brush: ruby">describe Array do describe "with 3 items" do subject { [1,2,3] } it { should_not be_empty } end end </pre> <p>You can use it explicitly (notice our <code>it</code> block refers to <code>subject</code> directly):</p> <pre class="brush: ruby">describe MyClass do describe "initialization" do subject { MyClass } it "creates a new instance" do instance = subject.new expect(instance).to be_a(MyClass) end end end </pre> <p>Rather than constantly referencing a subject within your code and passing in different values for instantiation, for example:</p> <pre class="brush: ruby" </pre> <p>You can instead use <code>subject</code> along with <code>let</code> to reduce the duplication:</p> <pre class="brush: ruby" </pre> <p>There are many more features available to RSpec but we've looked at the most important ones that you'll find yourself using a lot when writing tests using RSpec.</p> <h3>Randomized Tests</h3> <p>You can configure RSpec to run your tests in a random order. This allows you to ensure that none of your tests have any reliance or dependency on the other tests around it.</p> <pre class="brush: ruby">RSpec.configure do |config| config.order = 'random' end </pre> <p>You can set this via the command using the <code>--order</code> flag/option. For example: <code>rspec --order random</code>.</p> <p>When you use the <code>--order random</code> <code>1234</code> then execute <code>--order random:1234</code>) and it will use that same randomized seed to see if it can replicate the original dependency bug.</p> <h3>Global Configuration</h3> <p>You've seen we've added a project specific set of configuration objects within our <code>Rakefile</code>. But you can set configuration options globally by added them to a <code>.rspec</code> file within your home directory.</p> <p>For example, inside <code>.rspec</code>:</p> <pre class="brush: plain">--color --format nested </pre> <h2>Debugging With Pry</h2> <p>Now we're ready to start looking into how we can debug our application and our test code using the Pry gem. </p> <p>It's important to understand that although Pry is really good for debugging your code, it is actually meant as an improved Ruby REPL tool (to replace <code>irb</code>) and not strictly debugging purposes; so for example there are no built-in functions such as: step into, step over or step out etc that you would typically find in a tool designed for debugging. </p> <p>But as a debugging tool, Pry is very focused and lean.</p> <p>We'll come back to debugging in a moment, but let's first review how we'll be using Pry initially.</p> <h3>Updated Code Example</h3> <p>For the purpose of demonstrating Pry I'm going to add more code to my example application (this extra code doesn't effect our test in any way)</p> <pre class="brush: ruby">class RSpecGreeter attr_accessor :test @@binding.pry</code>.</p><p>When you run your code you'll notice that the terminal will stop and place you inside your application's code at the exact spot your binding.pry was placed.</p> <p>Below is an example of how it might look...</p> <pre class="brush: bash"> 8: def greet => 9: binding.pry 10: pubs 11: privs 12: "Hello RSpec!" 13: end </pre> <p>From this point Pry has access to the local scope so you can use Pry much like you would in <code>irb</code> and start typing in for example variables to see what values they hold.</p> <p>You can run the <code>exit</code> command to exit Pry and for your code to continue executing.</p> <h3>Finding Where You Are: <code>whereami</code></h3> <p>When using lots of <code>binding.pry</code> break points it can be difficult to understand where in the application you are. </p> <p>To get a better context of where you are at any point, you can use the <code>whereami</code> command. </p> <p>When run on its own you'll see something similar to when you used <code>binding.pry</code> (you'll see the line on which the break-point was set and a couple of lines above and below that). The difference being is if you pass an extra numerical argument like <code>whereami 5</code> you'll see five additional lines above where the <code>binding.pry</code> was placed. You could request to see 100 lines around the current break-point for example.</p> <p>This command can help orientate you within the current file.</p> <h3>Stack Trace: <code>wtf</code></h3> <p>The <code>wtf</code> command stands for "what the f***" and it provides a full stack trace for the most recent exception that has been thrown. It can help you understand the steps leading up to the error that occurred.</p> <h3>Inspecting: <code>ls</code></h3> <p>The <code>ls</code> command displays what methods and properties are available to Pry. </p> <p>When run it will show you something like...</p> <pre class="brush: bash">RSpecGreeter#methods: greet pubs test test= class variables: @@class_property locals: _ __ _dir_ _ex_ _file_ _in_ _out_ _pry_ </pre> <p>In the above example we can see that we have four public methods (remember we updated our code to include some additional methods and then <code>test</code> and <code>test=</code> were created when using Ruby's <code>attr_accessor</code> short hand).</p> <p>It also displays other class and local variables Pry can access.</p> <p>Another useful thing you can do is to grep (search) the results for only what you're interested in. You'll need to have an understanding of <a href="">Regular Expressions</a> but it can be a handy technique. Here is an example...</p> <pre class="brush: bash">ls -p -G ^p => RSpecGreeter#methods: privs </pre> <p>In the above example we're using the <code>-p</code> and <code>-G</code> options/flags which tell Pry we only want to see public and private methods and we use the regex <code>^p</code> (which means match anything starting with <code>p</code>) as our search pattern to filter the results.</p> <p>Running <code>ls --help</code> will also show you all available options.</p> <h3>Changing Scope: <code>cd</code></h3> <p>You can change the current scope by using the <code>cd</code> command.</p> <p>In our example if we run <code>cd ../pubs</code> it'll take us to the result of that method call.</p> <p>If we now run <code>whereami</code> you'll see it will display <code>Inside "I'm a test variable"</code>.</p> <p>If we run <code>self</code> then you'll see we get <code>"I'm a test variable"</code> returned.</p> <p>If we run <code>self.class</code> we'll see <code>String</code> returned.</p> <p>You can move up the scope chain using <code>cd ..</code> or you can go back to the top level of the scope using <code>cd /</code>.</p> <p>Note: we could add another <code>binding.pry</code> inside the <code>pubs</code> method and then our scope would be inside that method rather than the result of the method.</p> <h3>Seeing How Deep You Are: <code>nesting</code></h3> <p>Consider the previous example of running <code>cd pubs</code>. If we run the <code>nesting</code> command we'll get a top level look on the number of contexts/levels Pry currently has:</p> <pre class="brush: bash">Nesting status: -- 0. # (Pry top level) 1. "I'm a test variable" </pre> <p>From there we can run <code>exit</code> to move back to the earlier context (for example, inside the <code>greet</code> method)</p> <p>Running <code>exit</code> again will mean we're closing the last context Pry has and so Pry finishes and our code continues to run.</p> <h3>Locate Any Method: <code>find-method</code></h3> <p>If you're not sure where to find a particular method then you can use the <code>find-method</code> command to show you all files within your code base that has a method that matches what you're searching for:</p> <pre class="brush: bash">find-method priv => Kernel Kernel#private_methods Module Module#private_instance_methods Module#private_constant Module#private_method_defined? Module#private_class_method Module#private RSpecGreeter RSpecGreeter#privs </pre> <p>You can also use the <code>-c</code> option/flag to search the content of files instead:</p> <pre class="brush: bash">find-method -c greet => RSpecGreeter RSpecGreeter: def greet RSpecGreeter#privs: greet </pre> <h3>Classic Debugging: <code>next</code>, <code>step</code>, <code>continue</code></h3> <p>Although the above techniques are useful, it's not really 'debugging' in the same sense as what you're probably used to.</p> <p>For most developers their editor or browser will provide them with a built-in debugging tool that lets them actually step through their code line by line and follow the route the code takes until completion.</p> <p>As Pry is developed to be used as a REPL that's not to say it's not useful for debugging. </p> <p>A naive solution would be to set multiple <code>binding.pry</code> statements through out a method and use <strong>ctrl-d</strong> to move through each break-point set. But that' still not quite good enough.</p> <p>For step by step debugging you can load the gem <a href="">pry-nav</a>...</p> <pre class="brush: ruby">source "" gem 'rspec' group :development do gem 'guard' gem 'guard-rspec' gem 'pry' # Adds debugging steps to Pry # continue, step, next gem 'pry-remote' gem 'pry-nav' end </pre> <p>This gem extends Pry so it understands the following commands:</p> <ul> <li><code>Next</code> (move to the next line)</li> <li><code>Step</code> (move to the next line and if it's a method, then move into that method)</li> <li><code>Continue</code> (Ignore any further break-points in this file)</li> </ul> <h2>Continuous Integration With Travis-CI</h2> <p>As an added bonus let's integrate our tests with the online CI (continuous integration) service <a href="">Travis-CI</a>.</p> <p.</p> ).</p> <p>Regardless, code should never be pushed directly to your live production server any way; it should always be pushed first to a CI server to help catch any potential bugs that arise from differences between your development environment and the production environment. </p> <p>A lot of companies have more environments still for their code to pass through before it reaches the live production server. </p> <p>For example, at BBC News we have:</p> <ul> <li>CI</li> <li>Test</li> <li>Stage</li> <li>Live</li> </ul> <p>Although each environment should be identical in set-up, the purpose is to implement different types of testing to ensure as many bugs are caught and resolved before the code reaches 'live'.</p> <h3>Travis-CI</h3> <p>Travis CI is a hosted continuous integration service for the open source community. It is integrated with GitHub and offers first class support for multiple languages</p> <p>What this means is that Travis-CI offers free CI services for open-source projects and also has a paid model for businesses and organizations who want to keep their CI integration private.</p> <p>We'll be using the free open-source model on our example GitHub repository.</p> <p>The process is this: </p> <ul> <li>Register an account with <a href="">GitHub</a></li> <li>Sign into <a href="">Travis-CI</a> using your GitHub account</li> <li>Go to your "<a href="">Accounts</a>" page</li> <li>Turn "on" any repositories you want to run CI on</li> <li>Create a <code>.travis.yml</code> file within the root directory of your project and commit it to your GitHub repository</li> </ul> <p>The final step is the most important (creating a <code>.travis.yml</code> file) as this determines the configuration settings for Travis-CI so it knows how to handle running the tests for your project.</p> <p>Let's take a look at the <a href=""><code>.travis.yml</code></a> file we're using for our example GitHub repository:</p> <pre class="brush: bash">language: ruby cache: bundler rvm: - 2.0.0 - 1.9.3 script: 'bundle exec rake spec' bundler_args: --without development branches: only: - master notifications: email: - [email protected] </pre> <p>Let's break this down piece by piece...</p> <p>First we specify what language we're using in our project. In this case we're using Ruby: <code>language: ruby</code>.</p> <p>Because running Bundler can be a bit slow and we know that our dependencies aren't going to change that often we can choose to cache the dependencies, so we set <code>cache: bundler</code>.</p> <p>Travis-CI uses <a href="">RVM (Ruby Version Manager)</a> for installing Rubies on their servers. So we need to specify what Ruby versions we want to run our tests against. In this instance we've chosen <code>2.0</code> and <code>1.9.3</code> which are two popular Ruby versions (technically our application uses Ruby 2 but it's good to know our code passes in other versions of Ruby as well):</p> <pre class="brush: bash">rvm: - 2.0.0 - 1.9.3 </pre> <p>To run our tests we know that we can use the command <code>rake</code> or <code>rake spec</code>. Travis-CI by default runs the command <code>rake</code> but because of how Gems are installed on Travis-CI using Bundler we need to change the default command: <code>script: 'bundle exec rake spec'</code>. If we didn't do this then Travis-CI would have an issue locating the <code>rspec/core/rake_task</code> file which is specified within our <code>Rakefile</code>.</p> <p <code>rake</code> command and the suggestion of overwriting the default with <code>bundle exec rake</code> resolved that issue.</p> <p>Next, because we're only interested in running our tests we can pass additional arguments to Travis-CI to filter gems we don't want to bother installing. So for us we want to exclude installing the gems grouped as development: <code>bundler_args: --without development</code> (this means we are excluding gems that are only really used for development and debugging such as Pry and Guard).</p> <p>It's important to note that originally I was loading Pry within our <code>spec_helper.rb</code> file. This caused a problem when running the code on Travis-CI, now that I was excluding 'development' gems. So I had to tweak the code like so:</p> <pre class="brush: ruby">require 'pry' if ENV['APP_ENV'] == 'debug' </pre> <p>You can see that now the Pry gem is only <code>require</code>'ed if an environment variable of <code>APP_ENV</code>:</p> <pre class="brush: bash">APP_ENV=debug && ruby lib/example.rb</pre> <p>There were two other changes I made and that was to our <code>Gemfile</code>. One was to make it clearer what gems were required for testing and which were required for development, and the other was explicitly required by Travis-CI:</p> <pre class="brush: ruby">source "" group :test do gem 'rake' gem 'rspec' end group :development do gem 'guard' gem 'guard-rspec' gem 'pry' # Adds debugging steps to Pry # continue, step, next gem 'pry-remote' gem 'pry-nav' end </pre> <p>Looking at the above updated <code>Gemfile</code> we can see we've moved the RSpec gem into a new <code>test</code> group, so now it should be clearer what purpose each gem has. We've also added a new <code>gem 'rake'</code>. The Travis-CI documentation states this needed to be specified explicitly.</p> <p <code>master</code> branch:</p> <pre class="brush: bash">branches: only: - master </pre> <p>We could tell it to run every branch 'except' a particular branch, like so:</p> <pre class="brush: bash">branches: except: - some_branch_I_dont_want_run </pre> <p>The final section tells Travis-CI where to send notifications to when a build fails or succeeds:</p> <pre class="brush: bash">notifications: email: - [email protected] </pre> <p>You can specify multiple email addresses if you wish:</p> <pre class="brush: bash">notifications: email: - [email protected] - [email protected] - [email protected] </pre> <p>You can be more specific and specify what you want to happen on either a failure or a success (for example, more people will only be interested if the tests fail rather than getting an email every time they pass):</p> <pre class="brush: bash">notifications: email: recipients: - [email protected] on_failure: change on_success: never </pre> <p>The above example shows that the recipient will never receive an email if the tests pass but will get notified if the failure status changes (the default value for both is <code>always</code> which means you'll always be notified regardless of what the status result).</p> <p>Note: when you explicitly specify a <code>on_failure</code> or <code>on_success</code> you need to move the email address(es) inside of <code>recipients</code> key.</p> <h2>Conclusion</h2> <p>This is the end of our two part look into RSpec, TDD and Pry. </p> <p.</p> <p>Hopefully this has given you enough of a taste so you are keen to investigate each of these techniques-19T15:00:07.039Z 2014-03-19T15:00:07.039Z Mark McDonnell tag:code.tutsplus.com,2005:PostPresenter/cms-20072 Revisiting JavaScript Minification <p>Lately I've been seeing that many developers are not minifying their JavaScript code. This process of minification, reduces the size of the HTTP request for your JavaScript, improving your website's performance. So, let's revisit minifying your JavaScript.</p> <iframe src="//" width="600" height="338" frameborder="0"></iframe> <h2>In Closing</h2><p>Hopefully this quick screencast on minifying your JavaScript has helped you out. Remember, performance is very important, we want to have our websites running at their best. Thanks for watching.<-17T15:00:13.904Z 2014-03-17T15:00:13.904Z Rey Bango
http://feeds.feedburner.com/nettuts
CC-MAIN-2014-15
en
refinedweb
Need Help public class lenght { public static void main(String[] args) { String name="arun"; { int len = len(name); System.out.println("lenght of word arun is" +len); } } } Java error cannot find symbol the java error cannot find symbol. In this example a class name 'cannot find... “cannot find symbol”. The reason behind cannot find symbol error.../src/ Cannotfindsymbol.java:11: cannot find symbol symbol: variable z Java error cannot find symbol The java error cannot find symbol occurred when a Compiler... that help you in understanding java error cannot made symbol. For this we have cannot find symbol - Java Beginners cannot find symbol public class Areatest { public static void main(String[]args) { Figure[]figures={new Triangle(2.0,3.0,3.0),new Rectangle(4.0,6.0),new Square(5.0)}; for(int i=0;i cannot find symbol class array queue--plzz somebody help.. cannot find symbol class array queue--plzz somebody help.. import java.util.*; public class Test { public static void main(String[] args) { ArrayQueue<String> q = new ArrayQueue<String>(6); System.out.println cannot find symbol method nextchar()?? cannot find symbol method nextchar()?? import java.util.Scanner; public class Calc5{ public static void main(String args[]){ Scanner obj = new Scanner(System.in); System.out.println("please enter JSP cannot find symbol error - JSP-Servlet JSP cannot find symbol error Suppose-- we created 'a.jsp' in which we make a database connection... how to retrieve 'new' here... If I want to access the 'new' string within the form what should i do???   Java Get Example Java error cannot find symbol The java error cannot find symbol occurred when... Java Get Example  .... Java Get Examples.. Get host name in Java: This example need help. - Java Beginners program code and get to the output in uppercase letter.amar cannot find java.exe error while opening netbean5.5 - IDE Questions cannot find java.exe error while opening netbean5.5 HI, 1)i am working netbean5.5 tool.I got the error of cannot find c:\programfiles\java... is C:\Program Files\Java\jdk1.6.0\j2sdk1.4.2_03\bin\java.exe How can i solve
http://roseindia.net/tutorialhelp/allcomments/151768
CC-MAIN-2014-15
en
refinedweb
On Mon, Mar 12, 2007 at 10:01:20AM -0400, Jim Fulton wrote: > > On Mar 12, 2007, at 1:26 AM, Brian Sutherland wrote: > > > On Fri, Mar 09, 2007 at 01:22:58PM -0500, Chad Whitacre wrote: > >> Jim, > >> > >> First, your comments re: paying attention to sysadmins are > >> well-taken. Thanks. > > > > I was pointed to this conversation and would like to comment > > wearing my > > sysadmin hat about what I would like. How I think web applications > > should be installed on unix. Basically, I'll just go through what > > happens when I install apache, squid or postgres on linux. > > > > When I install an application that is a daemon, > > There is an interesting subtlety here. I think of Zope (or > applications built using Zope components) as applications that can be > run as one or more daemons. To me, a daemon is a particular instance > of an application, not the application itself. I (and my SAs) prefer > to separate software installation from configuration. We prefer that > these be 2 steps. We often run multiple daemons of the same > application on a single machine. The configuration of these daemons > (and cron jobs, and so on) are controlled from a central > configuration database that is mostly independent of the software > install. We don't want deamons installed automatically when an > application is installed. Then perhaps you are more interested in a structure like the one postgresql uses, where there is a namespace in /etc and /var/lib for the specific instance of postgres. All, however, are run as the same system user. Also, I'll note that a well designed packaging system should _never_ blindly overwrite already existing files in /etc, so I would implement your case as: * Install predefined configuration files in /etc * Install daemon package -- Brian Sutherland
https://mail.python.org/pipermail/web-sig/2007-March/002608.html
CC-MAIN-2014-15
en
refinedweb
Report Server Folder Hierarchy The report server folder namespace is a hierarchy that contains predefined and user-defined folders. The namespace uniquely identifies reports and other items that are stored in a report server. It provides an addressing scheme for specifying reports in a URL. Conceptually, this folder hierarchy is similar to the folder hierarchy in the Windows file system. In Reporting Services, however, the folders you work with are virtual folders that are accessed over a Web connection. Neither the folders nor their contents actually exist in a file system. Instead, they exist on a report server, and they appear as folders and items when you access the report server through a browser or a Web-enabled application. When you select or locate a report, the path becomes part of the URL for that report. Predefined folders are reserved by Reporting Services; they cannot be moved, renamed, or deleted. The following table describes predefined folders that anchor the folder hierarchy and provide a framework for several features. User-defined folders include any folders created by a user or report server administrator with permission to add items to a folder. For more information about creating folders and folder naming conventions, see Creating, Modifying, and Deleting Folders. Folders can contain a variety of items. Each type of item has an associated icon that distinguishes it from other items. For more information, see Icons in Report Manager.
http://technet.microsoft.com/en-us/library/ms159783(v=sql.90).aspx
CC-MAIN-2014-15
en
refinedweb
Change icon of commanddata On 08/03/2013 at 02:23, xxxxxxxx wrote: User Information: Cinema 4D Version: 13 Platform: Windows ; Language(s) : C++ ; --------- Hello, I like to exchange the icon of a commanddata plugin. For objects it's working fine with the MSG_GETCUSTOMICON message and set it in GetCustomIconData. But not for a commanddata. I recieve this message also, but it's not updated the icon. How does it works for commanddata plugins? regards Marky On 08/03/2013 at 02:30, xxxxxxxx wrote: Well, very hacky one, but you could blit on the bitmap returned by GetIcon();. -Niklas On 08/03/2013 at 02:51, xxxxxxxx wrote: oh, sorry, I don't understand. In the commanddata I don't have a GetIcon() function. Do you have a short exmaple? On 08/03/2013 at 03:23, xxxxxxxx wrote: There's a GetIcon function in the SDK, lib_customicon or sth like that. Not at home atm. -Niklas On 08/03/2013 at 04:31, xxxxxxxx wrote: Something like this, not tested, but should give you the gist of it: #include <lib_iconcollection.h> IconData* ico = GetIcon(PLUGIN_ID); if (ico && ico->bmp) { BaseBitmap* bmp = ico->bmp; for (LONG i=ico->x; i < ico->x + ico->w; i++) { for (LONG j=ico->y; j < ico->y + ico->h; i++) { Real lower = static_cast<Real>((i - ico->x) * (j - ico->y)); Real upper = static_cast<Real>(ico->w * ico->h); LONG x = (lower / upper) * 255; bmp->SetPixel(i, j, x, x, x); } } } On 08/03/2013 at 22:23, xxxxxxxx wrote: super, thanks a lot
https://plugincafe.maxon.net/topic/7005/7903_change-icon-of-commanddata
CC-MAIN-2020-40
en
refinedweb
In this basic C++ program, we will have a look at the program to print the number entered by the user in the C++ programming language. C++ Program to Print Number Entered by User #include <iostream> using namespace std; int main() { int number; cout << "Enter an integer that you want to print on the screen: "; cin >> number; cout << "Wooah you entered:" << number; return 0; } Output Enter an integer that you want to print on the screen:51 Wooah you entered:51 cin is used to take the input from the user & cout is used to display the same on the screen.
https://www.codeatglance.com/cpp-program-to-print-number-entered-by-user/
CC-MAIN-2020-40
en
refinedweb
OAuth2 Support¶ Kubernetes Web View support OAuth2 for protecting its web frontend. Use the following environment variables to enable it: OAUTH2_AUTHORIZE_URL - OAuth 2 authorization endpoint URL, e.g. OAUTH2_ACCESS_TOKEN_URL - Token endpoint URL for the OAuth 2 Authorization Code Grant flow, e.g. OAUTH2_CLIENT_ID - OAuth 2 client ID OAUTH2_CLIENT_ID_FILE - Path to file containing the client ID. Use this instead of OAUTH2_CLIENT_IDto read the client ID dynamically from file. OAUTH2_CLIENT_SECRET - OAuth 2 client secret OAUTH2_CLIENT_SECRET_FILE - Path to file containing the client secret. Use this instead of OAUTH2_CLIENT_SECRETto read the client secret dynamically from file. SESSION_SECRET_KEY - Secret to encrypt the session cookie. Must be 32 bytes base64-encoded. Use cryptography.fernet.Fernet.generate_key()to generate such a key. OAUTH2_SCOPE - Scope for the OAuth 2 Authorization eg: ‘email openid profile’ for open ID or Azure AD, ‘’ Note: this field is mandatory for Azure Active Directory The OAuth2 login flow will (by default) just protect the web frontend, the configured credentials (in-cluster Service Account, Kubeconfig, or Cluster Registry) will be used to access the cluster(s). This behavior can be changed and the session’s OAuth2 access token can be used for cluster authentication instead of using configured credentials. Enable this operation mode via --cluster-auth-use-session-token. The OAuth redirect flow will not do any extra authorization by default, i.e. everybody who can login with your OAuth provider can use Kubernetes Web View! You can plug in a custom Python hook function (coroutine) via --oauth2-authorized-hook to validate the login or do any extra work (store extra info in the session, deny access, log user ID, etc). Note that the hook needs to be a coroutine function with signature like async def authorized(data, session). The result should be boolean true if the login is successful, and false otherwise. Examples of such hooks are provided in the examples directory. A minimal hooks.py would look like: import logging async def oauth2_authorized(data: dict, session): access_token = data["access_token"] # TODO: do something with the access token, e.g. look up user info logging.info("New OAuth login!") # TODO: validate whether login is allowed or not return True # allow all OAuth logins This file would need to be in the Python search path, e.g. as hooks.py in the root (“/”) of the Docker image. Pass the hook function as --oauth2-authorized-hook=hooks.oauth2_authorized to Kubernetes Web View. Google OAuth Provider¶ This section explains how to use the Google OAuth 2.0 provider with Kubernetes Web View: - follow the instructions on to obtain OAuth 2.0 credentials such as client ID and client secret - use https://{my-kube-web-view-host}/oauth2/callbackas one of the Authorized redirect URIs in the Google API Console - use “” for OAUTH2_AUTHORIZE_URL - use “” for OAUTH2_ACCESS_TOKEN_URL - pass the obtained client ID in the OAUTH2_CLIENT_IDenvironment variable - pass the obtained client secret in the OAUTH2_CLIENT_SECRETenvironment variable GitHub OAuth Provider¶ How to use GitHub as the OAuth provider with Kubernetes Web View: - create a new OAuth app in the GitHub UI - use https://{my-kube-web-view-host}/oauth2/callbackas the Authorization callback URL in the GitHub UI - use “” for OAUTH2_AUTHORIZE_URL - use “” for the OAUTH2_ACCESS_TOKEN_URL - pass the obtained client ID in the OAUTH2_CLIENT_IDenvironment variable - pass the obtained client secret in the OAUTH2_CLIENT_SECRETenvironment variable Note that any GitHub user can now login to your deployment of Kubernetes Web View! You have to configure a --oauth2-authorized-hook function to validate the GitHub login and only allow certain usernames: - copy hooks.pyfrom examples/oauth2-validate-github-token/hooks.py(see examples dir) to a new folder - customize the username in hooks.pyto match your allowed GitHub user logins - create a new Dockerfilein the same folder - edit the Dockerfileto have two lines: 1) FROM hjacobs/kube-web-view:{version}(replace “{version}”!) as the first line, and 2) COPY hooks.py /to copy our OAuth validation function - build the Docker image - configure your kube-web-view deployment and add --oauth2-authorized-hook=hooks.oauth2_authorizedas argument - deploy kube-web-view with the new Docker image and CLI option AWS Cognito Provider¶ Setting up Cognito¶ A number of steps need to be taken to setup Amazon Cognito for OAuth2. These instructions are correct as of August 2019. Create User Pool¶ - Create a User Pool - Choose how you want End Users to sign in (for example via Email, Username or otherwise) - Once you have gone through all the settings (customise to your liking) for creating a user pool, add an App Client Create an App Client¶ - Choose a Name that is relevant to the application (eg kube-web-view) - Make sure the Generate client secret option is selected, and set your Refresh token expiration time to whatever you are comfortable with. The App Client will then generate a Client ID and Client Secret, wich will be used later App Client Settings¶ - Select the previously created client - Fill in the Callback URL(s) section with https://{my-kube-web-view-host}/oauth2/callback - Under OAuth 2.0, choose the relevant Allowed OAuth Flows (eg Authorization Code Grant, Implicit Grant) - Choose the Allowed OAuth Scopes you want to include. email is the minimum you will need IMPORTANT: Domain Name¶ You must create a domain name for OAuth to function against AWS Cognito, otherwise the required Authorization and Token URLs will not be exposed. You can choose whether to use an AWS-hosted Cognito Domain (eg https://{your-chosen-domain}.auth.us-east-1.amazoncognito.com), or to use your own domain. Update Deployment¶ You can now update your Deployment with the relevant Environment variables. If you have chosen to use an AWS Cognito Domain, then the {FQDN} variable in the below section will be https://{your-chosen-domain}.auth.{aws-region}.amazoncognito.com. Otherwise, replace it with your domain - use “https://{FQDN}/oauth2/authorize” for OAUTH2_AUTHORIZE_URL - use “https://{FQDN}/oauth2/token” for OAUTH2_ACCESS_TOKEN_URL - Use the App Client ID generated during “Create an App Client” in the OAUTH2_CLIENT_IDenvironment variable - Use the App Client secret in the OAUTH2_CLIENT_SECRETenvironment variable. If you cannot see the secret, press “Show Details” in the AWS Console Terraform¶ An example Terraform deployment of the above is below: # Create the User Pool resource "aws_cognito_user_pool" "kube-web-view" { name = "userpool-kube-web-view" alias_attributes = [ "email", "preferred_username" ] auto_verified_attributes = [ "email" ] schema { attribute_data_type = "String" developer_only_attribute = false mutable = true name = "name" required = true string_attribute_constraints { min_length = 3 max_length = 70 } } admin_create_user_config { allow_admin_create_user_only = true } tags = { "Name" = "userpool-kube-web-view" } } # Create the oauth2 Domain resource "aws_cognito_user_pool_domain" "kube-web-view" { domain = "oauth-kube-web-view" user_pool_id = aws_cognito_user_pool.kube-web-view.id } # kube-web-view Client resource "aws_cognito_user_pool_client" "kube-web-view" { name = "kube-web-view" user_pool_id = aws_cognito_user_pool.kube-web-view.id allowed_oauth_flows = [ "code", "implicit" ] allowed_oauth_scopes = [ "email", "openid", "profile", ] supported_identity_providers = [ "COGNITO" ] generate_secret = true allowed_oauth_flows_user_pool_client = true callback_urls = [ "https://{my-kube-web-view-host}/oauth2/callback" ] } # Outputs output "kube-web-view-id" { description = "Kube Web View App ID" value = aws_cognito_user_pool_client.kube-web-view.id } output "kube-web-view-secret" { description = "Kube Web View App Secret" value = aws_cognito_user_pool_client.kube-web-view.client_secret
https://kube-web-view.readthedocs.io/en/latest/oauth2.html
CC-MAIN-2020-40
en
refinedweb
Automate Hyperparameter Tuning for your models When we create our machine learning models, a common task that falls on us is how to tune them. People end up taking different manual approaches. Some of them work, and some don’t, and a lot of time is spent in anticipation and running the code again and again. So that brings us to the quintessential question: Can we automate this process? A while back, I was working on an in-class competition from the “How to win a data science competition” Coursera course. Learned a lot of new things, one among them being Hyperopt — A bayesian Parameter Tuning Framework. And I was amazed. I left my Mac with hyperopt in the night. And in the morning I had my results. It was awesome, and I did avoid a lot of hit and trial. This post is about automating hyperparameter tuning because our time is more important than the machine. So, What is Hyperopt? From the Hyperopt site: Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions In simple terms, this means that we get an optimizer that could minimize/maximize any function for us. For example, we can use this to minimize the log loss or maximize accuracy. All of us know how grid search or random-grid search works. A grid search goes through the parameters one by one, while a random search goes through the parameters randomly. Hyperopt takes as an input space of hyperparameters in which it will search and moves according to the result of past trials. Thus, Hyperopt aims to search the parameter space in an informed way. I won’t go in the details. But if you want to know more about how it works, take a look at this paper by J Bergstra. Here is the documentation from Github. Our Dataset To explain how hyperopt works, I will be working on the heart dataset from UCI precisely because it is a simple dataset. And why not do some good using Data Science apart from just generating profits? This dataset predicts the presence of a heart disease given some variables. This is a snapshot of the dataset : This is how the target distribution looks like: Hyperopt Step by Step So, while trying to run hyperopt, we will need to create two Python objects: An Objective function: The objective function takes the hyperparameter space as the input and returns the loss. Here we call our objective function objective A dictionary of hyperparams: We will define a hyperparam space by using the variable spacewhich is actually just a dictionary. We could choose different distributions for different hyperparameter values. In the end, we will use the fmin function from the hyperopt package to minimize our objective through the space. You can follow along with the code in this Kaggle Kernel. 1. Create the objective function Here we create an objective function which takes as input a hyperparameter space: We first define a classifier, in this case, XGBoost. Just try to see how we access the parameters from the space. For example space[‘max_depth’] We fit the classifier to the train data and then predict on the cross-validation set. We calculate the required metric we want to maximize or minimize. Since we only minimize using fminin hyperopt, if we want to minimize loglosswe just send our metric as is. If we want to maximize accuracy we will try to minimize -accuracy from sklearn.metrics import accuracy_score from hyperopt import hp, fmin, tpe, STATUS_OK, Trials import numpy as np import xgboost as xgb def objective(space): # Instantiate the classifier clf = xgb.XGBClassifier)] # Fit the classsifier clf.fit(X, y, eval_set=eval_set, eval_metric="rmse", early_stopping_rounds=10,verbose=False) # Predict on Cross Validation data pred = clf.predict(Xcv) # Calculate our Metric - accuracy accuracy = accuracy_score(ycv, pred>0.5) # return needs to be in this below format. We use negative of accuracy since we want to maximize it. return {'loss': -accuracy, 'status': STATUS_OK } 2. Create the Space for your classifier Now, we create the search space for hyperparameters for our classifier. To do this, we end up using many of hyperopt built-in functions which define various distributions. As you can see in the code below, we use uniform distribution between 0.7 and 1 for our subsample hyperparameter. We also give a label for the subsample parameter x_subsample. You need to provide different labels for each hyperparam you define. I generally add a x_ before my parameter name to create this label.) } You can also define a lot of other distributions too. Some of the most useful stochastic expressions currently recognized by hyperopt’s optimization algorithms are: hp.choice(label, options)— Returns one of the options, which should be a list or tuple. hp.randint(label, upper)— Returns a random integer in the range [0, upper). hp.uniform(label, low, high)— Returns a value uniformly between low and high. hp.quniform(label, low, high, q)— Returns a value like round(uniform(low, high) / q) * q hp.normal(label, mu, sigma)— Returns a real value that’s normally-distributed with mean mu and standard deviation sigma. There are a lot of other distributions. You can check them out here. 3. And finally, Run Hyperopt Once we run this, we get the best parameters for our model. Turns out we achieved an accuracy of 90% by just doing this on the problem. trials = Trials() best = fmin(fn=objective, space=space, algo=tpe.suggest, max_evals=10, trials=trials) print(best) Now we can retrain our XGboost algorithm with these best params, and we are done. Conclusion Running the above gives us pretty good hyperparams for our learning algorithm. And that saves me a lot of time to think about various other hypotheses and testing them. I tend to use this a lot while tuning my models. From my experience, the most crucial part in this whole procedure is setting up the hyperparameter space, and that comes by experience as well as knowledge about the models. So, Hyperopt is an awesome tool to have in your repository but never neglect to understand what your models does. It will be very helpful in the long run. You can get the full code in this Kaggle Kernel. Continue Learning If you want to learn more about practical data science, do take a look at the “How to win a data science competition” Coursera course. Learned a lot of new things from this course taught by one of the most prolific Kaggler..
https://mlwhiz.com/blog/2019/10/10/hyperopt2/
CC-MAIN-2020-40
en
refinedweb
Alert Alerts are used to communicate a state that affects a system, feature or page. See CAlert's accessibility report Chakra UI Vue exports 4 Alert related components. CAlert: The wrapper for alert components. CAlertIcon: The visual icon for the alert that changes based on the statusprop. CAlertTitle: The title of the alert to be announced by screen readers. CAlertDescription: The description of the alert to be announced by screen readers. import { CAlert, CAlertIcon, CAlertTitle, CAlertDescription, } from "@chakra-ui/vue"; <c-alert <c-alert-icon /> <c-alert-title :Your browser is outdated!</c-alert-title> <c-alert-description>Your Chakra experience may be degraded.</c-alert-description> <c-close-button </c-alert> The status of the alerts can be changed by passing the status prop. This affects the CAlert's color scheme and icon used. CAlert supports error, success, warning, and info statuses. <c-stack> <c-alert <c-alert-icon /> Chakra is going live on April 15th. Get ready! </c-alert> <c-alert <c-alert-icon /> Sage mode chakra successfully infused. </c-alert> <c-alert <c-alert-icon /> Using Amaterasu is irreversible. Proceed with caution. </c-alert> <c-alert <c-alert-icon /> Unable to load Rasen-Shuriken. Please try again. </c-alert> </c-stack> You can also use custom Alert icons by passing the name of the icon in the name prop of the CAlertIcon. Click here to see how to add icons to your Chakra app. <c-alert> <c-alert-icon <c-alert-title :Kakashi Sensei followed you.</c-alert-title> <c-alert-description>Follow Kakashi to see his Kamui in action.</c-alert-description> <c-close-button </c-alert> The CAlert component has 4 variant styles you can use. Pass the variant prop and use either subtle, solid, left-accent or top-accent. <c-stack> <c-alert <c-alert-icon /> Data uploaded to the server. Fire on! </c-alert> <c-alert <c-alert-icon /> Data uploaded to the server. Fire on! </c-alert> <c-alert <c-alert-icon /> Data uploaded to the server. Fire on! </c-alert> <c-alert <c-alert-icon /> Data uploaded to the server. Fire on! </c-alert> </c-stack> CAlert ships with other smaller components to allow for flexibility and make it easy to create all kinds of layout. Here's an example of a custom alert style and layout. <c-alert <c-alert-icon <c-alert-title : Application submitted! </c-alert-title> <c-alert-description Thanks for submitting your application. Our team will get back to you soon. </c-alert-description> </c-alert> CAlert is the wrapper for the alert component. It composes the CFlex component. CAlertIcon composes CIcon and changes the icon based on the status and prop. It will also change the icon based on the value of the name prop only if it is passed. CAlertTitle composes the CBox component. All CBox props are applicable. CAlertDescription composes the CBox component. All CBox props are applicable. ❤️ Contribute to this page Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!
https://vue.chakra-ui.com/alert
CC-MAIN-2020-40
en
refinedweb
So I'm making a 2D Space Shooter game, and I'm having my player shoot lots of types of bullets by using Instantiate to clone from a prefab, but the bullet keeps damaging my ship because even though the prefab is set to my "Player" layer (as well as my ship) and Player/Player collision is turned off, the bullet still hits me, which I eventually discovered is because it's cloning it onto the default layer instead of Player. Is there any way I can force the bullet to clone onto the correct layer? My full C# PlayerShooting.cs script (which is on the player) is this, in case it helps: public class PlayerShooting : MonoBehaviour { public GameObject bulletPrefab; public float fireDelay; float cooldownTimer = 0; void Update () { cooldownTimer -= Time.deltaTime; if (Input.GetButtonDown ("Fire1") && cooldownTimer <= 0) { // Bullet fires: gameObject.layer = 10; Instantiate(bulletPrefab, transform.position, transform.rotation); gameObject.layer = 8; Debug.Log("Fired!"); //Cooldown Timer is reset: cooldownTimer = fireDelay; } } } gameObject.layer = LayerMask.NameToLayer("Player"); Try that. Where do I put it in the script? I tried putting the bullet onto the player layer in my bullet movement script within Start() but by the time that script had the chance to run the bullet had of course been created, then destroyed by damaging my ship... GameObject bullet = Instantiate(bulletPrefab, transform.position, transform.rotation) as GameObject; bullet.layer = LayerMask.NameToLayer("Player"); Still not sure why it spawns it onto the default layer though... Just added that then realised that whenever I press play it switches every object onto the default layer, not just the bullet. That seems even weirder... Any ideas? Answer by phil_me_up · Dec 08, 2015 at 12:00 PM As Vintar said above, you need to make sure you are setting the layer on your instantiated object. However, as a general rule you don't want to be instantiating a bullet every time one is fired, instead you should consider making a bullet pool containing a number of bullets (depending on how many you expect to see on screen at any one time) and simply enable or disable these as you need them. A quick method for this is to just have an array of bullet game objects created. When you need to fire, find the next currently disabled bullet, enable it, position it correctly and then rather than destroying it when you don't need it anymore, just clones arent behaving the same as the prefab 1 Answer The prefab you want to instantiate is null. 2 Answers Why is my instantiated prefab invisible ? 2 Answers How to generate different diagonal platforms? 0 Answers 2D Projectile Not Firing Based on Rotation 1 Answer
https://answers.unity.com/questions/1108333/how-do-i-make-a-clone-of-a-prefab-appear-on-the-co.html
CC-MAIN-2020-40
en
refinedweb
Very High CVE-2020-11651 Very High(4 users assessed) High(4 users assessed) None None Network CVE-2020-11651 MITRE ATT&CK Collection Command and Control Credential Access Defense Evasion Discovery Execution Exfiltration Impact Initial Access Lateral Movement Persistence Privilege Escalation Description. Add Assessment Ratings - Attacker ValueVery High - ExploitabilityHigh Technical Analysis Overview For Salt Master before 2019.2.4 and 3000 before 3000.2 there is potential for RCE as root. If a salt-master has its ZeroMQ ports 4506 exposed to the public it is possible for an unauthenticated user to gain access to the root_key. With access to the root key it is possible to run a wide range of salt commands that include file read, file write and command execution. These commands can be executed on the salt-master and any minion that is connected. This requires multiple socket requests. one to read the key and then additional requests to create jobs. Proof Of Concept This POC was tested on SaltStack 2019.2.0 As of the time of writing this assessment I have been able to create a functional exploit POC. The Code can be found here – The POC and others I am sure will appear shortly has the following functionality - Read the root key - Read and Write files on the Salt Master - Construct a payload to gain full RCE as root on any connected Minion This took several hours and is “easy” with the available information and access to a test instance. Details on the discovery process can be found on our blog – Mitigations: Patch to the latest versions and do not expose theses ports to the external network. Detections examine /var/cache/salt/master/jobs/ on the salt master for a listing of all jobs. the return.p file in these dirs will contain a detailed description of the request and the response. This data is serialised. Immersive Labs have released a basic python script to parse all these job files – # cat /var/cache/salt/master/jobs/65/6e5fa0837ca5f3d391c4d70d345ee25baed089b970a78a934709e80d083f95/7a5388b6a882_master/return.p ��return��fun�wheel.file_roots.read�jid�20200501195107225222�user�UNKNOWN�fun_args��../../../../etc/shadow��saltenv�base�_stamp�2020-05-01T19:51:07.229260�return��� /srv/salt/../../../../etc/shadow��root:!::0::::: bin:!::0::::: daemon:!::0::::: adm:!::0::::: lp:!::0::::: sync:!::0::::: shutdown:!::0::::: halt:!::0::::: mail:!::0::::: news:!::0::::: uucp:!::0::::: operator:!::0::::: man:!::0::::: postmaster:!::0::::: cron:!::0::::: ftp:!::0::::: sshd:!::0::::: at:!::0::::: squid:!::0::::: xfs:!::0::::: games:!::0::::: postgres:!::0::::: cyrus:!::0::::: vpopmail:!::0::::: ntp:!::0::::: smmsp:!::0::::: guest:!::0::::: nobody:!::0::::: salt:!:18164:0:99999:7::: Snort Rule: alert tcp $EXTERNAL_NET any -> $HOME_NET 4506 (msg:"Salt Stack root_key read attempt"; content:"_prep_auth_info"; sid:1000000; rev:1;) On the wire it looks a bit like this so a stronger rule can be created b'\x82\xa3enc\xa5clear\xa4load\x81\xa3cmd\xaf_prep_auth_info' In the wild The following IPS have been observed sending malicious payloads. other IPS have been seen scanning. - 95.181.178.108 - 89.151.132.112 - 89.27.255.58 - 104.244.76.189 - 95.213.139.92 - 81.92.218.74 - 178.44.87.133 Payloads The following Payloads have been observed (curl -s 95.142.44.216/sa.sh||wget -q -O- 95.142.44.216/sa.sh)|sh import subprocess;subprocess.call(\"(curl -s 95.142.44.216/sa.sh||wget -q -O- 95.142.44.216/sa.sh)|sh\",shell=True) /bin/sh -c '(wget -qO- -t3 -w1 -T10 --no-http-keep-alive || curl -fs --connect-timeout 5 -m10 --retry 3)|sh -s -- 94.253.90.22:44445 G9/kjA/vdOSlUG3q+lz6DZwzr0rgiNWRfbb2UZcnYgmUY01gHW5tQrS6SgjiN/6doZfjvmc=' (curl -s anagima3.top/sa.sh||wget -q -O- anagima3.top/sa.sh)|sh (curl -s 95.142.44.216/sa.sh||wget -q -O- 95.142.44.216/sa.sh)|sh (curl -s 176.104.3.35/?6920||wget -q -O- 176.104.3.35/?6920)|sh /bin/sh -c 'wget -qO- -t3 -w1 -T10 --no-http-keep-alive[redacted_ip] Ratings - Attacker ValueVery High - ExploitabilityHigh Technical Analysis Nothing to add to the technical analysis by the others. Dropping by to note that: DigiCert’s CT Log 2’s key used to sign SCTs was compromised 2020-05-03 — (wayback doesn’t seem to be able to handle ggroups links, so no archive link). Ghost was impacted on 2020-05-03 / Lineage OS was impacted on 2020-05-03 / we’ve been seeing twice 1-2 monthly, low-grade inventory scans for hosts exposing port 4506 through March 2020 but have registered a notable increase (usually <10, now 50+) in unique sources since the vulnerability was disclosed. Looks like ~30% of those are known benign scanners doing new cataloging. Technical Analysis Version 2019.2.3 or less is vulnerable. Easy to exploit. “Exploitation.” Testcase to be able to reverse and develop exploit for this RCE Technical Analysis I had been waiting for more details on this, and F-Secure delivered. I have little to add to the other excellent assessments, but from a cursory review of the advisory and the code, this looks very easy to reproduce and is already being exploited in the wild as a result. Poked at this for a couple hours and seem to be able to disclose the root key so far. Welp. Metasploit has two ongoing (WIP) modules in this PR:. is now feature-complete.). Active exploits in the wild have now been observed. Payload is a CryptoMiner. Base Command "(curl -s 217.12.210.192/sa.sh||wget -q -O- 217.12.210.192/sa.sh)|sh" Miner Download – As Public PoCs are now out. I am sharing mine here. as well. Excellent work, @kevthehermit! Seems a lot of PoCs are using the Python saltmodule, same as the integration test, but you figured out your own MessagePack payloads. :–)
https://attackerkb.com/assessments/2a661b18-d7a5-4332-8441-39f3281bffdc
CC-MAIN-2020-40
en
refinedweb
Classes and objects: the bread-and-butter of many a developer. Object-oriented programming is one of the mainstays of modern programming, so it shouldn't come as a surprise that Python is capable of it. But if you've done object-oriented programming in any other language before coming to Python, I can almost guarantee you're doing it wrong. Hang on to your paradigms, folks, it's going to be a bumpy ride. Class Is In Session Let's make a class, just to get our feet wet. Most of this won't come as a surprise to anyone. class Starship(object): sound = "Vrrrrrrrrrrrrrrrrrrrrr" def __init__(self): self.engines = False self.engine_speed = 0 self.shields = True def engage(self): self.engines = True def warp(self, factor): self.engine_speed = 2 self.engine_speed *= factor @classmethod def make_sound(cls): print(cls.sound) Once that's declared, we can create a new instance, or object, from this class. All of the member functions and variables are accessible using dot notation. uss_enterprise = Starship() uss_enterprise.warp(4) uss_enterprise.engage() uss_enterprise.engines >>> True uss_enterprise.engine_speed >>> 8 Wow, Jason, I knew this was supposed to be 'dead simple', but I think you just put me to sleep. No surprises there, right? But look again, not at what is there, but what isn't there. You can't see it? Okay, let's break this down. See if you can spot the surprises before I get to them. Declaration We start with the definition of the class itself: class Starship(object): Python might be considered one of the more truly object-oriented languages, on account of its design principle of "everything is an object." All other classes inherit from that object class. Of course, most Pythonistas really hate boilerplate, so as of Python 3, we can also just say this and call it good: class Starship: Personally, considering The Zen of Python's line about "Explicit is better than implicit," I like the first way. We could debate it until the cows come home, really, so let's just make it clear that both approaches do the same thing in Python 3, and move on. Legacy Note: If you intend your code to work on Python 2, you must say (object). Methods I'm going to jump down to this line... def warp(self, factor): Obviously, that's a member function or method. In Python, we pass self as the first parameters to every single method. After that, we can have as many parameters as we want, the same as with any other function. We actually don't have to call that first argument self; it'll work the same regardless. But, we always use the name self there anyway, as a matter of style. There exists no valid reason to break that rule. "But, but...you literally just broke the rule yourself! See that next function?" @classmethod def make_sound(cls): You may remember that in object-oriented programming, a class method is one that is shared between all instances of the class (objects). A class method never touches member variables or regular methods. If you haven't already noticed, we always access member variables in a class via the dot operator: self.. So, to make it extra-super-clear we can't do that in a class method, we call the first argument cls. In fact, when a class method is called, Python passes the class to that argument, instead of the object. As before, we can call cls anything we want, but that doesn't mean we should. For a class method, we also MUST put the decorator @classmethod on the line just above our function declaration. This tells the Python language that you're making a class method, and that you didn't just get creative with the name of the self argument. Those methods above would get called something like this... uss_enterprise = Starship() # Create our object from the starship class # Note, we aren't passing anything to 'self'. Python does that implicitly. uss_enterprise.warp(4) # We can call class functions on the object, or directly on the class. uss_enterprise.make_sound() Starship.make_sound() Those last two lines will both print out "Vrrrrrrrrrrrrrrrrrrrrr" the exact same way. (Note that I referred to cls.sound in that function.) ... What? Come on, you know you made sound effects for your imaginary spaceships when you were a kid. Don't judge me. Class vs Static Methods The old adage is true: you don't stop learning until you're dead. Kinyanjui Wangonya pointed out in the comments that one didn't need to pass cls to "static methods" - the phrase I was using in the first version of this article. Turns out, he's right, and I was confused! Unlike many other languages, Python distinguishes between static and class methods. Technically, they work the same way, in that they are both shared among all instances of the object. There's just one critical difference... A static method doesn't access any of the class members; it doesn't even care that it's part of the class! Because it doesn't need to access any other part of the class, it doesn't need the cls argument. Let's contrast a class method with a static method: @classmethod def make_sound(cls): print(cls.sound) @staticmethod def beep(): print("Beep boop beep") Because beep() needs no access to the class, we can make it a static method by using the @staticmethod decorator. Python won't implicitly pass the class to the first argument, unlike what it does on a class method ( make_sound()) Despite this difference, you call both the same way. uss_enterprise = Starship() uss_enterprise.make_sound() >>> Vrrrrrrrrrrrrrrrrrrrrr Starship.make_sound() >>> Vrrrrrrrrrrrrrrrrrrrrr uss_enterprise.beep() >>> Beep boop beep Starship.beep() >>> Beep boop beep Initializers and Constructors Every Python class needs to have one, and only one, __init__(self) function. This is called the initializer. def __init__(self): self.engine_speed = 1 self.shields = True self.engines = False If you really don't need an initializer, it is technically valid to skip defining it, but that's pretty universally considered bad form. In the very least, define an empty one... def __init__(self): pass While we tend to use it the same way as we would a constructor in C++ and Java, __init__(self) is not a constructor! The initializer is responsible for initializing the instance variables, which we'll talk more about in a moment. We rarely need to actually to define our own constructor. If you really know what you're doing, you can redefine the __new__(cls) function... def __new__(cls): return object.__new__(cls) By the way, if you're looking for the destructor, that's the __del__(self) function. Variables In Python, our classes can have instance variables, which are unique to our object (instance), and class variables (a.k.a. static variables), which belong to the class, and are shared between all instances. I have a confession to make: I spent the first few years of Python development doing this absolutely and completely wrong! Coming from other object-oriented languages, I actually thought I was supposed to do this: class Starship(object): engines = False engine_speed = 0 shields = True def __init__(self): self.engines = False self.engine_speed = 0 self.shields = True def engage(self): self.engines = True def warp(self, factor): self.engine_speed = 2 self.engine_speed *= factor The code works, so what's wrong with this picture? Read it again, and see if you can figure out what's happening. Final Jeopardy music plays Maybe this will make it obvious. uss_enterprise = Starship() uss_enterprise.warp(4) print(uss_enterprise.engine_speed) >>> 8 print(Starship.engine_speed) >>> 0 Did you spot it? Class variables are declared outside of all functions, usually at the top. Instance variables, on the other hand, are declared in the __init__(self) function: for example, self.engine_speed = 0. So, in our little example, we've declared a set of class variables, and a set of instance variables, with the same names. When accessing a variable on the object, the instance variables shadow (hide) the class variables, making it behave as we might expect. However, we can see by printing Starship.engine_speed that we have a separate class variable sitting in the class, just taking up space. Talk about redundant. Anyone get that right? Sloan did, and wagered...ten thousand cecropia leaves. Looks like the sloth is in the lead. Amazingly enough. By the way, you can declare instance variables for the first time from within any instance method, instead of the initializer. However...you guessed it: don't. The convention is to ALWAYS declare all your instance variables in the initializer, just to prevent something weird from happening, like a function attempting to access a variable that doesn't yet exist. Scope: Private and Public If you come from another object-oriented language, such as Java and C++, you're also probably in the habit of thinking about scope (private, protected, public) and its traditional assumptions: variables should be private, and functions should (usually) be public. Getters and setters rule the day! I'm also an expert in C++ object-oriented programming, and I have to say that I consider Python's approach to the issue of scope to be vastly superior to the typical object-oriented scope rules. Once you grasp how to design classes in Python, the principles will probably leak into your standard practice in other languages...and I firmly believe that's a good thing. Ready for this? Your variables don't actually need to be private. Yes, I just heard the gurgling scream of the Java nerd in the back. "But...but...how will I keep developers from just tampering with any of the object's instance variables?" Often, that concern is built on three flawed assumptions. Let's set those right first: The developer using your class almost certainly isn't in the habit of modifying member variables directly, any more than they're in the habit of sticking a fork in a toaster. If they do stick a fork in the toaster, proverbially speaking, the consequences are on them for being idiots, not on you. As my Freenode #python friend grymonce said, "if you know why you aren't supposed to remove stuck toast from the toaster with a metal object, you're allowed to do so." In other words, the developer who is using your class probably knows better than you do about whether they should twiddle the instance variables or not. Now, with that out of the way, we approach an important premise in Python: there is no actual 'private' scope. We can't just stick a fancy little keyword in front of a variable to make it private. What we can do is stick an underscore at the front of the name, like this: self._engine. That underscore isn't magical. It's just a warning label to anyone using your class: "I recommend you don't mess with this. I'm doing something special with it." Now, before you go sticking _ at the start of all your instance variable names, think about what the variable actually is, and how you use it. Will directly tweaking it really cause problems? In the case of our example class, as it's written right now, no. This actually would be perfectly acceptable: uss_enterprise.engine_speed = 6 uss_enterprise.engage() Also, notice something beautiful about that? We didn't write a single getter or setter! In any language, if a getter or setter are functionally identical to modifying the variable directly, they're an absolute waste. That philosophy is one of the reasons Python is such a clean language. You can also use this naming convention with methods you don't intend to be used outside of the class. Side Note: Before you run off and go eschew private and protected from your Java and C++ code, please understand that there's a time and a place for scope. The underscore convention is a social contract among Python developers, and most languages don't have anything like that. So, if you're in a language with scope, use private or protected on any variable you would have put an underscore in front of in Python. Private...Sort Of Now, on a very rare occasion, you may have an instance variable which absolutely, positively, never, ever should be directly modified outside of the class. In that case, you may precede the name of the variable with two underscores ( __), instead of one. This doesn't actually make it private; rather, it performs something called name mangling: it changes the name of the variable, adding a single underscore and the name of the class on the front. In the case of class Starship, if we were to change self.shields to self.__shields, it would be name mangled to self._Starship__shields. So, if you know how that name mangling works, you can still access it... uss_enterprise = Starship() uss_enterprise._Starship__shields >>> True It's important to note, you also cannot have more than one trailing underscore if this is to work. ( __foo and __foo_ will be mangled, but __foo__ will not). But then, PEP 8 generally discourages trailing underscores, so it's kinda a moot point. By the way, the purpose of the double underscore ( __) name mangling actually has nothing to do with private scope; it's all about preventing name conflicts with some technical scenarios. In fact, you'll probably get a few serious frowns from Python ninjas for employing __ at all, so use it sparingly. Properties As I said earlier, getters and setters are usually pointless. On occasion, however, they have a purpose. In Python, we can use properties in this manner, as well as to pull off some pretty nifty tricks! Properties are defined simply by preceding a method with @property. My favorite trick with properties is to make a method look like an instance variable... class Starship(object): def __init__(self): self.engines = True self.engine_speed = 0 self.shields = True @property def engine_strain(self): if not self.engines: return 0 elif self.shields: # Imagine shields double the engine strain return self.engine_speed * 2 # Otherwise, the engine strain is the same as the speed return self.engine_speed When we're using this class, we can treat engine_strain as an instance variable of the object. uss_enterprise = Starship() uss_enterprise.engine_strain >>> 0 Beautiful, isn't it? (Un)fortunately, we cannot modify engine_strain in the same manner. uss_enterprise.engine_strain = 10 >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> AttributeError: can't set attribute In this case, that actually does make sense, but it might not be what you're wanting other times. Just for fun, let's define a setter for our property too; at least one with nicer output than that scary error. @engine_strain.setter def engine_strain(self, value): print("I'm giving her all she's got, Captain!") We precede our method with the decorator @NAME_OF_PROPERTY.setter. We also have to accept a single value argument (after self, of course), and positively nothing beyond that. You'll notice we're not actually doing anything with the value argument in this case, and that's fine for our example. uss_enterprise.engine_strain = 10 >>> I'm giving her all she's got, Captain! That's much better. As I mentioned earlier, we can use these as getters and setters for our instance variables. Here's a quick example of how: class Starship: def __init__(self): # snip self._captain = "Jean-Luc Picard" @property def captain(self): return self._captain @captain.setter def captain(self, value): print("What do you think this is, " + value + ", the USS Pegasus? Back to work!") We simply preceded the variable these functions concern with an underscore, to indicate to others that we intend to manage the variable ourselves. The getter is pretty dull and obvious, and is only needed to provide expected behavior. The setter is where things are interesting: we knock down any attempted mutinies. There will be no changing this captain! uss_enterprise = Starship() uss_enterprise.captain >>> 'Jean-Luc Picard' uss_enterprise.>> What do you think this is, Wesley, the USS Pegasus? Back to work! Technical rabbit trail: if you want to create class properties, that requires some hacking on your part. There are several solutions floating around the net, so if you need this, go research it! A few of the Python nerds will be on me if I didn't point out, there is another way to create a property without the use of decorators. So, just for the record, this works too... class Starship: def __init__(self): # snip self._captain = "Jean-Luc Picard" def get_captain(self): return self._captain def set_captain(self, value): print("What do you think this is, " + value + ", the USS Pegasus? Back to work!") captain = property(get_captain, set_captain) (Yes, that last line exists outside of any function.) As usual, the documentation on properties has additional information, and some more nifty tricks with properties. Inheritance Finally, we come back to that first line for another look. class Starship(object): Remember why that (object) is there? We're inheriting from Python's object class. Ahh, inheritance! That's where it belongs. class USSDiscovery(Starship): def __init__(self): super().__init__() self.spore_drive = True self._captain = "Gabriel Lorca" The only real mystery here is that super().__init__() line. In short, super() refers to the class we inherited from (in this case, Starship), and calls its initializer. We need to call this, so USSDiscovery has all the same instance variables as Starship. Of course, we can define new instance variables ( self.spore_drive), and redefine inherited ones ( self._captain). We could have actually just called that initializer with Starship.__init__(), but then if we wanted to change what we inherit from, we'd have to change that line too. The super().__init__() approach is ultimately just cleaner and more maintainable. Legacy Note: By the way, if you're using Python 2, that line is a little uglier: super(USSDiscovery, self).__init__(). Before you ask: YES, you can do multiple inheritance with class C(A, B):. It actually works better than in most languages! Regardless, but you can count on a side order of headaches, especially when using super(). Hold the Classes! As you can see, Python classes are a little different from other languages, but once you're used to them, they're actually a bit easier to work with. But if you've coded in class-heavy languages like C++ or Java, and are working on the assumption that you need classes in Python, I have a surprise for you. You really aren't required to use classes at all! Classes and objects have exactly one purpose in Python: data encapsulation. If you need to keep data and the functions for manipulating it together in a handy unit, classes are the way to go. Otherwise, don't bother! There's absolutely nothing wrong with a module composed entirely of functions. Review Whew! You still with me? How many of those surprises about classes in Python did you guess? Let's review... The __init__(self)function is the initializer, and that's where we do all of our variable initialization. Methods (member functions) must take selfas their first argument. Class methods must take clsas their first argument, and have the decorator @classmethodon the line just above the function definition. They can access class variables, but not instance variables. Static methods are similar to class methods, except they don't take clsas their first argument, and are preceded by the decorator @staticmethod. They cannot access any class or instance variables or functions. They don't even know they're part of a class. Instance variables (member variables) should be declared inside __init__(self)first. We don't declare them outside of the constructor, unlike most other object-oriented languages. Class variables or static variables are declared outside of any function, and are shared between all instances of the class. There are no private members in Python! Precede a member variable or a method name with an underscore ( _) to tell developers they shouldn't mess with it. If you precede a member variable or method name with two underscores ( __), Python will change its name using name mangling. This is more for preventing name conflicts than hiding things. You can make any method into a property (it looks like a member variable) by putting the decorator @propertyon the line above its declaration. This can also be used to create getters. You can create a setter for a property (e.g. foo) by putting the decorator @foo.setterabove a function foo. A class (e.g. Dog) can inherit from another class (e.g. Animal) in this manner: class Dog(Animal):. When you do this, you should also start your initializer with the line super().__init__()to call the initializer of the base class. Multiple inheritance is possible, but it might give you nightmares. Handle with tongs. As usual, I recommend you read the docs for more: - Python Tutorials: Classes - Python Reference: Built-In Functions - @classmethod - Python Reference: Built-In Functions - @staticmethod - Python Reference: Built-In Functions - @property Ready to go write some Python classes? Make it so! Thank you to deniska, grym (Freenode IRC #python), and @wangonya (Dev) for suggested revisions. Posted on by: Jason C. McDonald Author | Hacker | Speaker | Time Lord Discussion I read a really funny analogy for why python’s private-ish variables are good enough and we don’t have stricter access control: Thanks for the article! I'd like to add that you should mention that there's pretty much never a good reason to use staticmethodas opposed to a global method in the module. Usually, when we write a module, we can simply write a method outside the class, to get the same behaviour as a staticmethod I try to avoid such statements, especially in this article series. If it exists, it exists for some reason. ;) That said, I plan to discuss the ins and outs of this in more depth in the book. Ah I see! I really appreciate this series. It is very well written and enjoyable to read! By the way, what is that reason? Namespacing. Thanks for the excellent Article. Some small suggestion: in the setterexample the actual line of code that sets the Instance Member self.__captain = valueis missing ;-) Resulting in this output, Jean-Luc Picard refuses to go away.... Awesome coverage of classes in Python! Kudos to showing how to set properties using getters/setters. When I first learned python, I did not understand this and would create my own def to modify a property on my instances. Very fun, Next Generation is my favorite Trek series. Should clsbe passed into a staticmethod? I thought that was only for class methods I cannot believe it! I actually missed that little detail: @staticmethodand @classmethodare actually two separate things! I've just edited the article to correct that, and added a new section to clarify the difference. Thank you so much for correcting that. Great article! Nice, properties, getters, and setters all explain some things I had never even seen or thought of before (Python being my first programming language), it definitely expanded my understanding of what a class is and can do. Great article! Python is neither my primary nor my secondary language, but I've been using it a lot for my grad school work. I realize how naive my own Python code has been after reading your post haha. Do you have any suggestions for more material like this to learn the best practices? I have found that the python docs are not the most captivating. Thank you for this post! Great job. Unfortunately, I haven't found much! That's precisely why I started this article series. If you have some extra cash laying around, you could sign up for Udemy: The Complete Python Course by Codestars. He covers good practice pretty well. However, it is unfortunately quite beginner-oriented, so it's slow going at first. in the subtopic Methods should be as engage has no parameter factor Another great catch. Thank you! In inheritance, what if we do not write 'super().init()' in child class' init() method? Does child class not call it by default? No, it doesn't, as far as I know. As mentioned in the Zen of Python, Explicit is better than implicit. It's part of the language philosophy. We often need to handle passing data to the parent __init__()in a specific way, and we may need to do some other things first, so Python just assumes we know best how to handle that. Imagine how maddening it could get if Python sometimes called it for you, but sometimes not! (Some languages actually are confusing like that, but Python aims to be obvious.) Thanks for clarifying! It would be very helpful if you also explain MRO (Method Resolution Order) in context of Python 3 in any upcoming series. This was a very clear and well-written article, probably one of the best that I’ve read regarding Python classes. Thanks! Nice article Jason. Keep writing more. Thanks for writing this article.Jason Thank you for great article! Just one thing, you have a typo in your example "engine_strain" as @property. It should be "elif" instead "else if". Thanks for catching that! Not quite. The class variables are shadowed; instance variables eclipse, as they dominate. Good article, thanks 😎
https://dev.to/codemouse92/dead-simple-python-classes-42f7
CC-MAIN-2020-40
en
refinedweb
How to link with Apple Frameworks¶ It is common in MacOS that your Conan package needs to link with a complete Apple framework, and, of course, you want to propagate this information to all projects/libraries that use your package. With regular libraries, use self.cpp_info.libs object to append to it all the libraries: def package_info(self): self.cpp_info.libs = ["SDL2"] self.cpp_info.libs.append("OpenGL32") With frameworks we need to use self.cpp_info.frameworks in a similar manner: def package_info(self): self.cpp_info.libs = ["SDL2"] self.cpp_info.frameworks.extend(["Carbon", "CoreAudio", "Security", "IOKit"]), the directory of the framework folder (self.package_folder) into the cpp_info.frameworkdirs and the framework name into the cpp_info.frameworks. def package_info(self): ... self.cpp_info.frameworkdirs.append(self.package_folder) self.cpp_info.frameworks.append("MyFramework")
https://docs.conan.io/en/1.27/howtos/link_apple_framework.html
CC-MAIN-2020-40
en
refinedweb
future.scala is the spiritual successor to Stateless Future for stack-safe asynchronous programming in pure functional flavor. We dropped the Stateless Future's built-in async/ await support, in favor of more general monadic/ each syntax provided by ThoughtWorks Each. future.scala provide an API similar to scala.concurrent.Future or scalaz.concurrent.Task, except future.scala does not throw the StackOverflowError. DesignDesign future.scala inherits many design decision from Stateless Future. StatelessnessStatelessness future.scala are pure functional, thus they will never store result values or exceptions. Instead, future.scala evaluate lazily, and they do the same job every time you invoke onComplete. Also, there is no isComplete method in our futures. As a result, the users of future.scala are forced not to share futures between threads, not to check the states in futures. They have to care about control flows instead of threads, and build the control flows by creating futures. Threading-free ModelThreading-free Model There are too many threading models and implementations in the Java/Scala world, java.util.concurrent.Executor, scala.concurrent.ExecutionContext, javax.swing.SwingUtilities.invokeLater, java.util.Timer, ... It is very hard to communicate between threading models. When a developer is working with multiple threading models, he must very carefully pass messages between threading models, or he have to maintain bulks of synchronized methods to properly deal with the shared variables between threads. Why does he need multiple threading models? Because the libraries that he uses depend on different threading modes. For example, you must update Swing components in the Swing's UI thread, you must specify java.util.concurrent.ExecutionServices for java.nio.channels.CompletionHandler, and, you must specify scala.concurrent.ExecutionContexts for scala.concurrent.Future and scala.async.Async. Oops! Think about somebody who uses Swing to develop a text editor software. He wants to create a state machine to update UI. He have heard the cool scala.async, then he uses the cool "A-Normal Form" expression in async to build the state machine that updates UI, and he types import scala.concurrent.ExecutionContext.Implicits._ to suppress the compiler errors. Everything looks pretty, except the software always crashes. Fortunately, future.scala depends on none of these threading model, and cooperates with all of these threading models. If the poor guy tries future.scala, replacing async { } to monadic[Future] { }, deleting the import scala.concurrent.ExecutionContext.Implicits._, he will find that everything looks pretty like before, and does not crash any more. That's why threading-free model is important. Exception HandlingException Handling There were two Future implementations in Scala standard library, scala.actors.Future and scala.concurrent.Future. scala.actors.Futures are not designed to handling exceptions, since exceptions are always handled by actors. There is no way to handle a particular exception in a particular subrange of an actor. Unlike scala.actors.Futures, scala.concurrent.Futures are designed to handle exceptions. Unfortunately, scala.concurrent.Futures provide too many mechanisms to handle an exception. For example: import scala.concurrent.Await import scala.concurrent.ExecutionContext import scala.concurrent.duration.Duration import scala.util.control.Exception.Catcher import scala.concurrent.forkjoin.ForkJoinPool val threadPool = new ForkJoinPool() val catcher1: Catcher[Unit] = { case e: Exception => println("catcher1") } val catcher2: Catcher[Unit] = { case e: java.io.IOException => println("catcher2") case other: Exception => throw new RuntimeException(other) } val catcher3: Catcher[Unit] = { case e: java.io.IOException => println("catcher3") case other: Exception => throw new RuntimeException(other) } val catcher4: Catcher[Unit] = { case e: Exception => println("catcher4") } val catcher5: Catcher[Unit] = { case e: Exception => println("catcher5") } val catcher6: Catcher[Unit] = { case e: Exception => println("catcher6") } val catcher7: Catcher[Unit] = { case e: Exception => println("catcher7") } def future1 = scala.concurrent.future { 1 }(ExecutionContext.fromExecutor(threadPool, catcher1)) def future2 = scala.concurrent.Future.failed(new Exception) val composedFuture = future1.flatMap { _ => future2 }(ExecutionContext.fromExecutor(threadPool, catcher2)) composedFuture.onFailure(catcher3)(ExecutionContext.fromExecutor(threadPool, catcher4)) composedFuture.onFailure(catcher5)(ExecutionContext.fromExecutor(threadPool, catcher6)) try { Await.result(composedFuture, Duration.Inf) } catch { case e if catcher7.isDefinedAt(e) => catcher7(e) } Is any sane developer able to tell which catchers will receive the exceptions? There are too many concepts about exceptions when you work with scala.concurrent.Future. You have to remember the different exception handling strategies between flatMap, recover, recoverWith and onFailure, and the difference between scala.concurrent.Future.failed(new Exception) and scala.concurrent.future { throw new Exception }. scala.async does not make things better, because scala.async will produce a compiler error for every await in a try statement. Fortunately, you can get rid of all those concepts if you switch to future.scala. There is neither executor implicit parameter in flatMap or map in future.scala, nor onFailure nor recover method at all. You just simply try, and things get done. See the examples to learn that. Tail Call OptimizationTail Call Optimization Tail call optimization is an important feature for pure functional programming. Without tail call optimization, many recursive algorithm will fail at run-time, and you will get the well-known StackOverflowError. future.scala project is internally based on scalaz.Trampoline, and automatically performs tail call optimization in the monadic[com.thoughtworks.future.Future] { ??? } blocks, without any additional special syntax. Here is a trivial example: import scalaz.syntax.all._ import com.thoughtworks.raii.asynchronous._ import com.thoughtworks.continuation._ def v: UnitContinuation[Unit] = UnitContinuation.now(Unit) def f(x: Int): UnitContinuation[Unit] = v.flatMap { _ => g(x+1) } def g(x: Int): UnitContinuation[Unit] = v.flatMap { _ => f(x+1) } Calling f(0).blockingAwait results in an infinite loop without stack overflow. Mutually recursive calls are also fine in this case, as long as the calls are tail calls. See this example. The example creates 30000 stack levels recursively. And it just works, without any StackOverflowError or OutOfMemoryError. Note that if you port this example for scala.async it will throw an OutOfMemoryError or a TimeoutException. LinksLinks Related projectsRelated projects - Scalaz provides type classes and underlying data structures for this project. - ThoughtWorks Each provides monadic/ each-like syntax which can be used with this project. - tryt.scala provides exception handling monad transformers for this project. - RAII.scala uses this project for asynchronous automatic resource management. - DeepLearning.scala uses this project for asynchronous executed neural networks. - continuation.scala is the continuation library used by this project.
https://index.scala-lang.org/thoughtworksinc/future.scala/concurrent-converters/1.0.0-M0?target=_2.12
CC-MAIN-2020-40
en
refinedweb
Working on a program for the Euclidian algorithm, and it's giving me a bit of trouble. I think I have the math and such down, but it's giving me an unusual error. I believe I know what it's trying to tell me, but I can't figure out exactly what I've done wrong for the life of me! Ahem. My code so far (not complete, might I add) The 17th line:The 17th line:Code:#include <iostream> using namespace std; void prompt(int&, int&); int gcf (int, int); int reduce (int, int); void main() { int num1 = 0; int num2 = 0; int gcf = 0; prompt (num1, num2); cout << "Fraction so far: " << num1 << "/" << num2 << endl; gcf (num1, num2); } void prompt(int &a, int &b) { cout << "Enter your numerator: "; cin >> a; cout << "Enter your denominator: "; cin >> b; } int gcf (int num1, int num2) { int remainder=1; int gcf; while (remainder!=0) { remainder=num1%num2; gcf=num2%remainder; } return gcf; } is giving me trouble. As far as I know, it's correct for my purposes, but the compiler justi sn't happy with it. What have I missed?is giving me trouble. As far as I know, it's correct for my purposes, but the compiler justi sn't happy with it. What have I missed?Code:gcf (num1, num2);
https://cboard.cprogramming.com/cplusplus-programming/74621-term-does-not-evaluate-function-taking-2-arguments-bugger.html?s=77b60c8103d54a44282e00186f3133d1
CC-MAIN-2020-40
en
refinedweb
Hi, I always had problems with sorting the completion result elements, could you point in the right direction direction for doing this? I have an extension point for "completion.contributor", I'm adding my LookupElements to the result and that works fine, but I want to show my elements on top, is this possible? I've tried adding an extension point for "weigher", and I'm using a code like this: public class MagicentoPhpWeigher extends CompletionWeigher { @Override public Integer weigh(@NotNull LookupElement element, @NotNull CompletionLocation location) { if (location == null) { return null; } Object object = element.getObject(); // we can pass any object inside the LookupElement creator in our MagicentoXmlCompletionContributor if(object instanceof String){ String reference = (String) object; if(reference.startsWith("magicento")){ return -100; } } return null; } } for some strange reason this was working fine in PHPStorm 5, but not in v6 Thanks ! Enrique. When you add your LookupElement to the CompletionResultSet, you could use such an approach to give your element different importance level. I struggled with the CompletionWeighter implementation too until I found this and therefore, I would be intereste in a propper way too. I've tried that but I'm getting weird results, I have a code like this: For example: Ctrl+Space (first time): Ctrl+Space (second time): Is this the normal/expected behavior? It doesn't seem to be normal. Are all elements in the list added by your contributor? Does the list appear quickly, or shows calculation progress for some time? I think this is solved now just adding "order=first" to my contributor
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206772715-Sort-Completion-Result-elements?sort_by=created_at
CC-MAIN-2020-40
en
refinedweb
Asked by: Domain Object Model and the Law of Demeter. Question Hey folks, first of all thanks everyenu for contributing to my last question; not sure how to mark it off except to make it a discussion. Thanks though. Helped a lot. Another issue has raised it's head and this always seems to come about when I develop and the clue is in the posts title. Here is the situation. I create an object model, usually a hierarchy of object with a top level root object going down levels into child object that themselves have child objects. Here is a small example from my current project. public class Input { public ProjectInformation ProjectInformation { get; set; } public Options Options { get; set; } public Plant Plant { get; set; } public Load DesignLoad { get { return this.loads.Where(load => load.IsDesignLoad).First(); } } Ok so you can see the Input class, the root object, is made up of other child classes ProjectInformation, Options, Plant and Load. Ok lets look at some of the Load class. public class Load { public string Name { get; set; } public Fuel Fuel { get; set; } public CombustionHeat CombustionHeat { get; set; } public CombustionAir CombustionAir { get; set; } Ok the Load class is made up some other child objects Fuel, Heat, and Air. Lets look at the Fuel class..... public class Fuel { public Coal Coal { get; set; } public Gas Gas { get; set; } public Oil Oil { get; set; } ... ok so you seeing the idea... If you have any immediate comments about this design approach them let me know. Most of the software I write tends ta have this sort of tree of objects and if it's wrong or if there is a better way then please please let me know. Ok so I have this tree of objects that represents Input and this is where the information comes from when doing processing... calculations... What I'm finding, and it tends to happen, is I write code like this.... double[] airFlowRatesExc = input.DesignLoad.AirFlow; double[] coalFlowRates = input.DesignLoad.Fuel.Coal.FlowRates.PARate; See the train crash?! Law of Demeter does not apply and I have a horrible feeling it's going to bite me some day in the not to distant future. The last thing I want to do is have a host of methods on the root Input object that return data from the lowest level in the object tree, well I say the last thing but what I mean by that is if there was an easy way to do it then I would but ... I'm sure you know what I'm getting at. What's going through your mind right now reading this? What's your opinion of creating the tree of objects like that? in there an alternative, or a suitable alternative approach that you would recommend and have used? How about the law of demeter; is it a law? Anything you have to say folks. "The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination." - Fred Brooks All replies You seem to have a lot of levels there mate. Why is there an input class at all? Next thought is why are your calculations carried out way up there in the top class. Are these objects you have there really objects or are they just classifications of input? Could you just have regions rather than classes for some of them? I tend to apply the rule of 4 effs. That's the four fan fold fingers rule. It dates back to when I used to work in cobol and read fan fold printouts. Going down a level to a different procedure ( object/class) I'd stick a finger in the fan fold where I was going from. About the time I ran out of fingers I'd have completely lost track of all the levels I had come down to get wherever I was. Not a hard and fast rule but something to consider. Hey Andy, thanks for your post. Yeah there are a few child levels in the object tree. Been thinking of what you posted about whether the classes that are listed are regions or classes and for some places they could be considered regions. ProjectInformation and Configuration are not real work objects and yeah could be considered more of a classification / region. Well ... configuration could be real world, the configuration of the thing. But most of the classes in the code are real world objects or represent real world things and their relationships. For example Fuel is a real tangable thing in they system and it's composed of a mixture of Coal, Oil and Gas, which themselves are real things. The more I think of it the more it makes sense; the other option would be to flatten the tree into a collection of dictionaries. That would work and would have been nice but I'd lose a certain amount of type safety. Everything in the dictionary approach would be of type object. Your absolutely right though the deep level in the object tree is what's conflicting with the law of demeter and causing the train crash code. So I've been thinking how can the tree remain, because it feels accurate, with the deep levels but be accessed like things were flat. The visitors design pattern! What this has done is seperated out the processing that's done on the tree from the structure of the tree. It works very well and provides a lot of options in adding new features without worrying to much about the impact of structural changes to the tree. Well to a degree. The visitor pattern treats each type of object in the tree as seperate from other types of objects. It's not perfect but think I'll go with it. "The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination." - Fred Brooks
https://social.msdn.microsoft.com/Forums/en-US/8221758c-8147-479a-82fd-278f717a2c04/domain-object-model-and-the-law-of-demeter?forum=architecturegeneral
CC-MAIN-2020-40
en
refinedweb
Outlier treatment and Featuring Engineering would be the next steps in continuation to Missing Data Treatment. Outliers Definition: An outlier is an observation that lies an abnormal distance from other values in a random sample from a population. It is an observation that deviates from overall pattern on a sample. Outliers can be caused due to multiple reasons like: - Data Entry Errors - Intermediate Data processing Errors - Instrument recording errors - Natural Error or which does not denote an error Outlier Detection and Treatment: Outliers can be Univariate or Multivariate meaning on single feature or collection of features respectively. Boxplots or Scatter plots are an easy way of determining the outliers in a sample. Interquartile Range is most commonly used technique to determine an outlier. Below is an example to understand the same: Sample: 4, 7, 9, 11, 12, 20 (arranged in ascending order) Divide sample into 2 so lower half is 4, 7, 9 and upper half is 11, 12, 20 Find Median of lower and upper half which is 7 and 12 respectively So Q1 = 7 and Q3 = 12 IQR = Q3 – Q1 which is 5 (12 -7 = 5) Outliers: a = Q1 – (1.5*IQR); b = Q3 = Q1 – (1.5*IQR) any number < a or > b is an outlier. Hence in our sample 20 is an outlier. Outlier Treatment: One way of getting rid outliers is by removing them observation (or deleting the row). But by doing so we might reduce the size of the sample or dataset which will not help in modelling. Another most commonly used technique is using transformation or binning the variable. Transformation is by taking the natural log of the value which greatly reduces the variation specially used when we have too extreme values. Binning as the name suggests classifying all the values into set of defined bins (like 0-10; 10-20; 20-30 and so on..) Feature Engineering: This is an art of extracting more meaningful information from the existing data without adding anything new. In housing data, having total Sq. Feet is more relevant than having individual floor Square Feet which can be considered as Feature Engineering. Feature Engineering process should be performed after completing Exploratory Data Analysis (EDA), Missing value treatment and Outlier treatment. Now we will see it in action using the same Ames housing data set. I will be using the output of my missing value treatment script discussed in another post. You can find the script here . Import Libraries: import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline from matplotlib import rcParams rcParams['figure.figsize'] = 12,10 import seaborn as sb Read Dataset: df = pd.read_csv('C:/../Ames_cleaned.csv') df.shape (2919, 70) Let us try to find outliers in continuous variables like: ‘1stFlrSF’,’2ndFlrSF’,’TotalBsmtSF’ sb.boxplot(x=df[['1stFlrSF','2ndFlrSF','TotalBsmtSF']]) Clearly we can see there are some extreme values for 1stFlrSF and TotalBsmtSF. However we will not do an outlier treatment now because we will do some Feature Engineering to them. We will combine all of them as TotalSF and see how the boxplot shows up. #Feature Engineering df['TotalSF'] = df['1stFlrSF'] + df['2ndFlrSF'] + df['TotalBsmtSF'] sb.boxplot(x=df['TotalSF'], orient='v') Now lets see for SalePrice, GrLivArea and LotFrontage sb.boxplot(x=df['GrLivArea'], orient='v') plt.show() sb.boxplot(x=df['LotFrontage'], orient='v') plt.show() sb.boxplot(x=df['LotFrontage'], orient='v') Clearly there are some extreme outliers in the data. We will use log transformation to reduce the variation which means the outliers will be removed completely but extreme values become reasonably better. Log transforming TotalSF, GrLivArea, LotFrontage #Log transforming df['GrLivArea'] = np.log(df['GrLivArea']) df['LotFrontage'] = np.log(df['LotFrontage']) df['TotalSF'] = np.log(df['TotalSF']) #plotting after transformation sb.boxplot(x=df['GrLivArea'], orient='v') plt.show() sb.boxplot(x=df['LotFrontage'], orient='v') plt.show() sb.boxplot(x=df['TotalSF'], orient='v') It is evident from the above graphs that extreme outliers are treated. We can combine BedroomAbvGr and TotRmsAbvGrd into TotalRooms. Following that we will drop all the variables which were feature engineered df['TotalRooms'] = df['BedroomAbvGr'] + df['TotRmsAbvGrd'] # Drop Feature engineered columns col_fe = ['1stFlrSF','2ndFlrSF','BsmtFinSF1','BsmtFinSF2','BsmtUnfSF','TotalBsmtSF','BedroomAbvGr','TotRmsAbvGrd'] df.drop(col_fe, axis=1, inplace=True) print('Total Features after removing engineered features: ', (df.shape)) Total Features after removing engineered features: (2919, 64) Split into train and test datasets train = df.loc[df['source'] == 'train'] test = df.loc[df['source'] == 'test'] print(train.shape, test.shape) (1460, 64) (1459, 64) For categorical variables we will try to find the percentage of most frequent value. In other words percentage of mode. We will drop the variables which have mode > 80%. This is because there is very less variability and hence might not have significant contribution to the model. # Drop columns which have frequency of value more than 80% of all values col, axis=1, inplace=True) print('Total features after dropping categorical features: ', df.shape) Total features after dropping categorical features: (2919, 44) With this we have tried to understand some basics on Outlier Treatment and Feature Engineering. Feature Engineering is the most critical step which determines the success of the model. Hence an in-depth understanding of the domain of the dataset is a huge advantage to derive relevant features necessary for building a Predictive Model. -Hari Mindi
http://dba-datascience.com/outlier-and-feature-engineering-datascience/
CC-MAIN-2020-40
en
refinedweb
FriendlyThings for RK3399 查看中文 Note: the steps and methods presented here apply to all FriendlyElec's RK3399 based boards. For steps and methods that apply to other platforms refer to FriendlyThings Contents - 1 Introduction - 2 Android Versions - 3 List of Applicable Boards - 4 Quick Start - 5 APIs in libfriendlyarm-things.so Library - 6 Access RK3399 Based Boards' Hardware under Android - 7 Download Links to Code Samples 1 Introduction FriendlyThings is an Android SDK developed by FriendlyElec to access hardware. Users can use it to access various hardware resources Uart, SPI, I2C, GPIO etc on a FriendlyElec ARM board under Android. This SDK is based on Android-NDK. Users can use it to develop popular IoT applications without directly interacting with drivers. 2 Android Versions The Android BSPs provided by FriendlyElec already have FriendlyThings SDK(libfriendlyarm-things.so) and currently have two version: - Android 7.1.2-rk3399 BSP source code download link: BSP source code location on the network disk: sources/rk3399-android-7.git-YYYYMMDD.tgz Latest ROM download link: - Android 8.1-rk3399 BSP source code download link: BSP source code location on the network disk: sources/rk3399-android-8.1.git-YYYYMMDD.tgz Latest ROM download link: 3 List of Applicable Boards FriendlyThings SDK(libfriendlyarm-things.so) works with the following FriendlyElec RK3399 based boards: - NanoPC-T4 - NanoPi M4 (an external eMMC module is needed) - NanoPi NEO4 (an external eMMC module is needed) FriendlyThings might also work with other FriendlyElec boards such as Samsung S5P4418/S5P6818, Samsung S5PV210, Allwinner H3/H5 etc. For more details refer to FriendlyThings 4 Quick Start 4.1 Step 1: Include libfriendlyarm-things.so in APP Clone the following library locally: git clone Copy all the files under the libs directory to your working directory and create a "com/friendlyarm" directory in your Android project's src directory, copy the whole "java/FriendlyThings" to your newly created "com/friendlyarm" directory. The whole project directory will look like this(Note:AndroidStudio's project may be a little bit different): YourProject/ ├── AndroidManifest.xml ├── libs │ ├── arm64-v8a │ │ └── libfriendlyarm-things.so │ └── armeabi │ └── libfriendlyarm-things.so ├── src │ └── com │ └── friendlyarm │ ├── FriendlyThings │ │ ├── BoardType.java │ │ ├── FileCtlEnum.java │ │ ├── GPIOEnum.java │ │ ├── HardwareControler.java │ │ ├── SPIEnum.java │ │ ├── SPI.java │ │ └── WatchDogEnum.java Import the following components and the major APIs are included in the HardwareControler.java file: import com.friendlyarm.FriendlyThings.HardwareControler; import com.friendlyarm.FriendlyThings.SPIEnum; import com.friendlyarm.FriendlyThings.GPIOEnum; import com.friendlyarm.FriendlyThings.FileCtlEnum; import com.friendlyarm.FriendlyThings.BoardType; 4.2 Step 2: Give APP System Right Your app needs the system right to access hardware resources; Give your app the system right by making changes in the AndroidManifest.xml file and the Android.mk file; It is better to include your app in your Android source code and compile them together. If your app is not compiled together with your Android source code you have to go through tedious steps to compile your app and sign your app to give it the system right. 4.2.1 Modify AndroidManifest.xml Add the following line in the manifest node in the AndroidManifest.xml file: android:sharedUserId="android.uid.system" 4.2.2 Modify Android.mk Create an Android.mk file(the simplest way is to copy a sample Android.mk file), modify the Android.mk file by adding a line LOCAL_CERTIFICATE := platform : LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := Project Name LOCAL_CERTIFICATE := platform LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS := -lfriendlyarm-hardware include $(BUILD_PACKAGE) 4.3 Final Step: Compile Your APP Together with Android Source Code Go to Android source code's root directory and run "setenv.sh" to export environmental variables, enter your app's directory and run "mm" to compile: For example: compile the GPIO_LED_Demo on RK3399: cd rk3399-android-8.1 . setenv.sh cd vendor/friendlyelec/apps/GPIO_LED_Demo mm 5 APIs in libfriendlyarm-things.so Library Refer to this wiki site:FriendlyThings APIs 6 Access RK3399 Based Boards' Hardware under Android 6.1 Serial Port Currently the only available serial port for users is UART4 and its device name is "/dev/ttyS4". Other serial ports are already taken. Here is a list of the serial ports and their functions. If you need more serial ports you can convert USB ports to serial ports: 6.1.1 APIs for Accessing Serial Ports HardwareControler.openSerialPortEx //opens a serial port. HardwareControler.select //polls a serial port's status and checks if it has data to be read or if data can be written to it. HardwareControler.read //reads data from a serial port. HardwareControler.write //writes data to a serial port. HardwareControler.close //closes a serial port. For more details refer to :FriendlyThings APIs 6.2 GPIO You can access GPIO by calling sysfs APIs. You need to access the "/sys/class/gpio" directory, write a GPIO index number you want to access to the export file, and set the GPIO's direction and value. Here is a list of GPIOs FriendlyElec's RK3399 boards support: - NanoPC T4 - NanoPi M4和NanoPi NEO4 6.2.1 APIs for Accessing GPIO HardwareControler.exportGPIOPin //exports a GPIO. HardwareControler.setGPIODirection //sets a GPIO's direction. HardwareControler.getGPIODirection //gets a GPIO's direction. HardwareControler.setGPIOValue //sets a GPIO's value. HardwareControler.getGPIOValue //gets a GPIO's value HardwareControler.unexportGPIOPin //unexports a GPIO. For more details refer to:FriendlyThings APIs 6.2.2 Testing GPIO You can use a FriendlyElec's LED module to test GPIOs. Set a HIGH to turn on the LED and a LOW to turn off the LED. 6.3 ADC RK3399 populates three ADC channels 0, 2 and 3 and here is a list of the channels and their corresponding nodes: You can access GPIOs like accessing files under Android. 6.4 PWM Note: The PWM interface is already used by the fan by default. If you want to control the PWM by yourself, you need to disable the fan first, Please refer to: Template:RK3399 Android PWMFan You can access PWMs by calling sysfs APIs. You can access the nodes under the "/sys/class/pwm/pwmchip1" directory. Here is code sample to control a PWM fan: 6.4.1 APIs for Accessing PWM - Export PWM0 to users echo 0 > /sys/class/pwm/pwmchip1/export - Control a PWM fan's speed by setting the PWM's period and duty_cycle. 6.4.2 Testing PWM Connect a PWM fan(3 pins) to a NanoPC-T4's fan port to test it. 6.5 I2C To test I2C we connected a FriendlyElec's LCD1602 module to a NanoPC-T4 and ran the I2C demo program: Here is a hardware setting: 6.6 RTC You can access RTC by calling APIs under the "/sys/class/rtc/rtc0/" directory. For instance you can check the current RTC time by running the following commands: cat /sys/class/rtc/rtc0/date # 2018-10-20 cat /sys/class/rtc/rtc0/time # 08:20:14 Set power-on time. For instance power on in 120 seconds: #Power on in 120 seconds echo +120 > /sys/class/rtc/rtc0/wakealarm 6.7 Watch dog It is quite straightforward to access the watch dog. You can simply open the "/dev/watchdog" device and write characters to it.If for any reason no characters can be written to the device the system will reboot in a moment: mWatchDogFD = HardwareControler.open("/dev/watchdog", FileCtlEnum.O_WRONLY); HardwareControler.write(mWatchDogFD, "a".getBytes()); 6.8 SPI 6.8.1 Enable SPI The SPI and UART4 share the same pins. You need to modify the kernel's DTS file to enable the SPI by running the following commands: Edit the DTS file: arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi: cd ANDROID_SOURCE/kernel vim arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi You need to replace "ANDROID_SOURCE" to your real source. In our system it is either Android7's or Android8's source code directory. Locate spi1's definition: &spi1 { status = "disabled"; // change "disabled" to "okay" Locate uart4's definition in the rk3399-nanopi4-common.dtsi file: &uart4 { status = "okay"; // change "okay" to "disabled" Compile kernel: cd ANDROID_SOURCE/ ./build-nanopc-t4.sh -K -M Use the newly generated "rockdev/Image-nanopc_t4/resource.img" image file to update your system. 6.8.2 Testing SPI By default the SPI is not enabled in your system. You need to manually enable it by making changes to your Android source code: vendor/friendlyelec/apps# vi device-partial.mk Remove the comment: # PRODUCT_PACKAGES += SPI-OLED Compile Android source code We connected a FriendlyElec's OLED module which had a 0.96" LCD with a resolution of 128 x 64 and a SPI interface to a NanoPC-T4 and tested it. The LCD module had 7 pins and here is hardware setup: 6.8.3 APIs for Accessing SPI For more details refer to:FriendlyThings APIs 7 Download Links to Code Samples All the code samples are included in FriendlyElec's Android source code and are under the "vendor/friendlyelec/apps" directory in Android7.1.2 and Android8.1. Or you can download individual code samples. Here is a list of code samples and their download links: 7.1 Android8.1 7.1.1 Applicable Boards - NanoPC-T4/NanoPi-M4/NanoPi-NEO4 7.2 Android7.1.2 7.2.1 Applicable Boards - NanoPC-T4/NanoPi-M4/NanoPi-NEO4
http://wiki.friendlyarm.com/wiki/index.php?title=FriendlyThings_for_RK3399&direction=next&oldid=19098
CC-MAIN-2020-40
en
refinedweb
fuchsia / third_party / android / platform / system / core / d8c1ae910f70124cccd82670d70f27af7a0c6644 / . / libutils / README blob: 01741e0930c74e55400656409852848c3c7e5cc4 [ file ] [ log ] [ blame ] Android Utility Function Library ================================ If you need a feature that is native to Linux but not present on other platforms, construct a platform-dependent implementation that shares the Linux interface. That way the actual device runs as "light" as possible. If that isn't feasible, create a system-independent interface and hide the details. The ultimate goal is *not* to create a super-duper platform abstraction layer. The goal is to provide an optimized solution for Linux with reasonable implementations for other platforms. Resource overlay ================ Introduction ------------ Overlay packages are special .apk files which provide no code but additional resource values (and possibly new configurations) for resources in other packages. When an application requests resources, the system will return values from either the application's original package or any associated overlay package. Any redirection is completely transparent to the calling application. Resource values have the following precedence table, listed in descending precedence. * overlay package, matching config (eg res/values-en-land) * original package, matching config * overlay package, no config (eg res/values) * original package, no config During compilation, overlay packages are differentiated from regular packages by passing the -o flag to aapt. Background ---------- This section provides generic background material on resources in Android. How resources are bundled in .apk files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Android .apk files are .zip files, usually housing .dex code, certificates and resources, though packages containing resources but no code are possible. Resources can be divided into the following categories; a `configuration' indicates a set of phone language, display density, network operator, etc. * assets: uncompressed, raw files packaged as part of an .apk and explicitly referenced by filename. These files are independent of configuration. * res/drawable: bitmap or xml graphics. Each file may have different values depending on configuration. * res/values: integers, strings, etc. Each resource may have different values depending on configuration. Resource meta information and information proper is stored in a binary format in a named file resources.arsc, bundled as part of the .apk. Resource IDs and lookup ~~~~~~~~~~~~~~~~~~~~~~~ During compilation, the aapt tool gathers application resources and generates a resources.arsc file. Each resource name is assigned an integer ID 0xppttiii (translated to a symbolic name via R.java), where * pp: corresponds to the package namespace (details below). * tt: corresponds to the resource type (string, int, etc). Every resource of the same type within the same package has the same tt value, but depending on available types, the actual numerical value may be different between packages. * iiii: sequential number, assigned in the order resources are found. Resource values are specified paired with a set of configuration constraints (the default being the empty set), eg res/values-sv-port which imposes restrictions on language (Swedish) and display orientation (portrait). During lookup, every constraint set is matched against the current configuration, and the value corresponding to the best matching constraint set is returned (ResourceTypes.{h,cpp}). Parsing of resources.arsc is handled by ResourceTypes.cpp; this utility is governed by AssetManager.cpp, which tracks loaded resources per process. Assets are looked up by path and filename in AssetManager.cpp. The path to resources in res/drawable are located by ResourceTypes.cpp and then handled like assets by AssetManager.cpp. Other resources are handled solely by ResourceTypes.cpp. Package ID as namespace ~~~~~~~~~~~~~~~~~~~~~~~ The pp part of a resource ID defines a namespace. Android currently defines two namespaces: * 0x01: system resources (pre-installed in framework-res.apk) * 0x7f: application resources (bundled in the application .apk) ResourceTypes.cpp supports package IDs between 0x01 and 0x7f (inclusive); values outside this range are invalid. Each running (Dalvik) process is assigned a unique instance of AssetManager, which in turn keeps a forest structure of loaded resource.arsc files. Normally, this forest is structured as follows, where mPackageMap is the internal vector employed in ResourceTypes.cpp. mPackageMap[0x00] -> system package mPackageMap[0x01] -> NULL mPackageMap[0x02] -> NULL ... mPackageMap[0x7f - 2] -> NULL mPackageMap[0x7f - 1] -> application package The resource overlay extension ------------------------------ The resource overlay mechanism aims to (partly) shadow and extend existing resources with new values for defined and new configurations. Technically, this is achieved by adding resource-only packages (called overlay packages) to existing resource namespaces, like so: mPackageMap[0x00] -> system package -> system overlay package mPackageMap[0x01] -> NULL mPackageMap[0x02] -> NULL ... mPackageMap[0x7f - 2] -> NULL mPackageMap[0x7f - 1] -> application package -> overlay 1 -> overlay 2 The use of overlay resources is completely transparent to applications; no additional resource identifiers are introduced, only configuration/value pairs. Any number of overlay packages may be loaded at a time; overlay packages are agnostic to what they target -- both system and application resources are fair game. The package targeted by an overlay package is called the target or original package. Resource overlay operates on symbolic resources names. Hence, to override the string/str1 resources in a package, the overlay package would include a resource also named string/str1. The end user does not have to worry about the numeric resources IDs assigned by aapt, as this is resolved automatically by the system. As of this writing, the use of resource overlay has not been fully explored. Until it has, only OEMs are trusted to use resource overlay. For this reason, overlay packages must reside in /system/overlay. Resource ID mapping ~~~~~~~~~~~~~~~~~~~ Resource identifiers must be coherent within the same namespace (ie PackageGroup in ResourceTypes.cpp). Calling applications will refer to resources using the IDs defined in the original package, but there is no guarantee aapt has assigned the same ID to the corresponding resource in an overlay package. To translate between the two, a resource ID mapping {original ID -> overlay ID} is created during package installation (PackageManagerService.java) and used during resource lookup. The mapping is stored in /data/resource-cache, with a @idmap file name suffix. The idmap file format is documented in a separate section, below. Package management ~~~~~~~~~~~~~~~~~~ Packages are managed by the PackageManagerService. Addition and removal of packages are monitored via the inotify framework, exposed via android.os.FileObserver. During initialization of a Dalvik process, ActivityThread.java requests the process' AssetManager (by proxy, via AssetManager.java and JNI) to load a list of packages. This list includes overlay packages, if present. When a target package or a corresponding overlay package is installed, the target package's process is stopped and a new idmap is generated. This is similar to how applications are stopped when their packages are upgraded. Creating overlay packages ------------------------- Overlay packages should contain no code, define (some) resources with the same type and name as in the original package, and be compiled with the -o flag passed to aapt. The aapt -o flag instructs aapt to create an overlay package. Technically, this means the package will be assigned package id 0x00. There are no restrictions on overlay packages names, though the naming convention <original.package.name>.overlay.<name> is recommended. Example overlay package ~~~~~~~~~~~~~~~~~~~~~~~ To overlay the resource bool/b in package com.foo.bar, to be applied when the display is in landscape mode, create a new package with no source code and a single .xml file under res/values-land, with an entry for bool/b. Compile with aapt -o and place the results in /system/overlay by adding the following to Android.mk: LOCAL_AAPT_FLAGS := -o com.foo.bar LOCAL_MODULE_PATH := $(TARGET_OUT)/overlay The ID map (idmap) file format ------------------------------ The idmap format is designed for lookup performance. However, leading and trailing undefined overlay values are discarded to reduce the memory footprint. idmap grammar ~~~~~~~~~~~~~ All atoms (names in square brackets) are uint32_t integers. The idmap-magic constant spells "idmp" in ASCII. Offsets are given relative to the data_header, not to the beginning of the file. map := header data header := idmap-magic <crc32-original-pkg> <crc32-overlay-pkg> idmap-magic := <0x706d6469> data := data_header type_block+ data_header := <m> header_block{m} header_block := <0> | <type_block_offset> type_block := <n> <id_offset> entry{n} entry := <resource_id_in_target_package> idmap example ~~~~~~~~~~~~~ Given a pair of target and overlay packages with CRC sums 0x216a8fe2 and 0x6b9beaec, each defining the following resources Name Target package Overlay package string/str0 0x7f010000 - string/str1 0x7f010001 0x7f010000 string/str2 0x7f010002 - string/str3 0x7f010003 0x7f010001 string/str4 0x7f010004 - bool/bool0 0x7f020000 - integer/int0 0x7f030000 0x7f020000 integer/int1 0x7f030001 - the corresponding resource map is 0x706d6469 0x216a8fe2 0x6b9beaec 0x00000003 \ 0x00000004 0x00000000 0x00000009 0x00000003 \ 0x00000001 0x7f010000 0x00000000 0x7f010001 \ 0x00000001 0x00000000 0x7f020000 or, formatted differently 0x706d6469 # magic: all idmap files begin with this constant 0x216a8fe2 # CRC32 of the resources.arsc file in the original package 0x6b9beaec # CRC32 of the resources.arsc file in the overlay package 0x00000003 # header; three types (string, bool, integer) in the target package 0x00000004 # header_block for type 0 (string) is located at offset 4 0x00000000 # no bool type exists in overlay package -> no header_block 0x00000009 # header_block for type 2 (integer) is located at offset 9 0x00000003 # header_block for string; overlay IDs span 3 elements 0x00000001 # the first string in target package is entry 1 == offset 0x7f010000 # target 0x7f01001 -> overlay 0x7f010000 0x00000000 # str2 not defined in overlay package 0x7f010001 # target 0x7f010003 -> overlay 0x7f010001 0x00000001 # header_block for integer; overlay IDs span 1 element 0x00000000 # offset == 0 0x7f020000 # target 0x7f030000 -> overlay 0x7f020000
https://fuchsia.googlesource.com/third_party/android/platform/system/core/+/d8c1ae910f70124cccd82670d70f27af7a0c6644/libutils/README
CC-MAIN-2020-40
en
refinedweb
, can't integrate Dagger2 bacause of error “Activity cannot be provided without an @Inject constructor ” I want to integrate Dagger2, but i cant' build my project, build failed with: error: com.example.animalslibrary.ui.home.activity.HomeActivity cannot be provided without an @Inject constructor or from an @Provides-annotated method. com.example.animalslibrary.ui.home.activity.HomeActivity is injected at com.example.animalslibrary.AppComponent.injectsHomeActivity(homeActivity) I looking for answer about 3 hours, and i asking you for help now. My actions step by step: 1) Add depenceses to Gradle: implementation 'com.google.dagger:dagger:2.7' annotationProcessor 'com.google.dagger:dagger-compiler:2.7' 2) Create empty test class NetworkUtils: public class NetworksUtils { } 3) Create module for it: @Module public class NetworksModule { @Provides NetworksUtils provideNetworksUtils() { return new NetworksUtils(); } } 4) Create "connection" interface: import dagger.Component; @Component(modules = NetworksModule.class) public interface AppComponent { void injectsHomeActivity(HomeActivity homeActivity); } 5) Create App class. I don't completle understand why i did this(teaching by guide),exactly i don't understand why i need to extend by Application. Maybe to create all components when application starts. DaggerAppComponent is red, because of failed while building, this class does't created yet. public class App extends Application { private static AppComponent component; @Override public void onCreate() { super.onCreate(); component = DaggerAppComponent.create(); } public static AppComponent getComponent() { return component; } } 6) Add App to manifest: <application android:name="com.example.animalslibrary.ui.App" ... 7) Now i write my HomeActivity class... public class HomeActivity extends AppCompatActivity implements HomeContract.View { ... @Inject private NetwotkUtils netwotkUtils; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); ... App.getComponent().injectsHomeActivity(this); ... } 8)...and goes down when try to build project. I think my error about App, but i can't understand where and how fix it. UPD: This modification is not helped: public class NetwotkUtils { @Inject public NetwotkUtils() { } }
https://prodevsblog.com/questions/189/android-cant-integrate-dagger2-bacause-of-error-activity-cannot-be-provided-w/
CC-MAIN-2020-40
en
refinedweb
Detect a face with OpenCV Please Note: This Post refers to OpenCV 2.x! The following sample uses the classes videoand common, which are helper classes from the samples/python2 folder. The cascades used in this sample are located in the data folder of your OpenCV download, so you'll probably need to adjust the filename parameter cascade_fn to make this example work: import cv2 from video import create_capture from common import clock, draw_str # You probably need to adjust some of these: video_src = 0 cascade_fn = "haarcascades/haarcascade_frontalface_default.xml" # Create a new CascadeClassifier from given cascade file: cascade = cv2.CascadeClassifier(cascade_fn) cam = create_capture(video_src) while True: ret, img = cam.read() # Do a little preprocessing: img_copy = cv2.resize(img, (img.shape[1]/2, img.shape[0]/2)) gray = cv2.cvtColor(img_copy, cv2.COLOR_BGR2GRAY) gray = cv2.equalizeHist(gray) # Detect the faces (probably research for the options!): rects = cascade.detectMultiScale(gray) # Make a copy as we don't want to draw on the original image: for x, y, width, height in rects: cv2.rectangle(img_copy, (x, y), (x+width, y+height), (255,0,0), 2) cv2.imshow('facedetect', img_copy) if cv2.waitKey(20) == 27: break
https://www.bytefish.de/blog/object_detection.html
CC-MAIN-2020-40
en
refinedweb
What are generators? Generators are helper programs that output test. Most programming task usually has a large input (for example, an array of up to 2 * 105 elements, a tree of up to 105 vertices), so it's not possible to add all the tests manually. In these cases, generators come to the rescue. If you are writing a generator in C++, it is recommended to use the testlib.h library. Types of generators There are two types of generators: - Single-test generator: output exactly one test in a single run. Usually, to generate several tests, one must run the generator several times with different command line parameters. Such generators output the test to the standard output stream (to the screen). - Multiple-test generator: output many tests in a single run. Such generators output tests to files (one file for each test). An example single-test generator with testlib.h The following generator output a pair of integers with each element from 1 to n — where n is a command line parameter passed to the generator. #include "testlib.h" #include <iostream> using namespace std; int main(int argc, char* argv[]) { registerGen(argc, argv, 1); int n = atoi(argv[1]); cout << rnd.next(1, n) << " "; cout << rnd.next(1, n) << endl; } Why testlib.h? On the surface, it seems that testlib.h is not necessary to write a generator. This is not true. Almost all generators need to generate random values, and it is tempted to use rand(). However, this is a bad practice. A basic principle of writing generators is that: a generator must output the same test when compiled by any compiler on any platform if it is run in the same way (using the same command line parameters). When using rand() or C++11 classes like mt19937/uniform_int_distribution, your program will output different tests when compiled with different compilers. The random value generator in testlib.h ensures that the same value is generated regardless of the (test) generator and platform. Besides, testlib.h has various conveniences for generating tests, for example, rnd.next("[a-z]{1,10}") will return a random word of length 1 to 10 from letters a to z. Translator's note: There are more issues with using rand() aside from the above one. Refer to this blog for a detailed explanation about these issues. Available method To initialize a testlib generator, the first line of your generator must be of the form registerGen(argc, argv, 1); (where 1 is the version of the random number generator used). After that, it will be possible to use the rnd object, which will be initialized with a hash from all the command line arguments. Thus, the output of g 100 and g.exe "100" will be the same, while g 100 0 will be different. rnd is of type random_t. That is, you can create your own generator, but this is not necessary in most of the cases. rnd has many useful member functions. Here are some examples: Also, please do not use std::random_shuffle, use the shuffle from testlib.h instead. It also takes two iterators, but works using rnd. Translator's note: If my understanding is correct, rnd.wnext is defined as follows: Example: generating an undirected tree Below is the code of an undirected tree generator that takes two parameters — the number of vertices and the 'elongation' of the tree. For example: - For n = 10, t = 1000, a path graph (degree of all vertices are at most 2) is likely to be generated - For n = 10, t = - 1000, a star graph (there's only one non-leaf vertex in the tree) is likely to be generated. registerGen(argc, argv, 1); int n = atoi(argv[1]); int t = atoi(argv[2]); vector<int> p(n); /* setup parents for vertices 1..n-1 */ for(int i = 0; i < n; ++i) if (i > 0) p[i] = rnd.wnext(i, t); printf("%d\n", n); /* shuffle vertices 1..n-1 */ vector<int> perm(n); for(int i = 0; i < n; ++i) perm[i] = i; shuffle(perm.begin() + 1, perm.end()); /* put edges considering shuffled vertices */ vector<pair<int,int> > edges; for (int i = 1; i < n; i++) if (rnd.next(2)) edges.push_back(make_pair(perm[i], perm[p[i]])); else edges.push_back(make_pair(perm[p[i]], perm[i])); /* shuffle edges */ shuffle(edges.begin(), edges.end()); for (int i = 0; i + 1 < n; i++) printf("%d %d\n", edges[i].first + 1, edges[i].second + 1); How to write a multiple-test generator? A multiple-test generator in one execution can output more than one test. Tests by such a generator are output to files. In the generator on testlib.h it is enough to write startTest(test_index) before the test output. This will re-open ( freopen) the standard output stream to a file named test_index. Please note that if you are working with the Polygon system, in this case, you need to write something like multigen a b c > {4-10} in the script (if it is assumed that starting the multiple-test generator will return tests 4, 5, 6, 7, 8, 9, and 10). Other notes about generators - Strictly follow the format of the test — spaces and line breaks should be placed correctly. The test should end with a line feed. For example, if the test consists of a single number, then output it as cout << rnd.next (1, n) << endl;— with a line feed at the end. - If the test size is large, it is prefered to use printfinstead of cout— this will improve the performance of the generator. - It is better to use coutto output long long, but if you want printf, then use the I64constant (for example, printf(I64, x);). - Please be aware about various cases of C++ undefined behavior. For example, in the first example generator above, if the two coutcommands are combined into one, the order of the rnd.nextfunction calls is not defined. Translator's note: about the third point, using lld constant with printf to output long long used to be problematic in the past, but is no longer an issue now. Further examples Further examples of generators can be found in the release notes or directly at the GitHub repository.
https://codeforces.com/blog/entry/18291
CC-MAIN-2020-40
en
refinedweb
- Personal snippets - Project snippets - Create a snippet - Versioned Snippets - Discover snippets - Snippet comments - Downloading snippets - Embedded snippets Snippets With GitLab Snippets you can store and share bits of code and text with other users. Snippets can be maintained using snippets API. There are two types of snippets: - Personal snippets. - Project snippets. Personal snippets Personal snippets are not related to any project and can be created completely independently. There are 3 visibility levels that can be set, public, internal and private. See Public access for more information. Project snippets Project snippets are always related to a specific project. See Project features for more information. Create a snippet To create a personal snippet, click the plus icon () on the top navigation and select New snippet from the dropdown menu: If you’re on a project’s page but you want to create a new personal snippet, click the plus icon () and select New snippet from the lower part of the dropdown (GitLab on GitLab.com; Your Instance on self-managed instances): To create a project snippet, navigate to your project’s page and click the plus icon (), then select New snippet from the upper part of the dropdown (This project). From there, add the Title, Description, and a File name with the appropriate extension (for example, example.rb, index.html). Versioned Snippets Introduced in GitLab 13.0. Starting in 13.0, snippets (both personal and project snippets) have version control enabled by default. This means that all snippets get their own underlying repository initialized with a master branch at the moment the snippet is created. Whenever a change to the snippet is saved, a new commit to the master branch is recorded. Commit messages are automatically generated. The snippet’s repository has only one branch (master) by default, deleting it or creating other branches is not supported. Existing snippets will be automatically migrated in 13.0. Their current content will be saved as the initial commit to the snippets’ repository. File names Snippets support syntax highlighting based on the filename and extension provided for them. While it is possible to submit a snippet without specifying a filename and extension, it needs a valid name so the content can be created as a file in the snippet’s repository. In case the user does not attribute a filename and extension to a snippet, GitLab automatically adds a filename in the format snippetfile<x>.txt where <x> represents a number added to the file, starting with 1. This number increases incrementally when more snippets without an attributed filename are added. When upgrading from an earlier version of GitLab to 13.0, existing snippets without a supported filename will be renamed to a compatible format. For example, if the snippet’s filename is it will be changed to http-a-weird-filename-me to be included in the snippet’s repository. As snippets are stored by ID, changing their filenames will not break direct or embedded links to the snippet. Cloning snippets Snippets can be cloned as a regular Git repository using SSH or HTTPS. Click the Clone button above the snippet content to copy the URL of your choice. This allows you to have a local copy of the snippet’s repository and make changes as needed. You can commit those changes and push them to the remote master branch. Reduce snippets repository size Since versioned Snippets are considered as part of the namespace storage size, it’s recommended to keep snippets’ repositories as compact as possible. For more information about tools to compact repositories, see the documentation on reducing repository size. Limitations - Binary files are not supported. - Creating or deleting branches is not supported. Only a default master. branch is used. - Git tags are not supported in snippet repositories. - Snippets’ repositories are limited to one file. Attempting to push more than one file will result in an error. - Revisions are not yet visible to the user on the GitLab UI, but it’s planned to be added in future iterations. See the revisions tab issue for updates. - The maximum size for a snippet is 50 MB, by default. Discover. comments Introduced in GitLab 9.2. With GitLab Snippets you engage in a conversation about that piece of code, facilitating the collaboration among users. Downloading snippets Introduced in GitLab 10.8. Public snippets can not only be shared, but also embedded on any website. With this, you” button. This copies a one-line script that you can add to any website or blog post. Here’s how an example code looks like: <script src=""></script> Here’s how an embedded snippet looks like: Embedded snippets are displayed with a header that shows the file name if it’s defined, the snippet size, a link to GitLab, and the actual snippet content. Actions in the header allow users to see the snippet in raw format and download it.
https://docs.gitlab.com/ee/user/snippets.html
CC-MAIN-2020-40
en
refinedweb
An OLSR internal route entry. More... #include <route_manager.hh> An OLSR internal route entry. Base class for RIB routing table entries. External view of a routing entry. OLSRv1, unlike OSPF, does not implement areas, therefore there is no need in the current design to have logical separation between the routes which it processes internally and those which it exports to the RIB. It also has no concept of network LSAs [HNA routes are not used in calculating reachability in the OLSR topology] therefore the address property is not present here, nor is the 'discard' flag, nor is the path type. TODO: Import this definition into UML. TODO: Templatize to hold IPv6. This is the base class from which RIB routing table entries are derived. It's not useful by itself. This class is used for storing RIPv2 and RIPng route entries. It is a template class taking an address family type as a template argument. Only IPv4 and IPv6 types may be supplied. Constructor for a route entry. Destructor. Cleans up state associated with RouteEntry. If the Origin associated with the RouteEntry is not-null, the Origin is informed of the destruction. Get the Administrative Distance. Reimplemented in IPRouteEntry< A >. Set OLSR protocol cost of route. Set if this route has been filtered by policy filters. Set if route is accepted or rejected. Set protocol address of next hop. Replace policy-tags of route.
http://xorp.org/releases/current/docs/kdoc/html/classRouteEntry.html
CC-MAIN-2018-05
en
refinedweb
Odoo Help Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps: CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc. Functional field output before save and Editable field?. In openerp 7 Is it possible to functional field output shows before save the records and Editable functional field? I think yes. Example on_change method:. link text Just add any field for output in your result. def custom_function(self, cr, uid, ids, field_name_from_xml, context=None): # work with input data #... your result in custom_addr custom_addr = 'Barcelona' return { 'value': { 'address': custom_addr # adress is must in your xml declaration in this case } } About This Community Odoo Training Center Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
https://www.odoo.com/forum/help-1/question/functional-field-output-before-save-and-editable-field-1232
CC-MAIN-2018-05
en
refinedweb
Configuring a Table Cell Span Provider In a custom framework, the table element can have cells that span over multiple columns and rows. As explained in Configuring Tables, you need to indicate Oxygen XML Author a method to determine the cell spanning. If you use the cell element attributes rowspan and colspan or rows and cols, Oxygen XML Author can determine the cell spanning automatically. In our example the td element uses the attributes row_span and column_span that are not recognized by default. You will need to implement a Java extension class for defining the cell spanning. - Create the class simple.documentation.framework.TableCellSpanProvider. This class must implement the ro.sync.ecss.extensions.api.AuthorTableCellSpanProvider interface. import ro.sync.ecss.extensions.api.AuthorTableCellSpanProvider; import ro.sync.ecss.extensions.api.node.AttrValue; import ro.sync.ecss.extensions.api.node.AuthorElement; public class TableCellSpanProvider implements AuthorTableCellSpanProvider { - The init method is taking as argument the ro.sync.ecss.extensions.api.node.AuthorElement that represents the XML tableelement. In our case the cell span is specified for each of the cells so you leave this method empty. However, there are cases (such as the CALS table model) when the cell spanning is specified in the tableelement. In such cases, you must collect the span information by analyzing the tableelement. public void init(AuthorElement table) { } - The getColSpan method is taking as argument the table cell. The table layout engine will ask this AuthorTableSpanSupport implementation what is the column span and the row span for each XML element from the table that was marked as cell in the CSS using the property display:table-cell. The implementation is simple and just parses the value of column_span attribute. The method must return nullfor all the cells that do not change the span specification. public Integer getColSpan(AuthorElement cell) { Integer colSpan = null; AttrValue attrValue = cell.getAttribute("column_span"); if(attrValue != null) { // The attribute was found. String cs = attrValue.getValue(); if(cs != null) { try { colSpan = new Integer(cs); } catch (NumberFormatException ex) { // The attribute value was not a number. } } } return colSpan; } - The row span is determined in a similar manner: public Integer getRowSpan(AuthorElement cell) { Integer rowSpan = null; AttrValue attrValue = cell.getAttribute("row_span"); if(attrValue != null) { // The attribute was found. String rs = attrValue.getValue(); if(rs != null) { try { rowSpan = new Integer(rs); } catch (NumberFormatException ex) { // The attribute value was not a number. } } } return rowSpan; } - The method hasColumnSpecifications always returns trueconsidering column specifications always available. public boolean hasColumnSpecifications(AuthorElement tableElement) { return true; }Note: The complete source code for framework customization examples can be found in the oxygen-sample-framework module of the Oxygen SDK , available as a Maven archetype on the Oxygen XML Author website. - In the listing below, the XML document contains the table element: <table> <header> <td>C1</td> <td>C2</td> <td>C3</td> <td>C4</td> </header> <tr> <td>cs=1, rs=1</td> <td column_span="2" row_span="2">cs=2, rs=2</td> <td row_span="3">cs=1, rs=3</td> </tr> <tr> <td>cs=1, rs=1</td> </tr> <tr> <td column_span="3">cs=3, rs=1</td> </tr> </table> When no table cell span provider is specified, the table has the following layout: Figure: Table layout when no cell span provider is specified When the above implementation is configured, the table has the correct layout: Figure: Cells spanning multiple rows and columns.
http://www.oxygenxml.com/doc/versions/19.1/ug-author/topics/dg-table-cell-spanning-provider.html
CC-MAIN-2018-05
en
refinedweb
. When using Selenium Webdriver, the control of browser and the application is with the reference variable of type WebDriver, i.e. the WebDriver reference variable can identify any web element present on the page. But it doesn’t have the ability to handle all the keyboard & mouse events like right-click, drag & drop, etc. Therefore WebDriver reference variable alone is NOT sufficient to automate every user action. But don’t worry! As stated earlier, Selenium Webdriver provides an Advanced User Interaction API (including Actions class) which facilitate keyboard and mouse actions. import org.openqa.selenium.interactions.Actions; Actions class in Selenium Webdriver The Actions class is a user-facing API for emulating complex keyboard and mouse actions in Selenium Webdriver. You can directly use this class rather than using the input devices, i.e. Keyboard or Mouse. It Implements builder pattern, in which a complex object is constructed, i.e. builds a “Composite Action” containing all actions specified by the individual method calls. For e.g. Composite Action: Mouse Hover >> Click. public class Actions extends java.lang.Object Default constructor below uses the default keyboard, mouse implemented by the driver. Actions(WebDriver driver) - Import the package to access the actions class methods. - Create the actions class object - Access the range of available methods. // Create the Actions class object Actions builder = new Actions(driver); // To focus (mouse hover) on element builder.moveToElement(element).perform(); Note: Perform method is used here to execute the action. Execute multiple actions using build() Above we simply performed one action on the element (mouse hover), in case we want to perform sequence of events on the same element, it can be done using build method. // To focus and then click on the element builder.moveToElement(element).click().build().perform(); Keyboard and Mouse Actions in Selenium Webdriver Mouse Actions in Selenium Webdriver Below actions help in simulating mouse events in case of automation using Selenium Webdriver. - public Actions click() — Clicks at the current mouse location. Useful when combined with - public Actions click(WebElement onElement) — Clicks in the middle of the given element (onElement). - public Actions clickAndHold() — Clicks (without releasing) at the current mouse location. - public Actions clickAndHold(WebElement onElement) — Clicks (without releasing) in the middle of the given element (onElement) - public Actions contextClick() — Performs a context-click at the current mouse location. - public Actions contextClick(WebElement onElement) — Performs a context-click at middle of the given element (onElement) - public Actions doubleClick() — Performs a double-click at the current mouse location. - public Actions doubleClick(WebElement onElement) — Performs a double-click at middle of the given element (onElement) - public Actions dragAndDrop(WebElement source, WebElement target) — A convenience method that performs click-and-hold at the location of the source element, moves to the location of the target element, then releases the mouse. - public Actions dragAndDropBy(WebElement source, int xOffset, int yOffset) — a convenience method that performs click-and-hold at the location of the source element, moves by a given offset, then releases the mouse. - public Actions moveByOffset(int xOffset, int yOffset) — Moves the mouse from its current position (or 0,0) by the given offset. If the coordinates provided are outside the viewport (the mouse will end up outside the browser window) then the viewport is scrolled to match. - public Actions moveToElement(WebElement toElement) — Moves the mouse to the middle of the element. The element is scrolled into view and its location is calculated using getBoundingClientRect. - public Actions moveToElement(WebElement toElement, int xOffset, int yOffset) — Moves the mouse to an offset from the top-left corner of the element. The element is scrolled into view and its location is calculated using getBoundingClientRect. - public Actions release() — Releases the depressed left mouse button at the current mouse location. - public Actions release(WebElement onElement) — Releases the depressed left mouse button, in the middle of the given element. Invoking this action without invoking clickAndHold()first will result in undefined behaviour. Keyboard Actions in Selenium Webdriver keyDown and keyUp are the two main methods available under Selenium Webdriver Actions class. - public Actions keyDown(Keys theKey) — Performs a modifier key press (SHIFT,Keys.ALT or Keys.CONTROL). Does not release the key – subsequent interactions may assume it’s kept pressed. Note that the key is never released implicitly – eitherkeyUp(theKey) or sendKeys(Keys.NULL) must be called to release. - public Actions keyDown(WebElement element, Keys theKey) — Performs a modifier key press (SHIFT,Keys.ALT or Keys.CONTROL) after focusing on an element. - public Actions keyUp(Keys theKey) — Performs a modifier key release (SHIFT,Keys.ALT or Keys.CONTROL). Releasing a non-depressed modifier key will yield undefined behaviour. - public Actions keyUp(WebElement element, Keys theKey) — performs a modifier key release after focusing on an element. - public Actions sendKeys(java.lang.CharSequence… keysToSend) — Sends keys to the active element. This differs from calling sendKeys(CharSequence…) on the active element in two ways: The modifier keys included in this call are not released and there is no attempt to re-focus the element. So sendKeys(Keys.TAB) for switching elements should work. - public Actions sendKeys(WebElement element, java.lang.CharSequence… keysToSend) — Sends keys to the given element. Generic Actions - public Action build() — Generates a composite action containing all actions so far, ready to be performed. It resets the internal builder state, so subsequent calls to build() will contain fresh sequences. - public Actions pause(long pause) — Performs a pause. It’s deprecated since‘Pause’ is considered to be a bad design practice. - public void perform() — A convenience method for performing the actions without calling build() first. I know all these methods together will be too much to grab as of now. But don’t worry! In subsequent articles we will learn about the commonly used keyboard and mouse actions in Selenium Webdriver. Till then – Stay tuned – And keep sharing!
http://www.softwaretestingstudio.com/keyboard-mouse-actions-selenium-webdriver/
CC-MAIN-2018-05
en
refinedweb
hi, i was implementing strstr() to see how it works. Code:#include<iostream> using namespace std; int main() { char str[] = "this is a test"; char*s; s=strstr(str,"test"); cout<<s<<endl; } i have two question . question 1 > what is the full form of strstr() ? for example, if i write strcpy ---> it means string copy. similarly what is the meaning of strstr() ? the syntaxex dont give the full form of this function. can you tell what is the literal meaning? question 2. without assigning a memory (by new keyword ) the code is running!! look, i have simply tested with only char *s; but no memory allocated.
https://cboard.cprogramming.com/c-programming/51771-strstr-question.html
CC-MAIN-2018-05
en
refinedweb
Michael Foord wrote: > Hello#). > Interesting - even with the following C# called from IronPython it returns None. The code I am translating is from the MSDN docs. Any clues ? namespace SimpleTest { public class SimpleTest { public static Type getType(string typename){ return Type.GetType(typename); } } Michael Foord > All the best, > > Michael Foord > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > > >
https://mail.python.org/pipermail/ironpython-users/2007-March/004644.html
CC-MAIN-2018-05
en
refinedweb
Adam DePrince wrote: > Lets not forget the "real reason" for lambda ... the elegance of > orthogonality. Why treat functions differently than any other object? > > We can operate on every other class without having to involve the > namespace, why should functions be any different? Yup. I think in most of the examples that I didn't know how to rewrite, this was basically the issue. On the other hand, I do think that lambdas get overused, as indicated by the number of examples I *was* able to rewrite.[1] Still, I have to admit that in some cases (especially those involving reduce), I wish the coder had named the function -- it would have given me a little bit more documentation as to what the code was trying to do. On the other hand, in other cases, like when a function is a keyword argument to another function (e.g. inspect.py's "def formatargspec..." example) using a def statement and naming the function would be redundant. Steve [1] Note that this isn't entirely fair to the examples, some of which were written before list comprehensions, generator expressions and itemgetter/attrgetter.
https://mail.python.org/pipermail/python-list/2004-December/264458.html
CC-MAIN-2018-05
en
refinedweb
C and C++, the language supports a simple macro preprocessor. Source lines that should be handled by the preprocessor, such as #define and #include are referred to as preprocessor directives. Another C construct, the #pragma directive, is used to instruct the compiler to use pragmatic or implementation-dependent features. Two notable users of this directive are OpenMP and OpenACC. Syntactic constructs similar to C's preprocessor directives, such as C#'s #if, are also typically called "directives", although in these cases there may not be any real preprocessing phase involved. All preprocessor commands begin with a hash symbol (#). Directives date to ALGOL 68, where they are known as pragmats (from "pragmatic"), and denoted pragmat or pr; in newer languages, notably C, this has been abbreviated to "pragma" (no 't'). A common use of pragmats in ALGOL 68 is in specifying a stropping regime, meaning "how keywords are indicated". Various such directives follow, specifying the POINT, UPPER, RES (reserved), or quote regimes. Note the use of stropping for the pragmat keyword itself (abbreviated pr), either in the POINT or quote regimes: .PR POINT .PR .PR UPPER .PR .PR RES .PR 'pr' quote 'pr' Today directives are best known in the C language, of early 1970s vintage, and continued through the current C99 standard, where they are either instructions to the C preprocessor, or, in the form of #pragma, directives to the compiler itself. They are also used to some degree in more modern languages; see below. declareconstruct (also proclaimor declaim).[1] With one exception, declarations are optional, and do not affect the semantics of the program. The one exception is special, which must be specified where appropriate. #include "file"directive is the significant comment {$I "file"}. use", which imports modules, can also be used to specify directives, such as use strict;or use utf8;. {-# INLINE foo #-}.[2] from __future__ import feature(defined in PEP 236 -- Back to the __future__), which changes language features (and uses the existing module import syntax, as in Perl), and the codingdirective (in a comment) to specify the encoding of a source code file (defined in PEP 263 -- Defining Python Source Code Encodings). A more general directive statement was proposed and rejected in PEP 244 -- The `directive' statement; these all date to 2001. usesyntax for directives, with the difference that pragmas are declared as string literals (e.g. "use strict";, or "use asm";), rather than a function call. Option" is used for directives: Option Explicit On|Off- When on disallows implicit declaration of variables at first use requiring explicit declaration beforehand. Option Compare Binary- Results in string comparisons based on a sort order derived from the internal binary representations of the characters - e.g. for the English/European code page (ANSI 1252) A < B < E < Z < a < b < e < z < À < Ê < Ø < à < ê < ø. Affects intrinsic operators (e.g. =, <>, <, >), the Select Case block, and VB runtime library string functions (e.g. InStr). Option Compare Text- Results in string comparisons based on a case-insensitive text sort order determined by your system's locale - e.g. for the English/European code page (ANSI 1252) (A=a) < (À = à) < (B=b) < (E=e) < (Ê = ê) < (Z=z) < (Ø = ø). Affects intrinsic operators (e.g. =, <>, <, >), the Select Case block, and VB runtime library string functions (e.g. InStr). Option Strict On|Off- When on disallows: Option Infer On|Off- When on enables the compiler to infer the type of local variables from their initializers. key: valuenotation. For example, coding: UTF-8indicates that the file is encoded via the UTF-8 character encoding. .END, which might direct the assembler to stop assembling code. #pragma once PL/SQL has a PRAGMA keyword with the following syntax: PRAGMA instruction_to_compiler; [...] PL/SQL offers several pragmas [...] Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your Digital Marketing and Technology knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.
http://www.defaultlogic.com/learn?s=Directive_(programming)
CC-MAIN-2018-05
en
refinedweb
Follow these steps to implement: - Choose any element of the list to be the pivot. - Divide all other elements (except the pivot) into two partitions. - All elements less than the pivot must be in the first partition (lower half list). - All elements greater than the pivot must be in the second partition (upper half list). - Use recursion to sort both partitions. - Join the first sorted partition, the pivot, and the second sorted partition def qsort(list): if not list: return [] else: pivot = list[0] less = [x for x in list if x < pivot] more = [x for x in list[1:] if x >= pivot] return qsort(less) + [pivot] + qsort(more) Example: someList = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3] print qsort( someList ) [1, 1, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 8, 9, 9, 9] Enjoy the sort.
https://anothergisblog.blogspot.com/2012/05/quicksort-using-python.html
CC-MAIN-2018-05
en
refinedweb
Example: import arcpy ds = r"c:\temp\sample.gdb\Parcels" g = arcpy.Geometry() geomList = arcpy.CopyFeatures_management(ds,g) # Get the Area (Sq Ft) area = 0.0 for geom in geomList: area += geom.area print "Total Parcel Area: {0}".format(area) The CopyFeatures() copies the results as a geometry object to a list and the area property is a standard Geometry object property. Enjoy
https://anothergisblog.blogspot.com/2012/07/create-list-of-geometries-101.html
CC-MAIN-2018-05
en
refinedweb
Kindly advise if any part of the code could be improved! Thank you! public class StringIterator { // p is the pointer which will iterate from the beginning to the end of the input string private int p; // curr is the current character being iterated private char curr; // count is the count of current character private int count; // s is a duplicate of the input string private String s; public StringIterator(String compressedString) { s = compressedString; p = 0; count = 0; curr = compressedString.charAt(p); } public char next() { if (hasNext()) { // If there are still current characters, update count and return a current character. if (count > 0) { count--; return curr; } // If there is not any current character, use p to get the next character in the input string. else { curr= s.charAt(p); p++; count = 0; // To get the new count while (p < s.length() && Character.isDigit(s.charAt(p))) { count = count * 10 + Character.getNumericValue(s.charAt(p)); p++; } count--; return curr; } } else return ' '; } // Two conditions mean "hasNext()": // (1) count of current character is not zero; // (2) pointer p has not reached the end of the input string. public boolean hasNext() { return count != 0 || p < s.length(); } }
https://discuss.leetcode.com/topic/98950/no-queue-or-list-is-used-a-simple-solution-with-explanation
CC-MAIN-2018-05
en
refinedweb
Hi, I want to use mate-dock-applet, which is available i the repositories, but when I try to use it, it never runs and instead it complains with: [...] ImportError: requiring namespace 'Gtk' version '3.0', but '2.0' is already loaded [...] I understand the issue, but I was under the impression that MATE is Gtk3 now? This is on 18.2 and 18.3 BTW. Any help would be great! Cannot use mate-dock-applet Forum rules Before you post please read how to get help Before you post please read how to get help 1 post • Page 1 of 1 1 post • Page 1 of 1
https://forums.linuxmint.com/viewtopic.php?f=206&t=257705&p=1390817&sid=e0354bc35b5ea0b351e4f5a96c1bcfcf
CC-MAIN-2018-05
en
refinedweb
In this Example we Reading amount, Year and interest in the class Scanner becomes analogous to reading string. In this example, the three numbers are read from the console, and then perform Simple Interest,Compound Interest operations and results printed on the screen in formatted output. import java.util .*; class InputDemo { public static void main (String args [ ]) { double p, n, r,si,ci; Scanner s=new Scanner (System. in); System.out.println("Enter the amount:"); p=s.nextDouble( ); System. out. println("Enter the No.of years:"); n=s.nextDouble( ); System. out. println("Enter the Rate of interest"); r=s.nextDouble( ); si=(p*n*r)/100; ci=p*Math.pow(1.0+r/100.0,n)-p; System.out. println(" Amount="+p ); System. out. println("N o. of years="+n); System. out. println("Rate of interest="+r); System.out.println("Simple Interest="+si); System.out. println("Compound Interest="+c
http://ecomputernotes.com/java/what-is-java/compound-interest-using-scanner-class
CC-MAIN-2018-05
en
refinedweb
dpm_addfs - add a filesystem to a disk pool #include <sys/types.h> #include "dpm_api.h" int dpm_addfs (char *poolname, char *server, char *fs, int status) dpm_addfs adds a filesystem to a disk pool. poolname specifies the disk pool name previously defined using dpm_addpool. poolname, server or fs is a NULL pointer. EEXIST this filesystem is already part of a pool. ENOMEM Memory could not be allocated for storing the filesystem definition. EINVAL The pool is unknown or the length of poolname exceeds CA_MAXPOOLNAMELEN or the length of server exceeds CA_MAXHOSTNAMELEN or the length of fs exceeds 79. SENOSHOST Host unknown. SEINTERNAL Database error. SECOMERR Communication error.
http://huge-man-linux.net/man3/dpm_addfs.html
CC-MAIN-2018-05
en
refinedweb
Overview In this tutorial we will demonstrate how to integrate Realm’s Event Framework, available in the Professional and Enterprise editions, with a machine learning service from IBM’s Watson Bluemix service. This service will perform text and facial recognition processing on an image you provide and return to you descriptions of any faces found in the image as well any text that the machine learning algorithms find in that image. The app we’re going to build is called Scanner. It is a very simple single-view application that allows users to take a picture (or select an image from the photo library) and get back detailed information about that picture identified by Watson. The application is implemented in 2 parts: A mobile client that allows the user to take pictures with the phone’s camera; these images are synchronized with the remote Realm Object Server. An event handler on a Realm Object Server that watches for new images taken by mobile clients, and then sends them to be analyzed by IBM’s Watson via the Bluemix service. Scanner is implemented as a native app for both iOS and Android. The Github repo for the source code is provided at the end of this tutorial, but we encourage you to follow along as we construct the app in Swift (iOS) or Java (Android) code respectively. The server side is implemented as a single JavaScript file which will be explained as we go along as well. Prerequisites In order to get up and running with this tutorial, you will need to have a few development tools setup, and you will need to sign up for a free API key for the IBM Bluemix service that does the image processing. All the prerequisites and setup steps are listed below: For iOS, you will need Xcode 8.1 and an active Apple developer account (in order to sign the application and run on real hardware); for Android you will need Android Studio version 2.2 or higher. For the Realm Object Server, you will need a Macintosh running macOS 10.11 or higher, or Linux server running CentOS 6 or 7, or Ubuntu 16.04. Follow the installation instructions for the Professional or Enterprise Editions provided via email. You can sign up for a free 14-day trial of the Professional Edition here. Make note of the admin user account & password you created when the Realm Object Server was registered - we will use this as the user for our demo application in this tutorial. For access to IBM’s Watson visual recognition system it will be necessary to create a Bluemix trial account using the following URL:. The steps require an active/verifiable email address and will result in the generation of an API key for the Watson components of the Bluemix services. The steps are summarized as follows: Follow URL above to create an IBM Bluemix account Receive verification email; click on link to verify Log in to IBM Bluemix portal Select a region - there are 3 choices: Sydney, United Kingdom and US South - pick the region that is closest to you. Name your workspace - this name can be anything you like. Click on the “I’m Ready” button to create the workspace Once on the Apps page, click on the “hamburger menu” (upper left corner of the browser); click “services” to reveal the available services, then “Watson” to get to the Watson page On the Watson page, click “Create Watson Service” One the Watson Services page, click on the “Visual Recognition” item At the top of the following page click on the “free” plan, then “create” Lastly click “view credentials” and copy the JSON block that includes the api_key. This will be needed later in this tutorial to setup access for your application. Starting the Object Server & Finding the AdminToken Before we dive into this tutorial, it’s a good idea to have the Realm Object Server started and identify the Admin Token that will be needed in the implementation sections to follow. If you downloaded the macOS version of the Realm Mobile Platform, follow the instructions in the download kit to start the server. Once the server is running you will need a copy of the “admin token” which is displayed in the terminal window as part of the startup process. The admin token looks very much like this: Your admin access token is: ewoJImlkZW50aXR5IjogImFkbWluIiwKCSJhY2Nlc3MiOiBbInVwb G9hZCIsICJkb3dubG9hZCIsICJtYW5hZ2UiXQp9Cg==:A+UUfCEap6ikwX5nLB0mBcjHx1RVqBQjmYJ3j BNP00xum65DT0tZV/oq2W8VIeuPiASXt3Ndn5TkahTU6a5UxQCnODfu0aGclgBuHmv5CKXwm4qr4bwL+ yd80WlRojdmYrYUf5jjbQjuBLUXkhyX554TjHOmANYzw1fv6sp1YXKDuKDkCHpH8+GIG5u0Xjp6IUK6F tPtMbiPS1mMZ3YnxHm5BB2RQH3ywGxlsYLFnA9l4+Dc++sEQGWviYCCNBL9fD49zFPdvfBoc1WqsFi3P KKcqyXfGdnyYucrDfo/4Rn8mT95lAqJGCcIRWwiNYKI805uHcI+JFv6/YXJB0wEMw== The token itself is all the text after the Your admin access token is: text, up to and including the trailing == characters. If you’ve installed any of the Linux versions the software, the server will be automatically started for you and the admin token can be found in the file /etc/realm/admin_token.base64. You will need this token for server sections of this tutorial. Architecture The architecture of this client and server is quite simple: There are 3 main components: The Realm Mobile Clients The clients is a small application that allows the user to take a picture and a Realm Database to store images and communicate with the Realm Object Server The Realm Object Server This is the part of the system that synchronizes data between mobile clients. The Realm Event Framework This is the part of the Realm Object Server that can be programmed to respond to changes in a Realm database and perform actions based on those changes. In this case the action will be to interact with the IBM Bluemix recognition API using pictures captured by mobile clients and return any resulting text and descriptions of people (if any) in the image to the client Realms. Operation The operation of the system is equally simple: Client devices take pictures that are stored in a Realm Database and synchronized with the Realm Object Server. An event listener on the Realm Object Server observes client Realms and notices when new pictures have been taken by client devices. The listener sends these images to be processed by the IBM Watson recognition service. When results come back, any scanned text is updated in the specific client’s Realm and these results are synchronized back to the respective mobile client where they can be viewed by the user. Models & Realms The cornerstone of information sharing in the Realm Mobile Platform is a shared model (or schema) between the clients and the server. Realm models are simple to define, yet cover all of the basic data types found in all programming languages (e.g., booleans, integers - Int8, Int16, Int32, Int64, – Doubles, Floats, and Strings) as well as a few higher-order types such as collection types like Lists, dates, a raw binary data type, etc. More info on supported types and model definitions can be found in the Realm Mobile Database documentation; the version linked to here is for Apple’s Swift, but matching documents cover Java and other language bindings Realm supports. There’s one model needed to support this text scanning app: The “Scan” model which has a couple of string fields to hold the status returned by the Watson Bluemix image recognition service and a “scan id” to uniquely identify a new events (pictures taken), and a raw binary data type field to hold the bytes of the picture that is synchronized between the mobile device and the Realm Object Server. Once a client starts up, this model is synchronized and exists both in the client and the server. The model is accessed as an named entity called a Realm. This example uses a Realm containing a single model but Realms can hold multiple models and, conversely a single app can access many Realms. For this example we’ll call the Realm scanner. Realm Paths On the client side – where a pictures is selected – there is a local on-device Realm called scanner. And, on the Realm Object Server there is one Realm per mobile device also called scanner - these contain the data that is synchronized from the mobile device to the server and back again as the objects, either added, deleted, or updated. On the Object Server the scanner Realm exist in a hierarchy of Realms that are arranged much like a filesystem with a root (“/”), a user ID that is unique to each mobile user represented by a long string of numbers, a path separator (another “/” character) and then the name of the Realm that contains the models and their data. This is union of path + a user ID + realm-name is called the Realm Path and looks very much like a file system path or even like a URL. To see how this looks in action - Let’s consider 2 hypothetical users of our Scanner app, their Realms on the object server might be written like this: /12345467890/scanner /9876543210/scanner The Realm Object Server allows us to access Realms as URLs, so we actually refer to a synchronized Realm from inside a mobile app as follows: realm://127.0.0.1:9080/~/scanner Where the “realm://127.0.0.1:9080” represents the access scheme (“realm://”), the server IP address (or DNS hostname) and port number of the Realm Object server. The “~” (tilde) character is shorthand for “my user ID” and “scannner” is, as previously mentioned, the name of the Realm that contains our Scan model. This concept of a Realm URL will become clearer as we implement the client and server sides of Scanner. The Realm Event Framework The final concept, and the driving force behind this demo, is the Realm Event Framework. This is the mechanism that allows the Object Server to respond to changes in the Realms it manages. Unlike Realm specific listeners, this API allows developers to listen for changes across Realms. Global Event Listeners are written in JavaScript and run in the context of a Node.js application and are written as a function to which 2 primary parameters are passed: Change Event Callback - this specifies what is to be done once a change has been detected. In our case this will be calling the IBM Bluemix recognition API and processing any results that come back from the remote server. Regex Pattern - this specifies which Realms on the server the listener applies to. In our case we will be listening to Realms that match “.*/scanner” or all the Realms created by each user of the Scanner app. Here is an example of a change event callback: var change_event_callback = function(change_object) { // Called on when changes are made to any Realm which match the given regular expression // // The change_object has the following parameters: // path: The path of the changed Realm // realm: The changed realm // oldRealm: The changed Realm at the old state before the changes were applied // changes: The change indexes for all added, removed, and modified objects in the changed Realm. // This object is a hashmap of object types to arrays of indexes for all changed objects: // { // object_type_1: { // insertions: [indexes...], // deletions: [indexes...], // modifications: [indexes...] // }, // object_type_2: // ... // } To register a Global Event Listener you call this API: Realm.Sync.addListener(server_url, admin_user, regex, change_callback) {}; Notice that the remaining parameters provided include the URL of the Realm Object Server that contains the Realms and an admin user credential that uses the Admin Token we saw back when we started the Realm Object Server. Don’t be concerned if this syntax isn’t familiar, these are examples within the larger framework of how a Realm Event is processed and will be shown in context as we implement the server side of the Scanner application. With these concepts we have all we need to implement our Scanner. Implementation Building the Server Application We will start with the Realm Object Server implementation first since it is needed regardless of which client application – iOS or Android – you choose to use. In order to continue we expect that following are true: You have downloaded and installed a version of the Realm Mobile Platform Professional or Enterprise Edition. You have successfully started the server and can access (copy) the Admin Token for your running server You can log in to your Linux server or access the Mac on which the Realm Object Server is running. You have obtained an API Key for the IBM Bluemix Watson service. Creating the server side scripts. Create a directory - You will need to create a new directory on your server (or in a convenient place on your Mac if running the Mac version) in which to place the server files. We are using the name ScannerServer which will include the Node.js package dependency file. Change into this directory and create/edit a file called package.json - this is a Node.js convention that is used to specify external package dependencies for a Node application as well as specifics about the application itself (its name, version number, etc). The contents should be: { "name": "Scanner", "version": "0.0.1", "description": "Use Realm Object Server's event-handling capabilities to react to uploaded images and send them to Watson for image recognition.", "main": "index.js", "author": "Realm", "dependencies": { "realm": "file:realm-1.0.0-BETA-3.0-professional.tgz", "watson-developer-cloud": "^2.11.0" } } Notice that there are 2 dependencies for our server: The first is listed as a “file:” dependency referring to a file on disk that npm will look for it in the same directory as our server code. This package is required and the setup process will fail if it is not present. This file is the Node.js SDK that allow your server app to talk to the Realm Object Server. The second is a Node.js module for the Watson service - this will be automatically downloaded for us by the npm - the Node.js package manager. The Watson API is downloaded for us; the Realm module we can copy from the Realm Mobile Platform distribution that you downloaded. If you are running a local copy of RMP/PE on your Mac, you copy this either using the Finder or using the Unix cp command - it is in the SDK/node directory of the realm-mobile-platform-professional distribution folder. Just make sure that you copy it to the same directory as your package.json file and that the filename is realm-1.0.0-BETA-3.0-professional.tgz. The process for Linux is the same, you will need to copy the same package to your ScannerServer directory. On Linux systems you will need to get the package from our package distribution system; instructions are included the email you received when you registered to download the Realm Mobile Platform Professional Edition. This package is the Node.js SDK that your scanner server will use to communicate with the Realm Object Server. Once you have copied this into place, run the command: npm install this will download, unpack and configure all the modules. In the same directory we will be creating a file called index.js which is the Node.js application that monitors the client Realms for changes and then reacts by sending images to the Watson Recognition API for processing The file itself is listed in the code-box below, is several dozen lines long; we recommend you cut & paste the content into the index.js file you created. Several key pieces of information need to be edited in order for this application to function - the required edits and explanations of what these items do are inline in the file. 'use strict'; var fs = require('fs'); var Realm = require('realm'); var VisualRecognition = require('watson-developer-cloud/visual-recognition/v3'); // Insert the Realm admin token // Linux: `cat /etc/realm/admin_token.base64` // macOS (from within zip): `cat realm-object-server/admin_token.base64` var REALM_ADMIN_TOKEN = "INSERT_YOUR_REALM_ADMIN_TOKEN"; // API KEY for IBM Bluemix Watson Visual Recognition // Register for an API Key: var BLUEMIX_API_KEY = "INSERT_YOUR_API_KEY"; // The URL to the Realm Object Server var SERVER_URL = 'realm://127.0.0.1:9080'; // The path used by the global notifier to listen for changes across all // Realms that match. var NOTIFIER_PATH = ".*/scanner"; /* Common status text strings The mobile app listens for changes to the scan.status text value to update it UI with the current state. These values must be the same in both this file and the mobile client code. */ var kUploadingStatus = "Uploading"; var kProcessingStatus = "Processing"; var kFailedStatus = "Failed"; var kClassificationResultReady = "ClassificationResultReady"; var kTextScanResultReady = "TextScanResultReady"; var kFaceDetectionResultReady = "FaceDetectionResultReady"; var kCompletedStatus = "Completed"; // Setup IBM Bluemix SDK var visual_recognition = new VisualRecognition({ api_key: BLUEMIX_API_KEY, version_date: '2016-05-20' }); /* Utility Functions Various functions to check the integrity of data. */ function isString(x) { return x !== null && x !== undefined && x.constructor === String } function isNumber(x) { return x !== null && x !== undefined && x.constructor === Number } function isBoolean(x) { return x !== null && x !== undefined && x.constructor === Boolean } function isObject(x) { return x !== null && x !== undefined && x.constructor === Object } function isArray(x) { return x !== null && x !== undefined && x.constructor === Array } function isRealmObject(x) { return x !== null && x !== undefined && x.constructor === Realm.Object } function isRealmList(x) { return x !== null && x !== undefined && x.constructor === Realm.List } var change_notification_callback = function(change_event) { let realm = change_event.realm; let changes = change_event.changes.Scan; let scanIndexes = changes.insertions; console.log(changes); // Get the scan object to processes var scans = realm.objects("Scan"); for (var i = 0; i < scanIndexes.length; i++) { let scanIndex = scanIndexes[i]; // Retrieve the scan object from the Realm with index let scan = scans[scanIndex]; if (isRealmObject(scan)) { if (scan.status == kUploadingStatus) { console.log("New scan received: " + change_event.path); console.log(JSON.stringify(scan)) realm.write(function() { scan.status = kProcessingStatus; }); try { fs.unlinkSync("./subject.jpeg"); } catch (err) { // ignore } var imageBytes = new Uint8Array(scan.imageData); var imageBuffer = new Buffer(imageBytes); fs.writeFileSync("./subject.jpeg", imageBuffer); var params = { images_file: fs.createReadStream('./subject.jpeg') }; function errorReceived(err) { console.log("Error: " + err); realm.write(function() { scan.status = kFailedStatus; }); } // recognize text visual_recognition.recognizeText(params, function(err, res) { if (err) { errorReceived(err); } else { console.log("Visual Result: " + res); var result = res.images[0]; var finalText = ""; if (result.text && result.text.length > 0) { finalText = "**Text Scan Result**\n\n"; finalText += result.text; } console.log("Found Text: " + finalText); realm.write(function() { scan.textScanResult = finalText; scan.status = kTextScanResultReady; }); } }); // classify image /*{ "custom_classes": 0, "images": [{ "classifiers": [{ "classes": [{ "class": "coffee", "score": 0.900249, "type_hierarchy": "/products/beverages/coffee" }, { "class": "cup", "score": 0.645656, "type_hierarchy": "/products/cup" }, { "class": "food", "score": 0.524979 }], "classifier_id": "default", "name": "default" }], "image": "subject.jpeg" }], "images_processed": 1 }*/ visual_recognition.classify(params, function(err, res) { if (err) { errorReceived(err); } else { console.log("Classify Result: " + res); var classes = res.images[0].classifiers[0].classes; console.log(JSON.stringify(classes)); realm.write(function() { var classificationResult = ""; if (classes.length > 0) { classificationResult += "**Classification Result**\n\n"; } for (var i = 0; i < classes.length; i++) { var imageClass = classes[i]; classificationResult += "Class: " + imageClass.class + "\n"; classificationResult += "Score: " + imageClass.score + "\n"; if (imageClass.type_hierarchy) { classificationResult += "Type: " + imageClass.type_hierarchy + "\n"; } classificationResult += "\n"; } scan.classificationResult = classificationResult; scan.status = kClassificationResultReady; }); } }); // Detect Faces visual_recognition.detectFaces(params, function(err, res) { if (err) { errorReceived(err); } else { console.log("Faces Result: " + res); console.log(JSON.stringify(res)); realm.write(function() { var faces = res.images[0].faces; var faceDetectionResult = ""; if (faces.length > 0) { faceDetectionResult = "**Face Detection Result**\n\n"; faceDetectionResult += "Number of faces detected: " + faces.length + "\n"; for (var i = 0; i < faces.length; i++) { var face = faces[i]; faceDetectionResult += "Gender: " + face.gender.gender + ", Age: " + face.age.min + " - " + face.age.max; faceDetectionResult += "\n"; } } scan.faceDetectionResult = faceDetectionResult; scan.status = kFaceDetectionResultReady; }); } }); } } } }; //Create the admin user var admin_user = Realm.Sync.User.adminUser(REALM_ADMIN_TOKEN); //Callback on Realm changes Realm.Sync.addListener(SERVER_URL, admin_user, NOTIFIER_PATH, 'change', change_notification_callback); console.log('Listening for Realm changes across: ' + NOTIFIER_PATH); // End of index.js Running the Server Script In order to run the server script you will first need to install the dependencies needed by the application and specified in the package.json file. This is done by running the command npm install In the terminal window. Next, replace edit the index.js file and replace the REALM_ADMIN_TOKEN and BLUEMIX_API_KEY with the your admin token, and the API key generated for you when you signed up for the IBM Bluemix trial. Once the admin token and API have been edited, run the Scanner server script with the command node index.js Once the server starts, the server will be waiting for connections and changes from the mobile clients. Next we will create a iOS or Android simple app that uses this OCR service. Building the Mobile Client Completed Scanner Sources for iOS and Android If you would like to download the completed projects for iOS and Android without working through the tutorial, they are available from Realm’s GitHub account: https:/github.com/realm-demos/Scanner.git Scanner for iOS Prerequisites: This project uses Cocoapods - to install cocoapods, use the command sudo gem install cocoapods this will ask you for an admin password. For more info on Cocoapods, please see. Part I - Create and configure a Scanner Project with Xcode Open Xcode and Create a new, “Single View iOS application.” Name the application “Scanner” and save it to a convenient location on your drive. Quit Xcode Open a terminal window and change into the newly created Scanner directory; initialize the cocoapods system type running the command pod init - this will create a new Podfile template Edit the Podfile (you can do this in Xcode or any text editor) and add the directive pod 'RealmSwift' - After the line that reads use_frameworks! Save the changes to the file (and if necessary, quite Xcode once again). From the terminal window run the command pod update this will cause CocoaPods to download and configure the RealmSwift module and create a new Xcode Workspace file that bundles together all of the external modules you’ll need to create the Scanner app. Open the newly created Scanner.xcworkspace file - Use this workspace file instead of the standard Scanner.xcodeproj file. Installing the sample image and icon - In order to allow you to run this tutorial in the simulator we are going to download two additional resources. The are linked below - download and unpack the zip file, and then drag each file, one at a time, onto your Xcode project window and allow Xcode to copy the resource into the project. Make sure to check the box “copy resource if needed”. Setting the Application Entitlements - this app will need to enable keychain sharing and include a special key to allow access to the iPhone’s camera. Click on the Scanner project icon in the source browser and add/edit the following In the Capabilities section set the Keychain Sharing to “on” In the info section add 2 new keys to the Custom iOS Target properties: “Privacy - Photo Library Usage Description” and “Privacy - Camera Usage Description” These strings can be anything but are generally used to tell the user why the application needs access to the camera and photo library. When the app is run permission dialogs will be show using these strings when requesting this access. Application Signing - here you will need to select your team or profile; in some instances Xcode will offer to “fix” this issue for you (i.e., automatically set up any required provisioning profiles), Either option will be fine. You will be running the application (at least for the purposes of this demo) in the iOS simulator but Xcode may require you to set up the signing details. With the basic application settings out of the way, we are now ready to implement the app that will make use of the Realm Event handler application you finished previously. Part II - Turning the Single View Template into the Scanner App Adding a class extension to UIImage - we will need to add a file to our project with a couple of utility methods that let us easily resize image for display, and to encode them for storage in our Realm database. Add a new Swift source file called UIImage+Encoding.swift to your project. It can be anywhere in your project’s folders but a convention is to put extensions either in a folder called “Extensions” or with the rest of the project’s implementation files. Add the following code to the file, and the save and close the window. import Foundation import UIKit extension UIImage { func resizeImage(_ image: UIImage, size: CGSize) -> UIImage { UIGraphicsBeginImageContextWithOptions(size, false, 0.0) image.draw(in: CGRect(origin: CGPoint.zero, size: size)) let resizedImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return resizedImage! } func data() -> Data { var imageData = UIImagePNGRepresentation(self) { // Resize the image if it exceeds the 2MB API limit if (imageData?.count)! > 2097152 { let oldSize = self.size let newSize = CGSize(width: 800, height: oldSize.height / oldSize.width * 800) let newImage = self.resizeImage(self, size: newSize) imageData = UIImageJPEGRepresentation(newImage, 0.7) } return imageData! } func base64EncodedString() -> String { let imageData = self.data() let stringData = imageData.base64EncodedString(options: .endLineWithCarriageReturn) return stringData } } Creating the Realm model. The model for the Scanner app is very simple; create another new Swift source file to your project, name this one Scan.swift. Copy and paste the text below into the file and save it. import UIKit import RealmSwift class Scan: Object { dynamic var scanId = "" dynamic var status = "" dynamic var textScanResult:String? dynamic var classificationResult:String? dynamic var faceDetectionResult:String? dynamic var imageData: Data? } Most of the fields should be self-explanatory. This model will be automatically instantiated on the local device, and then synchronized with Realm Object Server as you take/select pictures and tell the app to scan them. Updating the View Controller - We are going to replace all of our template app’s boilerplate code with a very simple view that can load an image from the device’s photo library or camera and save this data which causes the object server to scan our sync’d images for text. Our layout will be simple, yet functional, and when run will look very much like this: It has 3 main areas: an image display area, a text area to show results, and a status buttons are to select/process an image and reset the app for a new image selection and show the current status of the image processing operation - Adding in the View setup and display code - Open the ViewController and remove the viewDidLoadand didRecevieMemoryWarningmethods (make sure not to remove the final closing brace - this can lead to hard to debug errors). Adopting the ImagePicker protocol - Near the top of the file - in the class declaration change UIViewController to “UIViewController, UIImagePickerControllerDelegate” this allows to use a picker view to select images; the updated class declaration will look like this: class ViewController: UIViewController, UIImagePickerControllerDelegate Next, just after the class declaration, add the following code to declare the UI elements our ViewController will display and the Realm variables needed for the syncing and scanning process: // UI Elements let userImage = UIImageView() let resultsTextView = UITextView() let statusTextLabel = UILabel() let scanButton = UIButton() let resetButton = UIButton() var imageLoaded = false let backgroundImage = UIImage(named: "[email protected]") //Realm variables var realm: Realm? var currentScan: Scan? Adding the ViewController lifecycle methods - these take care of setting up and updating the view as part of the application lifecycle (the final method hides the status bar to we can see our images more clearly) override func viewDidLoad() { super.viewDidLoad() setupViewAndConstraints() } override func viewDidAppear(_ animated: Bool) { updateUI() } override var prefersStatusBarHidden: Bool { return true } *Adding the autolayout and view management methods& - Near the bottom of the file we’ll add code that sets up and manages these elements. This is a pretty large function with a lot of code that isn’t really relevant to using the Realm Object Server - its job to is to set up all of the views/buttons/etc using autolayout and a couple of utility methods to handle view updates: // MARK: View Setup and management func setupViewAndConstraints() { let allViews: [String : Any] = ["userImage": userImage, "resultsTextView": resultsTextView, "statusTextLabel": statusTextLabel, "scanButton": scanButton, "resetButton": resetButton] var allConstraints = [NSLayoutConstraint]() let metrics = ["imageHeight": self.view.bounds.width, "borderWidth": 10.0] // all of our views are created by hand when the controller loads; // make sure they are subviews of this ViewController, else they won't show up, allViews.forEach { (k,v) in self.view.addSubview(v as! UIView) } // an ImageView that will hold an image from the camers or photo library userImage.translatesAutoresizingMaskIntoConstraints = false userImage.contentMode = .scaleAspectFit userImage.isHidden = false userImage.isUserInteractionEnabled = false userImage.backgroundColor = .lightGray // a label to hold text (if any) found by the OCR service resultsTextView.translatesAutoresizingMaskIntoConstraints = false resultsTextView.isHidden = false resultsTextView.alpha = 0.75 resultsTextView.isScrollEnabled = true resultsTextView.showsVerticalScrollIndicator = true resultsTextView.showsHorizontalScrollIndicator = true resultsTextView.textColor = .black resultsTextView.text = "" resultsTextView.textAlignment = .left resultsTextView.layer.borderWidth = 0.5 resultsTextView.layer.borderColor = UIColor.lightGray.cgColor // the status label showing the state of the backend ROS Event service or OCR API status statusTextLabel.translatesAutoresizingMaskIntoConstraints = false statusTextLabel.backgroundColor = .clear statusTextLabel.isEnabled = true statusTextLabel.textAlignment = .center statusTextLabel.text = "" // Button that starts the scan scanButton.translatesAutoresizingMaskIntoConstraints = false scanButton.backgroundColor = .darkGray scanButton.isEnabled = true scanButton.setTitle(NSLocalizedString("Tap to select an image...", comment: "select img"), for: .normal) scanButton.addTarget(self, action: #selector(selectImagePressed(sender:)), for: .touchUpInside) // Button to reset and pick a new image resetButton.translatesAutoresizingMaskIntoConstraints = false resetButton.backgroundColor = .purple resetButton.isEnabled = true resetButton.setTitle(NSLocalizedString("Reset", comment: "reset"), for: .normal) resetButton.addTarget(self, action: #selector(resetButtonPressed(sender:)), for: .touchUpInside) // Set up all the placement & constraints for the elements in this view self.view.translatesAutoresizingMaskIntoConstraints = false let verticalConstraints = NSLayoutConstraint.constraints( withVisualFormat: "V:|-[userImage(imageHeight)]-[resultsTextView(>=100)]-[statusTextLabel(21)]-[scanButton(50)]-[resetButton(50)]-(borderWidth)-|", options: [], metrics: metrics, views: allViews) allConstraints += verticalConstraints let userImageHConstraint = NSLayoutConstraint.constraints( withVisualFormat: "H:|[userImage]|", options: [], metrics: metrics, views: allViews) allConstraints += userImageHConstraint let resultsTextViewHConstraint = NSLayoutConstraint.constraints( withVisualFormat: "H:|-[resultsTextView]-|", options: [], metrics: metrics, views: allViews) allConstraints += resultsTextViewHConstraint let statusTextlabelHConstraint = NSLayoutConstraint.constraints( withVisualFormat: "H:|-[statusTextLabel]-|", options: [], metrics: metrics, views: allViews) allConstraints += statusTextlabelHConstraint let scanButtonHConstraint = NSLayoutConstraint.constraints( withVisualFormat: "H:|-[scanButton]-|", options: [], metrics: metrics, views: allViews) allConstraints += scanButtonHConstraint let resetButtonHConstraint = NSLayoutConstraint.constraints( withVisualFormat: "H:|-[resetButton]-|", options: [], metrics: metrics, views: allViews) allConstraints += resetButtonHConstraint self.view.addConstraints(allConstraints) } func updateImage(_ image: UIImage?) { DispatchQueue.main.async( execute: { self.userImage.image = image self.imageLoaded = true }) } func updateUI(shouldReset: Bool = false){ DispatchQueue.main.async( execute: { if (shouldReset == true && self.imageLoaded == true) || self.imageLoaded == false { // here if just launched or the user has reset the app self.userImage.image = self.backgroundImage self.imageLoaded = false } else { // just update the UI with whatever we've got from the back end for the last scan self.statusTextLabel.text = self.currentScan?.status // NB: there's a chance that the currentScan has been nil'd out by a user reset; // in this case just srt the text label to empty, otherwise we'll crash on a nil dereferrence self.resultsTextView.text = [self.currentScan?.classificationResult, self.currentScan?.faceDetectionResult, self.currentScan?.textScanResult] .flatMap({$0}).joined(separator:"\n\n") } }) } Lastly we will add the code that performs all of the Interactions with the Realm Object Server and the Global Event Listener: // MARK: Realm Interactions func submitImageToRealm() { SyncUser.logIn(with: .usernamePassword(username: "[email protected]", password: "cinnabar21"), server: URL(string: "http://\(kRealmObjectServerHost)")!, onCompletion: { user, error in DispatchQueue.main.async { guard let user = user else { let alertController = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: error?.localizedDescription, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: NSLocalizedString("Try Again", comment: "Try Again"), style: .default, handler: { (action) in self.submitImageToRealm() })) alertController.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: "Cancel"), style: .cancel, handler: nil)) self.updateUI(shouldReset: true) self.present(alertController, animated: true) return } // Open Realm let configuration = Realm.Configuration( syncConfiguration: SyncConfiguration(user: user, realmURL: URL(string: "realm://\(kRealmObjectServerHost)/~/scanner")!)) self.realm = try! Realm(configuration: configuration) // Prepare the scan object self.prepareToScan() self.currentScan?.imageData = self.userImage.image!.data() self.saveScan() } }) } func beginImageLookup() { updateResetButton() submitImageToRealm() } func prepareToScan() { if let realm = currentScan?.realm { try! realm.write { realm.delete(currentScan!) } } currentScan = Scan() } func saveScan() { guard currentScan?.realm == nil else { return } statusTextLabel.text = "Saving..." try! realm?.write { realm?.add(currentScan!) currentScan?.status = Status.Uploading.rawValue } statusTextLabel.text = "Uploading..." self.currentScan?.addObserver(self, forKeyPath: "status", options: .new, context: nil) } override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { guard keyPath == "status" && change?[NSKeyValueChangeKey.newKey] != nil else { return } let currentStatus = Status(rawValue: change?[NSKeyValueChangeKey.newKey] as! String)! switch currentStatus { case .ClassificationResultReady, .TextScanResultReady, .FaceDetectionResultReady: self.updateUI() self.updateResetButton() try! self.currentScan?.realm?.write { self.currentScan?.status = Status.Completed.rawValue } case .Failed: self.updateUI() try! self.currentScan?.realm?.write { realm?.delete(self.currentScan!) } self.currentScan = nil case .Processing, .Completed: self.updateUI() default: return } } There are 4 key methods here that do the critical work: prepareToScan()This method creates a new scan object; this is what will be synchronized with the the Realm Object Server submitImageToRealm()This is where the application authenticates with and logs into the “scanner” Realm. You will need to replace the “YOU USERNAME” and “YOUR PASSWORD” boilerplate with the admin username and password you used when you registered your copy of RMP/PE. saveScan()This method takes the image that was selected (and shown in the app) and converts it to a data format that can be synchronized and saves it in the Scan object created by prepareToScan(). Once the image is saved, the method sets an observer on the saved Scan object in order to watch for results from the Watson service that is being called by our ScannerServer using the Realm Global Sync Notifier. observeValueForkeyPath()This method isn’t specific to Realm but a feature of the Cocoa runtime (called Key-Value Observation or “KVO”) that allows observers to be registered to watch for changes in properties of objects and data structures. In this case, in the saveScan() method, we are asking the runtime to notify us when the status of a scan we’ve synchronized changes. When it does, the code reacts by changing the status labels and adding any returned results from the Watson service. Putting it all together At the end of the section on Building the Server Application, you created and started a small Node JS containing a Realm Global Sync Listener application that should be waiting for your iOS to connect up and sync images. Now all that’s left to do is fire up your Scanner app and see how this works. Running the app should be as simple as pressing Build/Run. Barring any typos or syntax errors, Xcode will build the Scanner app and run it in the iOS simulator. Once the app is running, tap the “Tap to select an image…” button, and then select “Choose from Library…”. This will cause the app to use the build in demo image we downloaded when we created the template application. The App should look very much like this: Once the app has synchronized the image file with the Realm Object Server, the Global Sync Notifier application we created will send the image to IBM’s Watson service. After a moment the results that come back will be displayed in your app: If you have an active Apple developer account you can run this on real hardware and try it with your own images. Scanner for Android Prerequisites: This project uses Android Studio. For more information on Android Studio, please see Part I - Create and configure a Scanner Project with Android Open Android Studio and click on “Start a new Android Studio Project”. Name the application “Scanner”. “Company Domain” can be any domain name and “Project location” can be one of convenient locations on your drive. Click on the “Next” button. The next window lets you select the form factors. Select “Phone and Tablet” and Click “Next”. You don’t need to modify “Minimum SDK” at this time.. The next screen lets you select an activity type to add to your app. Select “Empty Activity” and click “Next”. Because we are going to change layout, you don’t need to select a designed one. Leave “Activity Name” as “MainActivity”, and also leave “Layout Name” as “activity_main”. Click “Finish” button to complete “Create New Project” wizard. In this tutorial, only one activity is used, and the name is not important. You can find build script file which named “build.gradle” in two locations. One is on the project root, and the other is under the “app” directory. Modify project level “build.gradle” file on the project root to add Realm dependency, like below. As you see, we add “classpath ‘io.realm:realm-gradle-plugin:2.2.0’” in dependencies block of buildscript. You are now ready to use the Realm plug-in. If you are using higher version of Realm Java, please change the number of plug-in version. // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' classpath 'io.realm:realm-gradle-plugin:2.2.0' } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } Now, we are going to change build script of “app” level. First of all, add “apply plugin: ‘com.android.application’” to register Realm Java dependency. Second, change “compileSdkVersion” and “targetSdkVersion” to 23. Actually, we don’t need those changes for use of Realm Java, but for simple examples. Because the code to fetch after requesting a photo shoot has changed much difficult since API level 24. apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "25.0.1" defaultConfig { applicationId "example.io.realm.scanner" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } … Since major version of appcompat library depends on API level, we need to modify appcompat library version when target version is changed. The initial value is based on version 25. dependencies { ... compile 'com.android.support:appcompat-v7:23.4.0' ... } Now, we need address of server. Add setting code for it in build script. Like below, we get address of localhost which we use for server in this test, and add it to “BuildConfig.OBJECT_SERVER_IP” constant. Items added as “buildConfigField” will be converted to BuildConfig which is a Java object at the time of building app, and added to app. android { ... buildTypes { def host = InetAddress.getLocalHost().getCanonicalHostName() debug { buildConfigField "String", "OBJECT_SERVER_IP", "\"${host}\"" } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' buildConfigField "String", "OBJECT_SERVER_IP", "\"${host}\"" } } } One last thing remains for settings. Add the following code at the end of the “app / build.gradle” file. With this code, we enable the synchronization feature of Realm Java. Without this option, synchronization is not available. realm { syncEnabled = true } Part II - Register models and settings Let’s start to build two models for scanner. One is “LabelScan”, and the other is “LabelScanResult”. When you fill “LabelScan” and pass it to server, the server fills the data in “LabelScanResult” to synchronize. Implement the first model, “LabelScan” as follows: public class LabelScan extends RealmObject{ @Required private String scanId; @Required private String status; private LabelScanResult result; private byte[] imageData; public String getScanId() { return scanId; } public void setScanId(String scanId) { this.scanId = scanId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public LabelScanResult getResult() { return result; } public void setResult(LabelScanResult result) { this.result = result; } public byte[] getImageData() { return imageData; } public void setImageData(byte[] imageData) { this.imageData = imageData; } } Now, implement “LabelScanResult” to hold the result. public class LabelScanResult extends RealmObject { private String textScanResult; private String classificationResult; private String faceDetectionResult; public String getTextScanResult() { return textScanResult; } public void setTextScanResult(String textScanResult) { this.textScanResult = textScanResult; } public String getClassificationResult() { return classificationResult; } public void setClassificationResult(String classificationResult) { this.classificationResult = classificationResult; } public String getFaceDetectionResult() { return faceDetectionResult; } public void setFaceDetectionResult(String faceDetectionResult) { this.faceDetectionResult = faceDetectionResult; } } Now, extend “Application” to make “ScannerApplication”. We’ll add code for Realm Java initialization and enable verbose logging: public class ScannerApplication extends Application { @Override public void onCreate() { super.onCreate(); Realm.init(this); RealmLog.setLevel(Log.VERBOSE); } } Modify “AndroidManifest.xml” to register “ScannerApplication” to “application” and add two settings for camera. <manifest package="io.realm.scanner" xmlns: <uses-feature android: <uses-permission android: <application android:name="io.realm.scanner.ScannerApplication" … Part III - Create layout Let's first take look at the whole layout file and look at the details. <?xml version="1.0" encoding="utf-8"?> <FrameLayout android: <RelativeLayout android: <ImageButton android: <TextView android: </RelativeLayout> <ScrollView android: <LinearLayout android: <ImageView android: <TextView android: </LinearLayout> </ScrollView> <RelativeLayout android: <ProgressBar style="?android:attr/progressBarStyleLarge" android: </RelativeLayout> </FrameLayout> You can see three layouts as children of “FrameLayout”. This includes “RelativeLayout”, “ScrollView”, and “RelativeLayout” in order. The first child, “RelativeLayout” is for view with camera button. The second child, “ScrollView” is a UI layout for the captured image and result. the last one, “RelativeLayout” includes “ProgressBar” for loading. Part 4 - From single Activity to scanner application Define constants for server connection in “MainActivity”. private static final String REALM_URL = "realm://" + BuildConfig.OBJECT_SERVER_IP + ":9080/~/Scanner"; private static final String AUTH_URL = "http://" + BuildConfig.OBJECT_SERVER_IP + ":9080/auth"; private static final String ID = "[email protected]"; private static final String PASSWORD = "password"; We use a constant of random number for buffer size and “onActivityResult”. This constant is assigned a 1000th prime number to just designate it as a sufficiently large and unusual number. private static final int REQUEST_SELECT_PHOTO = PRIME_NUMBER_1000th; We use two constants for “onActivityResult”. Those are used to send requests to other activities and to verify the destination when receiving data. private static final int REQUEST_SELECT_PHOTO = PRIME_NUMBER_1000th; private static final int REQUEST_IMAGE_CAPTURE = REQUEST_SELECT_PHOTO + 1; Now, let’s define fields in the activity. private Realm realm; private LabelScan currentLabelScan; private ImageButton takePhoto; private ImageView image; private TextView description; private View capturePanel; private View scannedPanel; private View progressPanel; private String currentPhotoPath; Additionally, define constants and enumurations for "MainActivity". enum Panel { CAPTURE, SCANNED, PROGRESS } class StatusLiteral { public static final String UPLOADING = "Uploading"; public static final String FAILED = "Failed"; public static final String CLASSIFICATION_RESULT_READY = "ClassificationResultReady"; public static final String TEXTSCAN_RESULT_READY = "TextScanResultReady"; public static final String FACE_DETECTION_RESULT_READY = "FaceDetectionResultReady"; public static final String COMPLETED = "Completed"; } Add code for handling view in OnCreate method. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); capturePanel = findViewById(R.id.capture_panel); scannedPanel = findViewById(R.id.scanned_panel); progressPanel = findViewById(R.id.progress_panel); takePhoto = (ImageButton) findViewById(R.id.take_photo); image = (ImageView) findViewById(R.id.image); description = (TextView) findViewById(R.id.description); takePhoto.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (realm != null) { showCommandsDialog(); } } }); takePhoto.setVisibility(View.GONE); takePhoto.setClickable(false); showPanel(Panel.CAPTURE); … } Now, it’s time for creating “showCommandsDialog” method and “showPanel” method. “showCommandsDialog” contains “dispatchTakePicture” and “dispatchSelectPhoto” that connect to the camera and the gallery depending on the situation. private void showCommandsDialog() { final CharSequence[] items = { "Take with Camera", "Choose from Library" }; final AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { switch(i) { case 0: dispatchTakePicture(); break; case 1: dispatchSelectPhoto(); break; } } }); builder.create().show(); } private void showPanel(Panel panel) { if (panel.equals(Panel.SCANNED)) { capturePanel.setVisibility(View.GONE); scannedPanel.setVisibility(View.VISIBLE); progressPanel.setVisibility(View.GONE); } else if (panel.equals(Panel.CAPTURE)) { capturePanel.setVisibility(View.VISIBLE); scannedPanel.setVisibility(View.GONE); progressPanel.setVisibility(View.GONE); } else if (panel.equals(Panel.PROGRESS)) { capturePanel.setVisibility(View.GONE); scannedPanel.setVisibility(View.GONE); progressPanel.setVisibility(View.VISIBLE); } } Let’s take a look at “dispatchTakePicture” which opens camera, first. Following code uses “startActivityForResult” to request camera shoot through intent and to get the results back. private void dispatchTakePicture() { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { File photoFile = null; try { photoFile = createImageFile(); } catch (IOException e) { e.printStackTrace(); } if (photoFile != null) { currentPhotoPath = photoFile.getAbsolutePath(); Uri photoURI = Uri.fromFile(photoFile); takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI); startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); } } } private File createImageFile() throws IOException { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = "JPEG_" + timeStamp + "_"; File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES); File image = File.createTempFile(imageFileName, ".jpg", storageDir); return image; } Let’s create “dispatchSelectPhoto” which opens gallery. This method is much simpler than previous method because we don’t need to create a file. private void dispatchSelectPhoto() { Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, REQUEST_SELECT_PHOTO); } Add code for synchronization with Realm object server below “onCreate” method. We use “SyncCredentials” to pass authentication information and set “SyncConfiguration” for opening a Realm instance using the previously declared constants. I will skip error handling to make a simple example. final SyncCredentials syncCredentials = SyncCredentials.usernamePassword(ID, PASSWORD, false); SyncUser.loginAsync(syncCredentials, AUTH_URL, new SyncUser.Callback() { @Override public void onSuccess(SyncUser user) { final SyncConfiguration syncConfiguration = new SyncConfiguration.Builder(user, REALM_URL).build(); Realm.setDefaultConfiguration(syncConfiguration); realm = Realm.getDefaultInstance(); takePhoto.setVisibility(View.VISIBLE); takePhoto.setClickable(true); } @Override public void onError(ObjectServerError error) { } }); Now, add code to close Realm. @Override protected void onDestroy() { super.onDestroy(); cleanUpCurrentLabelScanIfNeeded(); if (realm != null) { realm.close(); realm = null; } showPanel(Panel.CAPTURE); } Add code for drawing menu at the top right according to the situation, like following: @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); MenuItem item = menu.getItem(0); item.setEnabled(false); return true; } @Override public boolean onPrepareOptionsMenu(Menu menu) { final MenuItem item = menu.getItem(0); if (currentLabelScan != null) { final LabelScanResult scanResult = currentLabelScan.getResult(); if (scanResult != null) { final String textScanResult = scanResult.getTextScanResult(); final String classificationResult = scanResult.getClassificationResult(); final String faceDetectionResult = scanResult.getFaceDetectionResult(); if (textScanResult != null && classificationResult != null && faceDetectionResult != null) { item.setEnabled(true); return true; } } } item.setEnabled(false); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.refresh) { setTitle(R.string.app_name); cleanUpCurrentLabelScanIfNeeded(); showPanel(Panel.CAPTURE); invalidateOptionsMenu(); } return true; } private void cleanUpCurrentLabelScanIfNeeded() { if (currentLabelScan != null) { currentLabelScan.removeChangeListeners(); realm.beginTransaction(); currentLabelScan.getResult().deleteFromRealm(); currentLabelScan.deleteFromRealm(); realm.commitTransaction(); currentLabelScan = null; } } Now, let’s create code for sending an image to server when user takes a picture or selects a photo from the gallery. “REQUEST_IMAGE_CAPTURE” is called when user takes a photo, or “REQUEST_SELECT_PHOTO” is called when user selects an image. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case REQUEST_SELECT_PHOTO: if (resultCode == RESULT_OK) { setTitle("Saving..."); final Uri imageUri = data.getData(); try { final InputStream imageStream = getContentResolver().openInputStream(imageUri); final byte[] readBytes = new byte[PRIME_NUMBER_1000th]; final ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream(); int readLength; while ((readLength = imageStream.read(readBytes)) != -1) { byteBuffer.write(readBytes, 0, readLength); } cleanUpCurrentLabelScanIfNeeded(); byte[] imageData = byteBuffer.toByteArray(); if (imageData.length > IMAGE_LIMIT) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(imageData, 0, imageData.length, options); int outWidth = options.outWidth; int outHeight = options.outHeight; int inSampleSize = 1; while (outWidth > 1600 || outHeight > 1600) { inSampleSize *= 2; outWidth /= 2; outHeight /= 2; } options = new BitmapFactory.Options(); options.inSampleSize = inSampleSize; final Bitmap bitmap = BitmapFactory.decodeByteArray(imageData, 0, imageData.length, options); byteBuffer.reset(); bitmap.compress(Bitmap.CompressFormat.JPEG, 80, byteBuffer); imageData = byteBuffer.toByteArray(); } uploadImage(imageData); } catch(FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { showPanel(Panel.PROGRESS); setTitle("Uploading..."); } } break; case REQUEST_IMAGE_CAPTURE: if (resultCode == RESULT_OK && currentPhotoPath != null) { setTitle("Saving..."); BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(currentPhotoPath, options); int outWidth = options.outWidth; int outHeight = options.outHeight; int inSampleSize = 1; while (outWidth > 1600 || outHeight > 1600) { inSampleSize *= 2; outWidth /= 2; outHeight /= 2; } options = new BitmapFactory.Options(); options.inSampleSize = inSampleSize; Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, options); final ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 80, byteBuffer); byte[] imageData = byteBuffer.toByteArray(); uploadImage(imageData); showPanel(Panel.PROGRESS); setTitle("Uploading..."); } break; } } Finally, make a code that processes an image and returns it on the server-side. This call-back method is registered by “currentLabelScan.addChangeListener(MainActivity.this);” of “uploadImage” method. @Override public void onChange(LabelScan labelScan) { final String status = labelScan.getStatus(); if (status.equals(StatusLiteral.FAILED)) { setTitle("Failed to Process"); cleanUpCurrentLabelScanIfNeeded(); showPanel(Panel.CAPTURE); } else if (status.equals(StatusLiteral.CLASSIFICATION_RESULT_READY) || status.equals(StatusLiteral.TEXTSCAN_RESULT_READY) || status.equals(StatusLiteral.FACE_DETECTION_RESULT_READY)) { showPanel(Panel.SCANNED); final byte[] imageData = labelScan.getImageData(); final Bitmap bitmap = BitmapFactory.decodeByteArray(imageData, 0, imageData.length); image.setImageBitmap(bitmap); final LabelScanResult scanResult = labelScan.getResult(); final String textScanResult = scanResult.getTextScanResult(); final String classificationResult = scanResult.getClassificationResult(); final String faceDetectionResult = scanResult.getFaceDetectionResult(); StringBuilder stringBuilder = new StringBuilder(); boolean shouldAppendNewLine = false; if (textScanResult != null) { stringBuilder.append(textScanResult); shouldAppendNewLine = true; } if (classificationResult != null) { if (shouldAppendNewLine) { stringBuilder.append("\n\n"); } stringBuilder.append(classificationResult); shouldAppendNewLine = true; } if (faceDetectionResult != null) { if (shouldAppendNewLine) { stringBuilder.append("\n\n"); } stringBuilder.append(faceDetectionResult); } description.setText(stringBuilder.toString()); if (textScanResult != null && classificationResult != null && faceDetectionResult != null) { realm.beginTransaction(); labelScan.setStatus(StatusLiteral.COMPLETED); realm.commitTransaction(); } } else { setTitle(status); } invalidateOptionsMenu(); } Now, you’ve successfully created an Android app that takes a image or select it to recognize images through the Realm Object Server. Please refer to for the entire example.
https://realm.io/jp/docs/tutorials/scanner/
CC-MAIN-2018-05
en
refinedweb
WS-Reliable Messaging and Session Support (Part3) Posted by bhaktimehta on June 7, 2007 at 10:23 AM PDT This is the third part of tri series blogs where in Part 1 we showed one way of supporting sessions with WS Reliable Messaging. Mike showed in hisblog WS Reliable Messaging and Session Support Part 2 what are the problems with this approach and we now conclude with a third part where we have tried to fix some of these problems . Sessions are unique ids used to identify a client. They would help maintain state for each client. In this sample you will see how sessions can be supported with WS Reliable Messaging (WS RM) . WS RM is one of the enterprise features in ProjectTango which is Sun'sJava Web Services interoperability project with Microsoft's Windows Communication Foundation (WCF). The following snippets of code show how the JAX-WS Endpoint implementation which is RM enabled supports sessions . This is the wsdl which shows RM is enabled in the endpoint by the presence ofWS-RM Policy Assertions. Here is endpoint implementation class @WebService(endpointInterface="rmdemo.server.RMDemo") public class RMDemoImpl { .... } As shown in part 1 JAX-WS uses annotations defined by Common Annotations for the Java Platform (JSR 250), to inject the Web ServiceContext and declare lifecycle methods. Web ServiceContext holds the context information pertaining to a request being served. With JAX-WS Web Service all you need to do is mark a field or method with @Resource. From the WebServiceContext,MessageContext pertaining to the the current request can be accessed. @Resource private javax.xml.ws.WebServiceContext context; As mentioned above WebServiceContext exposes theMessageContext for the request being served when this method is called . The session is obtained from the MessageContext using a jax-ws property "com.sun.xml.ws.session" private Hashtable getSession() { return (Hashtable)context.getMessageContext() .get("com.sun.xml.ws.session"); } The following getter method returns the String associated with each request . Correspondingly the setter method stores the Strings for each session in the HashTable respectively. private String getSessionData() { Hashtable sess = getSession(); String ret = (String)sess.get("request_record"); return ret != null ? ret : ""; } private void setSessionData(String data) { Hashtable session = getSession(); session.put("request_record", data); } These addString method and getResult method are exposed by our RM endpoint and are same as Part 1 . The method addString takes a String as entered by a user and adds it to the Strings stored in the session data for that session. The getResult will return all the strings entered by the user during that session. @WebMethod public void addString(String s ) setSessionData(getSessionData() + " " + s); } @WebMethod public String getResult() { return getSessionData(); } Full source code for theRMDemoImpl.java is here. Advantages Here the Session is created every time a new CreateSequence request is received and gets terminated everytime there is a TerminateSequence request. This way the resource management issue as mentioned by Mike is addressed. Client CodeHere is the source code for the client. The client enters various input Strings and finally hits carriage return to terminate the client application and all the Strings received so far for that client will be returned by the server. Sample will be bundled in the wsit workspace and this is theREADME to run the samples.Additional sources of information WSIT website Check this website for latest source code, samples,documentation Project GlassFish Open Source App Server server Netbeans IDE Module: All WSIT technologies available today can be configured visuall using this Netbeans module.WS-ReliableMessaging specification Session With JAX-WS Blog Links >> - Login or register to post comments - Printer-friendly version - bhaktimehta's blog - 3414 reads
https://weblogs.java.net/blog/bhaktimehta/archive/2007/06/wsreliable_mess_2.html
CC-MAIN-2015-18
en
refinedweb
/bi/usr/local/zenoss/libexec/check-mysql-slave.pl --host=hostxxx.com --port=3306 --user=userxxx --password=pass' OK - Waiting for master to send event, replicating host (ip):3306 /usr/local/zenoss/bin/zencommand run -d hostxxx.com -v10 DEBUG:zen.zencommand:Command: '/bin/sh -c exec /usr/local/zenoss/libexec/check-mysql-slave.pl --host=hostxxx.com --port=3306 --user=user --password=(pass)' DEBUG:zen.zencommand:Output: '' DEBUG:zen.zencommand:Process check-mysql-slave.pl --host=hostxxx.com --port=3306 --user=user --password=(pass) stopped (255), 0.085734 elapsed DEBUG:zen.zencommand:The result of "/usr/local/zenoss/libexec/check-mysql-slave.pl --host=hostxxx.com --port=3306 --user=user --password=(pass)' was "" Hi John, Where you able to solve this one? I'm having the same problem. Thanks in advance, Tzach Back from the dead thread here - I don't know if the OP ever solved this, but the issue is that the format returned is not what Zenoss is looking for. See: -- James Pulver ZCA Member LEPP Computer Group Cornell University Hi jmp242, Thanks for replying. I have found my scripts are getting the return code 1 ( General error ) when I use the logging.basicConfig function in my scripts. When I mask them, zencommand run myscripts perfectly with return code 0 - Success. I've developed my scripts with python 2.7 and I see zenoss is using python 2.6.2, maybe logging.basicConfig isn't supported by python 2.6.2? Thanks in advanced for any help Tzach basicConfig has been around a while, it should work just fine in 2.6.2. I actually use it in many of my dmd scripts (albeit I've not tried it in a command data source, but I can see why it would make a difference). Are you sure you are properly using the basicConfig method? If you create a simple .py file with a main, and you run it, what is the exit code as seen by the OS? Hi Dpetzel, Thanks for the response Here are both the script and result in zencommand debug. Notice the return code of zencommand. am I doing something wrong? This is the check.py: #!/usr/local/zenoss/zenoss/bin/python # Logging configuration import logging # change this to logging.DEBUG for more information logLevel = logging.INFO logname='check' logger = logging.getLogger(logname) formatString = '%(asctime)s - %(name)s - %(levelname)s - %(filename)s - %(funcName)s - %(message)s' logging.basicConfig(filename=logname, level=logLevel, filemode='w', format=formatString) consoleLogger = logging.StreamHandler() consoleLogger.setLevel(logLevel) # create formatter formatter = logging.Formatter(formatString) # add formatter to console consoleLogger.setFormatter(formatter) print "COMMAND OK|test=1" This is the zencommand debug log: 2012-03-26 17:03:12,443 DEBUG zen.zencommand: Total of 1 queued events 2012-03-26 17:03:19,062 DEBUG zen.zencommand: running '/usr/local/zenoss/scripts/check.py' 2012-03-26 17:03:19,062 DEBUG zen.zencommand: cmd line: '/bin/sh -c exec /usr/local/zenoss/scripts/check.py' 2012-03-26 17:03:19,069 DEBUG zen.zencommand: Process check.py started 2012-03-26 17:03:19,070 DEBUG zen.zencommand: Next command in 28 seconds 2012-03-26 17:03:19,174 DEBUG zen.zencommand: Received exit code: 1 2012-03-26 17:03:19,175 DEBUG zen.zencommand: Command: '/bin/sh -c exec /usr/local/zenoss/scripts/check.py' 2012-03-26 17:03:19,175 DEBUG zen.zencommand: Output: '' 2012-03-26 17:03:19,176 DEBUG zen.zencommand: Process check.py stopped (1), 0.11 seconds elapsed 2012-03-26 17:03:19,176 DEBUG zen.zencommand: The result of "/usr/local/zenoss/scripts/check.py" was "''" 2012-03-26 17:03:19,178 DEBUG zen.zencommand: Queueing event {'severity': 3, 'performanceData': '', 'component': '', 'agent': 'zencommand', 'summary': 'Cmd: /usr/local/zenoss/scripts/check.py - Code: 1 - Msg: General error', 'manager': 'zenossu.il.imperva.com', 'eventKey': 'Check', 'device': '10.1.13.101', 'message': 'Cmd: /usr/local/zenoss/scripts/check.py - Code: 1 - Msg: General error', 'eventClass': '/Cmd/Fail', 'monitor': 'localhost'} Tzach: You'll need to pass an exit code. import sys sys.exit(0) Best, --Shane (Hackman238) Hi Shane, I added sys.exit(0) at the end of the script. Still, zencommand return with exit code 1 2012-03-27 09:47:38,168 DEBUG zen.zencommand: Next command in 160 seconds 2012-03-27 09:47:38,273 DEBUG zen.zencommand: Received exit code: 1 2012-03-27 09:47:38,274 DEBUG zen.zencommand: Command: '/bin/sh -c exec /usr/local/zenoss/scripts/check.py' 2012-03-27 09:47:38,275 DEBUG zen.zencommand: Output: '' Tzach: Really? Thats bizarre. Is anything in the script failing? --Shane Hi Shane, 1st, Thanks for replying 2nd, nope, nothing else is failing... The problem is I can't debug why it return the exit code 1. From what I have found out the zencommand.py is executed using twisted module. The function that recieve the return code is: def processEnded(self, reason): "notify the starter that their process is complete" self.exitCode = reason.value.exitCode log.debug('Received exit code: %s' % self.exitCode) log.debug('Command: %r' % self.command) log.debug('Output: %r' % self.output) This function is located, at least in my install here: /usr/local/zenoss/zenoss/Products/ZenRRD BTW, this an ubutnu server and zenoss installed on it. Tzach: Try passing an arbitray code like 42 or 75. See if the code is passed correctly. This is very interesting. --Shane Shane: It seems sys.exit doesn't matter to the zencommand, I get the same result. Meaning if the script has the line: logging.basicConfig(filename=logname, level=logLevel, filemode='w', format=formatString) Then I get following: 2012-04-01 10:13:15,126 DEBUG zen.zencommand: running '/usr/local/zenoss/scripts/check.py' 2012-04-01 10:13:15,126 DEBUG zen.zencommand: cmd line: '/bin/sh -c exec /usr/local/zenoss/scripts/check.py' 2012-04-01 10:13:15,128 DEBUG zen.zencommand: Process check.py started 2012-04-01 10:13:15,129 DEBUG zen.zencommand: Next command in 8 seconds 2012-04-01 10:13:15,227 DEBUG zen.zencommand: Received exit code: 1 If I mask the logging.basicConfig with # like this: #logging.basicConfig(filename=logname, level=logLevel, filemode='w', format=formatString) I get the following: 2012-04-01 10:13:25,305 DEBUG zen.zencommand: Command: '/bin/sh -c exec /usr/local/zenoss/scripts/check.py' 2012-04-01 10:13:25,306 DEBUG zen.zencommand: Output: 'COMMAND OK|test=1\n' 2012-04-01 10:13:25,306 DEBUG zen.zencommand: Process check.py stopped (47), 0.07 seconds elapsed 2012-04-01 10:13:25,306 DEBUG zen.zencommand: The result of "/usr/local/zenoss/scripts/check.py" was "'COMMAND OK|test=1\n'" 2012-04-01 10:13:25,307 DEBUG zen.zencommand: Queueing event {'severity': 3, 'performanceData': 'test=1', 'component': '', 'agent': 'zencommand', 'summary': 'COMMAND OK', 'manager': 'zenossu.il.check.com', 'eventKey': 'Check', 'device': '10.1.13.118', 'message': 'COMMAND OK', 'eventClass': '/Cmd/Fail', 'monitor': 'localhost'} 2012-04-01 10:13:25,307 DEBUG zen.zencommand: Total of 1 queued events 2012-04-01 10:13:25,308 DEBUG zen.zencommand: Next command in 9 seconds 2012-04-01 10:13:26,952 DEBUG zen.zencommand: Received exit code: 0 Tzach: Interesting. I'm going to tes this in other versions monday and get back to you. Looks like a bug. --Shane Tzach, I was able to recreate a similar sitation if permissions on "check" (The file) don't have write permissions. Is it possible that the "check" file doesn't have permissions for the zenoss user to write/append? In my attempts to reproduce, I ran the check.py first as root, then switched to the zenoss user and manually ran check.py. In this case I did see a stack trace (unsure if zencommand might swallow it), but I did get an exit code of 1. It might be worth checking the permissions. Hi Dpetzel, Shane, First of all, WOW, much thanks for the help and time! Really appreciate it 2nd, here the permissions: -rwxrwxr-x 1 zenoss zenoss 647 2012-04-01 10:13 check.py BTW, my system is: Linux zenossu 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux Zenoss version 3.2.1
http://community.zenoss.org/message/15714
CC-MAIN-2015-18
en
refinedweb
THBK1-10 is a cheap dual system (Android 4.2.2 /Windows 8.1) tablet based on Bay Trail (Intel Atom Z3740D). More details I'm trying to hack it, and especially get root and use non-signed zip in recovery. Basically i'm stuck at theses points, and i'm requesting directions to continue the work. I have posted in W8 section, but obviously, this is no longer the place General ------------ * i can use a work-around to write system (/system, /data) partitions * i can flash signed updates via recovery * google apps are working flawesly. Only thing is to keep original files (stock keyboard and layout) -> i would like to flash non-signed zip via recovery, but i guess i have to build a custom recovery, or can i exploit something else ? Root: ------- * no auto root is working (z4root, towelRoot). Regarding towelRoot, i tryed each 8 common parameters, and i don't really know how to do others. I have also heard this is only working in 4.4.2+ * pushing su is not working. When i'm launching it, let's say from terminal, i have a code 255 return (-1). Tested with both arm and x86 version (i'm still wondering why arm su is also returning -1, i would have expect a non valid binary. Or perhaps my x86 version is bad ? -> i'm still trying to dig this issue, and idea on how i could do ? i believe running SU was enough... but it seems not. Any idea ? Many thanks !
http://forum.xda-developers.com/android/help/hacking-thbk1-10-getting-root-t2804631
CC-MAIN-2015-18
en
refinedweb
I'm attempting to wrap my javascript/html application using qt and so far everything works fine, however scrolling is unbearable. On both Windows and OS X when scrolling it appears as if it takes several seconds for the scrolling to carry out. It is especially sluggish when I'm attempting to scroll through a DIV where its contents was computed dynamically with javascript (sometimes I scroll, count to ten, and it's stil trying to compute what to do). Even if I run something like this, though: @// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 import QtQuick 1.1 import QtWebKit 1.0 Rectangle { id: application width: 1014 height: 500 WebView { id: page html: "<iframe src=''></iframe>" preferredWidth: parent.width preferredHeight: parent.height scale: 1.0 settings.localContentCanAccessRemoteUrls: true } } @ I'm hoping there's a fix for this, my qt experience other than with this has been wonderful!
http://forum.qt.io/topic/16506/very-very-poor-scrolling-using-qtwebkit
CC-MAIN-2015-18
en
refinedweb
/* * henv.h * * $Id: henv.h,v 1.20 2006/07/10 13:49:29 source Exp $ * * Environment _HENV_H #define _HENV_H #include <iodbc.h> #include <dlproc.h> #include <sql.h> #include <sqlext.h> #include <ithread.h> enum odbcapi_t { en_NullProc = 0 #define FUNCDEF(A, B, C) ,B #include "henv.ci" #undef FUNCDEF , __LAST_API_FUNCTION__ } ; #if (ODBCVER >= 0x300) /* * SQL_ATTR_CONNECTION_POOLING value */ extern SQLINTEGER _iodbcdm_attr_connection_pooling; #endif typedef struct { int type; /* must be 1st field */ HERR herr; /* err list */ SQLRETURN rc; HENV henv; /* driver's env list */ HDBC hdbc; /* driver's dbc list */ int state; #if (ODBCVER >= 0x300) SQLUINTEGER odbc_ver; /* ODBC version of the application */ SQLINTEGER connection_pooling; /* SQL_ATTR_CONNECTION_POOLING value at the time of env creation */ SQLINTEGER cp_match; /* connection pool matching method */ struct DBC *pdbc_pool; /* connection pool */ #endif SQLSMALLINT err_rec; } GENV_t; typedef struct { HENV next; /* next attached env handle */ int refcount; /* Driver's bookkeeping reference count */ HPROC dllproc_tab[__LAST_API_FUNCTION__]; /* driver api calls */ HENV dhenv; /* driver env handle */ HDLL hdll; /* driver share library handle */ SWORD thread_safe; /* Is the driver threadsafe? */ SWORD unicode_driver; /* Is the driver unicode? */ MUTEX_DECLARE (drv_lock); /* Used only when driver is not threadsafe */ #if (ODBCVER >= 0x300) SQLUINTEGER dodbc_ver; /* driver's ODBC version */ #endif } ENV_t; #define IS_VALID_HENV(x) \ ((x) != SQL_NULL_HENV && ((GENV_t *)(x))->type == SQL_HANDLE_ENV) #define ENTER_HENV(henv, trace) \ GENV (genv, henv); \ SQLRETURN retcode = SQL_SUCCESS; \ ODBC_LOCK (); \ TRACE (trace); \ if (!IS_VALID_HENV (henv)) \ { \ retcode = SQL_INVALID_HANDLE; \ goto done; \ } \ CLEAR_ERRORS (genv) #define LEAVE_HENV(henv, trace) \ done: \ TRACE(trace); \ ODBC_UNLOCK (); \ return (retcode) /* * Multi threading */ #if defined (IODBC_THREADING) extern SPINLOCK_DECLARE(iodbcdm_global_lock); #define ODBC_LOCK() SPINLOCK_LOCK(iodbcdm_global_lock) #define ODBC_UNLOCK() SPINLOCK_UNLOCK(iodbcdm_global_lock) #else #define ODBC_LOCK() #define ODBC_UNLOCK() #endif /* * Prototypes */ void Init_iODBC(void); void Done_iODBC(void); /* Note: * * - ODBC applications only know about global environment handle, * a void pointer points to a GENV_t object. There is only one * this object per process(however, to make the library reentrant, * we still keep this object on heap). Applications only know * address of this object and needn't care about its detail. * * - ODBC driver manager knows about instance environment handles, * void pointers point to ENV_t objects. There are maybe more * than one this kind of objects per process. However, multiple * connections to a same data source(i.e. call same share library) * will share one instance environment object. * * - ODBC driver manager knows about their own environment handle, * a void pointer point to a driver defined object. Every driver * keeps one of its own environment object and driver manager * keeps address of it by the 'dhenv' field in the instance * environment object without care about its detail. * * - Applications can get driver's environment object handle by * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HENV */ #endif
http://opensource.apple.com/source/iodbc/iodbc-37/iodbc/iodbc/henv.h
CC-MAIN-2015-18
en
refinedweb
92 Spring aheac = Remember o tosetyour - clocks an =. o hour ahead A on Sunday. = K -A^* S....j.--^..- *'.,-. \ ,.:1;-i.'LL.. - * Copyrighted Material Syndicated Content Available from Commercial News providers Doggone good company go--o '' r ,, ,. :. ^ ^ ^. ^ MATTHEW BECK/Chronicle Kelly Ann Sullivan, a resident at the Crystal River Health and Rehab facility, gets a kiss from Charlie, a cocker spaniel used In Hospice of Citrus County's PUPS (Pets Uplifting People's Spirits) program. The dog's owner, Joann Chipkar, a Hospice volunteer, brought the animal to the facility to brighten the residents' day. Hard-working cocker spaniel proves himself to be truly purpose-driven' dog NANCY KENNEDY [email protected] Chronicle Joan Chipkar believes that all God's crea- tures have a purpose. However, when she first met Charlie, his purpose was buried under a coat of matted fur. Charlie, Hospice of Citrus County's third canine graduate of the PUPS (Pets Uplifting People's Spirits) program, had been made homeless during the hurricane that shares his name. Hurricane Charley hit central Florida on Aug. 13, 2004. "When I first saw him, he was all knotted up," Chipkar said, "not the handsome boy he is now." Chipkar had been one of the many hurri- cane relief volunteers who traveled to hard- hit Polk County. At first she had gone to do laundry for the relief teams from the Citrus County Health Department, but her love for animals drew her into the makeshift animal shelter. Please see DOG/Page 5A State to ask death penalty for Couey Citrus County grandjury indicts convicted sex offender DAVE PIEKLIK [email protected] Chronicle The state will seek the death penalty against con- victed sex offender John Evander Couey inthe kid- napping and murder of 9-year-old Jessica Marie Lunsford of Homosassa, following an indictment by a Citrus County grand jury. The 17-member grand jury took roughly 45 min- utes Friday morning to return the indictment against Couey, 46, formally charging him with capi- tal murder, burglary with battery, kidnapping and sexual battery. He's accused of entering Jessica's home on South Sonata Avenue the night of Feb. 23, where inves- tigators say he took her from her bedroom, sexually -" assaulted her and killed her. -. The indictment means the grand jury found enough rea- son was presented to justify holding Couey for trial. Assistant State Attorney Pete Magrino said the indict- Jessica ment will allow the state to Lunsford move forward with its case John Evander against Couey He is sched- Couey admitted to uled to be arraigned April 12 her murder. on the four charges he faces in . connection with Jessica's death. He will also have a hearing for failing to reg- ister with the state's Sex Offender Registry. During the course of their investigation, detec- tives with the Citrus County Sheriff's Office discov- ered Couey was not living at the West Grover Cleveland Boulevard address he had listed on the registry. He was listed as a sex offender following a 1991 conviction for fondling a 14-year-old girl in Kissimmee. Couey was arrested March 17 by authorities in Please see COUEY/Page 4A Officers take look back at Inverness police disbandment All eight still with county Sheriffs Office AMY SHANNON [email protected] Chronicle One year ago this week, former Chief Lee Alexander said goodbye to a chapter of his life he came to love at the Inverness Police Department, and bravely wel- comed a new one at the Citrus County Sheriff's Office. Seven of his fellow IPD officers followed. A year since the disbandment of IPD has passed, and all eight still don the green uniform. "We're pretty happy customers," said former IPD Lt Scott Rouch, now a Sheriff's Office community resource officer, who worked for IPD for 22-plus years. "I've been able to work with the city closer than ever.", Hesitant at first, Alexander and Rouch said they have "no regrets" about the transfer, as it has put bet- ter resources at their fingertips and boosted the quality of service to Inverness residents. Inverness crime statistics show a decrease in traffic accidents, and an increase in arrests and citations comparing Jan. 1 to March 28, 2004, to Jan. 1 to March 28, 2005. During that timeframe, major crimes - homicides, robberies, sex offenses Please see POUCE/Page 5A Annie's Mailbox . 8C * Movies ........ 9C Comics ......... 9C Crossword ....... 8C Editorial ........ 8A Horoscope ...... .9C Obituaries ....... 5A Stocks .. ...... .6A Three Sections New hymns mesh with old A musical group that will entertain April 7 in Lecanto believes old and new can reside along- side each other in perfect harmony. /1C SPORTS "ffM^ Rock on, children Leaving no stone unturned, Inverness Elementary School pupils scoured the field for their new best friends - rocks./3A Citrus High School takes on Lecanto High in county baseball action./1B Loy 4' y * INVERNESS CRIME STATISTICS Period of January 1 to March 28 Type 2004 2005 Percentage Change Arrests 91 181 98.90 percent Citations 301 1,178 291.36 percent Accidents 140 112, -20 percent Source: Citrus County Sheriff's Office :. :: .-:, . -:--. .. ': -.-:.-.-% ,: :_:4 ,- :'" "" ;"-z'*"";;Y :;":"""" ': : c'::7 :'r' ': < "": : '04 Weekend for car, classical buffs - CHERI HARRIS [email protected] Chronicle * &* 4 0 s Don't spend half the day in the shower waiting for inspiration about what to do this weekend. A variety of options should make finding a great event a no-brainer. Enjoy free kayak rides, music, barbe- cue and other fun at the third annual Bay Mayday today at Hunter Springs Park in Crystal River. The Kings Bay Association hosts the fes- tival. The event starts at 7 a.m. with a 5K race. Food will be served from 11 a.m. to 1 p.m. A donation of $3 for the barbecue and door prizes is requested. For more infor- mation, call 564-1725. Expect classical music on the spicy side when the Central Florida Symphony Orchestra performs its last concert of the season today. The program includes music from Latin America and performances by winners of this year's Young Artists Competition. Concert starts at 2 p.m. at Curtis Peterson Auditorium in Lecanto. Tickets are $15 for general admission and $17 for reserved seats. For more information, call Tim Driscoll at 746-6382. M Corvettes old and new will be the cen- ter of attention at the Corvettes in the Sunshine II show today at Crystal Chevrolet, 1035 S. Suncoast Blvd Homosassa. Organizers expect about 500 of the wel muscled sports cars to be on display fo the event. Vendors will have refreshments for salE The show starts at 9 a.m. Trophies will b1 awarded at 3 p.m. Crystal Chevrolet and the Citrus Count Corvette Club sponsor the event Fans of those collectible dolls wit their quirky faces won't want to miss th 13th annual Naber Kids Convention at th Naber doll factory at 8915 S. Suncoas Blvd., Homosassa. The event starts at 10 a.m. today an includes a doll auction, food and music. %at~ob P ==========^tES WIWX a for low^^^^^^ M, %a T- ,"No 40M*Mmm Availa C py " *Copyrigli .. 0^ r l ~s Aftow^ AkMP-^ ^BJ^^^^^ f Sydica ble fromCom d. l- ha e, Le si d - roviders -Mow -* iii^ i i m ^^^ ''BE1 ii iiii -o -okva W", - 4900 -wawa *..'No _. 4w 9 Ink 4*P ~* ow"Momjjji~j- *piw mobw 40 040 .0000 *Mow am am ammom qfb mmm q 40mmooo oboomau 400moup Imm' A* qlm^^ 400Bebo mbtm m 0^ a^ ^^ ^ mdtw 4 0 do w tm ma 4mp. .. .. .. . ..... ... -g H . -... 9 w we ......................... . ... ....... ...... ...... ..... ....... ..... .............. ...... ......... .... ..... .... ................. ...... ......... .... ..... ...... .... ... ... .......... ...... .......... .......................... -13 119 M . ..... ..... :IM F An CITRUS COUNTY (FL) CHRONICLE 2A SATURDAY, APRIL 2, 2005 ENTERTAINMENT ...... . .. ... ...~.... .... ... . A 400 w AOM- ^""IIwIIIIIamIIIgl allB aHe as womoo SATURDAY APRIL 2, 2005 ;.; ', A:-, ; 4# .- -.-Copyrighted Material t'6 Syndicated Content' Available from Commercial News Providers - ~- S m - .~ .~ - - -ft 41 - - - = - - -~ - - ~ ~.- - S ~- Rockin' the schoolhouse * P *'' * 4,... I .~'., IdA~ / V.. BRIAN LaPETER/Chronicle ABOVE: Inverness Primary School teacher Gail Bockiaro's third graders, including Austin Renaud, 9, participated Friday in a rock scavenger hunt with the help of Citrus High School stu- dents. CHS students hid rocks on the school football field and wrote down directions to them. The IPS students are studying rocks as part of a class project for an upcoming science fair. :^t Citrus High School junior Mandy Smith, 16, helps Inverness Primary School third-grader Caleb Beaty, 8, Friday during the rock scavenger hunt. Teens team up with prnmary-schoolers CRUSTY LorFis [email protected] Chronicle Diligently searching under every rock, the elementary school students scoured the field for their new best friends rocks. "Why would we be looking for rocks?" Inverness Primary School teacher Gail Bockiaro asked her students before their rock scavenger hunt Her third-grade,class has teamed up with a Citrus High School chemistry class for a school science fair project on rocks. "When you find your rock, you are going to find your new best friend," Bockiaro joked with the class. Chemistry II teacher Kevin Bingham had his class hide sedimentary, igneous and meta- morphic rocks on Citrus High's football field and track for the third-graders. Each student wrote directions so the children could each find a rock Gina Russo, 8, and Chris Ramirez, 17, were the first pair to find the rock Chris hid. His directions sent Gina crawling under track hurdles and jumping into the sand pit When Gina saw it she exclaimed, "It's a girl!" She named her rock Teresa. Next week the elementary school students will visit Bingham's class again to classify the rocks they found and perform experiments to find the rocks' hardness, weight, mass, and what minerals are inside. "It's fun just getting out of the classroom and playing with the kids," Chris said. Bockiaro said the rock experiment benefits the children in several ways. It gets the younger children excited about science in high school, while teaching them important Sunshine State Standards. The standards are tested each year on the Florida Comprehensive Assessment Test. Bockiaro expects the project to be fun for the students, even though she assigned them weekend homework for the project Their homework name the rock SBoard considers steroid testing Mhaavo rWTar, to Board considers steroid testing C Copyrighted Mater Syndicated Conte Available from Commercial Ne - ~ - qp- _ le ~-- ~.- - CRUSTY LOFTS [email protected] Chronicle Student athletes who "bulk i a- up" for sports using steroids may one day have problems lia| -concealing their drug use from coaches, as Citrus County School Board members discuss n -" testing athletes for controlled fl __ substances. SAt a workshop Wednesday, school board Chairwoman Pat ws Pr ders Deutschman advocated Ws ViUr researching the possibility of testing student athletes for , ._ steroid use. -. ,- She explained steroid use is - currently a national concern in S- athletics, and the school board S should let students know - steroids will not be tolerated. "It's real non-invasive," Deutschman said. "You don't want to be tested don't join the baseball team." The topic came up as school board members discussed changes to the 2005-06 Student Code of Conduct Deutschman said that when she and Superintendent of Schools Sandra "Sam" Himmel nmet with high school students in January to get feedback on the Code of Conduct, a student thought steroids should be specifically mentioned. Drugs in general are banned from schools under the blanket term "controlled substances," director of student services Renna Jablonskis said. She explained the district does not have a method for drug testing students, but if a student is arrested the district can request the student be test- ed. Jablonskis researched Hernando, Marion and Polk counties to see how their dis- tricts address steroids and learned Polk is the only one of the three that tests athletes for -drugs. Deutschman said it is too late to make changes regarding steroid or drug testing for the upcoming school year, but said she would like more research on the cost of drug-testing stu- dent athletes. School board member Bill Murray explained the danger of steroids to a child whose body is still developing. He said the strain the athletes put on their bodies by using steroids could cause perma- nent health issues. "No one talks about that," Murray said. "They just talk about 'bulking up.'" L - CD U to) * U * * U * 0 C) I ~ SI C,,. ema* *0 CU EF ER EF 4=0 CO "-CM m I. ~. .Z. I' l ! ~1 K:7- - - -.1; !5 - * *Q * - - -- .4 County BRIEFS Open house at Prescott home The Marjorie Kinnan Rawlings Society and the Citrus County Historical Society will be on hand for an open house at the former home of Dessie Smith Prescott from 1 to 5 p.m. today at 11020 North Citrus Avenue. Prescott died in 2002 at the age of 95. She is a member of Florida's Women's Hall of Fame. Prescott was featured in a chap-. ter of Rawlings' autobiographi- cal, "Cross Creek." The home is on the left about 1 mile north of County Road 488 on County Road 495 (Citrus, Ave.). Osterhout family to receive friends Dr. Gail Osterhout, one of Citrus Memorial Hospital's founding physicians, passed away on March 9, in Virginia. Funeral services were in Virginia, where he was buried in' a family cemetery. His many friends and former patients in Citrus County grieve for him and the family. Dr. Osterhout's family will 4 gather from 1 to 3 p.m. April 9 in, Inverness, with a eulogy begin- ning at 2:30, in the Citrus Memorial Hospital Auditorium on, the comer of Grace Street and Osceola Avenue. During Dr. Osterhout's nearly 40 years of practice in Citrus County, he touched many lives. This memorial service will be an, opportunity for friends and for- mer patients to gather and share memories. All are wel- come. WTI assistant director announced, Crystal River High School assistant principal Scott Meseroll will transfer to the Withlacoochee Technical Institute as assistant director. .Meserol .has worked in be., Citrus County School District for the past 28 years as a teacher,' dean and assistant principal. Superintendent of Schools Sandra "Sam" Himmel believes that with his knowledge of high school programs and schedules he will be able to help broaden the school's program offerings for high school-age students. Wastewater hearing set for Monday The Citrus County Water & Wastewater Authority board will have a hearing at 1:30 p.m. Monday in Room 166 at the Lecanto Government Building, 3600 W. Sovereign Path, Lecanto, for the purpose of final approval of the Cinnamon Ridge Utilities, Inc. staff-assisted rate case. Rates will change as a result of the assessment of investments, costs, and opera- tional requirements of this utility. With final approval, the base monthly facility charge will increase from $8.32 to $8.91. Gallonage charges will increase from $1.49 per one thousand gallons to $1.57 per thousand gallons for consumption up to 5,000 gallons; then $1.65 per thousand gallons for each of the next 5,000 gallons; then $1.73 per thousand gallons for each of the next 5,000 gallons; then $1.80 per thousand gallons for all monthly consumption above 15,000 gallons. From staff reports m o D - - ( . o CITRUS COUNTY (FL) CHRONICLE, 4A SATURDAY, APRIL 2, 2005 For the -frL. *.- Citrus County Sheriff Domestic battery arrests Christina Anne Garrison, 22, Floral City, at 12:58 p.m. Wednesday on charges of domestic battery and aggravated battery with a deadly weapon. A deputy responded to a home in reference to a disturbance. A man told the deputy he and Garrison got into an argument about turning the television on too loud, according to the report. The man told the deputy he even- tually cut the television cord in order to stop the noise, at which point Garrison lunged at him with scis- sors, according to the report. He said Garrison poked him in his left side with the scissors, according to the report. Soon after, Garrision lunged at the man again, poking him in his pri- vate parts. A neighbor saw Garrison with the scissors in her hand and heard her yell, "I'm going to cut his (private parts) off," according to the report. Garrison told the deputy she did COUEY Continued from Page 1A Georgia for not notifying offi- cials of his move. Investigators say during an interview after his arrest, he confessed to kid- napping, sexually assaulting and murdering Jessica. Her body was found March 19 behind a home belonging to Couey's half sister, where he had been living. The house is near the home Jessica shared with her grandparents and father. A medical examiner's report lists the cause of death as PM -A I~A ~ * e - ~0 poke the man with the scissors. No bond was set. Chester Paul Dellich Jr., 39, Inverness, at 12:29 p.m. Wednesday on a charge of domes- tic battery. A deputy responded to a home in reference to a possible battery. A woman told the deputy Dellich came by her home Tuesday and broke down her front door during an argu- ment, according to the report. The woman told the deputy Dellich grabbed her by her hair, threw her on the floor and kicked her in the leg, according to the report. Dellich eventually left the home on his own. The deputy spoke with the woman's children, who witnessed the entire incident and were able to describe what happened in detail. The deputy saw marks and bruises on her body. Dellich met up with the deputy and told him he didn't think he did anything wrong, according to the report. ON THE NET * For more information about arrests made bjy the Citrus County Sheriff's Orice, go to and click on the link to Daily Reports, then Arrest Reports. Inverness, at 8:04 a.m. Tuesday on a charge of domestic battery. A deputy responded to a location in Homosassa in reference to a bat- tery that had already occurred. A woman told the deputy, Dorman had beaten her up in the bedroom of the residence, according to the report. The deputy saw red marks on the woman's left arm, left side, right knee and an abrasion on her inner right arm, according to the report. The deputy also noted the woman's swollen upper lip. The deputy located Dorman, who admitted to throwing a telephone at the woman and pushing her to get her off of him. No bond was set. Other arrests No bond was set. E Christopher Michael * Robert Gary Dorman, 30, Mimnaugh, 20, 9 W. Murray St., A medical examiner's report lists the cause of death as asphyxiation, though investigators have declined to offer specific details about Jessica's death. asphyxiation, though investiga- tors have declined to offer spe- cific details about her death. Magrino said following his next court appearance, Couey will appear for a variety of hearings to check on how far along the case is proceeding, as well as to allow prosecutors and the defense the chance to present evidence and other items that could be used during his trial. The state will file its discov- ery the evidence and wit- nesses it expects to use during his trial to the defense dur- ing the next several weeks. Magrino said the entire process will likely take some O-op 40- --- 'a - - - 4wo - . Beverly Hills, at 5:16 p.m. Wednesday on a charge of utter- ing/forging a counterfeit bill. His bond was set at $1,000. Bruce William lorio, 49, 8020 W. Gulf-to-Lake Highway, Crystal River, at 7:14 p.m. Wednesday on a charge of assault or battery of law enforcement. His bond was set at $250. Laurie Cabral Cuprey, 38, 40 Erwin St. West, Safety Harbor, at 9:54 p.m. Wednesday on a charge of driving while license suspended/revoked. Her bond was set at $10,000. Traci Bower, 42, 2770 W. Apricot Drive, Beverly Hills, at 3:16 a.m. Thursday on a charge of pos- session of a controlled substance. Her bond was set at $5,000. Anterrio Laron Harvin, 24, 954 N. E. 6th St. Crystal River, at 9:51 a.m. Thursday on charges of time. "Routinely, most first-degree murder cases generally take a minimum of a year. That's probably the earliest," he said. Public Defender Daniel Lewan, who is representing Couey, refused to comment about the case Friday. In a statement from his office, he said: "Mr. Couey and his attorneys have decided they should not communicate with the media at this time. Accordingly, Mr. Couey has invoked his constitu- tional right to remain silent." Along with the indictment, several motions and other doc- uments were filed Friday - ew p-.- -do~ .-Iwo qm b- -41m 4.1w 4w 4b. -op - -~ - =-.M --- - W db -- - -. - -~ - - - --~ - - .- . - .. - 0 ~ S- - - I Copyrighted Material m Sy--dicatedContent **Syndicated Content - -O - a- - - Available from Commercial News Provide C a4wtom -A - 4 of -w - BLINSDB up to 'a-i FAST DELIVERY PROFESSIONAL STAFF FREE Verticals IFREE Wood Blinds In Home Consulting i Shutters Valances SInstallation Crystal Pleat Silhouette LECANTO ~TREETOPS PLAZA 1657 W. GULF TO LAKE HWY 527-0012 HOURS: MON.-FRI. 9 AM 5 PM VISA Evenings and Weekends by Appointment - -- .~ -- - ~ - - .- - - f 4w - -- -~ --' *- e- - b. S- P am RYWANT ALVAREZ JONES RUSSO & GUYTON a. - * E a. -~ I- - a - a. -~-- -. .~ ~- - CERTIFIED The Flori&a Bar *v ....i....Al Board Certified Civil Trial Lawyo The hiring of a lawyer is an important decision that should not be ba solely upon advertisements. Before you decide, ask us to send you information about our qualifications and experience rs - -. - IS its Le ers based free fleeing/attempting to elude a police officer and possession of marijuana. His bond was set at $1,500. Norbert William Mell Sr., 46, 740 N. Charles Ave., Inverness, at 1 p.m. Thursday on charges of pos- session of a controlled substance, possession of marijuana, posses- sion of drug paraphernalia and pos- session of a drug without prescrip- tion. His bond was set at $11,150. Jeffrey Charles Nicoll, 49, 0 Nature's Resort, Homosassa Springs, at 1:09 p.m. Thursday on a charge of driving while license sus- pended/revoked. His bond was set at $2,000. Cristina Taylor, 19, 3098 N. Chameleon Point, Crystal River, at 6:10 p.m. Tuesday on a charge of possession of drug paraphernalia. Her bond was set at $500. William Curtwarran Lank, 23, Beverly Hills, at 11:39 p.m. Tuesday on a charge of battery on an elderly person. A deputy responded to a Beverly Hills home in reference to a distur- bance. morning from Magrino and Lewan. In one request, Magrino asked Couey to pro- vide DNA samples so investiga- tors can compare bodily fluids collected ai the crime scene, including clothing and other evidence gathered. In another motion, Magrino is also asking for writing sam- ples from Couey to compare with evidence gathered, indi- cating "there is a reasonable basis to believe that the hand- writing exemplars will estab- lish the defendant's connection with the case." Magrino could not elaborate because the evidence has not been given to Lewan. !. .. v "* , A 73-year-old woman told the deputy she was "extremely afraid," and that Lank choked her, twisted her arm and made threats to her, according to the report. A sergeant made contact witrP Lank at another location and arrest-' ed him. No bond was set. Lyle F. Bennett III, 22, 8569 Admiral Byrd Road, Crystal River, at 8:54 p.m. Thursday, on a charge of; possession of 20 grams or less ( marijuana. Bennett was released on his owp, recognizance. Joseph Lawrence Lanier I^ 20, 750 S. Jeanne Ave., Invemess4, at 10:31 p.m. Thursday, on charges of fleeing or attempting to elude ,a, police office and driving without motorcycle license. His bond was set at $5,000. r M Joseph S. Schwab, 25, 690qi S. Aloysia Ave., Floral City, at 11:19, p.m. Thursday, on charges of pos. session of drug paraphernalia and possession of 20 grams or less f, marijuana. His total bond was set at $1,000. In a separate motion, the defense had a motion, approved by Circuit Judge:. Patricia Thomas requesting- that all evidence be sealed relating to a search warrant, inventory and other evidence' taken from the Lunsford home, until further notice. In the meantime, Magrino stressed the importance of let: ting a jury decide the cased, rather than letting the extra" publicity the case is receiving, interfere. "The bottom line is, with all due respect to the media," h" said, "what's important to us is' to try the case with the 12 peo- ple from the community." v .i JHRONICLL rordWis Best CoM Rit y Newspaper Serving Florld's 8,st Commtnity mall: In Florida: $59.00 for 13 weeks Elsewhere in U.S.: $69.00 for 13 weeks To contact us regard your seronline.com Newsroom: [email protected] Meadowcrest office 44- 1624 N. Meadowcrest Blvd. Crystal River, FL 34429 Beverly Hills office: Visitor ._ ITLtaar,' Bc,,v ard 3603 N. Lecanto Highway Beverly Hills, FL *4inr Homosassa office: Beacon Publi; 3852 S. Suncoast Blvd., Homosassa, FL 34446 i'i ( h;i -r 4 /1 -C 1'.. - C I- 4 - '1 -I ..1 -'C '---I .1 *1 - I -i Building Beautiful Homes, ...and Lasting Relationship MI-T We Build ' TYour , Home Your Way! "Join the Winning Team!" 1-800-286-1551 or 527-1988 4637 W. Pine Ridge Blvd. s5-TE CERTIFIED (BC-042359 Where to find us: Inverness office THE SMART CHOICE!S sn. 796 Call Monday-Friday 8:30-4:30 pm Solar Ughts & More Ocala Get It Done With The Sun! 1-800-347-9664 A 352-690-9664 5oo Ask About Our Solar Pool Heating 3, OFF Starting at $2,499 Free Estimates Financing Available .-y . Solar Lights Florida Bldg. Code Approved #1629.1 State Solar Contractor/CW-CA22 9/Insured 31 m m ----i - molp ..OR @po moMN- - --o" _"z" o- I != I CITRUS COUNTY (FL) CHRONCLE SATURDAY, APRIL 2, 2005 5A -. ::: -- --:: .. .. :: .:. --. : Obituaries Todd Cole, 35 HOMOSASSA Todd R. Cole, 35, Homosassa, died Saturday, March 26, 2005, in Homosassa. Born June 30, 1969, in Montrose, Pa., to Raymond and An toinette le, he mbved here in 198 from Itallstead, Pa. Mr. Cole was tfi manager of Discount Auto Parts in Homosassa. He served in the UtS. Air Force. Survivors include his par- ents, Raymond and Antoinette Oble of Homosassa; a son, Connor Gabriel Cole of Hallstead, Pa.; and two sisters, I~aelene Darrow of Endicott, N.Y, and Priscinda Gaughan of Hallstead, Pa. -Hooper Funeral Home, HIomosassa. Richard Glick, 16 HERNANDO Richard R. Glick, 16, Ifernando, died Tuesday, March 29,2005, in Hernando. iBorn Sept. 17, 1988, in Chattanooga, Tenn., he came here in 2000 from Arkansas. .Richard was a student 'He played baseball with the Crystal River Little League from 2000-2003. He enjoyed horseback riding, fishing, foot- ball, baseball and paintball. ,He was preceded in death by his parents. ,Survivors include his family care manager, Dolores Kuefner of Hernando; maternal grand- father, Richard Schoor of Cincinnati, Ohio; three broth- ers, James Locklear of St. Augustine, Nicholas McClure of Damascus, Md., and Justin Chapin of Hernando; and three sisters, Amanda Locklear of St Augustine, Julie McClure of Hernando and Ric Korte of Orlando. Hooper Funeral Home, Beverly Hills. Stanley Grzywacz, 78 HERNANDO Stanley George Grzywacz, 78, Hernando, died Friday, April 1, 2005, in Tampa. Born Sept. 13, 1926, in Jermyn, Pa., to Andrew and A n n a Grzywacz, he came here in 1999 from Palm City. Mr. Grzywacz was a World War II U.S. Navy veteran. He was a carpenter by trade and enjoyed woodworking and gardening. He was Catholic. He was preceded in death by his wife, Alfreida Grzywacz, in 1998. Survivors include two sons, Stanley J. Solack of Clarks Summit, Pa., and Allen Czaplicki of Port St. Lucie; one daughter, Norma Brown of Stuart; a brother, Mithias Grzywacz of Hernando; a sister, Marian Barton of Hernando; eight grandchildren, Laura Czaplicki, Paul Czaplicki, Ashley Brown, Bria Solack, Lauren Solack, Sara Solack and Kali Solack; and two great- grandchildren. Hooper Funeral Home, Inverness. Marjorie Kingsford, 89 SUMMERFIELD Marjorie Kingsford, 89, died Saturday, March 26,2005, at the Summerfield Suites Memory Care, with Hospice of Marion County, Summerfield. She was born March 5, 1916, in Holton, Mich., in Muskegon County. She married Maxwell Kingsford and had two daugh- ters, Jean Addis and Shirley VandenBerg. Marjorie and Max owned the Hillcrest Resort on Freemont Lake and later moved to a fruit orchard in Dayton Center, where they lived until retire- ment, then moved to their home in Hesperia, Mich. After Max's death, Marjorie moved to Traverse City, Mich., and then moved to Florida. She was a past member of the Order of Eastern Star. She was preceded in death by her husband Maxwell; daughter Shirley and brothers, Don, Floyd and John. Survivors include her daugh- ter, Jean Addis, and son-in-law, William Addis; sister-in-law, Leila Rynberg; grandchildren and great-grandchildren. All Faiths Cremation Society, The Villages. Anthony Mitarotondo, 76 BEVERLY HILLS Anthony J. Mitarotondo, 76, Beverly Hills, died Friday, March 25, 2005, in Crystal River. Born Sept. 19, 1928, in Brooklyn, N.Y, to Dominick and Mary Mitarotondo, he moved here from East Meadow, N.Y, in 1989. He was a U.S. Navy veteran who served in World War II. Mr. Mitarotondo was an iron- worker for New York City gov- ernment. He was a former member of the Beverly Hills Lions Club and the Beverly Hills Surveillance Unit He was Catholic. Survivors include his wife, Virginia M. Mitarotondo of Beverly Hills; three children, Karen Gannon of Ocala, Ronald Dernbach of Amityville, N.Y, and Doreen Cozzetta of Commack, N.Y; a sister, Mary Scali of Lake Wellington; eight grandchil- dren; and five great-grandchil- dren. Hooper Funeral Home, Beverly Hills. Alexander Murphy, 73 HOMOSASSA Retired Army Major Alexander B. Murphy died Thursday, March 31,2005, in Brooksville. Born Aug. 30, 1931, in Roxbury, Mass., to Raymond and Christine Murphy, he moved here in 1969 from New York He was a U.S. Army veteran having served one tour in Korea and two tours in Vietnam with the 333nd Artillery Battalion before retir- ing with the rank of Major after 23 years of service. He was a member of St. Benedict Catholic Church, Crystal River. Survivors include two daughters, Marie Straight and husband Steven, of Homosassa and Jean Tremblay and hus- band Michael,. of Waltham, Mass.; and three grandchil- dren, Shannon, Erin and Magan. Hooper Funeral Home, Homosassa. Pietro 'Pete' Vitale, 80 BEVERLY HILLS Pietro "Pete" Vitale, 80, Beverly Hills, died Thursday, March 31, 2005, in Inverness. A native of Italy, he moved to Detroit, Mich., in 1951, and came here from Warren, Mich., in 1983. Mr. Vitale retired from Ford Motor Co., Dearborn, Mich., as an assembly line worker and .. belonged to the . Teamsters Pietro Union. Vitate He enjoyed playing boccie at the Beverly Hills Park and he loved gardening. He was a member of Our Lady of Grace Catholic Church, Beverly Hills. He was preceded in death by his wife, Angelina Vitale, Dec. 11, 1997, and his son, David Vitale, in 1987. Survivors include two daughters, Anne Menendez of Sterling Heights, Mich., and Linda Vitale of Mission Viejo, Calif.; a sister living in Ireland; four grandchildren, Elisa, Jimi Jr., Joey and Angela; and six great-grandchildren. Fero Funeral Home with Crematory, Beverly Hills. Click on- cleonline.com to view archived local obituaries. Funeral NOTCES Richard R. Glick. The serv- ice of remembrance for Richard R. Glick, 16, Hernando, will be at 4 p.m. Sunday, April 3, 2005, at the Beverly Hills Chapel of Hooper Funeral Homes with the Rev. Gordon Condit offici- ating. Friends may call from 2 p.m. until the time of service Sunday. Alexander B. Murphy. A funeral mass for Retired Army Major Alexander B. Murphy, 73, Homosassa, will be at 10 a.m. Monday, April 4, 2005, at St. Benedict Catholic Church, Crystal River, with Fr. Vincent Morton officiating. Cremation will be under the direction of Hooper Crematory, Inverness. Inurnment will be on a later date at Florida National Cemetery, Bushnell, with full military honors. DOG Continued from Page 1A In between laundry and ba k- iog homemade cookies for relief workers, Chipkar volun- teered her time at the animal shelter bathing and caring for tlOe homeless dogs. i That's where her heart melt- ed. Of the more than 350 lost dbgs, Chipkar put her name on at least a dozen she would've taken them all if she could. , But she couldn't, so she took hpme Charlie, a brown cocker spaiel the same "bro\Mil cocker" she had seen come in afl matted and ugly. He had hgd worms and still has a heart murmur; his coat had been so matted that the volu n- tier groomers shaved him completely bald. SChipkar didn't care. "I just wanted to bring him home and adid to the menagerie," she soid. "I just wanted to give hi m ai better home (than the shel- ter)." ,She hadn't thought about t aining him for anything spe- cial. But during an Interfaith Council program that featured bonnie Saylor from Hospice, POLICE Continued from Page 1A and burglaries jumped slightly from 21 in 2004 to 23 ii 2005. i During those three months, Inverness' arrests more than doubled from 91 in 2004, to 11 in 2005. Likewise, Inverness citations nearly quadrupled from 301 in 2004, t4 1,178 in 2005, and traffic accidents dropped from 140 in 2004, to 112 in 2004. "You get what you pay for," Alexander said. "The quality of service they are getting is better." , Alexander and Rouch agree that the handover also has benefited former IPD officers. : "We've received more pay raises, here, than we did the last five years there," Alexander said. 1Along with bigger salaries, better training, better hours, less stress, more manpower and better resources all come t4 mind, Alexander said. I Just ask Rouch how he feels about the Sheriff's Office crime analysis unit and watch hWs eyes light up. : "They are so thorough... it's really exciting," Rouch said. "t's a very aggressive unit." i ALL ABOUT PUPS PUPS (Pets Uplifting People's Spirits) is part of Hospice of Citrus County's volunteer department. Volunteers receive Hospice orientation training to become familiar with: the his- tory and philosophy of Hospice, the history of Hospice of Citrus County, patient and family rights, loss and grief and confidentiality and HIPAA laws. The dogs are "interviewed" and screened on their ability to handle situations such as: accepting a stranger, sitting polite- ly for petting, good appearance and grooming, walking on a leash, walking through a crowd, sitting and down on com- mand coming when called, not reacting to other dogs, ani- mals or situations and working with a person other than their owner. B When the dogs pass the screening, they are referred to Therapy Dog international (TD!) for certification, which quali. fies them to be covered by insurance while they are working. Dogs also receive the AKC Good Citizenship Test. Dogs do not need to be purebred, but need to be in good health and have required vaccinations. Hospice accepts dogs that have been certified by other groups that certify pets; if they are not certified, Hospice uses TDI. H Once the dogs are certified, they visit patients in local nurs- ing homes, and not just Hospice patients. When Hospice House opens in November, the PUPS will make regular visits there to patients and families. Currently, Hospice has three PUPS dogs: Charlie (Joan Chipkar, owner), Bailey (Howard Watson, owner) and Lady Buff (Mike Stokely, owner). For information about the PUPS program, call Bonnie Saylor, Development Director, Hospice of Citrus County, at 527- 2020, Ext. 263. she heard of the PUPS pro- Chipkar started thinking gram. about Charlie's gentle nature The quality of service they are getting is better. - Deputy Lee Alexander former chief of the Inverness Police Department, about joining the Citrus County Sheriff's Office. The crime analysis unit, which serves as a massive information source for inves- tigations, was one of many resources unavailable to Rouch at IPD. "There's so much we want- ed to do that we just couldn't," Alexander said. "And that's hurt the community. They lose out." At IDP, there was only one detective, usually "tied up" with the department's case- load. At the Sheriff's Office, Alexander is one of 22 detec- tives, and the same "struggle doesn't exist." In early March of 2004, Sheriff Jeff Dawsy promised IPD officials, Inverness lead- ers and residents top-notch policing, better services and more law-enforcement resources. He wasn't kidding, Alexander said. But there's something Alexander misses most about IPD, and that's the "close- knit" feeling of a small agency. "This agency is so big, you just can't get to know every- body," he said. But when times get rough, he knows his new family at the Sheriff's Office will be there. "Even though you don't know anybody, people come out of the woodwork to help out," Alexander said. "Simply because you're a member of this family." Lt. Buddy Grant, eastside district commander, said he's pleased with the transition and the way former IPD offi- cers are adjusting to their new responsibilities at the Sheriff's Office. "They've mixed in well with 'Funeral d-tome 'WIl, Crematonr Bertha Wilbur Call for Information Joseph Caulfield, Sr. Private Cremation Arrangements Warren A. Schoen Private Cremation Arrangements 726-8323 and the way he was at the same time lively, yet calm. She thought he might make a per- fect service dog. After meeting with Saylor, Charlie went through Hospice training, passed it and was cer- tified. He now wears a red bandana with his name embroidered on it, which identifies him as a certified service dog and enables him to go to nursing homes and hos- pitals. "My cousin has terminal cancer, so I took Charlie to practice on him," Chipkar said. "My cousin couldn't do much, and he was in so much pain. But he would pet the dog and he would smile. Even when Charlie would lay down, I would see (my cousin) watch him and I'd see him smile." During a visit to the veter- ans' hospital in Tampa, Chipkar inquired about bring- ing Charlie there and learned he would be most welcome. "I was talking to some men sit- ting in the lobby and they all started telling me their dog stories 'I had a dog once.' "I know if you put me in a nursing home or hospital and brought in a dog and let me pet it, it would be the happiest day of my life. Even on your worst day, if I feel down or some- thing, just watching animals makes you smile." Chipkar believes Charlie was made for this. During his training, he proved to be a nat- ural. He follows commands without the aid of treats. Hugs and kisses are the only "treats" he seems to desire or need. "Not all animals are suited for this," Chipkar said. "When I first found him, I thought he was just a 'dog' dog. I just wanted to bring him home. But I believe that God does things in my life that are right. Out of the 350 dogs there, I could've gotten any of them, but I got this one. "If you could've seen how my cousin reacted to this dog!" she said. "I'm new at this, but I know that when I take him places and especially where there's children he calms them down. "It's strange how things work out," she said. "Everything just fell, ilnto,. place. It just seems he was made for this." our current officers," Grant said. "I've been very happy with the level of professional- ism from the officers who've come over" IOne FREE Month of Service* :Quality Call now for our 2005 Specials ult LAWN CARE & LANDSCAPE CUSTOM WATER GARDENS & PONDS P property OFFERING PER-CUT AND MONTHLY CONTRACT RATES Services The last call you \ill ever have to make for quality Services property services [L FREE EST. (352) 621-4777 *Free Month of service on 12 month contract SATURDAY, APRIL 2, 2005 5A draus couNTY (FL) CHRo cm STOCKS BA SATURDAY. APRIL 2. 2005 CITRus COUNTY (FL) CHRONICLEk THE MA ~RKET mINRE1 V1I 4' MOST ACTIVE (S1 OR MORE) Name Vol (00) Last Chg AmlntGp 702605 50.95 -4.46 Elan 404877 3.38 +.14 WalMart 290811 48,.99 -1.12 Lucent 256953 2.71 -.04 Pfizer 239084 26.15 -.12 GAINERS (S2 OR MORE) Name Last Chg %Chg Wescolntf 30.74 +2.74 +9.8 Tesoro 40.36 +3.34 +9.0 FrontrOil 38.95 +2.69 +7.4 PlaytxPd 9.65 +.65 +7.2 Premcor 64.00 +4.32 +7.2 LOSERS (52 OP MORE) Name Last Chg %Chg RussBers 16.15 -3.00 -15.7 Nati RV 9.22 -.94 -9.3 StMotr 10.64 -1.06 -9.1 vjGrace 7.75 -.77 -9.0 AmintGp 50,95 -4.46 -8.0 DIARY A.J :rn.:e , Declined Unchanged Total issues New Highs New Lows Volume 1 613 1,666 136 3,415 57 54 2,169,799,220 MOST ACTIVE ($1 un MORE) Name Vol (00) Last Chg SPDR 922200 117.38 -.58 SemiHTr 304396 32.08 -.45 SP Fncl 136527 28.00 -.39 iShRs2000 118382 121.64 -.51 SP Engy 95675 43.93 +1.06 GAINERS ($2 OR MORE) Name Last Chg %Chg Cenucon 3.12 +.52 +20.1 BrookeCp s 13.80 +2.11 +18.0 TnrValley 9.12 +1.22 +15.4 CabelTel 6.87 +.82 +13.6 InfoSonicn 2.79 +.27 +10.7 LOSERS (S2 OP MORE) Name Last Chg %Chg Tag-It 4.10 -1.10 -21.2 CVD Eqp 4.60 -.65 -12.4 CGIHIdgn 3.95 -.55 -12.2 HyperSpn 3.45 -.36 -9.4 MexcoEn 7.85 -.75 -8.7 DIARY Advanced Declined Unchanged Total issues New Highs New Lows Volume 396 509 90 995 15 22 324,565,400 MOST ACTIVE ($1 OR MORE) Name Vol (00) Last Chg Nasd100Tr1410739 36.20 -.37 Intel 679150 23.01 -.22 Microsoft 637128 24.12 -.05 Cisco, 558031 17.70 -.19 JDS Uniph 418269 1.61 -.06 GAINERS (S2 OR MORE) Name Last Chg %Chg Simclar 6.80 +2.40 +54.5 Inforte 5.13 +1.23 +31.5 TELOff 9.81 +1.64 +20.1 Syntrolwt 9.60 +1.60 +20.0 SyntroCpwt 8.15 +1.24 +17.9 LOSERS ($2 OR MORE) Name Last Chg %Chg SportsRst 2.55 -.77 -23.2 PrvtMed 3.24 -.95 -22.7 SkillSoft 3.04 -.64 -17.4 CentlFrght 2.96 -.60 -16.9 CanSoPt 6.85 -1.17 -14,6 DIARY Advanced Declined Unchanged Total issues New Highs New Lows Volume 1,101 1,969 137 3,207 55 115 1,880,503,357 Here are the 825 mo-il 3Ch. sIocks on tieo Ne ,or- Sior> Ecnari g. 6'. 7 nr6 o aCiore *r on Iri Na.Jsaq Nancnral Mrlarkt arid 116 ~ n'.T ,-.i i.he Orin InArerian StlcHk Exc:range SIxtocksn bold 3re %onr 31 leasI %,i arid changed 5 pererCil or mo'T in priie ridjerilri for 50 most n lr.fe .n Ni1 SE and Joads.a and 25 mrn-:l ac:Ite on Am9e TabAle5 dhow. name. prince anri net c,;rang& andr oner I'.) c addilCrial hl ,ld [rO.aled ThlO,Ju h Ir i v eek. as lollo'l0- Div: Cuirenti nnual driidend rate paid oin isto, .. baseFd 7on lateSl quarterly or Semiannual declaraei.n unless .lhnrolie loorIrr oed Name: SI, .cl appear alphateinc:ally by lhe corrppar.v's lull narrm into its atbrewahiori. r amrns crnstirng ofl inaialc appear al IleM ,,agrjnnir l.ach\ l|rerie s ll t Last: Pncei th:.,: ws tr3ding3 at wnen e..crrange cI-cE.d l:for the day, Chg: LOS. ir gain or the day N0 change indicated by Slock Fr .inaleB .', mE r.ira E ir.r,,, R' :r Ir l.j r _.i ra r.. llu ,:r triner'rT C,1 i... r. a, d Ii. 1 .c11'. 3] I.: ,r .Ir I P. I : .?: 'i. ar rl il, t, d " ur Ird 1 1rFh. ri, E,'r.,3. ET.r rgIr C r: p .-, r11 i,-Ipl,: I',llr,.)i3 a f i ,r. ': d-,Ca,..,, r, 1, lia, i r, r, ,[ nr,.j,'3,, ., ", ,+ Irl.jiT. rlja~d I.. a ia31 .-1 :ut'rl, li ,'ii.j " vjr .1 r :.ri, lI,'.>,,T, L'r,,T ',nlr,,3 1r 111,,1 pr i ,ai-n.1 a E l'. ': 1' F .r, rl4 K T "' ,, H,. ,i ,.: .irer r, -,l ,1 i cu.i..r, C o nI r ':. -.:, p.j l j ; PE . ,JlJ1- d n Hlijr,r lI) iu, 'iIt hfT, 31 r ;F. ClhB.l (*,r,.:, ; i.:.:, ,,jl. r.. ,I 5 1 l-'.l :rj r. ,,r. t, ." ) ,,,,i I l i ,r s *i T.i a rl lb.. i. rr. A3 . U ir .:] rud r .. ra, r,,r r.. lijn.I i1 C r, 1 1iAr. 31n up.'u, ur,- .'-lrl": i l -, l ' e'"s"' r.0',. .',,.'.J L'r ''' ~ S. r Ia, ,,. "Ji 2 Z '".. in I,,-, 1 ri,r, r i, .I.uTr l"", 'v. , Divloend Foolnolei a E-ra,.3'.3cni .. i.dr l ba i.l n.:.ri ,,,n jtd..., &nr.ual sie .lu: [,. I L ,U'J .i'lr'i *. ..'3rid- i 0 A ,-n u r t d- f4 I .1, o r:, r ,,iU 1' 1 1 2 T. :.r t iz | - 3lrr' i.l '3, li.:nd 3 1 ,,1 h.-r i... i|.':,r r.: f.,.ul3r 131.: I -urr .:.I d .Mndl 0rJ: p31.1 Ir, 4' fl1, F, r,' ,11 l 6m p .,r ,. -.mT, i ei E. *,15 c, I I',-,'iIi 1 ,31 i y 1' Inhi ,:, 5 .,uiT,,Jl _, .:iti' .? ; 1, L. i ;:ucS r ,3,rd -.','i3 l5 ,3,i n .","i e ,U ,L'l.i :-.1 .rir'u .I 4 .I l ... nlr .A i rI, ,'.3 :l% r .u15l 0 ',,', ,' ., .' . m v fr +:.':, i] ii..d .]r.n; ,: [r., ,nl rn i. r di.'iede a8nr..j li 3 1 te .rn..n '- ,leld C . 0 0,loh 3".I Til I 1,A :' .0 1 Pclll.a. u.fJ,' Cate: Source: The Associated Press. Sales figures are unofficial. STCSOSBSSBSSTEES Name DIv YId PE Last AT&T .95 5.1 ... 18.66 AmSouth 1.00 3.9 15 25.57 BkofAms 1.80 4.1 12 44.01 BellSouth 1.08 4.2 10 25.86 CapCtyBk .76 2.0 18 38.97 Citigrp 1.76 3.9 14 44.62 Disney .24 .8 25 28.58 EKodak .50 1.6 14 31.31 ExxonMbl 1.08 1.8 16 60.55 FPLGps 1.42 3.5 16 40.13 FlaRock .80 1.4 23 59.06 FordM .40 3.6 7 11.18 GenElec .88 2.5 22 35.47 GnMotr 2.00 6.8 6 29.38 HomeDp .40 1.1 17 37.60 Intel .32 1.4 18 23.01 IBM .72 .8 18 90.44 YTD YTDN Itr Cho %Cho Name DIv YId PE Last Cha %Chgar -,09 -2.1 -.38 -1.3 -.09 -6.3 -.43 -6.9 -1.54 -6.8 -.32 -7.4 -.15 +2.8 -1.24 -2.9 +.95 +18.1 -.02 +7.4 +.24 -.8 -.15 -23.6 -.59 -2.8 -.01 -26.7 -.64 -12.0 -.22 -1.6 -.94 -8.3 LowesCos .16 .3 20 56.19 McDnlds .55 1.8 17 31.00 Microsoft .32 1.3 26 24.12 Motorola .16 1.1 23 14.89 Penney .50 1.0 28 50.04 ProgrssEn2.36 5.6 14 42.14 SearsHIdgs ... ... 12 135.39 SprntFON .50 2.2 ... 22.74 TimeWarn .. 24 17.45 UniFirst .15 .4 19 40.98 VerizonCml.62 4,6 13 35.19 Wachovia 1.84 3.7 13 50.34 WalMart .60 1.2 20 48.99 Walgrn .21 .5 31 43.71 -.90 -2.4': -.14 -3.3;.; -.05 -9.7t'.A -.08 -13.4' -1.88 +20.9 +.19 -6.9 +2.22.+36.8 , -.01 -8.5' -.10 -10.3'''.' +1.08 +44.9 .. -.31 -13.1, -.57 -4.3'"' -1.12 -7.3 -.71 +13.9- 1, I 52-Week High Low Name Net % YTD 52-wk Last Cha Cha % Chg % Chg NE YRKSOC0ECANG DIv Name Last Chg .. ABBLtd 6.15 -.05 .84 ACE Ltd 39.93 -1.34 .72 ACMInco 8.17 +.07 AESCp 16.53 +.15 .44f AFLAC 37,10 -.16 AGCO 18.00 -.25 124f AGLRes 34.80 -.13 AKSteel 11.34 +.28 1.92 AMULRS 27.33 -.06 .. AMR 10.45 -.25 .. ASALtd 39.28 +.31 .95 AT&T 18.66 -.09 .36r AU Optron 15.25 +.59 .79e AXA 26.42 -.26 1.101 AbtLab 46.19 -.43 .50 AberFltc 56.55 -.69 .10 Ablbig 4.85 +.22 .. Accenture 24.44 +.29 .93e AdamsEx 12.77 -.10 .30 Adesan 23.65 +.29 .36 AdvAnmernd15.82 +.34 .. AdvAuto 50.70 +.25 AMD 16.19 +.07 Aempsls 32.03 -.72 .02 Aetna s 73.78 -1.17 AffCmpS 52.00 -1.24 .. Agere 1.40 -.03 .. AgereB 1.37 -.05 .. Aglent 22.07 -.13 Ahold 8.21 -.11 1.28f AirProd 63.23 -.06 .. AlrTran 8.79 -.26 .76 Abertsn 20.01 -.64 .60 Alcan 37.32 -.60 Alcatel 12.02 -.05 .60 Alcoa 30.27 -.12 ... AgEngy 20.60 -.06 .24 AllegTch 24.83 +.72 .40f Allergan 69.47 1.20 Alletes 41.80 -.05 2.01e AlIrCap 46.99 -.16 AlliData 41.18 +.78 .89 AIIWrld2 11.74 -.06 1.05 AlllantEgy 27.26 +.48 AldWaste 7.31 AlImrFn 35.66 -.29 1.28f Allstate 53.40 -.66 1.52 AlteI 55.15 +.30 AlphaNRs n 28.75 +.08 .18 Alpharma d12.18 -.14 2.92 Alttia 65.18 -.21 .95e AmBev 28.60 -.29 .50 AmbacF 73.99 -.76 Amdocs 28.32 -.08 1.20 AmHess 98.43+2.22 2.54 Ameren 49.06 +.05 .21e AMovliL 52.12 +.52 ... AmWest 5.10 -.33 .60 AmAxie 24.26 -.24 1.40 AEP 34.13 +.07 .02f AEqlnvL 12.15 -.64 .48 AmExp 50.90 -.47 .50 AmnEtGp dS0.5 -4.46 .60 AmStds 46.33 -.15 .96 AmSIP3 11.64 +.04 .. AmTower 18.15 -.08 .. Amercdt 23.22 -.22 .10 AmerisBrg 56.36 -.93 1.00 AmSouth 25.57 -.38 .72f Anadrk 7820 +2.10 .24 AnalogDev 35.71 -.43 .98 Anheusr 47.13 -.26 .. AnnTayirs 25.00 -.59 1.83e Annaly 18.73 -.03 .60 AonCorp 22.53 -.31 .32 Apache 62.74 +1.51 2.40 Aptlnv 37.23 +.03 .17 ApplBlo 19.31 -.43 ... Apdra 32.11 +.01 .52 AquaAm 24.20 -.16 ... Aqulla 3.85 +.02 .32 ArchCoal 44.35 +1.34 .34f ArchDan 24.97 +.39 1.73f ArchstnSm 34.38 +.27 .. ArmorH 36.02 -1.07 ... ArrowE 24.94 -.41 1.10 Ashland u68.87 +1.40 .68 AsdEstat 9.97 .28 Assurant 33.44 -.26 .94e AstaZen 39.46 -.07 1.24 ATMOS 26.93 -.07 ... AutoNatn 18.72 -.22 .62 AutoData 44.83 -.12 .. AuLoZone 85.03 -.67 ... Avaya 11.47 -.21 .. Aviall 27.64 -.36 .661 Avons 42.42 -.52 1.40 BB&TCp 38.73 -.35 .46e BHP BILt 28.39 +.41 .32 BJSvcs 53.02 +1.14 ... BJsWhis 30.89 -.17 ... BMCSft 15.11 +.11 1.77e BP PLC 62.76 +.36 1.92 BRT 20.95 -.11 .46 BakrHu 45.55 +1.06 .40 BallCps 41.66 +.18 1.80 BkofAmts 44.01 -.09 .80a BkNY 28.89 -.16 .68 Banta 42.88 +.08 ... BamNbls 34.19 -.30 .22 BanickG 23.94 -.02 .52 BauschL 72.49 -.81 .58e Baxter 33.75 -.23 1.00 BearSt 98.27 -1.63 ... BearingPt 8.45 -.32 .40 BeazrHms 50.39 +.53 .72 BectDck 57.56 -.86 1.08 BellSouth 25.86 -.43 .44 BestBuy 50.60 -3.41 ... Beverty 12.34 -.04 1.12f BlackD 79.32 +.33 1.28f BIkHICp 33.25 +.18 .75a BkFL08 15.64 +.15 .88 BiockHR 50.36 -.22 .08a Bockbsfr 8.92 +.09 .56e BlueChp 6.65 1.00f Boeing u58.78 +.32 .36 Borders 26.60 -.02 ... BostBeer 21.30 -.60 2.60 BostProp 59.65 -.58 .. BostonScd d28.67 -.62 .80 Bowatr 37.49 -.18 .68 BrigStTats 35.58 -.83 ... Brinker 35.49 -.73 1.12 BrMySq 24.94 -.52 .60f Bnrnswick 47.22 +.37 .52 BungeLt 54.82 +.94 .68 BurNSF 53.28 -.65 .34 BurdRscs 51.60 +1.53 2.16 CHEngy 44.93 -.77 .10 CIGNA 88.95 -.35 .52 CrrITGp 37.67 -.33 ... CMSEng 12.99 -.05 ... CSKAtO 17.15 -.50 .40 CSSInds 34.41 -2.14 .40 CSX 41.81 +.16 .29 CVSCp 51.56 -1.06 CablvsnNY 28.00 -.05 .16 CabotOGs 37.58 +.81 ... Cadence 15.00 +.05 ... Caesars 19.62 -.17 .28 CaloWf 12.67 -.13 ... Calne 2.74 -.06 .24 Camecogs 44.60 +.36 .68 CampSp 28.47 -.55 .11 CapOne 74,68 -.09 1.26 CapMpfB 12.75 +.15 .12 CardnlHih 54.68 -1.12 CaremkRx 39.81 +.03 ... CarMax 30.60 -.90 .60 Camival 50.78 -1.03 1.64 Caterplllr 90.15 -1.29 ... Celestlig 13.55 +.04 1.108 Cemex 36.85 +.60 .36 Cendant 20.31 -.23 .40a CenterPnt 11.94 -.09 .16 Centex 58.79 +1.52 .24f CntyTel 32.84 .. Cenveo 5.50 -.14 ... ChmpE 9.36 -.04 .01 Checkpnt 16.75 -.13 .18 ChesEng 22.49 +.55 1.60 ChevTexs 59.31 +1.00 1.84f ChlMerc 183.50-10.53 ... Chcoss 28.13 -.13 1.72f Chubb 77.55 -1.72 ... CinciBell 4.18 -.07 1.921 CINergy 39.98 -.54 .07 CircCity 15.67 -.38 1.76f Cftlirp 44.62 -.32 1.00a CltzComm 12.95 +.01 .40f ClaresStrs 22.70 -.34 .50 ClearChan 34.17 -.30 1.12 Clorox 62.86 -.13 .. Coach 55.58 -1.05 1.121 CocaCI 41.38 -.29 .16 CocaCE 20.49 -.03 ... Coeur 3.61 -.06 1.16f CokgPal 51.52 -.65 .65a Collntin 8.52 -.02 2.70f CoenPT 38.31 -.10 2.20 Comedca 54.69 -.39 .44 CmcBNJs 31.71 -.76 .24 CmdMIlIs 34.30 +.41 ... CmlyHiI 34.98 +.07 .89e CVRDs 32.00 +.39 .89e CVRD pfs 26.90 +.33 .08 CompAs 27.26 +.16 ... CompSci 45.42 -.43 ... ComstkRs 29.52 +.78 1.09 ConAgra 26.67 -.35 2.00 ConocPhil 110.28 +2.44 .56 ConsolEgy 47.99 +.97 2.28f ConEd 41.84 -.34 ... Constel[A 53.18 +.31 1.34f ConstellEn 52.14 +.44 ... CtAirB 11.61 -.43 .... Cnvgys 14.90 -.03 ... CoopCami 5.06 +.85 .42 CooperTire 18.09 -.27 ... Coming 11.14 +.01 ... CorusGr 10.30 +.06 .56f CntwdFns 31.80 -.66 ... Coventry u67.89 -.25 20 Crompton 14.63 +.03 ... CrwnCsie 16.29 +.23 ... CrownHold 15.32 -.24 .. CypSem 12.37 -.23 .788 DNPSelct 10.69 -.04 .96 DP. 25.74 +.74 .27 DRHortns 30.14 +.90 2.06 DTE 45.46 -.02 1.82e DaimIrC 44.05 -.67 .48 DanaCp 12.52 -.27 .06 Danahers 52.60 *-.81 .08 Darden u31.05 +.37 ... DeanFds 33.87 -.43 1.24f DeeeM 66.24 -.89 ... DelMnte 10.68 -.17 .12m Delphi 4.32 -.16 ... DellaAr 4.03 -.02 .48 DeltPne 28.73 +1.73 ... DeutTel 19,77 -.19 .30f DevonEs u49.55 +1.80 .25 DIaOffs 51.74 +1.84 ... DlcksSprt 35.90 -.83 .16 Dillards 27.22 +.32 ... DIrecTV 14.43 +.01 .24f Disney 28.58 -.15 .16 DollarG 21.40 -.51 2.68f DomRes 75.27 +.84 1.04 DonlleyRR 31.67 +.05 .72 DoralFin 21.75 -.14 .64 Dover 37.26 -.53 1.34 DowChm 49.14 -.71 1.40 DuPont 50.83 -.41 1.10 DukeEgy u28.32 +.31 ., DunBrad u63.56 +2.11 1.00 DuqLight 17.88 -.04 ... Dynegy 3.92 +.01 ., ETrade 11.80 -.20 ,. ECCCapn d5.71 -.29 ... EMCCp 12.36 +.04 .16 EOGRessu50.26 +1.52 1.76 EastChm 59.13 +.13 .50 EKodak 31.31 -1.24 1.24f Eaton 65.04 -.36 .35 Ecolab 32.90 -.15 1.00 EdlsonInt u35.05 +.33 ... EdwLfSc 43.23 +.01 .64 Edwards 43.75 -1.05 .16 EIPasoCp 10.65 +.07 ...Elan 3.38 +.14 .20 EDS 20.67 1.66 EmrsnE 63.96 -.97 1.28 EmpDist 23.47 +.21 ... Emulex 19.00 +.16 3.70 EnbrEPtrs 51.41 +1.59 .40 EnCanag 72.18 +1.76 ... EngyPrt 27.18 +1.21 ... EnPro 27.85 +.35 .10 ENSCO 38.86 +1.20 ... Enterasys 1.32 -.08 2.16 Ertergy 71.24 +.58 .601 Eqtyinn 11,01 -.02 2.00 EqOffPT 30.46 +.33 1.73 EqtyRsd 32.10 -.11 .40 EsteeLdr 44.92 -.06 .60 EthanAl d31.78 -.22 1.60 Exelons 45.90 +.01 1.08 ExxonMb 60.55 +.95 ... FMCTch 33.76 +.58 1.42 FPLGps 40.13 -.02 ... FairchldS 14.96 -.37 .23p FairPointn d15.05 +.08 .38f FamDIr 29.65 -.71 1.04m FannieMIf d53.24-1.21 .28 FedExCp 92.35 -1.60 .24m FedSignI 15.12 -.05 .54 FedrDS 62.81 -.83 2.00 Ferreligs 21.20 ... .58 Ferro 18.47 -.35 1.00a RdlNFns 32.30 -.64 .72 FstAmCp 32.60 -.34 .24f RrstData 38.90 -.41 5.108 FRnFds 18.10 +.08 ... FslMarbt 58.30 +.77 1.60 RTrFidn 19.47 -.18 1.65 FrstEngy 41.97 +.02 ...FishrSci 56.15 -.77 ... eetEn 8.53 -.17 .80a FaRock 59.06 +.24 .40 FordM 11.18 -.15 .. ForestLab 36.71 -24 ... ForestOIl 42.00 +1.50 1.32 FortuneBr 82.85 +2.22 .40a FrankRes 68.15 -.50 1.401 FredMac 60.85 -2.35 ... Huntsmn n 1.00a FMCG 40.01 +.40 1.918 IShDJDv ... Freescalen 16.72 -.23 ... FreescBn 17.06 -.19 1.36 FdedBR 15.74 -.13 1.00b Frontlines 49.39 +.39 .80 GATX 32,95 -.24 .72a GabelllET 8.93 -.07 1.08 Gannett 78.47 -.61 .18f Gap 21.51 -.28 .. Gateway 3,99 -.04 ... GenCorp 19.85 -.15 ... Genentch s 56.28 -.33 1.601 GenDyn 107.85 +.80 .88 GenElec 35.47 -.59 1.44 GnGrthPrp 34.00 -.10 1.24 GenMIlls 48.65 -.50 2.00 GnMotr 29.38 -.01 1.12 GMdb32A 23.48 -.02 1.31 GMdb32B 18.40 -.28 1.56 GMdb33 d20.50 -.30 .26 Genworth n 27.61 +.09 .701 GaPacif 35.88 +.39 .78e Gerdaus 16.60 +.10 .65 Gilette 50.02 -.46 1.53e GlaxoSKin 45.33 -.59 .30 GlobalSFe 38.13 +1.09 .11e GoldFLtd 11.50 +.01 .18a Goldcrpg 14.32 +.11 .24 GoklWFs 60.14 -.36 1.00 GoldmanS 109.30 -.69 .80 Goodrich 38.37 +.08 ... Goodyear 13.06 -.29 ... vjGrace 7.75 -.77 ... Grafrech 5.46 -.23 ... GrantPrde 24.37 +.21 1.66 GtPlalnEn 30.31 -.27 1.00f GMP 29.23 -.07 ... Griffon 21.13 -.28 2.18e GTelevsa 58.88 +.08 .34 Gtechs 23.55 +.02 .63e GuangRy 17.85 -.03 .40 Guklant 73.84 -.06 .60f HCA Inc u53.80 +.23 .84 HRPT Pp 11.93 +.02 .50 Hallibtn 44.65 +1.40 1.19e HanJS 14.80 +.01 .65 HanPtDIv 9.15 +.06 .78 HanPtDv2 11.22 -.01 1.71e Hanson 46.79 -.31 .50 HarleyD 56.78 -.98 .05 Hannan 88.46 .11e HarmonyG 7.87 +.07 1.32 HarrahE 63.98 -.60 1.16 HartfdFn 67.25 -1.31 .36f Hasbro 20.40 -.05 1.24 HawaliEls 26.13 +.61 2.40 HItCrREIT 32.14 +.14 .16 HItMgt 25.97 -.21 2.60f HithcrRity 36.45 +.01 ... HealthNet 33.00 +.29 ... HeclaM 5.38 -.10 1.14 Heinz 36.44 -.40 .21e HellnTel 8.96 +.16 ... Hercules 14.45 -.03 .88 Hersheys 60.10 -.36 .32 HewlettP 21.71 -23 .80 Hibem 31.90 -.11 1.70 HighwdP 26.57 -.25 ..08 Hilton 22.23 -.12 .40f HomeDp 37.60 -.64 .83f HonwllintI 37.00 -.21 .32f HostMarr 16.41 -.15 ... HovnanE 51.57 +.57 .36f HughSup s 30.03 +.28 ... Humrnana 32.57 +.63 .72f ITTIlnds 1.20 Idacorp 1.12 ITW .40 Imation 3.00 ImpacMtg .. INCO .. Infinson 1.00 IngerRd IngrmM .72 IBM ,48 IntlGame 1.00 IntPap ... IntRect ... ISEn ... IntlSteel ... Interpublic 23,38 +.06 59.74 -.21 90.80 +.56 28,14 -.23 89.26 -.27 34.74 -.01 19.13 -.05 39,76 -.04 9.50 -.05 79.72 +.07 16.80 +.13 90.44 -.94 26.52 -.14 36.35 -.44 44.20 -.1.30 d24.80 -1.20 39.99 +.49 12.18 -.10 1.36 JPMorqCh d34.25 -35 ... Jabll 28.16 -.36 .04 JanusCap 13.85 -.10 1.67f JeffPilot 48.45 -.60 1.14 JohnJn 66.85 -.31 1.00 JohnsnCtl 55.30 -.46 .40 JonesApp 33.01 -.48 1.50f KBHome 119.00 +1.54 ... KVPhA 23.72 +.52 ... KCSouth 19.96 +.70 .48 Kaydon 31.06 -.34 1.01 Kellogg 42.69 -.58 .64 Kellwood 28.64 -.15 K.. KemetCp 770 -.05 1.80 KerrMc 79.90 +1.57 ... KeyEngif 11.70 +.23 1.30f Keycorp 32.01 -.44 1.82 KeySpan 38.98 +.01 1.80f KImbCIk 65.46 -.27 ... KingPhrr d8.18 -.13 ... Kinrossg 6.12 +.12 .. Kohls 50.97 -.66 .82 Kraft 32.78 -.27 ... KrspKrmn, 7.48 -.15 .. Kroger 15.67 -.36 .398 LLERy 7.43 -.01 ... LSILog 5.51 -.08 1.20 LTC Pp 16.87 -.48 .44 LaZBoy 13.69 -.24 LabCp 48.06 -.14 1.38f Laclede 28.92 -.28 ... LVSands n 44.26 -.74 '1.001 LearCorp 44.16 -.20 .60 LeggMass 76.20 -1.94 .80f LehmBr 92.78 -1.38 .55 LennarA 57.29 +.61 ... Lexmark 79.37 -.60 .62e LbtyASG 6.04 +.07 1.93t1 ULbyMA 10.35 -.02 2.44 UbtProp 39.11 +.06 1.52f UllyEll 51.19 -.91 .60f Limted 24.11 -.19 1.46f UncNat 44.81 -.33 .22 Undsay 19.08 ... ... Unens 25.00 +.17 ... UonsGtg 11.20 +.15 .23 LizClalb 39.48 -.65 1.00 LockhdM 61.16 +.10 ... LoneStTch 41.09 +1.66 .40 LaPac 25.33 +.19 .16 LowesCos 56.19 -.90 ...Lucent 2.71 -.04 1.65e Lumlnent 10.55 -.43 .90 Lyondell 28.65 +.73 1.60 M&TBk 100.89 -1.17 1.121f MBIA d52.12 -.16 .56f MBNA 24.20 -.35 .72 MDU Res 27.45 -.17 ... MEMC 13.25 -.20 .52 MCR 8.57 +.07 .30 MGIC 61,03 -.64 ... MM Mr 70.38 -.44 ... Madeco 9.51 -.15 1.52 Magnal g 66.60 -.30 .52 MgdHJ 6.12 +.02 .60f ManoaCare 36.40 +.04 .401 Manpwl 42.81 -.71 1.04 Manulffg 46.86 -1.06 1.12 Marathon 48.25 +1.33 .34 MarlntA 65.97 -.89 .68m MarshM 29.89 -.53 ... MStewrt 22.32 -.27 ... MarvelE 19.97 -.03 .80f Masco 34.29 -.38 .16 MasseyEn 40.49 +.45 MatSci 13.40 -.05 .45f Mattel 20.98 -.37 ... Maxtor 5,40 +.08 .98 MayDS 36.81 -.21 .72 Maytag 13.85 -,.12 .55f McDnlds 31.00 -.14 1.32f McGrH 86.03 -1.22 .24 McKesson 37.86 +.11 ... McAfee 23.05 +.49 .92 MeadWvco 31.89 +.07 ... MedcoHth u49.25 -.32 .12 Medlds 30.48 +.50 .34 Medtmic 50.51 -.44 .72 MellonFnc 28.36 -.18 1.52 Merck 32.31 -.06 .64 MerrillLyn 55.95 -.65 .461 Metoife 38.86 -.24 .28 MichStrs 36.00 -.30 ... MicronT 10.26 -.08 2.34 MIdAApt 36.22 -.28 ... Midas 22.67 -.16 ... Milacron 2.89 -.16 ... Millipore 42.84 -.56 2.51f MillsCp 52.89 -.01 .. MlttalStl 32.50 +.15 .558 MobileTels 34.59 -.60 ... Mohawk 83.04 -1.26 1.28f MolsCoorsB 77.97 +.80 .68 Monsnto u64.66 +.16 1.44f Montpeir 34.86 -.29 .44f Moodys 80.44 -.42 1.08 MorqStan 56.87 -.38 .09e MSEmMkt 17.59 +.26 ... Mosaic 15.85 -1.21 .16b Motorola 14.89 -.08 .73 MunienhFd 10.86 +.09 .90 MurphO 101.45 +2.72 .12 MylanLab 17.63 -.09 ... NCRCps 33.42 -.32 ... NRG Egy 34.72 +.57 1.40 NatClty 33.20 -.30 1.12 NatFuGas 28.74 +.15 1.84e NatGrid 46.50 -.25 ... NOilVarco 47.05 +.35 .08 NatSemiis 20.11 -.50 ... Navistar 36.60 +.20 .60f NelmMA u91.25 -.26 .21 NewAm 2.06 +.01 6.20f NwCentFn 46.54 -.28 1.36 NJRSOS 43.45 -.08 1.00 NY CmtyB 18.02 -.14 .62 NYTrimes 36.00 -.58 .84 NewellRub 21.92 -.02 ... NewfExp 75.82 +1.56 .40 NewmtM 42.45 +20 ... NwpkRs 5.77 -.12 .16e NewsCpAn 16.95 +.03 .06e NewsCpBn 17.59 -.02 .92 NiSource 22.89 +.10 1.86 Nior 37.03 -.06 1.00 NlkeB 83.00 -.31 ... NobleCorp 58.30 +2.09 .20 NobleEngy 70.39 +2.37 .44e NokiaCp 15.42 -.01 .52 Nordstr 54.22 -1.16 .44f NorflkSo 36.78 -.27 ... NortelNet 2.71 -.02 .88 NoFrkBcs 27.83 +.09 .65 NoestUt 19.28 +.01 3.20 NoBordr 48.80 +.56 1.04f NorthrpGs 54.20 +.22 .86e Novatis 46,37 -.41 2.32 NSTAR 54.74 +.44 .6f0 Nucors 58.40 +.84 .93 NvFL 14.64 +.09 ,94a NvIMO 14.69 -.01 1.33 OGEEngy 27.13 +.18 .32f OMICp 19.29 +.14 1.24f OcclPet 73.64 +2.47 ... OftcDpt 22.00 -.18 .60 OfficeMax 33.50 .52 OkldRepub 22.86 -.43 .80 Olin 23.07 +.77 .09 Omncre 35.28 -.17 .90 Omnicom 87.55 -.97 1.00 ONEOK u31.05 +.23 ... OreSt 24.15 +1.15 .35 OshkshTrk 81.48 -.51 .52 OutbkStk 45.13 -.66 ... Owensll 25.30 +.16 1.20 PG&ECp 34.25 +.15 .18 PMIGrp 37.81 -.20 2.00 PNC 51.31 -.17 .74 PNMRess 26.72 +.04 1.80 PPG 70.41 -1.11 1.84f1 PPLCorp 53.58 -.41 ... PacifCre 56.35 -.57 ... Pactiv 23.30 -.05 .80f ParkHan 60.56 -.36 ... PaylShoe 15.44 -.35 .30 PeabdyEs 47.45 +1.09 2.76 Pengrthg 20.44 +.44 2.48f PenVaRs 51.88 +1.33 .50 Pennev 50.04-1.88 .27 PepBoy 17.22 -.36 1.00 PepcoHold 21.03 +.04 .32f PepsiBott 27.45 -.40 .92 PepsiCo 52.76 -.27 .341 PepslAmer 22.58 -.08 .28 PerkElm 20.32 -.31 1.06e Prmlan 14.00 +.11 .58a PetrbrsA 39.00 +1.12 1.75e Petrobrs 44.81 +1.22 .76f Pfizer 26.15 -.12 1.00 PhelpD 101.41 -.32 .92f PledNGs 22.95 -.09 .89a PimrncoStrat .20 PioNtr 1.24f PitnyBw .10 PlacerD ... PlalnsEx ... PlaytxPd 1.52f PlumCrk 25 PogoPd 1.80 PostPrp .721 Praxair .12 PrecCast .08 Premcort ... Prestige n ... Pridelnt .55 PrinFncl 1.00 ProctG s 2.36 ProgrssEn .12 ProgCp 1.48f1 Prologsle 11.62 +.12 44.12 +1.40 45.08 -.04 15.93 -.29 36.66 +1.76 u9.65 +.65 35.60 -.10 49.93 +.69 31.04 47.64 -.22 76.00 -1.01 u64.00 +4.32 17.49 -.16 25.30 +.46 38.11 -.38 52.61 -.39 42.14 +.19 90.35 -1.41 37.44 +.34 .33 ProsStHiln 3.50 +.03 ... Providian 16.76 -.40 .63f Prudenti 57.11 -.29 2.241 PSEG 54.43 +.04 1.00 PugetEngy 22.03 -.01 .20 PuteHm 74.25 +.62 .38 PHYM 6.66 -.01 .60 PIGM 9.36 +.09 .47a PPrfT 6.30 .54 Quanex s 54.00 +.68 .72f QstDlag u105.01 -.12 ... QwestCm 3.64 -.06 .60 RPM 18.25 -.03 .08a Radian 47.30 -.44 .25 RadioShk 24.42 -.08 1,00e Ralcorp 46.77 -.58 .08 RangeRsc 24.26 +.90 .32 RJamesFn 30.25 -.05 2.48f Rayonler 49.54 +.01 .88f Raytheon 38.96 +.26 1.33 Ritylncos 22.78 -.10 .30 Reebok 44.21 -.09 1.36f ReglonsFn 32.33 -.07 '... RellanlEn 11.29 -.09 .601f RenalsRe d47.08 +.38 .588 Repsol 26.79 +.24 .48 RepubSv 33.58 +.10 ... RetailVent 9.47 +.36 Revlon 2.87 -.01 3.80 ReynldsAm 79.98 -.61 ... RteAld 3.92 -.04 .28f RobHtH4 26.22 -.74 .66 RockwlAut 56.56 -.08 1.00 RoHaas 47.50 -.50 .25e Rowan 30.66 +.73 .52 RylCarb 44.27 -.42 2.26e RoylDut 60.06 +.02 t.62e Royce 18.92 -.06 .05 RubyTues 24.57 +.2 .20 RyersTull 12.56 -.11 .24 Ryands 62.93 +.91 240 SAPAG 39.71 -.37 1.29 SBCCom 23.66 -.03 1.56f SCANA 3825 +.03 .68e SKTlcm 19.60 -.12 .76 SLMCp 49.10 -.74 .12e STMicro 16.57 -.09 .36f SabreHold 22.02 +.14 ... Safeway 18.26 -.27 .56 StJoe 67.98 +.68 ... SUudes 35.06 -.94 .88 StPaulTrav 35.36-1.37 ... Saks u18.60 +.55 1.65a SalEMInc2 15.54 +.26 .14e SalmSBF 12.58 -.07 2.74e SJuanB 36.96 +.92 .61e Sanofi 42.10 -24 .79 SaraLee 22.01 -.15 .22 SchergPI 17.89 -26 .84f Schlmb 71.62 +1.14 .08 Schwab 10.45 -.06 .04 SciAtaenta 28.37 +.15 1.54. ScottPw 30.98 -22 .32f SeagateT 19.40 -.15 ... SealAir 52.03 +.09 1.16f SempraEn 40.04 +.20 .60 Senslent 21.10 -.46 .10 SvceCp 7.30 -.18 ... ShawGp 22.17 +.37 ShopKo 22.18 -.04 2.20f Shurgard 40.29 -.69 3.05e SiderNacs 24.35 +.25\ ... SierrPac 10.72 -.03 ... SilcnGph 1.17 -.02 2.801 SimonProp 60.26 -.32 ... SixFlags 4.02 -.10 .64 SmlthAO 28.48 -.39 .48 Smithlnn 63.43 +.70 ,. SmIlthfF 31.78 +.23 ... Solectm 3.50 +.03 .24e SonyCp 39.33 -.69 1.43 SouthnCo 31.95 +.12 .02 SwstAdr 14.00 -.24 ... SwnEnrg 59.61 +2.85 .16f SovrgnBcp 22.09 -.07 Spectrast 58.54 +.57 .76 SpiritFnn d10.91 +.05 .50 SpmIFON 22.74 -.01 .32 StdPac 74.20 +2.01 .84 Standex 27.20 -.10 .84 StaIwdmH 59.40 -.63 .68 StateStr 43.35 -.37 Steris 24.55 -.70 StorTch 30.09 -.71 ... sTGoldn 42.62 -.20 .09 Strykers 44.15 -.46 .40 SturmR d6.76 -.17 2.52f SunCmts 35.62 -.18 .24 Suncorg u41.50 +1.29 SunGard 34.48 -.02 1.601f Sunoco u107.55 +4.03 2.201 SunTrst 70.90 -1.17 .62 Superind 25.98 -.43 Sybase 18.75 +.29 .02 SymbIT 14.37 -.12 .73f Synovus 27.63 -.23 .60 Sysco 35.48 -.32 .85f TCFFnds 27.12 -.03 .80 TD Bknorth 31.12 -.12 .76 TECO 15.89 +.21 .18 TJX 24,22 -.41 2.25 TXUCorp u80.81 +1.18 4.06 TXU pfD 66.20 +.60 .09e TaiwSemi 8.56 +.08 .30 Talsmrgs 35.11 +.96 .32 Target 49.40 -.62 .24 Tekronx d23.78 -.75 .73e TelNorL 15.65 +.18 1.20e TelMexL 34.43 -.10 ... TelspCel 5.95 -.03 1.801 Templelnl 73.17 +.62 .... TempurP 18.85 +.19 TenetHIt 11.57 +.04 2.65 Teppco 43.79 +1.79 Teradyn 14.29 -.31 Terra 7,82 +.06 2.15e TerraNitro 24.33 -.62 .. Tesoro u40.36 +3.34 ... TetraTech 29.38 +.94 .10 Tex nst 24.96 -.53 1.40 Textron 75.58 +.96 ... Theragen 3.37 -.07 ... ThermoB 25.00 -.29 ... ThmBet 32.40 +.10 1.681 3MCo 85.12 -.57 .60 Tiwtr 39.42 +.56 .24 Tiffany 33.69 -.83 ... TimeWam 17.45 -.10 .601 Tmnken 26.99 -.35 ... TtanCp 18.53 +.37 .40 ToddShp 19.00 +.08 ... TollBros 80.24 +1.39 THIlfgr 11.65 -.05 .73e TorchEn 7.98 +.12 .44 Trchmrk 51.45 -.75 1.601 TorDBkg 41.09 -.26 3.53 Total SA 117.67 +.44 .16 TotalSys 24.68 -.31 1.72 TwnCtry 26.48 +.03 ... ToyRU 25.83 +.07 ... Transocn u53.23+1.77 .16 Tredgar 16.75 -.11 .20f Tdrionl 17.69 -.11 ... TadH U49.79 -.31 .48 Tribune 39.19 -.68 .. .40 Tycolni 33.46 -.365 .16 Tyson 16.53 -.15 2.88 UILHold 50.79 +.14 .55 USEC 16.25 -03 ... vUSG 31.63-153, 2.201 USTInc 50.86 -P34 .15 UnlFirst 40.98 -'06 1.42e Unilever 39.60 401 ' 1.20 UnlonPac u68.66 -1.04 - ... Unisys 6.90 -6.1;'A .13p UDefnse 73.50 +.06ri 1.17 UDomR 20.85 -.02IA .32t UtdMcro 3.33 -.04&S 1.32f UPSB 71.90 -.84sT ... UtdRentl 19.86 -.35,', 1.20 USBancrp 28.60 -.32' .321 USSteel 51.18 +.33.., 1.76f UtdTech 100.94 -.7'-, .03 UtdhlthGp 95.83 +.415. .. Univsln 27.62 -.07 .80 Unocal u64.35 +2.66 .30 UnumProv 16.68 -.34 .31 ValeantPh 22.57 +06 .32 ValeroEs u77.76 44 1' .18p ValorCmn d14.47 .36 VKHilncT 3.67 +.01" ... VarlanMs 33.44 -.84'. 1.18 Vecroen 26.54 -.10", 1.621 VerizonCm 35.19 -.31.. .28 ViacomB 34.87 +.04' U .. VimpelCs 34.30 -.12jd .20 VintgPt 32.72 +1.2865 .. Vishay 12.35 -.08., Visleon 5.69 -.02,. .55e Vodafone 26.34 -.22j .19 WHolds 10.05 -.02cr .18 Wabash 24.33 -.07; 1.84 WacMova 50.34-.5, .60f WalMart d48.99 -1.1 - .21 Walgm 43.71 -.71 .16 Waltednd 42.79 4 1.84f WAMui 39.34 .80f WsteMInc 28.92 +.07 Waters 35.84 +.05V' WasonPh 30.60 -.13f Weathfint 58.98 +1.044' .20 Wellmn 13.95 -.519K" .. WellPoint 124:65 0-'r 1.92 WellsFrgo 59.43 -37 * .54f Wendys 39.15 I -. Wescolntl 30.74 +2.74 .92 WestarEn 21.56 -.08' .82a WAstTIP2 13.20 +.0853 WDIgll u12.90 +.1A.ci 1.60 Weyerh 68.45 -.05aj 1.72 Whripl 66.87 -.86:T 1.52e WlMmCS 16.47 +.19.IT .20 WmsCos 19.06 +.25r.T .. WmsSon 36.04 -.71n. .86f WillisGp 37.01 +.14r5, .28 Winnbgo 31,52 -0!,, .88f WscEn 35.44 -.06. .681 Worthgtn *0 ... WfightExn .3 ) 0 1.12 Wrigley 64.50 -1.07'" .92 Wyeth 41.69 -.49 2.00f XLCap 71.65 -.7Z .20 XTOEgys 34.59 +1.75 .83 XcelEngy 17.23 +.056" ... Xerox 14.97 -.11f .25 YankCdl 31.55 -.15f .40 YumBrds 5120 -.61'- ... imer 7467-3.14.-. .55 Zwelgfn 5.20 +.04.- IAMERI AN T CK E C AN E1: 1 Div Name Last Chg .42 AbdAsPac 6.17 +.11 ..Ableauctn .57 -.01 .. Abraxas u3.03 +.19 .301 AdmRns 20.80 -.05 .. AdvPhot 2.59 +.22 Adventrxn 1.65 -.04 .. ApexSIIv 15.84 -.18 .11e Arhyth 17.98 +.73 ...Avitar .09 -.01 .. BemaGold 2.63 -.05 .04e BiotechT 139.42 -1.37 CGIHIdgn d3.95 -.55 ... CVDEqp u4.60 -.65 ... CalypteBn .28 +.01 ... CanArqon 1.38 +.07 ... CelsonCp d.32 -.02 ... Chenlere 65.95 +1.44 .28 ComSys 11.40 ... DHB nds 8.94 +.14 2.25e DJIADam 104.05 -.89 ... DSLneth d.13 ... .30r EZEM 11.65 -.27 ... EaqleBbnd .32 -.02 1.61 EVLtdDur 17.98 -.10 .30e Elswth 7.46 -.17 1.65 Evednco 14.11 -.11 .38a FTrVLDv 14.28 -.05 .60 FlaPUtI 18.80 ... GascoEnn 3.16 +.13 ... GoldStrg 2.92 +.05 ... GreyWolf 6.69 +.11 ... Gurunetn 18.96 +.21 ... Harken .53 +.04 .46e IShBrazil 23.20 +.42 .27e IShHK 11.44 -.07 .04e IShJapan 10.46 -.03 .10e Sh Kor 3220 +.39 .16e IShMalasia 6.74 -.05 .28e IShMex1co 24.25 +.12 .28e IShSin 7.17 -07 .08e IShTaowan 11.66 +.08 2.45e IShSP500 117.24 -.58 2.41e IShEmMkt 204.00 +1.20 1.30e IShSPBaG 56.15 -.35 1.25e IShSPBaV 60.60 -.35 4.01e ISh20TB 89.30 +.30 3.25e JSh7-01TB 83.58 +.17 1.81 e Sh1l-3B 80.73 +.05 2.418 IShEAFE 158.50 -.37 1.02e iShRusMid 78.61 -.13 ... IShNqBIo 63.00 -.55 1.54e iShR100OV 65.72 -.09 .758 iShMCBaG 133.57 -.36 .57e iShR100G 46.52 -.35 1.38e IShRuslOOO 63.15 -.32 3.13e iShR2000V 183.36 -.89 .22e iShR2000G 62.27 -.31 1.53e iShRs2000 121.64 -.51 1.83e0 ihMCBaV 127.13 -.10 5.12e IShREst 112.50 +.30 .420 iShHthcre 58.07 -.38 1.47e IShSPSml 158.11 -.74 .77e iShConsGd 52.08 -.37 1.55e IShSCBaV 117.79 -.18 .45e IShSCBaG 105.22 -.13 .. IMergentn 9.02 -.79 ... IntlgSys 2.39 +.07 ... IntrNAP .60 +.01 n... InntHTr 55.21 +.04 ... [vaxCps 19.91 +.14 ... KFXInc 13.91 +.51 ... LadThalFn .63 -.05 ... MadCatzg 1.65 +.03 ... Memmac 9.01 +.06 ... MetroHtn 2.25 ... Nabors u60.31 +1.17 ... NOrongn 2.83 -.07 ... NthgtMg 1.40 -.03 .48e OilSvHT 98.70 +255 ... On2Tech .63 -.01 ... OverhllFm 2.17 -.03 ... PalnCare 4.81 -.19 .. PaxsnC .62 -.07 1.92 PetrofdEg 14.96 +.34 1.68e PhmHTr 71.38 -.56 1.44 ProvETg .10.09 +.20 ... Provoln8 .06 ... Qnstakegn .23 4.48e RegBkHT 130.97 -1.28 ... Rentech 1.36 +.05 .94a RetaillT 94.13 -1.66 .180 SemiHTr 32.08 -.45 2.268 SPDR 117.38 -.58 1.04e SPMid 120.20 -.20 .52e SP Mats 30.07 -.09 .37e SPHFlhC 29.60 -.26 .37e SPCnSt 22.80 -.22 24e SPConsum 32.90 -.26 .538 SP Enav 43.93 +1.06 .658 SP Fnd 28.00 -.39 .42e SPInds 30.14 -.29 .42e SPTech 19.39 -.17 .90e SPUtil 29.25 +.10 ... Stonepath ... Tag-I TechFlav ... Telkonet ... Terremark ... TetonPet ... TransGIb .. Transmont ... UltraPtg 3.6le UlilHTr ... VaalcoE n ... Wstmind ... WheatRg 1.06 -.02 4.10 -1.10 ul.46 +.25 4.09 +.18 .61 -.04 3.65 +.14 6.62 +.21 8.08 +.08 52.85+2.05 103.38 +.61 3.95 +.12 24.51 -.64 3.57 +.02 NASDQ ATIOALMRE Dlv Name Last Chg .. ACMoore 26.10 -.56 ... ADCTel 2.01 +.02 ... ASETst 5.11 +.03 .. ASMLHlI 16.38 -.39 .. ATITech 17.32 +.03 .. ATMI Inc 24.37 -.67 ATSMed 3.63 -.02 .. AVIBio 2.45 -.05 .. Aastrom 2.11 +.03 .. Abgenix d6.86 -.14 .. AbleEnr 10.45 -.54 AccHme 36.17 -.06 .. Accredo u4423 -.18 .. Acaivins 15.42 +.62 .20f Acxomrn 20.63 -.30 .. Adaptec 4.62 -.17 .05 AdobeSy 66.76 -.41 .32 Adtran 17.69 +.05 .. AdvEnId 9.70 +.03 .. AdvNeuro 27.76 +.95 .38 Advanta 21.30 +.50 .45 AdvantB 23.30 +.30 .. Aeroflex 9.05 -.28 .. Atfymet 42.30 -.51 .. AglleSft 7.20 -.08 AirspanNet 5.05 -.06 AkanaT 12.51 -.22 1.448 Akzo u45.85 -.13 ... Alamosa 11.70 +.03 .80f AlaskCom 10.00 -.05 .. Alderwds 12.70 +.26 .20 Aldia s 17.60 +.70 .. AlignTch d5.89 -.35 .. Akermn 10.01 -.37 .. Alloylnc 555 -.33 .. AIIscdpts 13.95 -.35 ... AllrNano 3.58 +.01 .. AllraCp 19.35 -.43 ... Alths 23.97 +.12 Alvarlon 9.64 +.08 Amazon 34.01 -.26 .. Arnedlsy 28.93 -1.32 AmOnLA .13 -.01 ... AmrBowt .46 2.92 AmCapStr 31.62 +.21 .20f AEagleOs u28.75 -.80 .. ArMeds 16.70 -.48 .40 APwCnv U25.76 -.39 .. AmrTrde 10.20 -.01 Amgen 57.35 -.80 .. AmkorT 3.92 +.06 ... Anylln 17.37 -.12 .. Anadigc d1.45 +.01 .32 Anlogic 42.75 -.50 .. Analysts 3.75 +.13 .. AnlySur 2.28 -.02 .. Andrew 11.92 +.11 .. AndrxGp 22.43 -.24 .. Anglolch g 15.33 -.02 .. Antigncs 6.88 +.18 .. ApolloG 73.64 -.42 ... AleCa 40.89 -.78 .06 Appebeess 27.08 -.48 .. ApplDgIrgls 3.45 -.01 .. ApIldnov 3.43 '.02 .12 AoldMall 16.01 -.24 .. AMCC 323 -.05 .. aQuantive 10.97 -.04 1.20 AresCapn 16.67 +.27 .. Arbars 7.59 -.17 .48 ArkBest 38.10 +.32 .04e ArmHkd 5.84 -.16 .. Arotech 1.38 -.01 .. Aris 6.89 -.02 .. ArtTech 1.07 +.02 .. Atesyn 8.15 -.56 .. ArthroCr 28.54 +.04 ... AscentSoft 18.49 -.04 .. AskJvs 27.97 -.11 SAspectCrn 10.12 -.29 .. AspenTc 5.60 -.08 1.00 AsdBnSO 31.09 -.14 ... Atar 3.10 -.06 .. AthG3nc 13.05 -.04 ... Atheros 10.17 -.10 ... Atmel 2,94 -.01 .. AudCodes 11.33 +.07 .. Audvox 12.56 -.18 .031J Autdsks 30.11 +.35 .. Avanex 1.30 .. AvoctCp 25.40 -.26 .. Aware 4.40 +.04 ,. Axcells 7.12 -.18 ... Axonyx 1.25 +.02 ... BEASys 7.89 -.08 BallardPw 5.10 -.07 .01e BnkUtd 26.93 +.07 BeaconP .94 -.09 .. BeacnRfn 21.83 -.06 ... BeasleyB 17.68 -.10 .. BebeStss 33.13 -.82 .. BedBath 36.40 -.14 .. Bloenvlsn 5.58 -.17 .. Blogenild 34.74 +.23 ... BioMadn 4.88 -.27 .200 Blomet 35.75 -.55 ... Bomira 1.91 +.05 ... Bopure .32 -.01 ... BluDolp 2.95 +.22 .48 BobEvn 22.99 -.47 Bookham 2.76 -.43 Borland 8.03 -.09 ... BosnCom 7.10 -.02 ... Brdcom 29.49 -.43 SBroadwng 4.14 ... BrodeCm 5.88 -.04 ... BmoksAul 14.81 -.37 .06e BucyrsAn 37.47 -1.59 ... BusObj 27.31 +.42 ... C-COR d5.90 -.18 .48 CBRLGtp 41.18 -.12 .36f CDWCorp 56.39 -.29 .60 CHRRobn 51.22 -.31, ... CMGI 1.98 -.07 ... CNET 9.56 +.12 ... CSGSys 16.05 -.24 ... CTI Mole 20.43 +.16 .. CUNO 51.79 +.40 ... CVThera 20.22 -.14 ... CabotMic 31.60 +.22 .. Caches 13.54 -.01 ... CalDIve 46.19 +.89 .76 CapCtyBk 38.97-1.54 ... CpsnTi 1.45 -.10 ... CardhcSci 1.11 -.04 ... Cardima d.27 -.04 .. CareerEd 33.46 -.80 ... CarrAcc 6.15 +.19 Cantzo u17.90 +.91 ... CasualMal 6.79 +.30 ... Celgenes 33.76 -.29 ... CellGens 4.65 +.12 ... CelrThera d3.55 -.04 ... Cephin 46.02 -.61 ... Ceradynes 22.30 -.07 ... Comer u51.95 -.56 ... ChariRsse 12.74 -.18 ... ChartCm 1.53 -.07 ... Chattem u46.01 +.54 ... ChkPoInt 21.84 +.10 ... ChkFree 40.00 -.76 ... Checker 13.06 -.15 ... Cheesecks 34.97 -.48 .. ChldPIc 46.63 -1.12 ..chndtem 3.04 -.10 ... ChlpMOS 6.72 +.30 ... Chiron 35.05 -.01 ... Chordntlf d1.58 -.09 .50 ChrchllD 39.65 +.06 ... ClenaCp 1.70 -.02 1.221 CInnFln 43.29 -.32 .32f CIntaS 41.17 -.14 ... Cilus 4.30 -.22 ... co 17.70 -.19 ... CtliSy 23.20 -.62 CleanH 18.73 +.39 .32 Cognex 25.14 +26 ... CogTechs 45.96 -.24 ... Cognosg 43.09 +1.34 ... Comarco 8.55 -.10 ... ComnaMt 33.9 -.39 ... Comsop 33.13 -.31 1.40f CompsBc 45.21 -.19 ... Compuwre 7.07 -.13 ... Comtech u51.84 -26 ... Comvers 24.93 -.29 ... ConcCm 1.96 -.10 ... Conexant 1.45 -.05 ... Conmed 29.61 -.51 ... Connetics 25.00 -.29 .. ConorMdn 15.40 -.89 Corgentch 2.40 +.08 ... Corillian 3.28 -.20 ... CodnthC 15.66 -.06 ... CodxaCp .d2.90 -.17 .40 CoStco 43.79 -.39 .. Crayinc 2.49 -.06 .50e CreTcLtd 9.55 -.15 ... CredSys 7.91 ... Cree nc 21.30 -.45 ... Creolnc 16.11 +.05 -... Cruicell 14.20 +1.15 .20 Cryptgc 31.38 +.40 ... CubistPh 10.29 -.33 ... CuraGen 4.02 -.14 ... CurHIth 3.48 +.08 .. Curls- 3.69 +.11 ... Cyberonic 42.51 -1.66 ... Cymer 27.23 +.46 ... Cytogenrs 5.58 -.21 .. Cytyc 23.03 +.02 ... DRDGOLD .87 -.05 ... DSPGp 26.18 -.58 ... Danka 1.65 +.05 ... DayStar 7.15 +45 ... deodGenet 5.55 -.15 ... Delcath 2.10 -.24 ., DelIlnc 38.03 -,39 .. Dndreon d5.17 -5 .24 Dentsply 53.76 -.65 ... Dgimpc 3.46 +.02 ... DIgLght .93 +.14 ... DIgRiver 31.02 -.14 ... DIgltas 9.94 -.16 .16 DIrectGen 19.59 -.95 ... DscvLabs 5.63 .. DlstEnSy 3.65 +.25 .. DobsonCm 1.97 -.05 ... DIrTree 2.33 -.40 ... DomlnHm d16.80 -.13 ... DotHill 5.90 -.05 ... DbleCick 7.58 -.12 ... drugstm 2.47 -.11 ... DynMat 34.60 -.62 ... E-loan 2.70 +.05 ... eBays 37.07 -.19 ... EGLInc 22.48 -.32 ... eResrch 11.66 -.12 ... ErthUnk 8.99 -.01 .20 EsrWSIBs 36.09 -.83 ... EasyLnk d1.02 +.02 1.000 EchoStar 29.29 +.04 ... Eclpsys 15.19 -.29 ... EducMgt 28.10 +.15 .121 EduDv 10.43 -.07 ... Eldos 1.18 +.01 ... ElectSc 18.75 -.64 ... Ectrgls 4.00 +.05 ... ElectArts 51.92 +.14 ... ElecBtq 42.07 -.90 .. tekLtd 3.87 -.45 ... EmmsC 19.17 -.05 ... EncrMed 4.95 -.43 ... EncysiveP 10.25 +.03 ... EndoPhrm 21.76 -.79 ... EngyConv u24.22 +1.49 ... Entegris 9.65 -.24 1.80f Entea gs u22.90 +2.77 ... EntreMd 2.25 +.15 ... EnzonPhar d10.09 -.10 ... EonLabs s 30.25 +,01 ... Epiphany 3.40 -.15 ... EpixPhar 6.90 -.10 .36e EricsnTI 28.15 -.05 ... eSpeed 9.02 -.18 ... EvrgrSIr u7.45 +.38 .22 Expdinll 52.86 -.69 ... ExpScript 85.42 -1.77 ... ExINetw 5.91 +.02 ... Eyetech 26.75 -.75 ... F5Netw 50.28 -.21 .56f FFLCBcp 41.18 -.24 ... FURSyss 30.60 +.30 ... FalconStor 5.84 -.13 Fastdcckln 12.00 .62f Fastanal 55.40 +.10 ... Reldlnvn d14.58 +.06 1.40 RfthThird 42.85 -.13 ... ileNet 22.36 -.42 ... Rnisar 1.23 -.02 .10 RnUnes 22.77 -.38 ... FrstHzn 16.62 -.26 .36f FstNlagara 12.86 -.35 1.08 FstMerit 26.33 -.43 ... Fsemr 39.50 -.30 ... Flextm 11.90 -.14 ... Flowint u6.29 +.27 ... FLYi 1.28 +.01 ... FormFac 23.30 +.66 ... Forward 12.65 -.34 ... Fossils 25.21 -.72 .. Foundry 9.79 -.11 .08 Fredsinc 16.74 -.43 ... FmtrAIr 10.05 -.43 ... FuelCell 9.84 -.14 ... Ftmdia .37 -.01 .50 Garmin 45.00 -1.32 ... Gemstar 4.40 +.05 ... GenProbe 43.90 -.66 ... GeneLTc .55 -.05 ... GenesisH u43.47 +.58 ... GenesMcr 14.49 +.04 ... Genta d1.03 -.10 .68 Gentex 31.53 -.37 ... Gentiva 15.87 -.31 .. Genzyme 55.99 -1.25 ... Geores 9.69 -.06 ... GeronCp 5.93 -.18 ... GigaTr 4.28 +.19 ... GieadScis 35,33 -.47 ... Globlind 9.56 +.16 ... Goolen 180.04 -.47 ... GrWlfResn 24.51 -.44 .601 GrtrBay d23.97 -.44 .03e GipoFPn 7.75 +.21 ... GuiltfrdPh 2.28 L.02 ... GultarC 54.08 -.75 ... Gymbree 12.51 -.03 .88 HMN Fn 30.75 -.25 ... Hansen u58.77 -1.18 .80f HarbrFL 33.78 -.32 ... Harmonic 9.55 -.01 .. Headwatrs 32.74 -.08 ... HSchelns 35.74 -.10 ... HIvwdE 13.27 +.10 .. Hologic 32.03 +.16 ... HomeStore 2.14 -.08 ... HiznOff .42 +.02 ... HotTopic 21.72 -.13 ... HumGen 9.29 +.07 .48f HuntJB 43.69 -.08 .80 HuntBnk 23.34 -.56 .. HutchT 34.93 +.15 ... Hydrgcs 4.40 +.05 ... HyperSolu 44.44 +.33 I-Many 1.51 -.08 ... IACinterac 22.15 -.12 ... ICOS 22.01 -.45 ... IMPAC 24.11 +28 ... IPIXCp 2.58 -.32 .. IPass 6.08 -.04 ... Identlx 4.99 -.06 Illumlna 8.07 -.01 ... ImaxCp 9.20 -.04 ... Imclone 34.75 +.25 ... Immucors 29.81 -.38 ImpaxLab 16.15 +.15 ... InPhonic n 22.52 -.20 ... Inamed 70.56 +.68 .. Incyte 6.70 -.13 1.504 IndpCmry 38.90 -,10 ... Indusint 2.45 +.01 ... InfoSpce 41.03 +.20 ... InFocus 5.72 -.02 ... Informat 8.26 -.01 ... InslghtCm 11.92 +.07 ... InspPhar 8.13 -.03 .. Instnet 5.98 +.10 ... IntegCirc 18.96 -.16 ... IntgDv 11.73 -.30 .32 Intel 23.01 -.22 ... IntaliDta .37 +.08 ... Intellsync 3.62 -.04 .32f InterTel 24.14 -.36 ...InterDIg 15.69 +.37 ... InterMune 10.75 -.25 .06 IntlSpdw 54.76 +.51 ..ItrntCp rs 6.72 -.30 .. IntntSec 18.38 +.08 .16 Intersil 17.08 -.24 ... Interwovn 7.84 +.05 ... Inlrawre d.54 -.12 ... Intui 43.10 -.67 ... IntSurg 46.79 +1.32 .07 InvFnSv 49.04 +.13 ... nvitrogn 67.64 -1.56 ... Isonics 2.46 ... Itron 29.82 +.18 ... IvanhoeEn 2.85 +.09 ... IxysCp u11.69 +.25 .. j2Glob 34.38 +,07 ... JDASoft 13.25 -.79 JDS Uniph 1.61 -.06 .18f JackHenry 17.96 -.03 .. JkksPac 21.75 +.28 JetBlue 18.40 -.64 .45f JoyGblIs 34.26 -.80 JnprNtw 21.53 -.53 Jupilrmed 15.58 +.07 .48 KLATnc 45.25 -.76 KeryxBio 13.32 -.04 KnghtTrd 9.50 -.14 Komag 22.28 -.07 KopinCp d2.96 -.11 KosPhr 42.50 +.82 Kronos 51.07 -.04 Kullcke 6.01 -.28 ... Kyphon 25.14 -.03 LKQCp 19.81 -.26 .40f LSIInds 11.04 -.19 ... LTX d4.25 -.19 ... LaJollPh .65 -.05 .. LamRsch 28.46 -.40 ... LamarAdv 40.51 +.22 Landstars 31.91 -.84 ... Lasrscp 32.12 +.38 ... Lattice 5.13 -.24 Laureate 43.00 +21 ... Leve3 2.02 -.04 ... LexarMd 4.97 -.01 1.80t UbMIntAn 43.09 -.65 ... UfePH 43.16 -.68 UgandB If 5.68 -.05 ... Uncare u44.06 -.17 .401 UnearTch 37.77 -.54 LodgEnt 19.27 +.43 ookSmart .90 +.01 Loudeye 1.38 -.11 M-SysFD 21.88 -.16 1.60 MCIIncn 25.29 +39 ... MGIPhrs 24.48 -.79 ... MKSInst 15.71 -.17 MRVCm 3.14 -.09 ... MTRGam u12.31 -.09 .32 MTS 28.58 -.45 ... Macrmdla 32.85 -.65 ... Macrsn 22.67 -.12 .. ManhAssc 19.98 -.39 .24e Mannlch 19.90 +.35 ... Manugst dl1.59 -.09 ... MktAxesn 12.93 +1.76 ... Martek 56.76 -1.43 ... Marvelffs 37,68 -.66 ... MatixO d4.36 -.41 ... Mattson 8.26 +.32 .80 Maxim 40.14 -.73 ... MaxwnlT 8.97 -.20 ... McLeoA .18 +.00 ... McData 3.43 -.06 ... McDataA 3.60 -.17 ... Medlmun 23.83 +.02 ... Medarex 6.98 -.15 ... Mediacm 6.43 -.11 ... MedAct 18.45 -.45 ... MediCo 22.31 -.35 ... MentGr 13.45 -.25 .. Mercintr 46.80 -.58 ... MeritMed 11.88 -.11 ... MerixCp 11.30 +.09 ... MesaAir 6.91 -.09 .30 MetalMgs 25.96 +.28 .32 Methanx 19.15 -.28 ... Micrel 8.97 -.25 .28f Mlcrochp 25.29 -.72 ... Mcromse 4.63 +.10 .. MicroSemi 16.13 -.16 .32a Microsoft 24.12 -.05 ... MicroStr 55.27 +1.00 ... MII ll 1.99 -.08 ... MIIIPhar 8.26 -.16 ... Milllcomlnt 20.22 -.05 .. Mindspeed 2.14 -.09 ... Mlsoni 5.98 -.02 ... MissnRes 7.22 +.14 ., MobltyElec 7.19 +.20 .15 Molex 26.07 -.29 ... MnslrWw 26.05 +.04 .12 MovieGal 27.81 -.87 MuimGm 7.68 -.08 MyrladGn 17.65 -.74 NABIBIo 12.25 -.23 NETgear 15.21 +.12 NIl Hldg 57.27 -.23 NMS Cm 4.03 -.26 .. NPSPhm 12.28 -.34 NTLInc 62.93 -.74 NVE Corp 18.56 -.46 Napster 6.36 -.15 .11 NaraBcpa 14.85 +.80 .388 NasdO00Tr 36.20 -.37 .. Nasdaqn 10.46 -.25 Nastech 9.78 -.10 .20 Natinstru d24.64-2.42 .. Navarre 7.59 -.36 ... Navlgntint 15.02 +1.36 NelghCar 29.89 +.64 NektarTh 13.72 -.22 .08 NetBank d8.34 -.14 Net2Phn 1.57 -.04 Nstease 47.34 -.87 ... Nettlx 10.83 -.02 ... NetwkAp 27.25 -.41 Neurcrine 37.56 -.50 NextelC 28.50 +.08 NextlPrt u21.88 -.04 NhroMed 17.35 +.04 .20e Nob4tyH 20.56 -.34 .84 NorTrst 43.13 -.31 ... NhfldLb 10.93 -.32 ... NwtAIl 6.53 -.16 Novatel 21.10 +.20 NvtiWrs 10.55 -.20 Novell 6.12 +.16 Novsus 26.52 -.21 Noven 16.92 -.04 ... NuHoriz 7.02 -.13 ... NuanceC d2.80 -.12 .. Nuveorsm 6,72 +.22 ... Nvidla 23.53 -.23 ... OSIPhrm 40.82 -.52 ... OdysseyHI 11.40 -.36 ... OhioCas 22.95 -.03 OlympSti 17.95 +.07 ... OmniVisn 15.08 -.07 ... OnAssign 5.01 -.09 OnSmcnd 3.92 -.03 .. OnTrack 14.24 +1.20 ... OnlineRes 8.69 -.12 ... OnyxPh 30.26 -1.09 ... OnyxSftrs d2.43 -.20 OpenTxt 18.31 +.26 ... OpnwvSy 11.90 -.29 ... Opsware 5.12 -.04 ... OptwmalAg 18.04 -.13 .05 OptonCrs u13.65 -.08 ... optXprsn 15.98 -.21 Oracle 12.53 +.05 OraSure 7.40 +.04 ..Orthfx. 38.25 -.90 ... Orthlog 5.08 +.02 ... Oscent 2.19 -.15 1.12f OtterTall 24.94 -.10 Overstk 42.60 -.39 PECSol 12.90 +.32 .PFChng 58.32 -1.48 PMCSra 8.55 -.25 ... PSSWrd 12.26 +.89 .80a Paccar 71.65 -.74 ... Pacerlntl 23.80 -.09 PacSunwr 27.38 -.60 ... PacificNet 7.91 -.28 ... PainTher d4.84 -.24 ... PalmSrce 9.78 +.74 ... palmOne 25.14 -.24 ... PanASIv 15.58 -.28 ... PaneraBrd 56.19 -.34 .. ParPet 7.77 +.42 .. ParmTc 5.66 +.07 ... Pathmrk 6.27 -.04 Pattersons 49.75 -.20 .161 PattUTIS 25.81 +.79 .52 Paychex 32.23 -.59 ... PnnNGms 30.87 +1.49 ... Peregrine 1.56 +.09 ... Petrohawk u11.53 +1.05 .. PetDv 37.28 -.41 ... PtroqstE 6.76 +.12 .12 PetsMart 28.34 -.41 ... PhrmPdt u48.75 +.30 .. Phamnos d.58 -.05 ... Pharmlon 28.76 -.24 ,. Phazar 30.20 +1.00 ... PhotoMdv 2.72 +.03 ... Photon 19.00 -.06 .. Photdn 17.94 -.16 ... PinnSyst 5.60 +.01 ... Pxar u98.73 +1.18 ... Pxlwrks 8.03 -.12 ... Plexus 11.39 -.13 ... PlugPower 6.41 -.19 ... Polycom 16.76 -.19 .64 Popular s 24.25 -.07 ... PornPlayn 23.04 +.21 ... PortfRec 32.83 -1.20 ... Powrintg 21.11 +.22 ... Power-One 4.86 ... Powwav 7.64 -.10 ... PraecisP d.96 -.09 ... Prestek d7.45 -.27 .92 PriceTR 58.79 -.59 ..PrimusT 1.59 +.02 ... ProgPh 16.00 -.81 ... ProtDsg 15.63 -.36 ... PsycSol u45.08 -.92 ... QLT 12.67 -.19 ... Qlogic 40.32 -.18 .36f Quablom 35.55 -1.08 ... QuanFuel 4.8 +.25 .. QuestSftw 13.56 -.28 ... RFMIcD 5.13 -.09 RSASec 15.83 -.02 ROneD 14.88 +.13 ...Randance 2.46 -.05 Rambus 14.86 -.21 Randgolds 12.80 +.44 ... RealNwk 5.87 +.09 RedHat 12.16 +1.25 RedRobinIf 49.57 -1.34 Remec 5,33 +.05 ... RentACt 26.91 -.40" .44 RepBcp 13.24 -.30 ...RschMots 75.11 -1.31 ... ResConns 20.96 +.03 ... RestHrd 5.42 -.28 Retek 11.23 +.01 ... RgsNt 18.98 -.11 RitaMed 3.02 +.03 .20f RossStrs 28.10 -1.04 ... SlCorp d6.76 -.18 ... SBACom 8.87 -.27 .28 SCPPools 31.80 -.06 .20 SEIInv 35.67 -.49 .88 Safeco 47.73 -.98 ... SanDIsk 27.77 -.03 ... Sanrlna 5.06 -.16 ... Sapient 7.48 +.14 ScanSoft 3.60 -.12 .07 Schnitzer 34.21 +.48 ... SclGames 23.06 +.21 ... SeaChng 12.95 ... SearsHIdqsul35.39+2.22 ..SecureCmp 8.49 -.08 ... SeeBeyond 3.13 -.03 .76 Selctin 45.61 -.62 ... Semtech 17.68 -.19 ... Sepracor 55.78 -1.63 ... SerenaSft 23.30 -.46 ... Serolog 24.16 -.28 ... Shanda n 30.56 +.29 ... Shiplm 16.35 -.26 .17e ShIrePh 34.27 -.01 ... ShuflMsts 28.74 -.22 ... SlebelSvs 9.46 +.33 .761 SlgmAl 60.84 -.41 .. SlgmaTel 36.82 -.61 .. SgnatBk 26.59 +.08 ... SlIcnimg 10.03 -.03 .. SlcnLab 29.85 +.14 ... SST 3.58 -.14 ... SllcVIyB 43.49 -.57 .05r SIcnware 4.45 +.24 ... SlrStdg 11.44 -.14 .. SImclar 6.0 +2.40 .. SIna 32.97 +1.91 ... SidusS 5.56 -.06 ... SkllSoft d3.04 -.64 .88 SkyFncl 26.85 +.03 .12 SkyWest 18.24 -.35 ... SkywksSol 6.25 -.10 ... SrithMicro 4.50 -.39 SmurfStne 15.35 -.12 Sohu.cm 17.73 +.15. ... SonicCps 32.94 -.46 ... SncWall 4.99 -.10 .. Sonusn 4.19 -.05 .36 SouMoBc 15.85 .12 SwBcpTXsdl7.79 -.56 .25 Staples 30.45 -.98 ... StarSclen 5.32 +.03 ... Starbucks 51.26 -.40 ... STATS Chp 6.66 +.05 .40 StIDyna 34.40 -.05 ... SlemCells 3.15 .10 StewEnt 6.01 -.14 ... StottOffsh 8.12 +.24 ... StrchMb 2.16 -.06 .30 SunHydr u31.59 +1.53 ... SunMbro 4.05 +.01 ... SunOpta d4.90 -.20 SupTech .68 SuperGen 4.65 -.21 .92 FusqBnc 24.14 -.24 SwiftTm 22.19 +.05 ... Sycare 3.52 -.04 .. Symantecs 21.77 +.44 ... Symetlrc 10.81 -.28 Synaplcs 23.10 -.10 Synopsys 18.10 ... Synovse 10.06 +.08 ... SytroCp u13.62 +1.38 ... THQInc 27.85 -.29 .. TOCVitsion 9.42 -.05 .84 TOPTankn 18.62 +.07 ... TTTm 1.97 -.03 ... TTMTch 10.24 -.22 ... TakeTwo 38.98 -.12 ... TargGene .57 -.04 .. TASERs d10.42-1.58 ... TechData 37.13 +.07 Tegal 1.31 -.12 ... Tekelc 15.50 -.44 ... Telesys 15.34 +.09 ... TelwestGln 17.68 -.11 TelikInc d14.47 -.61 Tellabs 7.25 -.05 .. TesseraT 42.88 -.35 TetraTc 12.45 -.17 .22e TevaPh s 30.72 -.27 .40 TexReg s 30.18 +.07 .. ThrmWv d1.67 -.26 3Com 3.51 -.05 ... bcoSft 7.61 +.16 TWNTele 3.95 -.02 ... TIVoInc 5.24 +.07 .. TorRes 21.36 43.21 Tmsmeta 1.00 +.07 ... TmSwc 1.28 -.09 ... Travelo 54.49 +4.77 ... TrZetto 9.19 -.12 ... TrimbleN 33.69 -.12 ... TriQuint 3.26 -.12 .60 TrstNY d11.15 -.34 .80 Trnstmk 28.10 -.90 2477RealM 3.25 .. USXprss 16.90 +.55 USANAH 45.08 -2.22 .37 USF Corp 48.62 +.36 .. USIHldg 11.50 -.28 ... UTStrm 10.92 -.03 Ubiqum 6.86 +.16 ... UdOnIn 10.34 -.13 US Enr 5.87 -.11 ... UtdThrp 45.13 -.57 ... UtdGiblCm 9.30 -.16 .10 UnivFor 38.00 -.85 .. UrbnOuts 47.00 -.97 .. VCAAnts 20.02 -.21 ... ValueCIIck 10.35 -.26 Varian 37.00 -.89 ... VarianS 37.66 -.35 ... Vasogeng 4.03 -.02 Vastera 2,99, +.06 Veecolnst 14.87 -.18 .. Ventiv 23.07 +.07 ... Vedsign 27.92 -.78 Vertas 23.62 +.40 ... Verity 9.25 -.20 ... VersoTch .35 -.01 ...VertxPh 9.10 -.26 ... VlaNet .18 -.02 VaCelln 7.28 -.26 ViewptCp 2.67 -.13 Vignette 1.29 -.02 Visage d92.4 -.43 VionPhm 2.71 -.14 .. VstaCre 19.33 -1.01 ... Vitesse 2.61 -.04 ... WanRsn 11.03 +.30 .WashGnt 46.00 +1.01 .. WebMD 8.55 +.05 ... WebEx 21.46 -.13 ... webMeth 5.33 -.15 Websense 53.25 -.55 .14 WemerEnt 19.21 -.22 WWIreIss 38.15 +.19 .. Weteal 4.10 +.62 .76f WholeFd 100.32 -1.61 ... WidOats 10.17 -.46 WindRor 14.90 -.18 WrlssFac 6.11 -.14 Wrkstream 4.14 -.31 WrlghtM 22.98 -1.02 Wynn 66.04 -1.70 SXMSat 30.73 -.90 ... XOMA d.99 -.01 .20 X)linx 28.78 -.45 ... Xvbmaut d.24 -.16 Yahoos 34.28 +.3 .. YellowRd 59.69 +1.15 .. Youbet 5.90 +.04 ... ZebraTs 47.82 +.33 ... ZhoneTch 2.27 -.28 1.441 ZionBcp 68.27 -.75 ... ZixCorp 3.33 -.41 ... Zoran 10.31 -.04 10,984.46 9,708.40 Dow Jones Industrials 10,404.30 -99.46 -.95 -3.51 -.63 3,889.97 2,785.50 Dow Jones Transportation 3,686.61 -29.36 -.79 -2.93 +24.27 363.82 259.08 Dow Jones Utilities 360.30 +1.97 +.55 +7.57 +27.77 7,455.08 6,211,33 NYSEComposite 7,136.36 -31.17 -.43 -1.57 +6.83 1,539.14 1,150.74 Amex Index 1,462.91 +3.21 +.22 +1.99 +15.63 2,191.60 1,750,82 Nasdaq Composite 1,984.81 -14.42 -.72 -8.76 -3.52 1,229.11 1,060.72 S&P 500 1,172.92 -7.67 -.65 -3.22 +2.72 656.11 515.90 Russell 2000 611.55 -3.52 -.57 -6.14 +1.34 12,108.93 10,268.52 DJ Wilshire 5000 11,568.74 -69.54 -.60 -3.36 +3.27 Request slocKs or mutual funds by writing the Chronicle. Ann: Stock Requests, 1624 N. Meadowcrest Blvd., Crystal River. FL 34429: or phoning 563-5660. For stocks, include the name ol Ihe stock, its market and its licker symbol. For mutual lunds, 1isl the parent company and the exact name of Ihe fund. Yesterday Pvs Day Australia 1.2972 1.2923 Brazil 2.6570 2.6675 Britain 1.8807 1.8898 Canada 1.2156 1.2092 China 8.2765 8.2766 Euro .7749 .7717 Hong Kong 7.7988 7.7991 Hungary 191.41 190.38 India 43.620 43.620 Indnsia 9470.00 9465.00 Israel 4.3550 4.3580 Japan 107.61 107.18 Jordan .7075 .7075 Malaysia 3.7995 3.7995 Mexico 11.1680 11.1660 Pakistan 59.38 59.37 Poland 3.17 3.17 Russia 27.8050 27.8690 SDR .6620 .6580 Singapore 1.6507 1.6508 Slovak Rep 29.84 29.93 So. Africa 6.1960 6.223 I So. Korea 1017.50 1023.54 Sweden 7.1082 7.0686 Switzerind 1.2033 1.1960 Taiwan 31.34 31.47 U.A.E. 3.6724 3.6724 British pound expressed in U.S. dollars. All others sho r dollar In foreign currency. Yesterday Pvs Day , Prime Rate 5.75 5.75 Discount Rate 3.75 3.75 Federal Funds Rate 2.875 2.75 Treasuries 3-month 2.78 2.78 6-month 3.09 3.06 , 5-year 4.12 4.30 10-year 4.45 4.60 30-year 4.72 4.85 FUTURES * Exch Contract Settle Chg LI Sweel Crude NfYMX May05 5727 1.87. Corn CBOT May 05 212X/ i/4 Wheat CBOT May05 3221/2 --_82 Soybeans CBOT May05 614 -131/27 Cattle CME Jun 05 85.42 +.17, Pork Bellies CME May05 96.92 +.67, Suggr (world) NYBT May05 8.52 -.18 Orange Juice NYBT May05 99.95 +40 SPOT Yesterday Pvs Day Gold Itroyoz spot) $42590 $424 70 Silver (troy oz.,spot) $6.990 $6.933 Copper (pound) $1.49ib $1.45b NMER = New York Mercantile Exchange. CBOT = Chicago, Board of Trade. CMER = Chicago Mercantile Exchangeo. NCSE = New York Cotton, Sugar & Cocoa Exchange, NCTN = New York Cotton Exchange. . -1 1, Rl CITRUS COUNTY (FL) CHRoAICLE "UT A F- U 4-wk Na e NAV Chg %Rtn AAIP Invst: CapGr 42.63 -.21 -2.1 GFMA 15.01 +.04 0.0 G 26.97 +.13 -2.5 G nc 2120 -.12 -3.1 Ints 43.95 +.09 -2.9 PtnwyCn ... ... NA PthwyGr ... ... NA ShTrmBd 10.08 +.02 0.0 SmCoStk 24.47 -.04 -3.8 AIM Investments A: Agrsvp 10.05 -.06 -2.0 BalAp 24.88 -.09 -1.9 BasValAp31.76 -.14 -3.1 ChartAp 12.66 -.06 -2.8 Constp 21.95 -.11 -3.3 HYdAp 4.44 +.01 -2.4 InflGrow 20.24 +.02 -2.0 MdCpCEq 28.79 -.01 -1.5 MuBp 8.10 +.01 -0.4 PremEqty 9.69 -.05 -2.5 SelEqty 17.06 -.10 -3.0 Sumitl 10.75 -.02 -32 WeingAp 12.58 -.07 -22 AIM Investments B: CapDvB 16.61 -.07 -3.3 PremEqty 8.97 -.05 -2.6 AIM Investor Cl: Energy 33.50 +.72 -0.4 HitbSc 47.88 -.40 -3.6 SroGI p 11.74 -.07 -3.5 TotRtn 23.56 -.14 -2.7 Utl/ites 12.42 +.04 0.0 AIM/INVESCO Invstr: CdreStk 1022 -.10 -3.8 AM Funds: AjMig 9.79 ... +02 Advance Capital I: Balanc p n17.53 -.05 -1.9 Reatinen 9.99 +.02 -1.0 Alger Funds B: Sr(CapGrt4.19 -.01 -3.5 AllinceBern A: A GvlncA 728 +.02 -12 p 16.92 -.06 -22 GIlTchAp5222 -.18 -2.8 GrincAp 3.65 -.03 -3.4 SraCpGrA21.58 -.05 -5.6 AllinceBernm Adv: LgCpGrAd 17.37 -.18 -3.9 AllianceBem B: AniGvlncB 727 +.01 -1.4 CotpBdBp 12.19+.03 -1.8 GtiTchBt 14726 -.17 -2.9 GrowthBt21.64 -23 9-.0 SCpGrBt 1822 -.04 -6.6 USGovtBp6.99 +.01 -02 AllianceBern C: SCpGrCt 1826 -.05 -5.6 Allianz Funds A: RenalsA 24.53 -.17 -4.3 Allianz Funds C: GwthCt 16.74 -.19 -3.4 TargtCt 15.00 -.08 -4.0 AmSouth Fds CI : Value 16.49 -.13 -2.7 Amer Century Adv: EqGro pn21.80 -.06 -2.5 Amer Century Inv; Balanced n16.30 -.01 -1.6 Eqlncn 8.03 -.02 -1.8 Growth n 18.79 -.13 -2.7 Hjutagel n12.09 +.02 -1.3 IngGron 30.03 -.11 -2.5 Intpiscrn 13.30 +.08 -2.5 IniGrol n 8.96 ... -2.6 LfoScin 4.84 -.01 -2.6 NewOpprn520 -.02 -5.3 RealEstln23.19 -.05 -2.9 Select n 35.95 -.37 -3.5 Ultra n 27.79 -26 -3.7 Utiln 12.43 +.03 -0.4 Valuelnvn 724 -.07 -2.5. Amer Express A: Cal 5.17 ... -0.5 Discover 8.55 -.01 -3.1 DEI 11.02 -.02 -3.5 DivrBd 4.83 ... -0.5 DvOppA 7.17 ... -2.6 EqSel 12.46 -.06 -1.5 Growth 25.50 -.18 -2.6 HiYid 4.40 ... -0.6 Insr 5.40 +.01 -0.5 MgdAIlp 9.38 -.02 -2.4 Mas 5.35 +.01 -0.5 Mh 527 +.01 -0.5 Minn 5.27 +.01 -0.5 Mutualp 9.59 -.03 -2.3 NwD 22.96 -.10 -2.9 NY. 5.09 ... -0.5 Ohio 5.26 +.01 -0.3 PreMt 8.99 +.01 -2.6 Sel 8.59 +.02 -0.4 SDGovt 4.76 ... -0.1 Stock p 18.93 -.09 -2.5 TEBd 3.85 ... -0.5 Thdlntl 5.64 ... -2.6 ThdllntI 7.14 ...-3.0- Amer Express B: WVai: 10.11 -.03 -3.1 iDfli 21.73 -.09 -2.9 Amer Express Y: Nwdn ,23.07 -.11 -2.9 American Funds A: AFcvAp 17.67 -.15 -2.6 A=tAp 26.00 -.13 -2.0 BaAp. 17.56 -.10 -22 BopdAlp 13.38 +.01 -0.8 CapIBAp51.87 -.05 -1.9 CapWAp 19.42 -.04 -12 CapWGAp33.64-.13 -2.8 EupacAp35.53 -.10 -3.1 FdlnvAp 31.90 -.05 -22 Gwthp 26.81 -.07 -2.4 , cTrAp 1220 ... -2.6 IIIt p 18.12 -.03 -2.3 IlIdAp 13.56 +.01 -0.1 I1AAp 3020 -.15 -2.5 coAp 19.92 -.14 -3.3 rdA 32.71 +.10 -4.4 StpApl31.10 -.06 -3.4 ExA/p 12.40 +.01 -0.4 snhAp 30.00 -20 -2.8 American Funds B: BlBt 17.51 -.10 -22 qapB1t 51.87 -.05 -1.9 1thBt 26.01 -.07 -2.4 IrcoB t 18.03 -.03 -2.4 ItABt 30.10 -.14 -2.6 VfashBt 29.85 -20 -2.9 Akel Mutual Fds: Ai re 46.10 -29 -1.7 52.73 -27 -1.8 Amn Funds: 22.04 +.02 -1.6 p 28.49 -.16 -3.2 Baron Funds: Aselt 52.01 -.19 -2.7 Grpmwth 45.41 -.10 -2.7 Brnstein Fds: IDOur 1325 +.02 -0.5 rIvMu 14.04 +.01 -0.5 tM I lV 22.44 -.06 -2.8 nVal2 21.09 -.05 -2.8 BickRockA: AroraA 39.01 -.13 -2.6 Lpgacy 12.79 -.07 -22 Biamwell Funds: Growth p 1926 -.13 -2.6 Bfndywine Fds: Bnmdywn n27.47 ... -2.7 Bfnson Funds Y: IYdYn 725 ... -2.7 CGM Funds: qap n 30.70 +.34 -5.8 Utn 27.02 +28 -3.2 Clamos Funds: qr&IncAp 29.42 +.02.-1.6 GrwthAp 49.72 -.18 -3.4 GrowthCt47.82 -.18 -35 C/alyert Group: lejosp 16.94 +.02 -0.5 IjtEqAp 18.77 -.02 -32 BCAI 10.33 ... -0.1 p 27.12 -.07 -1.4 S9d p 16.01 +.02 +0.2 "PU 10.58 ... +0.1 FLgp 16.54 +.01 -0.5 lFVT 15.79 +.01 -0.5 C&hen & Steers: CO lumbla Class A: Ctlumbia Class Z: SmalICo 20.80 -.09 -3.7 Columbia Funds: ReEsEqZ 24.80 -.08 -2.5 Dvis Funds A: YVenA 30.54 -.17 -2.9 Dsvie Funds B: N/Van B 29.25 -.17 -2.9 Dsvis Funds C & Y: en C 29.44 -.17 -2.9 "IWSAp 11.51 +.01 -0.3 DIiaware Invest B: delchB 3.31 ... -2.1 aelGrBt 1926 -21 -3.6 Dimensional Fds: .ItSmVan16.42 ... -0.8 LSLgVan19.99 -.07 -1.7 lSMicron14.03-.11 -4.6 S Smalln18.46 -.12 -4.0 SSmVa 25.98 -.12 -3.5 EmgMktnl6.73 +.11 -52 IVan 1628 -.03 -2.4 FARIE n21.31 -.03 -2.7 D dge&Cox: Balanced 78.43 -21 -12 Income 12.66 +.01 -0.7 li1Stk 31.13 -.06 -3.5 S tock 128.58 -.61 -1.6 Ujeyfus: Apr00 38.43 -23 -3.6 iscp 31.42 -21 -2.8 Preyl 9.84 -.07 -3.9 Dr5001nt 3425 -.22 -3.0 ElrmgLd 4329 -.02 -2.6 FLIntr 1320 +.01 -0.8 ZsMutn 17.74 +.02 -0.6 rValAr 28.07 -.15 -3.3 Dreyfus Founders: GrowthB n 9.72 -.09 -22 60 GrwthFpnl0.17 -.09 -2.1 Dreyfus Premier: Here are me 1 000 bti CoreEqAt 14.35 -.09 -3.8 h n. CorVivp 29.75 -.17 -2.7 .r" d'' ire lkid ran e F LdHYdAp7.37 +.01 -2.6 net Change as we511 a4. TxMgGCt 15.36 -.09 -3.9 TchGroA 21.02 -.15 -2.8 Tues: 4.wk iloal return Eaton Vance Cl A: Wed: 12-mro lot3l relur ChinaAp 13.95 +.02 -2.9 GwhA 6.79 -.04 -7.0 Thu: 3.yr currulative I. InBosA 6.40 +.01 -2.0 Fri: 5.yr curriulairve Ila SpEqtA 4.58 ... -4.4 MunBdl 10.64 ... -0.4 Name: Nama el T.mulua TradGvA 8.74 +.01 +07 NAV: Net ase .,lue Eaton Vance CI B: FLMBt 10.82 +.01 -0.6 Chg: Net cr..ange in pr HlthSBt 10.07 -.10 -4.1 Total return: Percerdnt NalMBt 10.34 +.02 -0.4 .d ,denrs reinve-led I Eaton Vance Cl C: GovtCp 7.53 +.01 +0.6 [1e'. NatMCt 9.85 +.02 -0.5 Data based on t'NA41 Evergreen B: BalanBt 8.27 -.03-2.2 Footnotes: B E,.-:. BluChpBt23.37 -.19 -3.1 qu.,e n No-ooad lurn DvrBdBt 14.83 +.03 -1.3 FoundB 16.54 -.05 -2`2 :o1 r ReCrmplhur MuBdBt. 7.43 +.01 -0.6 apply z rock d.ide' Evergreen dend NA N:, inorrm, CorBdl 10.57 +.02 -02 F o AdjRatel 9.36 +.01 +0.1 Fund 0des notl sw h t Evrgml 12.66 -.08 -3.3 dale Source: Upper, In Foundl 16.62 -.05 -2.1 SIMunil 9.99 +.01 -0.3 COTFAp11.97 +.01 -02 Excelsior Funds: CTT1FAp 11.04 +.01 -0.1 Energy 22.82 +.48 -1.5 CvtScAp 15.65 -.07 -2.0 HlYieldp 4.67 ... -2.0 DbITFA 11.91 +.01 -0.2 VaRestr 41.34 -.06 -3.5 DynTchA 22.55 -.17 -3.1 FPA Funds: EqlncAp 20.39 -.07 -2.9 Nwlncx 11.10 -.09 -0.1 Fedlntp 11.39 +.02 -0.6 Federated A: FedTFA px 12.07 -.04 -0.2 AmLdrA 24.30 -.16 -2.8 FLTFAp 11.92 +.01 -0.1 CapApA 24.70 -.16 -3.1 GATFA p 12.07 +.01 -02 MidGrStA30.11 +.01 -2.3 GokldPrM A17.90 +.08 -2.6 MuSecA 10.66 +.01 -0.5 GrwthA p 33.03 -.14 -1.2 Federated B: HYTFA p 10.75 +.01 0.0 StrlncB 8.66.+.02 -1.9 IncomA px 2.43 -.02 -2.3 Federated InstI: InsTFAp 12,31 +.01 -0.3 Kaufmn 5.15 -.02 -3.0 NYiTFp 10.93 +.01 -0.6 Fidelity Adv Foc T: LATFAp 11.59 +.01 -0.2 HItCarT 19.86 -.12 -1.5 LMGvScA 10.05 +.01 -0.3 NatResT 37.52 +.67 -1.0 MDTFA p11.72 +.01 -0.2 Fidelity Advisor I: MATFA p 11.92 +.02 0.0 EqGrin 45.79 -.35 -3.3 MITFAp 12.25 +.01 -0.3 Eqlnin 28.18 -.21 -3.2 MNInsA 12.12 +.01 -0.4 IntBdIn 10.98 +.01 -0.5 MOTFAp 12.23 +.01 -0.3 Fidelity Advisor T: NJTFAp 12.09 +.01 -0.1 BalancT 15.97-.07-1.9 NYInsAp11.61 +-0 - DivGrTp 11.08 -.13 -3.9 NYTFApx11.82 -.04 -02 DynCAT p13.05 -.07 -2.9 NCTFAp 12.27 +.01 -0.3 EqGrTp 43.50 -.34 -3.3 OhiolAp 12.53 +.01 -0.4 EqlnT 27.83 -.20 -3.2 ORTFA p 11.81 +.02 -0.2 GovlnT 10.00 +.02 0.0 PATFAp 10.41 +.01 -0.2 GrOppT 29.37 -.24 -3.2 ReEScA p 24.93 -.07 -2.6 HiiAdTp 9.76 ... -2.5 RsDvA p 30,93 -.42 -3.5 IntBdT 10.97 +.02 -0.4 SMCpGrA32.72 -.17 -4.1 MidCpT p 23.72 -09 -23 USGovA px 6.56-.02 0.0 MulncTp 13.03 +.01 -0.5 UisAp 11.23 +.02 +0.3 OvrseasT 17.45 -.01 3.3 VATFAp 11.84 +201 -0.1 STFiT 9.46 +01 -0.1 Frank/Temp Frnk B: Fidelity Freedom: IncomB1 px2.43 -.02 -2.3 FF2010n 13.42 -.03 -1.6 IncomeBtx2.43 -.01 -2.0 FF2020 n 13.67 -.04 -2.3 Frank/Temp Frnk C: FF2030n 13.76 -.05 -2.5 IncomCtx 2.45 -.01 -1.9 Fidelity Invest: Frank/Tremp Mtt A&B: AggrGrrn15.20 -.08 -2.9 QualfdAt 19.31 -.02 -1.5 AMgrxn 15.69 -.16 -2.3 SharesA 22.96 -.02 -1.3 AMgrGrn 1424 -.11 -3.1 Frank/Temp Temp A: AMgrInxn12.53 -.01 -1.2 DvMktAp19.08 +.23 -2.6 Balancxnl7.53 -.11 -2.7 ForgnAp 12.27 ... -2.6 BlueChGrn39.72-.33 -3.1 GIBdAp 10.77 -.02 -1.7 Canada n35.37 -.07 +0.7 GrwthA p 22.90 -.06 -2.2 CapApn 2473 -.09 -2.5 IntxEMp 14.90 -.01 -1.8 Cplncrn 8.30 +.01 -2.6 WoridAp 17.75 ... -2.8 ChinaRg n17.03 +.08 -2.5 Frank/Temp Tmp B&C: CngS n 394.76.-1.81 -1.4 DevMktC 18.73 +.22 -2.7 Contran 56.86 -.06 -1.7 ForgnCp 12.12 +.01 -2.7 CnvScx n20.70 -.09 -1.8 GE Elfun S&S: Destl 12.30 -.08 -3.0 S&S Inc 11.36 +.02 -0.5 Destll 10.85 -.11 -4.1 S&SPM 44.20 -.26 -2.5 DisEq n 2529 -.11 -2.7 GMO Trust II: DivIntln 28.71 +.03 -2.1 EmMkr 18.04 +.23 -4.9 DivGth n 26.96 -.32 -3.9 For 14.80 -.02 -2.5 EmrMk n 13.49 +.18 -5.0 GMO Trust IV: Eqlncxn50.73 -.53 -3.3 ErrMkt 18.00 +23 -4.9 EQIIxn 23.07 -.23 -3.3 Gabelli Funds: ECapAp 21.86 -.01 -3.9 Asset 41.10 -.12 -1.7 Europe 34.97 +.13 -2.2 Gartmore Fds D: Exch n 265.77-1.79 -2.7 Bond 9.64 +.02 -02 Exportn 19.17 -.18 -4.1 GvtBdD 10.26 +.02 +0.1 Fidelxn 29.14 -.28 -2.6 GrowthD 6.45 -.05 -3.3 Fifty rn 19.73 -.05 -2.3 NationwD 20.02 -.10 -2.5 FltRateHi rn9.97 ... 0.0 TxFrr 10.53 +.01 -0.4 FrinOne n24.60 -.10 -2.5 Goldman Sachs A: GNMAn 11.00 +.03 0.0 GrincA 24.80 -.04 -2.6 Govtinc n 10.15 +.02 0.0 SmCapA 40.34 -.13 -4.5 GroCon 52.48 -.40 -2.6 Guardian Funds: Grolncxsn36.89 -.38 -2.7 GBG InGrA 13.21-.02 -2.5 Grolncllxn9.39 -.10 -2.5 ParkAA 30.18 -.19 -3.0 Highlncirn 8.79 ... -2.6 Harbor Funds: Indepnn 17.20 -.06 -2.6 Bond 11.74 +.03 +0.1 IntBdn 10.36 +.01 -0.4- CapAplnst 26.91 -.19 -3.3 IntGovn 10.10 +.02 -02 Intfr 42.98 +.02 -2.7 IntlDiso n 28.16 +.05 -2.7 Hartford Fds A: IntISCprn24.74 +.14 -2.5 AdvrsAp 14.66 -.08 -3.0 InvvGBn 7.45 +.01 -0.4 CpAppAp 33.25 -.03 -4.0 Japann 12.59 -.05 -2.5 DivGthAp 18.59 -.08 -3.0 JpnSmn 12.57 -.06 -2.9 SmCoAp 16.04 ... -2.3 LatArn 21.87 +.19 -7.1 Hartford HLS IA: LevCoStkn23.90+.16 -1.7 Bond 11.92 +202 -0.4 LawPrn 39.74 -.12 -2.8 CapApp 51.96 -.06 -4.1 MagellnnlOO.20 -.80 -3.3 Div&Gr 20.55 -.09 -2.9 MidCap n 22.57 -.04 -2.7 Advisers 22.53 -.10 -2.8 MtgSecn 11.14 +.03 -0.1 Stock 44.21 -.360-4.0 NwMk rn13.63 -.03-3.3 Hartford HLS IB : NwMn 30.15 -... -3.1 CpApp p 51.69 -.06 -4.1 OTCn 32.36 -.19 -2.6 HollBalFdn15.33 -.01 -2.2 Ovrsean 34.80 -.04 -3.3 ISL Funds: PcBasn 19.86 +.12 -3.3 NoArnp 7.28 +.01 -0.1 Puritn xn 18.52 -.17 -2.4 JPMorgan Select: RealEn 27.77 -.03 -2.1 IntEq 29.45 -.05 -3.0 STBF n 8.90 ... -0.1 JPMorgan Sel Ci:- SmCapInd n19.47-.02 -2.8 CoreB n 10.72 +.03 -0.1 SmlCpS rn17.53-.11 -3.3 Janus : SEAslan 17.30 +28 -2.4 Balanced 20.74 -.09 -1.8 St cn 22.18 -.15 -3.4 Contrarian12.90 +.03 -2.6 S nn 10.46 -17 19.80-16-2.4 Trends 52.02 -.28 -3.0 Enterpr n 36.45 -.19 -2.5 USBIn 11.00 +.02 -0.3 FedTEn 6.95 ... -0.6 Utility xn 13.60 -.04 -0.9 FBndn 953 +.01 -0.7 VaSrat n34.9 -.2 -42 Fundtn 23.69 -20 -2.4 Valuen 71.64-7 .18-2 GIL eSci r n17.11-.13-1.4 Wrldwhn 127.87 -.06 -3.5 GIrechrn 9.94 -.05 -4.6 Fidelity Selects: Grohn 31.59 -.11 -2.6 Airsn 33.69 -.30 -0.1 Mercury 20.61 -.13 -2.0 Auto n n 32.61 +.01 -4.3 MdCpVaI 2213 -1 -12 Banking n36.71 -.33 -4.0 Olympun27.45 -.14 -1.2 Blotch n 47.93 47 -.47 -2.-0 1o2n nco-c4 .7 Brokrn 51.97 -.73 -5.7 Ovrseasr244 '+.08 -3.8 Chemdn 69.95 -.20 -2.9 ShTmBd 2.89 +.01 -0.1 Compn. 33.09 -.31 -3.9 Twenty 41.60 +.02 -1.7 Conlrdn 23.93 -.16 -24 Venturn 55.06 -.34-3.8 CstHon 42.96 +.11 -6.0 WddWr 41.01 -.14-1.7 DfAer n 6824 -.04 +0.3 JennlsonDrydenA: DvCm n 16.90 -.21 -4.1 eisanryd.3.n -A . ETnras 30 4144 -4 HoIldAp 5.73 ...-2.5 Eler n 37.05 -.45 -4.9 InsuredA 10.85 +.01 -0.7 Enrgyn 39.07 +.83-0.2 lityA 12.51 +.08 +1.8 EngSvn 50.18+1.11 +0.6 Looms SyA 2l +e 0 + Env/rn 1328 -02 -34 JennisonDryden B: Envn 107.86-1.5 1 -62 GrowthBS 12.34 -.09 -32 Food n 50.79 -.27 -19 I-YtdBt 572 ... -25 Goldrn 26.38 +.09 -22 InsuredB 10.87 +01 -07 Health n 125.83 -7 -1.4 Jensen 23.7 -.22 -2 HomFN n 55.12 -.5 2 7.3 9John Hancock A: IndMtn 39.95 -21 -22 BondAp 15.14 +.02 -0.5 Insurn 58.76-1.14-5.8 StRnAp 7.03 ... 02 Leisrn 73.61 -22 -2.8 John Hancock B: - Mne nO 47.54 -.24 -0.3 tncB 7.03A ... -0.1 MdEqSysn22.79-.16 --4 Julius Baer Funds: Muatedn 43.25 -.14 -1.8 InlEqA 31.87 +.18 -32 NtGasn 34.99 +.90 +1:2 -IslEqlr 32.43 +.18 -3.2 Paper n 30.85 ....-3.5 Legg Mason: Fd Phamsn 8.31 -.09 -3.6 OpporTr t 14.36 -.06 -29 Retalln 51.04 -.79 -2.1 Splnp 43.63 -.31 -2.4 Softwrn 46.60 -.07 -1.7 ValTrp 6027 -.38 .5 Teohn 55.34 -.41 -4.0 Legg Mason InstI: Tetcmn 33.93 -24 -3.1 ValTrlnst 66.63 -.41 -3.4 Trans n 41.44 -24 -2.0 Longleaf Partners: UtilGrn 40.00 -.02 -1.0 Pailners 30.97 -.01 -2.0 Wireleasn 5.67 -.01 -1.0 Intl 15.88 -.03 -0.3 Fidelity Spartan: Sm^ap 30.32 -.18 +0.1 CAMunn 12.42 +.02 -0.6 Loomis Sayles: CTMunrnll.52 +.01 -0.6 LSBondl 13.52 -.01 -1.2 Eqldxn 41.66 -27 -3.0 Lord Abbett A: 5001nrn 81.04 -.53 -3.0 AffliAp 14.28 -.09 -3.4 FLMurn 11.59 +.02-0.3 BdDebAp 7.92 ... -2.5 Govlnn 10.96 +.03 +0.1 GlincAp 7.38 -.01 -0.7 InvGrBdnlO.54 +.02 -0.4 MidCpAp22.02 -.06 -1.1 MDMurn10.91 +.01 -0.4 MFS Funds A: MAMunn12.01 +.02 -0.4 MITAp 16.87 -.14 -3.0 MIMunn 11.91 +.01 -0.4 MIGAp 11.73 -10 -3.1 MNMunn11.47 +.01 -0.5 EmGAp 29.99 -.12 -3.5 Munilncn 12.92 +.01 -0.4 GrOpAp 8.45 -.07 -3.1 NJMunrnll.59 +.02 -0.6 HilnAp 3.88 ... -3.0 NYMunn12.89 +.01 -0.6 MFLAp 10.10 +.01 -0.2 OhMunnll.80 +.01 -0.6 TotRAp 15.75 -.03 -1.6 PAMunrnlO.89 +.01 -0.4 ValueAp 23.22 -.07 -1.9 StlItMu n 10.23 ... -0.3 MFS Funds B: TotMkalnn32.13 -.19 -2.9 MIGB 10.76 -.10 -3.3 First Eagle: GvOSc t 9.59 +.02 -02 GIblA 39.81 ... -0.3 HilnBt 3.89 ... -3.0 OvemeusA22.66+.02 -0.2 MulnBt 8.60 +.01 -0.4 First Investors A ToRBt 15.75 -.02 -1.6 BIChpAp 19.88 -.13 -3.2 MainStay Funds B: GloblAp ... ... NA BIChGBp 9.12 -.06 -3.5 GovtAp 10.97 +.02 0.0 CapApBt25.93 -.12 -2.6 GrolnAp 12.99 -.06 -1.9 ConvBt 12.62 ... -2.1 IncoAp 3.13 +.01 -2.6 GovtBt 8.25 +.02 -0.3 InvGrA p 9.86 +.02 -0.6 I YIdBBt 6.33 +.01 -1.9 MATFAp 11.94 +.01 -0.5 IntlEqB 12.82 -.03 -1.5 MITFAp 12.62 +.01 -0.4 SmCGBp13.80 +.01 -6.3 MidCpAp25.59 -.08 -0.9 TotRtBt 18.36 -.02 -1.7 NJTFAp 12.96 +.01 -0.4 Mars & Powmr: NYTFAp 14.40 +.01 -0.8 Growth 68.05 -.62 -2.2 PATFA p 13.17 +.01 -0.4 Managers Funds: SpSitAp 18.78 -.02 -2.9 SpclEqn 86.91 -.26 -3.8 TxExAp 10.10 +.01 -0.6 MarsicoFunds: TotRtAp 13.49 -.03 -1.3 Focusp 15.73 -.17 -2.7 ValueB p 6.43 -.03 -1.6 Merrill Lynch A: Firsthand Funds: GIALAp 16.60 +.02 -1.4 GIbTech 3.81 -.01 -5.0 HealthA p 5.86 -.05 -3.1 Tech Val 26.82 -.26 -2.4 NJMunBd 10.55 +.02 -0.5 Frank/Temp Frnk A: Merrill Lynch B: AGE A px 2.09 -.01 -2.7 BalCapB t 25.64 -,07 -1.8 AdjUSp 9.03 +.01 +0.1 BaVIBt 30.40 -.16 -3.0 ALTFAp 11.52 +.01 -02 BdHIInc 5.13 ... -32 AZTFAp 11.14 +.02 -02 CalnsMB 11.63 +.01 -0.4 Ballnvp 58.21 -.07 -1.8 CrBPtIBt 11.68 +.02 -0.4 CallnsAp 12.61 +.01 -0.5 CpITB t 11.86 +.02 -0.4 CAlntAp 11.49 +.01 -0.5 EquityDiv 14.73 ... -1.8 CalTFApx 725 -.02 -0.3 EuroBt 14.90 +.08 -1.6 CaoGrA 1024 -.09 -3.8 FocValt 12.12 -.12 -4.3 Ti, RiEA-TiElMUTUALFJUND/lTABLES ges mrruiual lund.s I.Ied .:.r Na'daq TaDles ell p ice :or Nel As.se Value, INAVI and daily one i.:.ial return iIgur-e as Icllow. rn I' l i iial return ri :..I lal return I'l i1 fund anfd family ice of NAV change in NAV tor irie time period fsnctn wart Sperned longer than I yaOr return i c.rumula. reported to Lipper bj. p rm Es.tern ,apial gains dirztiutin. i Preaiw us day id p Fund as.et? used to pay disntribution Iee icr corutingeni deferred sales load may nd or phi ri Born p and r > E~cah divi alion a3.ailable NE Data in quea ion NN tb Irackeod NS Fund did rol eis at 13srl nc. and The Associated Press FndlGBt 15.36 -.10 -2.9 FLMB t 10.30 +.01 -0.3 GIAIBt 16.27 +.02 -1.5 HealthBt 4.43 -.04 -3.3 LatABt 24.01 +.24 -7.3 MnlnBt 7.84 +.01 -0.5 ShTUSG t 9.19 ... 0.0 MuShtT 9.98 0.0 MulntBt 10.46 +.02 -0.9 MNtlBt 10.48 +.01 -0.2 NJMBt 10.54 +.02 -0.5 NYMB t 11.01 +.02 -0.2 NatRsTB t 37.71 +.72 -0.3 PacBt 19.19 +.06 -1.9 PAMBt 11.27 +.02 -0.5 ValueOpp t 23.58-.08 -3.5 USGvMtgt10.17+.02 -0.1 UtTIcmt 11.00 +.03 0.0 WIdlnBt 6.36 ... -3.4 Merrill Lynch I: BaJCapl 26.44 -.08 -1.7 BaVII 31.12 -.16 -3.0 BdHilnc 5.12 -.01 -3.2 CalnsMB 11.62 +.01 -0.4 CrBPtlt 11.68 +.02 -0.3 CpITI 11.85 +.02 -0.4 DvCap p 17.32 +.26 -5.1 EquityDv 14.71 ... -1.7 Eurolt 17.33 +.09 -1.5 FocVall 13.29 -.13 -4.1 FLMI 10.30 +.01 -0.2 GIAIIt 16.65 +.02 -1.4 Health 6.34 -.06 -3.4 LatA 25.16 +.25 -7.2 Mnlnl 7.85 +.01 -0.4 MnShtT 9.98 +.01 +0.1 MulTi 10.46 +.01 -0.9 MNatl 10.49 +.01 -0.1 NatRsTrt 39.76 +.76 -0.2 Pacl 20.89 +.06 -1.8 ValueOpp 2620 -.08 -3.4 USGvtMtg 10.17 +.02 -0.1 Uimcmlt 11.04 +.03 0.0 WllIncl 6.36 ... -3.3 Midas Funds: Midas Fd 2.02 ... -2.9 Monetta Funds: Monettan10.24 -.03 -2.7 Morgan Stanley B: AmOppB 21.92 -"11 -2.6 DivGtB 36.44 -.23 -2.6 GIbDivB 13.74 -.05 -2.4 GrwthB 11.38 -.06 -2.7 StratB 17.36 -.04 -2.0 USGvtB 9.09 +.01 0.0 MorganStanley Inst: GIValEqA n17.60-.06 -2.4 IntlEq n 20.98 -.07 -2.0 Munder Funds: NetNetAp 16.44 -.04 -2.2 Mutual Series: BeacnZ 15.99 -.01 -1.1 DiscZ 24.59 +.06 -1.0 QualfdZ 19.41 -.02 -1.5 SharesZ 23.09 -.03 -1.3 Nations Funds Inv B: FocEqBt 16.62 -.18 -2.8 MarsGrBt 16.05 -.13 -3.0 Nations Funds Pri A: IntVIPrAn22.40 -.02 -3.7" Neuberger&Berm Inv: Focus 35.43 -.36 -4.5 Inti r 18.93 +.04 -2.0 Neuberger&Berm Tr: Genesis 44.01 +.15 -0.7 Nicholas Applegate: EmgGrol n 9.76 -.01 -3.6 Nicholas Group: Nich n 59.67 -.38 -3.1 NchInln 2.18 ... -2.7 Northern Funds: SmCpldxn9.66 -.05 -4.1 Technlyn 10.43 -.05 -4.0 Nuveen Cl R: InMunR 10.89 +.02 -0.5 Oak Assoc Fds: WhiteOkG n29.90-26 -5.6 Oakmark Funds I: Eqtylncrn23.41 +.06 -1.2 Globalln 21.98 +.04 -1.9 Intl I r n 21.62 +.04 -1.4 Oakmarkrn40.66-.19 -1.8 Select rn 33.27 -.12 -1.7 Oppenheimer A: AMTFMu 9.96 +.02 +0.1 AMTFrNY 12.67 +.02 +0.2 CAMuniA p 11.16+.04 +0.6 CapApAp39.77 -.29 -2.4 CaplncA p 12.15 -.02 -2.3 ChlncAp 9.46 +.02 -2.4 DvMktAp 27.53 +.29 -4.2 Discp 40.84'-.15 -4.5 EquLtyA 10.52 -.06 -2.2 GlobAp 58.52 -.17 -2.4 GIbOppA 30.66 -.11 -2.8 Goldp 18.36 +.08 -3.1 HiYdAp 9.50 +.02 -2.4 LtdTmMu 15.56 +.02 +0.3 MnStFdA 34.57 -.19,-2.8 MidCapA 16.21 -.09 -1.7 PAMuniA p 12.50 +.02 +0.4 StrinA p 4.24 +.01 -1.5 USGv p 9.62 +.01 -0.2 Oppenheimer B: AMTFMu 9.92 +.01 0.0 AMTFrNY 12.67 +.02 +0.1 CplncBt 12.03 -.03 -2.5 ChlncBt 9.45 +.02 -2.4 EquityB 10.17 -.06 -2.3 HiYIdBt 9.35 +.02 -2.4 MnStFdB 33.54 -.19 -2.8 StrIncBt 4.25 +.01 -1.5 Oppenhelm Quest : QBalA 17.52 -.15 -3.6 QBalB 17.28 -.14 -3.6 Oppenheimer Roch: RoMu Ap17.86 +.09 +0.3 PBHG Funds: SelGrwth n19.79 -.16 -3.3 PIMCO Admin PIMS: TotRtAd 10.59 +.02 0.0 PIMCO Insti PIMS: AllAsset 12.67 +.03 -0.8 ComodRR 16.38 +.09 +3.1 HiYId 9.70 ... -2.5 LowDu 10.12 +.01 0.0 RealRtnl 11.47 +.05 +0.4 ShortT 10.02 +.01 +0.2 TotRt 10.59 +.02 +0.1 PIMCO Funds A: RealRtAp11.47 +.05 +0.4 TotRtA 10.59 +.02 0.0 PIMCO Funds C: RealRtC p11.47 +.05 +0.4 TotlRtCt 10.59 +.02 -0.1 Phoenix Funds: BalanA 14.57 -.05 -1.8 StrAllAp 15.33 -.04 -1.7 Phoenix-Aberdeen: IntlA 10.11 +.02 -2.3 WidOpp 8.39 -.01 -2.3 Phoenix-Engemann : CapGrA 14.16 -.15 -3.0 Pioneer Funds A: BalanA p 9.58 -.03 -1.9 BondA p 9.27 +.02 -0.5 EqIncA p 28.64 -.12 -2.6 EuropAp 30.29 -.07 -3.0 GrwthAp 11.67 -.09 -3.1 HiYIdAp 11.20 -.01 -3.3 [ntlValA 17.21 -.02 -3.3 MdCpGrA 14.69 -.05 -2.5 MdCVApl25.18 -.08 -0.2 PionFdAp 2941.30 -.2 -2.8 TxFreAp 11.59 +.01 -0.3 ValueAp 17.6233 -.10 -2.2 PiGroneer Funds B:-.16 -2.7 EqHidBt 11.25 -.01 -3.4'2 EqlMdCpVSen 223.58 -.07 -0.3 EuBalaoe n 19.19 -.05 -2.2 FLICABondn 10.8397 +.01 -0.5 NMCapApp n19.5733 -.08 -2 0.0 DivGrowthn 22.27 -.2016 -2.7 rIEqlncn 25.9722 -.15 -2.2 HtEqlndexn31.5467 -.20 -3.0 Europe n 19.901 -.08 -3.1 FItntmSn 10.83 +.01 -0.62 JNMApan 9.57 +.02 -10.0 Gr&lnn 21.22 -.15 -2.9 HMIShrldn 6.9914 ... -0.2 MnDlBondn 10.06 -.05 -1.4 IntDls n 33.48. +.10 -2.7 MCapVal n22.44 .10 -1.5 NAmer n 31.42 -.25 -2.6 ; IAsian 10.31 +.09 -3.1 New Era n36.67 +.43 -2.2 NHorizn 28.50 -.13 -3.3 N Incn 9.01 +.02 -0.2 NYBond1n1.29 +.01 -0.5 PSIncn 14.55 -.03 -1.7 RealEst n 16.43 -.02 -2.7 SciTecn 17.83 -.07 -2.3 ShlBd n 4.71 ... -0.2 SmCpStk n30.568-.17 -3.4 SmCapVal n34.58-.12 -3.4 SpecGr n 16.42 -.08 -3.0 SpecIn n 11.86 -.01 -1.1 TFInc n 9.96 +.01 -0.5 TxFrHn 11.80 +.01 -0.1 TFIntmn 11.13 +.01 -0.6 TxFrSI n 5.36 ... -0.4 USTIntn 5.38 +.02 -0.1 USTLg n 11.83 +.04 0.0 VABondn11l.63 +,01 -0.5 Value n 22.56 -.12 -2.3 Putnam Funds A: AmGvAp 8.98 +.01 -0.1 AZTE 9.24 +.01 -0.4 ClscEqA p12.47 -.09 -3.1 Convp 16.80 -.06 -2.8 DiscGr 16.63 -.08 -2.9 DvrinAp 10.15 +.01 -1.2 EuEq 20.92 +.01 -2.2 FLTxA 9.22 +.01 -0.3 GaoAp 17.83 -.05 -1.8 GIGvAp 12.92 -.02 -0.5 GIbEqty p 8.31 -.03 -3.3 GrInAp 18.98 -.13 -3.0 HlhApp 57.49 -.49 -2.5 HYdA p 7.98 +.01 -2.7 HYAdAp 5.99 ... -2.9 IncmAp 6.79 +.01 -0.2 intlEqp 23.54 +.03 -2.6 IntGrlnp 11.77 ... -2.8 InvAp 12.24 -.12 -3.2 MITxp 9.00 +.02 -0.3 MNTxp 9.01 +.01 -0.3 NJTxAp 9.20 +.01 -0.1 NwOpA p 40.32 -.16 -2.5 OTCAp 7.12 -.02 -3.1 PATE 9.09 ... -0.4 TxExAp 8.79 +.01 -0.3 TFInAp 14.93 +.01 -0.5 TFHYA 12.81 +.01 0.0 USGvAp 13.20 +.03 0.0 UilA p 10.26 +.02 -0.2 VstaA p 9.42 -.04 -2.0 VoyAp 15.70 -.17 -3.3 Putnam Funds B: CapAprt 17.05 -.20 -3.5 CIscEqBt 12.37 -.09 -3.2 DiscGr 15.40 -.08 -3.0 DvrlnBt 10.07 ... -1.3 Eqlnct 17.13 -.08 -2.6 EuEq 20.20 +.01 -2.2 FLTxBt 9.22 +.01 -0.3 GeoBt 17.66 -.05 -1.8 GIlncBt 12.88 -.01 -0.5 GIbEqt 7.59 -.03 -3.3 GINtRst 25.55 +.41 -1.5 GrnBst 18.71 -.13 -3.0 HIthBt 52.50 -.45 -2.6 HiYldBt 7.94 +.01 -2.8 HYAdBt 5.92 +.01 -2.9 IncmBSt 6.75 +.02 -0.3 IntGrInt 11.57 ... -2.9 IntlNopt 11.18 +.02 -2.4 InvBt 11.24 -.11 -3.3 NJTxBt 9.19 +.01 -0.2 NwOpBt 36.36 -.14 -2.5 NwVal p 17.41 -.09 -2.6 NYTxBt 8.73 ... -0.4 OTC Bt 6.32 -.01 -3.1 TxExBt 8.79 ... -0.5 TFHYBt 12.83 +.01 0.0 TFInBt 14.95 +.01 -0.6 USGvBt 13.13 +.03 0.0 UJliBt 10.20 +.01 -0.4 VistaBt 8.25 -.04 -2.0 VoyBt 13.72 -.14 -3.3 Putnam Funds M: Dvdncp 10.07 +.01 -1.2 Royce Funds: LwPrStkr 14.57 -.06 -3.6 MicroCapl 15.02 -.09 -42 Premierl r 14.71 -.02 -2.6 TotRetl r 12.05 -.06 -2.3 Rydex Advisor: OTCn 9.51 -.09 -3.1 SEI Portfolios: CoreFxAn10O.45 +.02 -0.4 IntlEqAn 10.99 -.01 -2.5 LgCGroAn17.42 -.19 -3.4 LgCValA/n2128 -.06 -2.7 STI Classic: CpAppLp 10.92 -.12 -3.8 CpAppAp11.54 -.12 -3.8 TxSnGrTp23.98-.16 -2.7 TxSnGrLt22.52 -.15 -2.8 VlanStkA 12.48 -.08 -22 Salomon Brothers: BalancB p 12.57 -.03 -1.9 Opport 47.33 -.18 -2.6 Schwab Funds: 10001nv r n33.68 -.20 -2.7 S&P Inv n 18.11 -.11 -2.9 S&PSeln18.17 -.12 -2.9 YIdPIsSI 9.69 +.01 +0.2 Scudder Funds A: DrHiRA 42.65 -.23 -2.9 FlgComAp16.13-.05 -3.7 USGovA 8.55 +.02 0.0 Scudder Funds S: EmMkIn 10.42 +,02 -3.2 EmMkGrr 17.95 +.23 -4.1 GIbBdSr 10.24 -.01 -0.3 GIbDis 35.21 +.04 -2.9 GlobalS 26.95 +.13 -2.5 Gold&Prc 16.10 +.02 -6.0 GrEuGr 27.39 +.01 -2.5 GrolncS 21.17 -.12 -3.1 HiYldTx 12.71 +.01 -0.4 Incomes 12.83 +.03 -0.5 IntTxAMT11.26 +.01 -0.7 Intl FdS 44.01 +.09 -2.9 LgCoGro 22.95 -.13 -2.3 LatAmr 32.95 +.32 -7.3 MgdMuni S 9.09 ... -0.6 MATFS 14.47 +.01 -0.5 PacOppsr 13.38+.13 -2.8 ShtTmBdS 10.08 +.01 0.0 SmCoViS r 26.01 -.09 -3.1 Selected Funds: AmShS p 36.68 -.20 -2.8 Sellgman Group: FronlrAt 12.40 -.07 -4.8 FrontrDt 10.96 -.06 -4.9 GIbSmA 15.34 +.01 -3.5 GIbTchA 11.76 -.03 -3.1 HYdBA p 3.40 ... -2.3 Sentinel Group: ComS A p 29.14 -.15 -2.4 Sequoia n150.49-2.23 -3.1 Sit Funds: LrgCpGr 32.79 -.11 -2.1 Smith Barney A: AgGrAp 90.65 -.23 -3.0 ApprAp 14.33 -.09 -2.4 FdValAp 14.41 -.05 -3.3 HilncAt 6.82 +.01 -2.7 InAICGA p 13.46 +.01 -3.2 LgCpGA p 19.99 -.20 -3.3 Smith Barney B&P: FValBt 13.58 -.05 -3.3 LgCpGBt 18.89 -.20 -3.4 SBCpInc t 15.88 -.02 -2.5 Smith Barney 1: DvStr1 17.11 -.09 -2.5 Grinc 1 14.77 -.11 -3.0 St FarmAssoc: Gw/h 48.05 -.19 -3.1 Strategic Partners: EqutyA 14.88 -.05 -2.9 Stratton Funds: Dividend x33.48-.17 -3.1 Growth 41.81 +.20 -3.8 SmCap 40.05 +.08 -3.2 Strong Funds: CmStk 22.23 -.07 -1.5 Discov 19.14 -.08 -3.2 Grwthlnv 18.35 -.08 -2.1 LgCapGr 21.48 -.16 -2.7 Opptylnv 44.95 -.06 -2.2 UltStinv 9.17 ... 0.0 SunAmerica Funds: USGvBt 9.40 +.03 -0.1 SunAmerica Focus: FLgCpA p 16.65 -.06 -2.6 TCW Galileo Fds: SelEqty 17.46 -.19 -2.7 TD Waterhouse Fds: Dow30n 10.47 -.10 -3.9 TIAA-CREF Funds: BdPlus 10.19 +.02 -0.3 Eqlndex 8.35 -.05 -2.8 Gronc 11.88 -.07 -2.6 GroEq 8.63 -.08 -3.1 HiYIkBd 9.16 +.01 -2.9 IntlEq 10.73 +.04 -2.0 MgdA/c 10.85 -.02 -1.9 ShtTrBd 10.42 +.02 -0.1 SocChEq 8.85 -.06 -3.0 TxExBd 10.75 +.01 -0.6 C.I : :',,,l aj^ Hii *r, ,.d Tamarack Funds: EntSmCp31.79 -.19 -4.8 Value 45.11 -.31 -2.5 Templeton Instit: ForEqS 20.28 +.01 -2.4 Third Avenue Fds: RIEstVI r 27.27 -.01 -1.0 Value 54.47 +.12 +1.0 Thrivent Fds A: HiYld 5.12 ... -2.3 Incom 8.69 +.02 -0.8 LgCpStk 24.97 -.15 -3.1 TA IDEX A: FdTEAp 11.72 +.01 -0.6 JanGrow p'22.64 -.17 -0.7 GCGIobp23.78 -.16 -3.1 TrCHYBp 9.11 +.02 -2.2 TAFIxlnp 9.44 +.02 -1.7 Turner Funds: SmlCpGrn22.11 -.11 -5.2 Tweedy Browne: GlobVal 24.10 +.02 -1.3 US Global Investors: AIIArnn 23.83 +.03 -1.9 GIbRs ... ... NA GIdShr 7.79 +.01 -4.4 USChina 6.86 +.03 -3.4 WIdPrcMn ... ... NA USAA Group: AgvGt 27.66 -.23 -2.6 CABd 11.14 +.02 -0.4 CmstStr 26.33 -.07 -2.3 GNMA 9.71 +.02 0.0 GrTxStr 14.18 -.02 -1.9 Grwth 13.09 -.08 -3.3 Gr&lnc 17.97 -.08 -2.7 IncStk .16.29 -.07 -3.0 Inco 12.29 +.02 -02 Intl 21.73 -.06 -2.9 NYBd 11.91 +.02 -0.6 PrecMM 14.85 +.07 -2.5 SciTech 8.58 -.05 -4.6 ShtTBnd 8.89 ... -0.1 SmCpStk 13.28 -.03 -3.1 TxElt 13.17 +.01 -0.6 TxELT 14.03 +.02 -0.4 TxESh 10.68 ... -0.1 VABd 11.62 +.02 -0.5 WkJGr 17.67 -.06 -2.5 Value Line Fd: Lev Gtn 24.91 ... -3.9 Van Kamp Funds A: CATFAp 18.66 +.02 -0.7 CmstAp 18.08 -.12 -2.4 CpBdAp 6.63 +.01 -1.3 EGA p 37.13 -.16 -2.6 EqIncA p 8.40 -.03 -2.0 Exch 350.17 -.47 -3.8 GrqA'p 19.89 -.11 -2.4 HarbAp 14.14 -.05 -2.7 HiYIdA 3.61 ... -3.0 HYMuAp 10.73 +.01 +0.1 InTFAp 18.71 +.02 -0.7 MunlAp 14.59 +.01 -0.8 PATFA p 17.29 +.02 -0.6 StrMuninc 13.14 +.01 +0.2 US MtgeA 13.82 +.02 0.0 UtilAp 17.19 +.04 -0.3 Van Kamp Funds B: CmstBt 18.08 -.13 -2.5 EGBt 31.83 -.14 -2.7 EnterpBt 10.84 -.09 -2.5 EqlncB t 8.27 -.03 -2.1 HYMuBt 10.73 +.01 +0.1 MulB 14.57 +.01 -0.9 PATFBt 17.24 +.02 -0.6 StrMunlnc 13.1d +.01 +0.1 US Mtge 13.76 +.02 -0.1 UliB 17.18 +.05 -0.3 Vanguard Admiral: 50COAdml ni108.08-.71 -3.0 GNMA Ad ni0.35+.02 0.0 HthCrn 52.45 -.34 -2.0 ITAdrmI n 13.36 +.01 -0.6 LtdTrAdn 10.78 +.01 -0.1 PrmCaprn61.69-.41 -2.7 STsyAdml n10.37+.01 0.0 STIGrAd n10.54 +.01 -0.1 TUBAdmlnlO.13 +.02 -0.2 TStkAdm n27.81 -.17 -2.9 WelitnAdm n51.42-11 -2.1 Windsorn59.43 -.35 -2.9 WdsrllAd n54.52 -.22 -1.8 Vanguard Fds: AssetAn 23.97 -.15 -3.0 CALTn 11.67 +.01 -0.6 CapOpp n29.10 -.16 -2.0 Convrtn 12.65 -.03 -2.8 DivdGro n 11.94 -.07 -2.7 Energy n 46.57 +.90 -0.5 Eqlncn 22.97 -.11 -3.0 Expirn 72.05 -.17 -3.0 FLLT n 11.67 +.02 -0.8 GNMAn 10.35 +.02 0.0 Grolncn 30.09 -.15 -3.1 GrthEq n 9.09 -.08 -3.2 HYCorp n 6.22 ... -2.6 HthCre n12429 -.82 -2.1 InflaPron 12.52 +.05 +0.3 IntlExpIrn 16.83 +.01 -2.0 InslGrn 18.77 +.01 -2.3 intlVal n 31.23 +.03 -3.0 ITIGrade n 9.87 +.02 -0.5 ITTsryn 11.04 +.03 -0.1 UeCon n 14.99 -.03 -1.6 LfeGron 19.62 -.09 -2.6 LUfelncn 13.32 ... -1.0 LifeMod n 17.60 -.06 -2.1 LTIGrade n9.52 +.03 -0.4 LTTsryn 11.44 +.05 0.0 Morg n 15.62 -.07 -2.8 MuHYn 10.71 +.01 -0.6' MulnsLg n12.62 +.02 -0.7 Mulntn 13.36 +.01 -0.6 MuLtdn 10.78 +.01 -0.1 MuL.ongn11.29 +.01 -0.8 MuShrtn 15.55 ... 0.0 NJLTn 11.89 +.02 -0.7 NYLTn 11.34 +.01 -0.7 OHLTTEn12.05 +.01 -0.7 PALTn 11.40 +.01 -0.7 PrecMtls rn17.66+.18 -0.7 Prmcp rn 59.46 -.39 -2.7 SelValu rn18.63 -.08 -1.0 STAR n 18.50 -.04 -1.8 STIGrade n10.54+.01 -0.1 STFedon 10.31 +.01 -0.1 StratEqn 21.00 -.03 -2.8 USGro n 15.13 -.16 -4.2 USValuen13.54 -.05 -3.1 Wellslyn 21.33 ... -1.5 Weltnn 29.77 -.06 -2.1 Wndsrn 17.61 -.10 -2.9 Wndsll n 30.70 -.13 -1.9 Vanguard Idx Fds: 500 n 108.08 -.71 -3.0 Balanced n18.97 -.05 -1.8 EMktn 15.05 +.16 -4.8 Europe n 26.07 -.02 -2.3 Extend n 30.19 -.13 -2.8 Growth n 25.22 -.20 -3.1 ITBnd n 10.43 +.02 -0.7 MidCap n 15.55 -.02 -2.0 Pacific n 9.20 -.01 -2.6 REITrn 17.20-.01-27 SmCapn 25.72 -.09 -3.3 SmlICpVl n1l3.45 -.05 -3.1 STBndn 10.00 +.01 -0.1 TotBndn 10.13 +.02 -0.2 Totllntn 12.59 ...-2.7 TotStkn 27.81 -.17 -2.9 Value n 21.07 -.08 -2.5 Vanguard Instl Fds: Instldxn 107.18 -.70 -3.0 InsPIn 107.19 -.70 -3.0 TBIstn 10.13 +.02 -0.2 TSInstn 27.82 -.16 -2.9 Vantagepoint Fds: Growth 7.84 -.06 -3.3 Waddell & Reed Adv: CorelnvA 5.67 -.02 -2.7 Wasatch: SmCpGr 38.27 -.13 -2.6 Weltz Funds: PartVal 22.80 -.18 -1.6 Value 35.87 -.27 -1.8 Wells Fargo Instl: [ndex I 47.17 -.31 -3.0 Western Asset: CorePlus 10.54 +.02 -0.5 Core 11.32 +.03 -0.4 William Blair N: GrowthN 10.21 -.08 -3.0 Yacktman Funds: Fundp 14.98 -.09 -1.1 SA 'IIRI)AY, Armis. 2, 2005 7A Sbs aWwe wnekw Copyrighted Material Syndicated Content Available from Commercial News Providers 0- e ft - a - - -4 a 4 - S - S S 0- e -e WANT A CUSTOM LOOK TO YOUR HOME... LET ?$*141 Put it over the top - It's the little xtras that say a lot! Custom kA window treatments & home accents; I 4 i shower curtains, embellished towels, toss pillows, dining chair pads & covers, table runners, free in-home consultation Give us a call and let us add your home to our showcase!, Mention this ad for a 10% discount on total order (352) 621-4777 APRIL 2, 2005 (I *' ) ),. I-- -*. -- .1 J I L. > L. Y . "America is the only country left where we teach languages so that no pupil i can speak them. CITRUS Founded in 1891 by Albert M. Curt Ebitz .......................... citizen member Williamson Mike Moberley ....................guest member 'You may differ with my choice, but not my right to choose." D- svid S. Arthurs publisher emeritus MISSING THE MARK President's grant program unrealistic resident George W. Bush has a plan to make com- munities better by making them suffer The plan is that if the children in a community don't come up to snuff in meeting the require- ments of the President's Leave No Child Behind plan, he intends to institute a tough-love approach to communities across the United States by withholding government grants. This approach would offer jus- tification for feder- al funding cuts already proposed THE IS in the President's THE I budget package. City grant Since the Pres- to educ ident is already proposing an esti- OUR OP mated $3.2 billion it won't slash in grants to Florida's local gov- ernments and a $392 million cut from "Strengthening America's Communities" block grants over the next five years, poor school performance in No Child Left Behind would be a ready-made reason to makethose cuts. Just to put this .into perspec- tive, since 1997, the City. of Inverness alone has competed for and won $2.6 million in grants that helped with down- town redevelopment, housing, rehabilitation grants and eco- nomic development. States, including Florida, set their own standards for school performance. State educational administrators in Tallahassee No plea bargains s Today's front page of the Chronicle, our state attorney's office plea-bar- gained aman that molest- ed children two little I . girls under' 5-to an,11- year sentence instead of life ir. prison. They want to CALL do the same with the lady 5 schoolteacher that assault- 563- ed the young boys. She probably won't even get any jail time. Instead of the petition that's being passed around to make it tougher on finding child molesters and keeping them under security after they're caught, we need to pass one to have the state attorney and the judge removed from their positions. There should be no plea bargain. These people should go to jail for life. Educators first This is in response to "Pay for coaches." You asked the questions; let me answer them. First of all, the majority of coaches in Citrus County are educators first, coaches second. That's right, the math, science and English teachers you speak of are also your coaches who coach on a supplementary basis. These coaches sacrifice much more than you realize long hours at work, working weekends and holi- days- simply to see student ath- letes learn and grow as individuals. They certainly do not do it for the money. A football coach, by the way, is paid much less than a first-year teacher. As any good educator will tell you: get your facts-in order first before you make an argument. must have been tempted to lower their self-imposed bar if only to grade higher on the fed- eral rating scheme. After all, a lot of money is at stake, even though a downward adjustment would have worked against the improvement of edu- cation in Florida. Florida stood firm and didn't lower the bar, but the risk is great. Consider that last year, less than a quarter of Florida's schools met federal guidelines. If our schools show similar results next SUE: year, if the Bush Administration plan s linked becomes reality, the ation., damage could be considerable. INION: The symmetry in work. this plan would be elegant if it were based in reality, but it isn't. This experi- ment in social engineering, link- ing school performance to feder- al grants to towns and cities, is based on a false premise. Great improvements in education require vision, not implied threats. The carrot and stick approach to make our educa- tional system better is a short- sighted one. This scheme put forward by the President is demeaning to all of us who are working earnestly to improve our com- munities and our schools. It appears that the President is adopting the role of a stern par- ent who will only let us drive the family car if we get good grades. N Missing Wooten Where, oh where is our good-old former commis- sioner, Josh Wooten, when we need him? Since Josh has been put out of office by those who didn't think \he was doing a good job I thought he was doing 0579 an excellent job our 0579l roadsides look like trash heaven. At least when Josh was there as commission- er, our roadsides looked clean. He had people out cleaning up almost every day. Name the towns This is for the Weather Channel: When you give the name of a coun- ty where you have a tornado or bad storms, give the name of the town. We have loved ones in those areas and we also would like to see what town it's in. Remove signs This is to the article regarding religious drivers. If the drivers are flipping you off and running you off the road and cursing at you, they are not Christians. So they must take those signs off their car because a Christian would not flip somebody off or run them off the road. Still fighting In response to "Can't get it right" in the March 23 Chronicle: Who said that the South won or lost? The war's not over yet. Join the fun To the party or parties interested in joining the Honda Trike or Bike Chapter of Citrus County: Call 860 2965. Come join the fun. ( lb the Oprun yard for Bonds.? t~---aa - 01- a- - a-~*amp ob. a q ~ 4 4 -.4 * -~ - ~- -m - -~ .. -~ - -m - a- - .~ - a m - "l o *- *& M -Mwm- "D 400 --o* -aomm- o.-1N.a4w ' . -0m -4- .o.-%N = .- .. -- a- b-- i- - - t 4w a.-mos. 0 W b *b - am 0 - - - ~- -U "S -- --4 -.~ -~ .. -U ~ -- 4 ------4 - - = - -a - - - -4 - ~~49 a a- - w - a -a - ~. ~- a~-.. a- -~ 44 Olo ol- 111o doll 41b ..00 t.--w-. -NM ,- --** b -- - -* - n0a 4ho so.-No ,mm 41M . -.qb-4b -aw 4 obb-momm 41-dm 90 lw ab-lmm 4 qb aD S - __ a momm- a 0 fb m o,- mm lo --Row 4m .Nw 4b 4b- .- a a aw _ 4w-41W W - - - a- a a e. - -0-0a. a. -qua qo B' 4w w .-b.- -* aW.- a __ _ LETTERS to asSat~sSS~a'~e^^ ^ L Laws should change We want the laws changed that pro- tect pedophiles -- after their first sex- ual molestation! We want them placed where they will never put our kids at risk again. The idea of releasing this scum back into society to kill time and time again must stop once and for all, without fail. Thousands of our children are abducted every year and only one out of seven are located. I'm sure we can improve on this statistic. I want our children to be safe on our streets and in our homes. I guess that I want my government to keep the evil things out of reach, putting them in harms way in the first place. Gaylord LaGraves Homosassa Liberal label Hugh S. McMurdo writes: "The tragedy in America is that liberalism has captured the once-great Democratic Party of President Andrew Jackson. Jackson, a hot-head- ed dueler who couldn't get along with his own cabinet, summarized his views about the presidency when he said, 'It was settled by the OPINIONS INVITED ', The opinions expressed in Chronicle edi-.. Constitution, the laws and the whole practice of the government that the entire executive power is vested in the president of the United States."' We learn in Sociology 101 that in society there are common interests and self-limited interests. The liberal label was hung on the Democratic __ - - 4 - - - ~- a. - a a. - -~ a. a --~- a- -- a - - a -.ui'4 a. a - .4 * - 0 a. a. a. a a. a- - a.. w a- - ~-~-~a- a. - e Editor . candidate as an epithet because he campaigned to further the common interest to benefit the majority of the people while his opponent, refusing to recognize that taxes are the price we pay for civilization, opted for self-0 limited interest to benefit his suppdro ers. - Voting to further the comiran inter*9 est rather than self-limited interests can also be said of those Hollywood actors, along with musicians like Springsteen, all of whom were mil- lionaires and would personally bene- fit from the Bush policies. Franklin Delano Roosevelt, our most patrician president, was called" traitor to his class because he chose to champion the many in need instead of the privileged few who :, were his peers. - His administration crafted pro- grams to feed the hungry, employ the. jobless, educate the children and assure that the elderly would not live4 their final years in abject poverty., These programs were examples ofF blatant Democratic liberalism. And ( this was our government's finest hog Mary B. Greg. .- - __ Copyrighted Material _-_ S -^ ..-- Syndicated Content - r::Available from Commercial News Providers-- - a - ^ *a ?, i i i - o o 4 emme it! 21 t Rrr US ouN ( C C TY FL) CHRONICLE AT JOHNSO ra ' . I".'I S' PONTIAC ills 2005 PONTIAC GTOI "The GOAT is back!'" NI 2005 PONTIAC G6 - Rebate............................................................. 1,000 -Bonus Cash ......................................................... 500 05 SUNFIRE - Rebate....................... 3,000 - Cash or Trade Equity..3,000 05 GRAND AM - Rebate......................... 3,000 ) - Cash & Trade Equity.. 3,000 1k A w~ *n.1~..... I ~~~--'" I 05 VIBE - Rebate....................... 1,500 - Competitive Bonus..... 1,000 - Cash or Trade Equity...3,000 05 AZTEK - Rebate........................ 3,000 - Cash or Trade Equity...3,000 I I 05 GRAND PRIX 05 SV6 MINI VAN - Rebate............ ........ 2,000 - Bonus Cash....... 1,000 - Cash or Trade Equity...3,000 Da~lmants fbebn on 7 - Rebate...................................1,500 - Cash or Trade Equity.......... 3,000 7A Reaonn. Good Credit, Bad Credit, - No Credit, No Problem! TURN YOUR W.24 INTO A NEW CAR Crystal River Homosassa Spr wings r-a, 'I iit ^'L a') Jr I --m pop tom per Amonth SATURDAY, APRIL 2, 2005 9A I MW 4M4Mo2earomonth 10A SATURDAY APRIL 2, 2005 "a Next %A POV -N pope AchoIL ~U* E~~S0~ ~ - ,q"g al fg adl- a n 4 ii i 0 Copyrighted Material 'A M- N W -, , lm b iiib. em , '40bmp-E 0O- 4knomooii mibmm ,aiip amim" & ,'w p 0 qw miamp ,n1fi - m- o -m U dbm 4moomm mlmtsupp Berger Syndicated Content ,Available from Commercial News Providers d ali no jail 4- -4 - 4-"o w - 4- a ** *"UE. * '4-. * ~" .U ~* ~e rn - a-. .-'.. a * a a ...... 'Mm: - ... .. III wi o.. ... t. I *.. . .: : . "k : *** ."~.... * . 1.- *. 6- S. 4- SSunni c mwAId ue i mm ity aid: Sunni clerics urge -urity' aid bpi* ow "m .~ a * U - a 4-.* ,~p - a 4- - S. ~bm. - .4 . .- .-.. Sac -:. -. .. - U. 4- '"a. * I--** a...U S .. m ..... ..... : ... .. ...... lmam m e e 4g ememiili ,~la ii mii a INN am 4 Aman ea 41S woda I w -NO m4 -wim 4, 0 ~ ,a=ii ,w .Jiammim :,ow ,omm 4 .iin dmbw & *(InMmo dam 4ii I ivmk . AiN-Mui -Aiik i*oim C 4- *4m * .. ". -.. .gg g ..... . .....f p o w ," j .w. ,e..... Jan Ktmirk amu% n a hil rufc * .w *~ .a~. -~ 4- .4 4- .- S - , .. * w- 4 * ali. dhb III a :: :% :."iiii :. iiii iar .............;:i ii i::! .................... ......... ........_........... i'Sm. fl -XK :EEEEE: .:: E:. Naton i :^.. .. 1 Need cell Sphones for :victims ., Special to the Chronicle - Donate used wireless Phones to support the Na- Stional Coalition Against SDomestic Violence (NCADV). Donated phones are refur- ,,bished, sold or recycled, with proceeds benefiting the SpNCADV and the Wireless SFoundation. Phones are also donated to The Body Shop At . Home domestic violence shel- Ster partners. S Wireless phones are. distrib- Suted to victims of domestic vio- lence within our communities. The Wireless Foundation sponsors the national Call to --- S Protect program, a nonprofit organization. Foreground, Call Thelma Noble at 726- donated rec Book Sale. 2431 from 8 a.m. to 7 p.m., or e- videSotapes, mail [email protected]. Central Rid Help us give a lifeline in the Library Syst ( campaign to stop violence in the home. % Seco .R 1.. :s ~ ~ |----- .* s f 2, XJ RA L ':2q :-g- ". . ', Pupils from Mrs. Shaffer's second-grade Hema From the box tops is used to buy equipment fo Amber Placanica. Middle row, from left, are: D row, from left, are: All Dale, Blake Johnson, Co Not shown is Amber Copen. I Living ge : ofcleanil / ur house is clean again! begi M L t me tell yu to .... ::" ;|,begin with that I hate to Ir1 ^^ .^clean. I love a tidy and 'B. Ji organized space -- I just hate doing it. I mean, why . mop the floor when it is &just going to get dirty all Stover again, right? *, : So, to clean the house, I Shalyn Barker have to have no excuses. FULL ',By that, I mean nothing PLATE '.else to do--and definitely ___ no sidetracks, but it always happens. I just *^ always seem to find the importance of putting all of our photos in chronological order during cleaning day. And then Emmy needs me for sonie food, a dirty diaper or to just be held. : Ultimately, my sidetracks never end. SLately, my excuse for a dirty house was all the work of opening a new studio; I just haven't found the time to mop the floor or fold the clothes, since maybe Christmas? I was exhausted, and, frankly, didn't care enough about the mess to clean it up: Anyway, it got to the point last week when Patrick and I started to argue about it For some of you who may run %your household differently, with as busy as we ;both are, chores are "equal opportunity" if ;you have the opportunity, do it! We both just became so disgusted with our house and our- selves for letting it get this bad. So, I had to designate last Saturday "Cleaning iDay" and that's when the troops mobilized and 1 WHAT: Friends of the Citrus County Library System's fourth annual Spring Book Sale. * WHEN: April 8 to 12: 5 to 8 p.m. Friday (with $5 donation opening night only); 8 a.m. to 4 p.m. Saturday; 1 to 4 p.m. Sunday; 10 a.m. to 4 p.m. Monday- half-price day; aind 10 a.m. to 3 p.m. Tuesday $3-a-bag day. W WHERE: Citrus County Auditorium on U.S. 41 South, Inverness. I* INFORMATION: Citrus County Auditorium on U.S. 41 South, Inverness. I FEATURING: More than 50,000 used books, CDs, DVDs, audio-.and videotapes, records and puzzles dis- played on 100 tables; more than 40 categories of fiction and nonfiction, including mystery thrillers, Westerns, biographies, large print, choking, crafts and sewing, children's, collectibles, reli,- gion, travel and foreign lan- guage; hardcover and paper back books; and most prices range from 75 cents to $3. Special to the Chronicle Benjamin, a shihdoodle, was bom Nov. 25, 2004. He was adopted by Gerrl Doom, and Is lucky to have a second set of caregivers Bob, Sally and Bruce all of Harbor Lights Resort, Inverness. Ben is about 6 pounds, lively and full of energy. He will be spending the summer in Grand Rapids, Mich. News NOTES Rabies, vaccination clinic in Wildwood There wil11 be a rabies and vaccination clinic from 8:45 a.m. to noon today at the Animal Care Center of Wildwood in the Wildwood Shopping Center. Pro- ceeds benefit the Humane Society/SPCA of Sumter County. Rabies vaccinations for dogs and cats are $6. For dogs, distemper/parvo (DHLPP) vaccinations are $9 and bordetella vaccinations are $9. For cats, feline distemper vac- cinations are $9 and feline leukemia vaccinations are $11. VFW to host flea market at new post VFW and Auxiliary. Post 7991 is having a big flea market 8 a.m. to 2 p.m. today at its new post home at 3107 W. Dunnel- lon Road (County Road 488). We have emptied our storage shed and members have cleaned out their garages. We will have lots of good stuff, and you can rent a table for $7. Yard sale to benefit Relay for Life The Brannen Banks Relay for Life team will host a yard sale from 8 a.m. to noon today at the Inverness Brannen Banks branch, 320 U.S. 41 South, Inverness. All proceeds will go to benefit the American Cancer Society through the Relay for Life. Call Jane at 726-8481. Relay team to have yard sale Regions Bank of Invemrness will have a yard sale from 8 a.m. to 1 p.m. today at at 800 W. Main St. Proceeds will benefit the American Cancer Society Relay for Life efforts. Special to the Chronicle The Board of County Commissioners on March 8 recognized the following employees for their years of service: Christopher Cole, maintenance technician for the road maintenance divi- sion, received a 5-year service award, as did Robert Knight, utility regulation director. Marianne McAdams, library assistant, received a 10-year service award, and Steven Mitchell, code enforcement inspector, received a 15-year service award. From left are: Christopher Cole; VIckI Phillips, BOCC chairwoman; Marianne McAdams; and Steven Mitchell. Robert Knight Is not pictured. SO YOU KNOW * News notes tend to run E During the busy season, 0 Submit information at one week prior to the date expect notes to run no least two weeks before the of an event, more than twice, event. : i-------------------------------------* -- : ------ S .. 1_ I .------------- --- -* ------ . *-.I .-J ..- m .^ .. ^. iijuj im . Pet SPYLot,-T Basket of joy SUE HAPERER/Special to the Chronicle , from left, Book House volunteers Dan Techentin, Julle Asbury and Fred Uhl sort cords for the Friends of the Citrus County Library System's fourth annual Spring Featuring more than 50,000 good-quality used books, CDs, DVDs, audio- and records and puzzles. Donations of gently used books may be dropped off at ge, Coastal Region or Lakes Region libraries. Proceeds benefit the Citrus County tem. For book sale Information, call 746-1334 or 527-8405. WALTER CARLSON/For the Chronicle ndo Elementary class recently won an award by collecting 1,372 box tops and soup labels for the month. The money >r the school. Front row, from left, are: Amy Osbom, Emily Lakeman, Ashley Burgos, Tayler Speckner, Joe Kelly and Dylan Wolf, Matthew Lopes, Tabitha Trojanowskl, Brandon Fields, Alex Atklnson, Jame Norris and Dallas Foley. Top lin Spain, T.J. Sarver, Pierce Meadow, Marc Manchester, lan Kilpatrick, Cory Hopper and Shannon Femandez-Davlla. *? ;s .11 S. ... .., . ... .- : .* *; .*. ':,,- ;:" .( ,, _ M Books and all that jazz nd-graders collect most box tops ts in way ng house Lately, my excuse for a dirty house was all the work of opening a new studio. came in that would be my mom, but you can call her "Lt. Lysol." She pulled up in the drive- way with a special storage container full of cleaning supplies, a duster, sponges and her own vacuum, ready to make a cleaning slave out of me. I knew there would be no photos today. She is the most amazing cleaner I have ever seen. I wasn't done putting away the clean clothes that had been left unfolded on the couch for four weeks and she had already detailed a bathroom and both bedrooms. With my mom there, it only took us a few hours to get everything done, a feat I could not have accomplished in less than two days for cer- tain. I was so grateful that mom came over to help me out What a relief to relax in our clean home now! The sad part is that I know it's bound to get messy again, leaving it nowhere to go but down a dirty and dust' hill. Thank goodness I have LL Lysol around to rescue me! Shalyn Barker resides with] her husband, Patrick, and daughter, Ennmmy. in the Beverly Hills area. .All three are lifelong residents of" Citrus Count.. She can be reached at citrusamom ,t,'yahoo.com. Employee service awards __CImus COUNTY (FL) CHRONICLE 2.2A SATURDAY, APRIL 2, 2005 At JOHNSONS' Are And Prices Are Falling P4e 1 1 1 I A I i4 :IAM "REBATES UP ETO...$2,500__ YOU PAY $ 10,349 . ' A. REBATES UP r.LTO...13,250 - - REBATES UP TO...'2,250O r- ~ 1~pmJsffiw YOU PAY" wee I YOU PAY $ 11,349" alk REBATES UP - 0.TO...12,500 YOU PAY '14,249 'REBATES UP1 LjTo...$2,500_ - REBATES UP L TO...S3,000 YOU PAY '15,299 -t^ - r' v YOU PAY s10 SNo Credit, No Problad Credi No Credit, No Problem! *S SUZUKI I , L 4 - TURN YOUR W-2 INTO A NEW CAR iUL^? JOHNSONS' Homosassa Spring Hill - 44V QUAH l -- Hw. 50 -hmess Broo ksfe r- -Ni s ? iA- . -MI " *1 Jd *suz.u SATURDAY, APRIL 2, 2005 13A CITRus COUNTY (FL) CHRONICLE ^JOHNSONS'A MITSUBISHI Temperatures Are Rising And Prices Are Falling S R AR 2 2CR...... U ,) m- Ir/ .0 YEAR 100,000 MILE WARRANTY PROGRAM ON NEW KIAS 1 OYEARS/100,000 MILES LIMITED POWERTRAIN WARRANTY 05 OPJIMA A/C. CD, Auto &MI---- L. '\ -.Mon.i*""1 04 AMANTI Leather, Loaded! 2005 KIA SPORTAGE Automatic, A/C, CD $ a~w- MSRP.............17,825 $15 ~-W599 say. 0J 10 K d * 1 0 I I ) 05 RIO S ..Automatic, A/C, CD! MSRP..............13,648 SOAE PRIC 05 SORENTO EX SAutomatic, A/C. Sport Pkg! ~O05 SPECTRA 5 Automatic, NA/C, CD! $ MSR P. ......... ...25,265 SE * * $2 'rpWo MSR P.............M.17,278 Good Credit, Bad Credit,S7 No Credit, No Problem! - HwN 50 TURN YOUR W.-2 INTO A NEW CAR- '3 p ,w *s . MSRP...............28,128 SAEPRC SrRIGA $18,rl~* CITRus COUNTY (FL) CHRONICLE 24A ssrUltDAY APIUL 2 5 -*(-LBC * *U-. ; .... .. ... .... . ^ AM Hi111 k fi vw-w 0 .9:1<^ Batter up Opening day draws near See I "'I i~ti~2' A.~ APRIL 2, 2005 SportsBREFS F Warriors pound SCedar Key 124 Seven Rivers baseball had no Sprblem against Cedar Key, ,&eating them 12-4 last night. I-,Pitcher Chad Peets threw a inplete game, striking out 8. tPeets also had an impressive , night at the plate, going 3-4 with. #-elouble. Matt Rees hit 2-3 as :-TShe Warriors improved to 8-3 for the year, 3-1 in district 4qmes. *** m~h a -f k:i WIl Copyrighted Materia Syndicated Content s i^^ s!-ARIA Available from Commercial NewslPeroviders a .. .- * * qNNO&,4u 0 m aw Nmmw 0 4ommm wmnow 0 ANOWom n410agaa e "oIaONaMAnANE S -a -a a -a o - a so - Canes clobber Lecanto 'a a X- |- aX:X. a ** a I- o. a,. - a a a -- y ON :.e qme- a - a- . ow I a. p .ifr ido M. a | a -. . a|j:H e W e W' r : 0 - -a Sr' e *.- w : ap~w .0 -- a ot. .n. .e a - a Wt .- .& : : 4 m-no a S4 W.- a. a a- w KHUONG PHAN kphan @chronicleonline.com Chronicle The sky was ominously overcast during Lecanto and Citrus' district baseball matchup Friday night Little did anyone know that the biggest storm brewing wasn't from above, but right at the plate. The Hurricanes proved worthy of their nickname as they wreaked havoc on the host Panthers. Citrus erupted for an 11-run second inning as it mercy-ruled Lecanto 17- 0 in five innings. It. didn't matter where Lecanto (3-8, 1-5) pitchers put the ball Citrus (8-6, 4-2) just kept connecting anyway, fin- ishing with 12 hits. The mercy-rule win was Citrus' second in as many days. On Thursday, the Hurricanes routed visiting Hernando 15-3. "It's nothing I'm feeding them," Citrus coach Jon Bolin laughed. "They're just swinging the bats real well and getting good pitches. They're starting to be a little more .selective, but aggres- sive when they need to be." Even when the Hurricanes weren't making solid contact, they found themselves reach- ing safely on account of the eight errors Lecanto commit- ted in the field. The Panthers just couldn't get themselves out of trouble. They missed throws, dropped fly balls and booted groundballs. "We were a little short- handed tonight," Lecanto coach Bruce Sheffield said. "We've got some kids hurt, sick and we had a young man who made a poor decision in school so we had to sit him tonight We had to move some people around. Some people weren't used to playing cer- tain positions and it's one of those things when you hope they don't find them and they 1 ~ ~ ~~ ',': ...'"*' " .. ,_;_.:' 4).,.- -*..4-.4 ',- ''B . -, -. Iv.- ,_ _- , :: ... ,'. .-. Z.. :. ..-- :: ':% ,L ."-: BRIAN LaPETER/Chronicle Please see './Page 3B Joey Budnick deals to a Lecanto batter in the first inning of Citrus' 17-0 win. Pirates prevail DON RuA For the Chronicle Crystal River scored a 6-2 softball win at Citrus on Friday. Crystal River (9-3, 9-1) jumped out in front immedi- ately. The visitors opened the game with Ashley Clark's sin- gle, a nice sacri- fice bunt by Quincy Wilson, and an RBI sin- gle by senior Ashley Bullion. Two more Pirate runs crossed the plate in the third beginning with a bunt single by Ashley Clark, who managed to set the table all night for her teammates. A throwing error put Quincy Wilson on base and Please see PIRATES/Page 3B Cummins saves CR JON-MICHAEL SORACCHI [email protected] For the Chronicle BROOKSVILLE Up by a run in the bottom of the sev- enth, Crystal River's R.J. Cummins had inherited a tough situation. The second reliever for the Pirates, Cummins had two outs but runners on second and third to deal with and Hernando's Kyle Neal at the plate. But the Crystal River senior got a soft groundout, which he fielded for the final out as the Pirates withheld an 11th-hour rally and escaped with a 6-5 victory Friday in cross-county baseball action. Cummins earned the save while Matt Schrantz picked up the win, going 6 1/3 innings, Please see '."t.N M /Page 3B F&rNr bfts ix-time champ Agmi at Key Srsyir aI ,a ,::::: ,- "l,,,pm , * a, .. a - 'a. Mora 0N wqw wa a Sm. mjWM f SWANlo .s-O m* fl a0e a a m1e4mmma "ml li .a..- .a... a- to return .,,. HHt rirtk: *ritth' . ... .... 1 : .... ......... .... *:"*"" :-iSE 'lll [ ...::::..... ..... SPORTS 2B sATURDAY APRIL 5 CITRUS COUNTY (FL) CHRONICLE Wb- i out Copyrighted Material Syndicated Content . Available from Commercial News Providers NBA: Lewbn's 35 can't bel ~. a,. ~-' .- '., U' "a' a * -' ,- -' , *" "" -* ,, ==,* w , :: M .:-i . ,:= ,, f k, , m a .... mm .... h, (gilii *IF ( allAr W ~. * '..."".. an-.. _mMM mmw e. n.- "' . am 4w mm a .-: ..* w ... *I" '. " ':. .. ' .... b *. ,rain S .sqI . ~. ~. .5 'a .5 NBA SCOREBOARD Boston Philadelphia New Jersey Toronto New York y-Miami Washington Orlando Charlotte Atlanta x-Detroit Chicago Cleveland Indiana Milwaukee W x-San Antonio 53 x-Dallas 49 Houston. 44 Memphis 40 New Orleans 17 W x-Seattle 49 Denver 39 Minnesota 38 Portland 24 Utah 22 W y-Phoenix 54 Sacramento 45 L.A. Lakers 33 L.A. Clippers 32 Golden State 26 x-clinched playoff spot y-clinched division EASTERN CONFERENCE Atlantic Division L Pct GB L10 33 .542 6-4 37 .486 4 5-5 38 .479 41/2 8-2 42 .417 9 4-6 42 .408 9/2 3-7 Southeast Division L Pct GB L10 19 .740 7-3 30 .577 12 7-3 38 .472 19Y 3-7 56 .211 38 3-7 61 .153 42 0-10 Central Division L Pct GB L10 27 .625 6-4 31 .563 4 8-2 34 .521 7 3-7 34 .521 712 6-4 45 .375 18 2-8 WESTERN CONFERENCE Southwest Division L Pct GB L10 18 .746 6-4 23 .681 4/2 8-2 29 .603 10 6-4 31 .563 13 5-5 ' 54 .239 36 3-7 Northwest Division L Pct GB L10 22 .690 7-3 31 .557 9/2 8-2 34 .528 11 7-3 46 .343 241/2 1-9 49 .310 27 2-8 Pacific Division L Pct GB L10 17 .761 7-3 29 .608 101 6-4 38 .465 21 1-9 41 .438 23 4-6 '45 .366 28 7-3 Thursday's Games Indiana 114, Miami 108, OT Chicago 102, Cleveland 90, OT Minnesota 105, L.A. Lakers 96 Friday's Games Toronto 119, Charlotte 107 Dallas 100, Philadelphia 83 Washington 111, Orlando 102 Boston 116, Atlanta 100 Sacramento 128, Cleveland 109 New Jersey 93, New York 91 Detroit 97, L.A. Clippers 84 Memphis 93, Milwaukee 82 New Orleans 76, Houston 73 Golden State at Utah, 9 p.m. Minnesota at Phoenix, 9 p.m. San Antonio at Denver, 10:30 p.m. Portland at Seattle, 10:30 p.m. Wizards 111, Magic 102 WASHINGTON (111) Jeffries 3-5 0-4 6, K.Brown 4-9 0-0 8, Thomas 4-9 2-3 10, Arenas 8-16 12-13 31, Hugnes 9-18 10-12 30, D.Brown 5-12 0-0 11. Ruffin 0-1 1-2 1, Dixon 3-6 1-2 8, Blake 2-6 0-0 6, Profit 0-1 0-0 0. Totals 38-83 26- 36 111. ORLANDO (102) Hill 5-11 7-7 17, Howard 7-11 8-14 22, Cato 4-5 0-0 8, Stevenson 8-19 2-4 19, Francis 7-22 7-8 21, Battle 1-1 0-0 2, Barrett 3-8 0-0 7, Kasun 0-0 0-0 0, Augmon 1-5 0-0 2, Garrity 0-4 0-0 0, Hunter 2-3 0-0 4 Toials 38-89 24-33 102. Washington 29 26 3818- 111 Orlando 23 18 2833--102 3-Po.nt Goals-Washington 9-22 (Arenas 3-7, Hughes 2-3, Blake 2-6, Dixon 1-3. D.Brown 1-3), Orlando 2-14 ISievenson 1-4, Barrett 1-4, Garrity 0-2, Francs 0-4). Fouled Out-Thomas, Jetries. Rebounds-Washington 61 (Thomas 10), Orlando 54 (Howard 11). Assilss-Washington 17 (Hughes 5), Orlando 17 (Francis 5). Total Fouls- Wasnington 26, Orlando 32. Technicals- Francis. Flagrant fouls-Hunter. A- 14.107. (17,248). Kings 128, Cavaliers 109 SACRAMENTO (128) Slojakovic 9-18 2-2 22, K.Thomas 8-13 2-2 18, Skinner 2-2 0-0 4, Bibby 7-18 5-7 22. Mobley 8-12 2-2 22, Ostertag 0-0 0-0 0. Songaila 3-5 3-4 9, Evans 3-4 3-3 9, W.lihamson 6-8 5-6 17, House 2-4 0-0 5, Daniels 0-0 0-0 0, Martin 0-0 0-0 0. Totals 48-84 22-26 128. CLEVELAND (109) James 13-21 7-10 35, Gooden 9-17 1-3 21. ilgauskas 0-3 8-9 8, Snow 2-2 0-0 4, Newble 1-2 0-0 2, Varejao 4-8 4-5 12, Pavlovic 5-9 4-6 17, Traylor 3-4 0-0 6, Mcinnis 0-3 1-1 1, Harris 0-0 0-0 0, Welsch 0-3 3-4 3. Totals 37-72 28-38 109. Sacramento 32 41 3124- 128 Cleveland 33 19 3027--109 3 Point Goals-Sacramento 10-19 iMonley 4-4, Bibby 3-5, Stojakovic 2-8, House 1-2), Cleveland 7-12 (Pavlovic 3-4, James 2-4, Gooden 2-4). Fouled Out- None Rebounds-Sacramento 48 (Evans, K.Tromas 8), Cleveland 37 (James 8). Assists-Sacramento 31 (Bibby 9), Cleveland 22 (James 9). Total Fouls- Sacramento. 25, Cleveland 24. Technicals-Sacramento Defensive Three Second 2. A-20,562. (20,562). Mavericks 100, 76ers 83 DALLAS (100) Howard 4-8 3-4 11, Nowitzki 7-17 14-14 29, S.Bradley 2-6 0-1 4, Finley 4-8 0-0 8, Terry 6-8'0-0 13, Dampier 1-2 3-6 5, Harris 2-4 1-2 5, Stackhouse 1-7 3-4 6, Van Horn 4-9 5-5 15, Daniels 1-2 0-0 2, Henderson 1-2 0-0 2, Armstrong 0-1 0-0 0. Totals 33- 74 29-36 100. PHILADELPHIA (83) Korver 1-5 0-0 3, Rogers 1-11 0-0 3, Dalembert 1-5 2-4 4, Iguodala 2-5 2-4 6, Iverson 9-19 4-4 22, Jackson 7-12 8-8 22, Davis 3-13 2-2 8, McKie 2-2 0-0 4, Salmons 2-4 0-0 4, Green 3-6 1-1 7. Totals 31-82 19-23 83. Dallas 24 31 2421- 100 Philadelphia 19 22 1626- 83 3-Point Goals-Dallas 5-13 (Van Horn 2- 2, Stackhouse 1-2, Terry 1-2, Nowitzki 1-3, Daniels 0-1, Howard 0-1, Finley 0-2), Philadelphia 2-20 (Rogers 1-3, Korver 1-5, Iverson 0-2, Salmons 0-2, Green 0-2, Davis 0-6). Fouled Out-None. Rebounds-Dallas 54 (Dampier 10), Philadelphia 49 (Davis 11). Assists- Dallas 16 (Finley, Nowitzki 4), Philadelphia 18 (Salmons, Iguodala 4). Total Fouls- Dallas 21, Philadelphia 25. Technicals- Philadelphia Defensive Three Second, Jackson. A-20,464. (20,444). Raptors 119, Bobcats 107 TORONTO (119) Peterson 3-11 6-7 13, Bosh 10-22 7-8 27, Araujo 2-4 0-0 4, Alston 7-10 2-4 18, Rose 8-15 6-6 23, Marshall 6-10 2-2 18, Palacio 6-8 4-4 16, E.Williams 0-1 0-0 0, Bonner 0-2 0-0 0, Sow 0-0 0-0 0. Totals 42- 83 27-31 119. CHARLOTTE (107) Wallace 1-4 6-6 9, Okafor 11-16 7-8 29, Brezec 0-2 0-0 0, Knight 5-11 4-4 14, Bogans 2-6 3-4 8, Kapono 3-8 2-4 10, Hart 4-7 2-2 10, Carroll 6-8 4-6 17, Ely 2-3 0-0 4, Allen 3-5 0-0 6, Alexander 0-2 0-0 0, Robinson 0-0 0-0 0. Totals 37-72 28-34 107. Toronto 31 30 2731- 119 Home 25-12 20-15 20-16 21-13 21-15 Home 32-5 25-9 23-13 12-25 8-27 Home 28-9 23-13 26-10 21-14 20-16 Home 34-3 24-12 22-14 22-13 11-24 Home 24-12 25-10 21-15 16-19 15-21 Home 25-9 27-10 22-15 25-13 14-20 Away Conf 14-21 24-18" 15-2225-17 15-2224-19'." 9-29 17-26'- 8-27 17-24 Away Conf - 22-14 37-8 ' 16-21 24-17'-" 11-2519-24 3-31 8-35', 3-34 7-38 Away Conf' 17-1826-16 17-1825-16 11-24 22-20- 16-2022-19', , 7-29 21-21<" Away Conf 19-1530-11' 25-11 27-11-'- 22-1526-17"' 18-1825-19" 6-30 10-33" - Away Conf ' 25-1028-13"" 14-21 18-22 " 17-1924-19' 8-27 10-30 7-28 16-251 Away Conf' - 29-8 30-11 '" 18-1923-21 11-23 20-21-'. * 7-28 17-28 - 12-2512-29' - 1--;, Saturday's Games Orlando at New Jersey, 7:30 p.m. Miami at New Orleans, 8 p.m. Charlotte at Chicago, 8:30 p.m. L.A. Lakers at San Antonio, 8:30 p.m. Denver at Portland 10 p.m. Sunday's Games Indiana at Washington, 1 p.m. Philadelphia at Boston, 1 p.m. New York at Milwaukee, 2 p.m. , Dallas at Cleveland 3:30 p.m. Minnesota at Sacramento, 3:30 p.m. Detroit at Toronto, 6 p.m. L.A. Clippers at Atlanta, 6 p.m. Seattle at Golden State, 6 p.m. , L.A: Lakers at Memphis, 8 p.m. Phoenix at Houston, 8:30 p.m. Charlotte 18 34 2827-107 3-Point Goals-Toronto 8-17 (Marshall 4-7, Alston 2-3, Rose 1-2, Peterson 1-4, Bonner 0 1), Charlotte 5-15 (Kapono 2-5," Carroll 1-1, Wallace 1-3, Bogans 1-4, . Alexander 0-2). Fouled Out-Non&." Rebounds-Toronto 40 (Marshall 1 2,; Charlotte 46 (Okafor 14). Assists-Toronto 18 (Peterson, Palacio, Rose 4), Charlotte 27 (Knight 10). Total Fouls-Toronto 23,,,. Charlotte 21. Technicals-Hart. A- 13,550. (23,319). .,. Celtics 116, Hawks 100 . BOSTON (116) . Pierce 5-7 4-4 17, Walker 3-9 1-2 7,. LaFrentz 4-9 0-2 8, Payton 4-5 5-6 14,.- Allen 5-10 0-0 10, Davis 14-17 8-10 36,; Blount 4-8 0-0 8, Banks 0-2 1-2 1, Perkins 3-3 0-0 6, West 0-1 1-2 1,.Reed 1;-1. 0-,0o Jefferson 2-3 2-2 6. Totals 45-75 22-10 ', 116. ATLANTA (100) J.Smith 7-17 2-2 16, Harrington 4-15 7-9 15, Ekezie 4-8 1-2 9, Ivey 1-4 2-2 4,'' Childress 7-13 11-14 26, Delk 7-17 3-4 18"'. Diaw 0-0 0-0 0, Gugliotta 3-5 2-2 8,, Drobnjak 0-2 0-0 0, Collier 1-1 0-0 2','n D.Smith 1-2 0-0 2. Totals 35-84 28-35 100. Boston 32 36 2226- 116 Atlanta 18 28 31 23- 100' 3-Point Goals-Boston 4-11 (Pierce 3-4, Payton 1-1, West 0-1, Walker 0-1, Banks,, 0-2, LaFrentz 0-2), Atlanta 2-10 (Childressi, 1-4, Delk 1-5, J.Smith 0-1). Fouled Out-r-,; None. Rebounds-Boston 43 (Walker 7),-' Atlanta 51 (J.Smith 11). Assists-Boston 32 (Payton 8), Atlanta 22 (Delk 7). TotaF,; Fouls-Boston 24, Atlanta 24, 1 * Technicals-Atlanta Defensive Three Second, Ekezie. A-16,602. (19,445). ,'.. Pistons 97, Clippers 84 -" L.A. CLIPPERS (84) Jaric 10-15 1-2 24, Brand 8-19 6-6 22,,, Rebraca 2-4 0-0 4, Brunson 2-10 0-0 4,, Livingston 4-8 2-2 10, Moore 7-12 0-0 14," Chalmers 1-5 2-2 4, Wilcox 1-5 0-0 2,i, Totals 35-78 11:12 84. DETROIT (97) Prince 9-17 3-4 23, R.Wallace 6-9 0-9' 13, B.Wallace 5-7 6-9 16, Hamilton 5-15 4- 4 14, Billups 4-9 1-1 10, McDyess 6-13 0-, 0 12, Arroyo 1-3 0-0 2, Delfino 1-3 0-0'2 Campbell 0-0 0-0 0, Hunter 1-1 0-0 3, Ha 0-0 2-2 2, Milicic 0-0 0-0 0. Totals 38-77 16-20 97. L.A. Clippers 19 23 2319- 84 - Detroit 23 22 2923- 97,' 3-Point Goals-L.A. Clippers 3-10 (Jarib 3-5, Brunson 0-2, Chalmers 0-3), Detroit 5-, 14 (Prince 2-4, Hunter 1-1, R.Wallace 1-2,;'. Billups 1-4, Hamilton 0-3). Fouled Out-~,,- None. Rebounds-L.A. Clippers 42 (Brand'. 11), Detroit 45 (B.Wallace 13). Assists-.,, L.A. Clippers 21 (Livingston 6), Detroit 26 (Hamilton 11). Total Fouls-L.A. Clippers 16, Detroit 16. Technicals-Brunson. A!-;. 22,076. (22,076). Nets 93, Knicks 91 NEW JERSEY (93) Carter 9-23 11-14 31, Collins 2-4 1-2 5, Krstic 5-7 0-3 10, Kidd 7-16 1-3 186. Vaughn 1-6 0-0 2, Robinson 4-8 1-2 1.2. Buford 0-2 0-0 0, Best 4-5 0-0 6,' Scalabrine 3-3 1-1 7. Totals 35-74 15-25 " 93. NEW YORK (91) Sweetney 2-4 0-0 4, T.Thomas 2-12 r, , 4, K.Thomas 3-8 2-2 8, Crawford 7-15 5-. 23, Marbury 8-16 8-10 26, Rose 4-9 10-12- 18, J.Williams 0-1 1-2 1, Taylor 0-2 2-2 2, Jackson 0-1 0-2 0, Sundov 0-0 0-0 0, Arizar 2-5 1-1 5. Totals 28-73 29-36 91. New Jersey 18 25 2228- 93 New York 23 19 2425- 91' 3-Point Goals-New Jersey 8-22>^ (Robinson 3-4, Kidd 3-11, Carter 2-5, Best 0-1, Vaughn 0-1), New York 6-1r7; (Crawford 4-9, Marbury 2-4, Jackson 0-1, T.Thomas 0-3). Fouled Out-None. Rebounds-New Jersey 44 (Kidd 8), New.- York 57 (K.Thomas 11). Assists-NeW' Jersey 19 (Carter 6), New York - (Marbury, Crawford 4). Total Fouls-New Jersey 31, New York 24. Technicals- Marbury. A-19,763. (19,763). NBA Leaders Through March 30 Scoring G FG FT PTS Iverson, Phil. 65 656 575 1974 Bryant, LAL 56 493 480 1578 Nowitzki, Dall. 68 591 545 1810 James, Clev. 67 647 391 1762 Stoudemire, Pho.69 652 490 1795 Arenas, Wash. 68 562 446 1743 McGrady,.Hou. 69 627.376 1755 Wade, Mia. 68 552 520 1632 Allen, Sea. 68 544 352 1612 Carter, N.J. 67 572 324 1563 AV46 304,( 2&.-, 26.6,,, 26.' 26".' 2&. ,"-';,,'~"4".,'' a' , IG IX" ,:m. -,.a * * - ,iBf. "Hlllt ,um M g0 4mmom.. - -------- -.0 .. :M. ^I. HHI: 1. -. ... .. . , CITRUS COUNTY fPT3 Cornamew Spring Training Glance AMERICAN LEAGUE Toronto Los Angeles Baltimore Cleveland Minnesota New York Detroit Chicago Boston Tarppa Bay Oakland Kansas City Seattle Texas NATIONAL San Francisco New York St. Louis Colorado San Diego Arizona Houston Los Angeles Cinpinnati Pittsburgh Chicago Milwaukee Atlanta Washington Philadelphia Florida w 16 18 13 15 15 14 13 14 13 13 14 12 12 12 LEAGUE w 18 15 15 17 16 17 13 13 16 13 14 14 12 12 11 10 Friday's Games Detroit 4, N.Y. Yankees 3 Washington 3, Tampa Bay 2 Pittsburgh 5, Minnesota 4 Arizona 10, Boston 3 Texas 11, Colorado 7 Cincinnati 6, Toronto 2 Cleveland at Atlanta, ccd., rain Houston at Round Rock (AAA), 6:05 p.m. Florida vs. Mets at Port St. Lucie, 7:10 p.m. Bait. vs. St. Louis at Okla. City, 8:05 p.m. White Sox at Milwaukee, 8:05 p.m. L.A. Dodgers at L.A. Angels, 10 p.m. Cubs vs. Seattle at Las Vegas, 10:05 p.m. Oakland at San Francisco, 10:15 p.m. Saturday's Games Mets vs. Florida at Jupiter, 12:05 p.m. Cleveland at Atlanta, 1:05 p.m. Toronto vs. Reds at Louisville, 1:05 p.m. Pitt. vs. Minn. at Fort Myers, 1:05 p.m. White Sox at Milwaukee, 2:05 p.m. Arizona vs. Texas at Albuquerque, 3:05 p.m. Washington at Tampa Bay, 3:05 p.m. Colorado at Colo. Springs (AAA), 3:05 p.m. Cubs vs. Seattle at Las Vegas, 4:05 p.m. San Francisco at Oakland, 4:05 p.m. St. Louis at Springfield (AA), 4:05 p.m. San Diego at Lake Elsinore (A), 5 p.m. Kansas City at Houston, 7:05 p.m. L.A. Angels at L.A. Dodgers, 10:10 p.m. .., Sunday's Games ,N.Y. Mets at Washington, 12:05 p.m. 0altimore at Philadelphia, 1:35 p.m. 'Kansas City at Houston, 2:05 p.m. -tlorida at Greensboro (A), 2:05 p.m. St. Louis at Springfield (AA), 2:10 p.m. Tpxas at San Francisco, 4:05 p.m. '1.A. Angels at L.A. Dodgers, 4:10 p.m. Friday's Linescores At Lakeland New York (A)000000210 3 8 0 Detroit 02200000x 4 8 1 Brown, Groom (4), Wright (5) and Flaherty, Posada (5); Ledezma, Walker (7), Urbina (8), Farnsworth (9) and Rodriguez, Witson (8). W-Ledezma 1-1. L-Brown 1- 2: Sv-Farnsworth (1). HR-Detroit, Pena (3. &arlos Pena hit a two-run homeland an RBf single f&r the Tigers. Kevin Brown ailc- Nwed -,x hits and four runs over three innings for the loss. o. AtViera Tampa Bay 100001000 2 6 1 Washington 00000201x 3 8 2 'Iendnrckson, Seay (8) and Laker, Riggans (7); Day, Tucker (7), Osuna (8), Coqdero (9) and Schneider. W-Osuna, 1- 1 a.-Seay, 0-1. Sv-Cordero (2). HR- VWhington, Johnson (1). Zach Day struck out six and allowed two runs on five hits over six innings for the Nationals. Mark Hendrickson gave up two runs on six hits over seven innings for the D6vil Rays. ''r. At Bradenton Minnesota 121000000 4 10 2 Pittsburgh 000001301 5 8 0 SMilva, Crain (6), Sawatski (8), DePaula (9) and Miller, LeCroy (6); M.Redman, Vogelsong (6), Grabow (7), Gonzalez (8), Meadows (9) and Ross. W-Meadows, 1- 1. L-DePaula, 0-1. HRs-Minnesota, Barlett (2), Castro (2). Pittsburgh, J.Wilson (1hris Duffy scored the winning run for the' Pirates on a throwing error by Julio DePaula in the bottom of the ninth. Carlos Sova allowed two hits over five scoreless inr(Tngs for the Twins. SAt Phoenix Boston 200000100 3 8 1 Afiona 60211000x 10 14 0 ',Wakefield, Kester (1), Halama (5), Neal (6), Perez (7), Meredith (8) and Mirabelli, Byekley; Webb, Choate (7), Aquino (8), Koplove (9) and Brito, Myers. W-Webb, 2-0, L-Wakefield, 0-1. -Brandon Webb pitched six innings for the wig, allowing two runs on six hits and strik- ing- out four. Tim Wakefield gave up six runs on six hits and two walks in 273 inning for the loss. CUMMINS Continued from Page 1B giving up three runs on five hits and three walks while striking oit five. "I've been in a lot of tough sit- uations like this before and I ihad 100 percent faith in my d.'fense," said R.J. Cummins. ,James Johnson was saddled with the loss for Hernando. The senior hurler threw 143 pitches &ver the course of 6 2/3 innings, giving up six runs on seven hits. ,,Johnson struck out 11 but was hindered by eight walks and tt A - I I On the ,'..:tVES TODAY'S SPORTS AUTO RACING 2 p.m. (13 FOX) (51 FOX) NASCAR Racing Busch Series - Sharpie Professional 250. From Bristol Motor Speedway in Bristol, Tenn. (Live) (CC) BASEBALL 12 p.m. (FSNFL) MLB Baseball New York Mets at Florida Marlins. From Dolphins Stadium in Miami. (Live) 1 p.m. (SUN) College Baseball Virginia at North Carolina. (Live) 4 p.m. (ESPN2) MLB Preseason Baseball Chicago Cubs vs. Seattle Mariners. From Las Vegas. (Live) (CC) (SUN) College Baseball Georgia at South Carolina. (Live) (WGN) MLB Preseason Baseball Chicago Cubs vs. Seattle Mariners. From Las Vegas. (Live) (CC) BASKETBALL 6 p.m. (6 CBS) (10 CBS) College Basketball NCAA Tournament Semifinal Illinois vs. Louisville. From St. Louis. (Live) (CC) 7:30 p.m. (66 PAX) NBA Basketball Orlando Magic at New Jersey Nets. From Continental Airlines Arena in East Rutherford, N.J. (Live) 8:30 p.m. (6 CBS) (10 CBS) College Basketball NCAA Tournament Semifinal Michigan State vs. North Carolina. From St. Louis. (Live) (CC) (WGN) NBA Basketball Charlotte Bobcats at Chicago Bulls. From the United Center in Chicago. (Live) (CC) BOXING 8 p.m. (IND1) Boxing Talmadge Griffis vs. David Tua. David Tua battles Talmadge Griffis in a heavyweight bout. From Auckland New Zealand. (Taped) HORSE RACING 5 p.m. (9 ABC) (20 ABC) (28 ABC) Horse Racing Florida Derby. From Gulfstream Park in Hallandale (Live) (CC) 7 p.m. (ESPN2) Horse Racing WinStar Oaks and WinStar Derby. From Sunland N.M. (Live) (CC) FOOTBALL 7:30 p.m. (SUN) Arena Football Georgia Force at Tampa Bay Storm. From the St. Pete Times Forum in Tampa (Live) GOLF 8 a.m. (GOLF) European PGA Golf Algarve Open de Portugal Third Round. (Live) 3 p.m. (2 NBC) (8 NBC) PGA Golf BellSouth Classic Third Round. From Tournament Players Club at Sugarloaf in Duluth, Ga. (Live) (CC) 7 p.m. (GOLF) Golf Central (Live) GYMNASTICS 3 p.m. (FSNFL) Women's College Gymnastics Pac-10 Championship. From Berkeley, Calif. (Taped) 4:30 p.m. (FSNFL) Women's College Gymnastics Big 12 Championship. From Norman, Okla. (Taped) RODEO 8 p.m. (OUTDOOR) Bull Riding PBR Ty Murray Invitational. From Albuquerque, N.M. (Taped) SOCCER 9 a.m. (IND1) Premiership Soccer Blackburn Rovers vs. Manchester United. (Live) 3 p.m. (9 ABC) (20 ABC) (28 ABC) MLS Soccer D.C. United at Club Deportivo Chivas USA. From the Home Depot Center in Carson, Calif. (Live) (CC) TENNIS 12 p.m. (6 CBS) (10 CBS) Tennis NASDAQ-100 Open Women's Final. From Key Biscayne (Live) (CC) S' . .. ......-""" TODAY'S PREP SPORTS BASEBALL 7 p.m. Paulding Co. (Ga.) at Crystal River TRACK AND FIELD 10 a.m. Seven Rivers at Montverde. Academy '' NCAA Tournament FINAL FOUR At Edward Jones Dome St. Louis National Semifinals. Saturday, April 2 Illinois (36-1) vs. Louisville (33-4), 6:07 p.m. North Carolina (31-4) vs. Michigan State (26-6), 8:47 p.m. Championship Monday, April 4 Illinois-Louisville winner vs. North Carolina-Michigan State winner, 9:18 p.m. NCAA Women's Tournament THE FINAL FOUR At RCA Dome Indianapolis Semifinals Sunday, April 3 LSU (33-2) vs. Baylor (31-3), 7 p.m. Tennessee (30-4) vs. Michigan State (32-3), 9:30 p.m. Championship Tuesday, April 5 Semifinal winners, 8:30 p.m. three hit batsmen. The Pirates led 6-2 heading into the bottom of the seventh after Cummins delivered a two- run double that scored Dustin Robbins and Heath Frederick, But Hernando (9-4), which had scratched out a run in each of the fifth and sixth innings, start- ed to capitalize on its opportuni- ties during their final at-bat. After Schrantz struck out Adam Watson to lead off the inning, the Crystal River junior hit Blake Vanderford with a 3-2 pitch to put a runner on first with one out After Schrantz threw a single pitch to Matt Padgett, the junior 0 O. - Nextel Cup-Food City 500 Uneup After Friday's qualifying, race Sunday At Bristol Motor Speedway Lap length: .533 miles (Car number In parentheses) 1. (38) Elliott Sadler, Ford, 127.733 mph. 2. (07) Dave Blaney, Chevy, 127.444. 3. (2) Rusty Wallace, Dodge, 127.048. 4. (24) Jeff Gordon, Chevy, 126.964. 5. (77) Travis Kvapil, Dodge, 126.955. 6. (43) Jeff Green, Dodge, 126.603. 7. (12) Ryan Newman, Dodge, 126.537. 8. (19) Jeremy Mayfield, Dodge, 126.537. 9. (9) Kasey Kahne, Dodge, 126.503. 10. (16) Greg Biffle, Ford, 126.503. 11. (20) Tony Stewart, Chevy, 126.461. 12. (25) Brian Vickers, Chevy, 126.403. 13. (29) Kevin Harvick, Chevy, 126.312. 14. (48) Jimmie Johnson, Chevy, 126.303. 15. (40) Sterling Marlin, Dodge, 126.245. 16. (44) Terry Labonle, Chevy, 126.179. 17. (42) Jamie McMurray, Dodge, 126.104. 18. (32) Bobby Hamilton Jr., Chevy, 126.013. 19. (8) Dale Earnhardt Jr., Chevy, 125.947. was pulled in favor of Todd Bayer Bayer issued a walk to Padgett and a single to Monte Ketchum to load the bases. Jeff Oleson came to bat next and took a 1-1 pitch to right center- field for a double that scored pinch runner Mike Devary and Padgett to cut Crystal River's lead to 6-4. After a visit to the mound, it was ruled that Bayer had to be pulled because the Pirates had exceeded their allotted visits to the pitcher's mound that inning. Cummins came in and got Johnson to ground into the inning's second out, but Ketchum scored on the play to pull the Leopards within 6-5. With Oleson on third, Cummins issued a walk to Eric Neal, who stole second a batter later to put a pair of runners in scoring position. But Cummins diverted disas- ter by securing the final out Crystal River (7-5) had jumped out to a 4-0 lead after four innings by capitalizing on walks and wild pitches thrown by Leopards' Johnson. The lead could have been substantially more but the Pirates left 15 run- ners on base, including leaving the bases jammed in the first and fifth innings. -A --- -. .- m .0.. - --m. 4Mb.- b. .. a . -b .. . - S - . .- . --d - - a e. e --Availabld Available from Commercial News Providers *.-0 - -rn-.~ - -w - - - 0 ~ ~.- - 0 20. (21) Ricky Rudd, Ford, 125.947. 21. (88) Dale Jarrett, Ford, 125.897. 22. (4) Mike Wallace, Chevy, 125.897. , 23. (92) Stanton Barrett, Chevy, 125.782. 24. (31) Jeff Burton, Chevy, 125.716. 25. (17) Matt Kenseth, Ford, 125.642. 26. (97) Kurt Busch, Ford, 125.568. 27. (15) Michael Waltrip, Chevy, 125.436. 28. (10) Scott Riggs, Chevy, 125.354. 29. (50) Jimmy Spencer, Dodge, 125.313. 30. (49) Ken Schrader, Dodge, 125.281. 31. (41) Casey Mears, Dodge, 125.003. 32. (22) Scott Wimmer, Dodge, 124.954. 33. (08) Shane Hmiel, Chevy, 124.954. 34. (6) Mark Martin, Ford, 124.922. 35. (66) Hermie Sadler, Ford, 124.889. 36. (11) Jason Leffler, Chevy, 124.646. 37. (45) Kyle Petty, Dodge, 124.581. 38. (18) Bobby Labonte, Chevy, 124.259. 39. (5) Kyle Busch, Chevy, 124.210. 40. (01) Joe Nemechek, Chevy, owner points. 41. (0) Mike Bliss, Chevy, owner points. 42. (99) Carl Edwards, Ford, owner points. 43. (00) Carl Long, Chevy, 124.387. Failed to Qualify 44. (09) Johnny Sauter, Dodge, 124.162. 45. (37) Kevin Lepage, Dodge, 123.945. 46. (7) Robby Gordon, Chevy, 123.190. 47. (27) Brad Teague, Ford, 121.813. 48. (34) Randy LaJoie y, 120.999. 49. (89) Jason Jarrett, Dodge. TRANSACTIONS BASEBALL American League BOSTON RED SOX-Placed RHP Wade Miller, RHP Curt Schilling and OF Adam Stern on the 15-day DL. DETROIT TIGERS-Sent RHP Gary Knotts and LHP Steve Colyer outright to Toledo of the IL. KANSAS CITY ROYALS-Placed 3B Chris Truby and RHP Scott Sullivan on the 15-day DL NEW YORK YANKEES-Announced LHP Alex Graman cleared waivers and was sent out- right to Columbus of the IL. Optioned INF Felix Excalona, RHP Scott Proctor and C Wil Nieves to Columbus. Reassigned INF Russ Johnson, INF Damien Rolls, LHP Buddy Groom, RHP, Aaron Small, C Joe DePastino and OF Colin Porter to their minor league camp. OAKLAND ATHLETICS-Signed Billy Beane, general manager, to contract extension through 2012 and Michael Crowley, president, to a con- tract extension through 2008.. SEATTLE MARINERS-Claimed INF Wilson Valdez off waivers from the New York Mets. Placed RHP Rafael Soriano on the 60-day DL. TAMPA BAY DEVIL RAYS-Agreed to terms with OF Carl Crawford on a four-year contract. TORONTO BLUE JAYS-Placed LHP Ted Lilly on the 15-day DL, retroactive to March 25. Released RHP Kerry Ligtenberg. National League LOS ANGELES DODGERS-Announced Lon Rosen, executive vice president and chief marketing officer, and Gary Miereanu, vice president of communications, are no longer with the team. PITTSBURGH PIRATES--Released OF Ben Grieve from a minor league ,oniract. Placed RI4P John Van Benschoten on the 60-day DL. ,/ WASHINGTON NATIONALS-Reassigned INF Carlos Baerga to their minor league camp. FOOTBALL National Football League ATLANTA FALCONS-Released LB Chris Draft. .. . ' CINCINNATI BENGALS-Re.-igned CB. 'ReggP3a Myles to a orle year contract CLEVELAND BROWNS-Released S Eard Little. DENVER BRONCOS-Re-signed DT Luther Elliss, DT Monsanto Pope and TE Patrick Hape. Signed RB Ron Dayne. DETROIT LIONS-Signed RB Jamel White. GREEN BAY PACKERS-Re-signed RB Najeh Davenpon HOUSTON TEXANS-Reiea.ed LB Jamie Sharper. NEW ORLEANS SAINTS-Agreed to terms with RB Antowain Smith on a one-year contract. SAN DIEGO CHARGERS-Re-signed LB Stephen Cooper to a one-year contract. SEATTLE SEAHAWKS-S.gned CB Omare LoWe. COLLEGE CENTENARY-Named Rob Flaska men's basketball coach. EAST CAROLINA-Named Shannon St. George women's assistant soccer coach. MINNESOTA-MANKATO-Named Dennis Amundson women's volleyball coach. NORTH DAKOTA STATE-Announced sen- ior volleyball MH Sheri Swanson will not return for the 2005 season. PALM BEACH ATLANTIC-Named Jose Gomez men's soccer coach. Promoted Dwayne Whiteheart to assistant athletic director for aca- demic support. PHILADELPHIA-Named Mark Heineman baseball coach, effective at the end of the 2005 season. PURDUE-Promoted defensive tackles and special teams coordinator Mark Hagen to assis- tant head coach. TULANE-Named Dave Dickerson men's basketball coach. UNC-GREENSBORO-Announced the res- ignation of Fran McCaffery, men's basketball coach, to take the same position at Siena. - -40 1 - * - Nm o mo "b -"o op ea p 2 ae e M on a two-run double by Ryan ME MMDpnq-n McPherson, Citrus began the, second frame inauspiciously -OO s Continfra edfme n lB with Nick Van Gorder drawing a walk on five pitches from Chris Hudak. Joey Budnick popped out and then things.got out of hand. Lecanto catcher Herbie Sickler tried to throw out Van Gorder attempting to swipe second, but no one was on the base to cover the throw. Anthony Delguidice then brought Van Gorder home with a double, and was brought home himself on a double by Randy Hernandez. Matt Lehman followed by popping up to shallow left field, but a trio of Panthers seemed to be confused as to who should field the ball and let it drop. Hernandez scored and Lehman advanced to third on a single by Nick Delguidice, who took second base on the throw. Hudak hit the next bat- ter, Mark Xenophon, to load the bases. McPherson followed and hit a routine grounder to short- stop, but the throw was dropped at second base, allow- ing him to reach safely and Lehman to come home. Nick Delguidice then scored from third on a wild pitch to batter Chase Smith. Smith made it a 9-0 game in the Pirates' next at-bat by driv- ing in Xenophon and McPherson with a stand-up PIRATES Continued from Page 1B moved Clark around to third, where she scored moments later on Bullion's sacrifice fly. Wilson came home when Cassidy Rash reached on an error. Bullion finished the game 2- for-3 with 3 RBIs. "I was seeing the ball real well tonight", Bullion said. "Some players don't like the pressure when runners are on base, but I thrive on it I seem to be able to focus well in that situation." Citrus played well, but fell victim to its oWn mistakes. "I think we actually out hit them, but you wouldn't know it by the score" Hurricane coach Mike Reynolds said. "Overall, I think our girls played very well." Citrus settled down late in the game after falling behind early Hurricane pitcher Jillian Couillard sat down nine bat- ters in a row and faced only 10 total Pirates batters in the final three innings. Couillard was sharp with the bat as well, going 2-for-3 for the night, with an RBI in the sixth driving in the Hurricanes first run. "Jillian has been struggling lately, but she came through tonight" Reynolds said. But it was the fourth inning aft-Am A4b aM e..e a me ~ ___ Ob 40-441W Cyh Mtr. - Copyrig hted Material - p rc s m ede i dobe. - S amn o ao goi to a -ampnan o-lead Th Hurricanes managed only six hits in the biga inning, but were aided byLecantos five errors. "You can't give people who swing the bats like Citrus does extra outs," Sheffield said. "You're going to have errors in a game. Kids are going to make mistakes. We've got some young kids playing, and maybe in bigte games they get a little tight. Some nights you can play flaw-id less and some nights you can't catch its. We've just got to come While his team was taking it to the opposition at the plate Budnick was putting in a solid night's work on the mound. He Cit most of his spots and never faced more thaan four batters an inning. The sophomore right-hander spanned all five innings, giving up only two hits while striking out three. re The Hurricantoes added their inal four runs in the fourth in a pair on a double. "I th'rink they're just getting mostre comfortable now," Bolin playing more games in a row and we're starting to see more live pitching. You can throw all the (batting practice) in the world, but nothing gets you ready like seeing live pitch- ing." Citrus hosts Paulding to Crystal River for a 6:30 p.m. game, also on Tuesday. "I tink hey'e jut getin -- Syndicated Content 3 Available from Commercial News Providers .- "Copyrighted Material ft - -. I -.-- *" -- nt-nt- - - -' "Sndt- tC Sy.dic -ated Cntent bSyndicated Content SATURDAY, APRIL 2, 2005 30 SPORTS L'i 1 RU5 1-(-)UIV I y put Couillard and the Canes deep in a hole. After two errors led to two unearned runs in the third, the Pirates saw their opportunity and jumped on it in the fourth. Couillard tried to take the wind out of Crystal River's sails by striking out the first two batters, but the visitors would not be denied. Four successive hits scored three quick runs, putting the game away for the Pirates. Back-to-back singles by Elisha Fitzpatrick and Ashley Clark, followed by Wilson's big double to the fence that drove in two. Another single and RBI by Bullion sealed the Hurricanes doom. Even though the Hurricanes were able to tighten up their game in the fifth and play inspired ball, it was too little, too late. In the end, both teams had eight hits. Both pitchers - Couillard and Rash had seven strikeouts. The Pirates left five runners on base, and the Hurricanes left four. The numbers were even. The final score was not Crystal River coach Justin Wentworth attributes that to his team's will to win. "You give us an opportunity like they did in the third innings with the errors and we will run," he said. "We work on running a lot. They played us tough, but had a couple of rough innings that they could- n't make up" I-. - - . 4B SATURDAY, APRIL 2, 2005 SPORTS CITRus COUNTY (FL) CHRONICLE.' Dean4;arcia box central to Louivilie's - .0o 0 -- -0 - - 4 .0 .0 .0 0 -4 *0 0- - -- .amm - a S-.0 -0 0 - -0 - C -.0 .0- 0 - 0. .0 - - .0 -.0 -0 -Q -.0 - C a -~ - -. - .0 a - - -- .0 .0-..0 ~0 - .0 .0 ~.0.0 - .0.0 ~ *0 - .0 -~ .0 - - ~-".0 - .0 - .0. - - .0 .0 .0- .0 .0- .0 - - .0 - - .0 - - -o - - 4 .0.0 * .0 .0 .0 - -- .0 -.0 * S .0~ ~- - 4 .0 - -.0 - - - -.0 -..0 Co .0 - - - .0 -.0 a .0 - - .0 - .0 ~ .0 C .0 C.. -- - - -e - -.0.0 a .0 - -M- ft m C -4 0 0 ,a0.0 en.- .0 .0 * '. ql, nn.0mw * ~.- .0 * ~ .0- .0 ~.0 o - .0 -- 41 .0 a-*.0 M 0 410 .0p -.0 q 0 - 4w0- 4- o 0nnqw ann.u , CopyrightedMateria a Fa Four yn dicat e Conte nt - Availabl from -ommercial News Providers .0- - I- -f. .0 .0 mom 4- 4b.- 0 %*am ~ ~ .0 --NEW- 0 .0 -4D 0.. -.9110- -- .0.010MP cmo-.0 -0U f "m 4Dq. 0 & 4@0 =:_00_40- _b __b 0 qw --.o oAn- d--- 4b - 0.0 - 0-- .0 - - 4~ * .0 .0 - a .0 -0 - 0 - 0-- - .0 * .0 - .0 0. - .0- - 0' C b.0a - '0.0 - .0 .0 -.0 S - - a - a - * a .0 - a -.0 .0 .0 .0- 0-o ~ .0 ~ * -~ 0 a- .0 .0 .0 a - - .0 0 .0 .0 .0.0 0 .0~ -.0 .0 -~ .0 '0 -.0 .0 - - 0 .0 m .0.0 *.0 0 .0.- .0 C.~ - a - 0.- - .0.0 w m.0 -06 %MA -m .0 "Da4WD - q- -um a400 * IM- -we c -ft 41 - .0 0 . . .0. - 4b -. q. 0 .- 40 - 4w--- 0 . ft. qp .0 . .0 .0 -- -m - 0 p- - MOO too. 0 0 ob.- 4 1 - W- .Ma mm- 40 f .n 0 e o .-u o. *-am -O40. 4b .41 .0.-nP eb .0-nm . m 4nqp -a-- em 490 .0 ft ow mo op 41 -. ob0 --a 4b.40 400--M -.4 .40 40 .l qw -4 44hw- 40- .0 .0 4m 40 w3 .0 40 olam m m -a M. sm 4p 400M .10 0w- em a 40 - -.up Immak- d- q.0 s W0-0 w .tpO0m - -m m - 4WD -db-410 w o 0 40. .0.4m 0 41 440 .400 *.0 . U .4P. 400 0 0 .0 - .0 0mb- w 40 w 4 0 0.0 0 .m 0 mm -0 a do qw 40 -40 aw . 6- 4 bow. dW --up. MAN .-.0410 40 -a . Bogut named player of t year ~0 -.0 -.0 - .0 = - .0 0 - a e .0- CO 0 .0, 0 * 0- 0 mn o 0. .0 - .0 d - Co - 0 .0 -.0 -~ 0 .0 0 .0 .0 0 C - ~.0 S m - ~ ______ - .0 - ~ .0 ~ e.0 - - C 0 .0 4 D .0 0 - a .0 .0 .0 0- p e P 0 qw Q .0 .0 o ..M q-.0 0 q 4a0.0 .0 .0 0 -. .0 .0 0u 0,0 0 -.am VP -Aft0 0 .0.- - Cqu -uO w '%0* &- 0.. - 0* w..-sot- ---o -4- 0 --w -- C. N d.NIE 041D MND.-M O - .m- 0 O.0mmnam, AM f S 64WP- 0 b- d U -0 al,. oo 00qu son R0 *oal - mim- smomm %b0 0 --m- o *OM 411 a4, -~ ,NNW 0 41111P 41owww .0 41IN .0I O 0 * - .0- .0 Guards, ew. ()TRJ!.~ (Yfl7N7Y (FL) CHRONICLE SPORTS SATURDAY, APRIL 2, 2005 5B ~ Washington's Ion ......... baseball wait nearly over 0) wmi Copyrighted Material Syndicated Content Available JromlCommerciaIl News Providers 6" t-,!I'IJftIt w *.5. , (Illum m 0 ,11 -b mi. *-.,- w .memmi m b lllmm mmihla m almgp a *lAM ft dW mi.- ..~ .- A: ,W Sm * Could eroid testing lead to drinking batters? SATURDAY, APIUL 2, 2005 SB :- SPORTS OTRUS COUNTY (R) C CLE *SK- Ap" "w" . ijik *lHr Itt ^I|IP m ..... ** * 1.,r CITRUS COUNTY (FL) CHRONICLE 6B SATURDAY, APRIL 2, 2005 toCitrus * A * (h-I d n%'6m)tormial t.p ('h.ldna a Copyrighte'd Material a Syndicated Content Available from Commercial:News Providers 6 .04fbo* -00m ft lom. q f - 4osw -; -E W"--* M- U .*; i.-..s ,->..*...... :. -..- .sm ^....... ... u- =^^ .-'.v ....... '?:. .* ri-- ^^;*^ --' &ai-.- ^ ...- -. HpB^"^-..---- |p g .^ ... .. -w --v I..I 'dim. -RF f.Ra y ..jOTIiva eaVgE '.. -:*;- ..':. ^ NEW 'OS DODGE, V6KIM ll 11M Hitch, Nicely Equipped! Plus a 7 Year/70,000 ile NEW '05 DODGE V-8, lip !iflpr diea ,001 Ile Powertrain Warranty! 2 QItk2v ,B i! 24-HOUR, AUTOMATEDl 'FEI STAR DEAL 'Payments Wand of S39. prove l hide "lE L- ""f ll W 7324I 4 S. 14 i |F 1 TTrIrk',r, -*VARIES BY MODEL, EXCLUDES SRTAND SPRINTER. 0% Financing In lieu of rate. All prices and payments with approved A + credit at Chrysler Financial. fees, 72 months ato 5%apr. All prices quoted include factory rebates and Chtyster Financial Cash. 0% ar offes are In lIeiu o factory rebate but Chrislr Financial Cash Bonus still app lOs. ars lius tax tag o dealer ff in stock but subject to prior sale. Vehicles in ads are for Illustrallton purposes. 'See dealer for a copy of this limited warranty. Transferable to second owner with fee. A deductible applies. See dealer for all details. .jtW!,RA'L-EODGECOM' SPORTS AA ;=,<* sk:- *'as- *S1 *XK .(-"--- k A I __ APRI 2, 200 New hymns mix with old Special to the Chronicle Matthew Smith records praise songs recently In a recording studio. Musical group feels there's room for both NANCY KENNEDY [email protected] Chronicle Matthew Smith remembers singing praise songs as a teen and feeling mis- erable. "I used to lead worship in high school for my youth group, but always felt inadequate as a worshipper," he said. "I never seemed to be able to stir up the kind of emotions in myself that I saw in others, or that I imagined should accompany worship through song." It wasn't until after he graduated col- lege and was introduced to old hymns put to new music that he discovered worship in the way he had always want- ed to experience it. Now, as lead singer of the Indelible Grace touring band, and one of the vocal artists on the Indelible Grace albums, Smith is part of what he calls' the "new hymns movement," which joins old hymns with new music. Smith and the Indelible Grace band will be in concert at 7 p.m. Friday, April 7, at Seven Rivers Presbyterian Church in Lecanto. Admission is $6 for adults; students are free. They will also be in concert at 7 p.m. Saturday, April 9, at amum n 0. nn. ,- mm 'om -m u __lmm_, _fm 40 0 f lmmwm_ wo w & so4 - -.0w/OP .t a -m /-/ll- IE~~ ~ Good Shepherd Presbyterian Church, 151 S.W 87th Place, in Ocala. The Indelible Grace CDs contain such classic hymns as "Come Ye Sinners," "What Wondrous Love is This" and "Praise My Soul the King of Heaven." Smith said he's not "anti-praise songs," but he does contend that wor- ship leaders need to be discerning in their song choices and "sensitive to the realities of their congregations." '"Are the songs that you sing honest? If a hurt or discouraged person walks into your worship service, will they be met where they are in the songs, or are they Please see HYMNS/Page 7C Nancy Kennedy GRACE NOTES The gospel of Charlie A few weeks ago, I visit- ed with my friend Joan. She's the one who convinced me to go with her to do laundry for hurri- cane relief workers after Hurricane Charley de- stroyed central Florida last year. I had gone just that one time, but Joan went back repeatedly. Joan has one of those kind hearts that I only dream of having. I'm hoping if I spend more time with her that some of her kind- heartedness will rub off on me. Joan has never met an ugly dog. There's no such thing as a stray as.long as she has four walls and a roof. She likes people, too she adopts those as well. During one of her laundry trips last fall, Joan wan- dered over to the makeshift animal shelter and put her name on about a dozen or so dogs to take home in case their owners didn't claim them. She ended up with Charlie, named after the hurricane that left him homeless, Charlie is a brown and white cocker spaniel; only when Joan first saw him, he was mostly a ball of matted fur and flea bites, Please-see GRAC/Page 7C -N M-"mm a. lb .M Il *40% MWOOM -Al P&qA- Copyrighted Material Syndicated .Content I~ ~ ~ rn v'~~ I T Available from Commercial News Providers .t, . A. ~ ., K. :. fa.. Calendar ofEVENTS Special EVENTS Hear Gospel music N JESUS ISI Ministries Inc. will have "Gospel Music Jamborees" at 2 p.m. today. Suncoast Baptist Church in Homosassa will host an outdoor Christian Southern Gospel sing from 2 to 4 p.m. today. Featured performers include the New Glorybound Singers, Three for Hymn and the Owens Family. Admission is free. Bring lawn chairs and blankets. Free hot dogs will be served. Food coolers are permissible. Everyone is welcome. The church is at 5310 S. Suncoast Blvd. Call 621-3008 or 382-7181. N United Pentecostal Church of Inverness will have a gospel concert at 6 p.m. today featuring the New Glory Bound Singers, April Haganey and the "sweet Southern sounds" of Lee Britt. Call 341-3683. M The River Jordan Quartet, a Southern Gospel group, will be in concert at the 10 a.m. service Sunday at Community Congregational Christian Church of Citrus Springs. No tickets are required. A free-will offering will be received. Call (352) 489-1260. Revival events set Cornerstone Baptist Church will host a revival with Dr. George Thomasson. Revival services will be at 6:30 p.m. Sunday through Wednesday. Events planned include: A family fishing outing today for youths ages 6 through 12 and 13 and older (by reservation only). High attendance Sunday serv- ices from 8 to 9 a.m. and 10:45 a.m. to noon with Sunday school classes for all ages from 9:15 to 10:30 a.m. A golf outing for church mem- bers and invited guests Monday (with reservation only) followed with lunch and a devotional mes- sage by Dr. Thomasson. Call the church office for infor- mation at 726-7335. The church is on the corner of Hilltop Court and Old Floral City Road. 'Tricky Tray' event The St. Scholastica Council of Catholic Women will have its annual "Tricky Tray" event at 11 a.m. today at Pope John Paul II Catholic School, 4301 W. Homosassa Trail, Lecanto. Refreshments will be served and many outstanding baskets will be available. Drawings start at 1 p.m. Tickets are $3 each. Lunch is available. All are welcome. For tickets, call Noreen at 527-7292, Please see EVENTS/Page 5C = ~Sflmrnmnr Urban revival center *If * . ...... ...... - ..... .4 0i3 co --ptto om b- -o . m J n ","" , wo qpwadmmmm 0 IV CITRUS COUNTY (FL) CHRONICLE, Places of worship that offer love, peace and harmony to all. Come on over to "His" house, your spirits will be lifted!\ ! HE Crystal E3B River Foursquare Gospel Church 1160 N. Dunkenfield Ave. 795-6720 A FULL GOSPEL FELLOWSHIP Sunday 10-30 4.m. Wednesday "Chrisian Ecd" 7:00 P r.: Pastor Brona Larder St. Benedict Catholic Church U.S. 1u at Ozello Rd. -MASSES- Vigil: 5:00pmo Sun.: 8:30 & 10:30am DAILY MASSES Mon. Sat.: 7:30am HOLY DAYS As Announced CONFESSION Sat.: 3:30 4:30pm 795-4479 11 St. Timothy 1 Luthcran Clhurchl ELCA 1070 N. Suncoast Blvd., Crystal River 795-5325 Saturday Informal Worship 5:00pm Sunday Worship 7:30am, 8:30am and 11:00am Sunday School All Ages & Adults 10:00am Nursery Provided Active Youth Program Re\. David S. Bradford. Pastor West Citrus Church of Christ 352-56- Church Tra:uiL, . 500 i PM Wednesday Prayer MN1etmgu . 700 f -f Pastour Randiall Wltkimnon 795-2086 (t) Crystal River Church of Cod Church Phone 795-3079 Sunday Morning--- 8:30 A.M. Sunday School------10 A.M. Church Service ----- 11 A.M. Deaf Service -------- 11 A.M. Evening Worship-----6 P.M. Wed. Prayer Meeting -----7 P.M. 21 SO 8 1 W c% Toilor,-.n.ee Rd 121. .. .ite cr-cog. orn ,:.. | METHODIST I I CHURCH / f .r i ,f o',/ Rev. AlanR Jefferson 5senii Sunday Worship 8:00 & 11:00 A.M SContemporary Services 9:30 A.M. SSunday School 9:30 & 11:00 A.M. S Nurecr, Mailable at all Serx ice' Kid Zone Children's Worship 9:30 a.m. Youth Fellowship S 4:30 p.m. Kid's Club 4:30 p.m. A Stephen Ministry Provider 795-3148 VI9:0kle Pretorius 795-8883 .b : "- S f Paisiors D;nc & Susie Siningcr .Pimcerl'ul Praii'e & \\worshiI) .Nurser. & "Kids Church" SYouth Program .Food Pantrr Sunday 10:30am & 6:30pm Wednesday 7pm 795-LIFE ( 5 -3 3) i'H i.ahundanilifecitrus.org I I. FIRST BAPTIST CHURCH CRYSTAL RIVER 700 Citrus Avenue 795-3367 RtL Di'i Ttit, :kmorton. Pali'r Sunday AM Services 8:15 Contemporary worshipp Sern ice 9:30 Bible Study all ages 10:45 Worship Sery ice Sunday PM Services 5:00 AWANA Clubs 5:00- Adult Discipleship and/or Home Studies Call for details. 5:45 Student Discipleship Training Wednesday PM Services 5:150 Fanul\ Supper tRSVPt 6:00 Worship Sen ice Children & Youth Activities N15uservy Carec Always Provided ASSEMBUES OF GOD 5:0 AVN lb First Assembly of God Come One Come All!!! Service Times: Sunday School 9:00 a.m. Morning Worship 10:00 a.m. Wednesday Bible Study 7:00 p.m. Richard Hart Senor Pastor 4 MiLEs EAST OF Hwy. 19 ON Hwy. 44 ,(32)79-250NE'S EPISCOPAL CHURCH (Anglicn) 'J .' -'Hn- In ChargE Fr .tert1 Larrri "C Fr Frdv rw,. C H .irrs:.n F'ri -.t ,A',.. 'xiti Fi a d Hvri, BroTi ici.ori REi, d jaul C.ill, an eiL r REi dJ C r,,r,, B nIa kr Dc .:,:,.n Hol\ Eunhrit n 0 li& 1 1 .1 a-; dal S,-hrcl 11 lt ) r .1 Adult Chritan Ed I15 . Tuecvda\ Hoie Eucharimt "00 i r Thur-1dv HoI\ Eucharint I HelahrigPi 30 ri 1 "il: U'l.t "t ., Ihi f'hi ,it,,',' i p 9870 IV. Fort Itland Tr., Crvlal Riher 795-2176 LAKE CHURCH (SBC) RP-r. Mr* M Bertine "Exciting & Contagious Worship" Sunday 8:30 am and 10:30 am Adult Worship Kid's Worship - (Worship jusl lor Kidsi 5:45 pm Evening Activities: Adult Bible Studies Teen Program (Grades 6-12) Kids Connection (3 yr. old 5th Grade) Hw 4,CrstlRie Nursery and Children's . S Our purpose: To honor the Savior by shepherding people into a meaningful relationship with God Byron Hendry, SIPastor 4 (352) 628-0964 CRYSAL ' MOUNT OLIVE MISSIONARY BAPTIST Daniel G. Savage III CHURCH Pastor Sunday Services * Sunday Scrul '9 31j a P.1 SMurriing Serviter 11 iJ0 A M * Wed Prayer Menring Bilfe Stuild 1200 joi ri t. ,. 31) p 211i5 I Georgia Rd., PC Bo- 327 4 trysiai River FL 34423 Church FPror.e .. r- (352) 563-1577 Home of Positiv P^racialChristianity Where wse learn how to live happier, more successful and prosperous lives. Sunday, April 3 9:15 am: Chat Room Class: "Spiritual Prosperity" Service 10:00 am "Shake the Kaleidoscope!" 320 S. Citrus Avenue Crystal Ricer Woman's Club House Rev. Linda Harbin Ordained Unity Minister (352) 382-1711 SHOMOSASSA CHURCH OF GOD Come praise the Lord with us! Experience the excitement and the preaching of the full Gospel of Jesus Christ NMorning Service [0 ?11.. P.I Children Chlirh A.rtt rPrai,- A "t.rhip E hening Service 6 OOPP. Wednesday Bible Study I7:OOFrM 1Y2 nmi. off U.S. 19 6382 W. Green Acres St. Homosassa Pastor Ray Herriman 628-5631 THE SALVATION ARMY CITRUS COUNTY ARM Y CORPS. SUNDAY: Sunday School 10 A.M. Morning Worship Hour 11 A.M. TUESDAY: Home League 11:45 A.M. WEDNESDAY: Bible Study 12:00 NOON a First Baptist Church of Homosassa "Come ltor.ship ,\ith Us" 10540 W. Yulee Drive Homosassa 628-3858 Rev J Alan Ritter Res Chris Brewer 9.45 am Sunday School ri AIge Giups) 8:30 & 11 am Worsnip Celebration Choir I Special Music i Children Sunday Nigh 6 pm Worsnhip Celebration "Childrerts Ministry "Youth Bible Study Wednesday Night 7 pm Worship Celebration Children's Awanas Group Youlh Activities Nature's Independent Church Located past the guard shack at Natures Resort. Hall River Road. Homrnosa-sa Sunday Morning Service 10:30am Thurs. Night Prayer & Bible Study 7:00pm Preacher: Tom "Tex" Evans (352) 628-9562 S S ST. THOMAS CATHOLIC CHURCH Sen ing Soutlin est Citrus Coun4t MASSES: saturday 4:30 P.M. >unday 8:00 A.M. 10:30 A.M. U S 19', mle South of West Cardinal St. Homosossa a GodXi P'ople Sharing God's Lote SUNCOAST BAPTIST CHURCH Sunday. S hool........................... 9:45 A.M. Morning Worship................... :11:1i M. Evening Praver SenceP............6:00 P.M. Wednesday Full Worship Service..................... 6:30 P.M. louth Meeting 1st & 3rd Thursday ..............7:00 P.M. 5310 Suncoast Blvd., Homosassa 352-621-3008 Pastor John R. Fizer _|First United Methodist 1 Church A Stephen Ministry Church 8831 W, Bradshaw St. Homosassa West of US 19 (take Yulee Dr. at Burger King) Rev. Mark Whittaker Asst, Pastor Richard Scnford Youth Pastor Steven Skelley 628-4083 Traditional Worship: 8:00 A.M., 9:30 A.M. & 11:00 A.M. Contemporary Praise Service: Coming Sooni Nursery at All Services Sunday School for All Ages: 9:30 A.M. Junior & Senior High Youth 5:00-7:00 P.M. Sunday , e- -- - Open Min. Bible Study S 9.30 r. I 1. 11 NI.1 2C SATURDAY, APRIL. 2, 2005 A9A-7SSS SATURDAY, APRIL 2, 2005 3C Places of worship that offer love, peace and harmony to all. Youn don't have to feel like you are all alone!!! ft. Cooper 6Bapt Teens' Program Adult Prayer Meet 7:00 PM 7:00 PM 7:00 PM Dave Maddox Pastor (352) 726-0707 Cornerstone Baptist Church .h'hi t r~'-~~.m i rowiildation/t tift Atilt. It ttlal at ( timi Worship Service Sunday .....8:00 & 10:45 ANI Sunday School ................... 9:15 A M Sunday Evening ................. 6:30 PM Cornerstone Baptist Church 1005 Hillside Courf Inverness, FL 34450 Greg Kell, Pastor 726-7335 Pr PLEASANT GROVE CHURCH OF CHRIST 3875 S. Pleasant Grove Rd. Inverness. FL 34450 "Come Be A Part Of God's Family" Minister: Michael Raine (352) 344-9173 Suna.M. 0 aW 1. ........... ( Sunday School For .4ll Ages Nursery )- Children'" Training Class Provided S.R. 44 " APPLEBEES AB P. 'RELEMEIfARi PLEASAIJT GROVE RD I I[CHURCH OF CHRIST i wwwr prilri co0rn1 li"} ..: ,'.^.x*,... ,: ::.\ "-:;.it: i".. ;' 2'vas gtissi ST. MARGARET'S EPISCOPAL CHURCH your spiritual home! In Historic Downtown Inverness 1 Block N WOf Crown Hotel 1141 N. Oisceokla Ave. Inverness, FL 34450 726-3153 Services- Sun. Worship 8 & 10:30 A.M. Wednesday 12:30 P.M. Morning Prayer 9:00 .Vm T Mon- Fri Ft G tone Reuman Pasto, 1900 W. Hwy.44. Inverness Sunday Worship 7:45 A.M. &10:00 A.M. Sunday School & Bible Class 8:45 A.M. 726-1637 Nursery Provided Rev. John Fischer, Pastor Citrus Missionary Baptist Church' 66901 Turner Camp Road InCerness. Florida 3-4453 35i 31 s60-0686 Independent So ereign Grace Landmark Separated KV\ Exangelistic Services: Sunday I:.(. I l:l., 5:00i Wednesday 7:00 Wmi TroS Sheppard Pastor CCJ FIRST CHRISTIAN CHURCH OF INVERNESS 2018 Colonade Si.. Inverness i behind COinamon Sticks Resauranll 344-1908 We welcome you and invite you to wor.shlip rwit our tn,ni'. 11ednesda): f 3lI p Ma YOuth Progrjm for ll| j ge Aduli ind Yiung Adiih Bible Siudies Something for e'er.one!!! Sunday: LI In *" r,'. Sundt\ Scho. I ,I:H'I F M Worship Special Event or Weekly Services, Please Call Trista 563-3231 to place your ad. Our Lady of Fatima CATHOLIC CHURCH Li H'.. 1 '.: th Iri.erre Sunday Masses 7 30 9 00 4 11 010 I d 400 PM Confesi.rs 2 ;o 3 30 PM 726-1670 W-ERE E.'ERVBOD/e IS SOMiEBOD.i AraD JESuS Is LORD MOUNTAIN ASSEMBLY 1011 E Gull o LakeHw Inverness. FL 34450-5430 Easi Hov -14 .(352) 637-3110 Sunday School 10:00 A.M. Sunday Worship 10:30 A.M. Sunday Evening 6:30 P.M. Thursday 7:00 P.M. .Junior Brarc.n A' A\ (352) 341-2884 First - United Methodist Church INVERNESS Come As You Are Sunday & Worship With Us. SUNDAY WORSHIP 8:15 AMN HOLY CONIMMUNION 9:15 AM CONTEMPORARY WORSHmP SUlND-V SCHOOL FOR ALL AGES 10:45 kM TRADITIONAL WORSHIPP SUNDAY SCHOOL CHILDREN WORSHIPP YOUTH SUNDAY SCHOOL 9:45 ArM &. 10:45 AM NURSERY PROVIDED 3896 S. PLEASANT GROVE RD. (352) 726-2522 Kip Younger, Sr. Pastor F First Assembly of God 4201 So Pleasant Grove Rd (Hevy. 581 So.i Inverness FL 34452 :0a.m 9:0 0a6m. Mo.- Fri.6 OFFICE. (352) 726-1107 CHURCH WITHOUT- WALLS OF . INVERNESS 4n EcLlno & rOn.inr Conoreqgaon Alinstern r to the Heart at C7itu I cL unri Sunday Services Sunday School 9-10 A.M. Worship 10:30 A.M. Citrus High School Auditorium (Across from Football Stadium) 600 W. Highland Blvd. iliexl o Citrus Memorial Hospilali Cnillocare Provided Sunday Evening Service Beverly Hills Civic Center 5 PM Wednesday Bible Study & Youth Services 7 PM Youth Building (4301 S. Pleasant Grove Rd. Invernessi For more Information call 352-3-14-2425 Senior Pastor s Douglas & Teresa Aievanaer Sr A Multicultural. Non-Denominational Family We I(nite All To Come Grow With Us" INVERNESS SEVENTH-DAY S.,..ADVENTIST 1' CHURCH 638 S. Eden Gardens Inverness. 34450 Hershel lMercer. Pastor 726-9311 Sat. Sabbath School 9:10 AM Sat. Worship Hour 11:00 A.M. Wed. Prayer Meeting 6:00 P.M. Ioad :ist 591 Village West Plaza Inverness (2 miles ivesr on Ht'y. 44 past Wal-AMart on right) You're invited to our SERVICES Sunday School 9:30 a.m. Sunday 10:45 a.m. & 6:00 p.m. Wednesday 7:00 p.m. Independent Fundamental Pastor Terry Roberts Ph: 726-0201 First BAPTIST CIUTRCH of .Inverness Re\ Donnie Seagle A Place to call Home!!! Morning worship 9:00 & 10:30 1\.M. Sunday School/Bible Slud3 9:00 & 10:30 \.M. Evening WVorship 6 P.M. ,< ,,><, ,.<'> <>,:, \wednesday E'ening Acli'ities 5:45 P.M. 11> .... > Interpreting for the Hearing Impaired Nem Spanish Speaking Bible Siud3 10:30 Session Youth worshipp Sunday 6:00 P.M. Nur'er Pr.o'.ided DOWNTOWN at 123 S. Seiiiinol 726-1252 Sunday) Sernices: Trjdiii..nral Ser ice 3 11ii .l1 Sunday, Sjhooi ,l ilI i., rnienipoirar, Ser.icve 130 3, i E'.eriing Ser. ice F \'ed ne'da) Nighi dJulII CIJ,'C i.) f1 B-:.,> and Girl Brf iJde i)1.1I PI Teens 1 P.1 \ become Home" L.' J0.:.AJ 4 ..uh 1. i Ini. r,: h I F' I [U /- K'.i.L 9,, l. :. AI, uniSili "Lc r ritnd. Dj~ira jnd Lt-rmnngCiCt-ir" Victory Baptist Church Pifia lt i4t tiril C.,',l C ,tnc' I Dr Bill Laroni Piastor .1 .lCelc[0 f JiJlCt a pi t.', 1c.LUmI SUNDAY SCHOOL................9:45 a.m. MORNING WORSHIP .......10:45 a.m. EVENING SERVICE..............6:00 p.m. WEDNESDAY PRAYER.......7:00 p.m. uplifting worship positive preaching genuine friendliness Highway 41 Norlh. turn a Sportsman Pl. 726-9719 PRIMER IGLESIA (HISPANA = DE CITRUS COUNTY Asambleas de Dios Inverness. Florida ORDEN DE SERVICIOS: DOMINGOS: 9:00 AMI Escuela Biblica Dominical 10:30 AM Adoracion y Predica MARTES: 7-00Phi-CultodeOracion MIERCOLES: 9:00 m-. 11:00 PM- Temple abierto para Oracion JUEVES: 7:00 PM Estudios Biblicos -Davd Prieiro PasiCr_ I1 ',I N Cronr Ae e Irierre-s FL 34-1I.1 Tel6fono: (352) 341-1711 CALVARY BIBLE CHURCH 5.' iEJ 1 ',rinc Lawir, Ireniw - SOn ,,l "i ,I I1 North. 12 Iad, I :.I at',1u i i 352) 344-8331 ) Sunday Senices 9-"36 a m ni *1.30j am \ Wednesday) Prayer Meeting 7-"' pm Thursday) Night Ranch Middle Sc:hool Youth 6 3 p m PR'ar. 'r I i Fra:itr 637-5100 Clean & Safe. Nr-er-n * Eating Children & Y;:uth Serces- Warrm FelUo .up P.:,nerful Wor'shr p Practical MeN-_age Sunday School 9:30 A.M. Sunday Worship 8:00 A.M. & 10:30 A.M. Wednesday Family Night 6.30 P.M. Friday Youth Service 8:00 P.M. Agape Kids Preschool & Daycare 1 yrold-Pre K4 Before & After School Care Mon-Fri 6:30 A.M.- 6:00 PM, T\%%, miles from H\wy 44 on the cr.rner ofICroft & Harley 2728 Harlev St.., Invernes FL INVERNESS CHURCH OF GOD Reo. Larrn Pou'rer = 26 8333I J1 WINVERN m S Hwvy. 44 E v - Washington Ave. Sunday Services Traditional 8:30 AM 11:00 AM . n Contemporary 5:30 PM - Sunday School for all ages . S 9:45 AM 5 Nursery Provided I 11:00 AM Service - Broadcast on \VRZN am 720 I Fellowship & outlh Group 6:30 PM i 24-Hour Prayer Line = 563-3639 " Web Site: -I ! Church Office 637-0770 . EXPERIENCE LIFE FIRST CHOlCH OF GOD 5510 lisnijue Lane, Inverness Do you desire to know God's word? Do you enjoy Chris iain fellowvhrp in a friendly airrosphere| Do yoU enjov ger-EoQerhers such as pitch-in dinners and Gospel sings' Then ou II en.o our church f'amrdl . SUNDAY Sunday School 9:30,-x Worship I0:30,.I \ 6:()0PM Bible Stud' \Wed 6:OOFpM M Pastor Tom Walker 341-4687 Does Your Spiritual House Need Spring Cleaning? BEGIIUiNGS FFILLOWSIlP P**alor leff and Pamn Burke Renewal.'Charismatic Theology Contemporary Praise and Worship 24 Hour Prayer Minislry New Beginnings School of Mrinistry Nursery Provided S A.I L (Minislry to the Handicapped) Service Times 10:30 AM- Sunday W orship |rur.er prc...dedl Call for Midweek Cell Group Schedule "My house shall be called a house of prayer for all nations" Mark 11:17 I CrTRUS COUNTY (FL) CHRONICLE CITRUS COUNTY (FL) CHRONICLE SPlaces of worship You don't have that offer love, to walk through peace and harmony this world to all. all alone!!! DUNNELLON Shepherd of the Hills UNITARIAN i t B t t FIRST ASSEMBLY OF GOD EPISCOPAL CHURCH UNIVERSALISTS C.c 1 u, Rti 'hing Our ,.rid hith [h e w gt of b pt _2541)Nor, ell BrNani High 'ia2,HB aptis t Church SRe.ching Our. dwir M niHo 254 o oR High, Oak Tree Plaza Sunday W,,rshir-X 15N 1 LecanSo. Florida 2149 Hwy. 486, Lecanto Sunday Services held at: r d k,,, .Holy Euhrt (1 Mile East of Hwy. 491) A friendly church where Hernando Elementary School = surl 945 Ho1 huc arist | Christ is exalted!!! 2353 N. Croft Ave. . Suiidj,) '',ii-. Il45 ,% Services Suna ShoHernando, FL 34442 Surda Ecrrilf, t IllI'M Salurdy..... .............:f.11.p Sunday School 9:00 A.r1 Sunday Morning Service: 10:15 Morning Worship 10:15 A....1. die \\ djne Scrik-7l l M Sundi \ ... i'.:) & /.'li alt | Evening Service 6:00 P.M Children's Church Nurser. ..... ... ..11:1i am I M41rT through the 4th Grade Min ti.tr TChildren,ees & Adults! Healing Service SUNDA SERVICES le Study & Prayer 7:00 P.M. 40 .urrrde Rev. Joseph A. Vosberg, Pastor \Vednesda\ .......... I.:00I dll. Respecting Individual Beliefs AWANA 6:45 8:15 P.M. *********** Jonathan Thibos. AMssonar3 Pastor i 72 WH 48DunnellnRoJl The Rev. Ladd Harris All Are Welcome Ages 4yrs.-6 Grade SUNDAY MASSES: I.i tPrisI ,n Chamet 746-9202 Teens 7-12 Grades) 7-9 P.M. 8 A.M. & 10:30 A.. 464-4441 ,,. Phone: 489-8455 527-0052 I______.t.-_ I ******_ ;I ___j_ * S,_ SPANISH MASS: DUNNELLON Providence 2:30 p.M. CHURCH B Church CHURCH OF CHRIST Baps Cn : CONFESSIONS: OF THE omF CrHRiST ,.p.i,...rlni. e1 4471Wr2t,.:.r,R., r,: '* 2:30 P.M. to 3:30 P.M. Sat. NAZARENE -. Coinme orship Witlh 's! Chrinia i C.i Him ..iJeu BA..o in S NDAY Come and worship as tahshua did. L.. or By Appointment a. erlldi I- .ls******** 2101 N. Florida Ave. | SBible Stud> 10:i00A.N AN1. eth Clobim 746-4595 i itnl )r HNrida \Vorstup 1I:45 A..N1. *M C all for avaiat.,le st:rs packet 01IItI hurd aWEEKDAY MASSES: Hernando FL S erune 6:00 P.M essiaic 82 civic Circle. Beverly Hil FL8:00 A. e 352-746-3620 8:00 A.M726-6144 W SEDVESD.i' 5 nagogue Surlday Sha,-,,hl 1 3 ) A M! Rev. Stewart Jamison /it. Pastor ,,No ; ;| Bible ~c 7:01:IP' I Sulndl, M.nringWirehlp I 5 1 4^ *'B Nu11.1r4 5o 1t0 Bible Stud\ 7:00 P ,,,, 44 ,,rri ,R 4 & Lne R,, J Mu l ll.i A 6 Roos.erelt Bl-l o.de L Phone 352-465-5100 F,_ B-. 21 L~ ". FL ~""' Sunday Evening W shipp i lfl PM eIlI I Beverly Hills The Chuurch with the ,ig " Powell Rd. & Cedar St. HHn. 40 Information PH: 1352 527-9353 Wednesday. ti.rpirate Pra. er 7 1111 IM 746-2144 Jgno P .V.ebsite: htlp://ral)daiis.org I ,t ock E~as o S .CHILDREN James Johnson Biblical Sabbath Services: J Minister Frida). 7:30 PM Bapt t in Practice h*YOUTH CeLl 352-687-8836 J Saturdas. 10:00.M S o inThlog .,.NGL,,,, ES SNEWMESSIANIC i & Praise *SENIORS IU .... .. CONGREGATION lloship I* Sunday School X. r% A r W ; .... K I=-r ... :: '> ', .."*s:- WVorship Teaching Sun 10 am English Sun 6 pm Spanish Small Group Stud)- Wed 7 pm LIFE Group Celebrate Recover3 Fri `7 pm Food Group 2242 Il.-N 44 Aest (across from Outback in Inverness) Fred,,n ffrrM... FrE.dom t.. . INA CHRIST' VINEYARD CHRISTIAN FELLOWSHIP Sunday Schedule: Sunday C\elebrau:n |IIIi.\MI COOL SiLUFF t,,r Kid, .. I 1 IAM NRG Yuih Service 5I.)PM Weekly Sthedule: 12 Slep Chri.iur ReL.er) 7 PM Tues Frua ,' the \ine Lunchrin 12 PM Thunt Foid Panti 12 3 2PM bTur, NRG Siudenl Cate 7 PM Fn Small Groups N Meeiing All Time., Acro',s Catrus & Hernando Counuies 46oiS Li S Highwjy 41 Juil .tuth i-f Ir.,Lnic-s Cii Limi, Call the uffick'e lIT more inlianTi:in Or(iici Orenri Tuer Fn i352 726-1-4Sn lou canp esrpt: El'.tlirig Airnmu.sphrc. Solidm Prea hlrig. Cleain Nurer), C'i'rilmpi,,i'r W,.,'hip Special Event or Weekly Services Please Call Trista 563-3231 for Advertising Information 8:30 A.M. Service Holy Communion Ist & 3rd Sundays 10:00 A.M. Bible Study & Sunday School 11:00 AM. Service Holy Communion 2nd & 41h Sundays 6:00 P.H. Every 2nd Sarurday Holy Communion Service Pastor Riev. Frederlckl IVt. Scuike Web.ite: wwi\ taiLhlr:anjnlo.om.rvl. Sunday Channel 22 (TWC 2) Iir:ilr Bl ble '.lut r..-hedule hltfrI I':,','.' ".:,llJnl ri:ile^ o.:,,.: ,:,1,-/ 'unity- Sunday, April 3rd 10:30 "I bthuld iht Christ in wu." i A message of Li6 e b) nilt Mini'ler \ irginia 'adsh 12:00 Pot-luck lundi 1:(JIJ workshop .4'wakning the Heart Learning to Love Lourwlt. k lI are %ek.ome, ..ll J.:r m'rre dclai[, * ;212. \\.x.d,... Ljirc *B cerl. HillI *746.. 12i uinaT, ru.. .r.:.tlC ij i T.e :. irr, A:: ,," .. .: "jl, U u 'Cru[-.:li UC. fm - - -- --- - --- -- - St. Scholastica Roman Catholic Church Lecanto Alass Schedule Saturday Vigil 4:00 p.m. Sunday Masses 9:00 a.m. and 11:30 a.m. Daily Mass Time: Mon. Fri. 8:30 a.m. Located at 4301 \\ Honosassa Trail i Highway 4q01 Lecanto. Florida Phone 74-4422 I \e h ''PL',rt P..p ichl n Pad ii S Ca.th,7lc S ... -.h ) K iEC -" NradcI, 'j Located in the Citrus Springs Community Center Citrus Springs Blvd. Sun. School...........9:30am Morning Worship.. 10:30am Wednesday Service. 6:30pm S ick rw 'llson N nwr J., r A (H'ayqn Ellis if I 11C 352 '.-i" 212.-7095 First Baptist Church of Beverly Hills* 4950 N. Lecanto Hwy. Bererlorinr'aiion call (352) 746-2970 Office Hours 9-3 P M. or email us at: firstbaptistchurch @aliantic.net Special Event or Weekly Services Please Call Trista 563-3231 for Advertising Information .M . ,*, ....* .0 'i .- SEscuela Dominical ... 9:30I. .doracion................10:15 AM M .a es ..............'.........:.. .:3 .fi..rcoles...................7.6.0 P. .? .,( c l:a'- "m i:l..-.: Adoracion...........10:15 AM Marlrs.................9;30 AM M.i-rcoles........ 7:O0 PM 3220 N. Carl G. Rose Hv.. (2001 Hernando 352-341-5100 IHERNANOS United Methodist Church .4 piac atof nt'i bemtlngs" 2125 E. Nonrell Br)ant Hv. lSR486l For inrormalion call 0352) 726-7245 Visit our website al " %.hernandoumc.net Worship Services Sunday 8:30 and 11:00 Pator Bri an T. Baggs. Sr. Pastor Brian T. Baggs. Sr. ~inzi~a. ~ ~' .2 ~- ~"TrI'11mi~A~1NI~ 4C SATURDAY, APRIL 2, 2005 CJrius CounT' (FL) CHROMAiC. EVENTS Continued from Page 1C Prince to speak Phillip Prince will be the guest speaker at gospel meetings April 6- 10 at Hernando Church of Christ, 7187 N. Lecanto Highway ,(State Road 491). Services will be at 7 weeknights, 5 p.m. Saturday and 10 a.m. and 2:30 p.m. Sunday. -For information or directions, call ,"Ron Hays at (352) 489-2520 or -David Smith at 637-4946. Sharon in recital International performing and -recording artist Boaz Sharon will ,be in recital at 3 p.m. Sunday as ,part of the Dunnellon "Presbyterian Church Concert -Series. This is a return engage- ,ment by Dr. Sharon, who is head of the Piano Division at the -University of Florida, current artistic 'director for the Prague international Piano Masterclasses, ,and teaches on the artist faculty of .;the Paris International Piano ses- 'sions at the Ecole Normale de "Musique Alfred Cortot. SThe church is at 20641 Chestnut Street in the historic district of ;Dunnellon. Call (352) 489-2682. Simpsons to preach Evangelists Cherrie and Larry ,Simpson will preach at 7 p.m. "Thursday and Friday at Fountain ;of Life Restoration Ministries ,nc. in the Crystal River Lions Club, 109 Crystal St. Host pastors are Bishop Leonard T. Smith and .-Co-pastor Pamela D. Smith. Call ,795-5775. K Celebrate salutations St. Michael the Archangel Greek Orthodox Church will cele- brate the Salutations to the Virgin Mary at 6 p.m. Friday. The Orthodox Church will celebrate .,Easter Sunday, May 1. The church is at 4705 Gulf-to-Lake Highway, -,Lecanto. Call the Rev. Nicholas Samaras at 212-8444 or visit for informa- 'tion. Miller has seminar A scripture seminar, sponsored ,by the Parish Pastoral Council of Our Lady of Grace Catholic Church, will be presented by Dr. ,Ron Miller, chair and professor, "Department of Religion, Lake 'Forest College, on April 8-10. Sessions will include: "Taking the Bible Seriously," at 6:30 p.m. -Friday; "Matthew: A Picture of a First Century Christian Community" at 9:30 a.m. Saturday; "How to ;Become a Spiritual Adult," at 1 p.m. -Saturday; and "Understanding the Executions of Jesus and Paul in their Political Context," at 9:15 a.m. Sunday. Ron Miller has a Ph.D. in the history and literature of religions from Northwestern University. His most recently published books ,include "The Wisdom of the Carpenter," 'The Hidden Gospel of ,Matthew" and 'The Gospel of Thomas." All are welcome. Beat everyday grind North Oak Baptist Church in Citrus Springs invites everyone to "beat the grind of everyday life at a '"Coffee Break" at 9 a.m. Saturday, April 9. Free to the community, here will be breakout sessions >including, "Building A Better AMarriage," "Dealing With Teens," "How to Forgive," "Single Parenting" and more. Free lunch will be served. SThe church is at 9324 N. Elkcam Blvd. Call (352) 489-1688 or 746- ;:500. S Choir to sing . Clearwater Christian College athoir will minister in music at the 6 p.m. service Sunday, April 10, at Heritage Baptist Church, 2 Civic Circle, Beverly Hills. Fellowship will follow. Bring finger foods. SCall 746-6171. : Make hunger history The Benedictine Sisters of Florida invite people of faith to a , Bread for the World "Offering of Letters" prayer service at 7:30 p.m. 1Monday, April 11, at Holy Name /Monastery, St. Leo. The service will include scripture, songs and letter Writing. This year's theme is "Make - Hunger History." Call Sister Mary David, O.S.B., at 588-8320. Safety for seniors The Golden Agers will meet Tuesday, April 12, in the fellowship riall at First Baptist Church, 8545 E. Magnolia St., Floral City. Karan 1-lill, R.N., of Baycare Homecare, will provide blood pressure screen- ,ings at 10:30 a.m. The business meeting will begin at 11. Robert Smoot, from the 'Gainesville Home Safety Instruction Program, "Senior Alert," will give a program on public awareness and self-protection. A covered-dish luncheon will follow at noon. Area seniors age 50 and older are invited. Call Evelyn at 637- 2949. WELCA to meet The Women of the ELCA of Hope Evangelical Lutheran Church in Citrus Springs will meet Wednesday, April 13, in Luther Hall. Coffee fellowship will begin at 9:30 a.m., with the pro- gram and business meeting at 10. The theme will be "The Gift of Diversity," continuing theme of the year, "Every Day Is God's Gift." President Janet Esworthy will con- duct the business meeting. The church will host the Pinelands Spring Gathering on Saturday, April 16. There will be a continental breakfast at 8:45 a.m., meetings, and a catered lunch. The conference will finish at 2:45 p.m. Call (352) 489-5511. Election nears. UMWA hosts luncheon The United Methodist Women's Association of Inverness First United Methodist Church will host a fashion show and luncheon from noon to 2 p.m. Thursday, April 14, at the church, 3896 S. Pleasant Grpve Road. Fashions from Bon Worth of Brooksville will be fea- tured, along with a delicious lunch, music, door prizes and fellowship. Tickets ($10) may be obtained at the church or by calling President Barb Sharpe at 637-0058 or Vice President Gayle Marra at 726-8116. All women are invited.. This is great advertisement for a company. We also have people that will use the sign as a Memorial to a lost one. All proceeds go to area poor. For reservations, call (352) 489-0018 or (352) 489-7758. Brunch with Vicki Everyone is invited to First Baptist Church's third author's brunch, "Brunch With Vicki" at 10 a.m. Saturday, April 23, in the Friendship Center, 123 S. Seminole Ave., Inverness. Vicki Holland author of "To An Unknown God," will share dramatic stories of Rev. Frank Gough," an Anglican priest who was convicted of rob- bery and led to Christ by an inmate and is now serving the Lord; and she's doing research on Native Americans. Holland has homes in Beverly Hills, and England. Tickets ($5) are available from the church office (726-1252) or call 344-4182. Tickets will not be avail- able at the door. Make reservations by Wednesday, April 20. Orthodox services set Sunday, April 24, is Palm Sunday for Orthodox Christians around the world. The week between Palm Sunday and Easter (known as Pascha or the Christian Passover in the Orthodox Church) is a solemn one. St. Raphael Orthodox Church will have abbreviated services as follows: Vespers and Procession with Winding Sheet at 3 p.m. Great Friday, April 1. A Liturgy of Prescanctified Gifts will be celebrated at 10 a.m. Wednesday, April 20. Holy Unction at 4 p.m. Wednesday, April 27. All Orthodox Christians are anointed with Holy Oil at this healing service. Pascha at 10 a.m. Sunday, May 1, with Divine Liturgy and Blessing of Paschal food, followed by Agape. The church is at 1277 North Paul Drive, Inverness. Call 746-4428 or (352) 465-4752. Seder strictly kosher Congregation Beth Sholom in Beverly Hills will sponsor a strictly kosher community Passover Seder officiated by Rabbi Zvi Ettinger at 6 p.m. Sunday, April 24, in the S.J. Kellner Auditorium. The cost is $25 for members, $27.50 for nonmem- bers, children ages 5 through 12 pay half price, and children young- er than 5 eat free. Reservations and payment must be received by Friday, April 15. Call Les Leavitt at 527-0698 or the synagogue at 746-5303.. State Road 44 Church of God will have a half-ticket-price sale until noon today. Heritage Baptist Church of Beverly Hills will continue its 'Teen Fund-raiser for Summer Camp, Trash and Treasure Sale" from 8 a.m. to 3 p.m. today at the Frye residence at Fairview Estates in Citrus Hills, 4396 N. Forest Lake Drive, Hernando (U.S. 41 at Dearborn Drive and Forest Lake North) and (County Road 486 at Annapolis by the Citrus Cultural Arts Cehter). This is a huge multi- family churchwide sale. Parsons Memorial Presby- terian Church will have a giant yard sale and bake sale fund-raiser from 8:30 a.m. to 2 p.m. today at 5850 Riverside Drive in Yankee- town. Barbecue sandwiches, hot dogs and beverages will be avail- able. The Women's Guild of St. Elizabeth Ann Seton Catholic Church in Citrus Springs will have its spring rummage sale from 9 a.m. to 3 p.m. today at the Parish Center, 1401 W. Country Club Boulevard. Donations accepted. Services c& Peace offered St. Timothy Lutheran Church's School of Theology will be from 9:30 a.m. to noon today. The infor- mal come-as-you-are worship serv- ice is at 5 p.m. Pastor Bradford's sermon for the second Sunday of Easter is "His Offer of Peace." Worship services are at 7:30, 8:30 and 11 a.m. Holy Communion is offered. Sunday school classes for all ages meets from 10 to 10:45 am. Coffee fellow- ship and nursery facilities are pro- vided. Pastor Bradford will lead a study of the weekly scriptures (pericope Bible study) from 7 to 8:30 p.m. Thursday. The church is at 1070 N. Suncoast Blvd. Crystal River. Call 795-5325. Howe has message There will be no service today at Shepherd of the Hills Church in Lecanto. Bishop John W. Howe will preach and confirm at the 9:30 a.m. Holy Eucharist service. A potluck luncheon will follow. There will be a small group ses- sion at 7:01 p.m. Monday. Choir practice is at 7 p.m. Thursday. "Safeguarding our Children" training will be from 9 a.m. to noon Friday. Invitation issued Dunnellon Presbyterian Church invites the community to worship services at 8:30 and 11 a.m. Sunday. Sunday school class- es for all ages begin at 9:45 a.m. A nursery is available. "Parsing with the Pastor" Bible study meets at 11 a.m. Thursday. The church is at the corner of Chestnut and Ohio streets in his- toric downtown Dunnellon. Call (352) 489-2682. Life after death The Rev. Craig S. Davies' ser- mon title is 'What Do We Believe About Eternal Life?" at the 8:30 and 11 a.m. worship services Sunday at First Presbyterian Church of Inverness. Holy Communion are offered. A short congregational meeting will follow both services. Gail Hill will bring the message "I Am the Light" at the 5:30 p.m. contempo- rary praise and worship commun- ion service. A potluck dinner will follow. Please see /Page 6C h4e Joy of joy, Peace, Love Serenity... Mission Possible MINISTRIES KJ V. David Lucas, Jr. Senior Pastor 9921 N. Deltona Boulevard (352) 489-3886 Sunday | Bible Study.......... ................ 9:30 am (English/Spanish) Worship .......... ............... 10:30 am Evening Worship ............................ 6 pm (Nursery Care & Children's'Church Provided) I Wednesday Boys/Girls Clubs.......................7..... pm The FOG (youth) ...................7..... 7pm C lasses ................... ................ 7 pm (Nursery Care Provided) I Fridays I Spanish Worship Service..............7 pm ARMS OF MERCY FOOD PANTRY 1 st & 3rd Tuesday of the month. S 8:00 am-11:00 am Hope Evangelical Lutheran Church ELCA 9425 N. Citrus Springs Blvd. Citrus Springs SUNDAY Sunday School 9:15 Amn Worship 8:00 AM & 10:45 AMI Communion Evern Sunday PASTOR JAMES C. SCHERF Information: 489-5511 BEST KEPT SECRET In CITRUS COUNTY! STRONG BIBLICAL i PREACHING! g ^ V igil............................. TBA Feast.................... 8:30 AM Confessions before All Masses 489-4889 We support Pope John Paul II Catholic School CHRIST LUTHERAN CHURCH -LCMS "A CHURCH THAT IS A FAMILY" EVERY SUNDAY SERVICES at ,- ~'N, AM and 11:00A.M. S,30 A M Holy Communion - Ist & 3rd Sundays 11 00 AM Holy Communion - 2nd & 4th Sundays ci 4`.1 A M Sunday School & Bible Class NONE IN JULY PASTOR RICHARD DRANKWALTER Nr-' r, A'. nl ble 796-8331 475 North Ave. West, Brooksville I..- r.. A-, East of 98 N.) FAITH BAPTIST CHURCH Hornor-.l Springs Re' \"\ nm Lajerk Coat, SUNDAY SCHOOL: 9:45 am WORSHIP: 11 am & 6 pm WEDNESDAY SERVICE: 7 pm Wed. Sep. May Keys For Kids 6:30-8pm Independent &A Fundannterjal On Spoari-P 12 nule fr-:ni Li S 1L. ,fCardinad 628-4793 HOMOSASSA SPRINGS CHRISTIAN CENTER CHURCH 7961 W. Green Acres. St., Homosassa Springs Marcus Rooks, Sr. Pastor Rev. WF. Todd, Pastor Emeritus retired 628-5076 SGROVIR C Ir EL%.\D .I1 S GRI LN %LRES Location: US 19 At Green Acres Street South of Homosassa Springs [ Christian Education 9:30am ] Contemporary Service 10:30am [ Wednesday Services 7:00pm (nursery provided) Full Gos- e Sprit Fill1ed Special Event or Weekly Services, Please Call Trista 563-3231 to place your ad. Floral City United Method S7:00 PM Music, Youth, Fellowship A warm, friendly\ Church Nursery Av% liable A cit, Vlad .3 of a mile north of SR 48 at 7431 Old Floral City Rd. Come & Fellowship t Service Times: Sunday School......... 9:30am Sunday Worship.....10:30am Wed-Night Awesome - Bible Study ............... 7:00 pm Call 352-726-1715 ^^' Where Love ,_, isn't what J i , it says, but what UNIDAD (Unity) Oneness Center of Truth Daily Word Our Daily Bread Not a proselyte or soliciting ministry The ple is you, O(ur 'Dail)y trcal, 1Tu TDaily ord, 24 hrs. bile Issuipotled nwcssais guiting reassuring, uplhfing. hedalirnu, prosperir4, loi'irn directions now!! Call Nationwide Toll Free 1-866-840-5683 (LOVE) Local 382-5683 (LOVE) Special Event or Weekly Services, Please Call Trista 563-3231 to place your ad. SATURDAY, APRIL 2, 2005 SC EVENTS 6C SATURDAY, APRIL 2, 2005 EVENTS Continued from Page 5C No doubt about it Good Shepherd Lutheran Church invites everyone to Sunday worship services at 8:30 and 10:30 a.m. Pastor Ohsiek's message is titled "From Doubt to Faith." Fellowship follows both services. Sunday school classes are at 8:30 a.m. There is a nursery attendant for children young than age 3. Youth movie night is Friday in the fellowship hall. Youths are invit- ed to come and enjoy an ice cream sundae bar and a movie. The youths will have a car wash at 8:30 a.m. Saturday, April 16, in the church parking lot. The church is on County Road 486, opposite the Ted Williams Museum in Citrus Hills. Call 746-7161. Schielke has sermon 11 a.m. the second and the fourth Sunday monthly. This Sunday's sermon by Pastor Schielke is "Jesus and Fringe Christians." There will be one service at 10 a.m. Sunday, April 17, followed by a covered-dish luncheon at 11:30 a.m. and a semiannual congrega- tional meeting at 1 p.m. Call 527-3325. Come to your senses The Nature Coast Unitarian Universalists, 2149 W. Norvell Bryant Highway (County Road 486), invite everyone to hear the Rev. Barbara Child speak on "Going Out of Our Minds to Come to Our Senses." Refreshments and discussion with the speakers will follow the service. Call (352) 465-5646, (352) 465-0681, or visit. Shake kaleidoscope "Shake the Kaleidoscope!" will be the Rev. Linda Harbin's talk dur- ing the 10 a.m. Sunday service at Church of Today, home of Positive Practical Christianity. The 9:15 a.m. Chat Room class topic will be "Spiritual Prosperity" in the series based on the spiritual book "You and Money," by author/teacher Dr. Maria Nemeth, popular in Unity and New Thought ministries. Church of Today is a family church. All are welcome. Dress is casual. Services are in the Crystal River Woman's Club House, 320 S. Citrus Ave., with parking in the rear. Fellowship follows the service. Words change things First Christian Church of Inverness invites everyone to Sunday worship services at 10:15 a.m. and 6 p.m. Senior Minister Todd Langdon will start a series titled 'Two Words That Change Everything" with this week's ser- mon titled "In You." will be avail- able. John Isaac Brock is the youth director. The church is at 2018 Colonade St., Inverness. Call the church office at 344-1908 or e-mail [email protected]. Never fear Worship Sunday morning at , Floral City United Methodist Church, 8478 E. Marvin St. The Rev. Greg Wood will bring the message titled "From Fear to Faith," at the 10:30 a.m. worship service. Sunday school classes meet at 9 a.m. Bible studies are at 10 a.m. Tuesday and 7 p.m. Wednesday in the old fellowship hall. The exercise group meets from 10 to 11 a.m. Monday and Wednesday in Hilton Hall. The UMM will have a breakfast meeting at 7:30 a.m. today in Hilton Hall. Then they will cook at Floral City Park for the annual church picnic at 11 a.m. Bring a dish to pass, and chairs. Call 344-1771. Behold Christ The Rev. Virginia Walsh will give the message titled, "I Behold the Christ in You," atthe 10:30 a.m. service Sunday at Unity Church of Citrus County, 2628 W. Woodview Lane, Lecanto. A potluck lunch and a workshop facil- itated by the Rev. Walsh will follow. The Rev. Walsh is a Unity minis- ter who has a seminar ministry. She was ordained in 1995, was the senior minister of Unity of Today in Kissimmee and pioneered the Unity Spanish-speaking ministry in Tampa. She also worked with the bilingual Unity ministry in Costa Rica and Softly International in Honduras. Call 746-1270. Don't boast Join Beverly Hills Community Church for Sunday worship servic- es. Pastor Stewart R. Jamison III will deliver the scripture message "Righteous Boasting" from Jeremiah 9:23-34. Everyone is invited to the church's new social ministry at 8 a.m. Saturday. Make new friends during this social hour. Call the church office at 746-3620. Activities announced The Pastoral Care Committee of St. Margaret's Episcopal Church will meet at 10:15 a.m. Wednesday. A hot meal is provided at 11:30 a.m. for those in need. There will be a Holy Eucharist healing service at 12:30 p.m. A potluck dinner at 6 p.m. will be fol- lowed by Bible study and compline. The ECW workshop is at 10 a.m. Friday. The church is at 114 N. Osceola Ave., Inverness. Call 726-3153. Meal precedes study There will be a potluck dinner Wednesday at St. Anne's Episcopal Church, prior to the Epistle to the Philippines Bible study at 6:30 p.m. Videos by Nicky Gumbel will be shown. Lifeline screenings will be avail- able by appointment only on Friday. Call (800) 697-9693. Cursillo Ultreya is at 6 p.m. Saturday, April 9, in the parish hall. Get to know Christ Pastor Gary Beehler will contin- ue the series "Essential Truth," "Knowing Christ Personally," at 6 and 7:15 p.m. Wednesday and "Empowering .Kingdom Growth" at 6 p.m. Sunday at First Baptist Church of Hernando, 3790 E. Parsons Point Road. Fellowship is at 9 a.m. in the fel- lowship hall. Sunday school class- es are at 9:30 a.m. Worship servic- es are at 11 a.m. and 6 p.m. Joy church for children ages 1 through 6 and teens and youths life classes are at 11:15 a.m. Home visitation is at 1 p.m. Tuesday. Wednesday prayer meetings are at 6 and 7:15 p.m. New Horizon Ministries meets at 10 a.m. Thursday.. Call the church nearest you: Our Lady of Grace Church, 6 Roosevelt Blvd., Beverly Hills - Sign-up is from 1 to 2:30 p.m. Thursday. Distribution is from 10 to 11 a.m. Saturday, April 23. Call Anna at 527-2381 or Peggy at 746- 7942. Citrus Family Worship -- """- ------- I Grace Bible Church 25th Anniversary Homecoming April 10, 2005 6382 W. Green Acres Homosassa, FL 34446 Pastor Ray Herriman 352- 628-5631 9:30AM Gospel Music Mast Brothers 11:00AM Morning Worship, Mast Brothers, Pastor Aaron Webb 12:30 PM Meal on Grounds 2:00 PM Celebration Reflections Recognitions Speakers Asa Mangham & Art Yohner Breaking of ground for new Fellowship-Educational Building Center, 2577 N. Florida Ave. (U.S. 41 North), Hemando-, and Saturday, April 9. Distribution is at 10 a.m. Saturday, April 23. Outreach fr6m fellow- ship. The church has extended the days and times of its food pantry from 10 a.m. to 1 p Hern & Get healthy The Hallelujah Acres Diet teach- es what it means to "Get Healthy and Stay Balanced." The remaining instructional class will be at 7 p.m. Tuesday, April 12, at the Inverness Vineyard. There will be no classes during June, July and August. For information on fall class registration, call Gloria Uhl, Health Minister, at 726-9498 or e- mail her at gardenshare@- digitalfor. Earn GED diploma GED classes at First Christian Church of Inverness are taught from 6,to 7:30 p.m. Wednesday in the Education Building for those 18 and older wishing to obtain diplo- mas, No fee charged is charged, and all are welcome. Classes con- tinue until the instructor, Toni Harris,.feels that each student is ready to take the exam, which is administered monthly at WTI. CITRUS COUNTY (FL) CHRONICil Before going for the exam, each student is given a pre-GED test b4 Harris to determine their readiness. Small classes of eight or fewer are preferred, so that each student gets maximum attention. Call Toni Harris at 341-0660. Go here to cheer , Gymnastics and cheer classes are available at Bushnell First United Methodist Church .r Fellowship Hall, 221 W. Noble Ave4. Faith unshakeable ^ Women of Faith meet at 10 a.1 Book of Revelation and prophecies of the Old and New Testaments from 6:30 to 8 p.m. Thursday at First Assembly of God of Inverness, 4201 S. Pleasant Grove Road. Steve Bowman is the- teacher. Bring a Bible and a two- inch, three-ring binder notebook. The New Intemational Version of ', the Bible is used. Other materials' are provided at no cost. Call the church at 726-1107, or Steve Bowman at 726-3800. Prayer powerful The Hernando United Metho- j dist Church's men's prayer team meets at 6 p.m. Thursday to show the power of prayer- If you are sick or unemployed, have family prob- lems or have a loved one in the -J military to pray for, join. D Announcements Times change " The time for teens to meet has ,r changed from 7 p.m. Wednesday to 7 to 9 p.m. Friday at Heritage- Baptist Church, 2 Civic Circle, -.' Beverly Hills. AWANA day has 5 changed from Thursday to 6:45 to 8:15 p.m. Wednesday. Bible study for adults is at the same time. Bus available - Hernando United Methodist Church has a wheelchair-accesst-, ble bus to transport people to and from the 11 a.m. Sunday service The bus will make regular stops New Horizon Senior Citizen's , Home and Arbor Trail in Invemessk Woodland Terrace in Hemando and Barrington Place in Lecanto. For transportation and information. call the church office at 726-7245' Please see EVENTS/Page 7C Special to the Chronicle Pictured above are some of the students at the church altar who participated in the Teen Mass recently celebrat- ed by the Rev. George Jingwa at Our Lady of Grace Church In Beverly Hills. This was the first Teen Mass celebrated In the newly formed Citrus Deanery, comprised of six Catholic churches: Our Lady of Fatima, Inverness; Our Lady of Grace, Beverly Hills; St. Benedict, Crystal River; St. Elizabeth Ann Seton, Citrus Springs; St. Scholastica, Lecanto and St. Thomas the Apostle, Homosassa. Ed Putnam, music director at Our Lady of Grace, composed a new mass for the occasion, the Teen Life Echo Mass, and dedicated It to the organization and successful formation of the new Citrus Deanery Youth Group. The host church's children's choir sang the Mass. Announcing our Gospel Meeting at the Crystal River Church of Christ with Jim Lee From Englewood, Ohio Wednesday through Sunday April 6-10 Times: Weekday Evenings: 7:30 P.M. Sunday 10:00-11:00 A.M. and 6:00 P.M. Lesson Topics Wednesday The Great Physician Thursday Who is Not a Christian? Friday The Judgment Day is Coming Saturday What If Jesus Came Yesterday? Sunday 10:00 Importance of Repentance Sunday 11:00 Repentance Means What? Sunday 6:00 P.M. That Which is Perfect Has Come Location: North or South on 19, turn onto 44. The building is on the left, next to the Teachers Union Bank. Phone (352) 795-8883 or email: [email protected] All are invited to be our honored guests Bible Talk: Who Can Receive The Gospel? L Man's efforts to evade his personal responsibility for sin did not begin in thi4 decade, nor even in the previous century. From the time of the first transgression, man has tried to blame someone also for his own sinful condition. When Goa" asked Adam if he had eaten of the forbidden tree, Adam immediately implicatedX two others as being responsible for his sin. "The (1) woman who (2) Thou gave to be with me, she gave me of the tree, and I did eat" (Genesis 3:12). The womait gave him the forbidden fruit, and God gave him the woman! It's not myfaulti God thought differently. Early theologians picked up this erroneous "It's-not-my-fault" mentality and, systematized it. If it's not my fault that man sins, it must be somebody's fault so blame it on Adam. They falsely concluded that because man is a descendent oP Adam, man is born totally depraved and guilty before God from birth. As a result1 of this inherited depravity, man is simply not able to overcome sin and practiced righteousness. This man-made doctrine goes on to teach that man must receive some direct of miraculous operation of God (via the Holy Spirit) to enable him to choose to do good. Man's conversion, therefore, rests solely upon the shoulders of God. The consequence of this teaching is obvious: If I have not received th, gospel and been converted it's not my fault! The teaching of the Bible, however, is fundamentally different. From the days of the garden, man was created with volition (the power of choosing) and held accountable for his decisions (Genesis 2 and 3). There were two basic influences affecting the decisions of the man and woman, and they willfully yielded to Satan's influence rather than to God's. r Who can receive the gospel and be converted? The false doctrines teach that maidr has no choice in this matter It is the sole responsibility of God. The Bible teaches, however, that man does indeed have a choice, and shares in the4 responsibility of his salvation. God's grace was expressed through Jesus Christ$ and is the means of power of salvation. This is God's free gift to man (Romansi 3:24; 5:15). Sinful man could never, if left to himself, find his way back to God0 (Jeremiah 10:23; Romans 3:10-18). God, therefore, graciously provided the way of salvation, and seeks to persuade men to place their trust in Him (Romans 1:16; 1 Corinthians 5:11) Who can receive the gospel and be converted? "Whosoever will, let him take thij water of life freely (Revelation 22:17)." What about the man who has morp confidence in himself than he has in God? Or the man who chooses not to listen. to God, and will not yield to God's direction and instruction? He obviously cannot receive the gospel and enjoy redemption in Christ. He cannot blame God, however, for his spiritual tragedy. It was his choice to make. What about the man who chooses to listen to God and yield to the words of inspiration? This is th- man of whom God said, "I will put my laws into their mind, and on their heaird also will I write them" (Hebrews 8:10). This is the man who can be saved b}6 grace through faith (Ephesians 2:8). Who can receive the gospel and be saved? The man who chooses to accept God's grace. Whosoever will. Because of our conviction regarding man's volition in this matter, we preach the Gospel and encourage men and women everywhere to makl their choice for God. CRYSTAL RIVER CHURCH OF CHRIST, located at comer of 19/440 next to Credit Union. Comments are welcome. Mailing address: 563.NE 5th Street, Crystal River, Fl 34429. E-mail: [email protected] or call (352) 795-8883. J. CITRUS COUNTY (FL) CHRONICLE EVENTS Continued from Page 6C Young adults sought Church Without Walls in Inverness is seeking young-adult worshipers and musicians for Saturday evening services at 6. For more information, furni- ture and other items. Proceeds will benefit the Path Rescue Shelter for the homeless. Call 794-0001 for clean, unripped furniture or usable appli- ances (no women's clothing, sofas or items needing repair). tden Gardens. The shop offers reasonably priced clothing, household items and furniture. AI-Anon meets Inverness Al-Anon meets at 8 p.m. Monday at Our Lady of HYMNS Continued from Page 1C being presented with a 'cheer up and praise God, things aren't so bad' attitude?" he asked. "What encourages me about so many of the hymns is that they meet us where we are and gently guide us in the truth. Anne Steele did this par- z SATURDAY, APRIL 2, 2005 7C more. For more information, call Sonya at 527-0698 to view the showcase. OSL meets monthly The St. Clare Chapter of the Order of St. Luke (OSL) meets the first Monday monthly in the parish hall of St. Francis Episcopal Church, 313 N. Grace St., Bushnell. Members of all denomi- nations are welcome. For more information, p.m. the first and third Thursday monthly at Station 71 at 3673 E. Orange Drive in Hemando. Call Terry Sponholz at 382-7827. Fun for kids E Hernando United Methodist Church offers "Club 345" for ticularly well, in that she wrote Psalm-like hymns of lament which cry out to God in the midst of hard circumstances, but never tries to minimize the reality of pain and a broken world." Smith, who lives in Nashville, said. of his wor- ship awakening, "My mind was engaged, and I was emo- tionally connecting to the truth I was singing. The Christian kids who enjoy doing fun things like movies, skating, mall trips, bowling, bonfires, games, hay rides, boat rides, horseback riding, scavenger hunts, football games and sleepovers. The club meets the last Friday monthly. Teens in sixth through 12th grade are invited to 'Teen Invasion" from 6:30 to 8 p.m. Wednesday at Faith Baptist Church, 6918 S. Spartan Ave., Homosassa Springs. The teens meet for games, Bible study and fun special events. King's Kids Club for ages K-5 through fifth grade meets at the same time. For more information, call 628-4793. &TOURS Group steps out The Stepping Out Ministry of Inverness First United Methodist Church will take the following trips. It is not necessary to be a member of the church to participate. April 25 A four-day trip to Savannah, Ga. Price includes transportation, lodging, breakfasts, dinners and many adventures. Nov. 9 A nine-day Carnival Cruise on the Legend to Barbados, Martinique and St. Marten. Price includes transportation to and from ship, port charges and cruise. It is not necessary to be a church member to participate. For information or to sign up, call Carole Fletcher at 860-1932. praise songs that I sang in high school mainly spoke about what I wanted to do: how I wanted to worship God, how I wanted to be renewed, etc. Change in direction "While those things were true, singing my desires didn't produce any kind of worship in my heart In fact, it made me feel miserable. I felt like a fail- ure. Pastor preaches tax righteousness RICHMOND, Va. cen- ter for failing to file and is taking the warning to fellow pastors and "Singing about how I wanted to worship God was a kind of half-lie. In other words, I felt obligated to give God glory, because mentally I knew he deserved it, but it never sprung from being overwhelmed at who God is or what He has done. In the same way, I want- ed to be renewed but wasn't being renewed, which led me to believe that I wasn't doing things right It was a mess." SReligion BR EF church meetings, the Richmond Times-Dispatch reported. His troubles began in 2000 when Internal Revenue Service agents questioned why he hadn't filed returns the past four years. "It was just procrastination and overload, as I explained to my con- gregation," Miles said. Besides leading his own growing church he is active with Richmond's Faith Leaders Initiative, which seeks to attack root causes of violent crime. Miles said. his wife, who normally did their taxes, was involved in two Smith said he wants to see people get past the idea of wor- ship as singing only, or even that true worship is a state that we somehow create by our own efforts. Quality of worship He said too often we gauge the quality of our worship experience on "What am I get- ting out of it?" Instead, he said to test whether we have wor- car accidents, one of which left her permanently disabled. Tax prepara- tion fell to him and he kept putting. shipped well is to ask, "Have I encountered the reality of who God is, and does it drive me to gratitude instead of despair?" He said, "Whatever we do in worship singing, the sacra- ments, listening to the preach- ing of the Word when we lift up who Christ is .and who we are sinners saved by grace - that's what produces thankful- ness and love for our neigh- bors, and that's true worship." ---new--"__ -, -- -"_-- -f- Copyrighted Material . ... vSyndicated Content: -m. ,:Available from Commercial News Providers -b O -- -n 0.- - - - ~ GRACE T' Continued from Page 1C If you could choose any dog in the world, Charlie would !probably not be your first [choice. He might not even be .ybur last choice. You might'ye s id, "Put that dog out of its misery" But Joan doesn't think any 'dog is too far gone to love. For Ithe past four years she's cared 'for a Down syndrome dog with ino skull that was only expected 'to live for a few weeks when :she got him from the vet The ;dog looks odd, but it wags its tail when it walks. Charlie does, too. After being t r adopted by Joan, after having its matted coat shaved bare, after being de-wormed and de- everythinged, after being loved and fed and loved some more, Charlie has turned into a brand new dog. He was recently certi- fied as a service dog, a dog with a purpose. I was thinking about Charlie and about another brand-new (human) friend while watching a video clip at church last week, a scene from "The Passion of the Christ" Carrying his cross to Golgotha, Jesus tells his mother that he is .mak- ing "all things new." Although the gospels don't record Jesus saying that before his death, he does say it after his Resurrection. In am - lba-w Revelation 21:5, John the apos- tle sees Christ upon his throne saying, "Behold, I make all things new." Some people think the world is hopelessly winding down, that it's progressively getting worse, "going to hell in a hand basket," as some say. Some think Jesus will return to claim his own any minute now, so why bother trying to make things better? Why not sit back, hunker down and wait for Armageddon? Other folks, however, think that while we're waiting for Jesus to return, we should work to restore, refresh and renew. To rule and subdue and to advance God's kingdom on the earth. They believe that he A* is all about making things new now, as well as later. That's what I tend to think That in the middle of incredi- ble disaster and destruction and the terribleness of life,. lives are being changed and made new. Just like Joan taking a lost and near-hopeless dog, left homeless in a storm, adopting it and giving it a new name and a new purpose, so God is taking lost and near-hopeless lives and doing the same. No, God does greater things he gives those he rescues his own Spirit and begins to conform them into his own likeness. Last week was Easter, but the message of new life doesn't end with the turning of a calendar - modlww~ - - page. God came to a broken earth to seek and save the lost and restore them to new life. To give them a future and a hope. He still comes, he still makes all things new. You might even say he makes tails wag and hearts rejoice again. Nancy Kennedy is the author of "Move Over, Victoria -I Know the Real Secret," "When BEVERLY HILLS UONS BINGO The Friendliest Bingo in Town Hours: Mon. 6:00 P.M. Thurs. 12:30 P.M. Doors Open 2 Hours Earlier FREE COFFEE & HOT TEA - Refreshments Served at a Nominal Cost Both Monday and Thursday at 72 Civic Circle Beverly Hills Info 527-2614 Perfect Isn't Enough" and her latest books, "Between Two Loves" and "Praying With Women of the Bible." She can be reached at 563-5660, Monday through Thursday, or via e-mail at nkennedy@ chronicleonline.com. -C-- -- "- --meyjih -- b- a qw .- r-_ . SCopyrighted Material 7 -- - Syndicated Content 1- - . Available from Commercial News Providers. 40 * S S qw Mw - m 4u-. 49bpnm - 4b--- allow-1010 5- ~ --mo- o- mo IM 00rn i q-w now d q%.-no 40M cow--A ON o~ db omm come n 0 -9FA S o -,,* 5m n "%M -b -womme ,a 4b Youths of note Special to the Chroncle The Pope John Paul II Catholic School choir performed Jan. 25 at the "Winter Musicale," pre- sented by the Interfaith Council of Citrus County. The choir, directed by John Willette, per- formed four songs for the attendees at the First Presbyterian Church in Crystal River. The school choir performs at numerous school and community functions throughout the school year. The group Is made up of third-graders through eighth-graders. I___A___NT_1'__________CITRUS COUNTY (FL) CHRONICLE SC SATURDAY. APRIL 2. 2005 SATURDAY EVENING APRIL 2, 2005 A: Adelphia,Citrus B: Bright House D: Adelphia,Dunnellon I: Adelphia, Inglis A B D I 6:00 6:30 7:00 7:30 8:0018:30 9:00 9:30 10:00 10:30 11:00 11:30 WSHNews 'G' cc NBC News Entertainment Tonight (N) LAX "Senator's Daughter" Law & Order: Special Law & Order: Criminal News 'G' B] Saturday C 19 19 19 95 [E 6869 '14' C9 2289 Victims Unit '14' 5753 Intent '14' cc 70718260 1444 Night Live B(WED BBC World Women- The Lawrence Welk Being Keeping Up As Time May to Summer Yes, Open All Porridge pes 3 3 News'G'21 Health Show 'G' 3395 Served Goes By December Wine Minister Hours 38173 LwFT Life Laundry Life Laundry The Lawrence Welk Keeping Up As Time Being Good The Vicar of Chef! 'PG' Fawlty Black Adder B 5 5 5 5 'G' 6647 'G'3717 Show 'G' 40043 -Goes By Served Neighbors Dibley 79203956 Towers'G' 'PG' 98579 (WFLhA News 'G' NBC News Entertainment Tonight (N) LAX "Senator's Daughter" Law & Order: Special Law & Order: Criminal News 'G' Saturday C 8 8 8 8 2685 BB 33753 '14' C] 19173 Victims Unit'14'39937 Intent '14' 9 10496482 95686 Night Live 20 News 'G' c ABC WId Jeopardy! Wheel of Wilder's Little House on Movie: * "Spy Kids 2: The Island of Lost News 'G' Hot Topics ABC 20 20 20 20 5579 News Ic 4734 Fortune the Prairie Dreams"(2002) Antonio Banderas. 65376 21444 27005 WTSP College Basketball NCAA Tournament Semifinal -- Teams TBA. College Basketball NCAA Tournament Semifinal -- Teams TBA. News 'G' Texas 10 10 10 10 From St. Louis. (In Stereo Live) 9 145111 Fromt St. Louis. (In Stereo Live) 9 858173 1992550 Ranger FWTvT) News 'G' cc 46666 M*A*S*H King of the Cops "Las Vegas Heat" America's Most Wanted- News 'G' News 'G' Mad TV Avril Lavigne. (In -FOX 1J313 13 'PG' cc Hill 'PG' '14, DL,S,V' cc 15395 Fights Back 19024 95444 Stereo) '14, D,LS' 9 WCJB News 'G' ABC WId Entertainment Tonight (N) Wilder's Little House on Movie: * "Spy Kids 2: The Island of Lost News 'G' CSI: Crime ABC 11 11 61579 News 9w 13579 the Prairie Dreams" (2002) Antonio Banderas. 25314 81482 Scn Cornerstone Hour Van Impe Mission Expect a Love a Child Leslie Hale 3360840 Live From Liberty Family Wisdom IND 2 2 2 2 8573276 Pres Feeding Miracle 3370227 Worship Keys wN-rews 'G' ABC WId Inside The Insider Wilder's Little House on Movie: ** "Spy Kids 2: The Island of Lost News 'G' Access goC 11 11 43111 News Edition 30647 the Prair Dreams" (2002) Antonio Banderas. 19276 7771260 Hollywood (WMOR The West Wing (In Cheers 'PG' Cheers 'PG' CheatersBelongings on The Twilight Zone (In The Outer Limits "The Maximum Exposure WB _1 2 12 12 12 Stereo)'PG 91956 32192 53173 curb. BB 40685 Stereo) 'PG' 9 20821 Shroud" '14, D,L,V' 9 "Critter 911" 'PG' 46043 6 Eye for an Hometime Yes, Dear Every- Seinfeld ld Paid That's News 'G' 1290043 The X-Files "The Field IND_ Ee6 6 6 6, Eye G' 6222753 'PG, D,L' Raymond 'PG' 'PG, D,L' Program Funny 'PG' Where I Died" '14, V' TOG Garners That'70s That '70s Friends 'PG' Movie: * "The Wings of the Dove" (1997, Ultimate Poker Challenge Star Trek: Enterprise (In F"I M 4 4 4 4 Unleashed Show'PG, Show'PG, B 9173 Drama) Helena Bonham Carter. 17753 96260 Stereo)'PG' K 28043 WYKE Gaither Homecoming Swan's Place 48227 Bananas 'G' c9 24647 Family Enrichment Series County Kid's Are Community Florida AM 16 16 16 16 Hour75918 (Part1 of 5) 37111 Court Great Informa Angler WOGX Wheel of That '70s Seinfeld Friends 'PG' Cops "Las Vegas Heat" America's Most Wanted- News (In Stereo) 'G' B Mad TV Avril Lavigne. (In 13 13 Fortune Show'PG, 'PG' N 3111 '14, D,LSV' i 80685 Fights Back 70208 Stereo) '14, D,L,S' B WACX Higher Joel Osteen Mark Life Center Church Claud Calvary Rod Parsley 'G' BB Sheila J. Mike Silas 21 21 21 Ground 'PG' 5395 Chironna 999734 Bowers Assembly 650208 Spencer Murdock BB Malafaia Lente Loco Noticiero Asi Es... Gilberto Gless SAbado Gigante 'PG' 710598 Primer Noticiero a 15 15 15 15 ,'PG' Univisi6n 988395 Impacto Univisi6n MWXPX iracle Pets (In Stereo) Magic NBA Basketball Orlando Magic at New Jersey Nets. From Faith Under Fire Dislike Paid Paid 17 (EI 'G' 9 97192 Preaame Continental Airlines Arena in East Rutherford. N.J. 308192 of Christians. (N) 'PG' Program Proaram SCaesars Caesars City Confidential 'PG' City Confidential 'PG' Cold Case Files Arsonist; prison snitch. '14' American Justice "A (A 54. 48 54 54 4/ L24/7 'PGL' 421937 430685 400444 Warrant to Kill"'PG, V A 55 64 5 Movie: ** "Llonheart" (1990, Action) Jean- Movie: **. "Hard Target" (1993, Drama) Jean- Movie: ** "Death Warrant"(1990) I** 55 64 55 55 Claude Van Damme, Harrison Page. 34207734 Claude Van Damme. 870289 Robert Guillaume 4045753 "Lionheart' 35 52 1 52 Austin Stevens: Animal Cops Houston Ferocious Crocs 'G' c9 The Hippo: Africa's King Wild Kingdom "Rumble in Ferocious Crocs 'G' BB A 52 35 52 52 Snakemaster 9 6773294 Fighting dogs. 'PG' 3359734 of the River the River" 3372685 8524821 BRAO Queer Eye for the Queer Eye for the Movie: **** "Platoon" (1986) Tom Berenger. A soldier Movie: *** "Hoosiers" (1986) __ Straight Guy '14' 170314 Straight Guy '14' 795647 embarks on a yearlong tour of duty in Vietnam. 280666 Gene Hackman. BB 709260 Mad TV (in Stereo) '14' Mad TV In Stereo) '14, Comn.- Com.- Chappelle's Chappelle's Crank Drawn Shorties Distraction 27 61 27 27 1 93314 D,L,S' [B 33395 Presents Presents Yankers '14' Together Watchin' '14, L' 15685 98 45 98 o Inside Fame "Reba Greatest Songs of Faith Movie: * "Brian's Song" CMT Music Peacemakers "Legend of 40 Greatest Women of ____984 98 McEntire" 66260 46869 (1971) James Caan. 2117005 the Gun" 38840 Country Music 728227 95 60 60 El News Weekend El Hollywood Hold 'Em 40 Celebrity Weddings 40 Celebrity Weddings Saturday Night Live (In Gastineau Gastineau ITV B _95 60 60 233482 973463 and a Funeral 982111 and a Funeral 979647 Stereo) '14' 972734 Girls Girls (EVV'i] 96 65 96 96 Mother Angelica Live Daily Mass: Our Lady of Triumph of the Faithful In Persona The Holy Fr. John Corapi 'G' The Journey Home 'G' Classic Episodes the Angels 4521005 Christi Rosary 4520376 7604918 29 52 29 29 Full House Full House Gilmore Girls (In Stereo) Gilmore Girls (In Stereo) Gilmore Girls (In Stereo) Whose Whose Home Home S 2 'G' 234463 'G' 258043 'PG' c9 778482 'PG, D' BB 754802 'PG' 9 774666 Line? Line? Videos Videos S 30 60 30 30 Movie: **, "Con Air" (1997, Suspense) Nicolas Movie: *** "Escape From New York" (1981) Nip/Tuck "Cara Nip/Tuck "Sofia Lopez, Cage, John Cusack. 1335956 Kurt Russell, Adrienne Barbeau. 4518531 Fitzqerald" 'MA, LS,V' Part il" 'MA, L,S,V' Debbie Travis' Facelift (In Get Color Design on a Design Decorating Designer reDesign Design on a Design on a City Date With (HOITT) 23 57 23 23 Stereo) 6458314 4782395 Dime Remix Cents Finals (N) 6420531 Dime Dime Gardener Design [Ri.BT 51 25 51 51 UFO Files 'G' 9 7871227 Conspiracy? 'PG' c Conquest of America B9 Conquest of America 9[ Conquest of America B9 Conquest of America cc I 1 .5 1 4536937 4545685 4525821 4535208 ,.7602550 ied 24 38 24 24 Movie: "Heart of a Movie: A"Shattered Hearts" (1998, Drama) Movie: * "The Unsaid" (2001) Andy Garcia, Strong Medicine _i__ 2 8 2 2 Stranger"'PG, L' 484531 Adrienne Barbeau.'PG, D.L' B (DVS) 647173 Vincent Kartheiser. c9 760463 "Omissions" 676685 NICir 28 36 28 28 Fairly Faidy Nicktoons Nicktoons 2005 Nickelodeon Kids' Choice Awards Drake & Full House Full House Fresh The Cosby 28 36 __ __ Oddparents Oddparents TV 262111 TV 987918 (In Stereo Live) 272918 Josh 'Y7' c 'G' 228937 'G' 237685 Prince Show 'G' C i 31 59 31 31 Movie: "Dante's Peak" Movie: ** "10.5" (2004, Suspense) Kim Delaney, Beau Bridges, Fred Ward. Premiere. A series of pow- Movie: ***'A "Apollo 31 59 31 31 (1997)2062111 erful earthquakes threatens the West Coast. 9f 1444869 13"8797840 37 43 37 37 MXC 'PG' MXC 'PG' Worid's Most Amazing CarpocIalpse "Wash and Boom! (N) MXC 'PG' The Ultimate Fighter (In WWE Hall of Fame 1 1RE818937 809289 Videos '14' cc 267289 Wear" (N 276937 556685 524111 Stereo) 259260 Induction Spectacular 49 23 49 49 aMovie: **'A "Kingpin" (1996, Comedy) Woody Movie: ** "Road Trip" (2000) Tom Green, Movie: ** "Road Trip" (2000, Comedy) Tom [_g__ 49 23 49 Harrelson, Randy Quaid. BB 268622 Breckin Meyer. Premiere. BB 713717 Green, Breckin Meyer. IT 327647 TCM 53 Movie: **' "Courage of Lassie" (1946) Movie: **** "North by Northwest" (1959, Suspense) Cary Movie: *** "Sinbad the Sailor" Elizabeth Taylor. 9] (DVS) 24828173 Grant, Eva Marie Saint. B9 (DVS) 2976258 (1947) 9 5307753 53 34 53 53 To Be Announced 964227 American Chopper Extreme Surgery 'PG' 9 Extreme Surgery 'PG' cO Extreme Surgery 'PG' c Extreme Surgery 'PG' NE 'Police Bike 1" 'PG' 412289 425753 428840 478005 50 46 50 50 While You Were Out 'G' What Not to Wear "Donia" Moving Up "Pink to the Trading Spaces 'G' B9 Town Haul Amphitheater. Moving Up "Pink to the 50 46 50 50 514734 'PG' c9 285685 Brink" (N) 'G' 261005 281869 (N) 'PG' 284956 Brink" 'G' 867463 S 48 33 48 48 Movie: *** "The Perfect Storm" (2000) George Movie: *** "Twister"(1996, Drama) Helen Movie: *** "Twister" (1996, Drama) Helen Clooney, Mark Wahlberg. 919666 Hunt, Bill Paxton, Cary Elwes. 263463 Hunt, Bill Paxton, Cary Elwes. 530647 A 9 54 9 9 Word Poker Tour 'PG' 8765734 Kings of the Road Bigfootville B9 8786227 British Columbia: Kings of the Road 8766463 Vancouver & Beyond 'G' 1985192 S 7 32 47 47 Kojak "Pilot" Ving Rhames stars. cc 648044 Law & Order: Special Law & Order: Special Law & Order: Special Law & Order: Criminal Victims Unit '14' 618163 Victims Unit '14'513519 Victims Unit '14'363096 Intent '14' cc 515717 W 8 18 la I 1 MLB Preseason Baseball: America's Funniest Home Arena NBA Basketball Charlotte Bobcats at Chicago Bulls. From the WGN News "Highway" CIi 18 18 18 1C Cubs vs. Mariners Videos 'G' 782173 Paintball United Center in Chicago. (In Stereo Live) 1M 278821 759005 SATURDAY EVENING APRIL 2, 2005 A: Adelphia,Citrus B: Bright House D: Adelphia,Dunnellon I:Adelphia, Inglis A D I 6:00 6:30 7:00 7:30 8:00 8:30 9:00 9:30 10:00 10:30 11:00 11:30 4 4 Lizzie Phil of the Zack& That's So That's So That's So Lizzizz ie zie That's So That's So Lizzie Lizzie 46 40 46 46 MGuire 'G' Future 'G' Cody Raven Raven 'G' Raven 'Y7' McGuire McGuire 'G' Raven 'G' Raven . McGuire 'G' McGuire 'G' Movie: "Straight From the Heart" (2003) Ted Polo, Movie: "Out of the Woods" (2005 Drama) Ed Movie: "Out of the Woods"(2005, Drama) Ed HaL 68 Andrew McCarthy. B[ 3374043 Asrier, Jason London. Premiere. B 3346260 Asner, Jason London. Bc16740802 : "Spy Movie: "Kangaroo Jack" (2003) Movie: * "Scooby-Doo 2: Carnivale "New Canaan, Chris Rock: Never Scared (In Stereo) S Hard" Jerry O'Connell. c] 564376 Monsters Unleashed" cc 572395 CA" 'MA' 879032 'MA' 9 8804395 : "Stuck on Movie: * "2 Days in the Valley" Movie: * "Cradle 2 the Grave" (2003, Action) Movie: * "The Girl Next Door" (2004, I_ You" (1996) Danny Aiello. 6549463 Jet Li, DMX. (In Stereo) cc 67249802 Comedy-Drama) Emile Hirsch. CC 7088463 MT 97 66 Q 97 97 MTV Cribs MTV Cribs Boiling R. Wrld R. Wrd Trippin' Pimp My Damage Punk'd 'PG, Viva La Famous Boiling 232005 256685 Points Chal. Chal. 509289 Ride 'P0' Control L' 499463 Bam 'PG' Face Points 71 Greatest Natural Explorer "The Witchcraft Naked Science 3862192 Naked Science "Alien Expeditions to the Edge Naked Science 6063821 Wonders 7657276 Murder" 3853444 Contact" 3882956 (N) 'G' 3885043 3 M Movie: "Lena: My 100 Children" Movie: * "Cosmic Africa" Movie: * "Medicine Man" (1992, Drama) Sean "Christopher 62 (1987) Linda Lavin. 'PG' c[ 2768937 (2003) (In Stereo) BB 80174444 Connery, Jos6 Wilker. Kc 9850111 Columbus: The SPaid Paid Tim Russert 2148647 The Suze Orman Show The Suze Orman Show Tim Russert 2147918 The Suze Orman Show P ) 43 42 '43 4 Program Program 3 2157395 (N) c9 2137531 1741192 C 40 29 40 40 CNN Live Saturday The Capital Gang 218127 CNN Presents: Global Larry King Live 313591 CNN Saturday Night CNN Presents: Global 584005 Warming Threat 668668 Warming Threat CORT 25 55 25 25 I, Detective I, Detective Cops '14, V' Cops 'PG, Forensic Forensic Psychic Psychic Dunne: Power, Privilege Hollywood Hollywood 1253376 L,V' Files 'PG' Files 'PG' Detectives Detectives & Justice Heat 'PG' Justice CSAN 39 50 39 39 Public President America & the Courts American Perspectives 537937 American Perspectives 39 50 39 39 Affairs Bush 48289 528289 The Beltway Fox News Fox Report 6741043 Heartland With John Big Story Weekend-Rita At Large With Geraldo After Hours Fox News 44 37 44 44 Boys Watch Kasich (Live) 6727463 Crosby Rivera (Live) 6740314 Watch S N1 BC 42 MSNBC Adventurer MSNBC Adventurer MSNBC Adventurer MSNBC Adventurer MSNBC Investigates MSNBC Investigates 8863666 6721289 6730937 6710173 6713260 8902937 Poker 2004 U.S. Poker 2004 U.S Poker 20oker 2004 Uker 2004 U.S. Poker 2004 U.S. SportsCenter (Live) cc (Ii) 33 27 33 33 Championship. 9 300005 Championship. 9 896227 Championship. cc 872647 Championship. c9 885111 Championship. BB 895598 846685 34 28 34 34 MLB Preseason Baseball: Horse Racing: WinStar Cheerleading: College Cheerleading: College Cheerleadin Kristi Yamaguchi's: Salute to American C(tNI 3C4 2 3 Cubs vs. Mariners Oaks/Derby Cheer and Dance Cheer and Dance g Musiq 7134598 S3539 35 35 Baseball Caribbean Worid Series -- Dominican Softball 360 The Sports Beyond the Glory B9 FSN The Sports Poker Superstars .^ 3 3 35 3 Republic vs. Mexico. 336918 List 340111 America List Invitational Tournament SN 363 1 1 1 College Baseball Georgia Tim Arena Football Georgia Force at Tampa Bay Storm. From the St. Inside the Inside the Golf Life Arena __ 36 31_ at South Carolina. McCarver Pete Times Forum in Tampa, Fla. (Live) 313024 Lightning HEAT 34598 Football 1- =-Local 9 a.m. 4:30 p.m. 5 p.m. 5:30 p.m. National Public Radio, WYKE Sheriff's 10-43, WYKE Life Lines, WYKE Inside Business, WYKE Unscramble these four Jumbles, one letter to each square, to form four ordinary words. SOSAB 02005 Tribune Media Services, Inc. All Rights Reserved. RATTI MOCINE [ wwwjumble.com GIOADIA - :. -.j; 'j .". Market Place, WYKE Your CC Court, WYKE A Few Min. With, WYKE Marion Citrus Report, WYKE 6:30 p.m. 7 p.m. 7:30 p.m. 8:30 p.m. THAT SCRAMBLED WORD GAME by Henri Arnold and Mike Argirlon That's all I took I get? out taxes and insurance 4 r-- 7 THE EXOTIC PANG.E QUIT BECAUSE HEF PAYCHECK WAS--- Now arrange the circled letters to form the surprise answer, as suggested by the above cartoon. Answer.I (Answers Monday) Yesterday's Jumbles: PUDGY ERUPT MALLET JESTER Answer: When they settled their disagreement over a new bed, they PUT IT TO "REST' Bridge PHILLIP ALDER Newspaper Enterprise Assn. William Hazlitt, an English essayist, wrote: "There is nothing more likely to drive a man mad than the being unable to get rid of the idea of the distinction between right and wrong, and an obstinate, constitutional preference of the true to the agreeable." One must find bridge agreeable; otherwise, why play? And knowing the difference between a right and wrong bid or play will add to its agreeability - if that is a word. However, today's deal, where South is in four spades, is built around the word "preference." Why is that? If you and your partner use neg- ative doubles (recommended), South's one-spade response guar- antees at least a five-card suit. (With only four spades, South would make a negative double.) North has an automatic raise to game. West leads the heart 10 in answer to his partner's overcall. East wins with the heart king, cashes the heart ace, and ... what? Clearly West started with a dou- bleton heart, so East wants his partner to trump the third heart and to return a diamond for the contract-killing ruff. ' But how will West know to lead West A 5 10 2 * 8753 .1. 8 75 3 North 04-02-05 A K 9 6 4 S76 4 AKJ ' SAK J East A 8 3 2 SAK J 9 8 2 - 2 Q 10 9 6 4 South A A Q J 10 7 SQ5 3 SQ 10 9 6 4 4- Dealer: North Vulnerable: East-West East l V All pass Opening lead: V 10 South West North 14 1 A Pass 4 4 . a diamond, not a club? Because East sends a suit-preference sig- nal. He continues with the heart jack, his highest remaining heart asking for a shift to the higher- ranking of the other two side suits. (If East had a club void, he would lead the heart eight at trick three.) Finally, for experts: To emplih- size diamonds, East should break the normal rule and win trick ore with the heart ace before cashi-og the heart king, again signaling fqr diamonds. T he PlusCode number printed next to each program is record a program is enter its PlusCode number. for use with the Gemstar VCR Plus+ system. If you If you have cable service, please make sure that your have a VCR with the VCR Plus+ feature (identified by cable channel numbers are the same as the channel num- the VCR Plus+ logo on your VCR), all you need to do to bers+ system, please contact your VCR manufacturer. The channel lineup for LB Cable customers is in the Sunday Viewfinder on page 70. Marriage cheaters hurt relations Dear Annie: I recently separated from my husband of four years due to his accusatory and jeal- ous nature. We also experienced prob- lems with our children from previous marriages, and decided it would be best to separate and attend counseling. .* | However, we only attended one session. Now, "Jared" no "(. 4 - longer is willing to go. I recently found out that Jared has been e-mailing my best friend, flirting and solic- iting sex. She is married and declined his offer, but I'm sure he's still trying. He also has made several attempts with other women to have an affair. ANN Should I continue to hold MAIL on to the hope that our mar- riage is worth saving, or do I accept the fact that a divorce is inevitable? Jared always tells me that I ,am the only woman he thinks about, but given the recent developments, can I ever trust him? Is this a brief glimpse of his true nature? And is it true that peo- -ple who accuse others of cheating are generally cheaters themselves? - Displaced Wife in Kansas Dear Kansas: Cheaters often accuse 'others of the same deed, but not every accuser is cheating. IfJared is soliciting sex from other women and he refuses to attend counseling sessions with you, he is not interested in preserving your marriage. Without counseling, he will not change his behavior, and you will never, trust him. We're sorry to say that it's ; time to cut him loose. ' Dear Annie: I have a brother who is married to a woman nobody likes. Over the past several years, she has managed to convince him to stop attending family functions, so now, we barely see him. Phone calls are infrequent. They have a 7- year-old son I have never NE'S met. .BOX I don't expect you to fix this relationship, but I recall you printed something in your column last year about Reconciliation Day. If you print the information again, I promise to send it to my brother and hope for the best. - Left-Out Sister Dear Sister. Relationships cannot be improved when only one person is will- ing to do the work, but we hope printing this will help. We are carrying on the tradition that April 2 be set aside as Reconciliation Day, a time to make the first move toward mending broken rela- tionships. It also would be the day on which we all agree to accept the olive branch extended by a former friend or estranged family member, and do our very best to put our differences in the past and start over. Dear Annie: I read the letter from "Tapped Out in Virginia," who com- plained that her husband's friend, Ralph, never antes his share for drinks and snacks at their dart parties. It may be that Ralph has had more than his share of hard knocks in life, all the guys know it, and they value his friendship beyond what his share of the munchies and drinks would be. Perhaps Ralph makes his attendance worth- while in other ways. People shouldn't be judged by their financial worth. I'd guess Ralph is con- tinually down on his luck and the guys are happy to share a good time out of pure friendship. She should trust her husband to do the right thing by Ralph. - Been There in Wisconsin Dear Wisconsin: If Ralph is on hard times, no one should penalize himi because he' cannot contribute. However, if he's simply a moocher, we don't blame "Virginia" for being annoyed. In the spirit of Reconciliation Day, however, we hope she is in a for- giving mood. ACROSS 37 Grouchy 40 Vitamin lead-in 1 Truckers' radios 42 "The Gold Bug" 4 Wily author 7 Mme. Gluck 43 Trip part 11 Yes, in Kyoto 44 Air 12 JRace by, 46 Not with-it as clouds 49 Deception 13 Tusked animal 50 Broadcast 14 Feeling lousy 52 -eared bunny 15 Jokesters 54 He wrote 16 Take a chance "Picnic" 17 Cover girl 55 Orbit segments 19 Drop-kick 56 RV refuge 20 Sharp bark 57 McCloud's 21 Pants problem hometown 22 Restaurant 58 Morse code employee word 25 Snowy period 59 Keep it down! 28 Here, for monsieur DOWN 29 Concrete foundation 1 T'ai ch'uan 31 Knock 2 Salve politely 3 Round building 33 Computer 4 Sell hot tickets language 5 Drag along 34 Livy's bear 6 Fabric means. 36 Military addr. 7 Sudden Answer to Previous Puzzle PIT SIRS BO0D AOWJEE D D ALE RE F AIMIMO UR LS TU M101I'L P E A A R BALD I S 0OAN STY LE IBN EEOREXICEL EERIE IIBIS GRACE ELIS MOOIRUMNKEMP ELAN PAID UK E AKLMISESING TOO LcYS L GE7 S.SN'; 8 Pork cut 9 Antenna pole 10 Indiana Jones quest 12 Jogger's wear 18 Batik need PUZZLE ENTHUSIASTS: Get more puzzles in Random House Crossword MegaOmnibus" Vols. 1 & 2. 19 ATM code 21 Leaf vwins 22 Travel word 23 Aussie rock group 24 Factfudger - 25 Suspicious 26 Footnote abbr. S(2 wds.) 27 Engrossed 30 Oil job 32 Taro dish 35 Improves upon 38 Summits 39-- appetite! : 41 Yuckl 43 Midday break 44 Freeman of films Q 45 Othello's foe 47 Varieties 48 Cry of disdain * 49 Punch or jab 50 Bummed out '* 51 Time span 53 Oompah- - 4-2 2005 by NEA, Inc. CELEBRITY CIPHER by Luis Campos Celebrity Cipher cryptograms are created from quotations by famous people, past and present Each letter in the cipher stands for another. Today's clue: C equals F -t " RPG Z HM K RP KZ JHPR CVE MV G H M, AOR RPG2Z H X JHFW WRHMKWI WRPXX CVE H JVGHM VC RSPERF." EVAZER CEVWR PREVIOUS SOLUTION "Mix a little foolishness with your prudence: it's good to be silly at the right moment." Horace (c) 2005 by NEA. Inc. 4-2 I IF TvrTWn-r T A IT Nir 1" TVT .?* .;; I I CITRUS COUNTY (FL) CHROMCLEC o1 *0j .9 9 * * %J A ill COMICS I 47.? '4 .* ~ a ~I. ~ Emil 4a1 * - ~ua 93 '42- Copyrighted :enal_ 1 -m Syndicated Content I Available from Commercial News P.roviders n" a lp ddbft* r ~4, - Of -a * t 4 a b a - %AW di if- D * j. 40 0 b m 4 ow q mmy b eft o-M - w.FIIIIPI O Am1. *? -I i - a woo .c & V '- o '^ ,2,.. , y a . - -^^ ^ _^^^* .=--a a a C f a., * 0* 0 * - ado 0 oqu * * ) 00 is- qfwm 40 -mo - 4 dm dm.- do q- --4m --w b q m .m * -- a ONOW -- An- -o ow- .- -do dw a m 4t. mm -mw 4 a ft 40 a 40 4m bb-O.0 a 4- dD4p- quo- ft 'a 0-4baw mmb- w 4dw o a o- am S ma aw- I001 am-t4 4df 0 a-0 -ommm D-mom-o 4 4awo -wd- ~ -am wo 40M - - dw Gomm0 -a 01W .090 dip do 40- a 421W a? Em 469*6 ~Ih1 'I 0 * a - - O MM "0VAOM U.- 0 0 '-4 9 * d S a m ,,,,4me 61 r- S * * 0 SATURDAY, APRIL 2, 2005 9C " -- : s qmo*AN - - qml . 4wm 4m emlop fe v rr or OP1 o IL WT? I 040 ,an . ,1AT p 2C U N. M o .-F0.8 p m : 0 ~ .- 5-m .- - 563-5966 726-1441 Outside of Citrus County or Citrus Springs call: 1-888-852-2340 I~ ~ WINE. -1 Sunday Issue Sunday Real Estate Monday Issue Tuesday Issue Wednesday Issue Thursday Issue Friday Issue Saturday Issue 5pm Friday 3pm Friday 5:30 pm Friday 1pm Monday 1 pm Tuesday 1 pm Wednesday 1 pm Thursday 1pm Friday 6 Lines for 10 Days! 2 items totaling I '15 0 ......................... 5 0 $151 -$400................$1050 401 -'800................$15" $801 -$1,500 ...........$2050 Restrictions apply. Offer applies to private parties only. All ads require prepayment. VISA Be sure to check your advertisement the first d it appears. We cannot be responsible for more than one incorrect insertion. Adjustments are made only for, the portion of the ad that is in error. Advertisements may be canceled at soon as results are obtained. You will be ' billed only for the dates the ad actually " appears in the paper, except for specials.' Deadlines for cancellations are the same as the deadlines for placing ads. SPCI1.NTIES02-65 *Ii ATE 0510I'I4 Il 8- 9 SRICS20-66AIiAi 4004 15 M II*HO ESFR EN OIA 50-4 LOOKING for G trim slim petite woman '45 to 55 that Is honest, nonsmoking to share my Ocala home. Being employed Is not Important. Some of my likes are movies, weekend trips, & spending time together .for lasting relationship, i What's yours? 352-209-0151 SSWM, 51, slim, 5'10", athletic, curly brown halr, Capricorn, N/S, social drinker, likes Rock muslc. Nice home, cool L car, college grad, works P/T. Seeks N/S, outdoorsy, smart, Democrat gal for sharing fun dates, Rich, (352) 726-6243 COUNTRY WESTERN Music Show with Buddy Max every Saturday at 2pm. Cowboy Junction Opry, Lecanto. Free!! FREE CATAHOULA MIX yrs old, loves people & animals. Well mannered, to good . home (352) 527-2932 2 CATS FREE TO GOOD HOMES 5 yr old female Calico, spayed w/shots. 3 yr old gray Tabby female, spayed w/shots, Call Mellssa, (352) 628-5250 7 free kittens Call for info, ask for Sara (352) 795-5951 8 WEEK OLD PUPS Lack lab mix puppies. available on Saturday, 4/2. Call Mlndy @(904) 655-2073 10 Mo. old Chow Mix Loves people & other animals. Housebroken. (352) 344-0326 ** FREE SERVICE** Vehicles Dead or Alive Removed. No title OK 352-476-4392 Andy 3/4 CUR, 1/4 CATAHOULA Cow/hog puppies. Free to good home. (352) 563-5779 SCAT ADOPT-A-THON Saturday April 2, 2005 10:00 AM To 2:00 PM Sponsored by Humanitarians of :Iorida Inc. and Home at Last Pet Adoptions, Inc. Manchester House Corner of Highway 44 N. and Conant Ave. 2 )locks West of the Key Center. Look for the white building with bright colored paw printsll 1149 Conant Avenue Crystal River Fl Call 352-563-2311 352-476-6832 352-382-9014 Siamese, Abyssinian, SMaine coon, exotic r lxes and others will be available along with domestic long and short-haired calicos tuxedos, tortoise, tabbies and more. All will be spayed or neutered and have heir shots, tested and negative for Feline Leukemia and Feline Aids. All are wormed ind given flea control, many are micro chipped. Donation fees. c re set for each animal, COMMUNITY SERVICE The Path Shelter Is available for people who need to serve their community service, (352) 527-6500 or Leave Message Conn. Dbl Keypad )rgan w/Leslle speaker ss. Worker well Antique white finish, not quite 'L. Call Denise for Info. at (352) 637-0770 *WANTED* Dead or Alive. Vehicle Removal No title okay. Lv msg, (352) 563-6626 Exotic/Domestic Cat & kitten adoption, Saturday, April 2, Humanitarians of Florida, Set donation required, Includes spay/neuter, all shots, testing, etc. 352 476-6832 for Information, descriptions of available pets, directions to event. FREE Back Seat for Plymouth Voyager .(352) 795-3920 FREE Lab Mix puppy, 4 mths, female. (352) 637-0667 FREE Yellow Lab Mix (352) 746-4222 FREE 2 KITTENS 8 months old, to good home (352) 344-4974 FREE GROUP COUNSELING Depression/Anxiety (352) 637-3196 or 628-3831 FREE HAULING SERVICE autos, boats, engines, steel & scrap metal, etc Fred 628-2081 FREE TO GOOD HOME 1Y2 YEAR OLD FEMALE BORDER COLLIE MIX Spayed, good with children, needs room to runI (352) 637-2198, leave message please GREYHOUND MIX Female, spayed. Housebroken. Crate trained, Up to date on all shots. Great with kids. No other large dogs. Ask for Sara (352) 795-5951 KITTENS PURRFECT PETS spayed, neutered, ready for permanent loving homes. Available at Eileen's Foster Care (352) 341-4125 THE HOME STORE a Habitat for Humanity of Citrus County Outreach, Is seekhg Donalinsof use- able building materials, home remodeling and decorating Items, furniture, and Appliances, No clothing please. Volunteers are needed Ihthe Home Store on Mondays & Thursday. Store hours are: 9am-5pm Mon-Sat. Call The Home Store 3685 Forest Drive Invemess (352)341-1800 for further information. rescuedpetcom Requested donations are tax deductible Pet Adoption Fri 4/1 & Sat4/2 8-lPm 8390 N. Orangebud Terr. C.R. Cats Calico Maine Coon type F/18mos 726-1006 Several special needs cats seekloving homes various ages and sexes donation fee reduced or waived 746-6186 2 adult F LH gray tabbies owner died - must be adopted to- gether 795-9550 DSH White F/ 5yrs - declawed only pet 746-6186 Kittens, young adults to seniors various colors, M & F 746-6186 Persian Black 11 yrs old surrendered due to family circumstances 621-8086 Lhasa adult M 527-9050 Pekinese 7-8yrs F not fully trained 527-9050 Westle-Cairn Terrier Mix adult M white 527-9050 Doxl adult M 341-1195 call before 1Pm Wanted poodles and small dogs suitable for seniors adoptive homes available 527-9050 All pets are spayed / neutered, cats tested for leukemla/alds, dogs are tested for heart worm and all shots are current FREE Laying Hen (352) 860-0540 MIXEDMAINE COON KITTENS, litter trained, free to Indoor homes. (352) 465-0184 Wanted Good Loving home for black Lab 4 yrs. old. Great companion & good temperament 746-0937 Buy Local Sports Photos .. Online www 0. . chronicle online. Chocolate Lab w/tags, male, lost vicinity of 44 & 491 Rusty Duck area, Lecanto. 352-527-0384 or 746-1430 LOST BOSTON TERRIER male, overweight, In Whitelake Dr., Carl St., Inverness. Grandchild & kids are heart broken, please return (352) 341-0289 LOST CELL PHONE Beverly Hills area. Gator face plate Please call if found (352) 746-6507 LOST MINI FARMS area, 9 year old light tan fe- male dog. Very friendly. Answers to name of "Cocoa". Call (352) 586-7157 Tri Color Chihuahua Male, blue collar w/yellow flowers, micro- chipped, vic, Trucks AvR .A0 in210 CELL PHONE FOUND Whispering Pines Park. Call to describe (352) 746-6507 FEMALE TABBY, very friendly w/half a tall. Found between Dunklln & 495 a week ago. 795-7179 Small Mixed breed golden color, Pine Ridge area on Aleuts Drive. (352) 249-9176 )iOICes.,,,,,, ,,99{ IBOnktcPteyrs$1891 WE COME I TO YOU! I |l M is ............... 63740 "MR CITRUS COUNTY' ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 CHEAP HOME OR LAND Homosassa area, Family of 8 left home- less from Hurricane Needs cheap land for home or Ig, home to buy for cheap. Any help appreciated. Call303-467-3042 or 352-489-3058 Iv, msg. CHRONICLE- INV. OFFICE 106 W. MAIN ST. Courthouse Sq, next to Angelo's Pizzeria Mon-Fr i 8:30a-5p cPMo uV c ji CITRUS UNITED BASKET *SURPRISE* $1 BAG SALE MON. APRIL 4 103 Mill Ave. Inverness (352) 344-2242 REAL ESTATE CLASSES Now Enrolling 5/3/05 Sales Lic. Class $249. RON NEITZ-BS,MBA BROKER/INSTRUCTOR CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. ATTRACTIVE SWF seeking male companion. Candi, 352-628-1036 CNA with 25 yrs exp. Impeccable ref's. Physicians & patients In the NY/NJ area. Call Claire 352-527-0356 CPR & First Aide Classes Offered many times per month. Call for Info. (352) 628-9538 CUSTOMER SERVICE REPRESENTATIVE Need Good computer skills, Multi-Line Phone skills and Clerical Skills. Must Be Personable, Hardworking And Dependable. Great Benefits: 401 K, Health Insurance And Paid Vacations. DFWP, EOE Send Resume In C/O: Citrus County Chronicle Blind Box 807M 1624 Meadowcrest Blvd., Crystal River, FL 34429 FT REALTOR ASSISTANT Advertising & Closing coordinator with computer & phone skills. Fax resume to 352-382-5481 JOBS GALORE!!! EMPLOYMENT.NET OFFICE HELP Computer knowledge, light typing, answering phones & accounting exp. Apply In person GIST RV, 2524 W. Hwy 44, Inverness. WANTED RECENT COSMETOLOGY SCHOOL GRADUATES For Associate training Program with 1 of Florida's Fastest Growing Salon OrganizatlonsI Hourly guarantee, 401K, health Ins. Call Becky 352-753-0055 ABITARE PARIS DAY SPA & SALON We are Growing! " Nail Techs " Hair Designers Apply within Call 352-563-0011 HOUSEKEEPER P/T, Apply In person Best Western ,Citrus Hills Lodge LECANTO - Charming studio apt STYLIST For 1 of Florida's Fastest growing prof. salon organizations! 401K, Health Ins. Pd. vacation, Call Becky 352-753-0055 A+ Healthcare Home Health HHA's & CNA's Tired of working In Nursing Homes Try Home Care, Lots of hours available (352)564-2700 or [email protected] ARNP For Doctors office and Nursing Home Fax resumes to: (352) 795-7898 BACK OFFICE ASSISTANT Friendly, energetic Back Office Assistant for fast-paced Chiropractic Office. Responsible for assisting the Doctor with patient care Including: patient flow, vitals and electro-therapy machines, exams and x-rays. Office Is open until 6:30 pm 3 days a week. Ideal candidate will possess: previous patient care experience, excellent communication and computer skills, profes- sional appearance and manner, positive, prosperous attitude, enjoy working with people, 10 arms and 10 legs and love to keep busy. Prefer individual who has 5+ yeqrs office experience. Please fax resume and salary requirements to 352-637-5947 *CNA'a PCA's *PT ACTIVITIES ASSISTANT *PT COOK w/ Med Tech Full time and PRN A.L.F. in SW Ocala Great Workplacel (352) 861-2088 CHIRO. ASSIST. PT 2-3 mo. FT w/Ins. Apply at 6166 W Hwy 44. CR CNA Motivated, 24hr/wk. Apply In person (352) 860-0633 CUtr CNAs F/T 3-11 & Weekends Apply In person at: Life Care Center of Citrus County 3325 Jerwayne Lane Lecanto, FL 34461 or fax confidential resume to 352-746-6081 CPR & First Aide Classes Offered many times per month. Call for Info. (352) 628-9538 DENTAL ASSISTANT Seeking motivated Dental Assistant with exper. Must have expanded functions. Please Call Peggy at 746-0330 DIETARY AIDE Day/ Eve Shift. Apply in person: ARBOR TRAIL 611 Turner Camp-Rd Inverness, FL EOE .DOCTOR'S ASSISTANT Full-time for busy office. Experienced only need apply at 5616 W. Norvell Bryant Hwy., Crystal River, FL (352) 795-1999 *F/T FRONT DESK RECEPTIONIST *P/T MEDICAL RECORDS Busy OBGYN office. Ex- perience preferred. Fax resume to 352-726-8193 F/T Insurance Collections Needed Experience required, Apply In person at West Coast Eye Institute, 240 N. Lecanto Hwy, Lecanto 34461 (352)746-2246. Heathsouth Citrus Surgery Center *F/T CERTIFIED SURGICAL TECH *FT RN FOR OPERATING ROOM *FT PRE OP & POST OP RN *FT CERTIFIED INSTRUMENT TECH *PRE OP & POST OP POOL RN Exc. Working Condition. Full Benefits, Mon-Frl, no Holidays or weekends. Apply in person or mail resume to: HSCSC l ION. Lecanto Hwy Lecanto, FI 34461 HOUSEKEEPERS & LAUNDRY AIDES Avante at Inverness, Is currently accepting applications for Housekeepers & Laundry Aides. Avante offers excellent benefits Including 401 K. Please apply In person at: 304 S. Citrus Ave., Inverness organizationlsil 1"1 *andI aIIIih" ",TEAM PL"AYER1 li Com e andjoin our] EARN AS YOU LEARN CNA Test Prep/CPR Continuing Education 352-341-1715; 422-0762; 422-3656 IMMEDIATE OPENING PART TIME RN Needed for busy office. OBGYN Exp a PLUS. 2 Days a week. Fax Resume to: (352) 794-0877 LPN For radiation/ onocology practice, M-F, flex, sched. Fax resume, Attn: Grace 746-3779 MEDICAL ASSISTANT/LPN Experience needed. Please send resume to P.O. Box 3087 Homosassa Springs, FL 34447 MEDICAL OFFICE Needs knowledgeable person who has had ex- perience in all aspects in working In doctor's office. Please apply In person only at 9030 W. Fort Island Trail, Crystal River, Suite 9-A. MEDICAL STAFFING Must be EXPERIENCED Needed for Busy Office Please call 344-9828 Orthopedic Experience *X-RAY TECH *FRONT DESK w/Billing Exp. Competitive salary. Send Resume to: Blind Box 806-M c/o Citrus County Chronicle 106 W. Main St. Inverness, FL 34450 Our General Dental Practice Needs A Certified Expanded Duty Dental Assistant. If you love dentistry, demonstrate superior technical ability and know the value of great communication skills, you may be the right person for this position. We offer a challenging full-time position In a great work environment with competitive salary and benefits. Please call Misty at Dr. Linda Witherow's office, (352) 795-5935. PHLEBOTOMIST/ MEDICAL ASSISTANT With coding experience needed for busy Dr's office. Must be dependable and proficient In multiple office procedures. Good benefits. Please send resume to: Citrus County Chronicle Blind Box 805-M 1624 N. Meadowcrest Blvd., Crystal River, FL 34429 PROFESSIONAL TRANSCRIPTIONIST Needed for a Diagnostic Imaging Center, Radiology transcription exper. a plus Fax resume Attn: Wendy 352-795-6460 RECEPTIONIST P/T For busy Optometrists office. Looking for people person bubbly personality and the willingness to learn. Apply within Homosassa Eye Clinic 4564 S Suncoast Blvd. Homosassa, Fl. 34446 RN/LPN Avante at Inverness Is currently accepting applications for RNs and LPNs, Full and Part time positions available. Avante offers excellent bonuses and shift differentials as well excellent benefits Including 410 OK. Fax resume to: 352-637-0333 or email or you can apply in person at: 304 C. Citrus Ave. Inverness, FL Nurse Temps RN's, LPN's, CNA's Work Today! 352-344-9828 "RN7LPN"" NEEDED IMMEDIATELY Local Hospital Staffing Private Duty Casesli Experience a must!! WILLING TO WORK ALL SHIFTS WEEKENDS !! PROFESSIONAL APPEARANCE, DEDICATED PROFESSIONAL LIVE IN'S NEEDED HOMEMAKERS C.N.A. / HHA WILL PAY FOR: ACLS. CPR. PHYSICAL/PPD Apply in person at Interim HealthCare 3768 W. Gulf to Lake Highway Lecanto, FL 34461 NO PHONE CALLS PLEASE!I! EOE Lic# HHA20575095 RN/LPN Full-Time RN/LPN needed for expanding Oncology Practice. Experienced with IVs. Good Benefits and Competitive Salary. Fax Resume To: (352) 746-6333 RN'S up to $39 LPN's up to $25 Needed Immediately! Local Hospital Staffing Apply online at 1-800-704-4784 352-620-2322 I I -UmmnitM nager RIIlN l Ic nse.tC CORRECTIONAL OFFICER (Full Time) GREAT BENEFITSII Paid Vacations, Holidays, Health Insurance & 401K Req. H.S/G.E.D. Must posses Florida State Corrections Cert. or presently be enrolled in Corrections Cert. class. A valid Florida Drivers license is required. Call for Into at: (352) 527-3332 ext. 17 M-F 8:30 AM -4:30 PM M/F/VET/HP E.O.E Drug Free Workplace madii kit Ioc. A leader In the mechanical contracting Industry Is currently seeking candidates for the following positions: * HVAC Duct Mechanics, all levels, Including helpers * Accounting Clerk, 2 yr degree or equivalent experience Includ Ing G/L job costing and billing Fax or e-mail resume to 352-237-6258 or mallnda@ Ocala .DFWP/EOE -4- EXPERIENCED 220 UNDERWRITER for large Insurance office, West Citrus, $35,000+. Send resume to Blind Box 808M, c/o Chronicle, 1624 N. Meadowcrest Blvd., Crystal River, FL 34429 Founfains Memorial Park Cemetery Family Services position open. Experienced Cemeterlan preferred. However, will consider right Individual with strong service selling background. Retirees welcome Call 352-628-2555, for appointment Mon.-Fri. 10a- Ip. EOE M/F DFWP ;--- ; c.- .. ,,I..: Is currently accepting applications for FT Social Worker MSW required 3-4 years exp. preferred Great Benefits Begin a rewarding career Contact J. Thacher, HR Manager Telephone: 352-527-2020 Fax: 352-527-0386 Email: ithacher@hospiceof citruscountv.org Mall your resume and credentials to: Hospice of Citrus County P.O. Box 641270 Beverly Hills, Fl 34464 drug-free workplace equal opportunity employer REAL ESTATE CLASSES Now Enrolling 5/3/05 Sales Lic. Class $249. RON NEIIZ-BS,MBA BROKER/INSTRUCTOR CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060 CONCESSION ATTENDANT NEEDED For various Hours, Must be certified. PineRlage County Club 5600 Elkcam Blvd. Beverly Hills (352) 746-6177 COOK/MANAGER Crystal River Moose Lodge is accepting resumes. PT position w/potential to become ,FT, Contact us at 1855 Suncoast Blvd. Homosassa, FL 34448 or 352-795-7030 DISHWASHERS The Cypress Room Rest. Upscale-Dining lo- cated In Downtown Crystal River. Immedl- ate Hire. (352) 795-4046 Exp. Line Cook & Exp. Waitstaff Apply in person: CRACKERS BAR & GRILL Crystal River EXPERIENCED WAITPERSON wanted, 2-8pm shift. Apply In person only. Crystal Paradise Restaurant, 508 Citrus Ave., Crystal River Your World ww.chronicleonline.oom HIRING LEAD '!i COOK, COOKS & SERVERS Good po .: iI Tu ," 11a-9p (352) 637-5888 - Fisherman's Restaurant "-. 12311 E Gulf To Lake Hwy. Inverness - KITCHEN ASSISTANT Apply In person btwn 2-4pm Cafe on The Avenue 631 N. Citrus Ave I LINE COOK Experience Preferred Or Will Train. i Apply In Person. JR's Pub & Grille 20199 E. Pennsylvania Avenue Dunnellon SEEKING COOKS 7 & DISHWASHERS FT & PT positions avail., Benefits & top pay. Good attitude a must. Apply In - person. Citrus Hills - Golf & Country Club 505 E Hartford St. , WAIT STAFF & COOK- Scampi's Restaurant , 352-302-4098, 634-453vi $$$ SELLtAVON $$f FREE gift. Earn up to 501 Your own hrs, be your,# own boss. Call Jackie,"., I/S/R 1-866-405-AVON% SCooke School 1, of Real Estate Inverrnss Locatiorl Flexible Times Call ERA American Realty ; for info 0 726-5855 John or Sandra ADVERTISING - SALES The Chlefland Citizen has an opening for an advertising salesperson In the Chlefland area. Previous advertising or sales experience Is. preferred. We will consider other applicants and offer- a complete training program. This Is an excellent opportunity to join the best newspaper organization In Florida. Future management and supervisory opportunities are available. We offer excellent benefits, Including 401k plan, Insurance and more. If you are Interested, please apply In person at the Chlefland Citizen office at 624 West Park Ave., Chlefland or you may send your resume to Dale Bowen, , Chiefland Citizen, , P.O. Drawer 980, Chlefland, FI 32644. You may also e-mail your resume to dbowen@svicnet - Drug screening required. EOE EXPERIENCED < TELEMARKETERS WANTED 1 Looking for Appointment Setters & those who can sell over the phone. Hourly + Commission If You Can Sell, The Sky Is The Limitl Fill out our online survey at: Legendary careers.com We will contact you., LOCAL PLUMBING WHOLESALER LOOKING FOR INSIDE SALESPERSON Exp. Helpful,. Customer Service oriented person need apply. Benefits, 401 K, Apply In person 7559 W. Gulf to Lake Hwy. 1 CITRUS COUNTY (FL) CHiRONICIip 2OC sATURDAYAPRIL 2 5 CLASSIFIED i SATURDAY, APRIL 2, 2005 1IIC ies^^ Trades~ oil^ I s a ilels- WE ARE CURRENTLY ACCEPTING APPLICATIONS FOR THE FOLLOWING POSITIONS: galesTIME &-boun ,calls, process classified by typing, pricing, scheduling, payment and follow up after the sale. 29 hours per ,Week, Monday through Friday. 0l f x s -uv .. e -. S. . . . EaO o nymoCRYSTAL RIVER, FL 34429 SAFFORDABLE, " I DEPENDABLE I HAULING CLEANUP. STrash, Brush, Appl. SFurn, Construction & Debrs.352-697-001126 1 0% OFFNEW CCTS Wpit Fire Wood for Sale SDAVID'S ECONOMY JOE'SEE SERVICE, Removal, 8i trim. Uc. 99990000273 Insured 352-637-0681 I DOUBLE J STUMP 'GRINDING, Mowing, Haullng,Cleanup, ,Mulch, Dirt. 302-8852 D's Landscape & Expert Ttee Svce Personalized design. Cleanups & Bobcat work. Fill/rock & ,Sod: 352-563-0272. U's Landscape & Expert Tree Svce Personalized design, Cleanups & Bobcat work. Fill/rock & 'Sod: 352-563-0272. R WRIGHT TREE SERVICE, tree removal, stump grind, trim, Ins.& Liec #0256879 352-341-6827 STUMP GRINDING Ic. & Ins. Free Est. *Billy (BJ) McLaughlin 352-212-6067 STUMPS FOR LE$$ TQuote so cheap you won't believe Itl" S(352) 476-9730 TREE SURGEON Wdc#000783-0257763 & Ins. Exp'd friendly serve, f I nw..rnfA,^fqM PrAA arruvKIJUu 1u numc 'Help. Problem fixing, ttor als, system set-up, 24 hrs. (352) 564-0372 ' PC's-N-PARTS Spring Cleaning $19.99, VKr11is ouilrtll ruuinign & Wallcovering.All work 2 full coats.25 yrs. Exp. Exc. Ref. Uc#001721/ SIns. (352) 795-6533 AFFORDABLE PAINTING WALLPAPERING & FAUX Uc. 0214277 & ns. S(352)697-1564 All Phase Construction 1 Quality painting & drywall repairs. Free est, #0255709, 352-586-1026 CHEAP/CHEAP/CHEAP DP Pressure Cleaning & Painting. Ucensed & 'Insured. 637-3765 George Swedlige Painting- Int./Ext. Pressure Cleaning- Free e*t. 794-0400/628-2245 I INTERIOR/EXTERIOR & ODD JOBS. 30 yrs J. Hupchlck Llc./Ins. (352) 726-9998 PAINTING & PRESSURE 'WASHING Int/ Ext. 20 ,rs, exp, Free est. (352) 021-1206 or 697-3116 POWER WASHING, painting & vinyl siding LiUc #0017610258286 (352) 400-2285 Wall & Ceiling Repairs Drywall, Texturing, Painting, Vinyl. Tile work. 30 yrs, exp. 344-1952 mRurneaoA. BOB LANE COMPLETE ACCOUNTING & TAX SERVICE 35 years experience, 22 yrs In Citrus County. Full retirement planning available. Professional service and guidance, Reasonable rates. FREE ESTIMATES. 400 Tompklns St, Inverness. 34AA-.O8. 4AA-O2OO) AVAIL. 24-HR. CARE Up to 7 days (352) 726-3686 I will care for your loved one In your home. 35 yrs. exp. Excellent references. 746-6553 ELITE PRIVATE DAYCARE, small ratio, wonderful, learning, loving environ- ment, very nice, Reg., R13C1003. Tuition $125 wk Mon-Fri, Breakfast & lunch provided. Located off 44, near downtown Inverness (352) 860-1494 VChris Satchell Painting & Wallcovering.AII work 2 full coats.25 yrs. Exp. Exc. Ref. Lic#001721/ Ins. (352) 795-6533 AFFORDABLE PAINTING WALLPAPERING & FAUX Uc. 0214277 & Ins. (352) 697-1564 HOMES & WINDOWS Serving Citrus County over 15 years. Kathy 465-7334 or 341-1603 PENNY'S Home & Office Cleaning Service Ref. avail., Ins., Uc. & bonded (352) 726-6265 S & J CLEANING Homes Construction 15 years of experience. 344-5092 or 726-8484 Additions/ REMODELING New construction Bathrooms/Kitchens Uc. & Ins. CBC 058484 (352) 344-1620 Budget-Wise? Remdling &Additions. CBC057662/lns. 637-0208/422-7918 cell Rebuild Remodel A to Z no Job to small, Call Russ& Floyd Ucensed & Insured 563-1801 ROGERS Construction Additions, remodels, new homes. 637-4373 CRC1326872 TMark Construction Co. Additions, remodels &. decks, Uc. CRC1327335 Citru on tCW23n2-3A57 FL RESCREEN 1 panel or comp. cage. 28yrs exp #0001004. Ins. CBC avail 352-563-0104/257-1011 ALL PRESSURE CLEAN Houses, Driveways, Roofs, Cement, Mobiles Lic. Ins. (352) 527-9247 AUGIE'S PRESSURE Cleaning Quality Work, Low Prices. FREE Estimates: 220-2913 Lawncare-N-More Spring clean-up, leaves, hauling/ Pressure clean. Tree Work. 726-9570 PICARD'S PRESSURE CLEANING & PAINTING Roofs w/no pressure, houses,driveways. 25 yrs exp, LIc., 1 S DEPENDABLE I HAULING CLEANUP. Trash, Brush, Appl. I Furn, Construction & Debrls.352-697-1126 All Around Handyman Free est. Will Do Any- thing. Lic.#73490257751 352-299-4241/563-5746 Andrew Joehl Handyman. General Malntenance/Repalrs 11 DONE! Moving.Cleanouts. & Handyman Service Lic. 99990000665 (352) 302-2902 NATURE COAST HOME REPAIR & MAINT. INC. Offering a full range of services.Llc.0257615/Ins. (352) 628-4282 Visa/MC STEWART Malnt.& Repair Painting, press- ure wash, hauling, IIlc# Llc#0256991 (352) 422-5000 AFFORDABLE I DEPENDABLE I HAULING CLEANUP. I Trash, Brush, Appl. I Furn, Construction & Debrls.352-697-1126 Underground Sprinklers Installation & Service, Honest, Reliable, LUc & Insured. Low Pricesl CL#2654 (352) 249-3165 * 4 REAL ESTATE AGENTS NEEDED for new office In Crystal River. Great location, dally leads, etc. For confidential Interview, Call 564-1810, Ed NEEDED 10 SALES PEOPLE High Compensation and benefits Call Billy Johnson 352-564-8668 or 386-697-4574. PRESTIGIOUS DESIGN CO. HIRING FOR DESIGN/SALES CONSULTANTS SOnly qualified applicants please. Fax resume to 352-527-4485 L J FlcoSaesH WORK AT HOME! Be a Medical Transcriptiohist Come to this free, no obligation seminar . to find out how with no previous experience you can learn to work at home doing medical transcription from audio cassettes dictated by doctors! High Demandl Doctors Need Transcriptlonists!. Hernando Best Western 350 E. Norvell Bryant Hwy. Hernando, FL 34442 2001 Lowe Street, Fort Collins, CO 80525 Smmwi expArience. Uc#2579/Ins. 746-1004 DANIEL ENO CONCRETE All types, All Sizes. Lic #2506. Ins. 352-637-5839. TMark Construction Co. Additions, remodels & decks, BOBCAT DIRT WORKS LOADER/BACKHOE GRAPPLE/ DOZER SMALL TO MEDIUM JOBS Dave, (352) 572-0800 BUSHHOGGING, Rock, dirt, trash, trees, lawn service, drivewayss. Call (352) 628-4743. F(LL DIRT, ROCK, TOP SOIL. Small (6-yard) loads. Landclearing Call 352-302-6015 FILL, ROCK, CLAY, ETC. All types of Dirt Service Call Mike 352-564-1411 Mobile 239-470-0572 LARRY'S TRACTOR SERVICE Finish grading & bush hogging (352) 302-3523 (352) 628-3924 LAND CLEARING, Fill dirt, house pads, rock & asphalt drive- ways 352-303-2525 MINI PINK DUMPTRUCK 5+ Yards, Most all materials (sod). 341-(DIRT)-3478 , A MOST AFFORDABLE A & REASONABLE * Land & Lot Clearing Also Fill Dirt deliveries, Free est. Uc. Insured. (352) 795-9956 All Tractor Works, By the hour or day Clean ups, Tree Removal, Bush Hog Land Clearing. All Major Credit Cards. 302-6955 All TYPES OF TRACTOR WORK. BUSHHOG SPECIAL $20 an acre (352) 637-0172 * Excavation & Site Dev BJL Enterprises Uc. #CGC062186 (352) 634-4650 LAND & LOT CLEARING + Hauling. Free Est. Helen's Nursery (352) 563-2313 LAND CLEARING, front end loader by the hour, FlIldirt, rock, hauling and demolition, 302-2928 Owner/Buillders Land clearing/fill dirt, concrete driveways, sidewalks, house floors, block work Lic. #2694 CALL CODY ALLEN for complete lawn,tree & hauling services (352) 613-4924 Uc/Ins D's Landscape & Expert Tree Svce Personalized design. Cleanups & Bobcat work. Fill/rock & GLENN BEST LAWN/GARDEN *TRIM HEDGES- PALMS *MULCH- WEED- LEAVES 795-3993 Reasonable- Reliable A DEAD LAWN? BROWN SPOTS? We specialize In replugging your yard. Uc Bill's Landscaping & Complete Lawn Service Mulch, Plants, Shrubs, Sod, Flower Beds. Trees Free est. (352) 628-4258 CALL CODY ALLEN for complete lawn,tree & hauling services (352) 613-4924 LIc/Ins DOUBLE J STUMP GRINDING, Mowing, Hauling,Cleanup, Mulch, Dirt. 302-8852 GRASS CUTTING & PRESSURE WASHING Honest & Dependablel (352) 628-9622 HALLOCK/SON LAWN CARE Meticulous work, 80x120 lot, $20 com- plete, LIc/Ins. Serving Inverness Area 352-860-0138 QTRUS COUNTY (FL) CHRONICLE Jimmy Lawn Service Reliable, Dependable Lawn Main. at Reasonable Rate. Call (352) 249-8186 Lawncare-N-More Spring clean-up, leaves, hauling/ Pressure clean. Tree Work. 726-9570 LEAVES CLEANED UP John Hall Lawn Malnt. Free est, Lic. & Ins. (352) 344-2429 MIKE CORNWELL Lawn, Gardening, Handyman Service Lic #99990001987. Ins. (352) 621-3292 ONE FREE MONTH Quality Property Services, Lawn Care & Landscape. Free Est. (352) 621-4QPS EML POOLS Pool cleaning & repair, 32yrs In Citrus County Llsc & ins.(352) 637-1904 SWIMMING POOL LEAK DETECTION Over 40 vrs experience 352-302-9963/245-3919 Seasoned Oak Fire Wood, Split, $50, 4x8. Will Deliver. (352) 344-2696 CRYSTAL PUMP REPAIR (352) 563-1911 Subs, jet pumps, filters FREE ESTIMATES WATER PUMP SERVICE & Repairs on all makes & models. Lic. Anytime, 344-2556, Richard ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 Be a frequent shipper and we'll ship your 11th package FREE# We ship via UPS IAYLoRRENTAL. Open 7 Days 352-795-5600 * 5 Ibs & under, ground Critter Care Pet Sitters, 15yrs in Citrus County. Bounded, Usc & Ins. (352) 344-2778 RAINDANCER Seamless Gutters, Soffit Fascia, Siding, Free Est. Uc. & Ins. 352-860-0714 REAL ESTATE CLASSES Now Enrolling 5/3/05 Sales Lic. Class $249. RON NEITZ-BS,MBA BROKER/INSTRUCTOR CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. SALES/SAS SHOES Available Immediate- ly. Full-time position for new retail shoe store located In Crystal River. Experience preferred. Salary negotiable. Scheduled days will vary. Open Inter- views, please bring resume, April 6, 7, & 8 from 10 am-1:30 pm 244 SE Hwy, 19 Kings Bay Plaza Crystal River (352) 795-4057 CLASSIFIED Advertise Here for less than you think!!! Call Today! 563-5966 "' Copyrighted Material 4 Syndicated Content Available from Commercial News Providers loft1 q _______ WANTED EXPERIENCED RV TECHNICIAN Good Pay, Good Hours, Good Benefits. COMO AUTO SALES & SERVICE 1601 W. Main St., Hwy. 44 W. Inverness, FL R'77 See Jerry SALES HELP Floor covering, Full Time, 302-6123 or 564-2772 WANTED STRONG CLOSER Who want $500-$1500 per wk. and are helping people live a better life, This is a dynamic money making opportunity. Call for info. (352) 746-4414 $$$$$$$$$$$$$$$ LCT WANTS YOU!! Immediate processing for OTR drivers, solos or teams, CDLA/Haz. required Great benefits 99-04 equipment Call Now 800-362-0159 24 hours ALUMINUM INSTALLER Looking for experienced but willing to train motivated person. Construction experience helpful Driver's License A Must! CMD INDUSTRIES 352-795-0089 CABINET SHOP All phases & Installers. 352-795-5313 CARPENTERS & LABORERS Residential builder now hiring, Office In Dunnellon (352) 489-5735 CDL DRIVER Accepting applications for experienced Class A or B. Driver to operate dumps, Full Time employment w/ full benefit package. PAVE- RITE 3411 W. Crigger Ct., Lecanto. 352-621-1600 DFWP/EOE CDL DRIVER With minimum Class B. Top pay, benefits. Overtime. Apply In person FDS Disposal 423 W. Gulf to Lake Hwy, Lecanto DFWP " *CLASS A & B DRIVERS NEEDED ROOF LOADING EXPERIENCE, PHYSICAL LABOR INCLUDED *HELPERS NEEDED ALSO Excellent Pay And Benefits. Bradco Supply 1-800-829-7663 DFWP Commercial CARPET HELPER Experienced. Willing to travel, Must be flexible. (352) 400-1327 Concrete Finisher To form and pour Pool Decks. Experience only. Call 382-4547 or 302-2240 Sweetwater Homes DRIVER (CDL) LOCAL Forklift exp. Must know area, Established co. (352) 726-7828 or (352) 302-0947 DRIVERS Class A, B or D, Dicks Moving (352) 621-1220 Dump Truck Driver/Equipment Operator Class A CDL required. Front End loader exp. or Boxblade. (352) 400-1442 ELECTRICIAN With residential rough and trim experience, oT service calls neces- sary. Must have trans- portation and tools required. Call btw. 7 3pm Mon. thru FrI. (352) 341-2004 ELECTRICIANS Employment opportunities. Apply online electric.com A/C HELPER Needed. 352-344-9509 EXP. ASSEMBLY WORKERS applicationse openings available Immediately, Great Benefits & 401K. RAINBOW CRANE 1181 W. Gulf to Lake Hwy., Lecanto EXP. DUMP TRUCK LOADER OPERATOR Boxblade, house pads, etc, Class A CDL No smoking (352) 860-2270 EXP. FL FRAMERS NEEDED (352) 637-3496 EXP. FRAMERS & CARPENTERS Fast paced 40+ hours per week. Must have drivers license. (352) 303-6621 EXP. PAINTERS Needed for local work. (352) 341-3553 EXP'D FRAME CARPENTERS for full-time position (352) 634-0432 EXPERIENCED DUMP TRUCK & TRACTOR TRAILER DRIVERS Class A or B License (352) 795-7170 EXPERIENCED POOL CAGE INSTALLERS TOP PAY. Must have valid drivers license. Call for Information 563-2977 EXPERIENCED ROOFERS Tools & transportation a must. Dependable. 733 N Suncoast Blvd. Crystal River. (352) 628-3516 FINISH GRADER OPERATORS DOZER OPERATORS PAVING CREW HELP For Lake County based Company. DFWP (352) 365-0006 (352) 315-0500 Fax FLOWER SHOP Retired owner or man- ager needed. Must have min. 10 yrs. exp. to apply. Need someone to manage shop for opprox. 3 mo. 20/40 hrs. Sa week.Length of time is negotiable. Gredt pay. Call James 352-302-0198 FRAMERS Local-Steady 352-302-3362 HELP WANTED Experienced.,Neat & Tidy Lawn Service (352) 344-5134 MASONS & LABORERS NEEDED Good pay. Must have transportation 352-860-2793 EXP. STUCCO Plasterers & Laborers Cell, 400-0501 MECHANIC Needed for small engine and golf course equipment. Exp. preferred. Wages dependent on DOE. See Mr. Ellis, 7 Rivers Country Club, 7395 W. Pinebrook St., CR METAL BLDG. ERECTORS Start Now (352) 528-9211 OFFICE HELP P/T, 3 nights a week and 1 weekend day. P/T, 4 nights a week and 1 weekend day Dispatching, Answering phones, some Data entry & computer exp. req. 352-489-3100 OTR TRUCK DRIVERS Buy or lease programs. No credit okay. Owner financing. Zero down. Good driving record. Good loads, good pay. (352) 795-1364 or (352) 586-6945 PLASTERERS & LABORERS 352-344-1748 PLUMBERS HELPER Experienced & Inexperienced. (352) 746-5807 Plywood Sheeters & Laborers Needed In Dunnellon area. Please call: (352) 266-6940 *RESIDENTIAL A/C LEAD INSTALLERS *EXP SERVICE TECHS/MAINT. Call (352) 860-2522 ROOFERS Experienced. Must have own tools & transport. Drug free work place. Call (352) 637-3677 ROOFERS WANTED Own equip. & trans needed. 746-1859 SEAL COATING, ASPHALT PAVER -" & STRIPPING PARKING LOTS ' DUMP TRUCK DRIVERS Must have exp. (352) 563-2122 STUCCO PLASTERERS & LABORERS Own transportation -, (352) 302-9047 : STUCCO LABORERS-' & PLASTERERS (352) 302-5798 SURVEY PARTY CHIEF & INSTRUMENT PERSON NEEDED Experienced In TDS, ' GPS, Clean driving , record. Excellent , pay & benefits. Fax resume to (352) 753-9441 or E-mail: bcombs9 famerbarev.com -- -^ :4 :4441- ~'~j SE-$25,595 MSRP" "-r I ]W 1 I lU. /-- nLw 6-Passenger Seating 6-Way Power Driver's Seat 17" Painted Aluminum Wheels AM/FM Stereo/Single-CD Player Command SeatingTM/Theatre-Style Seating Keyless Entry Keypad KEY OPTIONAL PACKAGES & CONTENT 2nd-Row Console $95 7-Passenger Seating N/C Auxiliary A/C $595t AWD $1,700 Convenience Group $295 Safety and Security Package $795 SEL-*26,995 MSRP" AM/FM Stereo/CDX6 Automatic Headlamps Fog Lamps Leather-Wrapped Shift Knob and Steering Wheel Message Center Steering-Wheel-Mounted Audio Controls Unique 17" Bright Aluminum Wheels KEY OPTIONAL PACKAGES & CONTENT 2nd-Row Console $95 3rd-Row 50/50 Split Seat $115 7-Passenger Seating N/C Auxiliary AC $595tt AWD $1,700 DVD Entertainment Center $995 Front-Row Comfort Package $495 Leather-Trimmed Seats $795 Power Moonroof $895 Reverse Sensing System $250 Safety Package $695 LIMITED-$29,195 MSRP" 2nd-Row Console 3rd-Row 50/50 Split Seat 8-Way Power Driver's Seat 18" Bright Aluminum Wheels Audiophile Sound System with Subwoofer Dual-Zone Electronic Automatic Temperature Control Leather-Trimmed Heated Seats Woodgrain-Appearance Appliqu6 on Instrument Panel KEY OPTIONAL PACKAGES & CONTENT 7-Passenger Seating N/C Adjustable Pedals with Memory $175 Auxiliary AC $595 AWD $1,700 DVD Entertainment Center $995 Power Moonroof $895 Reverse Sensing System $250 Safety Package $695 Chrsler P'acflca Tourin AWU Loaded, white w/gray leather, #G5T169A $1 3.995 '04 FORD TAURUS SES Full Power., #GPR917 $1 3,995 '00 CROWN VICTORIA Full Power, #G5TO64B $9,995 '99 MERCURY SABLE LS Full Power #GPOS30B $8,995 '00 PONTIAC N ,, '04 FORD FREESTAR SES Full Power, 1 owner. #GPR927 1 8,995 M -- - J '00 LINCOLN LS Loaded, Leather, V8, Moon Roof, #G5T238A $1 5,995 70--T--1 'UU F-ZOU ALT SuperCAB 4x4 Diesel One Owner #G6T271A $0 A Q4 A '05 FOCUS Zx4 Auto, A/C, 13,000 miles. #GP0863 $11,995 '98 JEEP CHEROKEE LAREDO #GST057A $6.995 '02 FORD WINDSTAR SEL Leathe Loaded, Loaded, Loaded, 1 owner, #G5T261A l 5,995 y. |~ '04 FOCUS SE Full Power. #GP0861 $1 2.995 '03 FOCUS ZTW Fl Power, 11,000 miles, #GPO86( 1 4,995 ArFw Aj '01 F.150 XLT SUPER CREW '03 F.150 Super Crew Lariat Full Power. #G4CO33A Loaded, Loaded, Loaded 1-owner. #G5T235A $l 6.995 $27.995 GRAND AM SE '04 FORD SPORTRAC 6 Cyl., Full power, 27,000 Miles.#G4T370E 16,000 MI, Loaded. #GPR924 1 -3.995s 23.995 *uu F Super $13 WW lE I- ab, #G5T020A 1,995 U4 ANUEcII ALI Super Cab 4x4 8,000 mIles #GPR923B 19.995 '02 F.150 XLT Reg, Cab, VS, Full Power, 1 owner. #05T134A *1 7,995. '99 FORD WINDSTAR SEL '05 MERCURY SABLE GS Full Power. #GP0872 1 3.995 w- rvn1 I, Mn A A iRM Full power, Quad Capt, Chair #GST174B $8.995 MERCURY VILLAGER TATE 1 owner, loaded. #GST256A p8,995 '01 DODGE INTREPID SE 49,000 MIles, Full Power, #G5C081 93,995 '04 CROWN VICTORIA LX Loaded, Leather. #GPR916 *1 6,995 '02 EXPLORER XLT Full Power, 1 Owner, Leather, 3rd Seat,#G6C055A '1 7.995 '01 FORD WIND 1 Owner, Loadedl Loade $13. STAR LIMITED dl Loadedl #G4T363A 995 '0 S cAPEXLT '05 JAYCO EAGLE '03 BUICK RENDEZVOUS CX All whee dre,15,000I, leather,fulpower.#GPR922 TravelTrailer, 28' with 15 Slldeout #G5TO87M 1 Owner, Full Power, 31,000 ml.#G5C078A $21,995 $23,995 $15.995 '02 F150 XL Reg, aWorkruck 5T132A 0,69"5 '93 EXPLORER XLT #- G4T135B - - $4.995 q4 EOURIU -15OU CARGO VAN V8A A/C - *i 11,95 .I2~ ~. V [IMtOa C fOC i 'L2C SATURDAY, APRIL 2, 2005 CITRUS COUNTY (FL) CHRONICLE '1 liliz |BBBBEh SBBB-WeelD Bi e 32 iy2 ihay................ AL lb stifled CITRus COUNTY (FL) CHROMCLI Featuring GREAT BUYS on HUNDREDS of New Cars, Trucks, Minivans & SUVs! tioning, ,|.7a layer. 1635W. J cage, A m for 8. 845EW. * Plus tax, tag, $199 Administrative Fee. All options at retail price. + 36 month closed-end lease, 12K miles per year. $3,000 due at signing plus tax & tag, in stock units only, options at retail price. Residual values: Qvic 54%, Accord 54%, Pilot 63%, Odyssey 62%. All lease offers WAC 2005 NISSAN ALTIMA 2.5S 2~h 2UU0 raii" NEW N15AN A.MIWvW..L, SENTRA 1A.8S 305HpVg atg rir,layer 'wli relsHead Automatic, A/C, P/W, P/I Cruise, Power ipdows/LockSt/aerl & Seat CruMise Control, 91001b ToWing Pachage AM/FM Co, Keyless Entry. Dealer List: $91,815 SAVINGS: $8,820 2005 WN9Z21* 2005 NibbA TITAN XE KING CAB QUEST 3.5 V8, Auto, AC, AM/FM-CO, 240 HP 3.5 Liter OORC 24 Valve V6 Engine, PW, PL, Tilt, AM/FM CO, AC DualrRearFold-flat Doors,, i Front & Rear Controls, Inlormation Centerwl Trip Computer, LOE ERI IEDPROWE 0I ONTSFT INPCION-1 OT/1200ML IMTDWRAT '94 CHEVY CAVAUER WAGON ONLY 6K MI, CLFANIII.. $3,495 '92 HONDA ACCORD EX..............$.... 4,995 03 KIA RIOD................................ ,995 '01 KIA SPORTAGE 4DR ..................... 6,995 '00 NISSAN MAXIMA SE....................8,995 '02 MITSUBISHI GALANT ...... ............ 9,995. '01 HONDA CIVIC EX.................. $9.... 995 '03 CHEVY VENTURE MINIVAN............. ,95 0 DODGE RAM 200 VAN ....................10,988 '00 HONDA ACCORD SE.................10,995 '9 ACURA INTEGRA LW MEs..............1.. 1,995 o9 UNCOLN TOWN CAR SINATURE SERIES ... $11,995 12 FORD EXPLORER XLT..................... 13,995 '01 HONDA CR-VLX....................... 3,995 '02 HONDA ACCORD LX .................... 14,885 '03 HONDA CMC EX COUPE................ 14,995 '02 TOYOTA TUNDRA.................... 14,999 '02 NISSAN FRONTIER XE CREW CAB ....... 15,995 'O TODYTAAVALON XLS................ 21,995 '03 DODGE RAM 1500 SLT QUAD CAB........ 22,995 "You'll LOVE Doing Business with Us!" W on HIGHWAY 19 between Homosassa and Crystal River + 24 month lease, 12K Mi/Yr, plus tax, tag, fees. $2995 due at signing. All listed vehides are priced after factory dealer and college and rebates (if applicable). Dealer retains all rebates and incentives. All options and accessories at retail price. ** Based on 12K Mi/Yr, $2500 due at lease signing indudses 1st payment, se deposit & state fees, payment plus tax. 36 mo. dosed end lease. Offers may not be combined with any other offers or advertised specials. All offers plus tax, tag, and aodminiration fees. 019 22AVILABE, TTHBISPIE, SATUiDAY, APIl. 2, 2005 13C 005! H! MMITJj'*' *;~~~~~~~~~1 =1^^^H^^^^Bi?^^3^fi i Cn'iius COUNTY (FL) CHRONICLE [L4C SATRDAY, APIUii. 2, 2005 RuOd Plhhp 'IC -U--- SI I1 i 1 : a i;ili L'- noi lc, niT1 H lHA 2003 ONC0M 2OHD DURAMAX CREW CAR 30,500 miles, leather, 6 disc, pw. p bug shield, vent visors. spray in Dedliner. cnrome wheels. 829,900' 2001 TOYOTA 4 RUNNER 24,500 miles, CD, pw, pi, bug snield, vent visors. '17,9000 aum un. ENVOY XIV Only 1 700 miles 6 disc CD, woodgrain. learner sunroof driver info. chrome wheels. rinied ainrdows. *28,500' 19.400 miles CD. Onstar. leather power driver iseat, pw. pl, dual climate cor13,900 '13,900" -.---- 4 .9. ,._nrjni -r. ep Slgea oual e.,.aumS. iiainlessi brus r, uard hr r ir n e .,r eei lr hrard t':,'rir-u C r C0D *17,900" urly 27 oUU inTile , leather w,3g, rainr. 6 disc C. crrorrie wr el s. *37,400' , ~1A~ 200M BUICK PARK AVE Only 12,000 miles, Onstar w/ISD pkg, driver info center, elec climate cntrl, CD & cass alum wheels. B.F.F.W. $19,900* 2002 CMC ENVOY SIu Onstar, sunroof, custom wheels, CD & cass, leather, running boards, factory tow, super clean. '18,450* o~ -Zy 2004 BUICK RENDEZVOUS CX Only 9,000 miles, 6 cyl, pwr seat, pw I tilt cruise AFMI/CD. 8.F.F.W. - '- . 2004 BCK RANIER Only 7k, 6 cyl, leather, CD, cass, XM Radio, 6 Disc CD. Balance of full factory warranty. '25.900* 2004 CHEVROLET TAHOEU I Only 20k, 5.3 liter V8, full leather 3rd seat, dual air, AM/FM/CD, alum wheels running board. B.F.F.W. 826,900* 2004 CHEVROLET 1500 LT XCAl 4k, 5.3 liter V8, dual pwr seats, Ithr, CD+cass, buckets, alum whis, tow pkg, B.F.F.W. $23,900" 2004 BUICK 2005 CHRYSLER CENTURY LIMITED TOWN 6 COUNTRY Only 9k, 3.1 liter V6, TOURING EDD leather, pwr seat, fact 6 cyl, stow & go chrome wheels, seating, dual air, 3rd AM/FM -CD, keyless. seat, alum wheels. B.F.F.W. B.F.F.W. 817,900* *19,900* 2005 CHEVROLET MONTE CARLO LS V6, only 2,000 miles,' fully loaded, CD, aluminum wheels, local trade. B.F.F.W. Save thousands. 14,900. ^*r^ ^ 2005 BUICK TERAZZA CX Only 3k leather pwr doors, CD TV, DVD, chrome wheels, one owner, GM employee trade in. B.F:F.W. *27,900* V6, automatic aluminum wheels, AM/FM/CD, twotone paint. '14,900* MEDAN D LEL Only 40k, custom grill, heated & memory sets, leather full top, chrome wheels, don't miss this one! 817,250* Only 14k, 5.3 liler V8, leather, heated & memory seats, 3rd seat, dual air factory tow pkg, B.F.F.W. 829,900* 2002 CHEVY TRAILBLAZER LTZ Only 12,000 miles, leather interior, two tone paint. $*0,999* 2004 BUICK LESABRE CELEBRATION EDO Only 10k miles, white gold paint, citrone wheels, two tone leather, driver information center, fully loaded w/chrome pkg. 824,900* RENDEZVOUS CIXL ,-.,i) -'o l ,., cyl, leairt er, 3rd seat, chrome whls, two tone, on star, loaded. B.F.FW. *19,500* iML. *'Isamimrv - .^ w 111^ ^ f__^ ^ 0M B5ICK 004 BUICK RANIERI LESABREC ITM 010 Only 20,000 miles, Only 12,000 miles, V8, leather, sunroof, leather, factory electric air, chrome pkg, navigation, aluminum one owner, wheels, CD & Cass., Save cream puff. thousands from new. *16,900* '26,500* 2001 CHEVY 1I00 LS EXTCAB 5.3 V8, keyless - entry, aluminum wheels, CD player, fully loaded, painted topper to match. 815,995* -- I i 2004 JEEP GRAND CHEROKEE LAREDO Only 9,000 miles,6 cyl, pw pl, tilt, cruise, AM/FM/CD, one owner, local trade. B.F.F.W. 819,950* 200PWLAC Special Edition, loaded, with all the options. '16,980* 2002 PONTIAC AZTEK Red, V6, 2WD, like new. 810,950* IAlm 2002 BUICK . CENTURY CUSTOM Only 20k, V6, power seat, power windows & locks, keyless entry, B.F.F.W., local trade. 89,950* 2001 BUICK PARK AVENUE Only 30,000 miles, leather int., full carriage roof, heated seats, driver info center, A MUST SEE '14,450* 19T CMC 1500 XCAB ZY71 CONVERSION 5.7 liter V8, leather, running boards, loaded. 812,400* 200 JEREP WRANGLER SPORT 50,000 miles, 6 cyl, stick, A/C, new tires, sound bar. 811,900* LESARRE CELEBRATION Only 12k, white diamond pearl paint, two tone leather, chrome wheels, 1 custom roof, chrome pkg, one owner. '18.900* 1998 UNTIAIC FIREBIRD Red .auo.maic, T-tops, power seat, loaded, "Classy & Sassey". '8,950* 2004 CADILLAC SRX Top of the Line, sun roof, 3rd seat, every option. New $53,000 '36,880* 200 BUICK LESABRE CUSTOM Only 3k, ISEpkg, driver info center, dual power seats, CD+cass, alum wheels, B.F.F.W. 819,900* 2003 MNC SIERRA 2800 HD XCAB 4X4 Duramax diesel, Allison trans, bucket seats, dual pwr seats, chrome wheels, fog lamps. B.F.W.6950 926,950* 20032 IC ENVOY SWI Only 29,000 miles, 4.0 liter 6 cyl., chrome wheels, leather running boards, balance of full factory warranty. *19,900* unly 3,uuu miles, Pwr seat, windows & locks, AM/FM CD, keyless entry, B.FF.W. *15,900" 199 GNCM YUKON SLT 2004 CMC DENALI XL 4X4 Only 9k, 6.0, 3rd 5.7 liter V8, leather, power seat, dual air two tone leather, chrome seat, aluminum wheels, wheels molded AM/FM, CD, running boards, boards, fog lamps. factory tow package. Balance of full fact 87,950* warr. 38,500* I1Is[ Hoqosassa - Sprngs Srnnio Hilt OVER 28 CARS SOLOI il Liii Ranvs Rows r Tim Fox Joe LaFr R3nv- Lee Rana, Lee I -I Kaihjnsky | Mark Milell Rnn Whike.r 'ilIlbili L'& IUl Paircia Mahon Irnverrness Brook'svile wom- -- - F, ;.'.'.* M. -^ f. -H- ;-- ,, . H :TI III7 2005 CMC ENVOY u00 FORDe A SLE EXPEDITION XNW Onstar, 6 cyl, dual Only 40k, V8, 3rd pwr seats, seat, leather, sport AM/FM/CD, 3rd seat, pack, alum wheels, dual air, alum wheels, running boards, fact tow pkg. B.F.F.W. tow pkg, local trade. '25,900* 15,900* r- qIIIIII 'ALIJ MfTR L N I 1 'Fs IjI SATURDAY,APRIL 2, 2005 15C EhSills- STUCCO PLASTERERS, LABORERS & APPRENTICES To stort work immediately! (352)748-1078 TIRED OF WEEKENDS? Tired of commission? Wanted: Cert.Auto Tech 'Great payl Driver's Lic. 4352)447-3174/563-5256 WANTED CORIAN, ZODIAQ, GRANITE COUNTERTOP FABRICATORS Experience preferred, not mandatory. Must be 18 yrs. or older, have transportation, able to handle heavy lifting, Sand BE RELIABLE. 40 hrs.+ per wk., benefits avail., offer 90 days. Apply In person DCI Countertops, Shamrock Ind Park 6843 N. Citrus Ave. (Rt 495) Crystal River, FL NO PHONE CALLS PLEASED WANTED! EXPERIENCED TECHS, PARTS MANAGER & COUNTER PEOPLE Call (352) 564-8668 WAREHOUSE ASSISTANT Must have extensive experience with plumbing and irrigation supplIes. Computer and warehouse organization experience a must. Must be friendly and energetic. Includes a health Insurance package. Apply at Golden X Plumbing, 8 N. Florida Avenue, Inverness. Ask for ra a *PLASTERERS* *LABORERS* * NEEDED* I S Steady Work I 746-5951 LI L.I, vi-IJ ATTENTION REAL ESTATE LICENSEES Come join our Team. New Office Keller Williams Realty (352) 637-2777 BOAT WASHER Full Time Position. Job Entails Washing & Cleaning Boats w/Other Duties, Apply In Person: Riverhaven Marina 5296 S Rivervlew Clr Homosassa, FL 34446 CAREGIVER NEEDED days, Mon.-Frl. for older gentleman, must be able to drive. (352) 564-1741, after 3pm CLEANING PERSON 15-20 hours weekly. Apply at SIMS FURNITURE 205 E. Gulf to Lake Hwy Lecanto DFWP CONSTRUCTION Elevator Const Helper Must be physically able, dependable. Full time, employer will train, Call June Johnson @ 800-441-4449 to apply. COOK -..... ... :.. -- ,.. . Full time. Good organizational Skills a must. Apply at: Barrington Place 2341 W. Norvell Bryant Lecanto, Fl Ask for Pat *COOKS Full or Part Time Call for Appt (352) 628-5980 VILLAGE DETAILER/ PORTER Full Time. Must have clean driving record. Drug Free work place. Good benefits. Apply at: Hwy. 19; Homosassa Ask for Renee Zamora DISPATCH & RECEIVER Person to perform minor maintenance, assist In loading and unloading, and the cleaning of various rental equipment. Full- and part-time positions available. (352) 795-5600 IAYLORRETAL DRIVERS NEEDED Top Pay & Benefits. Local deliveries. 401 K, Insurance, m.n. Class B CDL required. Ready Mix experience a plus. EOE, Drug Free Call (352) 746-0136 for Appt.. EXP. TREE HELP Bucket truck, chain saw, Tree climbing exp. No smoking. Class A or B CDL (352) 860-2270 F/T FURNITURE DELIVERY PERSON Benefit package. Ex- perience a plus. Ap- ply in Person 97 W. Gulf to Lake Hwy.Lecanto FAITH BASED SHELTER S1 Women's night Administrator 1-Men's night Administrator or a qualified employee? This area's #1 employment source! C l s T A f d 0 s CHlasifLE Classifieds 0 0M^^ General c.n Ob Help Good driving record. Class B w/tanker endorsement. Must be willing to work nights. Construction site. Delivery exp, helpful. Apply In person; Job Site Services, Inc./Sanl-Pot Portable Toilets, 425 S. Croft Ave., Inverness. No phone calls please SERVICE REP Due to expansion, National Home Respiratory Co. Is seeking a service rep for our Inverness location. Must have CDL w/Hazmat endorsement. This position requires good organizational and good people skills. Please fax resume to: 352-726-7174 FIBERGLASS DUCT SHOP Prod.wrkrs $7,50hr.Apply 2541 W Dunnellon Rd FLOWER SHOP Retired owner or man- ager needed. Must have mln. 10 yrs. exp, to apply, Need someone to manage shop for approx. 3 mo. 20/40 hrs, a week, Length of time Is negotiable. Great pay. Call James 352-302-0198 GOLF COURSE MAINTENANCE Personnel needed, Must be clean & neat. Pay depending on experience, Citrus Springs Golf & Country Club Call Ross after 9a.m. 352-489-2066 GOLF COURSE MAINTENANCE Start at $6.50 per hour. Will train. Duties include all aspects of Golf Course Maintenance. World Woods Golf Club (352) 754-0322 HIRING EXP. CASHIERS, SERVERS & DISHWASHERS Port Dive Center/ Ale House (352) 795-3111 IN SEARCH OF NEWSPAPER CARRIERS CRYSTAL RIVER DUNNELLON BEVERLY HILLS INGLIS/ YANKEETOWN Citrus County's fastest growing newspaper is looking for you! Fill out a carrier information form at the Chronicle office in Crystal River or Inverness Or call 563-3282 -JOBS GALORE!!! EMPLOYMENT.NET MAINTENANCE/ HANDYMAN FT/PT. Hotel experience preferred great benefits. Apply in person: Best Western 614 NW Hwy 19 Crystal River MARINA PERSON For Inside Counter sales and outside on Docks. Boating Experience helpful. Apply at Homosassa Riverside Resort Marina, 5297 S. Cherokee Way Homosassa Modular Office Building Installers Be willing to travel. Call anytime, including weekends, (352) 563-0921 OFFICE Full-time or Part-time. Typing and basic computer skills required. Flexible schedule. (352) 380-3202 PART-TIME CLERK Convenience food store, Floral City. 2-4 nights, 4pm-10pm, David, 888-243-6050 POOL SERVICE TECHNICIAN Exp. requested but not necessary. Will train, senior citizens welcome. Apply in person. Mon-Fri 8am-3pm1233 E, Norvell Bryant Hwy. PRODUCTION WORKERS Some heavy lifting involved. No experience needed. Pick up Application at Gulf Coast Metal Products in Rooks Industrial Park, Homosassa, between 8am-11am Mon. thru Fri. PURCHASING TECH Computer skills neces- Ssary, A/R a plus, pays special attention to detail & positive attitude. Call Pro Line Tile (352) 563-2477 REAL ESTATE CLASSES Now Enrolling 5/3/05 Sales Lic. Class $249. RON NEITZ-BS,MBA BROKER/INSTRUCTOR CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. ROOFERS/ SHINGLERS Exp Only. Paid Vacations, Benefits. 352-347-8530. ROUTE DRIVER CITRUS COUNT'Y (F.) CHRONICLE TAXI DRIVERS Wanted, fill-in drivers. Non smoking, non drinking. Must have clean police record. Call Joe 628-7191 TOWER HAND Bldg Communication Towers. Travel, Good Pay & Benefits, 01, DFWP. Valid Driver's License. Steady Work. Will Train 352-694-1416 Mon-Fri WE BUY HOUSES Ca$h........Fast I 352-637-2973 1homesold.com WE BUY HOUSES Ca$h ........ Fast I 352-637-2973 I homesold.com WE BUY HOUSES CaSh...... Fast I 352-637-2973 I homesold.com BAKERY HELP EARLY MORNINGS Apply Monday Friday before 10am at 211 N. Pine Ave., Inv., P/T HOUSEKEEPERS For Cleaning Company. DFWP EOE 352-860-0596 SNACK COUNTER CLERK/COOK Need perky person for nights & weekends Manatee Lanes DFWP ADVERTISING NOTICE: This newspaper does not knowlingly accept ads that are not bonafide employment offerings. Please use caution when responding to employment ads. REAL ESTATE CLASSES Now Enrolling 5/3/05 Sales Lic. Class $249. RON NEITZ BROKER/INSTRUCTOR CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. 200' on US 19 across from airport. 352-212-3041 LAUNDRYMAT FOR SALE Great Cash Incomel Crystal River (352)613-7670 "LIVE AUCTIONS" For Upcoming Auctions 1-800-542-3877 1975 THOMASVILLE CREDENZA BAR $1200. Also 1975 dining rm set, 6 chairs & hutch $650. (352) 465-0721 Antique & Collect AUCTION 4000 S. Fla. Ave. Hwy. 41-S Inverness PREVIEW: 10 AM AUCTION: 1 PM Incredible antique urn,, lighting, tea pot collection,C Jewelry, clocks, +++ Also: 1947 Hearse & 1960 Chevy C-10 Pickup, 1/2 ton Visit the web www. dudleysauctlon.com (352) 637-9588 AB1667 AU2246 12% Buyers Premium. 2% disc. cash/check ANTIQUE WILLET CHERRY single bed, $200 (352) 341-3319 DUNCAN PHYFE style table, 6 chairs, & buffet. Very good condition. $400. (352) 637-2838 Leaded Glass from 100 year old home, door Insert, some damage, perfect for hobbyist $75/obo (352) 249-9108 Pachinko Game Japanese Gambling Machine, Very Gd. cond. $100/obo Pine Ridge (352) 249-9108 WILL PAY CASH FOR antiques, pottery, old furniture, estates, (352) 465-1544, Joe 2000 Model 3 person 53x83 w/hard cover. 110V, like new, $1,800 (352) 257-0671 HOT SPRINGS HOT TUB Sovereign Model Was $8,000 new, works great, $1250/obo Pine Ridge (352) 249-9108 SPA- DreamMaker Starting at $1,195. w/ Colorchanging waterfall $1,995. (352) 597-3140 SPA, 5 PERSON, Never used. Warranty. Retail $4300. Sacrifice ^ 1 A rMA-M qA' 171 IFIEDS PACK RATS IS OPEN Tues-Sat 10a-4p MAINLY ANTIQUES last day March 19 Big Sale now! 2 TON FOLDABLE SHOP CRANE, red In color, very heavy, $175 (352) 637-7248 CRAFTSMAN 10" table saw on wheels, 40x27" table. $150. (352) 628-9831 MILLER XMT 300 CC WELDER, like new, $350 or best offer (352) 637-5389 21" RCA Console TV Works great; cabinet in good condition $75 Call 746-0646 50" HITACHI ULTRAVISION Oak Cabinet, 6 years old. Good condition, $300/obo (352) 341-4499 JVC 32" Stereo TV w/ remote, has PI.P, Paid $550 new, sell for $350/ obo. (352) 228-3180 PIONEER VSX 455 Prologic, Doble Surround sound receiver, 2 floor & shelf speakers, plus cabinet, turntable, $150. (352) 746-6521 SAMSUNG mini camcorder SCD 103 w/ bag, still have box & all papers with it. $200/ firm. (352) 228-3180 SPEAKERS Cerwin-Vega DX9, 15". Altec, 12". $225 a pair. (352) 628-4110 TV, 32", General Electric Exc .Cond, $180. (352) 795-8904 (352) 257-1616 130 PASSAGE LOCKS 15 med cabinets, 2 pr 6' bi-fold doors,7 Insulated windows. Make offer on complete pkg.628-5725 7112" 1-PIECE BATHROOM SINK VANITY TOP $100. 711/2" bathroom mirror, $100. (352) 726-8567 RAIN GUTTERS over 200 FT with accessories, double pane window, 50x52, $125 takes all or best offer. (352) 860-0408 2 COMPLETE SYSTEMS 1 Hotwheels collector edition. Monitor, key- board, mouse, printer, $400 each or best offer, (352) 628-4414 Computer, Compar, 4mths old, DVD & CD Burner. L-shaped Desk; $550 for all (352) 628-3829 Custom Built Computer, 80 HD, 512 MB, 128 Video, CDRW/DVD, 17" Monitor, $350 (352) 637-5209 DELL PRINTER Copy/photo/scan/fax, $50 firm. will demo (352) 628-3485 DIESTLER COMPUTERS Internet service, New & Used systems, parts & upgrades. Visa/ MCard 637-5469 Monitor, Keyboard, mouse, pad & wrist support, good cond. (352) 382-5565 FORKLIFT Hyster, 40001b lift, exc, cond, LP aas. * - " w Copyrighted Material 44"MO -sli * - 2 Dk, Green La-Z-Boy rocker recllners. Avg, condition. $75 each. (352) 341-4313 2 TWIN MATTRESSES, boxsprlngs & frames, custom spreads, like new, $150 SOFA LOVE SEAT, med, blue, good cond. $150 637-2889 3 PC. Set, Couch, Loveseat & Chair, hunt- er green, burgundy and mauve floral design. $300, Like new. Trundle Bed, $250 352-637-5352 4 PC. WALL UNIT Display & entertain- ment. 77"Hx88"W, with lights, $595. (352) 860-0444 5 PC 9' MEDIUM oak entertainment center, glass front, lighted, lots of shelves, $1250. White/burgundy couch $125. (352) 746-2084 4-PC. WICKER w/cushions, love seat, 2 chairs, coffee table, $150. Maple rocking chair with pads, $35. (352) 341-3319 5-PIECE BEDROOM SET, $800 OBO Contact Christina (352) 628-9853 5-Piece Dinette Set, 4 upholstered swivel chairs, neutral color, ta- ble 36"x48" + leaf, $150 (352) 344-2246 5-PIECE SECTIONAL, neutral color, $600; King Size Water Bed $200. 727-432-9226 5-PC. BEDROOM SET, kingsize, pillowtop mattress, 2 night stands, man's dresser, woman's dresser w/mirror, white wash color, $850 (352) 746-5195 "MR CITRUS COUNTY' * oeb * -- Advertise Here for less than you think!!! Call Today! 563-5966 .3-TON A/C, & HEAT PUMP 10KW, elec. heat, Ice cold air, $500 (352) 422-6880 OR 613-5213 3-TON CENTRAL HEAT & AIR CONDITIONER, Suitable for Mobile Home. $350 (352) 564-0578 APPLIANCE CENTER Used Refrigerators, Stoves, Washers, Dryers. NEW AND USED PARTS Visa, M/C.,, A/E. Checks 6546 Hwy.44W, Crystal River. 352-795-8882 FREEZER SEARS 22.1 cu.ft, chest type, manual defrost, $100 FOOD PROCESSOR Mighty Chef II, Gourmet, used once, $50 (352) 637-4985 FRIGIDAIRE Refrigerator Side by Side 24 cu.ft. Black. Looks and runs great! Digital pictures available. $125 obo. (352) 613-5033 FRONT LOAD WASHER & DRYER Gas access or propane tank, Black. Works excellent, $1000 (352) 795-6659 GOOD WORKING REFRIGERATOR $125 or best offer (352) 489-3946 HOLIDAY REFRIG/FREEZER, (white) Like new, $100 Firm or trade for good dryer (352) 341-4449 Magic Chef Heavy Duty Washer Kenmore Heavy Duty Dryer, $100 each. Both white 352-344-5827 MAGIC CHEF White digital Self cleaning range, works exc, $200. (352) 860-0444 REFRIGERATOR, Frost Free, white, .3yrs old, $250. (352) 628-3829 Tappan Gas Stove, almond, DuoTherm Mobile Home Gas Furnace, $100 each. (352) 344-5827 UPRIGHT FREEZER White. Good condition $135. (352) 746-2084 WASHER & DRYER Whirlpool, $300; New Sink Kohler, Off white w/faucet & soap dispenser, custom racks, orlg. $300. Sell $125, (352) 726-0928 WASHER & DRYER Excellent condition $200 for set (352) 344-9225 WASHING MACHINE & GAS DRYER Asking $75. (352) 795-3450 WHIRLPOOL DRYER Electric, Extra Large, heavy duty, $75. East Cove area, Inverness (352) 637-6835 Computer Desk, adjust- able monitor shelf, tower stand Cherry wood. $100. (352) 860-0444 STEREO EQUIPMENT, computer and office desk. For details (352) 795-9146 Antique & Collect. AUCTION *SUN. APRIL 3 4000 S. Fla. Ave. Hwy. 41-S, Inverness PREVIEW: 10 AM AUCTION: 1 PM Incredible antique turn., lighting, tea pot collection, jewelry, clocks, +++ Also: 1947 Hearse & 1960 Chew C-10 SVisit the web www. dudleysauCtlon.com DUDLEY'S AUCTION (352) 637-9588 AB1667 AU2246 I 12% Buyers Premium I 2% disc. cash/check J --- --- Jl SUGARMILL WOODS Like new Leader's Furniture Palm Springs Ball collection, Pecan glaze rattan. Two Ig 90" sofas + ottoman, $800. (352) 382-4786 TABLE, 60x36, almond color, gold trim, 4 chairs, $100.. Dark brown dresser, 6 drawers, 5'L. 3'H, $50. (352) 628-9242 THIS END UP FURNITURE PINE Sofa, Loveseat, End ta- ble, Coffee table $600 OBO (352)795-0999 WALNUT DESK, 19"x48", $50. LARGE DINING ROOM HUTCH, $300 (352) 726-9354 17.5 HP CRAFTSMAN TRACTOR 42' cut, 2 yrs old, exc. cond. 6 spd transaxle $600. (352) 748-5020 1974 FORD TRACTOR diesel eng., Turf tires, PTO 60" finish mower 3 PT hitch, 60" belly mower, $3,500 (352) 447-3329 42" CUT CRAFTSMAN, 15HP Kohler lawn tractor, $500 (352)341-3319 $750- Craftsman 42" riding mower, bagger, mulcher. Craftsman 20" reard discharge rotary lawn mower w/bagger (352) 628-5449 BLACK & DECKER Electric Lawn Edger $20. String Trimmer, $20. (352) 382-5081 COMMERCIAL MOWERS 2 Grasshoppers, 61" cut, $1,950 & $4,700 obo (352) 726-1489 (352) 212-3690 CRAFTSMAN LAWNMOWER 22" wide, 5Y2 HP, high wheeler, self propelled $65.00 746-6405 CRAFTSMAN LT 1000 with automatic trans- mission. Also has grass catcher. Used 10 times last year. Cost $1,450 Sell for $1000. Can deliver. (352) 621-3839 ECHO Edger, $150; ECHO Hedge Trimmer, $200. 27 Beverly Court SM Woods 382-5958 EDGER, $35 Side shaft Brliggs & Stratton; $100, (352) 746-7357 FREE REMOVAL OF mowers, tractors, cars. ATV's, (352) 628-2084 LAWNMOWER 22" Sears, self-propelled $40; 42" Sears mower deck, $20 (352) 563-2896 LAWNMOWER MURRAY 18/42, auto shift w/cart, 1 yr. old, under warranty, $800; 27 Beverly Court SM Woods 382-5958 MANTIS CULTIVATOR paid $496, only used 1 hr. Sell for $250 (352) 726-7549 MURRAY RIDING LAWN MOWER, 11 HP, Brlggs & Stratton, 5spd. 30" mulch & mow. Like new. $450. (352) 637-2523 SNAPPER rider mower, $350. Troy Bilt roto-tiller, $375. (352) 746-7357 Troy-Blt Tiller 8HP, elec. start, w/ attachments. ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 BASSET OAK entertain- ment center, 55 W, 52 H, 22 D, $350 2 BOOK CASES, 41 H x 43-1/2 W, $20 ea (352) 527-0301 BED FRAME New In box, queen/ king, w/ 6 castors, $35. (352) 527-0580 Bed: New Visco Memory Foam Mattress Sets. As low as $495. 20yr Warr. (352) 597-3519 Delivery Available Bed: Pillow Top Mattress Sets. New in plastic. Warranty *Queen: $155 *King: $195 (352) 597-3112 Delivery Available BEDS BEDS BEDS Beautiful fact closeouts. Nat, Advertised Brands 50% off Local Sale Prices.Twin $78 Double $98-Queen $139 King $199. (352)795-6006 BLUE PRINT ARMCHAIR $25. Beautiful flowered SINGLE BED, $100. (352)341-3319 COFFEE TABLE & 2 END TABLES Brass with glass tops. $50. (352) 344-13,65 Coffee tble & end table, stone & glass, $50. (352) 628-7407 Cell (352) 422-2695 COUCH & LOVE SEAT, Burgundy & gold leaves, brand new, never used $800 (352) 344-3826 COUCH, BROYHILL, like new cond., Pd, $800 Sell $225 obo QUEEN BED Sealy Pos- turepedic, nice, $110 obo (352) 489-7552 or 352-362-7941 COUCH, PASTEL colors, bamboo, white trim, excellent, $250 (352) 726-2269 DINETTE SET High grade rattan, 4 armchairs w/castors, 42X60' table, like new. Orig. $1990. Sell $400 (352) 746-9789 DINETTE SET, 42" round table w/4 chairs and matching china cabinet, exc. cond. $325. (352) 860-2205 DOUBLE BED, complete with mattress & box spring, very good condition, $100 (352) 726-3907 DRESSER WITH MIRROR $35 or make offer. Dish cabinet, $30 or best offer. (352) 795-2065 Entertainment Center $30. Computer table/desk, different from most, unique, blond color, $30. Or offers. (352) 795-2065 ENTERTAINMENT center 82"Wx72"H. Includes 35" TV, tape deck, CD player, VCR & receiver $1150 obo, FUTON white heavy metal, $125. (352) 628-3995 -U CITRONELLE Garage & Moving Sale Leaving the County Antiques, Tools, Riding Mower, Furn, Boat, household Items, too many things to lstl Everything will gol Follow signs from 495 &. Dunklin, Fril. & Sat. 8-? 7 6270 N Velveteen Pt. CITRUS HILLS Community yard sale 9am Sat. April 2 Belmont Hills/Clearvlew entry off 44, just west of Super Walmart @ US Flag, Bargains Galore' CITRUS HILLS Sat 8am-2pm Little girls, clothes & Toys, Ladies Clothes size 12-18 & more. Annapolis Ave. CITRUS SPRINGS HOPE LUTHERAN CHURCH Multi Family Furn, Collectibles & much misc. Sat 8am-2pm Citrus Springs Blvd. CITRUS SPRINGS Huge Rummage Sale Saturday 9am-3pm at St. Elizabeth's Parish, Country Club Blvd. , CRS. RVR/ HOMOSA The Path Shelter Store Furniture. Appl., Children Clothina Tues. Sat. 9-5. Nottingham Sq 1239 S HWY. 19. 352-794-0001 CRYSTAL RIVER Humanitarians of Florida April 2, 9 -1 Many new Items. 50% off all furn. & lamps. Off corner of 44 & Conant Ave CRYSTAL RIVER 10765 W. Spring Circle, 8am to 3pm, Saturday Multi-family, everything must go. Lots of house- hold,children's,clothing, CRYSTAL RIVER 4 FAMILY Fri. Sat. 9-1 10025 Tom Mason Dr. CRYSTAL RIVER 8390 Orange Bud Ter. Frl. Sat. 8a.-i p. Benefit Adopt A Rescued Pet CRYSTAL RIVER Estate/Storage Unit Sale Antique furniture & collectibles from home' In Mobile, AL. French armoire, tables, chairs, oak dressers, trunks, sofas, lamps, collectibles, china, silver flatware LOTS OF ESTATE WELR Signed gold & sliver, garden decor, vintage' clothes, hats & linens, Too many wonderful Items T SEE Friday & Saturday 8-4 Airport Storage, Hwy. 19 CRYSTAL RIVER ' Meadowcrest Annual Yar Sale. Sat., April 2. 8am- 2pm Wlnn Dixie Parking Lot.: CRYSTAL RIVER, Sat. 8-2, Huge Yard Sale 6386 Venable St. CRYSTAL RIVER Saturday, W. Wlsconsrin Court off 495, 7am-? DUNNELLON Several Household Items, patio set, much, more. 11975 N llbon Pt (off 488) Sat. Only 9-3 FLORAL CITY Estate Items & collecti- bles. Ferris Groves, Hwy.41, Saturday 8-? FLORAL CITY Moving Sale Fri & Sat. 9am-2pm 9009 S. Zanmar Dr. FLORAL CITY Sat. 9am-? Furnishings from foreclosed houses, All contents of house, lots of furn, End of S. Heather Pt. Follow Estate Sale signs HERNANDO 4800 N Kenllworth 7a-3p Sat..Onlyl Everything Must Gol MOVING SALE MF CompSacts LowRate Fiancing v ^Syndicated Content r .. Available from Commercial News Providers DREXEL End Table with lamp, $100. Matching comer wall unit, $200. Excel. condition. SM Woods 382-1467 FLOWERED MAUVE Blue & Cream flowered couch & chair, $150 OBO; Oak Dresser & Armoire, $300 OBO (352) 382-7229 GLASS TOP dining table, 4 chairs, black, $60. Floral pattern couch, good shape, $8. (352) 628-3527 LARGE 78" SOFA, $300. New con- dition. Coffee Table 56"x26", marble or glass top insert, $100 SM Woods 382-1467 LIVING ROOM SET, sectional, coffee table, 2 end tables, with lamps, excellent cond. $800. (352) 382-7802 MEDIUM OAK dining room table, 2 hil-back captains chairs, 4 hi-back chairs, china hutch & serving table, $1500. (352) 746-2084 MOVING SALE 8 pc wood dinette set Dark green & maple, $500. Walnut wall table, $50. (352) 527-4697 MOVING SALE Broyhill dining room set, china cabinet, 12- place settings of San Marina dinnerware by Flntrldge, old mirror by Towle, Sterling silver flatware + numerous other articles. For more Info, call (352) 465-2226 between 7pm & pm. MOVING SALE Deluxe chaise, $300. Off-white leather recliner, $150. (352) 527-4697 OAK CHINA CABINET with light, $200 (352) 860-0669 Preowned Mattress Sets from Twin $30; Full $40 Qn $50; Kg $75. New waterbed$299628-0808 PRIDE ELEC. LIFT CHAIR, 2 years old, mauve, $250; PVC PORCH/PATIO FURN. 5 pcs. $300 (352) 637-4542 QUEEN HEADBOARD wood, traditional $25. Washed Oak End Tables, $30. (352) 628-7407 or Cell 422-2695 QUEEN SOFA BED good condition $250 (352) 621-0353 RECLINER ELECTRIC, brown, like new, Cost new $800, sell $150. (352) 341-5787 SLEEPER COUCH Burgundy, green & beige stripe, like new, $400. (352) 564-0123 SOFA & LOVESEAT Pastel colors, excellent condition, $350. (352) 344-1365 SOFA & LOVESEAT, olive/tan color, plush pillow backs, end table & coffee table, barely used. Excel cond. $850 OBO0 (352) 302-4046 SOFA w/3 cushions and Loveseat, beige design. 3 yrs. old, like new $700 (352) 746-1564 Sofa, Cream, mauve & sage floral; Lady's La-Z-Boy recllner, Sage, exc. cond. $250/both (352) 344-4919 SOFA, wood frame, 6' long, $50. Sofa, dark green, 6' long, 4 pillows, $100. Excellent condition. (352) 628-9242 SQUARE COFFEE TABLE 2 end tables, large, bamboo & glass top, beautiful, $150. Pink ribbed velvet chair & ottoman, $50. (352) 341-3319 1997 CUB CADET TRACTOR, 27HP, 4WD, very clean, 600/hrs. Incl. bucket & trlr $12,500 352-302-5825 5' BRUSH HOG, Exc, Conn, $400. Can Deliver (352) 563-6621 TRACTOR Yanmar, Diesel, $3,750 w/ Equipment (352) 746-4703 5 PIECE PVC SET Excellent cond. $200. (352) 795-6525 10' Umbrella w/wlndflap & HD stand w/ weight. $90; 2 Lounge chairs w/cushions, $100/pr $175/all. (352)860-0444 42" ROUND PATIO TABLE, 4 chairs, excellent condition, $85 (352) 637-3232 CHAISE, loveseat, chair and ottoman, end table. PVC w/cushlons, like new, possible delivery, $395. (352) 527-0143 PLANT SALE Liquidation of plants for Springl Azaleas, Red tips & many more. Derby Oaks (352) 341-0847 Driver license with safe record. 4 years college +1 or related experience required. MAINTENANCE WORKER: FIT position, M-F. Maintain/repair of building and grounds. Must have your own tools, reliable transportation, as well as experience. APPLY AT THE KEY TRAINING CENTER BUSINESS OFFICE HUMAN RESOURCE DEPT. AT 130 HEIGHTS AVE. INVERNESS, FL 34452 OR CALL 341-4633 (TDD: I-800-S46-1033 EXT, 3471 -EDE- "-"1 CITRUS COUNTY (FL) CHRONICLE 16C SATURDAY,APRIL 2, 2005 __ HERNANDO Garage sale, Fri. Sat, & Sun. Rain or shine, 90% Men's stuff, 1200 E. Cleveland St. HERNANDO Sat. April 2, 8am-2pm N. Sean Ter, '486 to Anthony, follow signs. Furniture, tools, guns, etc. Bring cashll HERNANDO Sat. April 2, 9am-? Inside & outside sale 5582 N. Irving Park, (Forest Lake) HOLDER Moving Sale Sat, April 2 8a-? 910 E Hartshorn Ln. HOMOSASSA Fri. Sat. 7am-5pm 2088 S Melanie Dr. HOMOSASSA Fri,, Sat., Sun. 8-3. 6514 W. Oaklawn St. Lots of good stuff. HOMOSASSA Huge. Sat. only rain or shine, 8to1. VikrePath off Rock Crusher HOMOSASSA Inventory Reduction Storewlde Sale 15%, 20%, 25% Through April 15th Paul's Fumiture Tues-Fri 9-5, Sat. 9-1 628-2306 HOMOSASSA Sat. 8-? Several Families 5855 W Nobis Cir HOMOSASSA Yard Sale Fri. & Sat. 9-3 5725 W. Kingsway Ct. INVERNESS 3016 S. Davis Lake Dr. rosewood turn, oriental, SW, HH Items Fri & Sat, 4/1 & 2, 8a-3p INVERNESS Fri. & Sat 1320 Keats St. House & Baby items INVERNESS Fri. & Sat. 1001 Jones Ave. Off Turners Camp. INVERNESS Fri. Sat. 8am-? 7 Lakes 9708 E Woodmere Ln. INVERNESS Fri., Sat., & Sun., 9-5pmn 904 Great Pine Point, off 581, 3 bedroom sets, living rm. set, dinette set, aftlque China hutch, odds & ends, INVERNESS Huge community yard sale. Saturday, 8am-? The Moorings, Gospel Island. Something for everyonell INVERNESS HUGE INSIDE MOVING SALE Rain or Shine Thurs. Sat. 7820 Gospel Island Rd. Furn, Antiques, collecti- bles, lots of misc. INVERNESS Plant/yard sale Sat. 8-1 40+ plant varieties 5535 E. Arthur St. LECANTO Cowboy Junction Flea Market open Tuesdays & Friday LECANTO Fri. Sat. 8-1 Multi Family, Toys, DR tbi, clothes, rug Hoylake Ter off 490 LECANTO RELAY FOR LIFE BENEFIT. Sat. 8-? LIFECARE CENTER 3325 Jerwayne Ln LECANTO Yard Sale. Sat. & Sun. 9am-? 235 N. Hedrick Ave., off 44 ! OLD HOMOSASSA Sat., 9-?, 10575 Bresler Ct, (behind Yulee Sugar Mill) Scaffolding, fishing gear, HH misc., freezer, riding mower. 628-7609 PINE RIDGE ESTATES Sat. & Sun., 9-5pm 4254 W. Alamo Dr. PINE RIDGE Movina Salel Fri., Sat., & Sun. 8-? Desks, shop tools, garden tractor, edger, shovels, etc. Canoe and household goods. 5279 W. Pine Ridge Blvd. SM WOODS Moving Salel Fri., Sat. & Sun., 8-2pm, 27 Beverly Court. Tools, lawn equip., & furniture The ads running in Garage / Yard Sale I I category are sorted by City or Town to I assist the reader in I your quest for the L Perfect Sale Consignment Store Closing. Everything Reduced. Clothing $1/up Homosassa (352) 398-7673 cell COVERALLS (short sleeve jumpsuits) dark blue. Size 46R or X-large. Never used, $15 each. (352) 746-2659 CUSTOM MADE 2 lovely summer evening gowns, perfect for prom or wedding, size 14. $50 each. (352) 795-8983 WEDDING DRESS, new size 8, cap sleeves, beaded, with train, $150 (352)341-1215 BURN BARRELS * $8 Each 860-2545 2 LAKEWOOD RADIATOR HEATERS, $75 FOR BOTH (352)341-1740 2 Peavy Microbass Amps Commercial Audio equip. $100/both Lg. 5 Drawer Chest, oak finish, $50 (352) 382-1049 2005 SPECIALS 6 lines 10 days Items totalling $1-$150 ...........$ .50 $151-$400......$10.50 $401-$80oo......$15.50 $801-$1,500....$20.50 CALL CHRONICLE CUSTOMER SERVICE 726-1441 OR 563-5966 Two general merchandise Items per ad, private party only. (Non-Refundable) Some Restrictions May Apply 30 DRAWER WOODEN LIBRARY CARD CATALOG,36"x44"xl9" light oak finish. $150/obo (352) 726-3190 1100 STONE CRAB CERTIFICATES, $3 each. (352) 628-6107 2500 WATT ONAN Gen- erator, $300. 3600 Ib pressure washer w/18HP motor, $450. (352) 628-9309 7FT AGUSTA FRUITWOOD Billiard table, 3 pc. slate, with 4FT lamp, claw feet, absolutely beautiful, with balls & sticks, like new, 1st $1,100 takes It. (352) 726-9906 ABOVE GROUND POOL 24' round, new 11/2 HP pump, new pool liner, Jacuzzi filter. Damaged pool wall- take all for $200- Includes deck. (352) 621-5584 AQUARIUMS 60 gal. plexiglass, 55 gal. glass + lots more. All for $650 obo SCOOTER Honda Spree, $650 obo (352) 697-1589 ARE YOU MOVING? 2004 5x8 enclosed car- go trailer, 35001b axle Floor & wall tie-downs $1,650. (352) 341-0442 CAGES. 2 each, 30H, 24W, 48L. Self-standing, good for many animals or birds. Easy clean bot- tom. $30 ea. Both $50. (352) 628-0316 Iv msg. CAR TOP CARRIER $45. PATIO SHADE for RV (extender for awning) Paid $90- like new, sell $75. (352) 746-5496 CARPET FACTORY Direct Restrecth Clean * Repair Vinyl Tile * Wood (352) 341-0909 (352) 637-2411 CITRUS UNITED BASKET *SURPRISE* $1 BAG SALE MON. APRIL 4 103 Mill Ave. Inverness .(352) 344-2242 COMPLETE LEADED GLASS CUTTING EQUIP. lIcluding diamond saw (352) 344-8719 EUROPEAN COLLECTION 23 pc. collection of wine, champagne & beer glasses, collected In Europe, early '60's Each glass colorfully painted with producer's logo. $65 (352) 726-6429 FILE CABINET, metal 4-drawer, legal size, $50 Sobo WALL UNITS (3), dark wood, all for $350 obo (352) 697-1589 Flea Mkt. Possibility or Craft Shows for POTPOURRI DOLLS all supplies + drill press S $1500/all Call (352) 621-3453 FRIGIDAIRE Refrigerator 16.5 cu.ft. 4 months old, new $359, sell for $275. DAYBED, with trundle, $100 (352) 726-4387 cell, 228-3451 GOT STUFF? You Can We HaulO CONSIDER IT DONE Movlng.Cteanouts. & Handyman Service Uc. 99990000665 (352) 302-2902 I WILL REPLACE YOUR LIGHT OR FAN with a fan with light starting at $59.95 Uc#0256991 (352) 422-5000 ITALIAN SILK wedding or prom gown, Princess style & crinoline, size 18, $225 OCTAGON SHAPED TABLE with leaf 40"x42" extends to 56"x42" $40. (352) 628-0026 MOVING SALE! Tools, plants, and some furniture. (352) 344-8719 MUSICAL KEYBOARDS, Caslo CTK-55L & Caslo CTK-511 with stands $75 each (352) 697-1589 NEED RELIEF? Would you like me to give you money for your equity and pay off your mortgage? Also buying mobiles, houses & land contracts. Call Fred Farnsworth (352) 726-9369. Same address & phone number last 31 years PORCELAIN DOLL COLLECTION prices from $7 to $15. MAPLE SEWING MACHINE cabinet, exc. cond., $30. (352) 637-2972 PORTABLE electric bingo machine. Com- plete w/toble on cast- ers, just rebuilt, $200 firm. (352) 628-0316 leave message. Radio Controlled RC Plane, Trainer, Magnum .40 motor, Futaba radios w/ extra high tech radio, tones of extra, $300 OBO. Needs Batterles & gas (352) 527-3565 REFRIGERATOR, electric stove w/self-cleanlng oven.D shwasher Brand new storm door. 2 old quilts. 97-pc Krystonia collection- all retired. 1st edition Walt Disney sliver plated bell collectlon.352-382-2749 SEWING MACHINE Kenmore model 385.15510200 Never used, with carrying case, cost $158 Sell for $75 cash 352-637-2295 SHED FOR SALE 12X24 aluminum probullt shed only 7 months old. Paid $4200 sell for $3250 352-266-8860 SOD, ALL TYPES Installed and delivery available.352-302-3363 STORM DOOR, 36"x80", glass with dark. brown panel, $25. (352) 489-9569 TOILET, complete, $20 2 ceramic lamps $8 ea (352) 341-0787 TREADMILL, PRO-FORM, 740CS, excellent condition $250 CERAMIC KILN & molds, $150 (352) 344-2939 TRUCK TOPPER for 8' bed, $100 (352) 628-9309 WE MOVE SHEDS 564-0000 WE MOVE SHEDS 564-0000 CREDIT CARD MACHINE Verlfone Tranz 330 Unit. Verlfone printer, all $350 (Original cost $2300) (352) 628-1083 Gift Shop Fixtures For Sale At Sugarmill Square 8363 S Suncoast Blvd. Homosassa, next to EIRanchito, Glass jewel- ry dispel. cabinets, glass shelves, wooden racks, Great deal on all fix- turesl Sat. April 2, 9a-3p LANIER 6425 Copier Sorts, staples, collates & stacks. Good cond. Works well. Original manuals. $250 (352) 746-5308 JET 3 motorized chair very good condition $800 (352) 637-7252 MOBILITY CART Pride GoGo 4 wheels Like New $750 OBO 352-489-5238 BALDWIN STUDIO PIANO Excellent condition $800 (352) 228-9285 Craftmatic Bed, wireless, remote control, like new, exc. cond.$250. (352) 628-0996 HAMMOND CHURCH organ, H100, large console w/bench & full pedal board. Exc. cond. Can deliver. $250. (352) 795-2857 LESSONS: Piano, Guitar, etc. Crystal River Music. 2520 N. Turkey Oak Dr. (352) 563-2234 ORGAN Good condition. $1,000 (352) 746-3718 PIANO $500. (352) 447-5955 S&R MUSIC Lessons, drums, guitar, keyboard.352-563-2110 SCANDALLI ACCORDIAN like new, $150. (352)341-3319 QUEENSIZE MATTRESS and box springs, like new, $75. Self-propelled vacuum, 3 months old, $50. (352) 527-3190 Beginner Weight Bench w/4 -10lb weights, 6 -51b & 6-2.51b weights. 2 dumbbells.Good Cond, no rips or tears on surface of bench. $1500OBOCall Todd (352) 621-0582 L/M BOWFLEX FOR SALE Not used ten times.must sell paid $1250 sell for $625. kept in the house. (352) 266-8860 BOWFLEX POWER PRO Top of the line, leg extension and curl attachment, lateral pull down attachment, asking $1200. (352) 382-3767 PROFORM 725 TREADMILL, Space- saver, Programable, cushioned, auto. In- cline, heart monitor. Plus exercise bike, $325. (352) 746-6521 SCHWINN AIRDYNE EXERCISE BIKE Cost $500 new, Will take $200. (352) 341-3319 TONY LITTLE GAZELLE EXERCISER $50 (352) 341-1740 2 FLOATING POOL CHAIRS w/place for drink, $15 ea. 3 wheeller Trailmate bike, 3-spd, never used, paid over $800, will take $400 352-341-3319 2 WHEELER, Brand New 26" Huffy Ladies Bike + extras. '$110 (352) 527-6489 3-WHEEL CHAIN DRIVE Adult Tricycle, fully restored. Has old fasloned bell and large basket, $150. (352) 527-6489 7FT POOL TABLE, all accessories, Excellent condition $600 (352)341-3319 GOLF CART EZ GO 2001 Good cond. Trade considered. $2200. (352) 795-6364 GUN & KNIFE SHOW Brooksville HSC Club April 2, 9am 5pm April 3, 9am -4pm Hernando County Fair Grounds. Admission $6.00 (352) 799-3605 KEEL CREEK HUNTING Club Openings Availa- ble. Leary, GA, Calhoun Co. 229-347-0675. Kelly Smith 229-792-3650 POOL TABLE 8 ft, 1" Italian Slate, leather pockets, accessories kit, Ufe Time Warranty. New In crate $1,645. (352) 398-7202 Del. & Set Up Avail. SET OF LEFT HANDED GOLF CLUBS with bag, $40 Call Sugar Mill Woods (352) 382-2299 2004 Carry-On Trailer Corp.18',10,000lbs GVW Rear load. ramps, tan- dem axle, 4wh elec brakes- used twice, $2500 obo. 637-2023 24' Tri Axle Flatbed Gooseneck Trailer 21K capacity w/ramps, $3,000/obo (352) 860-1069 40' GREAT DANE Good condition, reefer troller, deal @$2500. 352-628-1052 6X4 UTILITY TRAILER $125 (352) 637-6841 HD UTILITY TRAILER 8'x6' w/ramp, all steel, 15' wheels, $650 (352) 860-0444 PLAYPEN, JUMPER, travel system car seat with base- latch system & changing table, $150 (352) 726-9332 METAL DETECTOR WANTED. Good quality brand. In very good cond. Eves, 795-4865 MILITARY RELICS Cash Paid. World I & II, German American, Etc. (352)522-1825 Camping porta-potti, $30. Or best offers. (352) 795-3555 NOTICE Pets for Sale In the State of Florida per stature 828.29 all dogs or cats offered for sale are required to be at least 8 weeks of age with a health certificate per Florida Statute. 3 AKC MALE YORKIE PUPS 8 weeks old, 352-628-6914 ADULT COCKATIELS $25. Baby cockatiels $35 (352) 726-7971 AKC MINIATURE SCHNAUZER PUPS $400 (352) 476-4153 DOBERMAN (Warlock) Male, Intact, $300. Good with kids. (352) 489-3058 Iv. msg. Humanitarians of Florida Low Cost Spay & Neuter by Appt. Cat Neutered $15 Cat Soaved $25 Dog Neutered & Spayed start at $30 (352) 563-2370" KITTENS & CATS Many breeds colors ages spayed neutered shots tested $80-125 352 476-6832, 352-382-9014 LHASA-POO, male, blond color, current shots, 4-1/2 mo. old. Loves, animals, kids, whatever. Parents on premises, $150 (352) 726-4891 VERY FRIENDLY 31/2' Burmese python & 55 gal tank. $100 (352) 465-6456 or 613-0010 ZEBRA FINCHES 1 pr/$20, w/cage, $40; Very nice, healthy birds. Call (352) 489-7475 12 Yr. QH Gelding, black, 15H, great on trails, gentle, $1,700. Saddle $300 382-1344 Alpacas The Huggable Investment $900 up. Come and see for your- self. 352-628-0156 -U 2 & 3 BEDROOM HOMES Pool, wonderful neigh- borhood. Reasonable. (352) 447-2759 BEVERLY HILLS 1 Bdrm Park Models, furnished. Incls. utilities & cable. Wkly rates start at $150. 352-465-7233 DOUBLEWIDE 2/2 double carport, shed, Sr Park $550.mo.1st, last, sec. 746-1189 DW 2 bedroom, $500 up. 1 bedroom, furn. No pets. Detalls,Homosassa (352) 628-4441 FLORAL CITY 4/3 W/ garage, $600mo, 1st & Sec. (904) 556-1047 L/M HERNANDO Waterfront Rent/sale. Furn. 2/1, $600 mo plus or $64,900. No pets, 352-795-5410 HOMOSASSA DW, 3/2, CHA, $650/mo $650/dep. 207-651-0923 HWY 488 Lg 3/2, carport, shed, 2/2 acres. No pets. $725 + deposit. 352-795-6970 RENTALS Floral City, 2BR, $425 Hernando, 2BR, $400 Cent Heat &Air No pets 1st, last, sec. 564-0578 SEASONAL RENTALS 2 BR/furn. Utilities Incl. Nice clean, quiet park. No pets: (352) 564-0201 1999, BayManor, 3/2 w/ amenities, large master bath w/ garden tub, kitchen- Island w/ electric, etched glass display cabinets, laundry Rm, C/H/A, $35,000. Call (352) 341-0758 ATTENTION BRAND NEW DOUBLEWIDE Deliver and Set Up $35,900 Includes 10 Year Warranty. Homemart Mobile Homes (352)307-2244 Over 3,000 home and property listings at RIVERFRONT PK. 2/1 Lg, LR, scrn. prch. CHA. $9,990. See at: riverside lodaerv.com 352-726-2002 WHY RENT? Use your Income tax refund towards the purchase of your new Home. Call American Homes (352) 628-0041 S-I 5 Acre Mini-Farm. Lg 4/2, Lots of scrubs. Won't last long! Call (352) 795-6085 1999 3/2 DW, 1/2 acre mol,, like new, behind Inv. Wal-Mart $58,750 obo (352) 726-9369 '04 New 3/2/2 Concrete Stucco Homes 1806 sq. ft. own at $895. down and $625, mo. No credit needed 1-800-350-8532 Over 3,000 home and property listings at 12X45 on Lot 50X150' 1/1, Storage bldg. well & septic, Fl. rm. Hernando. $22,500. (352) 666-4569 2/1 2, on 1/2 ACRE 10x20 addition. New' vinyl siding & roof. New gas furnace- new carpet, stove, fridge. Shed. Serious Inquiries only. (352) 465-4531 4/2 on /4 American Homes beautiful model home #10 (1356 SF,) new 3/2 deluxe kitchen, vaulted ceilings, well, septic tank on I acre wooded lot. Only $2903.53 down and $611.15 mo. P/I F.H.A. Call 352-628-0041 / 866-466-3729. American Homes beautiful model home #4 (1568 SF.) new 3/2 deluxe kitchen, vaulted ceilings, well, septic tank on I acre wooded lot. Only $2841.68 demn and $599.34 mo. P/I F.H.A. Call 352-628-0041 866-466-3729. American Homes beautiful model home #9 (2048 SF.) new 3/2 Del. kit., vaulted ceilings, stone FP, well, septic tank on I acre wooded lot. Only $3477.20 down and $720.68 mo. P/I F.H.A. Call 352-628-0041/ 866-466-3729 American Homes Invest In this beautiful home #16 (1568 SF.)new 3/2 deluxe kitchen, family room, vaulted ceilings, well, septic tank on I acre wooded lot. Only $2842.79 down and $599.55 mo. P/I F.H.A. Call 352-628-0041 / 866-466-3729. American Homes let us build your beautiful dream home #14 (2208 SF.) new 4/3 deluxe kitchen, vaulted ceilings, well, septic tank on I acre wooded lot. Only $3320.43 down and $690.74mo. P/I F.H.A. loans call 352-628-0041 / 866-466-3729 American Homes new home and I acre wooded lot new #13 (2432S.F.) 4/2 deluxe kitchen, vaulted ceilings, well, septic tank on 1 acre wooded lot. Only $3467.34 down and $718.79 mo. P/I F.H.A. call 352-628-0041/ 866-466-3729. American Homes stop paying rent you can own this beautiful #7(1680 SF.) new 4/2 deluxe kitchen, fireplace vaulted ceilings, well, septic tank on I acre wooded lot, Only $3318.01 down and $690.28 mo. P/I F.H.A.CalI352-628-0041/ 866-466-3729. American Homes beautiful family home #5 (2432 SF) new 4/2 fam. Rm, FP, delux Kit, vaulted ceilings, well, septic tank on 1 acre wooded lot. Only $3,823.43 down and $787.74 mo. P/I F.H.A. Call (352) 628-0041/ 866-466-3729 American Homes close out model sale on this beautiful #3 (1323 SF.) new 3/2 deluxe kit, vaul ceilings, 2 cov prchs well, septic tank on I acre wooded lot. Only $3060.27 down and $641.07 mo. P/I F.H.A. loans call * 352-628-0041 / 866-466-3729. American Homes retirement special close out on this beautiful #15 (1248 SF,) new 2/2 home del. kit., vaulted ceilings, well, septic tank on I acre wooded lot. Only $2834.52 down and $597.97 mo. P/I F.H.A.352-628-0041/ 866-466-3729 Crystal River BRAND NEW 3BR/2BA MOBILE This new 3BR/2BA, 2005 model mobile home has a washer/dryer, ceiling fans, covered parking, partial fencing, pre wired for cable, garden tub with separate shower in the master bath & more. One year lease @ $800 mo. Background check required. Call Today For Appointmenitl 352-527-6789 Knight Realty Nancy Knight Broker, ADR 12 The Right Move for all your real estate needs. [email protected] Beautiful 3/2 on% | Acre. Frnt. porch. Huge eat-in kitchen. $1,500dn.$675. Monthly. Call 352-795-8822 Diversified Enterprises Inc. For All Your Mortgage Needs. Good Credit. Bad Credit* Purchases* Refinancing and Home Equity Loans. Lic. Mortgage Lender (352) 628-5700 DON'T WAIT 1 Needs TLC, 3/2 DW On 1.2 ac. fenced, 3 bay carport, Shed, boat port, $44,900 Parsley Real Estate (352) 726-2628 OWNER MUST SELL! 1 acre land/home package. 3/2 with full appliance package, under warranty. Beautiful property nice & quiet, decks, driveway. Must seel $5,000 down, $586.40/mo. P & I W.A.C. Call to view 352-621-9183 Owner selling '96 DW on 1 ac, country setting, horses allowed, LK ROUSSEAU area. (488 & 495) New AC, Ig. scrn. prch. 2 car gar. w/att. matching 3 car carport. Pond area, beautifully decked 33' pool, hottub, sheds, etc. MUST SEE! ONLY $89,000 (352) 795-4770 QUIET LIVING beautiful location, restricted neighborhood, '85, 2/1 14x56, 50x125 lot, like new gas stove, refrlg., washer, dryer, cent. heat & air, plus adjoining lot 50x125 with elec. Zoned mobile or home. $79,900 cash (352) 726-6042 -Uf 12x60,Crystal River New cupboards & fridge. Stove, partly turn or unfurn, $12,500 neg. (315) 406-1976, cell ph : 2/2 YOUR NEW HOME! Gated Sr. Pk. DW, Beautiful Fi. rm. All appli. plus. Close to shops & hosp. Asking $45,500. (352) 795-8983 2/2, 14X66 SW In 55+ park, Lecanto. New appliances, large scrn porch, + 1/2 porch. Carport and shed. $18,000. (352)726-5872 55+ Park, 2/1, new carpet, scr. rm, partially furn, all apple. Avail Imm. (352) 726-8151 55+ Park 2/2 DW HOMOSASSA 2 porches, 1 scrnm. 1 vinyl windows, appliances, part. turn. FLORAL CITY 1 or 2 bdrm, 1 bath, fully applianced, screened lanal, $425 mo. (352) 212-7076 Over 3,000 home and property listings at RENTALS BEVERLY HILLS 1/1 House $550/Mo BEVERLY HILLS 2/1/1 House $575/Mo RIVER COVE LANDINGS 3/2W/F Condo $1000/Mo Alexander Real Eotate 795-66533 563-2203 cell 422-6030, CRYSTAL RIVER 2/2 CHA, utl rm.Trash Incl. $475.382-1344/422-0284 INVERNESS 2/1, C-H/A.W/D hookup garage, water, quiet country setting. Clean, $550. (352) 564-5660 LECANTO Gorgeous new duplex, 2/2, $625mo. No pets (352) 249-0848 SUGARMILL WOODS New, 2/2/2, Avail now. $900. (352) 592-9811 HERNANDO Beautiful waterfront cottages. Boat dock, fishing, water sports, on chain of lakes. Hurryl $495 mo. Includes util. (352) 860-1584 -U Realty One- Property Management 527-7842 "- BEVERLY HILLS 2/1/1 w/bonus room....$700 "Bl-, i B. 1.K. 5650 0 1 C A :G 550 Bb a" :-e,:, .u, ,,,,, S ,70 I I 1200 -2 Cu. r.:. o Furr. $800 CRYSTAL RIVER i .,,, d.:. 'l S s1050 3L2 a43Ta- ror, I i S9 ILUVERNESS i ? ,r1.:.'.".l. W lr 1150 6 B 2 A PC. L $795 80 A' B E .upii. S550 LECANTO BE, : "a LA jl.I S575. TIMBERLAND -; R-T.: d ., S12S50 Residential & Commercial Rental Properties Needed. ALEX GRIFFIN Realtor*grouo. coam -I '04 New 3/2/2 Concrete Stucco Homes 1806 sq. ft. own at $895. down and $625. mo. No credit needed 1-800-350-8532 Crystal Palms Apts 1& 2 Bdrm Easy Terms. Crystal River. 564-0882 CRYSTAL RIVER/ LECANTO FORESTVIEW APTS. 2/1, CHA, carpet/ appliances, No pets $550 mo, + $500 Sec. 352-220-3354 INVERNESS 2/1, C-H/A.W/D hookup garage, water, quiet country setting. Clean, $550. (352) 564-5660 ^--1 Over 3,000 home and property listings at Crystal Palms Apts 1& 2 Bdrm Easy Terms. Crystal River. 564-0882 4 UNITS FOR LEASE 1000 sq.ft each. In Pine Ridge, Beverly Hills Call 856-234-4684 INVERNESS Commercial building. approx. 1,000 sq.ft. Open floor plan, fenced In parking in rear. With billboards facing Hwy. 41 Included. $1,000 mo. (352) 228-7020 OFFICE w/land. Great location. $850 mo. Call Usa Broker/Owner 422-7925 OFFICE, 1020 SQ.FT. downtown Inverness. Walk to Courthouse. Exc. cond/locatlon. 114 Pine Ave. $1000 per mo (352) 636-8691 CITRUS HILLS Townhomes & Condos 2/2/1 Brentwood $1200 2/2 Citrus Hils $850 Greenbriar Rentals, Inc. (352) 746-5921 CITRUS HILLS '06 seasonal or rent while you build (352) 476-4242 or (352) 527-8002 CITRUS HILLS Country Club, Ig. 2/2, vaulted ceilings, tennis, golf, htd pool, $749/mo. (561) 213-8229 CRYSTAL RIVER Condo. Gulf access, furn. long term or short term. (352) 563-2203 352-422-6030. INVERNESS 2/2/1, W/D, Pool. No smoking/pets. $695. 352-746-3944 SUGARMILL WOODS 2/2/1 Villa on Golf Course, turn. or unfurn. long term. (352) THElHEICK]q GROP EAL : -! ESTAT SERICllES (352) 746-3390 PINE RI::;lDGEllk 559 N Canaion I Dr; 3/22 /.oo $1J 0-mo. CITRUS HIJ LLS 25--2C-SewesS.] C"Rnt. oue = Unurise LECANTO Charming studio opt Daily/Weekly .- Monthly or Efficiency $600-$1800/mo. Maintenance Services Available Assurance Property Management 352-726-0662 SAMERICAN ERA REALTY RENTALS AVAILABLE BEVERLY HILLS 2/2/1 Buttonbush $700. 631-235-1157 [email protected] DUNNELLON 2 bed/1 bath/1 Garage New paint, Carpet $650.mo. 1st, last & Sec. (352) 637-2973 INVERNESS 2/2/1 clean, quiet, $750 mo., (352) 637-0765 BEVERLY HILLS 1/1 CH/A, Fla. rm, + W/D lease credit check $600 (352) 637-3614 CITRUS HILLS-POOL Avail. June 1 thru Dec. 1, 2/212/carport, town home $900 mo.,1st, last, sec. dep. Tenant pays utilities. No smoking & No pets (352) 746-5831 CITRUS SPRINGS 2 bed/1 bath/ Carport New paint, Carpet Close to Entrance $650/mo. 1st, last, Sec. (352) 637-2973 HOMOSASSA Riverhaven, 2/2/2, $850 mo. + Elec. & Sec. No smoking. No pets. 352-628-7117 INVERNESS Well furnished, clean, cozy & comfy (352) 726-6436 (352) 212-9601 BEVERLY HILLS 2/1/1, CHA, All appls. Non smoking. 1st, last & security. Days: 352-382-1162 After 3pm 352-795-1878 Brentwood 2/2/2 w/ den ' $1100. mo. Please Call:, (352) 341-3330 For more info. or visit the web at: citrusvillages rentals.com C.Riv Paradise Ave * 3/2/2, sea wall, dock $1,100 352-795-1865 CITRUS SPRINGS 2/2/1, Has Shed With Power. No Smoking. No Pets. $675 Month. First, Last & Security. (352)489-8968 (352)302-5427 CITRUS SPRINGS On golf course. 3/2/2 + screen rm.,$975 mo. No. smoking. (352) 527-9616 CONNELL HEIGHTS 3/2/2, 1st, last, sec. $850/mo. 352-527-0785 CRYSTAL RIVER 3/2 $700 mo. NO PETS. Century 21 Nature Coast, ask for Beverly (352) 795-0021 or 795-6330 HOMOSASSA 2/1, CHA, $550 month". 1st, last, security. No pets. (352) 628-4210 INVERNESS 2/1, w/ apple's. Non smoking. No pets. $560 mo. 608-732-8243 cell INVERNESS 3/2/2 new, Screen rm. $875/mo, 352-302-1193 LIC. R.E. Broker INVERNESS Beautiful 3/2/2 Irg,. fenced yd., 1,740 sq. ft., $900 mo. 352-586-8958 OAKWOOD VILLAGE Rent while you build, large & lovely 2/2/2, just minutes from Pine Ridge or Citrus Hills. Flexible lease terms (352) 527-1680 "MR CITRUS COUNT' ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 -= ea FLORAL CITY 1/1 $400 mo, $500 sec. No pets. 352-637-9036 A INVERNESS A ON GOLF COURSE, spoc 3/2/2, $900 mo. No pets 908-322-6529 PINE RIDGE Brand new 3/3/2, no smoking. 352-746-1892 SUGARMILL WOODS New, 2/2/2, Avail now, $900. (352) 592-9811 SUGARMILL WOODS 2 & 3 Bdrms. Pool, Starting at $800 SMW Sales (352) 382-2244 SUGARMILL WOODS 3/2/2 new paint, carpet & appl. 476-6425, $1,000 C.Riv Paradise Ave 3/2/2, seawall, dock $1,100 352-795-1865 CRYSTAL RIVER 2/2, rec w/frpl, e-z to Cry River. Deep water canal, $1000 1st, last, sec. 795-9026/433-3898 CRYSTAL RIVER 2/2/1 FURN. 1600 sq.ft. on deep water canal near 3 Sisters Springs. $1,200 mo. 613-2761 FLORAL CITY Small 3/1 South Old Oaks, off Trails End Rd. Out the door on the water fishing & boat dock, $575/mo. 1st, last. $400 sec. Bkrnd Ck. req. (352) 726-6197 HOMOSASSA 2/1.5 300ft of waterfront great view, Immaculate 995mo. (727) 808-5229 HOMOSASSA 2/2 Waterfront. Nicely furn. Mob. Hm. Clean, great view, yard, dock, boat- house, 1st. last + sec, $850mo. (352)628-9759 INVERNESS 2/1 spacious remod- eled, canal front, 4 lots to river. $750/mo. (352) 726-9316 OLD HOMOSASSA Waterfront 2/2, all utilities. $1500 mo. (352) 621-1206 THE LANDINGS OF WITHLACOOCHEE 2/2 Furnished Condo. Weekly, Monthly, or Annually. (352) 489-0979 CRYSTAL RIVER Rm w/bath & sep. effic. Pref fern. Close to Chill's 352-422-2927 FREE ROOM & BOARD Furnished Bedroom To take care of Elderly. gentleman, very light duties, (352) 860-0997 INVERNESS 2 separate BR's, cable TV & kitchen privileges. In private home next to Inverness Golf & Country Club, No smok- Ing/drink (352) 344-2139 RESPONSIBLE ROOMMATE WANTED $400 plus share. (352) 586-9006 Over 3,000 home and property listings at HOMOSASSA 2/2 Waterfront. Nicely furn. Mob. Hm. Clean, great view, yard, dock, boat- house, 1st. last + sec. $850mo. (352)628-9759 SEASONAL RENTALS 2 BR/furn. Util, Incl; Nice clean, quiet park. No pets: (352) 564-0201 ;''., r ,; $150+Mllllon SOLDIII Please Call for Details,: Ustings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP'. (352)795-0060. New 3/2 Concrete Block Homes, 5 models & floor plans to chose from.$500 Down. $690 mo Call: (352) 895-7909 (352) 622-2460 Builder M CLASSIFIED DONNA HUNTER Realtor Buying or Selling Homes and Acreage Covering Citrus County from the Gulf to the Lakesl Paradise Realty & investment (352) 422-4235 Over 3,000 home and property listings at SOLUTIONS FOR TODAY'S HOMEBUYER - FAMILY FIRST MORTGAGE Competitive Ratesll w Fast Pre-Approvals By Phone. Slow Credit Ok. w- Purchase/Ref. FHA, VA, and Conventional. Down Payment Assistance. ,- Mobile Homes Call for Details! Tim or Candy I (352)563-2661r * Lic. Mortgage Lender EQUAL HOUSING OPPORTUNITY 4 UNITS FOR LEASE 1000 sq.ft. each. In Pine. Ridge, Beverly Hillis Call 856-234-4684 , LECANTO Free Standing Restaurant 1150 $q ft,. drive thru window. High'., Traffic area 491, just S.' of 44. Avail,. for lease Immed. $1000 mo. (352) 595-7202 LECANTO, Rt. 44 300ft f GNC, 2/1 house plus 3/2' mobile, $260K Owner 1-(727) 712-1779 cell (727) 385-9015 C/B/S DUPLEXES 4 unlts,, strong cash flow, E. Inverness. $199,900 - (352) 726-1909 Broker's Welcome HURRYII Over 3,000 home and property listings at 4/2/2 (Only lived In 4 mos) Nice soft colors, open floorplan, oak cabinets, custom wIn-' dow treatments, fans, $183,700 (352) 489-8234 4/2/2 New Construction 2500 s.f. Formal LR & DR; Ig. Fam. rm. spac. Kit w/breakfast bar, split bdrms., open patio,. auto sprinkler. $7,000 below preconstruction * price. Why Walt to Build' Buy Now, $183,900 " Denise Lazarls, Exit Realty. (800) 570-0830 CITRUS REALTY GROUP: 3.9% Listing : Full service/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare SATURDAY, APRIL 2, 2005 1L7C MMI ,'Your Neighborhood REALTOR' call Cindy Blxler REALTOR 352-613-6136 cblxlerl5@tampa Craven Realty, Inc. 352-726-1515 me. 5 ACRES located In Pine Ridge Farms. End of Cul De Sac. Asking $200,000. 527-8448 '04 New 3/2/2 Concrete Stucco Homes 1806 sq. ft. own at $895. -down and $625, mo. No credit needed 1-800-350-8532 3/2/3, Large breakfast area, bedrooms & lanal. 2 yrs old. $255,000. (352) 527-8043 BEAUTIFUL PINE RIDGE 6ine Ridge-lovely level ene acre lot Saddle- ,*ree Drive, $67,900. CALL (352) 527-2629. iDon't Horse Around! Call Diana Willms A Pine Ridge Resident REALTOR 352-422-0540 dwillmsl @tampa bay.rr.com -Craven Realty, Inc. 352-726-1515 RUSS LINSTROM HAMPTON SQUARE REALTY, INC. rllnstrom@ digitalusa.net 800-522-1882 (352) 746-1888 3 BEDROOM GOLF COTTAGE. 2 BATHS. 2-car garage, heated pool, Immaculate. Golf membership not req'd. By owner, $220,000 (352) 527-8416 Over 3,000 home and property listings at 224 W. Valerian PI., 2/2/1, FL room, 2 screened porches, newly painted. Great neighborhood. Must seel $110,000 (352) 527-9842 '04 New 3/2/2 Concrete Stucco Homes 1806 sq. ft. own at $895. down & $625. mo. No credit needed 1-800-350-8532 2/1/1, New deck, fence drain field and AC. Newly painted. Carpeting like new. Move right In/Ig. 3BR/1IBA, CARPORT, needs minor TLC, $68,750 obo (352) 726-9369 RENT TO OWN - NO CREDIT CK. 2/1/1 $700/m 352-746-1831 or visit jademlssion.com 3/2/2 POOL 1 AC RV/Boat, Agents okay, Reduced $247,900. 198 S Highview Ave. citruscountylistinas.com Appts. (352) 527-8676 CITRUS REALTY GROUP 3.9% Listing Full Servlce/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Mllllon SOLDIII Please Call for Details, Listings & Home Market Analysis RON& KARNA NEITZ BROKER/REALTOR CITRUS REALTY GROUP (352)795-0060. 3/2/2 VILLA Malnt. free, 1600+ sq.ft. tile/carpet thru-out, scrn. lanal, beautiful treed lot. $179,900, By owner, 352-257-9001llon SOLDIII Please Call for De- tails, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. 1 OF A KIND HILLSIDE VILLA $279,000 Built 2002, Tile roof, 3/2/2+ Great rm, Smart wiring, extra tile, Surround Sound, many upgrades. 352-746-0402 2003 Prof Decorated Tera Vista Maintenance Free Gated Golf Community Home. Photo's & details at ProplD# TPA 58807 - 352-746-0438 HAMPTON SQUARE REALTY, INC. llndaw@ tampabay.rr.com 800-522-1882 (352) 746-1888 PRESIDENTIAL ESTATES 3/2/2 on 1 acre, SEnclosed pool. Approx. 1700 sqft. $179,900 (352) 341-2812 RARE FIND. 4/3/2 split open plan pool home. Living, family, huge kitchen, dining & break- fast areas. 4 walk-In closets, 2 master suites, 2800 sq.ft. Gorgeous 1 acre corner lot. Fenced for pets. New roof & pool marclte & kitchen app's In '04. 30x30 detached garage- one door Is large to store trailer, boat or motorhome. Citrus Hills Membership available 870 N. Indianapolis Ave $375,000. (352)527-7744 2 STORY 3/2 w/garage built In, stone fireplace, newly decorated Inside Extra lot Asking $135,900 (352) 726-5527 or (352) 726-9090 3 BEDROOM, 2 BATH on 1.1 acre corner lot Paved county roads, $140,000.00. Call (352) 637-3561, after 6 p.m. Over 3,000 home and property listings at CITRUS REALTY GROUP 3.9% Listing Full Servlce/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Mlllion SOLDI!I Please Call for Details, Listings & Home Market Analysis RON& KARNA NEITZ BROKER/REALTOR CITRUS REALTY GROUP (352)795-0060. LINDA WOLFERTZ Bronar/Ownnr _.,nens 2,520 SQ.FT., living area, 3,800 sq.ft. under roof. On almost 1 acre lot, Desirable neighbor- hood. cement block 3/2, 27FT 3 car garage, split plan, cath. ceilings, cent, vac., Intercom, double Jacuzzi tub, 24x30 detached gar- age. Lrg. screen lanal, $290,000 (352) 726-5251 Over 3,000 home and property listings at 3/2/2 ON DOUBLE LOT Built '04, Energy Effi- cient, split floor plan, many upgrades, close to WalMart $144,500. By Owner (352) 344-4953 3BR/2BA 1 -/2 CAR GAR., Cement block, like new, on oversized lot $139,500 (352) 726-9369/prlvate baths. FL rm overlooks water, Many upgrades. $164,500. (352) 341-1418 CITRUS REALTY GROUP 3.9% Listing Full Servlce/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Mllllon SOLDI!I Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. HOME FOR SALE On Your Lot, $88,900. 3/2/1 w/ Laundry Atkinson Construction 352-637-4138 Lic.# CBC059685 J.W. Morton, R.E., Inc 726-6668 637-4904 MOVE IN READY 3/2, 2-1/2 car garage, on 2.38 acres, $220,000 (352) 637-1987 OPEN HOUSE Sat 11-2 Sun 1:30-4:30 Spring Into A New HomelBullt In 2000, Great location In West Highlands Area. 3BR, 2 1/2BA, 3 GAR 1 Acre Lot, Over 2200 Sq. Ft. L/A. A Definite Must Seel S. Apopka to Right on Anna Jo Dr. To Left on Kline Terr. Look for Open House Sign. Questions? 352-637-1000 SELL YOUR HOME Place a Chronicle Classified ad 6 lines. 30 days $49.50 Call 726-1441 563-5966 Non- Refundable Private Party Only L i,Cvn Re'tric ilora Ma/a opp,' SPARKLING, 2380sqft - 3/2, city water, near town, Fam,rm, eat-In kit, vacant, owner/Realtor $167,700. 352-344-2500 K CITRUS COUNTY (FL) CHRONICLE ClASSI11FIEI:>s INVERNESS HIGHLANDS 3/2/2, move In cond. 5-yrs new, $133,500 Possible lease option 352-341-0696 INVERNESS Highlands, Custom built 2/3/1.5, $129,000 - 20226927(352) 726-7181 Marilyn Booth, GRI 23 years of experience "I LOVE TO MAKE HOUSE-CALLS" VILLAGE Your USED VEHICLE SUPER CENTER With Low, Low Prices Every Day Of The Week! HERE ARE A FEW EXAMPLES 2002 TOYOTA CAMRY XLE BBS Wheels, Spoiler, Woodgrain Interior, Low Miles #T41438A $16,888 2002 TOYOTA CAMRY LE VS Engine, Alloy Wheels, Very Loaded, Low Miles. #T41438A $13,995. Irom in-service late #5900 $13,998 2003 TOYOTA CAMRY LE Low Miles, Excellent Car. #T50830A Only $16,988 2003 TOYOTA PRIUS HYBRID Up to 50MPG With Cert. Warr. to 100k mi. #T50773A $17,887 2003 TOYOTA TACOMA PRE RUNNER 4 DR, 4x4, 22,000 Miles, Certified, E1lra Clean #5907 2003 TOYOTA CELICA GTS Leather, Alloy Wheels, Very Sharp, 6,000 Miles. #5895 "Payrrieri, bt:ea or. 2000 down. 72 mo term. anra 5 99 : pr OAC $25,888 $16,888 Low Mil s. nl [125,995 --M I S -- CHVRLE TAHOE L Ony1,0 ils Hdt hav an Esalad! Yo Sav Thuans Onl ETD. 4 i W A llT I T So Utiity Sae tousnd *n1ejo afty Ol [129598 2004 TOYOTA 4-RUNNER UNLIMITED 4x4, Low Miles and Loaded Upi #T50736A On Sale For $29,995 2002 HYUNDAI XG 350 This is one beautiful automobile, fully loaded, low mileage #T50898A $11,988 2003 HONDA PILOT 4-Door SUV, Automatic And Well Equipped, Local Trade. #C50152A $22,858 2002 FORD FOCUS Auto, Local Trade, Very Clean, Good Fuel Economy. #T50626A $8995 2004 SATURN VUE PREMIUM SUV Only 8,000 Miles, Leather. On Sale For $17,816 2003 KIA SORENTO SUV Very Clean, Under Factory Warranty. #T50870A Only $13,888 2003 TOYOTA AVALON XLS Leather, Sunroof. Balance of 6 Yr/100,000 Mile Warranty, 21K Mi $23,588 2004 BUICK LESABRE Here is your chance to make a great deal! #5903A On Sale For $14,988 2002 TOYOTA TUNDRA Access cab SR5, V8, Auto, Low Miles, Factory Mag Wheels Tonneu Cover, Very Clean, #T50835A Reduced to $9i8 88 2002 TOYOTA HIGHLANDER LTD V6, Wood Grain, Very Well Equipped, Low Miles #5899 Only $21986 1999 CADILLAC SEDAN DEVILLE Custom Cloth Top, Very Elegant, Low Miles. #T50592A Only $10,988 2004 CADILLAC CTS 17,000 Miles And Priced To Sell! #C50150A $28,888 2002 CADILLAC DEVILLE America's Luxury Sedan. #050121A $19,888 2005 CADILLAC DEVILLE SAVE $10,000! Move Fast! $33,888 2004 CADILLAC CI'S Custom Cloth Top, Gold Pkg, Loaded, Only 8k Mi. #C50170A $29,986 HOURS: MON.-FRI. 8AM 7:30PM (352) 628-5100 1-800-852-7248 Service Dept. (352) 628-2100 See our vehicles featured on naturecoastwheels.com SAT. 9AM 6PM email us: [email protected] TPayment based on $2000 down, 60 mo. term and 5.99% apr... OAC. Village Is not responsible for typographical errors. All sale prices expire on the Monday evening following publication. Inglis Durelo Ri vIrnerm ess CWMIC-TOYOTA Homsassa H 98 Spring H Hwy. 50 B ks 7765 E. Spanish Trail, 1/3 acre, 3/2, Split Plan, New: Master bedrm, bath & laundry Rm., New, C/H/A, floors, & Kit. cab. $86,900. (352) 726-9928 or (352) 302-3901 3/2/2 Near Mall, in city N.W 21st St. ,Lrg Lot, Newer H & A., 2 sheds, Boat Ramp nearby. Rm. for RV/Boat onslte. $162,900 (352) 795-0917 BEAUTIFUL professionally renovated waterfront home. Indian Waters. 3/2/2, 1650 sq.ft. living. Tons of extras 3898 N Eagle Pt. (352) 563-0584 By appt. only. $499,000. CITRUS REALTY GROUP 3.9% Listing Full Servlce/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & compare $150+Milllon SOLDIII Please Call for De- tails, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. HOLIDAY HGHTS. 3/2/1 nice area of homes, close to town. Located on corner. $119,000 Extra lot avail, next door 352-563-0686/400-0751 --------",- Licensed R.E.,Broker *f" 4%A, w2"" T 0 Y 0 TA NEW CONSTRUCTION, 4/2/1 on %Ac. CB home built In 1999 Paved St. $115,000 Parsley Real Estate (352) 726-2628 Waterfront, Golf Investment, Vacant Land and Relocation * Citrus, Marion and Hernando e NEW CONSTRUCTION 3/2/2, 1700+ sq.ft. living area. Pick your colors. All on 1 acre. $149,900 352-382-7888 RIVERHAVEN New construction. 3/2, extra large 3-car garage. Wide drive- way, 5 mln. to Marina. Clubhouse, pool & tennis optional. $255,000. Owner/Broker 352-628-1633/422-5436 S. ROCK CRUSHER AREA 2/1/1 cement block. Furnished, fenced, screen porch, clean, $87,000. (352) 628-2839 WATERFRONT HOME 2/1, approx. 950 sq. ft. I0V lots, On Golf Course, move In cond. Many extras, need to see to appreciate. $137,500 (352) 476-4418 2,170SF. Oak Village S Home, 3/2/2, $269,900; Extended garage, Lots of extras; See details, cornm #TPA58884 Tel, 352-382-1013 BUY OWNER TPA #58760 Over 2400 sqft. living, 3/3/2, Arthur Rutenburg Family room w/custom stone wood burning fireplace, eat-In kitchen w/oak cabinets, upgraded appliances, formal living & dining room, den w/wet bar, master suite w/6' Jacuzzi tub and separate shower In master bath. Ceramic file & carpet through- outin neutral colors, Lovely screened in lanal-3D2-1793 3/2/2 MOVE-IN COND. All new carpets, paint and tile floors. New appl's. 3 sliders to lanal. '02 roof & AC. $157,900. (352) 382-3059ail, ON GOLF COURSE 2/2/1, LANAI, FURNISHED $139,500 (352) 382-5746 t \- f .33( CITRUS COUNTY (FL) CHRONICLE ILRC SATURDAY. APRIL 2. 2005 IA' Automatic, Air Conditioning, Power Steering, Power Brakes, Power Windows, Power Door Locks, AM/FM Stereo CD, Cruise Control & Much More! n%p PRA i 'DC a^ MAKE 7 DA Y PRH If you buy any new toyota at DELUCA a; at another Toyota Dealership. DELU' N SPECIAL AiPRFINAfCINOCAID LEASING PROCORAMS OR UP 7rO '500SIN OCAIA 'S LARGEST VOLUME DEALER! NOBODY... BUT NO Sa ANN Ar Conditioning Air Conditioning,MODEL {oT PowerB. Po .......wer Brakes? 919 MITSUBISHI MIRAGE DEIN ,It ,, AN CASCD, t AM, FM Stereo CD, F A Ste reoCD, A.-"3.5001b Towing 3,5001b. Towing Capac .7 E I ie 1 995 BUICK RIVIIRA,, .,. 2000 HONDA CMC IVICX i .s t ...# t aoMCASm 2001 DODGE DAKOTA SPORT X CABA, mMcD, InCD ' P N C 1 200 I3 PONTIAC VIBII,,,,,,,,,,,,II ,,IAMfCAI ,m A`m'- 1. ,T "(- M" "_ tB999 CHiVROLiT EXPRESS,,o1111 oAM ,M, AtiIOMIW IRhlande r 4 R 2004 CHRYSLER PT CRUISIR,.siiiaMAFMSmCAst r PowerBrakstn Sen 2002 HONDA ACCORD LXo.... .i ... oAMF EII.UIE u re, Tilt, Power Brakes CSoonditonin g, 2002 AOirA ACORD X 1 1 r M CASB Power Door Locks Wheels. Running and more Boardse&oMore 2003CMA R I L IVit...............it M sCm . e 2004 TOYOTA COROLLA LE,,,, ao.oA ucmm 2003 CAMRY Li,,, ,,# in amCAg, SWe. M3 9 2004 MAZDA 86, o v ,o,11,aa aa1o1 m v CASS1 Jm A92003 CAMRY XLEo, A.. meFco" SAutomatic Air 2002 TOYOTA AVALON XL, ,, ,#,oo AAi u CASMMo,a Powe W dAutomati. .Ar "o PowernStin, 2004 TOYOTA TUNDRA SR5 AM CASC ABS, C ruBisewr '' M ' Conditioning. 7 The Best New Cars M /6Yr. 100,000 Mile Limited Power Train Warrantyt . /6 Yr./Unlimited Mileage Roadside Assistancet F-1f -- 1& 3 M tU Fro dieoigial"of firsn tm s.ioo asolda now vahidie. "TOYOTA MAKES THE CAR ...DEI De L.L T 0 i LOCATION:1 1/2 MILEV' 1719 SW College Rd. *:'( A f. '-.ELL Cj .FF ; 0. ELE-T:7 .E lE:LE.: COL 7 T.k T ., r. LE % V- tCE'LE il c Par FEDE %D-T-R LEASE t :.*I.. :N ;: M'ED fE1 F I T & fl3 EGITirt . InOhAL u T..:E- b. C- *.rF0 'mN rIT 1 ':.D6 a l e..T .N A N, r E TR F fw INTERNET PRICING 24 HOURS / 7 DAYS 352-732-0770 bL XI7 r T f Poprton! .! J SATUV IAY, AimL 2, 2005 19C i MAUCNi u1 rAPlL I Am 9IL 2 APRIL 5 ill am a. m Him a am LAIa am- LATE 112 am pm OPEN EXTRA HOURS THIS WEEKEND!! tNANCING! AVAILABLE NO PAYMENT DAYS! ASSURANCEE INTEE!* * id find the same identical vehicle for less 3A will refund 110% of the difference. A VERYi m 0...-. .ir C condition ,/ Power Steerir a oi 0 ig, 11g, . PUwerl dlraKes, AM/FM Stereo CD, Power Outside Mirror, 1.8 Liter 60/40 Split Rear Seats & More! 0 1 0 FACTORY RIBATES A VAILABLI AT DLUCA TOYOTA THIS FINAL WEEKEND! YOOK.. SELLS FOR LESS! OVER 650 VEHICLES AVAILABLE! PTION WAS Sm ...a *5,595 WM R, SUNROOF, ALLOY WHEELS,, 7,498 al lS, SUNROOF .......... ,,11,898 W. LS............ ...1. 2,895 IRtaRUISE, ALLOY WHEELS ..,,. 12,695 ICRUISE ma.......a .....a.... 12,995 QII,~MLF.SS a ..aa,,,..... !, 1 5,699 IUISt,' ...a .................... a.15,548 9WER, CRUISE ...... ......... ... $.16,988 CmiW AUE OYWImi S..... ,,17,399 PIPRCRUISE, KEYLESS .......... 17,495 mII ,IJSi ........ ,,,,,, 18,799 D)WRBRUISE, ALLOY WHEELS ...... 1,8,699 MIWI1HER, ALLOY WHEELS .... ,20,699 EtMlNROOF, ALLOY WHEELS .... a,21,498 RPAOWilCRUISE, ALLOY WHEELS ..... aa25,889 NOW $5,377 $5,995 $10,999 $11,381 $11,499 $11,891 $14,581 $14,778 $15,498 $ 6,568 $16,588 $17,495 $17,588 $19,280 $20,381 $24,448 Wk The Best Used Cars! SToll-Free Call For Service 24 Hours A Day S/(160 Point Quality Assurance Inspection H us I Follow PFactyIRe iceScu Customer Bill of Rights SYou hse the right to betreated with dignia courtesy and respect You havetheright toselectproductsand serviceswithoutfeelingpressured. SYu hae the right to completeand reliable informatonfrom alnowledgeable, competent and cooperative staff, SYou hae e fight toa prompt andefficiet sales an service experience with genuineconcernforyour te. SYou havetheright tofairandcompeitvepricesforsales andservice SYou hae therigh to hae all records and communication reatedconfidentalv. You have the right to receive an explanationand copies of all documents. * It hae the right to expect us to keepour promises. BRAND NEW 2005 r i ... "Pi:. PRICE" PURCHASE MEANS NO HAGGLE. NO HASSLE. Vehicle iAr ; well equipped. You can accessorize (or not) Simple, straight forward menu pricing, a.RBB 'HB BI i-- ^ SCION XA AC, Power Steering/WIndows, ABS, V6 Speaker Pioneer AM/FMICD " f2,995 SCION XB AC, Power Steering/Windows, ABS, V6 Speaker Pioneer AM/FM/CD AF la9Sg SCION TC 160 HORSE POWER/ 17" ALLOY WHEELS /POWER SUNROOF I MEMORY SEAT F"M 7f?88A ElS[1"- I I] CITRUS COUNTY (FL) CHRONICLE bDONTMAKElA MISTAKE COME TO DELUCA TOYOTA AND SAVE! While Supplies Last 4 FINAL DAYS! THURSDAY MARCH 31st 9am 8pm FRIDAY APRIL 1st 9am- LATE SATURDAY APRIL 2nd 9am-LATE SUNDAY APRIL 3rd 12am 5pm m 200 ssrURDAY APRIL 2 2005 CITRUS COUNTY (FL) CHRONICLE .47 ii I . aefl $rr $ ---Wq 1%' /a Ile aL, .. ... ..... .ii .bk . '05 NEW DEVILL Our .."-.t : '05 NEW C . C.. ." S I .LAC STS '05 EXT ESCALADE .4, ,J&..4.i. 1/364 '01 NISSAN ALTIMA Low Miles, Automatic, Excellent MPG, Stk#C368750 '99 CADILLAC D'ELEGANCE This Car is Georgeous In Everyway! Lo-Mlles! Come Get It, Stk#C368970 *. :.. :. ANAGERVSSPECfAL[L- '97 HONDA CIVIC HX only 67K Miles, Stk#C368850 '02 BUICK RENDEZVOUS CX Won't Last Loaded, Stk#C452886 C '00 PONTIAC TRANS AM '03 CHEVY MONTE CARLO SS Convertible Very Rare With 5.7L V8, Last Wheels Loaded, Stk#C368810 and only 40K Milest Uke Newl, Stk#C5DIO5B e '03 FORD EXPEDITION Eddie Bauer Loaded, Stk# C368540 '03 CADILLAC DHS Complete Chrome PKG Blue Chip, 24K Miles, Stk# C368640 '05 BUICK PARK AVENUE 16K Miles, All Chrome, Luxury, Stk# C368500 14K .. MILES .-' C . '00 PORSCHE BOXSTER S 6 Speed. Stk#C368450 '00 GMC JIMMY 4WD, All Power, Stk# C368300A '04 FORD MUSTANG Like New, 15K Miles, All Power, Stk#CST11A I Only 8K Miles, Loaded, Stk# C368660 '99 CADILLAC DEVILLE WOW Another Lo Miles!, All the Toys, Stk#C368960 m Mir. '03 HONDA ELEMENT EX Model. Full Power, Alloy Wheel Brand New Tirest, A Bargainl Stk#C55187A '03 LINCOLN TOWN CAR Loaded, All Luxury, Stk# C368700 4, , '04 OLDS ALERO Automatic, Power Package, Xtra Clean, Several to Choose From, Stk#C568410 Sl- MW- w '05 BUICK CENTURY 12K Miles Stk#C368670 ... O t- I' '04 DODGE DURANGO SLT Leather, All Power, Stk# C368600- - 4 ~ F.a.a '04 CADILLAC DEVILLE Last One At This Pricel Stk#C368360 2 .'r '05 CHRYSLER 500 TOURING Leather, All The Toys, Stk#C368530 a :^..uaiia^ Only 20K Miles '02 CORVETTE Convertible, Just New Inside & Out : ' .. ,, ", ...- '04 FORD EXPLORER Eddie Baur, Loaded, Loadel, navgaton DV Pitch Cam, Tons of Chrome, Stk#C368350 0:Sg^^^e I NOT VALID WITH GMS OR GM SUPPLIER PROGRAMS. ALL PRICES PLUS TAX, TAG AND FEES AND INCLUDE ALL APPLICABLE REBATES, INCENTIVES AND BONUS CASH ASSIGNED TO DEALER. ARTWORK FOR ILLUSTRATION PURPOSES ONLY. DEALER NOT RESPONSIBLE FOR TYPOGRAPHICAL ERRORS. PAYMENT BASED ON $5,000 CASH OR TRADE EQUITY DOWN, 750 EQUIFAX OR HIGHER, 84 MOs. 0 7.3% INTEREST. r / r "" I *:*~~4 WF o - - L ,-A dav.-5 w qqw 5 r r (I F A. a x s;. CITRUS CouNTn' (FL) CHRONICLE Spacious 2/2, Features Stone fireplace, formal living Rm/dlning Rm/ FL Rm on private Cul-de-sac w/ deep green belt. 27 Beverly Court $159,000 Firm (352) 382-5958 $$ SOLD $$ SELLERS DO YOU WANT TOP DOLLAR FAST? Call Me Now! Deborah Infantine EXIT REALTY LEADERS (352) 302-8046 '04 New 3/2/2 Concrete Stucco Homes 1806 sq. ft. own at $895. down and $625. mo. No credit needed 1-800-350-8532 "MR CITRUS COUNW1 Uc.# CBC059685 3 BED 2 BATH HOME Only $36,500! For listings 800-749-8124 Ext H796 OPEN HOUSE, Sun. 4/3, 12-4 pm Brand New 3/2/2 In beautiful Oak Ridge Subdivision, Hwy. 491 341-4852 CONDO, over 1500 sq.ft. Completely remodeled & ready to move Inl 2/2, tennis, pool, clubhouse, fishing Maintenance free living Own private dock. $259,000. (352) 795-5129 or 352-257-9468 WATERFRONT VILLA, at the Islands, 1600 sq.ft., 2/2, FL rm., total reno- vation In 2001. Wood cabinets w/granite. New deep water dock. $310,000 (727) 432-9226 WINDERMERE VILLA By owner. 2/2/1, Gorgeous end unit on Inverle Dr. Freshly painted, newr carpet. Vaulted ceiling & much more. $132,900. (727) 375-2145 C/B/S DUPLEXES 4 units, ,strong cash flow, E, Inverness. $199,900 (352) 726-1909 Broker's Welcome HURRY!! -I A.- .* ,A q .. Over 3,000 home and property listings at - Over 3,000 home and property listings at -Ua 2 HOMES across the street from future Hilton Hotel in Crystal River. Waterfront 3/2/3, pool, seawall, dock home and 3/2/2 home. Owner, (352) 628-5563 "L -. ... Over 3,000 home and property listings at 3/2 ranch on wide deep canal, Homosassa River, 12'x24' FL rm. over- looking canal & river. 11 yrs. young, 6,000 lb. boat lift & ramp. Raised deck over- looking 125' of water- front. 3 outer bldgs. listlngs.com $429,900 (352) 628-5480 CONDO- 2/2, GATED COMMUNITY Clubhouse, pool, tennis Dock slip on Crystal River. $240,000. (352) 795-6831 CRYS. RIVER 2/2/1 Condo, single story, In Pelican Cove II[ New appll/carpet, boatlift, $319,000. (352) 804-8951 CRYSTAL RIVER 2/2/1 Pelican Cove, deep water/ dock at back door, like new, $299,900 firm. No agents, (352) 563-5022 Homosassa By Owner 2/2/2+, extra Irg closets, new floors thruout, boat house w/covered slip, concrete sea wall, $389,900 W. Halls River to Taylor to 9921 W. Hazel (585) 356-5463 LET OUR OFFICE GUIDE YOU! Otllll l Licensed R.E. Broker Leading Indep. Citrus!' Real Estate Comp. SCitrus, Marion, Pasco and Hernando NO Transaction Waterfront, Golf, NO Transaction Investment, Farms & fees to the Relocation Buyer or Seller. Excep, People. Call Today Except'nal Properties Corporate Office 352-628-5500 Craven Realty, Inc. properties.com (352) 726-1515 Randy Rand/ Broker -- -, . . . . WHY RENT?? No down payment housing available. Plantation Realty, Inc. MARY WAGNER Realtor/Lic, Mtg. Banker Cell 697-0435 -.E WE BUY HOUSES & LOTS Any Area or Cond. 1-800-884-1282 or 352-257-1202 CHEAP HOME OR LAND Homosassa area. Family of 8 left home- less from Hurricane Needs cheap land for home or Ig. home to buy for cheap. Any help appreciated. Call303-467-3042 or 352-489-3058 Iv. msg. TOP $$$ PAID FOR Mobiles w/land, houses & promissory notes. Any location or condition. Call Fred Farnsworth (352) 726-9369 WE BUY HOUSES Any situation Including SINKHOLE. Cash, quick closing, 352-596-7448 Your World Ci EONiCLE C",'a ,,iiii , 6.5 ACRES with nice oak trees on paved road, 3 miles north of Inverness. $130,000, Troy @ 352-560-0163 Buildable Lots For Sale in Inverness, Hernando & Crystal River. From $16,900 & up. Please Call Ruth for Info: 772-321-7377 Florida land Source Incorporated 1 1/2 Acres, mowed on, paved street, $35,000. (352) 795-5234 or (352) 302-9527 3 acres in Homosassa 2- 1/2 acres $20,000 ea.1- 2 acre lot $80,000 Call 352-854-2696 Cell 352-286-4482 4 Lots in Crystal.River for sale will sell separate or together $8,500 ea or$32,000 for all Call 352-854-2696 Cell 352-286-4482 5 Acres, High & Dry, Zoned for Mobile or house $89,000. Possible Owner Fin. 1-800-466-0460 10.6 ACRES, CLEARED, trees trimmed, beautiful oaks, Crystal Manor area. N Shillelagh Ave $130K + closing costs + taxes, (352) 795-2189 1R/+ ACRE ON ROCK CRUSHER 110' Frontage, cleared & ready for home or trailer. $29,500 (352) 564-2566 BUILD THE HOUSE OF YOUR DREAMS ON THIS 2.7 Ac. Lot In Hampshire Hills, Hampshire St. Inverness. By Owner. Price neg 352-422-4412 h DONNA HUNTER Realtor Buying or Selling Homes and Acreage Covering Citrus County from the Gulf to the Lakes! Paradise Realty & Investment (352) 422-4235 PINE RIDGE ESTATES 11V2 acre corner lot Very wooded. On Princewood Street $91,000 Tim, (303) 960-8453 WANT A BETTER RETURN ON YOUR MONEY? I -IMTArCT I I 1031 EXCHANGE Dbl, lot, water view, historic Punta Gorda next to park, harbor & million dollar homes, giving It away at $600,000, worth much morel Call LeeAnn at (941) 906-8689 Stellar Realty Grp. Inc. CITRUS SPRINGS 5 LOTS AVAILABLE $24,900 to $29,900. 1-877-776-5687 2 LOTS IN CITRUS SPRINGS, $30,900 each. Call Carol 772-528-6379 GREAT INVESTMENT OPPORTUNITY! Moccasin Slough Road for FSBO -acre lot cleared and minutes to downtown. 352-220-4483 HOMOSASSA LOTS Better not wait! (352) 628-7024 KENSINGTON LOT One Acre lot on quiet cul-de-sac In Kensing- ton Estates. $59,000 Call 305-246-0820 LECANTO 2.4 Acre Lot near Hwy 44 on Scarboro Ave, Beautiful Lot, $139K (954) 558-1040 NICE LOT IN Floral City, on paved street with city water, trees, zoned for house or mobile $9,800 (352) 726-9369 ELLIJAY, GA, 3+ acre wooded home- sites, In small rustic com- munity. Beautiful mountain views & trout stream. 80ml, N of Atlanta, near national forest, owner financing available. Starting at $45,000 (706) 636-2040 HOMOSASSA RIVER 165', SEAWALL, DOCK Impact fees paid. Central water. Blue water. $199,500. Make offer. (352) 628-7913 LAKEFRONT BUILDING LOT, 52X145, dock, city water, Ig. oaks, Asking, $62,500. (352) 586-9498 _ 25HP JOHNSON 0/B, elect, start w/contols. Runs good. Short shaft, $450 (352) 249-0860 BOAT TRAILER 2004, EZ Loader for 19 Ft. Boat, like new, $995 (352) 613-3327 EVINRUDE/JOHNSONS 1990, 200HP, in good working cond. Extra motor for parts. Both for $1500. (352) 564-2865 LARGE BOAT TRAILER, $175. (352) 212-0930 MERCURY O/B MOTOR 4HP + 21 speed elect. motor, gas tank, anchor. All $300. (352) 341-5787 WANTED USED TRAILER For 14' fishing boat (352) 382-3467 SEADOO 2004, Bombardier, GTX -4 Tech,'red, like new, w/ trailer, $8,500 OBO, (352) 344-5796 SEADOO GSX '98 LTD, 133hrs. Exc. cond. Adult main, trained, w/trlr. $3300 (352) 527-4191 SEADOO GTX '99 LTD. 950cc/ 130HP, 108hrs, trir. cvr. fenders, chrgr, 2 vests, 3 seater $4900. (352) 795-1636 0000 THREE RIVERS MARINE We need Clean used Boats NO FEES !! AREAS LARGEST SELECTION OF CLEAN PRE OWNED BOATS U. S. Highway 19 Crystal River 563-5510 12FTJON BOAT Smoker Craft, like new, Extras, $400 (352) 746-4633 S$6,400 I Key Largo 1700 : Trophy 1903 j ALUM. BOAT 12Ft., 7/2 HPJohnson motor & trailer. $400 (352) 628-6899 BOAT SLIPS. Canal off Kings Bay. Covered and Uncovered. (352) 228-7328 BONITO 18', Center console, 2 motors, 115hp yamaha & 4hp. Will take smaller boat In trade, $5750. (352) 341-1569 BOSTON WHALER 15', Consol, 1999,40hp Johnson, Coast Guard equlpt, $7,000 0BO. (352) 795-0014 CAROLINA SKIFF 17FT, 50HP Nissan, Performance trailer, many extras, $9,500 (352) 860-0180 CASH$CASH$CASH$ We Buy Boats Motors & Trallerst (352)795-9995 (352)400-0114 CASH$CASH$CASH COBIA 16FT Bass boat, 85HP Suzuki, Magic Tilt trailer $1,495 (352) 344-1503 CUSTOM GHEENOE 15 HP Yamaha, poling platform, console steer- Ing $5500, 352-228-3282 FG TRI-HULL 1984, 14ft, good shape, 2002 NIssan 9.8HP, 25 hrs. with trailer, in water $1,800 (352) 726-0801 CLASSIFIEDS U-a ricli/ Pontoon, 40HP Honda, Coast Guard equipped. $7,000 OBO (352) 795-0014 JAVELIN 2002 Bass Boat, 90HP Johnson, Trolling motor, power trim & tackle Incl New cond. $11,000/ obo. (352) 527-1309 HURRICANE DECK BOATS 13 Models 17' to 26' SWEETWATER PONTOONS 15 Models 16' to 26' -A -/ -A -A -A -A-A CITRUS COUNTY'S BEST SERVICE AND SELECTION Crystal River Marine (352) 795-2597 Open 7 Days KEY WEST '95, 17.2 Ft., Boat, mo- tor, trlr, 88HP Johnson, fully loaded. Excel cond, $8500 621-9880 MAKO 19', CC, 1996. Merc 150 S/S prop, BIminl, alum tandem trailer, trim tabs Dual batts, V.G, cond. $11,200. (352) 637-5130 MANATEE 1974,15', 16HP, Evlnrude, runs good, need steer- Ing table. $1400. OBO. (352) 563-6626 L/M MANATEE 1979, 20'CC, 1993 130hp Yamaha, Instruments & extras, good off shore boat w/ trailer, must see, $6,750. OBO(352) 527-0258 MARAUDER 1998, 17 Ft., 115HP Evinrude, S/S prop, very fast, runs great. $7,500 OBO (352) 382-3741 McKEE CRAFT '87, cc. Live/fish well, BIm, Marine radio, 88HP. Evinrude T/T, 55 mph. new upholstery. Trir. $6800 obo. 621-0484 NECKY LOOSHA IV 17' Kayak, yellow, rudder, used 1 hour. $900 (CF. $1500) (352) 746-3768 PONTOON BOAT 24', 48HP, HT, FF, STS ra- dio, trir., new deck + many extras. $4200 OBO 352-628-5311 PONTOON BOAT '94, 19FT, 40HP Yamaha OB, with power lift, fish finder, new trailer, $5,500 (352) 341-4792 PROLINE .1987, 17FT, 115HP OMC w/traller, full Instruments CC, hyd. steering, etc. (352) 746-2277 after 4p PROLINE 1997, 202 Sport (duel Consol Bowrlder) w/ 190hp4.3L Merc Cruiser, I/O, performance duel axle trailer, blminl, $12,000. (352) 795-9993 RENKEN BOWRIDER 19FT, 4 cyl., 170HP Mercrulser, ready to go, $3,000 or best offer. 352-341-5548 400-1077 SEARAY '95 175 B/Ww/130 Merc I/O. 50 hrs. Garaged, Bminl, cover, trailer, $7500. (352) 249-9100 TRIUMPH 12FT tender, Ropelene Dura hull, 9.9 4-stroke Yamaha. Performance trailer. Motor, trailer still under warranty. $3,600 firm 352-726-2927 eves WELLCRAFT 19-1/2FT, with trailer, needs work, $1,200 or best offer (352) 344-9705 WELLCRAFT 20', VHF Radio, Depth finder, 150hp Johnson, rebuilt, needs lower unit, galv. trailer, $750. .Must Sell (352) 650-1232 5th WHEEL 36Ft, 1990 Hitchhiker, oak cabinets, new refrig. & blinds $10,000 Call between 2pm-9pm (352)341-1336 ARGOSY Strong 454 engine. Runs great, Very clean In & but. Must see. $5500 (352) 628-1669 CAREFREE ADD-A-ROOM 15'x8' complete, $200 (352) 628-3585 COACHMEN '84, 26FT, good shape, will consider truck or car In partial trade $5,900 obo 344-8995 DODGE FALCON '92, 19FT, Camper, has everything, runs great, $9,000 (352) 637-1883 FLEETWOOD '95 Flair 25' Class A De- luxe, 454 Chevy, 4 kw gen. New tires/ brakes. Very good cond. $25,000 352-746-0167 GULF STREAM 2001 Cavalier, 27', Excellent condition. $19,900. (352) 726-3555 HOLIDAY RAMBLER Imperial, 1988, 36' 27K orig. ml. Exc, cond. All options, Jack, back- up camera, Icemaker, tag axle, etc. Asking $18,000. (352) 637-2983 SHASTA 2000, 31', Class C, Ford V-10, Cheyenne Series 6K ml. Mint cond. $43,000 (352) 527-0180 TRADEWINDS 2000, 37', 300Cat, 6spd, 15,000ml, diesel ' generator, 2 slides, Invertor, hydraulic leveling Jacks, W/D, double door fridge w/ Icemaker, 2 TVs, surround sound, Corlan counters, all leather, '01 Nissan Tow Truck, $129,000 0B0-trade (352) 344-3467 VOGUE 1985 Cosmopolitan 84K Detroit diesel push- er, fully loaded. 20K obo. 352-422-6661 WINNEBAGO 1989 Chieftan. 35,000 miles. New tires &power plant. Exc. condition, $16,000. (352) 422-4095 WINNEBAGO '92, 34FT, 60K ml. New roof, tires, brakes, Everything works. $17,000 (352) 746-6738 2 FLEXSTEEL WHITE ALL leather captain's chairs for RV, good cond. Fits standard RV pedestal. $500 for both. Or best offer. (352) 795-3555 AVION '94, 32ft. 5th wheel, liv./din. rm. slide. Queen Bdrm,, laun. & genera- tor ready. Many extra's $17,500. (352) 422-1679 COACHMAN 1998, Catalina Lite, 22', exc plus custom hitches, $6,500. (352)621-1655 (352) 207-1080 COACHMEN 1994, 24' 5th wheel w/slide-out. Clean & very good cond, Asking $8500 abo. (352) 628-4729 after 3prm. COACHMEN '95 Catalina, 29FT, fully loaded, AC/Heat, queen bed, bunks, full bath, excellent shape $7,500 (352) 637-5075 COLEMAN 1997 Taos pop-up. New reverse cycle AC. Extras $2,250. (352) 746-4525 COLEMAN 2000, Tacoma pop up w/ bump out, Heat, air, fridge, awning, port-a- potty, $4,700. (352) 726-3324 ELKHORN 1999 Fleetwood truck camper, 8ft,queen bed, foldout couch, air,3 way elIjacks. EX.CONDITION $7,800 ab o 563-2004 FOUR WINDS 2003 35' Trav. Trir, 3 slides, desk, ent. center, many upgrades, $32K new. Located Rock Crusher, $21,000. (727) 374-6562 HY-LINE 2003 TT, 3 slides, furn, prIv, bdrm.$33,000 new, Must sell $22,000 (352) 628-6644 POP-UP 1993, SLEEPS SIX. AC, heat, refrigerator, awning w/screen room enclosure. $4000 obo. (352) 220-3348 ROCKWOOD New' 2005, 26 Ft. alumi- num slide-out, $5,000 below Invoice. (352) 621-6890 or Cell 352-212-2603 SIERRA 32' w/slide, 1995, queen bed, front kitchen, exc. cond, New 24' deck new alum roof over all Unique & sturdy. Stor- age/ workshed. Perma- nently on a sunny site at Turtle Creek RV Resort $18,000. (352) 628-1854 TERRY 1993 26', like new, $5935 (352) 563-1465 4 TIRES, 185 60R 14, never used, 4 Volkswagen Jetta 4 lug wheels $275 (352) 341-0379 17" MUSTANG WHEELS forged alum. ($500 op- tion on new Mustang) 5-lug 4'/2" bolt circle. Like new $195. (352) 746-5966 Car Hauling Trailer 16', duel axal, steel ramps, tool box, $750. (352) 795-9993 CHEVY S-10 1992, spare parts, fender, etc. $150 (352) 637-2466 Set of 4 Wheels & Tires 14" 4 bolt pattern, tires like new, 7 spoke mag. $200. (352) 563-2685 TRUCK TIRES 11 r22.5 Used, Virgin, $100; 11 r22.5 Used, Recaps, $75; 10r22.5 Used Recaps, $50; (352) 795-1020. 620 NE 5th Terr. Crystal River.-arport 212-3041 FREE REMOVAL OF mowers, tractors, cars. ATV's, (352) 628-2084 WE BUY CARS/TRUCKS Running or not, must have clear title. No Junk please. 352-249-6982 - '00 Buick Park Ave. Ultra. White $10.888 Call 726-1238 '02 Dodge Stratus 37K, AH power White, $8,988 Call 726-1238 '02 Toyota Corolla Great on gas. Blue, $8,988 Call 726-1238 '03 Saturn LW300 Low miles, V-6, Flat Tow, White $13,488 Call 726-1238 Search 100's of Citrus County Used Autos online at (tajN L- itJ LHJ pN10 l^ SATTURDAY APRIL 2. '05 Chrysler 300 7K ml. "C" 7K Heml Red, $33,988 Call 726-1238 '00 SUZUKI VITARA SUV 2 R, Auto, Air, Convertibe..$6,995 00 CHEVY BLAZER LS 4x4, Red, Loaded, Sharp!.$10,450 '02 ISUZU RODEO LS Auto, Ai, Loaded!...........$10,900 '01 FORD ESCAPE XLS DeOm, VS, 5S o !.$1 1,900 MANY MORE IN STOCK ALL UNDER WARRANTY '95 Buick Century Low ml. all power, Blue, $4,488. Call 726-1238 ALTIMA 1994, 154K, 5 speed, sunroof, runs great, asking $3000. (352) 795-3450 BIG SALE $500-$ 1000 DOWN & U-DRIVE Clean, Safe Autos CONSIGNMENT USA 909 Rt44&US19Alrport 564-1212 or 212-3041 BUICK 1993 Century, 109,000 ml. Retired lady owner. Exc, cond. $3200 obo. (352) 465-2662 BUICK 2000, LaSabre, 1 owner, like new, $9,500 (352) 341-4804 BUICK 2001 Park Avenue New brakes & Tires, Tune up, 97K, $9,500. OBO. (352) 564-0040 BUICK '92, Roadmaster, all pwr V8, auto, ABS, AM/FM cass,, cold air, 20mpg, $3,300 (352) 302-7299 BUICK '97 Park Ave. loaded with extras. Beautiful $8,000 (352) 726-3112 BUICK CENTURY 1990, 3.3 V-6, 4 dr. Ice cold A/C. PS, PB, new tires brakes & rotors. New paint. 149K miles. $1650. (352) 302-4590 WEFINANCE.YOU 100 + CLEAN DEPENDULE CAS FROM-325-DOWN 30 MIN.E-Z CRIEDl 1675 US 19 HOMOSASSA CADILLAC 1985 Sedan Deville 147k $750 runs good, good tires 352-382-5757 CADILLAC 1999 El Dorado, 23,000 miles, Showroom condition. $17,500. Evenings, 352-344-1244 CAMARO 1985, V-8, 305 auto, Moonroof, comes with Louvers, $1300. (352) 634-1692 CAMARO 2001. T-tops, fully loaded Low miles. Custom sound.$11,500 OBO. (352) 400-1110 CHEVROLET EL CAMINO 1984, Solid body, runs. $1650. (352) 628-1196 CHEVY '86 Caprice, V-6, 4 dr sedan. 59K orig ml. New tires. No air. Runs great, $1900obo.352-628-9409 CHEVY IMPALA SS 2004 Black, loaded, 30K garage kept. $22,900. (352) 563-0983 Did You Know That Sometimes You can Make more money donating your vehicle by taking It off your taxes then trading It in. Donate it to the THE PATH (Rescue Mission for Men Women & Children) at (352) 527-6500 DODGE ARIES 1985, 84K orig. ml. New tires, good shape $1500/obo. 527-2226 or cell 302-0976 FORD 2001, Taurus Wagon, fully loaded, $7,800 OBO. (352) 726-8804 FORD MUSTANG 1992 Only $8001 Must sell. For listings call 1-800-749-8116 ext 7374 HONDA 2004 Civic Ex Coupe, 8000 miles, moonroof, alloys, AM/FM, CD, $14,000. 0B8 (352) 382-4640 KIA 2001, Sportage, all pwr., new tires & brakes, runs great, $6,000 344-3536 or 563-9768 LEXUS ES300 1996, loaded, sunroof, elec. seat, leather, CD player. Exc. family car $9300. (352) 422-2293 LINCOLN 1981, Mark VI Town Car. Excel. cond., $1,500 (352) 447-5080 LINCOLN 1984, Towncar, w/302 engine, runs good, $1,500.OBO. (352) 637-6284 (352) 476-1815 LINCOLN '94 Mark 8, A-1 cond. garage kept, Super Nice. $4,950 (352) 489-9136 MAZDA '02 Mlata MX5, Crystal blue metallic, 30mpg. Black top & Int. Wet Okole seat covers. $12,500 obo 352-795-5650 MAZDA 2000 626, sliver, auto, air, AM/FM/CD, cass, Cruise, all power, re- mote starter, new struts, tires. Exc. cond. $5200. Pine Ridge 527-2792 MERCEDES 83, 380SL Convertible w/ hard top, new tires, 88K motor rebuilt. Asking $10,000.OBO. (352) 423-3007 (352) 860-0471 MERCEDES BENZ '81, 240D 4cyl. diesel Runs great, 4spd. man. trans. No dents, little rust $1900/bo. 352-860-0578 MERCURY 1994 Sable, 4 dr sedan. Exc. cond. Inside & out. $2000 firm. (352) 382-1794 CHEVROLET 1991, Caprice, good cond., (352) 527-8374 MERCURY 1995 Grand Marquis LS Excellent shape. Original owner. $5,500. (352) 795-6266 MERCURY '88 Cougar V-6, auto, all power. Runs good $1200 OBO Iv. msg. (352) 563-6626 MITSUBISHI '03 Eclipse Convertible GTS/ Spyder, blue, 8,600 ml. $16,500, (352) 860-0915 NISSAN 1981, Datsun 280Z. orig. condition. Auto, PS, PB, PW A/C, 104K ml. orig. $2,500 (352) 746-2522 NISSAN 1991, 300ZX, AC, TTops, all pwr, 5 spd, Good Cond, Asking $6,200. (352) 746-9813 NISSAN 240SX 1992, PW, PD, sunroof, heads up disp, AC, 5 spd. runs great, $5200/ obo. (352) 746-3378 OLDSMOBILE 2000, Intrigue V6, auto, full pwr, 1 owner, Exc. Cond., 33K 4 dr, silver, $6,850.(352) 447-5222 Between 8am-5pm PONTIAC 1990 Sunblrd, needs work $800 or best offer (352) 344-9705 SUBARU 1993, Legacy wagon, 5-spd, power window & loks, 145K ml., runs gre t, $1,950 obo (352) 344-0257 860-2255 TOYOTA 2002 silver Camry Solara. Low miles, war- . ranty. Like new, $13,950 abo. (352) 795-7028 AMC 1967, Marlin, rare, new brakes, good motor, $2,500 621-4677 Eves. 904-588-3200 Days Anflaue & Collect. AUCTION *SUN. APRIL 3* 4000 S. Fla. Ave. Hwy. 41-S, Inverness PREVIEW: 10 AM AUCTION: 1 PM Incredible antique furn,, lighting, tea pot collection, jewelry, clocks, +++ Also: 1947 Hearse & 1960 Chevy C-10 Pickup, 1/2 ton Visit the web www. dudleysauction.com DUDLEY'S AUCTION (352) 637-9588 AB1667 AU2246 12% Buyers Premium 2% disc. cash/check AUTO/SWAP/CAR CORRAL SHOW Sumter Co. Fairgrounds Florida Swap Meets APRIL 3rd 1-800-438-8559 CADILLAC SEVILLE 1976, comp. renovated Exc. cond. Drive or show. $6,999. (352) 746-6521 DODGE 1984, Diplomat SE, 1 owner, drk brown w/tan leather top, pwr wind., air, & radio, 36,481 ml, $3,795 352-860-2321 FORD 1966, Mustang Coupe 289, 225HP, 4 barrel, 42K orig ml. Excel. cond. $17,500 (352) 637-6643 FORD 1970 Mustang convertible, 302V8, Hurst 4 spd, body need very little repair,$9,000. OBO.(727) 942-9446 HONDA 1986 Aero 50 Scooter Stored many years, low miles, needs battery & fuel system cleaning. Best offer. (352) 746-6654 MERCEDES 1974 CONVERTIBLE 450 SL, exc. cond. Over $20,000 Invested, asking $15,000. (352) 586-9498 MG MIDGET 1978, actual mileage 54,293. Pristine cond. $8,500 Firm (352) 447-2069 NISSAN 1986 300ZX, T-top, orig. condition. Runs great. AC not working. $2800. (352) 860-2067 PORSCHE 1975, 911S Coupe, Per- fect shape, no rust or damage ever $12,500 (352)563-0121 TRANS AM 1980, 301 w/4.9 turbo. Runs great. Extra parts/car Incl. $5000 obo.527-1361 Iv msg. VOLKS BUG 1970, New ext. paint 108K, AM/Cass. Fact. AC not working. $5,495 (352) 746-6521 '01 Chevy S-10 36K, AU power X Cab, LS.Tan $10.888 Call 726-1238 '03 Chevy Avalanche Z66 38,000 miles, White, $22,488 Call 726-1238 Search 100's of Citrus County Used Autos online at .i . AVALANCHE 2003, ONLY 9000 Miles. Like new, Sunset orange. $24,000. (352) 795-1127 BIG TRUCK SALE WE FINANCE MOST CONSIGNMENT USA 909 Rt44&US19 Airport 564-1212 or 212-3041 CHEVY 1987 % ton Fleetslde, 5.7L eng. 4spd. man, trans. $1600. (352) 563-0054 DODGE 1987 Ram, 4 wheel drive, power windows, cold A/C, lift kit, nice wheels, $3,300 obo '84 Ram, 2 wheel drive, needs minor work $1,300 obo (352) 344-2268 Trucks CHEVY Z-71 1996, 101K ml, $5,000 Call (352) 726-9886 DODGE 2003, Ram 1500 SLT, 4x4, Quad cab, hemi w/ tow package, all pwr, Exc. Cond., $20,495. (352) 527-2335 (352) 464-2901 DODGE '88 Power Ram 4x4, exc, cond, new paint & tires, rebuilt motor, $3,800 (352) 344-2689 DODGE RAM 1998 1500 4x4 Sport. Blue. 5" lift, dual exhaust headers. Leather. $12,500 obo. 302-5556 DODGE RAM '89, red, 8-cyl. 318, 87K orig. mll. topper, air, heat, cass., runs great $3,000 (352) 726-1257 FORD '01, F150, Super Cab. V8, XLT, 68K ml. New motor, Good cond. $12,500. (352) 726-1112 FORD 1987, E-350 Cube work truck, $2,000 OBO (352) 341-4848 FORD 1987, F350, Dully, flatbed,.4spd, runs good, $1,300. (352) 628-3398 FORD 1997, F150 Pickup w/topper, ext. cab, pwr windows, 3-Dr. entry. $8,500 OBO 341-4848 FORD '97, F250 HD, Auto, All Pwr., 5th whl. or bumper hitch ready, 49K ml., $8,950 (352) 697-2595 FORD RANGER 1968, good shape, runs good, all original, low mileage. $3000/obo (352) 572-0567 GMC SONOMA 2000 SLS, ext cdb, 4.3 liter, V6, auto, Very good cond. $6500 obo. (352) 637-2023 MAZDA 1990, 4x4, 5-spd., new tires, radiator, head & cam. $2,500 obo (352) 341-3396 MITSUBISHI 2003 Fuso FE640T. 11' dump w/alum toolbox. Purchased new 3/04. Auto,loaded.AC,4500mi $32,000. 352-527-1239 NISSAN 1994, V-6, 5-spd, 4x4, all power, bedllner, sun- roof, like new cond, $5,500 (352) 746-9211 TOYOTA 2000, Tundra, 20K mi., 1 owner, like new, $15,500 (352) 341-4804 '02 Dodge Durango SLT & Lth. Blue. $14,888 Call 726-1238 Search 100's of Citrus County Used Autos online at CHEVY 2001 Suburban. Exc. condition. New AC. Silver, gray leather int. All power. $21,900. (352) 302-6082 EXPLORER SPORT TRAC 2005 31,000mlles, $17,000.00 Original Owner 352-465-6236 GMC '03, Yukon SLT, fully loaded, heated seats, 6 Disc CD Changer in dash CD changer, 29K ml, $28,500 628-0590 ISUZU 1996 Trooper, 4x4, 120,000 mi. Exc. cond. $5000. 352-422-1956 JEEP CHEROKEE 1995. 39K oria. mi. V-6, 4X4, $3500/obo (352) 860-2391 TOYOTA 1991, Four Runner SR5V6, 5 spd, 4x4, extras $4,500. OBO.302-1236 Search 100's of Citrus County Used Autos online at PRICE REDUCED TO $2900 JEEP' '93 Grand Cherokee Tow pkg. (352) 489-3564 or 464-0003 '02 Chevy Venture 36K, All power Red. $13,888 Call 726-1238 Search 100's of Citrus County Used Autos online at ASTRO VAN 1995, V-6, rear air, 7 passenger, 139K ml., mechanic owned, very good cond., $2,200 (352) 637-9073 CHRYSLER 1998, Town & Country LXI, fully equipped w/towing pkg & hitch, new tires, 64K ml, $9,400 341-0385 DODGE 1500 2000, Mark III Custom Van, orig, owner, exc. cond. (352) 212-3605 DODGE 1997, Caravan, V6, 3.8 engine, frt/rear AC, AM/FM Cass., 130K, $3,600 (352) 341-3083 DODGE 2002, Caravan (silver) 41K ml. Loaded 1 Owner 465-5803 Iv. msg. FORD '00, Windstar, silver, 4-dr., perfect shape, 1 owner car. Brand new tires. $5,800 746-6205 FORD 1991 good shape, runs good. $2,500 (352) 860-1409, leave message FORD 1993, Arrowstar, new A/C, runs great, $2,800 (352) 860-2898 FORD 1997, HI Top Convertion Van, Good Cond., Org. owner, Loaded, A/C $7,500.(352) 860-2898 FORD 1997, Mini Van, looks & runs great, $1,700. (352) 563-0826 (352) 586-7827 FORD AEROSTAR Van 1993, 8pas, Icecold air, 101K, well maint. Runs & looks exc. $2600 (352) 860-0444 FORD EXPLORER . 2004 Eddie Bauer, owner died, must sell, fully loaded, $27,000 (352) 726-0637 GMC 1988, Astro Van, runs excel., $850 OBO (352) 628-3299 PLYMOUTH '92 Voyager. Engine runs, fair cond. Needs ,, some trans work. $300 r or best. (352) 795-6761 ATV + ATC USED PARTS , Buy-Sell-Trade ATV, ATC, Go-carts 12-5pm Dave's USA (352) 628-2084 C SUZUKI 2003, RM125, to many extras to list, exc. cond, . ready to race, low hrs. C8 nn ta0 (5 oan6n2 00 ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 HARLEY DAVIDSON 1993 FXRP, 32K ml. Exc. cond. 1340cc Blk, $9,500. (352) 527-0180 HARLEY DAVIDSON Blue1979 Sportster, 14,500 ml. Windshield, saddle bags. Buddy seat. Asking $4,950. (352) 586-9498 HARLEY DAVIDSON ROAD KING 1999 21,650 miles, Black, Tour Pack, many extras, all maintenance records, original owner, garaged, $13,995.00, 352-637-2661 HONDA 1985, Aspen Cade, 24K orig. ml., 4K of extras, A+ cond., $5,900. Call Billy at 352-628-0628 HONDA 1996 Rebel, 250 cc. Low mileage. $2,100. (315) 525-6664 HONDA 1999, Valkyrie Interstate, gorgeous, green/gray, loaded, Pics Avail. 16,000ml, garage kept, $10,000. (352) 527-7980 HONDA 2000 Shadow, mint cond, full dress, 4,300 ml, Sr. Srowned. $5,500 (352) 422-4600 HONDA GOLDWING 1987 Aspencade, 70K ml., all black, 2 helmets, . Exc. cond. $4,800 abo (352) 637-3566 HONDA HELIX 1987 & Yamaha moped A-1 shape, saddlebags, 17K ml. $1,795 (352) 341-6219 KAWSAKI 1998 Vulcan Classic. Mint, $3500. (352) 302-3611 MINI CHOPPER Hariey look-alike. Electric or manual start, like new. Great graduation gift, $600. (352) 628-0316, Iv msg. SUZUKI '01 Intruder VS-800. 11K ml, W/S, bags, new Avons, like new, $4500. (352) 249-9100 YAMAHA 2002, V-Star Custom 650, chromed, many extras. Excel. conditloni $3,850 OBO 726-2670 YAMAHA PW50 1999, $750 (352) 563-2763 YAMAHA YZ250 DIRTBIKE, 2000. $3000.00 some perfor- mance parts and new tires. (352) 628-6749 208-0404 SA/SU/MCRN PUBLIC NOTICE The Citrus County School Board will accept sealed bids'?t for: BID# 2005-29 REMOVAL OF EXISTING & INSTALLATION OF NEW ROOFTOP & SPLIT HVAC UNITS AT CITRUS HIGH SCHOOL O "MANDATORY SITE VISIT ON FRIDAY. APRIL 8. 2005 @ 10:00 AM" Bid specifications may be obtained on the Citrus County', School Board Webslte: Sandra "Sam" Himmel Superintendent - Citrus County School Board Published three (3) times in the Citrus County Chronicle, April 2, 3, and 4, 2005, 11 CITRUS COUNTY (FL) CHRONICLE 22C SATURDAY, APRIL 2, 2005 El E To listen and respond to ads using your WOr- call 1-866-529-4742 To respond to ads at $1.99 per min, call 1-900-226-1602 Must be 18+. Tobcoeamebr cl -6 -685 1 GET IN TOUCH WITH ME SWPF, 53, 5'9", slim, intelligent, independ- ent, happy, into arts, literature, ballroom. Wants tall, non-smoking, well-educated mature, masculine companion. Serious inquires only. "Love is the triumph of imagi- nation over intelligence." Mencken '&617942 ONE IN A MILLION Attractive DBF, 43,5'2", 118lbs, mother of 10-yr-old. Black/indian decent, in the nurs- ing profession.Looking for someone who likes movies, flea markets, camping, beach- es and cooking. ff595051. 475727 COUNTRY LOVIN' GAL SWF, 53, looking for companionship and friendship with SM, 55-68. I'm a little bit country, a little bit rock-n-roll, and a bit city Want to share life with someone special. l'558306 HOPE YOU'RE THE ONE SWF, 70, enjoys cooking, travel, swimming, beach walks. WLTM a SWCM, 75-85, N/S, social drinker, who enjoys life, travel and quiet times, for friendship, talks, good times and possible LTR. 'f581854 MOTHER OF TWO WF, 28, 5'1", 170lbs, would like to meet a loving SWM, 28-36, who would like to spend time with us. l'628205 MAKE THE CONNECTION SWF, 36, with a full figure, is in search of a man to meet, get to know and see what develops. '"527321 GIVE ME A CALL Attractive, blonde SWF, 59, 5'4", seeking meaningful relationship with a romantic SWM between 55-65, N/S, with honesty and integrity, who enjoys bowling, walks, flea markets and movies. Ocala area only. I809973 MY GUY WANTED This 55-yr-old/ blonde young-at-heart, seeks a guy of her own. Friendly, loving, and kind who is ready for a relationship. Looking for my guy, 47-57, N/S. "t589861 HEY, TALL GUYS Attractive, well-built, long-haired, Libra SWF, 50, 5'9", N/S, enjoys movies, tropical fish keeping, cats, and music. Seeking sta- ble, honest, caring SM, 45-60, 6'-6'6". Life is short. Let's enjoy some together. 'f625057 SHARE FLORIDA WITH MEI SWF, 38, 5'2", 135lbs, blue eyes, long brown hair, very outdoorsy, outgoing, loves socializ- ing, fishing, boating, fitness. Seeking SWM, 30-47, for possible relationship. '"574246 HEART OF A WOMAN Decent SBF, serious-minded, not about any games, caring, considerate, outgoing, funny, loves spending time w/the one I'm with (be a SBM, 27-40). Have similar quali- ties. We'll have a great relationship! I'114430 7 IN CATYEARS SWqF, professional, seeking someone SWQ(M, with savvy, who likes gardening, travel, friendship, dominos, board games, chess, photography, reading, writing, paint- ing, and other arts and crafts. 2'630114 LET'S GET TOGETHER SWF, 62, N/S, enjoys crocheting. Seeking WM, 60-70, N/S, who likes to cuddle, sam- ple local eateries, watch movies, and take walks. 'f630231 WOWl Super fit SWF into outdoor adventures, for- eign films, cultural events, is seeking a non- smoking, very fit, intelligent, creative SWM, 30-45, for LTR. Must love peanut butter. 'V277278 HOPELESS ROMANTIC SBF, 30, 5'9", 175lbs, mom of one, in search of SM, 30-45, race unimportant, who is affectionate, truthful, family-oriented. LTR. '513066 LOOKING FOR MR. RIGHT Easygoing WF, 26, likes going out and hav- ing fun or sitting at home watching tv. Want to meet a man, 19-31, who knows how to treat.a woman. 'f581476 PASSIONATE ABOUT LIFE WF, 34, would like to meet an honest, sin- cere, commitment-minded man, 30-45, with similar personality, for LTR. l'580595 GOOD FRIENDS SWF, 26, 5', brown/brown, with 2 children, smoker, loves classical jazz, rap, and soul music. Seeking BM, 19-35, smoker, goal- oriented, fun to be with. "'570398 SPIRITUAL, CREATIVE... joyfull SWF, 54, glorious natural redhead, N/S, values serenity and simplicity, loves nature, animals, people, and solitude. Seeking man, 45-56, N/S. Come laugh with me. "616393 SOMEONE TO LOVE FOREVER SF, 35, likes camping out, fishing, car races, amusement parks. Looking for SM, 35-45, with same interests. "T269410 PEACEFUL THOUGHTS Kind, intelligent, funny SWF, 58, marriage- minded, N/S, likes trips to the beach, nice wine, sunsets, dancing. Seeking SWM, 48- 68, N/S, who can make me feel special. IT565826 BEST OF THE BEST DWF, 42, single mother of two, enjoys the outdoors, motorcycles, Nascar, beaches, racing, seeking a SWM, 34-49, for compan- ionship. '600898 HERE I AM SWF, tall,slender, pretty, brown/brown, N/S, loves classical music, art, books, intelligent conversation, boating, cooking. Seeks rugged interesting N/S, SWM, 57-63, for companionship, possible LTR. 'P223790 LIKES COUNTRY LIFE WF, 39, 5'2", 120lbs, looking for a gentle- man, 38-48, N/S. I enjoys working out, going to movies, dining out,,hiking, garden- ing and most anything outdoors. '564449 PRETTY WOMAN SWF, 5'4", 1151bs, seeks SWM, 50-63. You and I are in great shape, fun, active, attrac- tive, sensuous, clean, N/S, healthy, kind, genuine, trustworthy, intelligent, classy, secure. Call for further details. l"956254 INDEPENDENT WOMAN Separated Italian female, 43, brown/brown, mother of three, professional, likes the out- doors, beaches, romance, affection. Seeking family-oriented man, 35-55, for building a relationship. Children welcome. 1764299 SHARING TIME SWF, 49, N/S, loves the water, watching football, and dining out. Seeking down-to- earth and funny WM, 45-60, N/S. T'619223 EASYGOING PERSONALITY Educated, positive, level-headed, secure SWF, 52,5'2", blond/blue, willing to talk things through, enjoys travel, cooking. Seeking SWM, 50-58, H/W-proportionate, with a sim- ilar outlook on life for LTR. I'469082 ARE YOU THE ONE? Single female, 50, loves fishing, outdoors. Searching for single white male, 40-60, who likes movies, dancing, quiet evenings at home. '574024 WE CAN BE TOGETHER SWF, 44, marriage-minded, smoker, home- body, would like to share evenings in with a special man, 40-55, who likes to watch movies, read, cook, go out on the town. "587120 SLEEPLESS IN FLORIDA SWF, 48, Italian, average build, serious- minded, not about games, caring, outgoing, reliable, been alone for years, looking to start all over. Seeking someone with same qualities. ft595955 LET'S ENJOY LIFE SBF, 73, enjoys dining out, movies, music, church, laughter, the outdoors, traveling, conversation and more. Seeking honest, humorous, outgoing, active SB/WM, 75, for friendship, maybe more. 1610897 MEET ME FOR COFFEE Attractive SWF, 51, easygoing, trustworthy,. stable, sense of humor. Seeks SWM, 50- 60, with same qualities. ''232518 TELL IT LIKE IT IS SWF, 5'7", big blue eyes, long blonde hair, 43, likes music, art. Seeking intelligent, open-minded, drama-free, sincere, honest, loving SWM, 30-50, with good sense of humor, for friendship first. I'404773 KISSES AND HUGS Seeking true love, not lust. No cowards, and no games please. BCF, 50, single mom, seeks honest, mature, strong, hardworking male, for a monogamous relationship and true love. 1840803 ROMANTIC LADY Attractive WiWF, 64, 5', smoker, slender, friendly, easygoing, enjoys flea markets, skat- ing, card games, movies, opera. Seeking active SWM, 55-75, to go out, share good times, for friendship, maybe more. 'l556136 I COULD BE THE ONE SF, 18, 5'3", 215lbs, student, dark complex- ion, enjoys dining, movies, listening to Usher, swimming, skating. Seeking SB/WM, 18-21. ,'588213 STOP LOOKING READ. DWF, 57, full-figured, blonde/blue, 5'3", enjoys dancing, movies, occasional dining out, cooking. Seeking S/DWM, 55-65, for dating, possible LTR. l'853666 SEEKING PLEASANT MAN WiWF, 60, would like to meet a WM, 55-70, N/S, social drinker, who likes day trips, going to movies and dining out. l'594035 SEEKING CHRISTIAN MALE SBCF, 40, 6', large build, N/D, N/S; loves kids, going to church, movies, more. Seeking SWCM, 35-60, who loves life, is very honest and marriage-minded. 0"596730 I p f. T o pay f us v icusi.i. -hca gll -8g0i-220 0 ; wM hO &arf' S ,1.2^ SEEKS ONE-WOMAN MAN SWF, young 67, 57", N/S, has car, stays out after dark, very active, romantic, misses the things a woman does for a man. Seeking WM, 66-79, who has similar interests. lr536212 GAME-FREE LTR SBF, 51, 5'4", enjoys cooking, church, yard sales, flea markets. Seeking honest, com- mitment-minded, family-oriented SBM, 50- 55, for LTR. No games, serious replies only l'427683 LIKES THE SIMPLE THINGS WF, 5'2", 125lbs, blonde/blue, would like to find a true friend. Someone who is cheerful, pleasant to be with, likes long conversa- tions, dancing, dining out and have simple fun. 52-60. IT515437 ATTRACTIVE BLONDE IN... Ocala. SWPF, 41, 5'6", 1351bs, N/S. I'm an independent, vivacious, charismatic lady who enjoys life. Honest, secure and inter- ested in finding my partner: SWM, 39-60. 1r"224494 MAYBE YOU'RE MY GUY Easygoing SWF, 57, smoker, loves the country life, country/oldies music, cooking, camping. ISO outgoing man, 57-62, who likes movies, dining, quiet times and laugh- ter, for sharing a lasting, loving relationship. "Z588873 POSITIVE ATTITUDE SWF, 51, 5'5", 130lbs, looking for fit, active SWM, 45-60, to enjoy bicycling, golf, the- ater, day trips. Let's get together '600519 SEEKING THE IMPOSSIBLE? SWF, 52, 5'1", 1351bs, brown/hazel, smok- er, slight/disability, animal/ lover, cooking out, dining out, theme/parks. Seeking SWM, 48-57, compassionate, sympathetic, affectionate, handyman/helpmate. Country life, similar interests, companionship, possi- ble LTR.Marion Country. IT522127 MY GUY WANTED This 55-yr-old/ blonde young-at-heart, seeks a guy of her own. Friendly, loving, and kind who is ready for a relationship. Looking for my guy, 47-57, N/S. l'542506 I JUST LIKE... to have fun. SWCF, 40, 2421bs, Taurus, N/S, seeks WCM, 19-59, N/S, who enjoys travel- ing and dining out. g619757 PSSST.. OVER HERE SWF, 50ish, 5'3", selective, honest, inde- ' pendent, down-to-earth long hair, tattoos, seeking friend/relationship, nice guy, monogamous, hard-working, 45-60, loves kids, animals, outdoors. Ig507930 ATTRACTIVE AND UPBEAT SWF, young 51, 5'4", 1251bs,. "566708 NEWTOTHE AREA Attractive GWF, 42, very easygoing, good sense of humor, down-to-earth, loyal, enjoys dancing, dining, movies, moonlight walks on the beach. Seeking SW/HF, 30- 46. 'Z573549 COUNTRY GIRL SEEKS BEST F SWF, 46, 5'4', 105lbs, long blonde hair, not afraid to get her hands dirty! Seeking SWM, 35-50. I245133 SEXY LADY WIWF, petite, brunette, likes cooking, dining out, dancing, music, travel, watching movies. Looking for a real, honest, nice SWM, 60-75, N/S, social drinker, for possible LTR. IT237005 VERY OPEN-MINDED Friendly female, N/S, likes movies, dining out, good conversation, seeks single man, 55-58, N/S, who has lots of love to share. l'587694 UNIQUE LTR WOMAN DWF, 44, N/S, 5'5", 1251bs.Strong morals, honest, sweet and sincere. Loves flea's and festivals, long walks, movies, plays, laugh- ter, deep conversation, casual dining, music, dancing and boating. 'ff626546 FANCY FREE DWM, 36, 5'11", blond/blue, is the athletic, outdoorsy type, and looking for the same in a great lady, to meet, get to know and see where it goes. I'976306 I HOPE WE CAN TALK SWM, 27, 5'8", fit, average build, Leo, smoker, seeks WF, 20-36, for friendship, possible LTR. 'p567898 CUDDLY BEAR SWM, 45, 6'1", 250lbs, brown/green, lives locally, smoker, enjoys Nascar, football, bowling, pool. Seeking petite WF, 25-45, smoker. i256201 POSITIVE ROMANTIC - Easygoing DWM, 57, 6', thoughtful, non- prejudiced, handsome, enjoys music, Beaches, weekend getaways, travel, more. Seeking SF, 30-55, sharp and shapely, for LTR. IT446408 SEEKING LTR Attractive WM, 64, 6', dark/blue, smoker, likes cooking, oldies, movies, dining out, RVs, ISO WF, 50-60, with average build, who likes country lifestyle and travel. '"610257 IT'S ALL GOOD SWM, 39, 170lbs, 5'9", N/S, likes biking, camping, hiking, motorcycling, shooting pool, movies, dining in/out, travel. Seeking pretty, in shape SF, 25-50, N/S, one or two kids ok, for dating/LTR? '595431 OUTGOING TAURUS SWM, 65, 5'1", 1851bs, likes golf and more. Looking for companionship with a free-spir- ited lady, 40-65, who wants to be treated like a lady. i634207 SIMPLE GUY BM, 118, likes dirtbiking and hanging out with friends. Looking for a female to go out with. '616727 HOPETO HEAR FROM U Employed SM, 25, 1351bs, 5'7", looking to meet someone who enjoys dining out, movies, the parks, togetherness, to share and explore life. '560129 WE HAVE TO MEET Single white male, 37, 6'2", 2351bs, fun-lov- ing, likes clubbing, concerts, the beach, out- doors, travel. Seeking free-spirited, down- to-earth white female, 24-34, for something long-term. '564901 SHARLEY RIDER SWM, 42, one daughter, would like to meet a woman to become friends with, maybe leading to more. 32-45. P606738 RETIRED MILITARY SWM, 65, 5'9", 1751bs, with a full head of hair and no pot belly, Is anxious to meet a lady, 25-55, N/S, social drinker ok. 'W201016 WIDOWER WM, 43, enjoys being outdoors, horseback riding, fishing, camping and more. Looking for WF, 20-45, to share fun, conversation, dining and maybe more. 1430803 LONELY Tall, big SBM, 40, 6'6", looking for a female, 35-50, to talk to. I love sports, cooking, bowling, pool. g512071 SEEKING CLASSY LADY 72, SWPM, widower, N/S, great SOH, liber- al outlook, likes classical music, theater, outdoor activities.Seeks educated lady, 55- 75, w/similar interest, for friendship or LTR. IT614390 VERY OUTGOING SBM, 29, 5'11", athletic build, Virgo, smok- er, loves to have fun. Seeking BF, 25-45, smoker, for friendship, possible romance. '633324 HALLELUJAH SBM, 30, Libra, N/S, enjoys church, movies, dining out. Seeking a God-fearing BF, 29-38, N/S, who loves church. '634527 BOWL ME OVER Fully employed, honest, respectful, under- standing SBM, 38, Pisces, smoker, enjoys dining out, movies, shopping, shooting pool, and playing cards. Seeking BF, 40+, short, cute, shapely. I'503353 SIMPLE GUY WM, 44, 5'10", 200lbs, smoker, construc- tion worker, homebody, likes flea markets and time at home. Seeking easygoing WF, 40-46, to date and see what happens. Tf628942 INTELLECTUAL SM, 6', 1981bs, likes biking, skating and long walks, Interested in meeting a fun WF, 20-50, who is interesting and smart, to get to know and enjoy life. IT428687 A LONELY GUY SWM, 34, in search of a female, 34-45, for flea markets, yard sales, fishing, horses, and much morel 1744005 BABY BLUE EYES Slim SWM, 29, 5'8", N/S, likes the conven- ience of fast food, relaxes by playing sports, seeks woman, 18-45, who wants to be treated right. 1'624851 INDEPENDENT MAN WM, 30, 6', 200lbs, dirty blond/blue, likes riding my bike, the parks, the beach, fishing, festivals, music, more. Seeking independ- ent, secure WF with similar interests. 1'619790 IS ITYOU? SM, 31, attractive, outgoing, honest, likes weightlifting, mountain climbing, hunting, fit- ness. ISO active, fit, attractive, spontaneous SF to share good times, talks, dates and more. 1595966 ROMANTIC SWPM, 63, N/S, enjoys movies, music, dancing, dining, beaches, art museums, intelligent conversation. Seeking attractive lady, N/S, 50 to early 60s, for companion- ship, perhaps more. 1'602322 READY TO START AGAIN SBM, 28, handsome, Taurus, N/S, seeks nice woman, 20-36, to date, to share won- derful times with. l'594317 VERY HANDSOME Irish-Italian male, 33, 57", 150lbs, sponta- neous, compassionate, understanding, romantic, funny and outgoing, loves quiet times and fun times. Seeking SF who enjoys the same. IP518615 ISO FUN-LOVING FEMALE SBM, 28, enjoys movies, bowling, clubs, construction work, seeking a fun-loving SF, 18-25, for dating, maybe more. '563024 ANGEL EYES Warm, charming, easygoing SBPM, 45, 6'4", 2301bs, no children. Seeking attractive SF, for dancing and romancing. IT878499 SPRING INTO SPRING W/ME Male, 23, 6'1", 200lbs, brown/brown, medi- um build, Gemini, N/S, loves outdoors, fish- ing, the ocean, and cooking. Seeking woman, 18-40. I628792 HONEST DUDE Widowed WM, 58, 5'10", Gemini, smoker, nature lover, loves traveling. Seeking WF, 48-60, for friendship, possible romance. I638041 LOOKING FOR SOMEONE... special. SWM, 56, Libra, N/S, likes to have lots of fun. Seeking a WF, 45-56, N/S, who likes to talk and enjoys good company. 1619049 LAID-BACK GUY SWM, 6'1", 200lbs, in good shape, likes flea markets, going to movies, boating, fishing. Looking for an easygoing, happy WF, 38- 45, who likes the same things. ''628452 LONELY Widowed WM, 71, looks younger, healthy, N/S, honest, understanding, good sense of humor, seeks widowed WF, 60-68, N/S, for companionship. 'f637214 A NEW BEGINNING Commitment-minded DM, 47, 6', brown/ brown, 1801bs, ISO a special lady, someone who enjoys life, the outdoors and classic rock, for sharing happiness and a lasting relation- ship. g610840 KNOWS HOWTO TREAT A LADY SWM, young 57, 5'7", 175lbs, N/S, very active, honest, educated, intelligent, finan- cially secure, farmer/rancher, enjoys dining out, outdoors, football, weekend getaways. Seeking honest SWF, 35-55, petite/slender, friendship, companionship, possible LTR. I261794 TRUE GENTLEMAN DWM, 47, 5'6", 1801bs, brown/brown, wears glasses, enjoys walks on the beach, movies, theater, dining in/out, amusement parks, flea markets, day trips. I would love for you to call me. '12262696 R U A CUDDLER? SWM, 18, 5'7", 200lbs, nice build, blond/ hazel, enjoys fishing, hanging out, horror movies, looking for SF, 18-30, who likes to cuddle, similar interests. "'284401 DON'T DELAY SWM, 61, 5'8", N/S, N/D, enjoys motorcy- cles, tennis, boating, seeks local SWF, 40- 70, N/S, for quiet times, good conversation, possible LTR. 1'254418 NO TIME FOR FOOLISHNESS Very open SBM, 24, 5'9", athletic build, seeks woman, for friendship, romance, pos- sible relationship. Let's get to know each other. 'f614026 BE MY QUEEN SBM, 21, 511", smoker, dark-complected, down-to-earth, knows how to treat a lady, seeks single woman, 18-35, smoker, to share life with. W'617920 HORSE NEEDS RIDER SM, 54, 1701bs, 5'9", ruggedly handsome, horse ranch owner, Capricorn, enjoys road trips, cook outs, riding, dancing, socializing, country life. Seeks adventurous, well- adjusted woman, 42-56, country and horse lover. P435846 I CAN LOVE YOU BETTER Retired, financially secure SWM, 73, N/S, loves fishing and flea markets. Seeking B/HF, 25-40, N/S, N/D, for companionship. W625000 Spring hopes eternal. But even hope could use a hand. 4 ."". , ~WW ~ Place your ad today. 1-866-268-5212 LOOKING FOR A WOMAN Male, 42, 5'11", 140lbs, car dealership lot manager, likes fishing and camping. Just looking for a female to share my life with. V618628 A SIMPLE MAN SWM, 42, Capricorn, 5'6", 150lbs, brown/brown, N/S, N/D, easygoing, down- to-earth, easygoing, fun, simple tastes, enjoys dining, bingo, going. out, seeks woman, 35-50, for dating. V430032 LOOKS ARE IMPORTANT Attractive DWM, 40, 6'1", 210bs, clean-cut, - established, stable, secure, easygoing, honest, ISO attractive, fit, stable SWF, 28- 38, who is kind, considerate Iand enjoys going out and doing things. ""635648 GOOD GUY HUNTING Energetic, handsome, established, hard- working, retired Electrician, that still loves to work. Romantic that enjdys shopping, danc- ing, travel, and more. Seeking fun-loving SF, 45-65, for companionship, best friends, and maybe more. '558720 GOTTO LOVE IT Nice guy, 21, 6'3", N/S, likes to dance, fish, try new things, seeks nice woman, 21-22, N/S, for friendship first, more if it develops. T'579450 NO COUCH POTATOES Active, healthy SWM, young 63, enjoys the water, boating. Seeking classy, attractive, active SWF, 50-62, N/S, for possible rela- tionship. f757364 SPECIAL LADY WANTED SWM, 48, enjoys fishing, movies, cooking, quiet times at home. Seeking SWF, 38-52, 'in shape, down-to-earth, who appreciates a good Ibyal man. Friends first. 1'412132 HOPELESS ROMANTIC WM, 45, 5'9", 200lbs, likes the outdoors, camping, playing pool, sunsets, beaches, more. Looking to fall in love with that special lady, 35-47. V'430811 A NEW BEGINNING SWM, 62, 175lbs, Libra, N/S, active, seeks WF, 50-60, active and healthy, for good times and possible LTR. V433493 DOWN-TO-EARTH One-woman man, 44, 5'10", financially secure, 1801bs, blond/blue, told handsome, honest, clean, trustworthy, sincere, N/S, enjoys mountains, art, and music. Seeking woman, 18-42, LTR, N/S. 12291999 NOT BAD-LOOKING... dark-haired DWM, 47, 5'8", 175lbs, not afraid to explore his feminine side, seeks strong, understanding woman. Enjoy music, politics, film and more. I'246822 SOULTO SOUL Open-minded, honest, BM, 45, warm, charm- ing, handsome. ISO humorous, sexy, attrac- tive lady, 37-47, for togetherness. '252328 MARRIAGE-MINDED SWM, 6', blond/blue, medical proofes- sioani, looking for a woman, 25-45, who is also marriage-minded, who loves to travel, theater and fine dining. "r262650 SEEKING SOULMATE Good-looking, respectful SWM, 60, N/S, believes life is an exciting adventure, seeks SWF, 50-65, N/S, who has a wonderful out- look on life. '511502 OUTDOORSMAN SWM, Gemini, blond/blue, slim, enjoys boating, fishing, diving, camping, flea mar- kets, motorcycle day trips, looking for a SWF, 35-45, for possible LTR. '216335 COULD IT BEYOU? SWM, a youthful 79, enjoys the outdoors, fishing, hunting, camping, boating. ISO attractive SWF, 50+, N/S, for friendship and possible LTR. I'550451 ART OF LOVE SWM, 40, 5'9", smoker, into comedy movies, likes motorcycles, spending time outside, seeks SWF, 35-45, for exploration and LTR. V'558960 TOO MUCH FUN SWM, 20, 5'9", 1381bs, N/S, brown/blue, seeks single woman, 18-24, N/S, who knows what she wants out of a relationship. Vf560749 ALL CALLS RETURNED Honest SWM, 63, 6'4", 2601bs, smoker, loves cooking, fishing, watching Nascar. Seeking SWF, 50-65, to spend some time . with. '1566775 EDUCATED, HONEST... organized SHM, 53, Pisces, N/S, social drinker, enjoys movies, books, and good conversation. Seeking WF, 50-55, N/S, for friendship, possible romance. I569478 LET'S MAKE MAGIC Caring, decent, physically appealing, SBPM, 42.1SO slim, attractive, SBF, 27-45, for possible relationship. I'480766 SIMILAR INTERESTS? SWM, 20,5'9", 140lbs, brown/blue, smoker, seeks woman, 18-24, for movies, games, sports, and more. '584882 KEEPING IT REAL SBM, 23, 5'11", dark brown eyes, slim build, Capricorn, smoker, seeks woman, 20-35, for friendship. V'589204 COURTSHIP Outgoing, healthy, handsome PM, 40, somewhat athletic, seeks attractive, intelli- gent, fun, light-hearted female, 19-45, into cuddling, television, and more. 'f584987 WORTH THE CALL! SBM, 18, N/S, enjoys dining, movies, shop- ping, shooting pool, playing cards. Seeking short, cute, shapely, outgoing, understand- ing SBF, 18-30, for friendship or more. ,w587447 FUN-LOVING GUY WM, 21, likes going out with friends, hang- ing out and having fun. Looking for SWF, 18-25, with similar interests. T"594698 HOPE IT'S YOU Hard-working SBM, 41, 145lbs, enjoys chil- dren, amusement parks, woodworking, weightiiffing, running, fine dining and good movies. Seeking a nice, affectionate, roman- tic lady to.treat like a queen. 'f607942 NATURE AND ME SWM, 42, 6'1", N/S, gentleman, homeown- er, enjoys time spent in the great outdoors, seeks attractive, honest SWF, 35-50, N/S, for dating, possible LTR. 'T226878 OH LONESOME ME Clean-cut, good-looking WM, 67, desires to meet older, attractive woman for the pur- pose of companionship. Tired of being alone? Let's talk. Ann, please call back with phone number. "'204397 COUNTRY LIFE SWM, young-looking 44, 5'9", 185lbs, very short hair, mustache, goatee, muscular build, N/S, heavy equipment operator, financially stable, seeks WF, 30-50, kids? "f245245 HAPPY NEWYEARI SWM, 72, 6'1", N/S, 200lbs, enjoys the out- doors, cruises, travel, golfing, cooking. Seeking a SWF, 50-70, N/S, slim-average build, who loves doing and sharing things together. '548950 ARE YOU OUT THERE? Simple, honest SCM, 62, seeks petite-medi- um build SF with a kind heart and good nature, to share smiles, special times, friend- ship and possible lasting relationship. l'556308 NEWPORT RICHY SWM, 62, 5'8",1601bs, retired from Boston, enjoys dancing, bowling and life in general, seeks honest, sincere SWF, slim, 60-65, for dining, dancing, and friendship. 'f396755 FOR THE LONG RUN GWM, 41, intelligent, fit, secure, in search of a man, 30-45, to be together for the res of our lives. @T636990 -pald blocks of time make It fast and easy. GUIDELINES: DATELINE PERSONALS ads are for adults 18 or over seeking monogamous relationships. To ensure your safety, carefully screen all responses. First ABBREVIATIONS S For CUStomer service, call meetings should occur In a public place. Abbreviations are permitted only to Indicate gender preference, race, and religion. We suggest your ad contain a self-descrip- lion, age range, lifestyle and avocations. Ads and voice messages containing explicit sexual language will not be accepted. This publication reserves the right to revise M Male 1-6 1 7 -4 5 0 -8 7 7 3 -or reply to any DATELINE ad. The advertiser assumes complete liability for the content and all replies to any advertisement or recorded message and for any claims D Divorced * To purchase more than your free 30 words, or e-mail: citruscounty made against this publication and Its agents as a resultthereof. The advertiser agrees to indemnify and hold this publication, its employees and its agents harmless from F Female ol purchase more than your free 30 word costs, expenses (including reasonable attorney fees), liabilities and damages resulting from or caused by the publication or H Hispanic at $2.00 per word please call 1-800-234-5120 @ placepersonal.com recording placed by the advertiser or any rely to any such advertisement. By using DATELINE, the advertiser agrees not to C Christian leave his/her phone number, last name or a dress In his/her voice greeting. Not all boxes contain a voice greeting. = W LTR Long-term Relationship W White A Asian S Single J Jewish P Professional N/D Non-Drinker N/S Non-smoker DA _ . SATURDAY, APRIL 2, 2005 23C RTIC US COUNTY (FL E CITRUs CouNTY (FL) CHRONICLE 24C SATURDAY. APRIL 2. 2005 Find Out - I^^^^l 2005 CHRYSLER PT CRUISER YOU PAY ONLY 2005 DODGE RAM QUAD CAB HEMI Amb sh sAmh Z m l.Hl'wi;L';o!I.KUIc-0.JI-JJJpj.Bryst.lQ iied re-IJ. li!1.-aM 00 DODGE 02 DODGE CONVERSION VAN INTREPID #7741T #7533P $9,888' *$0,488' 03 DODGE RAM 05 CHRYSLER 05 DODGE RAM 04 DODGE RAM 2500 DIESEL CROSSFIRE 3500 HEMI 3500 LARAMIE #B50083A #J050192A #7791P With Nav. #7689P 2z1,888t $28,588 30,988' 38,888 tPrices and payments exclude tax, tag, title and dealer fee of 299.50 and includes all factory incentives, rebates and customer loyalty. Dealer Incentives subject to change. See Dealer for Details. Photos for Illustration purposes only. CHRYSLER DODGE JEEP C--OILER Ig Ml.OMC *I 352*563.2277 1005 S. Suncoast Blvd., Homosassa AT CHEVROLET CAVALIER.O 2005 CHEVROLET CAVALIER OI, Stk#25Q18 ~ 2005 CHEVROLET COLORADO ____ Lease toN A Stk# N5169XX 05 CHI for i 1per month 'ou Pay *fl Only m,9S M,* Residual $5.505.50 Lease Is for 48 months. Selling Pricestl $15,074. $1,953 due at signing which Includes FL fees, 1-' payment, security deposit & dealer fee (299.50). 1 '000 1i miles free per year. 200 per mile over. Sales tax not Included. All rebates, dealer Incentives & lease loyalty '. Included In payment. W.A.C. ; VY SILVERADO CHEVROLET BLAZER 2 DOOR You Pay y Only yr Residual $10,982.40 Lease is for 48 months. Selling Price Is $20,488. $1,080.12 due at signing which Includes FL fees, 1st payment, security deposit & dealer fee (299.50). 12,000 miles free per year. 200 per mile over. Sales tax not Included. All rebates, dealer Incentives & lease loyalty Included In payment. W.A.C. 100 DAY/3,000 MILE WARRANTY Kelley Blue Book Report Buy W,.j..jithjonjdn i0jEerjCysBlQul~~n~ified ig..mind S 01 CHEVROLET CAVALIER #JO50387B $7888' 03 CHEVY TRACKER #7858P 13 9888' 04 JEEllP LIBERTY SPORT #B50272A $ 18,488' 03 DODGE RAM 04 JEEP 04 CHEVROLET 02 CHEVY 1500 HEMI UNUMIrED 4X4 AVALANCHE CORVETIE CONV. #7778P #7458A #7554P #7792P 22,888' $24,488' t 25,488' t 38,488' tPrices and payments exclude tax, tag, title and dealer fee (299.50 )and Includes all factory Incentives, rebates and customer loyalty. Dealer Incentives subject to change. See Dealer for Details. Photos for Illustration purposes only. CHEVROLET. .: 352.795.1515 1035 S. Suncoast Blvd., Homosassa a ** 1 *- < . 1."' ; h ' NNA4 F'5 t(?Z v Contact Us | Permissions | Preferences | Technical Aspects | Statistics | Internal | Privacy Policy © 2004 - 2010 University of Florida George A. Smathers Libraries.All rights reserved. Acceptable Use, Copyright, and Disclaimer Statement Last updated October 10, 2010 - - mvs
http://ufdc.ufl.edu/UF00028315/00092
CC-MAIN-2015-18
en
refinedweb
Eclipse Community Forums - RDF feed Eclipse Community Forums HelloWorldSWT tutorial <![CDATA[Yes, I'm new to Java and Eclipse (an incredible tool!). I walked through the tutorial to build HelloWorld! and it worked. Then I tried walking through the tutorial for HelloWorldSWT. When I had problems, I deleted the HelloWorldSWT project and started over, I let the tutorial "do it for me" as much as possible. But it still doesn't work. I've tried the Organize Imports and can see no change. Where would I look to see the changes from this command? Here's the code for the HelloWorldSWT.java: public class HelloWorldSWT { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Display display = new Display(); Shell shell = new Shell(display); shell.setText("Hello world!"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } Here's the errors after I compile: Exception in thread "main" java.lang.Error: Unresolved compilation problems: Display cannot be resolved to a type Display cannot be resolved to a type Shell cannot be resolved to a type Shell cannot be resolved to a type at HelloWorldSWT.main(HelloWorldSWT.java:9) The tutorial says: You will get compile errors. Right click in the Java editor and select Source > Organize Imports, then save your changes. I've done this. Many times. I've tried the ctrl+shift+o and I still get the compile errors. Why does this not work? I really appreciate any help you can give me. Thank you! ]]> Jason Clark 2012-09-03T01:31:44-00:00 Re: HelloWorldSWT tutorial <![CDATA[the same thing happened to me this is how I fixed it. go back to the import SWT part of the tutorial and make sure you import org.eclipse.swt.{platform}.{os}.{arch} and not the org.eclipse.swt.like mine would be org.eclipse.swt.win32.win32.x86 then continue on with the rest of the tutorial. when you click Source > Organize Imports in the java editor these two lines of code should appear import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; at the top automatically and the compile errors should be resolved.From there just run your application. Hope this helps !!!! ]]> Glen Zanabe 2012-09-05T15:16:50-00:00 Re: HelloWorldSWT tutorial <![CDATA[I am running 64 bit operating system windows 7 but I had to add org.eclipse.swt.win32.32x86 to make my swt application work. If I had not then the 2 import lines at the top of my project would not display when organizing imports. Do you have an idea of why that is?]]> luis villegas 2012-12-15T01:53:42-00:00 Re: HelloWorldSWT tutorial <![CDATA[Glen just find a 32 bit version of eclipse. Doesn't matter if it is indigo or MAC version if you are using MAC. This is what I have also. The only missing code is import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; THe is the reason we are getting the error: instances of this class is responsible for managing the connection between SWT. ]]> Andrew Geriane 2013-02-21T04:39:29-00:00 Re: HelloWorldSWT tutorial <![CDATA[hi i cant seem to find org.eclipse.swt.{platform}.{os}.{arch} i can only find this org.eclipse.swt 3.0.8. pls help ]]> Aditya Iyer 2013-04-23T12:50:56-00:00 Re: HelloWorldSWT tutorial <![CDATA[I think I have been through this. Have a look: Good luck! ]]> Baruch Youssin 2013-04-23T18:23:56-00:00 Re: HelloWorldSWT tutorial <![CDATA[Thanks, works for me.]]> Mario Ramirez Velasquez 2015-02-25T21:28:44-00:00 Re: HelloWorldSWT tutorial <![CDATA[Thanks, works for me.]]> Mario Ramirez Velasquez 2015-03-05T15:40:28-00:00
http://www.eclipse.org/forums/feed.php?mode=m&th=372232&basic=1
CC-MAIN-2015-18
en
refinedweb
[gutsy] gtkspell segfaults when trying to set the language on gtk.TextView Bug Description Binary package hint: gramps susan@susan:~$ gramps ***MEMORY- Segmentation fault (core dumped) susan@susan:~$ see bug 116870 glibc By the way, my python was the newest version available on 15 June. It's segfaulting in aspell like so: (gdb) bt #0 0xb67ed76d in delete_ #1 0xb6801260 in ?? () from /usr/lib/ #2 0x756d2e42 in ?? () #3 0xb6801d36 in ?? () from /usr/lib/ #4 0xb6801d30 in ?? () from /usr/lib/ #5 0x08854bcc in ?? () #6 0x00000000 in ?? () This is most likely to be the gtkspell problem. If you can reproduce the gramps crash, try running the code below in terminal, without gramps. It should not crash if there's no bug. If this crashes then it's a gtkspell bug. $ python >>> import gtk >>> import gtkspell >>> import locale >>> lang = locale. >>> if lang == None: ... print "lang is None" ... success = False ... else: ... gtkspell. ... success = True ... >>> success True Sorry Alex, I'm getting that script failing in several way, lots of syntax trouble. Can you re-write it, test it on your system, and load it as an attachment? Thanks Duncan, It was meant to be typed in, it is only a few lines. If you want to cut/paste, here it is: 1. First start python 2. Run the stuff below import gtk import gtkspell import locale lang = locale. if lang == None: print "lang is None" else: gtkspell. Thanks Alex, how's this: bad news? duncan@ubuntu:~$ python Python 2.5.1 (r251:54863, May 27 2007, 15:55:14) [GCC 4.1.3 20070518 (prerelease) (Ubuntu 4.1.2-8ubuntu1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk >>> import gtkspell >>> import locale >>> lang = locale. >>> if lang == None: print "lang is None" ... else: gtkspell. ... Segmentation fault (core dumped) duncan@ubuntu:~$ ... and the script crashed python2.5 which kicked apport into life and gave us bug report 122477, anything useful there? No. It's not bad news for gramps. It clearly demonstrates the issue with "gtkspell" python module. Guessing from my past experience with this on Debian, it is not because of the python bindings but rather in gtkspell itself. However, I am not 100% sure, it's just a guess. just a standard crash report -- I didn't run the script mentioned above. I get the same Segmentation fault as Duncan. If Alex is right, and this is a gtkspell bug, where do we report it? Once it is reported, someone can link this bug to the gtkspell bug. I don't think there's an "if" here. The python script is pretty short, and the only thing that could have crashed it is "gtkspell" python module. This can be either a problem with python bindings for gtkspell: package python- Or this can be a gtkspell library problem: package libgtkspell0 The sensible thing would be to re-assign this bug report to python- I think the problem might be with aspell. #strace gramps ... access( open("/ access( open("/ access( open("/ fstat64(15, {st_mode= mmap2(NULL, 4096, PROT_READ| read(15, "# Standard keyboard data file\n\nq"..., 4096) = 100 read(15, "", 4096) = 0 close(15) = 0 munmap(0xb6c16000, 4096) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Process 31893 detached I don't know if this help... Can you try this script instead of gramps? Just run $ strace python test.py with the attached test.py file. This script has nothing to do with gramps and should crash just the same. Just to show that this is not a gramps issue and should be dealt with by gtkspell folks. Here's the output on mu machine, just updated. For some reason I couldn't get it written to file, so I've lost some of the start of the output. Looks like same crash to me. Can we please drop the gramps thing now and work with the script? This issue just happened to cause gramps to crash too, but this is not gramps problem. The script demonstrates it clearly :-) We need someone from MOTU to take on either getting this fixed or re-packaging the current version unhooked from gtkspell. I don't think we should wait much longer if GRAMPS is to make it into Gutsy. Anyone able to take this on? Opened a bug at the GtkSpell page on SourceForge: http:// The problem is how this function is called. The GtkTextView is instanciated temporarely and is destroyed after the construction of the GtkSpell object, which triggers a destruction of the relevant parts needed by set_language. I personally would consider the call method wrong, but well. A solution is to bump the refcnt of the textview in the GtkExtra python module (found in gnome-python- So an immediate fix would be to move the gtk.TextView() into a temporary variable instead. With that it works even with the version of python-gtkspell currently in the archives. gtkspell is buggy in terms that no way of gathering the information "is a spell checker available for this language" is exposed, gnome-python-extras is buggy because it does not increase the refcounter of the textview and gramps was buggy because it tried to acquire the information in a bogus way. To fix the problem for real libgtkspell should be using a weak reference to the GtkTextView object, so that when the GtkTextView is destroyed GtkSpell is notified and removes the reference. gramps (2.2.8-1ubuntu2) gutsy; urgency=low [ Philipp Kern ] * Work around a bug in gnome-python-extras which caused a deallocation of the TextView in the check if a spell checker is present. (LP: #120569) [ Scott Kitterman ] * Corrected XSBC-Original- * Moved debhelper from Build-Depends-Indep to Build-Depends to satisfy lintian * Bumped standards version to 3.7.2 without further change -- Scott Kitterman <email address hidden> Tue, 25 Sep 2007 12:49:53 -0400 that's not a gnome-python-extras bug So I've worked around the issue in Gramps, but the fundamental problem remains. I'd appreciate it if someone who understands Gnome would figure out which is the correct upstream to point fingers at. It's like I said in comment 25. libgtkspell should be fixed. It's rather simple to fix using g_object_weak_ref API, but I don't have time. I am not an expert, but I do think this is a gnome-python-extras bug. A python object should live as long as there are any references held to it. In this case the Spell object still holds a reference to the TextView object. So the Spell object should increase the reference counter on the TextView. The "C" GtkSpell itself is not designed to live without a corresponding TextView. (gtkspell_detach even destroys the GtkSpell "C" object) One could argue about the approach used in gtkspell but as of now most of the functions depend on the view. The change suggested by Gustavo Carneiro would make gtkspell more robust against such situations, but I think it's a bigger change. In the test script above, if done correctly, the TextView would be destroyed automatically, when the GtkSpell object is destroyed. After the last line there is no reference hold to the GtkSpell object anymore and the GC would destroy them both. Philipp Kern: I would be interested in your code that tried to fix the issue in gnome-python- Is this bug related to bug #261596? Why is this bug still stuck on 'Fix released' and not actually committed? Thanks for the report Susan Cragin ,:// Sadly, I can only confirm that it is fixed in oneiric, since that is what I have now and I just checked. But it appears to be fixed. I did use gramps last year and had no trouble with it, so I assume it has been fixed for some time. I'd say safe to say fixed in Natty. I should say, I know that gramps works. If the fix worked by removing gtk-spell, then gtk-spell could still have problems, and I wouldn't know about them. But I suspect it's fixed because I have other programs that use gtk-spell and have had no problems. I also saw the following information in the terminal I started gramps from: /usr/share/ gramps/ Spell.py: 53: GtkWarning: gtk_text_ view_get_ buffer: assertion `GTK_IS_TEXT_VIEW (text_view)' failed Spell(gtk. TextView( )).set_ language( lang) gramps/ Spell.py: 53: GtkWarning: gtk_text_ buffer_ get_bounds: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed Spell(gtk. TextView( )).set_ language( lang) gtkspell. /usr/share/ gtkspell.
https://bugs.launchpad.net/ubuntu/+source/gtkspell/+bug/120569
CC-MAIN-2015-18
en
refinedweb
As mentioned in the first post in this series, I am launching a series of intensive WP7 tutorials. To get started I thought it was important to revisit this earlier post and make sure all the code is up to date. [ Note, the intent is not to suggest that writing for the phone is the same as writing for the PC; they are very different platforms (see, for example, my discussion of TransMedia) but only to demonstrate that many of the coding skills you have as a Silverlight programmer will carry over, making the learning curve a good bit flatter ] On Thursday, August 14, John Papa will air an episode of Silverlight TV in which we examine the premise that Silverlight Programmers are instant WP7 programmers. To demonstrate this, I created two applications side by side: a traditional Silverlight (Web) application and a WP7 application using the same code. (This refresh article brings the code up to the Beta release). I’ll go through this step by step here, so that you can see the details that go> Our next step is to create a form page in each application. Create a new Silverlight Child Window in the web application and a new Windows Phone Portrait Page in the phone version, and name each Form 1.We want to add a grid to each. In the case of the child window in the web version, within LayoutRoot, replacing the row definitions already in place;. (Take care that the code goes inside the inner grid in the Phone application) the code you just added, to provide the remaining prompts. <TextBlock Text="Last Name" Grid. <TextBox x: <TextBlock Text="Address" Grid. <TextBox x: <TextBlock Text="City" Grid. <TextBox x: <TextBlock Text="State, Zip" Grid. <StackPanel Grid. <TextBox x: <TextBox x: </StackPanel> <TextBlock Text="Email" Grid. <TextBox x: Visual Studio creates the child window with OK and Cancel buttons, please remove them. The DataSource To have data to bind to, we’ll create a Customer class and give it a static method that will provide ) { FirstName = firstName; LastName = lastName; Street = street; City = city; State = state; Zip = zip; phone, change Foreground from Navy to White. Changing Pages The event handler for the Web application will instantiate the child window and “show it." Here is the complete MainPage.cs file, using System.Windows; namespace SL_YouMayAlreadyBe { public partial class MainPage { public MainPage() { InitializeComponent(); ChangePage.Click += ChangePageClick; } void ChangePageClick(object sender, RoutedEventArgs e) { var wind = new Form1(); wind.VerticalAlignment = VerticalAlignment.Top; wind.Margin = new Thickness(0, 50, 0, 0); wind.Show(); } } } The event handler for switching to the child window in the WP7 application can either set the RootVisual (declared in App.xaml.cs) or it can invoke the static Navigate method of the NavigationService using System; using System.Windows; namespace WP7YouMayAlreadyBe { public partial class MainPage { public MainPage() { InitializeComponent(); ChangePage.Click += ChangePageClick; } void ChangePageClick(object sender, RoutedEventArgs e) { throw new NotImplementedException(); } } } or if you prefer, the body of ChangePageClick can be changed. My relatives every time say that I am killing my time here at net, but I know I am getting familiarity everyday by reading thes good articles. Nice Post! Thx 4 the info Pingback: You Are Already a Windows Phone Developer : JohnPapa.net Pingback: Developer Resources « Phone 7
http://jesseliberty.com/2010/08/06/you-may-already-be-a-windows-phone-7-programmer-reloaded/
CC-MAIN-2015-18
en
refinedweb
Introduction to HTML+TIME This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9. HTML+TIME (Timed Interactive Multimedia Extensions), first released in Microsoft Internet Explorer 5, create multimedia-rich, interactive presentations, easily and with little or no scripting. HTML+TIME 2.0 is based on the HTML+SMIL language profile in the Synchronized Multimedia Integration Language (SMIL) 2.0 working draft. SMIL 2.0 is the W3C successor to SMIL 1.0. HTML+TIME 2.0 is the successor to HTML+TIME 1.0. This article covers the following topics: - Benefits - HTML+TIME Behaviors and Elements - HTML+TIME Timing Model - Authoring HTML+TIME - Exclusive, Sequential and Parallel Time Container Elements - Compatibility - HTML+TIME Implementation Notes - HTML+TIME Newsgroup - Related Topics Benefits The following section contains information about the benefits of using HTML+TIME. Dynamic Content You can use HTML+TIME to add dynamic, interactive content to your Web pages. For example, you can create slide-show-style Web presentations with synchronized text, images, audio, video, and streaming media. You can create these presentations so that they are timed, interactive, or a combination of both. Ease of Use To add timing to an HTML document, all you have to do is add some new attributes to existing HTML elements. Thus, you can leverage your existing HTML knowledge when you add timing to your page. The HTML+TIME attributes specify when an element appears on a page, how long it remains displayed, and how the surrounding HTML elements are affected. In addition to the attributes, some new XML-based elements have been created to simplify incorporating media into Web pages. For example, you can use the excl element to specify when a sound file should start playing, when it should stop, and how many times it should repeat. HTML elements can be grouped into hierarchical relationships to allow for easy manipulation of multiple HTML elements at once. Grouping is also used to specify whether HTML elements appear and disappear sequentially on the page, or use independent timing. Element grouping is specified either by using the t:PAR, t:SEQ, or t:EXCL elements in a document, or by setting the TIMECONTAINER attribute. Scripting Support With HTML+TIME, you can use persistent XML elements and attributes to add timing to your HTML page. This means you don't have to know how to program with scripting languages to make your pages more dynamic. However, for people who already know how to use scripting languages, HTML+TIME supports a complete object model that extends the existing DHTML Object Model. Thus, you can use HTML+TIME properties, methods, and events to add even more interactive features to your Web pages. HTML+TIME Behaviors and Elements HTML+TIME is implemented as a DHTML default behavior, one of the powerful new features introduced in Internet Explorer 5. For more information about behaviors, see the Related Topics section of this document. You can use all the HTML+TIME attributes listed in the reference pages with any timed HTML element. For a list of HTML elements that can be timed, see the Applies To section of the time and time2 behavior reference pages. Internet Explorer 5.5 Update The HTML+TIME 2.0 Reference lists the features implemented by the time2 behavior and supported in Internet Explorer 5.5 and later. The HTML+TIME 1.0 Reference lists the features implemented by the time behavior and supported in Internet Explorer 5 and later. HTML+TIME Timing Model Most traditional animation runtime systems use either rigid timelines or pure, event-based relationships to model time. The rigid timeline model makes it more difficult to create interactive content. In this environment, you must add "jumps" to another pseudo-timeline to introduce interactive elements. In event-based models, interaction is easier to define, but it is more difficult to create timeline behaviors, such as sequences and precise synchronization of media elements. HTML+TIME unifies these two timing models, taking the best of each and simplifying the process of authoring timed, interactive content. In the HTML+TIME model, you can use timeline attributes to describe static, or determinate, timeline relationships. This makes it easy to place elements in time and to ensure synchronization among media elements. You can author interactive content using a simple variant on the timeline attributes, where the begin and/or end times are tied to an event. Therefore, the actual begin and/or end values are indeterminate when you author the document. In reality, these times are event-based, but they can be defined as though they had traditional timing. When the associated event occurs, such as a user clicking a button, the indeterminate timing relationship is defined by the time at which the event occurs. At this point, the element is added into the running timeline as though it had been defined from the beginning. This unified model makes it easy to define an animation that has tightly synchronized media, and to add a number of interactive elements that start when the user does something. The interactive elements can have a duration and repeat count just like other timed elements, even though they begin in response to an event. You can apply a single set of tools for timing and synchronization to any element. This makes the model easier to learn and less complicated, without sacrificing any flexibility. HTML+TIME defines a schedule, or timeline, for all the affected elements to follow. The document timeline starts as soon as the page loads and continues to progress as long as the browser renders the page. If timing is applied to media elements, such as audio or video files, you can specify that the timeline will be tightly synchronized with other elements or the entire document. By default, media files that are not ready to play when scheduled will slip along the timeline and begin playing as soon as they become available. You can pause and resume the document timeline using methods from the object model. HTML elements behave differently when you add time attributes, depending on the HTML element type. Although other categories might exist for HTML elements, HTML+TIME primarily distinguishes between content and style elements. Content elements include all elements that describe content to be displayed on the page, including the media elements introduced with HTML+TIME (t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, and t:VIDEO. Commonly used content elements include p, div, span, and table-related elements. Adding HTML+TIME attributes to a content element causes the element to appear and disappear over time. Style elements describe the style to be applied to an element. Commonly used style elements include b, i, and em. Adding HTML+TIME attributes to a style element causes the style to be applied to and removed from the element over time. For more information about style elements, see the HTML+TIME Implementation Notes section of this document. Authoring HTML+TIME Use the following steps to add timing to an HTML element. - Create an XML Namespace - Reference the time2 Behavior - Specify Beginning and Ending Times - Include an Action Create an XML Namespace When using any of the HTML+TIME elements, such as the t:EXCL, t:SEQ or t:PAR elements, you must declare the XML namespace t: in the html tag, as shown in the following line of code: To use the namespace, preface HTML+TIME elements with t:. This string identifies the HTML+TIME elements as qualified XML namespace extensions. To establish t: as the namespace, import the time2 behavior into the namespace as shown in the following line of code: Reference the time2 Behavior You must associate the element with the time2 behavior, so that the element is affected by the document timeline. To accomplish this, you can add the inline STYLE attribute to the HTML element as follows: However, you might find it easier to associate an element with the time2 behavior by creating a Cascading Style Sheets (CSS) class attribute, as shown in the following sample: Specify Beginning and Ending Times You must specify when the HTML element should appear and for how long. This is accomplished by including the BEGIN and END attributes on the element. You can use the DUR attribute instead of END to specify an ending time relative to the element's BEGIN time. However, there is no functional difference between END and DUR, so you can use either one. If you do not set a BEGIN, END, or DUR time, the default value causes an element to begin displaying when the page loads, and the element remains displayed indefinitely. Therefore, the element appears static, as though you have not set any timing on that element. The following sample shows lines of text that appear every two seconds and remain displayed for five seconds. <HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY> <P>This text appears right away. More lines to follow...</P> <P CLASS="time" BEGIN="2" DUR="5" >This appears after 2 seconds.</P> <P CLASS="time" BEGIN="4" DUR="5">This appears after 4 seconds.</P> <P CLASS="time" BEGIN="6" DUR="5">This appears after 6 seconds.</P> <P>This is the last line.</P> </BODY> </HTML> Code example: Include an Action Although including an action is optional, you might want to use the TIMEACTION attribute to specify the action that is taken while the element is active on the timeline. In the DHTML Object model, two properties are available on the style object for turning on and off the display of an element. HTML+TIME changes the value of these properties over time. With DHTML, you can set the visibility property to hidden or visible. This property reserves space in the layout of the rendered document, as though the element is always visible. Therefore, the document does not reflow its contents as elements are dynamically displayed or hidden. The default behavior for using HTML+TIME on a content element is TIMEACTION="visibility". In contrast, when the DHTML display attribute is set to none it does not reserve space in the rendered document. Therefore, the document reflows every time the value of the display attribute changes. To reflow the document using HTML+TIME, set the TIMEACTION attribute to display. As an alternative to displaying and hiding an element, you can set the TIMEACTION attribute to style to make an inline style active on an element. If you use this option, any style property included on the element using the STYLE attribute is applied only while the element is active on the timeline; otherwise, the inline style is ignored. As of Internet Explorer 5.5, you can also modify the style of an element by specifying one or more class names for the TIMEACTION attribute. When using a time container, you can set the TIMEACTION attribute to none so that it performs no action. When this attribute is set to none, only the child elements of the time container are visually affected while the timeline is active. If an element supports a Boolean on property, you can use a TIMEACTION value of onOff to make the on property true while the timeline is active on the element, or false otherwise. The following sample shows lines of text that appear every two seconds and remain displayed for five seconds. This is similar to the previous sample, but in this case the document reflows, as necessary, because the TIMEACTION attribute is set to display. The TIMEACTION attribute is set to style on the heading. <HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY> <H1 CLASS="time" BEGIN="0" DUR="11" TIMEACTION="style" STYLE="Color:Red;">timeAction</H1> <P>This text appears right away. More lines to follow...</P> <P CLASS="time" BEGIN="2" DUR="5" TIMEACTION="display">This appears after 2 seconds.</P> <P CLASS="time" BEGIN="4" DUR="5" TIMEACTION="display">This appears after 4 seconds.</P> <P CLASS="time" BEGIN="6" DUR="5" TIMEACTION="display">This appears after 6 seconds.</P> <P>This is the last line.</P> </BODY> </HTML> Code example: Exclusive, Sequential and Parallel Time Container Elements You can use HTML+TIME to specify timing for individual elements displayed on the page. You can also use it to create a timeline that groups elements together and specifies their timing relative to each element's predecessor in the timeline. The following example uses the TIMECONTAINER attribute set to excl to create a time container that allows only one element to play at a time. <HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY> <DIV CLASS="time" TIMECONTAINER="excl"> <DIV CLASS="time" BEGIN="0" DUR="2" TIMEACTION="display">First line of text.</DIV> <DIV CLASS="time" BEGIN="2" DUR="2" TIMEACTION="display">Second line of text.</DIV> <DIV CLASS="time" BEGIN="4" DUR="2" TIMEACTION="display">Third line of text.</DIV> <DIV CLASS="time" BEGIN="6" TIMEACTION="display">Fourth line of text.</DIV> </DIV> </BODY> </HTML> Code example: You can easily create slide-show-style presentations using timing sequences to display a series of images, one after the other, along with synchronized text. The following example uses the TIMECONTAINER attribute to create a sequential time container. <HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY> <DIV CLASS="time" TIMECONTAINER="seq"> <DIV CLASS="time" DUR="2" TIMEACTION="display">First line of text.</DIV> <DIV CLASS="time" DUR="2" TIMEACTION="display">Second line of text.</DIV> <DIV CLASS="time" DUR="2" TIMEACTION="display">Third line of text.</DIV> <DIV CLASS="time" TIMEACTION="display">Fourth line of text.</DIV> </DIV> </BODY> </HTML> Code example: You must declare the duration of each element in the sequence. Since the duration is omitted on the last element, it remains displayed indefinitely. Grouping the elements in a sequence makes it easy to manipulate the entire group of elements at once, rather than individually. For example, you can add the BEGIN attribute to the sequence time container to make the entire sequence wait before it begins playing. If you want to group elements without displaying them in a sequence, you can create a parallel timeline by setting the TIMECONTAINER attribute to par on the time container element. In contrast to a sequence, you can use parallel timelines to display and hide elements without any implicit dependencies on other elements. This allows more than one element to be active on the timeline, and you can have as few or as many elements active on the timeline as you want—there is no minimum or maximum requirement. The following sample shows how a parallel timeline is used for repeating a group of elements with overlapping timelines. <HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY> <DIV CLASS="time" REPEATCOUNT="5" DUR="10" TIMECONTAINER="par"> <DIV CLASS="time" BEGIN="0" DUR="4">First line of text.</DIV> <DIV CLASS="time" BEGIN="2" DUR="4">Second line of text.</DIV> <DIV CLASS="time" BEGIN="4" DUR="4">Third line of text.</DIV> <DIV CLASS="time" BEGIN="6" DUR="4">Fourth line of text.</DIV> </DIV> </BODY> </HTML> Code example: Instead of using the TIMECONTAINER attribute to group HTML elements on a timeline, you can use the t:PAR or t:SEQ elements. For example, in the previous sample that shows a sequence, you could have used the t:SEQ element instead of the div to yield the same results. The following example declares the XML namespace t: in the html tag and imports the time2 behavior into that namespace because it uses the t:SEQ custom element. <HTML XMLNS: <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> <?IMPORT namespace="t" implementation="#default#time2"> </HEAD> <BODY> <t:SEQ> <DIV CLASS="time" DUR="2">First line of text.</DIV> <DIV CLASS="time" DUR="2">Second line of text.</DIV> <DIV CLASS="time" DUR="2">Third line of text.</DIV> <DIV CLASS="time">Fourth line of text.</DIV> </t:SEQ> </BODY> </HTML> Code example: Compatibility HTML+TIME features are available as of Internet Explorer 5 and are not supported in earlier browser versions. If an earlier version of Internet Explorer or a non-Internet Explorer browser encounters a reference to a behavior, the style is ignored, and the element is rendered as normal on the page. However, scripting errors might occur in cases where the behavior being used exposes properties, methods, or events. To address these errors, you need to use some version-checking script. Internet Explorer 5.5 Update All of the features of the time behavior are still available in Internet Explorer 5.5. However, we strongly recommend that you begin using the time2 behavior, which implements the HTML+SMIL language profile as defined in the working draft of the SMIL 2.0 specification. HTML+TIME Implementation Notes The following list contains information about the initial version of HTML+TIME in Internet Explorer 5, including differences between this implementation and the W3C submission. - Style elements, such as b, i, and em, are not fully supported in the initial version of HTML+TIME. Instead, style elements are controlled in the same way as content elements: by displaying and hiding their contents. However, you can set the timing on inline styles associated with an element. For information about how to apply timing to an element's inline style, see the TIMEACTION attribute. - When adding timing to an image, use the new HTML+TIME t:IMG element instead of the HTML img element. HTML+TIME Newsgroup The HTML+TIME newsgroup is a forum for users to share ideas, ask questions, and relay comments about HTML+TIME. The newsgroup is intended for user-to-user support; however, Microsoft does monitor it for product-feedback purposes. To access the newsgroup, use the following information with your favorite newsgroup reader. - News server: msnews.microsoft.com - Newsgroup name: microsoft.public.windows.inetexplorer.ie5.programming.html+time
https://technet.microsoft.com/en-us/library/ms533099(d=printer,v=vs.85).aspx
CC-MAIN-2015-18
en
refinedweb
I always had interest in security issues, specially about application use security. I believe user authentication and authorization is one of the main thoughts in application development (even if not the first to be coded). Despite all my interest, just recently, I got the time to study the resources and advantages .NET offers to this matter. And there are many things I found. Since MS launched Windows 2000 family, there is the Active Directory (AD). Whoever has studied it is aware this is based on a less used Internet protocol called LDAP. Its job is, basically, manage users, groups and other security stuff on a domain in a simple way. The greater advantage is interoperability, since one can replace AD for another LDAP server given some work. For developers, .NET comes with a full namespace to ease working with both AD and LDAP, System.DirectoryServices, which includes LDAP v3. On the following samples, I will use a fake domain called AD1. System.DirectoryServices private static string domain = "AD1"; public static bool LogonValid(string userName, string password) { DirectoryEntry de = new DirectoryEntry(null, domain + "\\" + userName, password); try { object o = de.NativeObject; DirectorySearcher ds = new DirectorySearcher(de); ds.Filter = "samaccountname=" + userName; ds.PropertiesToLoad.Add("cn"); SearchResult sr = ds.FindOne(); if(sr == null) throw new Exception(); return true; } catch { return false; } } public static bool IsInRole(string userName, string role) { try { role = role.ToLowerInvariant(); DirectorySearcher ds = new DirectorySearcher(new DirectoryEntry(null)); ds.Filter = "samaccountname=" + userName; SearchResult sr = ds.FindOne(); DirectoryEntry de = sr.GetDirectoryEntry(); PropertyValueCollection dir = de.Properties["memberOf"]; for(int i = 0; i < dir.Count; ++i) { string s = dir[i].ToString().Substring(3); s = s.Substring(0, s.IndexOf(',')).ToLowerInvariant(); if(s == role) return true; } throw new Exception(); } catch { return false; } } These methods are implemented to work with a single application. The sources provided with this article are full implementations of IIdentity and IPrincipal interfaces. They are more suitable for developing ASP.NET Forms Authentication based on AD. IIdentity IPrincipal Applications can benefit more efficiently and easily from Active Directory by using another set of classes, also avoiding to create their own logon process. Developers should keep in mind this is a Windows-dependent solution. But how is that possible? This time, we'll use Windows logon itself to authenticate the user, using only two classes in the System.Security.Principals namespace. Yet, this can be done in two ways: System.Security.Principals IIdentity wi = WindowsIdentity.GetCurrent(); IPrincipal wp = new WindowsPrincipal((WindowsIdentity)wi); // ...or... IPrincipal wp = Thread.CurrentPrincipal; IIdentity wi = wp.Identity; From now on, we can check if a user belongs to a user group by simply calling the method IsInRole defined by the IPrincipal interface. It's important to remember that domain groups must specify the domain (e.g. "AD1\Administrators"), or the group evaluated will belong to the machine running the code. IsInRole A call to IsInRole is an alternate when the group name is known only at runtime. Once it is known during design time, methods and even full classes can be blocked using PrincipalPermissionAttribute. This can allow access to specific groups (roles), users, or simply user is authenticated (remember, in Windows 9x/ME, the user can cancel logon). PrincipalPermissionAttribute [PrincipalPermission(SecurityAction.Demand, Role="AD1\\Administrators")] [PrincipalPermission(SecurityAction.Demand, User="AD1\\harkos")] [PrincipalPermission(SecurityAction.Demand, Authenticated=true)] The Windows identity can also be used to authenticate users on intranet sites. This configuration requires no code at all but adjusting the web.config file to the following lines: <authentication mode="Windows"/> <authorization> <allow roles="AD1\Administrators"/> </authorization> <identity impersonate="true"/> The last line is not mandatory, but it makes the ASP.NET process to impersonate the user accessing the site, thus making the site more secure and allowing the use of PrincipalPermissionAttributes through your ASP.NET code. PrincipalPermissionAttributes User authentication and authorization using Windows/Active Directory is the best way to protect applications running inside a corporation, like a webmail or ERP application, easing management and task delegation and avoiding multiple passwords. Of course, nothing here applies if users should or must not be associated with domain user accounts, like a blog or an event registration. In these cases, a larger implementation with or without databases is more suitable. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) string text1 = this.Path; if ((text1 == null) || (text1.Length == 0)) { DirectoryEntry entry1 = new DirectoryEntry("LDAP://RootDSE"); string text2 = (string) entry1.Properties["defaultNamingContext"][0]; entry1.Dispose(); text1 = "LDAP://" + text2; } new DirectoryEntry() * Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "net.exe"; p.StartInfo.Arguments = "session"; p.Start(); p.WaitForExit(); p.StandardOutput.ReadLine() p.StandardOutput AuthenticationTypes.Secure | AuthenticationTypes.Sealing AuthenticationTypes.Encryption AuthenticationTypes.Signing new DirectoryEntry(null) new DirectoryEntry(null, null, null, authOptions) General News Suggestion Question Bug Answer Joke Rant Admin Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
http://www.codeproject.com/Articles/8819/Authorize-and-authenticate-users-with-AD?msg=1907944
CC-MAIN-2015-18
en
refinedweb
Quick Search API Sample By Geertjan-Oracle on Jul 18, 2008. Dear Geertjan, how to use quick search panel in a custom form. For example I have a list of clients, and a JPanel (on TopComponent) with a TextField named "Client". I want to equip this field or replace it with a field like in quick search. Posted by Alexander on June 03, 2010 at 05:46 PM PDT # Hello Geertjan. I'm having some problems with my implementation of this API. I got the searchprovider set up correctly and the application searches beutifully amongst my customers and articles. But. When the search has found a article, for example, I have a action that opens that article in my articleeditor. When i open the article, the quicksearch textfield says, "( no results )", in evil red text. Do you have any idea of why this is? Posted by Ingemar Skelander on April 05, 2013 at 05:51 AM PDT # Got the same "no results" error issue though the search found a few results. Any insight will be much appreciated. Cheers. Posted by guest on April 13, 2013 at 07:41 AM PDT # You're saying that you followed this tutorial? Posted by Geertjan on April 13, 2013 at 08:30 AM PDT # Tried it in NetBeans Platform 7.3. Works perfectly. So if you're not going to provide code showing the problem, I'm not going to be able to help. Posted by Geertjan on April 13, 2013 at 08:46 AM PDT # Hello again Geertjan. I will provide some sample code of the SearchProvider. public class ArticleSearchProvider implements SearchProvider { @Override public void evaluate(SearchRequest request, SearchResponse response) { List<Article> allArticles = findAllArticles() // not the real call List<Article> viableResults = new ArrayList<Article>(); for (Article article : articles) { if (isCompatibleId(article, request)) { viableResults.add(article); } else if (isCompatibleName(article, request)) { viableResults.add(article); } else if (isCompatiblePrice(article, request)) { viableResults.add(article); } } for (Article article : viableResults) { ArticleAction articleAction = new ArticleAction(viableResults, article); if(!response.addResult(articleAction, article.getName() + " " + article.getNumber())) { return; } } } } and the Runnable, ArticleAction, just posts the selected article to the global lookup where it is processed and the articleeditor opens with the selected article. Sorry that the formatting of the code is kinda messed up. Posted by Ingemar Skelander on April 15, 2013 at 06:35 AM PDT # Just answer the question, please. Did you follow the tutorial? Ignoring your comments until you answer the question. Also, just join the dev mailing list and ask your questions there. Posted by Geertjan on April 15, 2013 at 06:48 AM PDT # Sorry, I forgot to answer the tutorial question. Yes I followed the tutorial. I will join the mailing list, so no point in continuing here. Thanks. Posted by Ingemar Skelander on April 15, 2013 at 07:31 AM PDT #
https://blogs.oracle.com/geertjan/entry/quick_search_api_sample
CC-MAIN-2015-18
en
refinedweb
{-# LANGUAGE OverloadedStrings #-} -- | The main loop of the game, processing player and AI moves turn by turn. module Game.LambdaHack.Turn ( handleTurn ) where import Control.Monad import Control.Monad.State hiding (State, state) import Control.Arrow ((&&&)) import qualified Data.List as L import qualified Data.Ord as Ord import qualified Data.Map as M import qualified Data.IntMap as IM import Data.Maybe import Game.LambdaHack.Utils.Assert import Game.LambdaHack.Action import Game.LambdaHack.Actions import Game.LambdaHack.EffectAction import qualified Game.LambdaHack.Binding as Binding import Game.LambdaHack.Actor import Game.LambdaHack.ActorState import Game.LambdaHack.Level import Game.LambdaHack.State import Game.LambdaHack.Strategy import Game.LambdaHack.StrategyAction import Game.LambdaHack.Running import qualified Game.LambdaHack.Key as K import Game.LambdaHack.Msg import Game.LambdaHack.Draw import qualified Game.LambdaHack.Kind as Kind import Game.LambdaHack.Time import Game.LambdaHack.Content.FactionKind import Game.LambdaHack.Content.StrategyKind import Game.LambdaHack.Random -- One clip proceeds through the following functions: -- -- handleTurn -- handleActors -- handleAI or handlePlayer -- handleActors -- handleAI or handlePlayer -- ... -- handleTurn (again) -- What's happening where: -- -- handleTurn: HP regeneration, monster generation, determine who moves next, -- dispatch to handlePlayer and handleActors, advance global game time -- -- handleActors: find an actor that can move, advance actor time, -- update perception, remember, push frame, repeat -- -- handlePlayer: update perception, remember, display frames, -- get and process commmands (zero or more), update smell map -- -- handleAI: determine and process actor's action -- | Start a clip (a part of a turn for which one or more frames -- will be generated). Do whatever has to be done -- every fixed number of time units, e.g., monster generation. -- Run the player and other actors moves. Eventually advance the time -- and repeat. handleTurn :: Action () handleTurn = do debug "handleTurn" time <- gets stime -- the end time of this clip, inclusive let clipN = (time `timeFit` timeClip) `mod` (timeTurn `timeFit` timeClip) -- Regenerate HP and add monsters each turn, not each clip. when (clipN == 1) regenerateLevelHP when (clipN == 3) generateMonster ptime <- gets (btime . getPlayerBody) -- time of player's next move debug $ "handleTurn: time check." in abortWith msgKey -- The command was aborted or successful and if the latter, -- possibly took some time. if not timed then do -- If no time taken, rinse and repeat. -- Analyse the obtained frames. let (mfr, frs) = case reverse $ catMaybes frames of [] -> (Nothing, []) f : fs -> (Just f, reverse fs) -- Show, one by one, all but the last frame. -- Note: the code that generates the frames is responsible -- for inserting the @more@ prompt. b <- getOverConfirm frs -- Display the last frame while waiting for the next key or, -- if there is no next frame, just get the key. kmNext <- case mfr of Just fr | b -> getKeyFrameCommand fr _ -> getKeyCommand Nothing -- Look up and perform the next command. loop kmNext else do -- Exit the loop and let other actors act. No next key needed -- and no frames could have been generated. assert (null frames `blame` length frames) $ return () loop kmPush -- | Advance (or rewind) the move time for the given actor. advanceTime :: ActorId -> Action () advanceTime actor = do Kind.COps{coactor} <- getCOps let upd m@Actor{btime} = m {btime = timeAddFromSpeed coactor m btime} updateAnyActor actor upd -- The issues below are now complicated (?) by the fact that we now generate -- a game screen frame at least once every clip and a jointed pair -- of frame+key input for each command that does not take time. -- -- Design thoughts (in order to get rid or partially rid of the somewhat -- convoluted design we have): We have three kinds of commands. -- -- Normal commands: they take time, so after handling the command, state changes, -- time passes and monsters get to move. -- -- Instant commands: they take no time, and do not change the state. -- -- Meta commands: they take no time, but may change the state. -- -- Ideally, they can all be handled via the same (event) interface. We maintain an -- event queue where we store what has to be handled next. The event queue is a sorted -- list where every event contains the timestamp when the event occurs. The current game -- time is equal to the head element of the event queue. Currently, we only have action -- events. An actor gets to move on an event. The actor is responsible for reinsterting -- itself in the event queue. Possible new events may include HP regeneration events, -- monster generation events, or actor death events. -- -- If an action does not take any time, the actor just reinserts itself with the current -- time into the event queue. If the insert algorithm makes sure that later events with -- the same time get precedence, this will work just fine. -- -- It's important that we decouple issues like HP regeneration from action events if we -- do it like that, because otherwise, HP regeneration may occur multiple times. -- -- Given this scheme, we may get orphaned events: a HP regeneration event for a dead -- monster may be scheduled. Or a move event for a monster suddenly put to sleep. We -- therefore have to given handlers the option of accessing and cleaning up the event -- queue.
http://hackage.haskell.org/package/LambdaHack-0.2.6.5/docs/src/Game-LambdaHack-Turn.html
CC-MAIN-2015-18
en
refinedweb
NAME posix_openpt -- open a pseudo-terminal device LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <stdlib.h> #include <fcntl.h> int posix_openpt(int oflag); DESCRIPTION The posix_openpt() function allocates a new pseudo-terminal and establishes a connection with its master device. A slave device shall be created in /dev/pts. After the pseudo-terminal has been allocated, the slave device should have the proper permissions before it can be used (see grantpt(3)). The name of the slave device can be determined by calling ptsname(3). posix_openpt() function shall fail when oflag contains other values. RETURN VALUES Upon successful completion, the posix_openpt() function shall allocate a new pseudo-terminal device and return a non-negative integer representing a file descriptor, which is connected to its master device. Otherwise, -1 shall be returned and errno set to indicate the error. ERRORS The posix_openpt() function shall fail if: [ENFILE] The system file table is full. [EINVAL] The value of oflag is not valid. [EAGAIN] Out of pseudo-terminal resources. SEE ALSO pts(4), ptsname(3), tty(4) STANDARDS The posix_openpt() function conforms to IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY The posix_openpt() function appeared in FreeBSD 5.0. In FreeBSD 8.0, this function was changed to a system call. NOTES The flag O_NOCTTY is included for compatibility; in FreeBSD, opening a terminal does not cause it to become a process's controlling terminal. AUTHORS Ed Schouten <[email protected]>
http://manpages.ubuntu.com/manpages/precise/man2/posix_openpt.2freebsd.html
CC-MAIN-2015-18
en
refinedweb
Timeline 08/19/08: - 22:51 BuildingOnWindows edited by - (diff) - 16:33 Changeset [35852] by - 15 edits in trunk/WebCore - 2 edits in trunk/WebCore Fix Windows build more. - WebCore.vcproj/WebCore.vcproj: - 15:36 Changeset [35850] by - 2 edits in trunk/WebKit/mac - 2 edits in trunk/WebCore Fix Windows build. - page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::canSetFocusAttribute): - 15:29 Changeset [35848] by - 2 edits in trunk/WebKit/win Fix build. - WebScriptCallFrame.cpp: (WebScriptCallFrame::jsValueToString): - 15:22 Changeset [35847] by - 6 edits2 adds in trunk/JavaScriptCore - 12 edits30 adds in trunk <rdar://problem/4003764> Expose tables as AXTables Exposes "data" tables in HTML as AXTables through accessibility - 14:35 Changeset [35845] by - 2 edits in trunk/JavaScriptCore Build fix. - kjs/operations.cpp: (KJS::equal): - 13:18 Changeset [35844] by - 2 edits in trunk/WebKitTools - 2 edits in trunk/WebCore Build fix. Add buildfailed support to stop builds early (preventing inaccurate error messages). Add missing post-build rule to Release. - WebCore.vcproj/QTMovieWin.vcproj: - 11:33 Changeset [35842] by - 6 edits in trunk/WebCore - 2 edits in trunk/WebCore Clear console.time timers when changing page. Reviewed by Geoff Garen. - page/InspectorController.cpp: (WebCore::InspectorController::didCommitLoad): - 10:55 Changeset [35840] by - 3 edits in trunk/WebCore - 2 edits in trunk/WebKit/mac - 2 edits in trunk/WebCore - 2 edits in trunk/WebCore - 2 edits in trunk/JavaScriptCore - 6 edits in trunk/WebCore - 2 edits in trunk/WebCore - 3 edits in trunk/WebCore - 1 edit1 move in trunk/LayoutTests Crash in svg/webarchive/svg-cursor-subresources.svg Disabling the test while the crash is being investigated. - 00:27 Changeset [35831] by - 3 edits2 adds in trunk/08: - 21:39 Changeset [35830] by - 47 edits3 adds in trunk - 2 edits in trunk/WebCore - 10 edits4 adds in trunk - 2 edits1 add1 delete in trunk/LayoutTests Make transition_shorthand_parsing.html a text-only test. - fast/css/transition_shorthand_parsing-expected.txt: Added. - fast/css/transition_shorthand_parsing.html: - platform/mac/fast/css/transition_shorthand_parsing-expected.txt: - 15:47 Changeset [35826] by - 2 edits in trunk/WebCore - 3 edits2 adds in trunk Reviewed by Dave Hyatt Need to make sure we have an Animation in the AnimationList before setting the initial value. Test: fast/css/transition_shorthand_parsing.html - css/CSSStyleSelector.cpp: - 14:55 Changeset [35824] by - 2 edits in trunk/WebKit/wx Build fix for Win. Don't include the libxml/libxslt directories in the include path, it picks up the wrong Pattern.h in that case. - 13:53 Changeset [35823] by - 3 edits in trunk/JavaScriptCore - 8 edits5 adds in branches/XBL2 - 2 edits in trunk/WebCore 2008-08-18 Kevin McCullough <[email protected]> Reviewed by Tim. <rdar://problem/6150593> JSProfiler: Empty profiles disappear when there is another profile. - page/inspector/ProfilesPanel.js: - 12:55 Changeset [35820] by - 2 edits in trunk/WebCore 2008-08-18 Kevin McCullough <[email protected]> Reviewed by Geoff. <rdar://problem/6150642> REGRESSION: Closing the Web Inspector clears all console messages - page/inspector/Console.js: - 08:54 Changeset [35819] by - 8 edits5 adds in branches/XBL2 - 77 edits in trunk/WebKitSite Upgrade to WordPress 2.6.1. - 04:20 Changeset [35817] by - 2 edits in trunk/WebCore - 8 edits in trunk - 4 edits in trunk/JavaScriptCore. 08/17/08: - 20:21 Changeset [35814] by - 3 edits in trunk/WebCore Complete in scope variables in the Console when paused. Reviewed by Geoffrey Garen. - page/inspector/Console.js: (WebInspector.Console.prototype.completions): If the expressionString is null or empty and the debugger is paused, call variablesInScopeForSelectedCallFrame to get an object that declares all the in scope variables. That way "top level" expressions are completed. - page/inspector/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.variablesInScopeForSelectedCallFrame): Return an object that has all the variables that are in scope for the selected call frame. The value of each property is just true. The return object is useful for quick lookups or auto completion. - 19:42 Changeset [35813] by - 7 edits in trunk 2008-08-17 Cameron Zwarich <[email protected]> Reviewed by Maciej. Change the counting of constants so that preincrement and predecrement of const local variables are considered unexpected loads. - kjs/nodes.cpp: (KJS::PrefixResolveNode::emitCode): - kjs/nodes.h: (KJS::ScopeNode::neededConstants): LayoutTests: - fast/js/deep-recursion-test.html: - 16:38 Changeset [35812] by - 3 edits3 adds in trunk <rdar://problem/6150322> In Gmail, a crash occurs at KJS::Machine::privateExecute() when applying list styling to text after a quote had been removed <> Reviewed by Cameron Zwarich. This crash was caused by "depth()" incorrectly determining the scope depth of a 0 depth function without a full scope chain. Because such a function would not have an activation the depth function would return the scope depth of the parent frame, thus triggering an incorrect unwind. Any subsequent look up that walked the scope chain would result in incorrect behaviour, leading to a crash or incorrect variable resolution. This can only actually happen in try...finally statements as that's the only path that can result in the need to unwind the scope chain, but not force the function to need a full scope chain. - 14:34 Changeset [35811] by - 2 edits in trunk/WebCore 2008-08-17 Cameron Zwarich <[email protected]> Not reviewed. Speculative Qt build fix. - bridge/qt/qt_runtime.cpp: (KJS::Bindings::convertValueToQVariant): (KJS::Bindings::QtRuntimeMethod::QtRuntimeMethod): - 14:27 Changeset [35810] by - 5 edits in trunk/JavaScriptCore 2008-08-17 Cameron Zwarich <[email protected]> Reviewed by Maciej. Bug 20419: Remove op_jless <> Remove op_jless, which is rarely used now that we have op_loop_if_less. - VM/CodeBlock.cpp: (KJS::CodeBlock::dump): - VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitJumpIfTrue): - VM/Machine.cpp: (KJS::Machine::privateExecute): - VM/Opcode.h: - 14:18 Changeset [35809] by - 2 edits in trunk/JavaScriptCore 2008-08-17 Cameron Zwarich <[email protected]> Reviewed by Dan Bernstein. Fix a typo in r35807 that is also causing build failures for non-AllInOne builds. - kjs/NumberConstructor.cpp: - 13:28 Changeset [35808] by - 9 edits in trunk JavaScriptGlue: 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Updated project files to XCode 3.1. - JavaScriptGlue.xcodeproj/project.pbxproj: WebCore: 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Updated project files to XCode 3.1. - manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj: WebKit: 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Updated project files to XCode 3.1. - WebKit.xcodeproj/project.pbxproj: WebKitTools: 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Updated project files to XCode 3.1. - DrawTest/DrawTest.xcodeproj/project.pbxproj: - WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: - 13:23 Changeset [35807] by - 85 edits in trunk 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Made room for a free word in JSCell. SunSpider says no change. I changed JSCallbackObjectData, Arguments, JSArray, and RegExpObject to store auxiliary data in a secondary structure. I changed InternalFunction to store the function's name in the property map. I changed JSGlobalObjectData to use a virtual destructor, so WebCore's JSDOMWindowBaseData could inherit from it safely. (It's a strange design for JSDOMWindowBase to allocate an object that JSGlobalObject deletes, but that's really our only option, given the size constraint.) I also added a bunch of compile-time ASSERTs, and removed lots of comments in JSObject.h because they were often out of date, and they got in the way of reading what was actually going on. Also renamed JSArray::getLength to JSArray::length, to match our style guidelines. WebCore: 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Made room for a free word in JSCell. Changed JSDOMWindowBase to store its auxiliary data in a subclass of JSGlobalData, so the two could share a pointer. Added a bunch of ASSERTs, to help catch over-sized objects. WebKit/mac: 2008-08-17 Geoffrey Garen <[email protected]> Reviewed by Cameron Zwarich. Made room for a free word in JSCell. (Updated for JavaScriptCore changes.) - 00:57 Changeset [35806] by - 10 edits in trunk/JavaScriptCore 2007-08-16 Geoffrey Garen <[email protected]> Reviewed by Oliver Hunt. Sped up property access for array.length and string.length by adding a mechanism for returning a temporary value directly instead of returning a pointer to a function that retrieves the value. Also removed some unused cruft from PropertySlot. SunSpider says 0.5% - 1.2% faster. NOTE: This optimization is not a good idea in general, because it's actually a pessimization in the case of resolve for assignment, and it may get in the way of other optimizations in the future. 08/16/08: - 22:06 Changeset [35805] by - 3 edits in trunk/JavaScriptCore Reviewed by Geoffrey Garen. Disable dead code stripping in debug builds. - Configurations/Base.xcconfig: - JavaScriptCore.xcodeproj/project.pbxproj: - 20:28 Changeset [35804] by - 3 edits in trunk/WebCore 2008-08-15 Mark Rowe <[email protected]> Reviewed by Dan Bernstein. Disable dead code stripping in debug builds. - Configurations/Base.xcconfig: - WebCore.xcodeproj/project.pbxproj: 08/15/08: - 23:53 Changeset [35803] by - 2 edits in trunk/JavaScriptCore <rdar://problem/6143072> FastMallocZone's enumeration code makes assumptions about handling of remote memory regions that overlap Reviewed by Oliver Hunt. - wtf/FastMalloc.cpp: (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Don't directly compare pointers mapped into the local process with a pointer that has not been mapped. Instead, calculate a local address for the pointer and compare with that. (WTF::TCMallocStats::FreeObjectFinder::findFreeObjects): Pass in the remote address of the central free list so that it can be used when calculating local addresses. (WTF::TCMallocStats::FastMallocZone::enumerate): Ditto. - 23:48 Changeset [35802] by - 15 edits in trunk <rdar://problem/6139914> Please include a _debug version of JavaScriptCore framework Rubber-stamped by Geoff Garen. - 15:58 Changeset [35801] by - 6 edits in trunk/WebCore 2008-08-15 Antti Koivisto <[email protected]> Reviewed by Anders. Don't start preloading body resources before the head is complete. This prevents body preloads from slowing down initial display when there is limited amount of bandwidth available. Works by queuing up found body preloads to DocLoader and only issuing them after document has rendering. With bandwidth capped to 300kbit/s this speeds up cnn.com initial display by ~25% or 5s without affecting complete load time. - html/PreloadScanner.cpp: (WebCore::PreloadScanner::PreloadScanner): (WebCore::PreloadScanner::scanningBody): (WebCore::PreloadScanner::emitTag): (WebCore::PreloadScanner::emitCSSRule): - html/PreloadScanner.h: - loader/DocLoader.cpp: (WebCore::DocLoader::preload): (WebCore::DocLoader::checkForPendingPreloads): (WebCore::DocLoader::requestPreload): - loader/DocLoader.h: - loader/loader.cpp: (WebCore::Loader::Host::didFinishLoading): (WebCore::Loader::Host::didFail): - 14:08 Changeset [35800] by - 2 edits in trunk/WebCore Use item's computed style if the render style is 0 before falling back to the <select>'s style. This way style set on an <hr> within a <select> will be honored. Reviewed by Dave Hyatt and Dan Bernstein. - rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemStyle): - 13:48 Changeset [35799] by - 3 edits in trunk/WebCore 2008-08-15 Antti Koivisto <[email protected]> Reviewed by Oliver. Some loader performance tweaks: - Make stylesheets highest priority instead of scripts. We block script execution on stylesheets. Especially if a stylesheet @imports other stylesheets it is important to get them to the front of the queue to not delay rendering. - Issue the first resource load for a host immediately even if the resource is low priority. TCP connection setup can take long time when latency is high so it is good to get started early. - When the document is fully parsed and stylesheets have been loaded there is no need to keep managing the load queues. Issue remaining loads to the network layer. - loader/loader.cpp: (WebCore::Loader::determinePriority): (WebCore::Loader::load): (WebCore::Loader::Host::servePendingRequests): - loader/loader.h: - 11:35 Changeset [35798] by - 2 edits in trunk/WebCore Detach the script debugger when the Web Inspector's window closes. This has always been the intended design, but never fully implemented. Reviewed by Adam Roben. - page/InspectorController.cpp: (WebCore::InspectorController::setWindowVisible): Call stopDebugging() if the window is no longer visible. - 11:27 Changeset [35797] by - 2 edits in trunk/LayoutTests Rubber-stamped by Tim Hatcher. - update results for console.dir - fast/dom/Window/window-properties-expected.txt: - 11:12 Changeset [35796] by - 7 edits in trunk/WebKit/qt 2008-08-15 Håvard Wall <[email protected]> Reviewed by Simon. Fixes: compile with QT_NO_UNDOCOMMAND/STACK - 11:12 Changeset [35795] by - 2 edits in trunk/WebKit/qt 2008-08-15 Håvard Wall <[email protected]> Reviewed by Simon. Fixes: compile with QT_NO_STYLE_STYLESHEET - 11:12 Changeset [35794] by - 2 edits in trunk/WebKit/qt Håvard Wall <[email protected]> Fixes: compile with QT_NO_SHORTCUT - 11:12 Changeset [35793] by - 9 edits in trunk 2008-08-15 Håvard Wall <[email protected]> Reviewed by Simon. Fixes: compile with QT_NO_CONTEXTMENU - 11:11 Changeset [35792] by - 7 edits in trunk 2008-08-15 Håvard Wall <[email protected]> Reviewed by Simon. Fixes: compile with QT_NO_WHEELEVENT - 11:11 Changeset [35791] by - 3 edits in trunk/WebKit/qt Håvard Wall <[email protected]> Fixes: compile with QT_NO_PRINTER - 11:10 Changeset [35790] by - 3 edits in trunk/WebKit/qt 2008-08-15 David Boddie <[email protected]> Reviewed by Simon. Doc: Added documentation for default property values. - 11:10 Changeset [35789] by - 2 edits in trunk/WebKit/qt David Boddie <[email protected]> Doc: Renamed snippets that appear in the code directory. - 10:48 Changeset [35788] by - 7 edits in trunk/WebCore Fixed Bug 20210: Console groups are incorrect when closing and reopening the Inspector Reviewed by Tim Hatcher. - page/Console.cpp: (WebCore::Console::group): (WebCore::Console::groupEnd): - page/Console.h: (WebCore::): Removed GroupTitleMessageLevel. Added StartGroupMessaageLevel and EndGroupMessageLevel. - page/InspectorController.cpp: (WebCore::InspectorController::startGroup): Increments group level by one and adds console message with StartGroupMessaageLevel. (WebCore::InspectorController::endGroup): Decrements group level by one and adds console message with EndGroupMessaageLevel. - page/InspectorController.h: - page/inspector/Console.js: (WebInspector.Console.prototype.addMessage): Creates new ConsoleGroup if the message is StartGroupMessaageLevel. (WebInspector.ConsoleMessage.prototype.toMessageElement): (WebInspector.ConsoleGroup.prototype.addMessage): - page/inspector/inspector.js: - 10:35 Changeset [35787] by - 8 edits in trunk/WebCore Adds support for console.dir to the Inspector Reviewed by Tim Hatcher. - bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::dir): - page/Console.cpp: (WebCore::Console::dir): - page/Console.h: Added ObjectMessageLevel. - page/Console.idl: Added console.dir. - page/inspector/Console.js: (WebInspector.ConsoleMessage.prototypet.toMessageElement): Creates an ObjectPropertiesSection if the MessageLevel is Object. - page/inspector/ObjectPropertiesSection.js: "in" operator can't be used on primitive data types. - page/inspector/inspector.css: - 10:06 Changeset [35786] by - 2 edits in trunk/WebCore Adds support for clear() in the Inspector console. Reviewed by Tim Hatcher. - page/inspector/Console.js: - 10:02 Changeset [35785] by - 2 edits in trunk/WebCore Cmd-F on Mac or Ctrl-F on other platforms now focus the search field. Platform distinction and modifier key matching adjusted by Daniel Jalkut <[email protected]> Bug 16313: text search (find) keybindings should work in the Web Inspector Reviewed by Tim Hatcher. - page/inspector/inspector.js: Added a case for the F key - 09:50 Changeset [35784] by - 2 edits in trunk/WebCore Fix for error when the string doesn't contain a webkit-profile link. Reviewed by Tim Hatcher. - page/inspector/inspector.js: - 09:33 Changeset [35783] by - 3 edits1 add in trunk/WebCore Fixes two bugs where JavaScript could be executed from the page while the debugger is paused. The first issue was JSLazyEventListener not checking the paused state before parsing the code. The second issue was with the PageGroup version of JavaScriptDebugServer::setJavaScriptPaused always passing false to the Page version of JavaScriptDebugServer::setJavaScriptPaused, and not the paused argument. Reviewed by Adam Roben. - bindings/js/JSEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Check the paused state of the ScriptController. Return early if paused. - manual-tests/inspector/debugger-execution-while-paused.html: Added. - page/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::setJavaScriptPaused): Pass the paused argument to the Page version of setJavaScriptPaused. - 07:55 Changeset [35782] by - 2 edits in trunk/JavaScriptCore Fix the 64-bit build. Add extra cast to avoid warnings about loss of precision when casting from JSValue* to an integer type. - kjs/JSImmediate.h: (KJS::JSImmediate::intValue): (KJS::JSImmediate::uintValue): - 04:59 Changeset [35781] by - 2 edits in trunk/JavaScriptCore Still fixing Windows build. - JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Added OpaqueJSString to yet another place. - 04:41 Changeset [35780] by - 1 edit in trunk/JavaScriptCore/kjs/JSImmediate.h Windows build fix - 04:14 Changeset [35779] by - 1 edit1 add in trunk/JavaScriptCore Trying to fix non-Apple builds. - ForwardingHeaders/JavaScriptCore/OpaqueJSString.h: Added. - 03:42 Changeset [35778] by - 2 edits in trunk/JavaScriptCore 2008-08-15 Gavin Barraclough <[email protected]> Reviewed by Geoff Garen. Allow JSImmediate to hold 31 bit signed integer immediate values. The low two bits of a JSValue* are a tag, with the tag value 00 indicating the JSValue* is a pointer to a JSCell. Non-zero tag values used to indicate that the JSValue* is not a real pointer, but instead holds an immediate value encoded within the pointer. This patch changes the encoding so both the tag values 01 and 11 indicate the value is a signed integer, allowing a 31 bit value to be stored. All other immediates are tagged with the value 10, and distinguished by a secondary tag. Roughly +2% on SunSpider. - kjs/JSImmediate.h: Encoding of JSImmediates has changed - see comment at head of file for descption of new layout. - 03:18 Changeset [35777] by - 4 edits in trunk/JavaScriptCore More build fixes. - API/OpaqueJSString.h: Add a namespace to friend declaration to appease MSVC. - API/JSStringRefCF.h: (JSStringCreateWithCFString) Cast UniChar* to UChar* explicitly. - JavaScriptCore.exp: Added OpaqueJSString::create(const KJS::UString&) to fix WebCore build. - 01:32 Changeset [35776] by - 5 edits in trunk/JavaScriptCore Build fix. - JavaScriptCore.xcodeproj/project.pbxproj: Marked OpaqueJSString as private - kjs/identifier.cpp: (KJS::Identifier::checkSameIdentifierTable): - kjs/identifier.h: (KJS::Identifier::add): Since checkSameIdentifierTable is exported for debug build's sake, gcc wants it to be non-inline in release builds, too. - JavaScriptCore.exp: Don't export inline OpaqueJSString destructor. - 00:43 Changeset [35775] by - 19 edits2 adds in trunk Reviewed by Geoff Garen. JSStringRef is created context-free, but can get linked to one via an identifier table, breaking an implicit API contract. Made JSStringRef point to OpaqueJSString, which is a new string object separate from UString.
http://trac.webkit.org/timeline?from=2008-08-19T16%3A33%3A07-0700&precision=second
CC-MAIN-2015-18
en
refinedweb
Is C Still A Suitable Language Today? Damien Katz, Couchbase, believes that C is still a great language for back-end programming, while other developers argue that C has too many flaws, supporting C++ or Java, while others like neither. In a recent blog post entitled The Unreasonable Effectiveness of C, Damien Katz, the Creator of CouchDB, affirms that C is a great language for the back-end, supporting it in spite of more modern languages such as C++ , Java, or even Erlang or Ruby. Katz does not think C is simply better than any other language out there, but when “raw performance and reliability are critical, C is very, very hard to beat,” - quote taken from a subsequent post meant to clarify his position. While initially doing much of CouchDB in Erlang, Katz became unhappy with it after spending . For that and for performance reasons, Katz decided to progressively rewrite “more of the Couchbase code in C, and choosing it as the first option for more new features.” Interestingly, C has proven to be “much more predictable when we'll hit issues and how to debug and fix them. In the long run, it's more productive.” Katz outlines several reasons making C better than higher level languages such as C++ or Java for the back-end: - Expressiveness – “The syntax and semantics of C is amazingly powerful and expressive. It makes it easy to reason about high level algorithms and low level hardware at the same time. Its semantics are so simple and the syntax so powerful it lowers the cognitive load substantially, letting the programmer focus on what's important.” - Simplicity – “C is a weak, statically typed language and its type system is quite simple. … What sounds like a weakness ends up being a virtue: the "surface area" of C APIs tend to be simple and small. Instead of massive frameworks, there is a strong tendency and culture to create small libraries that are lightweight abstractions over simple types.” - Speed and Memory Footprint – .” - Faster Development Cycle – “Critically important to developer efficiency and productivity is the "build, run, debug" cycle. The faster the cycle is, the more interactive development is, and the more you stay in the state of flow and on task. C has the fastest development interactivity of any mainstream statically typed language.” - Debugging – .” - Cross-platform – .” Katz also agrees C has “many flaws”: …! Katz’s love affair with C seems to originate from the need to push Couchbase’s performance limits and debugging problems arising from combining C plugins with the Erlang VM. He does not consider C++, Go or D as a better replacement for C, but he thinks Rust could be “the language of my dreams” if it achieves “C-like performance but safe with Erlang concurrency and robustness built in.” Katz’ post has sparked a wide debate on Reddit and Hacker News, many developers arguing the virtues of C and suggesting other languages instead. robinei blames string manipulation and error checking hassles: I always want to get back to C (from C++ among others), and when I do it's usually refreshingly simple in some ways. It feels good! But then I need to do string manipulation, or some such awkward activity.. Where lots of allocations happen, it is a pain to have to match every single one with an explicit free. I try to fix this by creating fancy trees of arena allocators, and Go-like slice-strings, but in the end C's lack of useful syntactic tools (above namespace-prefixed functions) make everything seem much more awkward than it could be. (and allocating everything into arenas is also quite painful) I see source files become twice as long as they need to because of explicit error checking (doesn't normally happen, but in some libraries like sqlite, anything can fail). There are just so many things that drain my energy, and make me dissatisfied. After a little bit of all that, I crawl back to where I came from. Usually C++. madhadron proposes a “more realistic view of C”: - C is straightforward to compile into fast machine code...on a PDP-11. … - C's standard library is a joke. Its shortcomings, particularly around string handling, have been responsible for an appalling fraction of the security holes of the past forty years. - C's tooling is hardly something to brag about, especially compared to its contemporaries like Smalltalk and Lisp. Most of the debuggers people use with C are command line monstrosities. Compare them to the standard debuggers of, say, Squeak or Allegro Common Lisp. - Claiming a fast build/debug/run cycle for C is sad. It seems fast because of the failure in this area of C++. Go look at Turbo Pascal if you want to know how to make the build/debug/run cycle fast. - Claiming that C is callable from anywhere via its standard ABI equates all the world with Unix. Sadly, that's almost true today, though, but maybe it's because of the ubiquity of C rather than the other way around. geophile is dissatisfied with all of them: C/C++/Java. A programmer's version of Rock/Paper/Scissors. I started out in C, many years ago. I found myself using macros and libraries to provide useful combinations of state and functions. I was reinventing objects and found C++. I was a very happy user of C++ for many years, starting very early on (cfront days). But I was burned by the complexity of the language, and the extremely subtle interaction of features. And I was tired of memory management. I was longing for Java, and then it appeared. And I was happy. As I was learning the language, I was sure I missed something. Every object is in the heap? Really? There is really no way to have one object physically embedded within another? But everything else was so nice, I didn't care. And now I'm writing a couple of system that would like to use many gigabytes of memory, containing millions of objects, some small, some large. The per-object overhead is killing me. GC tuning is a nightmare. I'm implementing suballocation schemes. I'm writing micro-benchmarks to compare working with ordinary objects with objects serialized to byte arrays. And since C++ has become a hideous mess, far more complicated than the early version that burned me, I long for C again. So I don't like any language right now. For some, C looks too flawed and unproductive to be useful today, but others still manage to make good use of it in spite of its peculiarities. The developer community would be probable better off avoiding a war over the best language out there, and rather trying to understand the tradeoffs of each language, choosing the best suited considering the project at hand and the skills available. After all, no language is perfect. Depends on your goals and environment... by Mark Peskin Overall, if you're doing a large, complex, and sustained project with a significant developer staff, I think you're much better off with Java (or Scala, etc.). Save the C for the odd (and increasingly less frequent) occasions where you really need native code, and use a message-based system to integrate the two (JNI sucks). Forget about C++. Re: Depends on your goals and environment... by Josh Long I'm with Mark and - to some extent - Damien on this one.. In all cases, definitely forget about C++ :) Re: Depends on your goals and environment... by Bernd Kolb mbeddr was designed to better support embedded software development (although not limited to that) for small as well as large systems based on an extensible version of C language and IDE. Existing extensions include interfaces with pre- and postconditions, components, state machines and physical units, as well as support for requirements tracing and product line variability. Based on these abstractions, mbeddr also supports formal verification based on model checking and SMT solving. With that approach C can be made "scalable" for larger projects and teams. In addition it allows the introduction modern programming principles. By extending mbeddr you even add primitives for e.g. messaging. Of course you cannot blame C for race conditions... by Patrick Viry So instead of blaming the Erlang runtime for race conditions, you'll end up blaming the C threading library you selected. This is hardly an argument against using Erlang. On the contrary, the threading model provided by the various C libraries is so complex - compared to the Erlang concurrency model - that you'd probably spend months debugging race conditions in your own
http://www.infoq.com/news/2013/01/C-Language
CC-MAIN-2015-18
en
refinedweb
Creating Documents by Using the Open XML Format SDK 2.0 CTP (Part 3 of 3) Summary: See how to accomplish common scenarios by using the Open XML Format SDK APIs. Create Microsoft Office PowerPoint 2007 presentations from data in a database, assemble Microsoft Office Word 2007 documents from smaller documents, and bind content controls to custom XML, all by using the Open XML Format SDK 2.0 (CTP) APIs (12 printed pages) Zeyad Rajabi, Microsoft Corporation Frank Rice, Microsoft Corporation February 2009 Applies to: Microsoft Office Excel 2007, Microsoft Office Word 2007, Microsoft Office Word 2007 Contents CTP (Part 2 of 3) and Creating Documents by Using the Open XML Format SDK 2.0 (Part 3 of 3) present common scenario and show you lots of sample code. You can access the Open XML Format SDK 2.0 (CTP) from the following locations: Download sample: Sample Code downloads for the Open XML Format SDK 2.0 (CTP). Creating a Presentation Report Based on Data The Open XML Format SDK provides a set of Microsoft .NET Framework application programming interfaces (APIs) that allows you to create and manipulate documents in the Open XML Formats in both client and server environments without requiring the Microsoft Office client applications. The following solutions use the Open XML Format SDK 2.0 (CTP). In the following section, you go through the steps to create a rich Microsoft Office PowerPoint 2007 presentation report from data in a database. Scenario: Document Assembly Imagine a scenario where you are a developer working for a fictional company called Adventure Works. In this company, a database is used to store all data pertaining to its sales force. The company needs to track the contact information, territories they own, total sales, and bonuses for the sales team. You will build a report generation tool that can take this data and create a Microsoft Office PowerPoint 2007 presentation. The sales team wants this solution to run on the server, so the PowerPoint client application cannot be used. Solution Before discussing the details of the solution, there are two prerequisites: The solution is based on the Adventure Works database built for Microsoft SQL Server 2005. The Adventure Works database can be downloaded at Adventure Works database The solution requires that you update the Adventure Works database to include contact photos. Download sample: Sample Code downloads for the Open XML Format SDK 2.0 (CTP). Step 1 – Create a Template In this scenario you read sales personal data and create a PowerPoint presentation report. First, you need to create a presentation template for the solution. In this instance, the presentation template should contain a slide with placeholder regions for the following information: Sales person contact information, such as name, e-mail address and photo Sales summary information, such as territory owned by sales person, total sales made by sales person, sales quota Extra information, such as bonus amount and commission percentage The slide template looks like the following figure. Step 2 – Clone the Slide Template For each sales person in Adventure Works, clone the slide template, shown in figure 1, and fill in the necessary information with data from the database. The code: Creates a slide for each sales person Copies the content from the slide template to a new slide Ensures that the new slide references the slide template's slide layout Adds the new slide to the end of the presentation (similar to adding a node to the end of a linked list) SlidePart CloneSlidePart(PresentationPart presentationPart, SlidePart slideTemplate) { //Create a new slide part in the presentation. SlidePart newSlidePart = presentationPart.AddNewPart<SlidePart>("newSlide" + i); i++; //Add the slide template content into the new slide. newSlidePart.FeedData(slideTemplate.GetStream(FileMode.Open)); //Make sure the new slide references the proper slide layout. newSlidePart.AddPart(slideTemplate.SlideLayoutPart); /); return newSlidePart; } Step 3 – Swap the Placeholder Text At this point, you cloned the slide template and added it to the presentation. Next, replace the placeholder text in the new slide with the appropriate data. The following method locates all placeholder locations and replaces the placeholder text with strings from a given slide part. void SwapPlaceholderText(SlidePart slidePart, string placeholder, string value) { //Find and get all the placeholder text locations. List<Drawing.Text> textList = slidePart.Slide.Descendants<Drawing.Text>().Where(t => t.Text.Equals(placeholder)).ToList(); //Swap the placeholder text with the text from DB foreach (Drawing.Text text in textList) text.Text = value; } Step 4 – Swap out Placeholder Photo The slide template includes one placeholder picture that is intended to represent the image of a sales person. To replace this photo, the code: Adds an image part to the new slide based on the slide template Inserts the image data into the newly-added image part Places the photo reference from the placeholder image into the new image Replacing the photo is simple because images are referenced to by using Ids. In this instance, find the image reference and replace it with the image reference of the new image. The following code accomplishes this. Step 5 – Delete Template Slide To complete this solution, delete the slide template. As you know the relationship Id of the slide template, the following code deletes the slide. void DeleteTemplateSlide(PresentationPart presentationPart, SlidePart slideTemplate) { //Get the list of slide ids. SlideIdList slideIdList = presentationPart.Presentation.SlideIdList; //Delete the template slide reference. foreach (SlideId slideId in slideIdList.ChildElements) { if (slideId.RelationshipId.Value.Equals("rId3")) slideIdList.RemoveChild(slideId); } //Delete the template slide. presentationPart.DeletePart(slideTemplate); } The Result Running the code produces the output in the following figure. Merging Multiple Word Documents A common request for word-processing documents is to merge multiple documents into a single document. In this section, you use altChunks and the Open XML Format SDK 2.0 to create a robust document assembly solution. Scenario: Document Assembly In this scenario, you are a developer for a book publisher company that specializes in education based books. This company typically has one or more authors write chapters for a given book. Each of these chapters is written as a separate document. In this scenario, the company commissioned a book on the solar system where the book is divided into a separate chapter each element of the solar system such as the planets and the sun. You need to write a solution to merge all these documents into a single document. Solution Before describing the details of this solution, there are a couple of different approaches to solve this problem: Use altChunks to merge the documents. For more information about altChunks, see Leveraging Content in Other Formats. Manually merge documents together by using copy and paste Using altChunks is the easier of the two choices. Not only can you use altChunks for WordprocessingML documents, you can also use them with HTML, XML, RTF, and plain text. Manually merging multiple documents is feasible but requires you to handle a number of issues. For example, you need to deal with conflicts related to different styles, bullets, numbering, comments, headers, and footers. Step 1 – Create a Template The first step is to create a template for the book. In the template, you merge chapters into specific locations within the template by using content controls. Content controls allow you to uniquely identify a specific region within a document. For more information about content controls, see Meet the Controls. Each content control you add to the template has the name of the chapter for that location. For example, as shown in the following figure, there is a content control named Earth. Step 2 – Find Specific Content Controls The template is complete so you programmatically locate content controls based on the chapter titles. This task is easy with the Open XML Format SDK 2.0. The following code opens the document and finds all content controls represented as SdtBlock with an alias set to the source file to merge. MergeSourceDocument(string sourceFile, string destinationFile) {<Alias>().Val.Value)).ToList(); ... } } Step 3 – Add altChunk and Replace the Content Control In this step, you replace the content controls with the document text by using altChunks. You can merge the documents with altChunks by doing the following tasks: Adding the altChunk part to the document package Importing data from the subdocument into the altChunk part Adding a reference to altChunk into the main document part The following code accomplishes these tasks. the content control with altChunk information. foreach (SdtBlock sdt in sdtList) { OpenXmlElement parent = sdt.Parent; parent.InsertAfter(altChunk, sdt); sdt.Remove(); } ... } The Result Running the code produces the solar-system book divided into a chapter for each components of the solar-system. To summarize, using altChunks automatically ensures the following: The final document has consistent styles applied. Images, comments, and tracked changes are all included as part of the merged document. Bullets and numbering work as expected. The following figure shows the final document. Binding Content Controls to Custom XML In the previous section, you used content controls to provide semantic structure within a document. In this section, you use content controls to bind to custom XML. Scenario: Generate Sales Contracts on the Server In this scenario, you are a developer for a law firm that specializes in writing legal contracts to sell various properties. The company uses the same template for all property contracts. The only difference in the contracts is the data used. For example, the contract displays who is selling the property and the address of the property. You need to write a solution that allows lawyers to automatically insert the data into the template. Additional, the solution should generate the document on the server. Solution This solution is based on concepts described in a post from the Word team blog: Separate Yet Equal. This solution uses content controls to bind to custom XML. By using bound content controls, you are separating the presentation of the documentation from the data stored in a separate custom XML part. Binding content controls gives the following functionality: When a user types into a bound content control, the data in the custom XML is also updated. When the data in the custom XML part is updated, the content in the bound content control is also updated. To accomplish the server requirement, the solution is built with Microsoft ASP.NET. The solution’s Web site contains several form fields representing the data to insert into the document. To insert the data into the document, you generate a custom XML file based on this data and insert the file into the WordprocessingML package. Download sample: Sample Code downloads for the Open XML Format SDK 2.0 (CTP). Step 1 – Create a Template The first step is to set up the template. In this instance, the template is a sales contract with content controls located where data is to be inserted. The template looks like the following figure. These content controls delineate semantic regions and bind to the custom XML. This binding is accomplished by using the namespace of the custom XML file and using a XPath expression to identify the element to bind to. The following is an example of XML markup that specifies this binding. There are three ways to bind to content controls: By using Content Control Tool Kit. This Word add-in makes binding content controls to XML easy and intuitive. By using the Word object model. You can use ContentControl.XMLMapping.SetMapping() method. By directly manipulating the underlying XML. You can use the Open XML Format SDK 2.0 for this. In this template, you bind the content controls to an empty custom XML file. This custom XML file contains no data. Binding to an empty custom XML file ensures that just the placeholder text of the content controls is shown. Step 2 – Create the ASP.NET Front-End Web site The next step is to create a front-end Web site that allows users to insert data into the document. For this step, you create a simple Microsoft ASP.NET site that looks similar to the following figure. In the back end of the Web site, a custom XML file containing the data is inserted into the Wordprocessing document. Step 3 – Replacing Custom XML After the custom XML file is created, it is inserted the WordprocessingML document. The following code opens the document and adds this XML file as a custom XML part.NewPart<CustomXmlPart>(); //Copy the XML into the new part. using (StreamWriter ts = new StreamWriter(customXmlPart.GetStream())) ts.Write(customXML); } } Step 4 – Generating the Resulting Document After the document contains the data, you save the file as seen in the following code. protected void GenerateContractButton_Click(object sender, EventArgs e) { string strTemp = Environment.GetEnvironmentVariable("temp"); string strFileName = String.Format("{0}\\{1}.dotx", strTemp, Guid.NewGuid().ToString()); File.Copy(Server.MapPath(@"App_Data/Contract of Sale.dotx"), strFileName); GetData(); string customXml = File.ReadAllText(Server.MapPath(@"App_Data/datatemp.xml")); ReplaceCustomXML(strFileName, customXml); //Return it to the client - strFile has been updated, so return it. Response.ClearContent(); Response.ClearHeaders(); Response.AddHeader("content-disposition", "attachment; filename=Conract of Sale.dotx"); Response.ContentEncoding = System.Text.Encoding.UTF8; Response.TransmitFile(strFileName); Response.Flush(); Response.Close(); //Delete the temp file. File.Delete(strFileName); File.Delete(Server.MapPath(@"App_Data/datatemp.xml")); } You generated the document with content controls bound to the XML data. The resulting file looks similar to the following figure. To show how fast this solution is, executing the code to create 100 documents on a server took just 1.166 seconds. In Creating Documents by Using the Open XML Format SDK Version 2.0 CTP (Part 1 of 3), Creating Documents by Using the Open XML Format SDK 2.0 CTP (Part 2 of 3), Creating Documents by Using the Open XML Format SDK 2.0 (Part 3 of 3), you see just a sample of ways that the Open XML Format SDK APIs can simplify integrating various data sources with programs in the 2007 version of the Microsoft Office system. With a little imagination, you can modify these applications to fit your own requirements. For more information about the Open XML Format SDK see the following resources:
https://msdn.microsoft.com/en-us/library/dd469465(v=office.14)
CC-MAIN-2015-18
en
refinedweb
Re: Singletons? - From: Ian Shef <invalid@xxxxxxxxxxxxx> - Date: Tue, 13 Jun 2006 19:32:10 GMT Mark Space <markspace@xxxxxxxxxxxxx> wrote in news:FEDjg.147331$F_3.107067 @newssvr29.news.prodigy.net: Hi all! I'm trying out some new Java code. I was surprised to find that Java doesn't allow the static keyword for classes. How was I to implement singleton objects then? Well, a quick web search and I've got the answer, but now I have a few other questions on the JVM and compiler. Let's say I have a class entirely of static methods: public class anAPI { static void methodA {} static void methodB {} } I don't know the answer to your questions, but you can sidestep the questions by defining a no-argument constructor and giving it the "private" keyword. This way, there is no way that this class can be instantiated unless one of its own static methods does the deed. [Well, maybe there is a cheat via reflection.] Your questions are still valid, and I am interested in the answers myself. -- Ian Shef 805/F6 * These are my personal opinions Raytheon Company * and not those of my employer. PO Box 11337 * Tucson, AZ 85734-1337 * . - Follow-Ups: - Re: Singletons? - From: Mark Space - Re: Singletons? - From: Oliver Wong - References: - Singletons? - From: Mark Space - Prev by Date: Re: Check if your IDE properly syntax-highlights this code. - Next by Date: Re: Singletons? - Previous by thread: Re: Singletons? - Next by thread: Re: Singletons? - Index(es):
http://coding.derkeiler.com/Archive/Java/comp.lang.java.help/2006-06/msg00240.html
CC-MAIN-2015-18
en
refinedweb
[ ] Dmitry Irlyanov commented on HARMONY-4610: ------------------------------------------ Yes, BoxPainter is the one of possible ways to resolve this issue, but placing the description in default.css is incorrect because <img> is special tag for css and there is another issue: our css implementation understands simple selectors only. In general the problem is wider, as you stated: in HTML every inline element can have border I think it is the new issue to resolve. And implementation css-specified selectors like a[href] and img:link is another issue to implement But I think restriction html in swing is acceptable because swing itself have much more possibilities to process text. > [classlib][swing][html]Border and spacing attributes processing are unimplemented > --------------------------------------------------------------------------------- > > Key: HARMONY-4610 > URL: > Project: Harmony > Issue Type: Bug > Reporter: Dmitry Irlyanov > Assignee: Alexey Petrenko > Attachments: example.jpg, H4610-ImageView.patch, Harmony output.jpg, RI output.jpg > > > When one trying to draw a border for an image in html file one can add border attribute in img tag. For harmony it doesn't work > import java.net.URL; > import javax.swing.JEditorPane; > import javax.swing.JFrame; > public class Test { > private final static URL url = Test.class.getResource("example.jpg"); > > /** > * @param args > */ > public static void main(String[] args) { > > JEditorPane editorPane = new JEditorPane( > "text/html", > "<img src=\"" + url + "\" width=100 height=100" > + " border=10 hspace=30 vspace=30 align=center alt=\"test\">" > ); > > JFrame frame = new JFrame("Test"); > frame.add(editorPane); > frame.setSize(400, 300); > frame.setVisible(true); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
http://mail-archives.apache.org/mod_mbox/harmony-commits/200708.mbox/%3C26978357.1187268933192.JavaMail.jira@brutus%3E
CC-MAIN-2015-18
en
refinedweb
// test 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 // convert single char to bin 1's and 0's // ascii chart #include <iostream> #include <cmath> using namespace std; int main() { char character; int i; int m[8]; cout <<"Please enter a character: "; cin >> character; cout <<"You entered: "<<character <<endl; for(i=0;i<8;i++) { // I see this line outputs the binary numbers in reverse order // but I can't figure out the logic. m[i] = character%2; cout << "character%2 = " << character%2; // test cout << "\tcharacter = " << character; // test // I can not figure out this at all, 1/2 hex a should be 30 // The only thing I can think of is half the decimal digit 0, which is 48. character = character/2; cout << "\tcharacter/2 = " << character/2 << endl; // test } int top, bottom; for(bottom=0,top =7; bottom<8; bottom++,top--) { cout<<m[top]; } return 0; } /* OUTPUT Please enter a character: a You entered: a character%2 = 1 character = a character/2 = 24 character%2 = 0 character = 0 character/2 = 12 character%2 = 0 character = ? character/2 = 6 character%2 = 0 character = ? character/2 = 3 character%2 = 0 character = ? character/2 = 1 character%2 = 1 character = ? character/2 = 0 character%2 = 1 character = ? character/2 = 0 character%2 = 0 character = character/2 = 0 01100001 */
http://www.cplusplus.com/forum/general/91195/
CC-MAIN-2015-18
en
refinedweb
Pimoroni Enviro pHAT Enviro pHAT by Pimonori is a small and handy addition to Raspberry Pi versions 2, 3 and 4 as well as compact Raspberry Pi Zero. It features several sensors to measure various "environmental" variables such as temperature, pressure, light level and colour, 3-axis motion, compass heading, and input voltage[1]. Currently, this version is discontinued and Enviro (which is a pHat too, technically) is suggested as more advanced replacement. Overview Enviro pHAT is a HAT/pHAT board, which is connected to Raspberry Pi board via 40-pin GPIO header mount. Note that only difference between Hat and pHAT is that the latter has is designed especially to work Raspberry Pi Zero and fits its form factor. However, due to certain compatibility between the Raspberry Pi versions and revisions as well as other similar products (e.g. Orange, Banana Pi) it will work with them too. The pHat comes as a single board with separate pinout headers, which should be soldered prior to installation on Raspberry Pi board[2]. It uses 3 GPIO pins (#2,3,4) and 5V power and communicates over i2c interface[3]. To be mounted properly, the board should be oriented in a way so it is mounted "atop" the Raspberry Pi. To read the pHAT sensors one can use dedicated python library or dev-libs/pigpio and sys-apps/i2c-tools packages for a direct access to the GPIO pins . The following instructions are tested on Raspberry Pi 2 Model B and Enviro pHAT. Modern Enviro (not tested due to the lack of equipment) will require different python library, however, general approach would be the same. Installation consists of the following steps: - enabling hardware configuration in /boot/config.txt, - checking kernel configuration and modules, - UDEV configuration, - software installation. Hardware and config.txt The pHat communicates with Raspberry Pi via I2C interface, so it should be enabled in the /boot/config.txt file, used to configure interfaces and Pi itself on the boot. Add those lines in addition to the ones present: /boot/config.txt ## --- Enviro pHAT configuration --- ## enabling required interfaces dtparam=i2c_arm=on dtparam=i2c=on dtparam=i2c_arm_baudrate=100000 Last line sets the i2c speed with 100KHz ( default frequency) which can be changed if needed. Configuring the kernel One needs essentially i2c_dev and i2c_bcm2835 (and i2c_bcmstb on RPi 4) modules for I2C communication. Raspberry Pi kernel distribution[4] already has necessary modules pre-compiled. Alternatively, using default kernel configuration bcmrpi_defconfig, bcm2709_defconfig, bcm2711_defconfig for the appropriate target will select necessary modules. Otherwise check if you have these modules selected. Device Drivers ---> I2C support ---> <M> I2C device interface I2C Hardware Bus support ---> <M> Broadcom BCM2835 I2C controller <M> BRCM Settop/DSL I2C controller While the i2c_bcm2835 (and i2c_bcmstb on RPi 4) is normally loaded automatically during the boot, i2c_dev is not. Create a /etc/modules-load.d/envirophat.conf and add the module there: root # mkdir /etc/modules-load.d/ root # echo "i2c_dev" >> /etc/modules-load.d/envirophat.conf During the boot the modules the modules service will load it. UDEV configuration When the udev service runs it populates /dev with existing devices, including /dev/gpiomem and /dev/i2-* (normally, /dev/i2-1), which are the GPIO pins and i2c bus, which the Enviro pHat is connected to. Currently on Gentoo these devices are created with root:root ownership, however, it is more handy to change this policy so the devices are created with gpio and i2c groups, respectively, so the users can have access to them, given added to those groups. root # emerge acct-group/i2c acct-group/gpio root # echo 'KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"' >> /etc/udev/rules.d/60-i2c-tools.rules root # echo 'KERNEL=="gpiomem", GROUP="gpio", MODE="0660"' >> /etc/udev/rules.d/60-gpiomem.rules root # usermod -a -G i2c gpio <your user> If the Enviro pHat is already installed on the Raspberry Pi board at this point, one can either simply reboot, or modprobe the modules and restart the udev. root # modprobe i2c_dev root # /etc/init.d/udev restart Check if the devices are present and have correct permissions. root # ls /dev/i2* -al Software installation Install the sys-apps/i2c-tools to check whether pHat is detected via i2c. root # emerge sys-apps/i2c-tools user $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- 1d -- -- 20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- 77 There is an official python package used to interact with the Enviro pHat[5], however it is not currently present in the main tree, so one may use dev-python/pip to install them. root # emerge dev-python/pip Then, from the user added to the i2c and gpio groups in the previous section, install the required packages. Currently (as of writing this page, Oct 2021) running just pip install --user envirophatwill fail. The smbus package is not installed as a dependency and last stable version of RPi.GPIO fails with dev-lang/python:3.9, so alpha version should be manually installed instead. user $ pip install --user RPi.GPIO==0.7.1a4 user $ pip install --user smbus user $ pip install --user envirophat If the import envirophat works in python then, everything is configured correctly and works. E.g. create small python script file: ~/env_pHat_check.py import envirophat print("Temperature reading is %2.2f°C" %(envirophat.weather.temperature())) and check if the sensor reads the temperature outside the pHAT. user $ python ~/env_pHat_check.py Temperature reading is 27.30°C The last line is an example output, your temperature will be different! If it worked, then everything is set up for non-root user usage. Further reading Checkout more for examples at official getting started page[6] and an example of more depth-in applications [7]. References - ↑ [1] Enviro pHAT in Pimonori shop. - ↑ [2] Some soldering instructions. - ↑ [3] Pinout of the Enviro pHat. - ↑ [4] Official Raspberry Pi repository containing pre-compiled binaries of the kernel and modules and more. - ↑ [5] Github repository of the official python library. - ↑ [6] Official getting started page - ↑ [7] Temperature Streamer/Logger example
https://wiki.gentoo.org/wiki/Pimoroni_Enviro_pHAT
CC-MAIN-2021-43
en
refinedweb
The motivation: why doing it? Now we have a production build which works great, but when search engines look at your site they will see> and will have no idea what this site is about and how to index it. Good search engines like Google will render the JS and will get the right idea but there are also other benefits of having SSR. Benefits: – Quicker page render. Once the source code is there, with all assets (CSS, JS, Images, fonts, etc) is sent to the browser, it could start render it and it could show the site like it was already ready for use (although the events won’t be attached at this point and the site won’t be really ‘clickable’ the user will at least see a fully rendered site which gives him the perception of a fully ready site) – SCO benefits – Pages could be pre-rendered on the server and cached. So. let’s dive into this: SSR Checklist This might be more complicated task that we would expect so let’s outline a checklist of what have to be done to achieve SSR: - Fetch all GraphQL queries on the backend before start generating the source code. Some components rely on having their data fetched from GraphQL before render. For example, If you remember we dynamically fetch the page components layout from GraphQL so in order to serve the page source, we have to make the page query and return the list of all components for the current route. For example the ‘/home’ page should hare 2 components: header and Home components. - Make sure that bundle splitting will continue work. - Fetch only assets that are necessary to be served for each particular route. We have to pre-render the page, and figure out which JS and CSS bundles should be added in the source code. For example for the home page ‘/home’ we have to include: <script src=’dist/header.js’/></script> <link href=”/dist/header.css”/><script src=’dist/home.js’/></script> <link href=”/dist/home.css”/> - Finally fetch the source code string and send it to the browser. Adding server side rendering (SSR). Let’s start with adding the server side rendering script, and the script that will run it. Adding ssr build script ./package.json "scripts": { "start-cli": "webpack-dev-server --hot --history-api-fallback --config webpack.cli.config.js", "start-api": "babel-node server-api.js", "start-middleware": "babel-node server-middleware.js", "clean": "rm -rf ./dist ./server-build", "lint": "eslint .", "build-dev": "webpack --mode development", "build-prod": "webpack --config webpack.prod.config.js", "build-ssr": "webpack --config webpack.server.config.js", "run-server": "node ./server-build/server-bundle.js", "start": "yarn clean; yarn build-prod; yarn build-ssr; yarn run-server" }, what we just did: – (line 9) adding build-ssr script to bundle the express server into a executable JS – (line 10) adding start script to run the express server which will: 1. send the page source to the browser. 2. serve the static production bundle. 3. serve all other assets (images, fonts, etc) – remove run-prod-server and build-and-run-prod-server since we are replaced them with the new scripts. – add `server-build` to the cleaning script since this is the location where the server bundle will be dumped. Creating SSR config Since most of the configuration will be similar to the production config, let’s start by copying the production config into a new file called ./webpack.ssr.config.js and do some adjustments specific for SSR. ./webpack.ssr.config.js const path = require('path'); const webpack = require('webpack'); const nodeExternals = require('webpack-node-externals'); let config = require('./webpack.base.config.js'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); config.mode = "production"; config.devtool = ""; config.target = "node"; config.externals = [nodeExternals()]; config.entry = { server: './ssr-server.js' } config.output = { filename: '[name]-bundle.js', path: path.resolve(__dirname, 'server-build') } config.module.rules[1].use[0] = MiniCssExtractPlugin.loader; config.plugins = [ ... config.plugins, ... [ new MiniCssExtractPlugin({ filename: "[name].css" }), new OptimizeCSSAssetsPlugin({}), // on the server we still need one bundle new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }) ] ]; module.exports = config; what we just did: – (line 10) we told Webpack that this bundle will not run in the browser but in the ‘node’ environment. – (line 11) we aded Webpack Node Externals which will remove the node_modules which we don’t need when execute in ‘node’ environment. – (line 14) specifies a new entry point for the SSR, that will run the express server (similar to the one that we built for production) – (line 31) on the server side we still need one bundle file. Now let’s add the missing module: yarn add webpack-node-externals --dev Adding Express server This is going to be the same Express server that we added in the previous chapter to serve the production requests, but settings will be much more complex to fit the SSR needs. Create ssr-server.js with the following content: ./ssr-server.js import React from 'react'; import express from 'express'; import App from './src/components/App/ssr-index'; import Loadable from 'react-loadable'; import manifest from './dist/loadable-manifest.json'; import { getDataFromTree } from "react-apollo"; import { ApolloClient } from 'apollo-client'; import { InMemoryCache } from 'apollo-cache-inmemory'; import { renderToStringWithData } from "react-apollo" import { createHttpLink } from 'apollo-link-http'; import { getBundles } from 'react-loadable/webpack'; const PORT = process.env.PROD_SERVER_PORT; const app = express(); app.use('/server-build', express.static('./server-build')); app.use('/dist', express.static('dist')); // to serve frontent prod static files app.use('/favicon.ico', express.static('./src/images/favicon.ico')); app.get('/*', (req, res) => { const GRAPHQL_URL = process.env.GRAPHQL_URL; const client = new ApolloClient({ ssrMode: true, link: createHttpLink({ uri: GRAPHQL_URL, fetch: fetch, credentials: 'same-origin', headers: { cookie: req.header('Cookie'), }, }), cache: new InMemoryCache() }); // Prepare to get list of all modules that have to be loaded for this route const modules = []; const mainApp = ( <Loadable.Capture report={moduleName => modules.push(moduleName)}> <App req={req} client={client} /> </Loadable.Capture> ); // Execute all queries and fetch the results before continue getDataFromTree(mainApp).then(() => { // Once we have the data back, this will render the components with the appropriate GraphQL data. renderToStringWithData().then( (HTML_content) => { // Extract CSS and JS bundles const bundles = getBundles(manifest, modules); const cssBundles = bundles.filter(bundle => bundle && bundle.file.split('.').pop() === 'css'); const jsBundles = bundles.filter(bundle => bundle && bundle.file.split('.').pop() === 'js'); res.status(200); res.send(`< --> ${ cssBundles.map( (bundle) => (` <link href="${bundle.publicPath}" rel="stylesheet" as="style" media="screen, projection" type="text/css" charSet="UTF-8" />`)).join('\n') } <!-- Page specific JS bundle chunks --> ${jsBundles .map(({ file }) => `<script src="/dist/${file}"></script>`) .join('\n')} <!-- =========================== --> </head> <body cz- <div id="root"/> ${HTML_content} </div> <script> window.__APOLLO_STATE__=${JSON.stringify(client.cache.extract())}; </script> <script src="/dist/main-bundle.js"></script> </body> </html>`); res.end(); }); }).catch( (error) => { console.log("ERROR !!!!", error); }); }); Loadable.preloadAll().then(() => { app.listen(PORT, () => { console.log(`😎 Server is listening on port ${PORT}`); }); }); what we just did: Clearly a lot of stuff so let’s take one step at a time. – We created express server similar to the one we did for production in the previous chapter. – (line 13,14) we created the server, telling it to run on the port that we will specify in the .env file later in this tutorial. – (line 20) we are telling Express to listen to any request pattern, except for these above described in app.use – (line 53) sending the html to the browser. – We fetch the data for all queries in the app before continue. – (lines 21-33) We created the Apollo client. – (line 44) calling getDataFromTree from react-apollo will walk through the React tree to find any components that make GraphQL requests. It will execute the queries and return a promise. – (line 46) calling renderToStringWithData will render the app with the necessary GraphQL data. – (line 90) since we already fetched all data, we are going to stringify it, and attach it to the window object so it could be re-used on the client side. this part is very important. It does so called Store hydration. If we miss it we will end up making twice more queries to GraphQL: one set on the server side, and one set on the client side. – We get a list of all components that will have to render for the particular route, and create appropriate SCRIPT and LINK tags to load JS and CSS only for these components. – (line 38) we use Loadable.Capture from react-loadable to create an array of all components that exist in the particular route and store it in modules = [] – (lines 48 – 50) Will extract the CSS and JS bundle file lists – ( lines 67 – 83) will traverse CSS and JS arrays and will create the appropriate CSS and JS tags to include the components that are about to render in this particular route. – (line 104) is going to pre-load all the components before continue so we won’t see just the “loading” component. One very important step that could be easily forgotten is to add react-loadable/babel plug-in into .babelrc otherwise we are going to wonder why the assets list is never created. ./.babelrc { "presets": [ "@babel/preset-env", "@babel/preset-react" ], "plugins": [ "@babel/plugin-syntax-dynamic-import", "react-loadable/babel" ] } Also let’s add PROD_SERVER_PORT to our .env file ./env APP_NAME=Webpack React Tutorial GRAPHQL_URL= PROD_SERVER_PORT=3006 and make it available on the front end so Express could pick it up. ./getEnvironmentConstants.js const fs = require('fs'); // Load environment variables from these files const dotenvFiles = [ '.env' ]; // expose environment variables to the frontend const frontendConstants = [ 'APP_NAME', 'GRAPHQL_URL', 'PROD_SERVER_PORT' ]; function getEnvironmentConstants() { dotenvFiles.forEach(dotenvFile => { if (fs.existsSync(dotenvFile)) { require('dotenv-expand')( require('dotenv').config({ path: dotenvFile, }) ); } }); const arrayToObject = (array) => array.reduce((obj, item, key) => { obj[item] = JSON.stringify(process.env[item]); return obj }, {}) return arrayToObject(frontendConstants); } module.exports = getEnvironmentConstants; Adding ./components/App/ssr-index.js Now if we look again at ./ssr-server.js (line 3) we will see that we are not pointing the App module to the index.js but to ssr-index.js instead, and the reason for this is that on the server things will be slightly different. First we can’t use BrowswerRouter because clearly there is no browser in a node environment. We have to use StaticRouter instead. Second, we don’t need to instantiate a new ApolloClient since we already did this in ./ssr-server.js file above. We are just going to pass it as a client param. With that being said, let’s go ahead and create: ./components/App/ssr-index.js import React from 'react'; import PageLayout from '../../containers/PageLayout'; import { StaticRouter, Route, Switch } from 'react-router-dom'; import { ApolloProvider } from 'react-apollo'; import { Provider } from 'react-redux'; import { createStore} from 'redux'; import reducers from '../../reducers'; import fetch from 'isomorphic-fetch'; import styles from './styles.scss'; const store = createStore(reducers, {}); export default ( {req, client} ) => { const context = {}; return ( <div className={styles.appWrapper}> <Provider store={store}> <ApolloProvider client={client}> <StaticRouter location={ req.url } context={context}> <Switch> <Route exact path="*" component={PageLayout} /> </Switch> </StaticRouter> </ApolloProvider> </Provider> </div> ); } DOM Hydration We did almost all necessary steps for SSR but if we run the app we will see that we are not taking the advantage of the server side rendering and the app will reload on the client side. We still need to do two important things: DOM hydration and Store rehydration. DOM hydration is going to attach the events to the existing HTML layout returned from the SSR. Adding it is pretty straight forward: we have to replace ReactDOM.render with ReactDOM.hydrate. ./src/index.js import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; ReactDOM.hydrate(<App/>, document.getElementById('root')); if (module.hot) { module.hot.accept(); } Apollo store rehydration This is also pretty straight forward. If we go back in this tutorial we could haver recall that when we create ./ssr-server.js we fetched the data for all queries, and attached it to the window object (line 90) Now, let’s use this: ./src/components/App/index.js import React from 'react'; import PageLayout from '../../containers/PageLayout'; import { ApolloProvider } from 'react-apollo'; import { ApolloClient } from 'apollo-client'; import { HttpLink } from 'apollo-link-http'; import { InMemoryCache } from 'apollo-cache-inmemory'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import { Provider } from 'react-redux'; import { createStore} from 'redux'; import reducers from '../../reducers'; const styles = require('./styles.scss'); const store = createStore(reducers, {}); export default ( {req} ) => { const GRAPHQL_URL = process.env.GRAPHQL_URL; const client = new ApolloClient({ link: new HttpLink({ uri: GRAPHQL_URL }), cache: new InMemoryCache().restore(window.__APOLLO_STATE__), }); return ( <div className={styles.appWrapper}> <Provider store={store}> <ApolloProvider client={client}> <Router> <Switch> <Route exact path="*" component={PageLayout} /> </Switch> </Router> </ApolloProvider> </Provider> </div> ); } Ready for a test flight Finally we are ready to test flight this beast. yarn start and navigate the browser there localhost:3006/home The response time should be mind blowing with all prod settings and SSR in place. Open the source code and you should see something like this: < --> <link href="/dist/2.css" rel="stylesheet" as="style" media="screen, projection" type="text/css" charSet="UTF-8" /> <link href="/dist/3.css" rel="stylesheet" as="style" media="screen, projection" type="text/css" charSet="UTF-8" /> <!-- Page specific JS bundle chunks --> <script src="/dist/2-bundle.js"></script> <script src="/dist/3-bundle.js"></script> <!-- =========================== --> </head> <body cz- <div id="root"/> <div class="App-appWrapper" data-<div><div><div class="Header-wrapper"><h2> <!-- -->Webpack React Tutorial<!-- --> </h2><ul><li><a href="/home">HOME</a></li><li><a href="/greetings">GREETINGS</a></li><li><a href="/dogs-catalog">DOGS CATALOG</a></li><li><a href="/about">ABOUT</a></li></ul></div></div><div><div class="Home-wrapper">This is my home section!</div></div></div></div> </div> <script> window.__APOLLO_STATE__={"Page:home":{"id":"home","url":"/home","layout":[{"type":"id","generated":true,"id":"Page:home.layout.0","typename":"PageLayout"},{"type":"id","generated":true,"id":"Page:home.layout.1","typename":"PageLayout"}],"__typename":"Page"},"Page:home.layout.0":{"span":"12","components":[{"type":"id","generated":true,"id":"Page:home.layout.0.components.0","typename":"PageComponents"}],"__typename":"PageLayout"},"Page:home.layout.0.components.0":{"name":"Header","__typename":"PageComponents"},"Page:home.layout.1":{"span":"12","components":[{"type":"id","generated":true,"id":"Page:home.layout.1.components.0","typename":"PageComponents"}],"__typename":"PageLayout"},"Page:home.layout.1.components.0":{"name":"Home","__typename":"PageComponents"},"ROOT_QUERY":{"getPageByUrl({\"url\":\"/home\"})":{"type":"id","generated":false,"id":"Page:home","typename":"Page"}}}; </script> <script src="/dist/main-bundle.js"></script> </body> </html> As you might notice, (lines 15-37) that only the bundles for the components that we need there are loaded. Also you will see the Apollo client (The GraphQL queries) serialized and attached to the window object (line 44) which we are using to re-hydrate the client and avoid another GraphQL call. Well, this could have been as far as a production ready stack, but two important things are missing: tests and caching. But this is good enough as an end of this chapter.
https://www.toni-develops.com/2018/09/10/server-side-rendering/
CC-MAIN-2021-43
en
refinedweb
You're reading the documentation for a development version. For the latest released version, please have a look at Galactic. Debugging tf2 problems Goal: Learn how to use a systematic approach for debugging tf2 related problems. Tutorial level: Advanced Time: 10 minutes Contents Background This tutorial walks you through the steps to debug a typical tf2 problem. It will also use many of the tf2 debugging tools, such as tf2_echo, tf2_monitor, and view_frames. This tutorial assumes you have completed the learning tf2 tutorials. Debugging example 1 Setting and starting the example For this tutorial we will set up a demo application that has a number of problems. The goal of this tutorial is to apply a systematic approach to find and tackle these problems. First, let’s create the source file. Go to the learning_tf2_cpp package we created in tf2 tutorials. Inside the src directory make a copy of the source file turtle_tf2_listener.cpp and rename it to turtle_tf2_listener_debug.cpp. Open the file using your preferred text editor, and change line 67 from std::string to_frame_rel = "turtle2"; to std::string to_frame_rel = "turtle3"; and change lookupTransform() call in lines 75-79 from try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, tf2::TimePointZero); } catch (tf2::TransformException & ex) { to try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, this->now()); } catch (tf2::TransformException & ex) { And save changes to the file. In order to run this demo, we need to create a launch file start_tf2_debug_demo.launch.py in the launch subdirectory of package learning_tf2_cpp: from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.substitutions import LaunchConfiguration from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ DeclareLaunchArgument( 'target_frame', default_value='turtle1', description='Target frame name.' ), Node( package='turtlesim', executable='turtlesim_node', name='sim', output='screen' ), Node( package='learning_tf2_cpp', executable='turtle_tf2_broadcaster', name='broadcaster1', parameters=[ {'turtlename': 'turtle1'} ] ), Node( package='learning_tf2_cpp', executable='turtle_tf2_broadcaster', name='broadcaster2', parameters=[ {'turtlename': 'turtle2'} ] ), Node( package='learning_tf2_cpp', executable='turtle_tf2_listener_debug', name='listener_debug', parameters=[ {'target_frame': LaunchConfiguration('target_frame')} ] ), ]) Don’t forget to add the turtle_tf2_listener_debug executable to the CMakeLists.txt and build the package. Now let’s run it to see what happens: ros2 launch learning_tf2_cpp start_tf2_debug_demo.launch.py You will now see that the turtlesim came up. At the same time, if you run the turtle_teleop_key in another terminal window, you can use the arrow keys to drive the turtle1 around. ros2 run turtlesim turtle_teleop_key You will also notice that there is a second turtle in the lower, left corner. If the demo would be working correctly, this second turtle should be following the turtle you can command with the arrow keys. However, it is not the case because we have to solve some problems first. You should notice the following message: [turtle_tf2_listener_debug-4] [INFO] [1630223454.942322623] [listener_debug]: Could not transform turtle3 to turtle1: "turtle3" passed to lookupTransform argument target_frame does not exist 2 Finding the tf2 request Firstly, we need to find out what exactly we are asking tf2 to do. Therefore, we go into the part of the code that is using tf2. Open the src/turtle_tf2_listener_debug.cpp file, and take a look at line 67: std::string to_frame_rel = "turtle3"; and lines 75-79: try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, this->now()); } catch (tf2::TransformException & ex) { Here we do the actual request to tf2. The three arguments tell us directly what we are asking tf2: transform from frame turtle3 to frame turtle1 at time now. Now, let’s take a look at why this request to tf2 is failing. 3 Checking the frames Firstly, to find out if tf2 knows about our transform between turtle3 and turtle1, we will use tf2_echo tool. ros2 run tf2_ros tf2_echo turtle3 turtle1 The output tells us that frame turtle3 does not exist: [INFO] [1630223557.477636052] [tf2_echo]: Waiting for transform turtle3 -> turtle1: Invalid frame ID "turtle3" passed to canTransform argument target_frame - frame does not exist Then what frames do exist? If you like to get a graphical representation of this, use view_frames tool. ros2 run tf2_tools view_frames Open the generated frames.pdf file to see the following output: So obviously the problem is that we are requesting transform from frame turtle3, which does not exist. To fix this bug, just replace turtle3 with turtle2 in line 67. And now stop the running demo, build it, and run it again: ros2 launch turtle_tf2 start_debug_demo.launch.py And right away we run into the next problem: [turtle_tf2_listener_debug-4] [INFO] [1630223704.617382464] [listener_debug]: Could not transform turtle2 to turtle1: Lookup would require extrapolation into the future. Requested time 1630223704.617054 but the latest data is at time 1630223704.616726, when looking up transform from frame [turtle1] to frame [turtle2] 4 Checking the timestamp Now that we solved the frame name problem, it is time to look at the timestamps. Remember, we are trying to get the transform between turtle2 and turtle1 at the current time (i.e., now). To get statistics on the timing, call tf2_monitor with corresponding frames. ros2 run tf2_ros tf2_monitor turtle2 turtle1 The result should look something like this: RESULTS: for turtle2 to turtle1 Chain is: turtle1 Net delay avg = 0.00287347: max = 0.0167241 Frames: Frame: turtle1, published by <no authority available>, Average Delay: 0.000295833, Max Delay: 0.000755072 All Broadcasters: Node: <no authority available> 125.246 Hz, Average Delay: 0.000290237 Max Delay: 0.000786781 The key part here is the delay for the chain from turtle2 to turtle1. The output shows there is an average delay of about 3 milliseconds. This means that tf2 can only transform between the turtles after 3 milliseconds are passed. So, if we would be asking tf2 for the transformation between the turtles 3 milliseconds ago instead of now, tf2 would be able to give us an answer sometimes. Let’s test this quickly by changing lines 75-79 to: try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, this->now() - rclcpp::Duration::from_seconds(0.1)); } catch (tf2::TransformException & ex) { In the new code we are asking for the transform between the turtles 100 milliseconds ago. It is usual to use a longer periods, just to make sure that the transform will arrive. Stop the demo, build and run: ros2 launch turtle_tf2 start_debug_demo.launch.py And you should finally see the turtle move! That last fix we made is not really what you want to do, it was just to make sure that was our problem. The real fix would look like this: try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, tf2::TimePointZero); } catch (tf2::TransformException & ex) { Or like this: try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, tf2::TimePoint()); } catch (tf2::TransformException & ex) { You can learn more about timeouts in the Learning about tf2 and time tutorial, and use them as below: try { transformStamped = tf_buffer_->lookupTransform( toFrameRel, fromFrameRel, this->now(), rclcpp::Duration::from_seconds(0.05)); } catch (tf2::TransformException & ex) {
https://docs.ros.org/en/ros2_documentation/rolling/Tutorials/Tf2/Debugging-Tf2-Problems.html
CC-MAIN-2021-43
en
refinedweb
Much Ado About Monads – Reader Edition In the previous post, we talked a bit about the State Monad, what it is and how you could use it today in your F# application. But, with any new piece of information such as this, it should be taken in context, and there are other patterns as well when dealing with a multi-paradigm language such as F#. We also talked about how the State Monad might not have been the best choice for modeling our web scripting DSL as our browser state is encapsulated in the Browser class, and once it is set, it doesn’t change. With that, we could turn our eyes to using the Reader Monad as we read from our environment. Reading From Our Environment If you recall from the previous post, we had a simple example of keeping track of browser state our ultimate goal was to have the state managed for us underneath the covers. When dealing with the State Monad, each bind call would not only return us our calculated value, but also our new state as well. In this case, this was wasteful due to the fact that once the state was set, it never changed, as the state was fully encapsulated inside the Browser object. So, our ultimate goal would be instead to have our environment set once and then read from it implicitly. We still want to keep what we have here in terms of our script, but change the underlying mechanism for how it happens: [<Fact>] let ``Can find CodeBetter on Bing``() = reader { do! openPage "" do! enterText "q" "CodeBetter" do! clickButton "go" let! result = containsText "CodeBetter" isTrue result do! closePage } |> runScript As the State Monad allows us to plumb a piece of mutable state through our code, the Reader Monad helps us pass immutable state around underneath the covers. This immutable state could be anything, such as configuration data, environment variables and so on. Instead of relying on a static dependency like the Environment or ConfigurationManager class within .NET, you might imagine having some abstraction passed around implicitly inside the Reader Monad. This way, our testing scenarios become easier as we don’t have to try and mock static calls. Just as well, you can abstract other items behind the scenes as well such as locks, transactions and so forth. Now that we defined the problem and generally speaking what the Reader Monad is, let’s go ahead and define it. To do this, we’ll need an overarching container to describe this environment that we’re maintaining. In this case, we have the Reader<’r,’a> type which the ‘a is our result type and the ‘r is our type of our environment. This Reader type has a constructor that takes a function which takes our environment parameter and returns our result. type Reader<'r,'a> = Reader of ('r -> 'a) In addition, we’ll need a way to run our Reader so that we can provide it with our environment and return our calculated value. Let’s create a function called runReader which takes our Reader and our environment, and returns our calculated value. // val runReader : Reader<'a,'b> -> 'a -> 'b let runReader (Reader r) env = r env Before we get to some of our helper functions, let’s get to the monad part.. You should recall that our return function must have the following signature, keeping in mind that M defined below is our monadic type. val returnF : 'a -> M<'a> In the case of the Reader Monad, it should look like this where we take in a value and return a Reader of our environment and return value. val returnF : 'a -> Reader<'r,'a> Now, let’s look at the implementation. In the case of return, we simply return a Reader with the constructed function taking in any value and returning our calculated value. Our return value should be the same no matter what the environment value that is passed in, so we can safely ignore it. let returnF a = Reader (fun _ -> a) Next, we need to define the bind operation. As you may recall, our bind operation must look like the following code, keeping in mind that M defined below is our monadic type. val bind : M<'a> -> ('a -> M<'b>) -> M<'b> In the case of our Reader Monad, it should look like this: val bind : Reader<'r,'a> -> ('a -> Reader<'r, 'b>) -> Reader<'r, 'b> Let’s break this down a little more to show what is really going on underneath the covers. val bind : ('r -> 'a) -> ('a -> 'r -> 'b) -> ('r -> 'b) What we see is that the first argument is a function which takes our environment and produces a our calculated value. Our second argument is a function that takes a value and our environment and then generates our new calculated value. What our goal is to combine these two functions into a larger function from our environment to our new calculated value. let bind m k = Reader (fun r -> runReader (k (runReader m r)) r) What we did above is make our environment available to both the inside execution and outside execution of our runReader. Taking these two functions together, the bind and return, we can now create a builder which can provide us some syntactic sugar when writing functions using the Reader Monad. type ReaderBuilder() = member this.Return(a) = Reader (fun _ -> a) member this.Bind(m, k) = Reader (fun r -> runReader (k (runReader m r)) r) By no means are these two the only methods that we could implement, and in fact, there are quite a few more we could do, but that’s for the next post. Now, we need to revisit some helper functions that are necessary when dealing with the Reader Monad. For example, how can we get our current environment? All we have to do is ask: // val ask : Reader<'r,'r> let ask = Reader (id) What this function simply does is return our environment to us by using the id function, which is to say that you return what you are given. As you recall, our Reader has a constructing function with ‘r –> ‘a and in this case, the ‘a will also be the ‘r. Also, instead of just returning our environment, what about also providing a function that applies a function over our environment as well? Let’s implement that as asks: // val asks : ('r -> 'a) -> Reader<'r,'a> let asks f = reader { let! r = ask return (f r) } One more function to consider is the local function. This function allows us to execute a given function on a modified environment. The local function takes a function which modifies the environment as well as a reader to run, and the returns a reader with the changed environment. This doesn’t change the environment globally, but gives you a way to locally change the environment and execute a function against it. // val local : ('r1 -> 'r2) -> Reader<'r1,'a> -> Reader<'r2,'a> let local f m = Reader (f >> runReader m) The function implementation is fairly straight forward as it returns a Reader with the constructing function that first executes the f function on the environment, and then we run our Reader parameter against this new environment value. Now that we’ve got some basic ideas, let’s venture into a scenario or two. A Scenario Let’s look at a scenario for how we might use the Reader Monad. One interesting example came from Greg Neverov to handle locks as the environment using this monad. Let’s look at that a little deeper. In order to support such a scenario, we’d need a few pieces. First, we would need the ability to run a particular reader while handling the locking behind the scenes. Let’s take a look at what that would entail: open System.Threading let tryRunLock lock m = let lock = box lock let lockTaken = ref false Monitor.Enter(lock, lockTaken) match !lockTaken with | true -> try Some(runReader m lock) finally Monitor.Exit lock | _ -> None Our tryRunLock function takes a lock and our reader that we wish to execute. We call Monitor.Enter with our lock that has been boxed and a flag to determine whether the lock has been taken. We then check whether the lock has been taken and if so, we return Some of our Reader result, else we return None to indicate a failure. Next, we need the ability to notify all waiting threads that there has been a change in our state. To do that, we must call the Monitor.PulseAll method. let pulseAll = Reader Monitor.PulseAll Here we partially applied the environment to the Monitor.PulseAll method call so there was no need to specify the argument explicitly. After this, we need one more function which is to release the lock and block the current thread until we can reacquire it. To do this, we simply call the Monitor.Wait method. let wait = Reader (Monitor.Wait >> ignore) Now we can apply these in a scenario such as moving items between two Stacks in which we pop from one and push to another. Let’s turn our attention first to the pop function which takes our Stack, and then while the Stack count is zero, then it blocks and waits. When there is something in the Stack, we simply call Pop and return the value. open System.Collections.Generic let pop (stack:Stack<_>) = reader { while stack.Count = 0 do return! wait return stack.Pop() } Note that there is a while loop here which we will work on implementing in the next post. We can now turn our attention to the push function which takes our Stack and a value to push. If our Stack count is zero, then we call pulseAll which indicates there is a state change. After this we simply push the value onto the Stack. let push (stack:Stack<_>) x = reader { if stack.Count = 0 then return! pulseAll do stack.Push(x) } Moving on, we can now define a function called move which takes a value from one Stack and moves it to another using locks behind the scenes. // Our lock object let lockObj = new obj() let move s1 s2 = reader { let! x = pop s1 do! push s2 x return x } |> tryRunLock lockObj We can run this through to verify our behavior such as the following: > let s1 = new Stack<int>([1..3]) > let s2 = new Stack<int>() > let moved = move s1 s2;; val s1 : Stack<int> val s2 : Stack<int> val moved : int option = Some 3 > s2;; val it : Stack<int> = seq [3] As you can see, it took the last value from our s1 and moved it to the s2 and did so using locks in a composable fashion. Let’s look at our original example again. Back to the Web Example Revisiting our web example again, we can rewrite much of what we had before using the State Monad as the Reader Monad. To do this takes very little effort. First, we must instead of calling getState in the State Monad, we simply ask for the environment and then call the appropriate method on our Browser object. For example, we can implement the openPage function as follows: let openPage (url:string) = reader { let! (browser : Browser) = ask return browser.GoTo url } We could have also implemented the openPage using the standard Reader constructor as well: let openPage (url:string) = Reader (fun (browser : Browser) -> browser.GoTo url) Just as well, we could utilize the asks function as well to execute a function against our environment. We could rewrite our openPage such as this to take advantage: let openPage (url:string) = reader { return! asks (fun (browser : Browser) -> browser.GoTo url) } But, in order to make this happen, we need to implement another method on our ReaderBuilder that we implemented above. The method required is called ReturnFrom which basically does nothing to our Reader but return it. type ReaderBuilder() = ... member this.ReturnFrom((a:Reader<'r,'a>)) = a ... I’ll cover the rest of the other methods you can introduce to your builders in order to take advantage of such things as try/catch, try/finally, using, for, while, etc in the next post. Following the same pattern on all the other methods from the previous post, we can now execute our script and it will work much as it did for the State Monad. [<Fact>] let ``Can find CodeBetter on Bing``() = reader { do! openPage "" do! enterText "q" "CodeBetter" do! clickButton "go" let! result = containsText "CodeBetter" isTrue result do! closePage } |> runScript By using this design pattern, we have a nice way of abstracting this environment that we can create a very flexible syntax. But with any pattern, it’s about finding the right applications for it. Conclusion Once again, by looking at Monads, we can discover what abstractions can be accomplished with them, but just as well, what they are not about. Certainly, functional languages don’t need them, but they certainly can be quite useful. When we find repeated behavior, such as maintaining state, this abstraction can be quite powerful. Practically though in languages such as F#, they can be useful, but other patterns and abstractions can as well. Find the right abstraction and use it. In the next post, we’ll cover the additional methods you can add to your builder to enable such things as while loops, for loops, try/catch blocks, and so on before wrapping up this series again.
https://weblogs.asp.net/podwysocki/much-ado-about-monads-reader-edition
CC-MAIN-2021-43
en
refinedweb
First Look: InterSystems IRIS Native API for Python This First Look guide explains how to access InterSystems IRIS® globals from a Python application using the InterSystems IRIS Native functionality. IRIS Native also allows you to run ObjectScript methods, functions, and routines. Python 3 , see InterSystems First Looks . Introduction to InterSystems IRIS Storage Structures InterSystems IRIS provides. Exploring IRIS Native for Python At this point, you are ready to experiment with IRIS Native. The following brief demo shows you how to work with IRIS Native in a simple Python application. Want to try an online video-based demo of the InterSystems Native API for Python? Check out the Python QuickStart ! Before You Begin To use the procedure, you need a running instance of InterSystems IRIS and a system to work on, with Python 3 with the PIP utility, and your favorite Python IDE. (On Windows systems, make sure the Python interpreter is included in your PATH environment variable.) Python IDEs in the same document. Install the Native API Package Before running the sample Python program, you need to use the PIP package manager to install the irispython wheel file, which is available at install-dir\dev\python, where install-dir is the installation directory for your instance of InterSystems IRIS. For example, you might run: pip install intersystems_irispython-3.2.0-py3-none-any.whl The IRIS Native Application Now that you’ve created your project, you will create a small application that demonstrates a few of the features of the Native API. In your IDE, create a new source file named IRISNative.py. Paste the following code into IRISNative.py, substituting the connection information for your InterSystems IRIS instance . You can specify the USER namespace as shown, or you can choose another that you have created on your instance: import irisnative # Modify connection info based on your environment ip = "127.0.0.1" port = 1972 namespace = "USER" username = "_SYSTEM" password = "SYS" # create database connection and IRIS instance connection = irisnative.createConnection(ip,port,namespace,username,password) dbnative = irisnative.createIris(connection) print("[1. Setting and getting a global]") # setting and getting a global # ObjectScript equivalent: set ^testglobal("1") = 8888 dbnative.set(8888, "testglobal", "1") # ObjectScript equivalent: set globalValue = $get(^testglobal("1")) globalValue = dbnative.get("testglobal","1") print("The value of testglobal is ", globalValue) print() print("[2 Iterating over a global]") # modify global to iterate over # ObjectScript equivalent: set ^testglobal("1") = 8888 # ObjectScript equivalent: set ^testglobal("2") = 9999 dbnative.set(8888, "testglobal", "1") dbnative.set(9999, "testglobal", "2") Iter = dbnative.iterator("testglobal") print("walk forwards") for subscript, value in Iter.items(): print("subscript= {}, value={}".format(subscript, value)) print() print("[3. Calling a class method]") # calling a class method # ObjectScript equivalent: set returnValue = ##class(%Library.Utility).Date(5) returnValue = dbnative.classMethodValue("%Library.Utility", "Date", 5) print(returnValue) # close connection connection.close() Python application using IRIS Native. Globals in ObjectScript begin with the caret character ( ^ ). This is not a requirement in your Python applications that use the InterSystems IRIS Native API. Running the Exercise Now you are ready to run the demo application. If the example executes successfully, you should see printed: Using the Native API for Python
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=AFL_PYNATIVE
CC-MAIN-2021-43
en
refinedweb
Swift version: 5.4 Finding where two lines cross can be done by calculating their cross product. The code below returns an optional tuple containing the X and Y intersection points, or nil if they don’t cross at all. Note: Core Graphics doesn’t give us a CGLine type, so you’ll need pass this four points: where the first line starts and ends, and where the second line starts and ends. func linesCross(start1: CGPoint, end1: CGPoint, start2: CGPoint, end2: CGPoint) -> (x: CGFloat, y: CGFloat)? { // calculate the differences between the start and end X/Y positions for each of our points let delta1x = end1.x - start1.x let delta1y = end1.y - start1.y let delta2x = end2.x - start2.x let delta2y = end2.y - start2.y // create a 2D matrix from our vectors and calculate the determinant let determinant = delta1x * delta2y - delta2x * delta1y if abs(determinant) < 0.0001 { // if the determinant is effectively zero then the lines are parallel/colinear return nil } // if the coefficients both lie between 0 and 1 then we have an intersection let ab = ((start1.y - start2.y) * delta2x - (start1.x - start2.x) * delta2y) / determinant if ab > 0 && ab < 1 { let cd = ((start1.y - start2.y) * delta1x - (start1.x - start2.x) * delta1y) / determinant if cd > 0 && cd < 1 { // lines cross – figure out exactly where and return it let intersectX = start1.x + ab * delta1x let intersectY = start1.y + ab * delta1y return (intersectX, intersectY) } } // lines don't cross return nil } Note: this code is adapted from “Intersection of Two Lines in Three-Space”, which is a one-page chapter by Ronald Goodman in the book Graphics Gems. For more on how cross products work, I can highly recomend the book “Essential Mathematics for Games and Interactive Applications” by James M. Van Verth and Lars M. Bishop..
https://www.hackingwithswift.com/example-code/core-graphics/how-to-calculate-the-point-where-two-lines-intersect
CC-MAIN-2021-43
en
refinedweb
SHET SHET. The majority of the code is available on the house's GitHub page. The rest of this document is a (still unfinished) write-up of what we did. Introduction This is the story of a group of Computer Science undergraduates and our quest to avoid work at all costs by building a home automation system for their house. Its a tale of ridiculous hacks, novel architectures and, above all, liberal use of blu-tack fun. After meeting in our first year we decided we wanted to try and do something cool with our house. The resulting list of ideas was laughably ambitious, especially given that we couldn't really do anything to the building itself and that we also had to eat. Two years and many hacks later and we have a remarkably feature-rich home automation system. We've got automated lights, media control, a washing machine that emails you, a recipe-browsing control panel, an electronic door-stop, a doop button and more! The whole thing is built on our own custom home automation system, 'SHET', and designed to be extremely hackable. In The Beginning... (Motivation) We started our grand plan listing off all manner of things we wanted our system to do. Apart from the slight concern of how we'd afford food after building this system, we also had to consider the wrath of the landlord. Whatever we built would have to be easily removed and not do (too much) damage to the house. Our search for a house was a mixed affair. In the 3rd house with more mould than wallpaper, Tom was excited to discover one who's electricity meter had a light that flashed at a rate proportional to usage. Despite this critically important feature, we eventually decided to go somewhere else and landed up at 18 South Grove. With our house found, we started thinking about what we wanted our home automation system to be like. Looking around the web we discovered that most systems were pretty bad. They generally were pretty clunky and seemingly designed for a bygone era or extremely limited and closed. We wanted something that was really flexible, hackable and actually nice to work with. Seeing as we are all students, things were obviously going to have to be cheap. This ruled out a lot of options where specialist hardware was needed. Electronics knowledge (for all but Tom) was also in short supply which meant that the system would have to be electrically fairly simple. It also meant that high-voltage stuff was completely out of bounds. SHET House Event Tunnelling (Designing the Software) Our reaction to the problem of making the system hackable was a somewhat obvious one for any self-respecting *nix user: "Shell scripts!" - Jonathan Luckily, sanity prevailed but the idea stuck. We decided that having a file system-like tree containing all the controllable things in our house was a cool way of doing things. For example, /lounge/lights would control the lights in the lounge and /jonathan/sound/speakers/volume would control the volume of Jonathan's speakers. With the idea of a 'file-system' full of real things, we set out to think about how this could work. We eventually settled with the idea that there would be three types of thing in the system: - Properties - For example, 'light' or 'volume'. These are values that can be got and set. - Events - For example, 'motion detected' or 'washing finished'. These are events that can be triggered by real-world or software events. - Actions - For example, 'close door', 'pause' or 'is washing machine in use'. These are a bit like function calls and can optionally take arguments and return values. Unfortunately, this model doesn't really fit into a real file system and so the idea of using a FUSE file system to literally 'mount' our house was quickly abandoned. Instead we settled on producing a command-line utility and API for accessing the system. Since the system was going to be house-wide it was going to need to run across a network. After looking around for libraries and protocols we could use to implement our system we eventually decided to write our own. Event-based systems existed but they were either far too enterprisey or too complicated. We also looked at using a standard RPC library but these once again proved overly complicated and lacked a reasonable way dealing with events. We decided on a centralised architecture with a single server and multiple clients. In our system the server would be pretty 'dumb' with all the application logic going on in the clients. The clients tell the server what nodes in the tree they contained and set/get properties, call actions or listen for events via the server that were created by other clients. For example, we could have a client connected to light switches in the house, a client which monitored motion sensors and another client which listened for motion events from the second client and turned lights attached to the first on and off as needed. We could also run clients on our own computers to allow media players to be controlled over SHET. Speed wasn't an issue seeing as this would be running on a LAN and so we focused our efforts on making the protocol simple human readable. After wrangling with some RPC frameworks and seeing how much hassle data types were, we decided we didn't want to deal with type-safety and so using JSON to encapsulate values in the system seemed like a good idea. From there it was obvious to use JSON to encode messages in the protocol too. After a late night on IRC Tom and Jonathan settled on what became known as the SHET protocol. Unfortunately, as you might have guessed, the name is actually a backronym. From the IRC logs of SHET's conception: (23:55:38) Jonathan: name for the protocol ? (23:55:47) tomn: lol, no idea. (23:56:00) Jonathan: karls: ideas? (23:56:22) tomn: just string some buzwords together and acronym the hell out of it :p (23:57:10) Jonathan: :D (23:57:30) Jonathan: take a list of rude or amusing words and swap the vowels and then acronym the hell out of that With the protocol designed, implementation was next on the list. Coursework deadlines loomed and so there was no time like the present and Tom set about writing the SHET Python API and SHET server using the Twisted framework. Twisted describes itself as "an event-driven networking engine written in Python" and provides a really nice API for implementing network protocols. (TODO: Example client here) As well as a Python API, a command-line utility was also made (complete with bash-completion). It allowed easy direct interaction with SHET and its servers. For example, you could browse through the tree with tab completion: $ shet /jonathan/<tab> /jonathan/arduino/ /jonathan/irc/ /jonathan/sound/ /jonathan/desktop/ /jonathan/mpd/ /jonathan/tts/ /jonathan/email /jonathan/sms Call actions (with arguments) and see their returned values: $ shet /matt/mpd/toggle 0 $ shet /tom/sms "Let me know when you get in" null Get and set properties: $ shet /jonathan/sound/speakers/volume 100 $ shet /jonathan/sound/speakers/volume 21 null $ shet /jonathan/sound/speakers/volume 21 Watch events being raised: $ shet /lounge/panel/pressed [6] [4] [1] ... Of course, this interface meant that we could actually write shell scripts to control our house. For example, alarm clocks which could turn on lights and music could be created in seconds using a cron job. After a while we got fed up of the command-line client being relatively slow (due to the overhead of starting Python). This (and further coursework deadlines) was all the motivation it took for Tom to write a C library for SHET and a command-line SHET client written in C. The madness didn't stop here either as a JavaScript library appeared allowing us to build web interfaces trivially for any device. The library is built on Node.js and Socket.IO and is just as feature complete as the C and Python versions. SHET-ify all the things! (Controlling Computers) TODO: Talk about controlling - MPD (Music Player Demon) - SMS - IRC - Text-to-Speech - Keyboard Bindings - The 'bind' server. SHETSource (Controlling Real-World Things) Right from the start, our aim was to control real things in our house like the lights. This meant having these things somehow connected to SHET. The answer we came up with was to use Arduinos thanks to their ease of use and off-the-shelf availability. They would allow us to run simple programs which controlled motors, switches, sensors, lights and anything else we could wire up around the house. Of course, connecting these Arduinos to SHET posed a problem. Our first thought was that we might use an Ethernet shield and connect them all to our computer network. Unfortunately, the shields would be too expensive and since there would only be one network socket in each room, we'd have to buy lots of Ethernet switches too. We'd also need to power the Arduinos and their attached peripherals. Power-over-Ethernet was deemed too complicated and once again, too expensive. After dismissing various bad ideas involving long USB cables and repeaters, Tom remembered that 10/100 Ethernet only uses four of the eight wires in a standard CAT-5 cable. As we didn't plan on using gigabit networking in our house, it meant we'd have four wires running from somewhere central in the house to every other room. In order to use these unused wires, we had to make adapters which split off the four Ethernet wires and the four spare wires at each end. This meant re-writing the wall-sockets in each room and making adapters for the cables in our comms electrical meter cupboard where they were connected to the switch. You might be wondering how common it is to find a full CAT-5 installation in a cheap student house and the answer is: not at all. When our very keen landlord offered to do "anything we could think of" while renovating the property we were pretty sceptical. A joking remark about fitting CAT-5 (and a plasma TV) were met with "sure" and we left not really thinking anything would happen. When he later contacted us to find out where we'd like the wall sockets we were pretty surprised. So, with four wires available to us, this meant two for power and two for data (to keep things simple). Jonathan started experimenting with I2C, a simple data bus protocol, to connect the Arduinos together. There would be a 'master' Arduino connected to our server which would act as the interface between all the other Arduinos and SHET. Despite our enthusiasm, we realised I2C really wasn't designed for long wires. After lots of head-scratching, continuity testing and fiddling with I2C settings Tom eventually found an I2C booster that might be the answer to our problems. A few days later and we wired up our shiny boosters and...it still didn't work. At this point, we scrapped our plan of using I2C and instead started building a simple software serial library with basic flow control capabilities. To keep things simple, we decided to abandon the idea of using a bus and instead would connect the two data wires of each Arduino around the house directly into the otherwise unused pins of the master Arduino. The master would then route data to and from our server over USB. Once again we connected everything up and...it worked! Now all we needed was a way of exposing all this to SHET. After seeing the fairly dreadful performance of our serial link, we ditched any ideas about using the regular SHET protocol. Instead we considered a simple protocol which basically forwarded control of the IO pins back to our server. This idea seemed like an extremely wasteful use of Arduinos and so Jonathan set about designing a simple protocol which complemented SHET. The idea was that each Arduino should be able to create events, properties and actions within SHET. These could be, for example, motion sensors, lights and buzzers. To keep things simple, it was decided that Arduinos would not be able to access other events, properties and actions within SHET, instead SHET clients would be written to fill the gap. This also forced us to keep our "application logic" off the Arduinos which would save lots of time constantly reprogramming them. From this idea, SHETSource was born making it trivial to connect real-world things to SHET. Take a look at the following Arduino sketch which makes the internal LED controllable over SHET: #include <pins.h> #include <comms.h> #include <SHETSource.h> /* Connect to SHETSource via pins 2 and 3. */ DirectPins pins = DirectPins(2,3); Comms comms = Comms(&pins); /* The SHETSource client. Set that by default, nodes are created in the * /arduino/ subdirectory in SHET. */ SHETSource::Client client = SHETSource::Client(&comms, "arduino"); /* Get the state of the LED */ int get_led(void) { return digitalRead(13); } /* Set the state of the LED */ void get_led(int state) { digitalWrite(13, state); } void setup() { client.Init(); /* Use the built-in LED */ pinMode(13, OUTPUT); /* Register a property for the LED in /arduino/led. */ client.AddProperty("led", set_led, get_led); } void loop() { /* Execute one iteration of the SHETSource mainloop. */ client.DoSHET(); } For an embarrassingly long time, SHETSource sat in a state of being usable but somewhat unreliable due to a simple timing bug. With this fixed, everything ran smoothly until one day our electrical simplifications came back to bite us. After sitting down in the living room one day, Jonathan noticed various Arduinos were no longer responding. After chalking this up to yet another timing issue in the system, the problem sat ignored until later that evening when the affected Arduinos were found nice and toasty in their sockets. The cable carrying data and power to the Arduino in the lounge appeared to have shorted fairly badly taking out several Arduinos in the house. A binary search of the offending length of wire revealed a very poorly piece of cable trapped under a leg of the sofa. After replacing the cable and AVRs, we still didn't feel motivated to put any proper electrical protection in place and instead carefully blu-tacked the cable out of the reach of the evil chair leg. (Thus solving the problem once and for all!) TODO: Talk about later direct-USB and Bluetooth interfaces to Arduinos. Let There Be Light (Control)! One of the major things we wanted our system to do was to control lights around the house. Unfortunately, a sensible respect for high-voltages, our land-lord's property and our own wallets meant we weren't going to be able to do anything especially fancy. After being inspired by the most useless machine, Jonathan grabbed a servo motor, some trusty blu-tack and hacked the lights in his halls bedroom. With this idea and a number of cheap (and apparently sand-lubricated) servos off ebay we gained control of almost all the lights around the house. Once again our shoddy electronics (and ridiculously long power wires) started causing us problems. When the servos were moved, they would stutter and nearby Arduinos would brown out. The solution was simply to add a nice meaty capacitor across the regulator that powered it. Unfortunately, a couple of rooms (perhaps ironically, those of SHET's principle developers, Tom and Jonathan) were fitted with dimmer switches which weren't especially forthcoming to servo control. Many an idea involving 3D-printed gears and dismantled CD-ROM drives was conceived but still the lights remained rebelliously uncontrolled. While Tom was browsing around Clas Ohlson he discovered some cheap, remote controlled wall sockets which looked like an ideal candidate for hacking. By hacking the remote, we would be able to control mains-voltage devices without touching anything high-voltage. This store, incidentally, is the supplier of a bewildering selection of goods notably including what we've dubbed 'SHAT-5', the generic dual-twisted-pair cable SHETSource lives in after it leaves the safety of the CAT-5 wall sockets. With a selection of individually controllable standalone lamps lighting Tom's room, the hack was declared a success. Such was their effectiveness that when a light fitting broke in our hallway, Christmas lights and a wireless socket were rigged up (in June) and set up in SHET as the hallway lights and normal (if a prematurely festive) service was resumed. Unfortunately, Jonathan was still without controllable lighting. Tempted by Tom's discovery of relatively inexpensive LED strips, Jonathan ordered 5m of RGB LED strip with the hope of using it to light his room. Tom more sensibly opted for 5m of warm-white LEDs and we both waited as they made their way from China to our revision-worn hands. Somewhat unsurprisingly, the RGB LED strip produced a cold, blue-white light which wasn't going to be ideal for standard room lighting. It did, however, prove pretty awesome when combined with Mattuliser, a music visualisation library Matt wrote. What was surprising was just how bright and how pleasant the warm-white LEDs Tom bought were. Lengths were hung around his room and connected to his Arduino via some questionable ebay MOSFETs (with equally questionable heat sinks). The result was dimmable and very pleasant lighting and a further order of the same LED strip from Jonathan. A little while later and Jonathan's room too was bathed in glorious PWM'd light. Who needs light switches anyway? (Automatic Lighting) What use are computer controlled lighting without some sort of motion detection to automate turning lights on and off? The idea of hacking the burglar alarm's PIR?s (motion detectors) came up early on. Unfortunately we didn't want to annoy our landlord (or neighbours) by tampering with it directly and so settled with attaching an LDR (light sensor) over the flashing LED (so that's why they flash...). Not every room had a PIR and so we turned again to ebay and bought some cheap PIR modules. When fed 5v, these modules simply provide a pulse easily read by an Arduino whenever they detect movement. Easy! With controllable lights and motion sensors all over the house all we needed to do was quickly hack together a SHET client to "just do the obvious thing". Unfortunately, as with any human interface problem, it turned out this was going to be harder than we thought... TODO: Story of the lighting server and the problem of trivially describing the "sensible" time to turn lights on and off. The Button Panel (of Dreams and Nightmares) Despite the fact that our system allowed us to automate many things, others would always require direct human interaction. One place in particular, our lounge & kitchen, required particular attention as there were plenty of opportunities for SHET control. We search around the piles of miscellaneous buttons, dials and LEDs we had lying around and came up with an idea for a control panel. As there are five of us in the house, we wanted to have at least one button per person. For example, you could press a button and your playlist would be copied onto the computer in the lounge. In order to make the most of this small number of buttons, we wanted to allow chording (pressing more than one key at once) and long-pressing to squeeze more functions into the panel. Despite the existence of theoretically up to 30 different actions, the system would be very arbitrary and unpleasant to use or learn. To make things clearer, we decided we'd add another button to allow multiple modes to be selected. For example, in a 'music' mode, you can easily control playback by pressing one of the five buttons or grab your playlist by pressing and holding 'your' button (as dictated by the alphabetical ordering of our names). In a 'washing machine reminder' mode, you could press your button to book a reminder and press-and-hold to clear it. To indicate what mode the panel was in, we added an RGB LED and each mode was allocated a colour. Pressing the mode button would cycle through the different modes (giving a pleasing demo of the RGB LED...) and pressing the mode button along with one of the five main buttons a specific mode could be selected. This meant that we'd have only 5 modes and that wouldn't allow us to also have our own personalised modes. As a result, we added a second mode button which gave us each our own personal modes. With all this talk of modes Matt, our resident Emacs user, was getting uncomfortable. We're also computer scientists and so the thought of being limited to only 300 actions seemed limiting. To improve the situation, a modifier key was added named the 'middle-switch'. Surprisingly, this system proved reasonably easy to use, especially given that in essence it was a box with 8 anonymous buttons and an LED. Now that we had our system, we needed a way to bind key presses to things in SHET. Faced with this task, Jonathan set about creating panel-o-matic. It consists of a custom language for specifying button behaviours and a SHET client which takes button-press and mode-change events from the panel and sets properties or calls actions as appropriate. Here's an example of a configuration file. MUSIC { // In music mode, pressing a button will trigger one of the following actions 0 => /lounge/mpd/prev; 1 => /lounge/mpd/next; 2 => /lounge/mpd/toggle; 3 => /lounge/amplifier/vol_dec 20; 4 => /lounge/amplifier/vol_inc 20; // Pressing the 'middle-switch' (modifier) and button 0 enables random mode ^0 => /lounge/mpd/random 1; // Pressing and holding with the middle-switch turns random mode off. _^0 => /lounge/mpd/random 0; // The _ indicates "holding down" a key, and the special "any(...)" syntax // allows any one of the listed keys to be pressed and the associated string // be passed to the action as an argument. _any(0 : "james" ,1 : "jonathan" ,2 : "karl" ,3 : "matt" ,4 : "tom") => /lounge/mpd/copy_playlist_from; } With the panel finished, it was time to put it to work. The first and most obvious thing to do was allow control of MPD (the media player on our lounge computer). Since we already had an MPD SHET client, this simply required adding all the actions we wanted to the button panel configuration and took all of 5 minutes! With a sensor on the washing machine and the SHET email-sending client, we had been setting up reminders by using the 'bind' client to set up a one-off binding that would cause the 'washing finished' notification to call the 'send email' action for the appropriate person. To allow bookings to be made and cancelled from the button panel, all we needed for each person was a panel-o-matic configuration along the lines of: // Booking reminders with a press 0 => /bind/once /lounge/washing_machine/finished /james/email; // Cancelling reminders with a press-and-hold _0 => /bind/rm /lounge/washing_machine/finished /james/email; Once again, a really useful feature implemented with a minimum of effort. As a finishing touch, we bound the "washing starting" event to change the panel to the reminder booking mode automatically. Another feature we wanted was to be able to browse our house recipe website from the panel. Again, all we needed was to use the panel to trigger calls to the 'keybind' client on the lounge computer. As you can see from the video, the panel makes a surprisingly usable interface for browsing around from the other side of the kitchen. We've also got a mode for interacting with IRC enabling requests for washing up and letting people know when dinner is ready. We have one other miscellaneous mode which contains useful commands for interacting with the computer (such as close window). It also has a button which 'powers down' the room turning off music, screens and lights and turning on a light in the hallway. The individual user modes have been fairly sparsely used in practice. They do however serve a few useful services. For example in Jonathan's mode there is a button which turns off his lights and music while copying his playlist into the lounge media player and launching the recipe browser. It also serves some less useful (but obviously more important services), for example, Matt's mode is an in-joke and meme sound-board. Miscellaneous Hacks TODO: Talk about: - Touch panels - Amplifier control - Capacitative door handle sensing - Oven monitoring - Back door monitoring - Electronic door stop Wiring It Up TODO: Talk about: - Building an IO expander using an AVR - Wiring the living room nicely - Wiring conventions - Complete IO listing of the house (for fun!) Getting Started (Downloads & Docs) We think SHET is a really cool base for hackable home automation systems. If you're interested in trying it out yourself then here's a few links you might want to get started. SHET and SHETSource are currently moderately well documented and fairly stable so you should be able to get going without too much difficulty. As you might imagine, a lot of the clients we've written are very specific to our house's setup and quickly hacked together to scratch an itch. They also come with an embarrassing quantity of documentation but hopefully should be occasionally useful. - Our Libraries - SHET: - SHETC: - shet-client.js: - SHETSource: - Example SHET & SHETSource Clients - Command-line Interface: - Lighting Server: - SHET IRC Bot: - Lounge Panel Client: - Random SHET Clients: - Random SHETSource Clients: - - Built With - Twisted: - Arduino: - Node.js: - Socket.io: - Find Us on Github - Our (18sg) Github: - Amanieu's Github: - James' Github: - Jonathan's Github: - Karl's Github: - Matt's Github: - Tom's Github: SHET was the result of lots of interesting discussions, many hours of hard work and nights spent being kept up by malfunctioning servos. We believe that everyone should benefit from the fun we've had and so the whole project is open source. © 18sg/The University House Guys 2012 This write-up is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
http://jhnet.co.uk/projects/shet
CC-MAIN-2021-43
en
refinedweb
Tutorial: Building Redux in TypeScript with Angular Reading Time: 29 minutes tl;dr – In this post we’ll be looking at a data-architecture pattern called Redux. In this post we’re going to discuss: - the ideas behind Redux, - build our own mini version of the Redux Store and - hook it up to Angular. You can get the completed code here You can try the demo here For many Angular projects we can manage state in a fairly direct way: We tend to grab data from services and render them in components, passing values down the component tree along the way. Managing our apps in this way works fine for smaller apps, but as our apps grow, having multiple components manage different parts of the state becomes cumbersome. For instance, passing all of our values down our component tree suffers from the following downsides: Intermediate property passing – In order to get state to any component we have to pass the values down through inputs. This means we have many intermediate components passing state that it isn’t directly using or concerned about Inflexible refactoring – Because we’re passing inputs down through the component tree, we’re introducing a coupling between parent and child components that often isn’t necessary. This makes it more difficult to put a child component somewhere else in the hierarchy because we have to change all of the new parents to pass the state State tree and DOM tree don’t match – The “shape” of our state often doesn’t match the “shape” of our view/component hierarchy. By passing all data through the component tree via props we run into difficulties when we need to reference data in a far branch of the tree State throughout our app – If we manage state via components, it’s difficult to get a snapshot of the total state of our app. This can make it hard to know which component “owns” a particular bit of data, and which components are concerned about changes Pulling data out of our components and into services helps a lot. At least if services are the “owners” of our data, we have a better idea of where to put things. But this opens a new question: what are the best practices for “service-owned” data? Are there any patterns we can follow? In fact, there are. In this post, we’re going to discuss a data-architecture pattern called Redux which was designed to help with these issues. We’ll implement our own version of Redux which will store all of our state in a single place. This idea of holding all of our application’s state in one place might sound a little crazy, but the results are surprisingly delightful. Redux If you haven’t heard of Redux yet you can read a bit about it on the official website. Web application data architecture is evolving and the traditional ways of structuring data aren’t quite adequate for large web apps. Redux has been extremely popular because it’s both powerful and easy to understand. Data architecture can be a complex topic and so Redux’s best feature is probably its simplicity. If you strip Redux down to the essential core, Redux is fewer than 100 lines of code. We can build rich, easy to understand, web apps by using Redux as the backbone of our application. But first, let’s walk through how to write a minimal Redux and later we’ll work out patterns that emerge as we work out these ideas in a larger app. There are several attempts to use Redux or create a Redux-inspired system that works with Angular. Two notable examples are: ngrxis a Redux-inspired architecture that is heavily observables-based. angular2-reduxuses Redux itself as a dependency, and adds some Angular helpers (dependency-injection, observable wrappers). Here we’re not going to use either. Instead, we’re going to use Redux directly in order to show the concepts without introducing a new dependency. That said, both of these libraries may be helpful to you when writing your apps. Redux: Key Ideas The key ideas of Redux are this: - All of your application’s data is in a single data structure called the state which is held in the store - Your app reads the state from this store - This store is never mutated directly - User interaction (and other code) fires actions which describe what happened - A new state is created by combining he old state and the action by a function called the reducer. If the above bullet list isn’t clear yet, don’t worry about it – putting these ideas into practice is the goal of the rest of this post. Table of Contents - Core Redux Ideas - Storing Our State - A Messaging App - Using Redux in Angular - Planning Our App - Setting Up Redux - Providing the Store - Bootstrapping the App - The AppComponent - What’s Next - What’s Next - References Core Redux Ideas What’s a reducer? Let’s talk about the reducer first. Here’s the idea of a reducer: it takes the old state and an action and returns a new state. A reducer must be a pure function. That is: - It must not mutate the current state directly - It must not use any data outside of its arguments Put another way, a pure function will always return the same value, given the same set of arguments. And a pure function won’t call any functions which have an effect on the outside world, e.g. no database calls, no HTTP calls, and no mutating outside data structures. Reducers should always treat the current state as read-only. A reducer does not change the state instead, it returns a new state. (Often this new state will start with a copy of old state, but let’s not get ahead of ourselves.) Let’s define our very first reducer. Remember, there are three things involved: - An Action, which defines what to do (with optional arguments) - The state, which stores all of the data in our application - The Reducerwhich takes the stateand the Actionand returns a new state. Defining Action and Reducer Interfaces Since we’re using TypeScript we want to make sure this whole process is typed, so let’s setup an interface for our Action and our Reducer: The Action Interface Our Action interface looks like this: interface Action { type: string; payload?: any; } Notice that our Action has two fields: typeand payload The type will be an identifying string that describes the action like INCREMENT or ADD_USER. The payload can be an object of any kind. The ? on payload? means that this field is optional. The Reducer Interface Our Reducer interface looks like this: interface Reducer<T> { (state: T, action: Action): T; } Our Reducer is using a feature of TypeScript called generics. In this case type T is the type of the state. Notice that we’re saying that a valid Reducer has a function which takes a state (of type T) and an action and returns a new state (also of type T). Creating Our First Reducer The simplest possible reducer returns the state itself. (You might call this the identity reducer because it applies the identity function on the state. This is the default case for all reducers, as we will soon see). let reducer: Reducer<number> = (state: number, action: Action) => { return state; }; Notice that this Reducer makes the generic type concrete to number by the syntax Reducer<number>. We’ll define more sophisticated states beyond a single number soon. We’re not using the Action yet, but let’s try this Reducer just the same. Running the examples in this post You can find the code for this post on Github. In this first section, these examples are run outside of the browser and run by node.js. Because we’re using TypeScript in these examples, you should run them using the commandline tool ts-node, (instead of nodedirectly). You can install ts-nodeby running: npm install -g ts-node Or by doing an npm installin the angular2-redux-chatdirectory and then calling ./node_modules/.bin/ts-nodet For instance, to run the example above you might type (not including the $): $ cd angular2-redux-chat/minimal/tutorial $ npm install $ ./node_modules/.bin/ts-nodet 01-identity-reducer.ts Use this same procedure for the rest of the code in this post until we instruct you to switch to your browser. Running Our First Reducer Let’s put it all together and run this reducer: interface Action { type: string; payload?: any; } interface Reducer<T> { (state: T, action: Action): T; } let reducer: Reducer<number> = (state: number, action: Action) => { return state; }; console.log( reducer(0, null) ); // -> 0 And run it: $ cd code/redux/redux-chat/tutorial $ ./node_modules/.bin/ts-node 01-identity-reducer.ts 0 It seems almost silly to have that as a code example, but it teaches us our first principle of reducers: By default, reducers return the original state. In this case, we passed a state of the number 0 and a null action. The result from this reducer is the state 0. But let’s do something more interesting and make our state change. Adjusting the Counter With actions Eventually our state is going to be much more sophisticated than a single number. We’re going to be holding the all of the data for our app in the state, so we’ll need better data structure for the state eventually. That said, using a single number for the state lets us focus on other issues for now. So let’s continue with the idea that our state is simply a single number that is storing a counter. Let’s say we want to be able to change the state number. Remember that in Redux we do not modify the state. Instead, we create actions which instruct the reducer on how to generate a new state. Let’s create an Action to change our counter. Remember that the only required property is a type. We might define our first action like this: let incrementAction: Action = { type: 'INCREMENT' } We should also create a second action that instructs our reducer to make the counter smaller with: let decrementAction: Action = { type: 'DECREMENT' } Now that we have these actions, let’s try using them in our reducer: let reducer: Reducer<number> = (state: number, action: Action) => { if (action.type === 'INCREMENT') { return state + 1; } if (action.type === 'DECREMENT') { return state - 1; } return state; }; And now we can try out the whole reducer: let incrementAction: Action = { type: 'INCREMENT' }; console.log( reducer(0, incrementAction )); // -> 1 console.log( reducer(1, incrementAction )); // -> 2 let decrementAction: Action = { type: 'DECREMENT' }; console.log( reducer(100, decrementAction )); // -> 99 Neat! Now the new value of the state is returned according to which action we pass into the reducer. Reducer switch Instead of having so many if statements, the common practice is to convert the reducer body to a switch statement: let reducer: Reducer<number> = (state: number, action: Action) => { switch (action.type) { case 'INCREMENT': return state + 1; case 'DECREMENT': return state - 1; default: return state; // <-- dont forget! } }; let incrementAction: Action = { type: 'INCREMENT' }; console.log(reducer(0, incrementAction)); // -> 1 console.log(reducer(1, incrementAction)); // -> 2 let decrementAction: Action = { type: 'DECREMENT' }; console.log(reducer(100, decrementAction)); // -> 99 // any other action just returns the input state let unknownAction: Action = { type: 'UNKNOWN' }; console.log(reducer(100, unknownAction)); // -> 100 Notice that the default case of the switch returns the original state. This ensures that if an unknown action is passed in, there’s no error and we get the original state unchanged. Q: Wait, all of my application state is in one giant switchstatement? A: Yes and no. If this is your first exposure to Redux reducers it might feel a little weird to have all of your application state changes be the result of a giant switch. There are two things you should know: - Having your state changes centralized in one place can help a ton in maintaining your program, particularly because it’s easy to track down where the changes are happening when they’re all together. (Furthermore, you can easily locate what state changes as the result of any action because you can search your code for the token specified for that action’s type) - You can (and often do) break your reducers down into several sub-reducers which each manage a different branch of the state tree. We’ll talk about this later. Action “Arguments” In the last example our actions contained only a type which told our reducer either to increment or decrement the state. But often changes in our app can’t be described by a single value – instead we need parameters to describe the change. This is why we have the payload field in our Action. In this counter example, say we wanted to add 9 to the counter. One way to do this would be to send 9 INCREMENT actions, but that wouldn’t be very efficient, especially if we wanted to add, say, 9000. Instead, let’s add a PLUS action that will use the payload parameter to send a number which specifies how much we want to add to the counter. Defining this action is easy enough: let plusSevenAction = { type: 'PLUS', payload: 7 }; Next, to support this action, we add a new case to our reducer that will handle a 'PLUS' action: let reducer: Reducer<number> = (state: number, action: Action) => { switch (action.type) { case 'INCREMENT': return state + 1; case 'DECREMENT': return state - 1; case 'PLUS': return state + action.payload; default: return state; } }; PLUS will add whatever number is in the action.payload to the state. We can try it out: console.log( reducer(3, { type: 'PLUS', payload: 7}) ); // -> 10 console.log( reducer(3, { type: 'PLUS', payload: 9000}) ); // -> 9003 console.log( reducer(3, { type: 'PLUS', payload: -2}) ); // -> 1 In the first line we take the state 3 and PLUS a payload of 7, which results in 10. Neat! However, notice that while we’re passing in a state, it doesn’t really ever change. That is, we’re not storing the result of our reducer’s changes and reusing it for future actions. Storing Our State Our reducers are pure functions, and do not change the world around them. The problem is, in our app, things do change. Specifically, our state changes and we need to keep the new state somewhere. In Redux, we keep our state in the store. The store has the responsibility of running the reducer and then keeping the new state. Let’s take a look at a minimal store: class Store<T> { private _state: T; constructor( private reducer: Reducer<T>, initialState: T ) { this._state = initialState; } getState(): T { return this._state; } dispatch(action: Action): void { this._state = this.reducer(this._state, action); } } Notice that our Store is generically typed – we specify the type of the state with generic type T. We store the state in the private variable _state. We also give our Store a Reducer, which is also typed to operate on T, the state type this is because each store is tied to a specific reducer. We store the Reducer in the private variable reducer. In Redux, we generally have 1 store and 1 top-level reducer per application. Let’s take a closer look at each method of our State: - In our constructorwe set the _stateto the initial state. getState()simply returns the current _state dispatchtakes an action, sends it to the reducer and then updates the value of _statewith the return value Notice that dispatch doesn’t return anything. It’s only updating the store’s state (once the result returns). This is an important principle of Redux: dispatching actions is a “fire-and-forget” maneuver. Dispatching actions is not a direct manipulation of the state, and it doesn’t return the new state. When we dispatch actions, we’re sending off a notification of what happened. If we want to know what the current state of the system is, we have to check the state of the store. Using the Store Let’s try using our store: // create a new store let store = new Store<number>(reducer, 0); console.log(store.getState()); // -> 0 store.dispatch({ type: 'INCREMENT' }); console.log(store.getState()); // -> 1 store.dispatch({ type: 'INCREMENT' }); console.log(store.getState()); // -> 2 store.dispatch({ type: 'DECREMENT' }); console.log(store.getState()); // -> 1 We start by creating a new Store and we save this in store, which we can use to get the current state and dispatch actions. The state is set to 0 initially, and then we INCREMENT twice and DECREMENT once and our final state is 1. Being Notified with subscribe It’s great that our Store keeps track of what changed, but in the above example we have to ask for the state changes with store.getState(). It would be nice for us to know immediately when a new action was dispatched so that we could respond. To do this we can implement the Observer pattern – that is, we’ll register a callback function that will subscribe to all changes. Here’s how we want it to work: - We will register a listener function using subscribe - When dispatchis called, we will iterate over all listeners and call them, which is the notification that the state has changed. Registering Listeners Our listener callbacks are a going to be a function that takes no arguments. Let’s define an interface that makes it easy to describe this: interface ListenerCallback { (): void; } After we subscribe a listener, we might want to unsubscribe as well, so lets define the interface for an unsubscribe function as well: interface UnsubscribeCallback { (): void; } Not much going on here – it’s another function that takes no arguments and has no return value. But by defining these types it makes our code clearer to read. Our store is going to keep a list of ListenerCallbacks let’s add that to our Store: class Store<T> { private _state: T; private _listeners: ListenerCallback[] = []; Now we want to be able to add to that list of _listeners with a subscribe function: subscribe(listener: ListenerCallback): UnsubscribeCallback { this._listeners.push(listener); return () => { // returns an "unsubscribe" function this._listeners = this._listeners.filter(l => l !== listener); }; } subscribe accepts a ListenerCallback (i.e. a function with no arguments and no return value) and returns an UnsubscribeCallback (the same signature). Adding the new listener is easy: we push it on to the _listeners array. The return value is a function which will update the list of _listeners to be the list of _listeners without the listener we just added. That is, it returns the UnsubscribeCallback that we can use to remove this listener from the list. Notifying Our Listeners Whenever our state changes, we want to call these listener functions. What this means is, whenever we dispatch a new action, whenever the state changes, we want to call all of the listeners: dispatch(action: Action): void { this._state = this.reducer(this._state, action); this._listeners.forEach((listener: ListenerCallback) => listener()); } The Complete Store We’ll try this out below, but before we do that, here’s the complete code listing for our new Store: class Store<T> { private _state: T; private _listeners: ListenerCallback[] = []; constructor( private reducer: Reducer<T>, initialState: T ) { this._state = initialState; } getState(): T { return this._state; } dispatch(action: Action): void { this._state = this.reducer(this._state, action); this._listeners.forEach((listener: ListenerCallback) => listener()); } subscribe(listener: ListenerCallback): UnsubscribeCallback { this._listeners.push(listener); return () => { // returns an "unsubscribe" function this._listeners = this._listeners.filter(l => l !== listener); }; } } Trying Out subscribe Now that we can let store = new Store<number>(reducer, 0); console.log(store.getState()); // -> 0 // subscribe let unsubscribe = store.subscribe(() => { console.log('subscribed: ', store.getState()); }); store.dispatch({ type: 'INCREMENT' }); // -> subscribed: 1 store.dispatch({ type: 'INCREMENT' }); // -> subscribed: 2 unsubscribe(); store.dispatch({ type: 'DECREMENT' }); // (nothing logged) // decrement happened, even though we weren't listening for it console.log(store.getState()); // -> 1 Above we subscribe to our store and in the callback function we’ll log subscribed: and then the current store state. Notice that the listener function is not given the current state as an argument. This might seem like an odd choice, but because there are some nuances to deal with, it’s easier to think of the notification of state changed as separate from the current state. Without digging too much into the weeds, you can read more about this choice here, here, and here. We store the unsubscribe callback and then notice that after we call unsubscribe() our log message isn’t called. We can still dispatch actions, we just won’t see the results until we ask the store for them. If you’re the type of person who likes RxJS and Observables, you might notice that implementing our own subscription listeners could also be implemented using RxJS. You could rewrite our Storeto use Observables instead of our own subscriptions. In fact, we’ve already done this for you and you can find the sample code in the file code/redux/redux-chat/tutorial/06b-rx-store.ts. Using RxJS for the Storeis an interesting and powerful pattern if you’re willing to us RxJS for the backbone of our application data. Here we’re not going to use Observables very heavily, particularly because we want to discuss Redux itself and how to think about data architecture with a single state tree. Redux itself is powerful enough to use in our applications without Observables. Once you get the concepts of using “straight” Redux, adding in Observables isn’t difficult (if you already understand RxJS, that is). For now, we’re going to use “straight” Redux and we’ll give you some guidance on some Observable-based Redux-wrappers at the end. The Core of Redux The above store is the essential core of Redux. Our reducer takes the current state and action and returns a new state, which is held by the store. Here’s our minimal TypeScript Redux stores in one image (click for larger version): There are obviously many more things that we need to add to build a large, production web app. However, all of the new ideas that we’ll cover are patterns that flow from building on this simple idea of an immutable, central store of state. If you understand the ideas presented above, you would be likely to invent many of the patterns (and libraries) you find in more advanced Redux apps. There’s still a lot for us to cover about day-to-day use of redux though. For instance, we need to know: - How to carefully handle more complex data structures in our state - How to be notified when our state changes without having to poll the state (with subscriptions) - How to intercept our dispatch for debugging (a.k.a. middleware) - How to compute derived values (with selectors) - How to split up large reducers into more manageable, smaller ones (and recombine them) - How to deal with asynchronous data While we’ll explain several of these in this post, if you want to go more in-depth with a Redux example with Angular two, checkout the Intermediate Redux chapter in ng-book 4 Let’s first deal with handling more complex data structures in our state. To do that, we’re going to need an example that’s more interesting than a counter. Let’s start building a chat app where users can send each other messages. A Messaging App In our messaging app, as in all Redux apps, there are three main parts to the data model: - The state - The actions - The reducer Messaging App state The state in our counter app was a single number. However in our messaging app, the state is going to be an object. This state object will have a single property, messages. messages will be an array of strings, with each string representing an individual message in the application. For example: // an example `state` value { messages: [ 'here is message one', 'here is message two' ] } We can define the type for the app’s state like this: interface AppState { messages: string[]; } Messaging App actions Our app will process two actions: ADD_MESSAGE and DELETE_MESSAGE. The ADD_MESSAGE action object will always have the property message, the message to be added to the state. The ADD_MESSAGE action object has this shape: { type: 'ADD_MESSAGE', message: 'Whatever message we want here' } The DELETE_MESSAGE action object will delete a specified message from the state. A challenge here is that we have to be able to specify which message we want to delete. If our messages were objects, we could assign each message an id property when it is created. However, to simplify this example, our messages are just simple strings, so we’ll have to get a handle to the message another way. The easiest way for now is to just use the index of the message in the array (as a proxy for the ID). With that in mind, the DELETE_MESSAGE action object has this shape: { type: 'DELETE_MESSAGE', index: 2 // <- or whatever index is appropriate } We can define the types for these actions by using the interface ... extends syntax in TypeScript: interface AddMessageAction extends Action { message: string; } interface DeleteMessageAction extends Action { index: number; } In this way our AddMessageAction is able to specify a message and the DeleteMessageAction will specify an index. Messaging App reducer Remember that our reducer needs to handle two actions: ADD_MESSAGE and DELETE_MESSAGE. Let’s talk about these individually. Reducing ADD_MESSAGE let reducer: Reducer<AppState> = (state: AppState, action: Action): AppState => { switch (action.type) { case 'ADD_MESSAGE': return { messages: state.messages.concat( (<AddMessageAction>action).message ), }; We start by switching on the action.type and handling the ADD_MESSAGE case. TypeScript objects already have a type, so why are we adding a typefield? There are many different ways we might choose to handle this sort of “polymorphic dispatch”. Keeping a string in a typefield (where typemeans “action-type”) is a straightforward, portable way we can use to distinguish different types of actions and handle them in one reducer. In part, it means that you don’t have to create a new interfacefor every action. That said, it would be more satisfying to be able to use reflection to switch on the concrete type. While this might become possible with more advanced type guards, this isn’t currently possible in today’s TypeScript. Broadly speaking, types are a compile-time construct and this code is compiled down to JavaScript and we can lose some of the typing metadata. That said, if switching on a typefield bothers you and you’d like to use language features directly, you could use the decoration reflection metadata. For now, a simple typefield will suffice. Adding an Item Without Mutation When we handle an ADD_MESSAGE action, we need to add the given message to the state. As will all reducer handlers, we need to return a new state. Remember that our reducers must be pure and not mutate the old state. What would be the problem with the following code? case 'ADD_MESSAGE': state.messages.push( action.message ); return { messages: messages }; // ... The problem is that this code mutates the state.messages array, which changes our old state! Instead what we want to do is create a copy of the state.messages array and add our new message to the copy. case 'ADD_MESSAGE': return { messages: state.messages.concat( (<AddMessageAction>action).message ), }; The syntax <AddMessageAction>actionwill cast our actionto the more specific type. That is, notice that our reducer takes the more general type Action, which does not have the messagefield. If we leave off the cast, then the compiler will complain that Actiondoes not have a field Instead, we know that we have an ADD_MESSAGEaction so we cast it to an AddMessageAction. We use parenthesis to make sure the compiler knows that we want to cast actionand not action.message. Remember that the reducer must return a new AppState. When we return an object from our reducer it must match the format of the AppState that was input. In this case we only have to keep the key messages, but in more complicated states we have more fields to worry about. Deleting an Item Without Mutation Remember that when we handle the DELETE_MESSAGE action we are passing the index of the item in the array as the faux ID. (Another common way of handling the same idea would be to pass a real item ID.) Again, because we do not want to mutate the old messages array, we need to handle this case with care: case 'DELETE_MESSAGE': let idx = (<DeleteMessageAction>action).index; return { messages: [ ...state.messages.slice(0, idx), ...state.messages.slice(idx + 1, state.messages.length) ] Here we use the slice operator twice. First we take all of the items up until the item we are removing. And we concatenate the items that come after. There are four common non-mutating operations: - Adding an item to an array - Removing an item from an array - Adding / changing a key in an object - Removing a key from an object The first two (array) operations we just covered. We’ll talk more about the object operations further down, but for now know that a common way to do this is to use Object.assign. As in: Object.assign({}, oldObject, newObject) // <-------<------------- You can think of Object.assignas merging objects in from the right into the object on the left. newObjectis merged into oldObjectwhich is merged into {}. This way all of the fields in oldObjectwill be kept, except for where the field exists in newObject. Neither oldObjectnor newObjectwill be mutated. Of course, handling all of this on your own takes great care and it is easy to make a mistake. This is one of the reasons many people use Immutable.js, which is a set of data structures that help enforce immutability. Trying Out Our Actions Now let’s try running our actions: let store = new Store<AppState>(reducer, { messages: [] }); console.log(store.getState()); // -> { messages: [] } store.dispatch({ type: 'ADD_MESSAGE', message: 'Would you say the fringe was made of silk?' } as AddMessageAction); store.dispatch({ type: 'ADD_MESSAGE', message: 'Wouldnt have no other kind but silk' } as AddMessageAction); store.dispatch({ type: 'ADD_MESSAGE', message: 'Has it really got a team of snow white horses?' } as AddMessageAction); console.log(store.getState()); // -> // { messages: // [ 'Would you say the fringe was made of silk?', // 'Wouldnt have no other kind but silk', // 'Has it really got a team of snow white horses?' ] } Here we start with a new store and we call store.getState() and see that we have an empty messages array. Next we add three messages to our store. For each message we specify the type as ADD_MESSAGE and we cast each object to an AddMessageAction. Finally we log the new state and we can see that messages contains all three messages. Our three dispatch statements are a bit ugly for two reasons: - we manually have to specify the typestring each time. We could use a constant, but it would be nice if we didn’t have to do this and - we’re manually casting to an AddMessageAction Instead of creating these objects as an object directly we should create a function that will create these objects. This idea of writing a function to create actions is so common in Redux that the pattern has a name: Action Creators. Action Creators Instead of creating the ADD_MESSAGE actions directly as objects, let’s create a function to do this for us: class MessageActions { static addMessage(message: string): AddMessageAction { return { type: 'ADD_MESSAGE', message: message }; } static deleteMessage(index: number): DeleteMessageAction { return { type: 'DELETE_MESSAGE', index: index }; } } Here we’ve created a class with two static methods addMessage and deleteMessage. They return an AddMessageAction and a DeleteMessageAction respectively. You definitely don’t have to use static methods for your action creators. You could use plain functions, functions in a namespace, even instance methods on an object, etc. The key idea is to keep them organized in a way that makes them easy to use. Now let’s use our new action creators: let store = new Store<AppState>(reducer, { messages: [] });?' ] } This feels much nicer! An added benefit is that if we eventually decided to change the format of our messages, we could do it without having to update all of our dispatch statements. For instance, say we wanted to add the time each message was created. We could add a created_at field to addMessage and now all AddMessageActions will be given a created_at field: class MessageActions { static addMessage(message: string): AddMessageAction { return { type: 'ADD_MESSAGE', message: message, // something like this created_at: new Date() }; } // .... Using Real Redux Now that we’ve built our own mini-redux you might be asking, “What do I need to do to use the real Redux?” Thankfully, not very much. Let’s update our code to use the real Redux now! If you haven’t already, you’ll want to run npm installin the code/redux/redux-chat/tutorialdirectory. The first thing we need to do is import Action, Reducer, and Store from the redux package. We’re also going to import a helper method createStore while we’re at it: import { Action, Reducer, Store, createStore } from 'redux'; Next, instead of specifying our initial state when we create the store instead we’re going to let the reducer create the initial state. Here we’ll do this as the default argument to the reducer. This way if there is no state passed in (e.g. the first time it is called at initialization) we will use the initial state: let initialState: AppState = { messages: [] }; let reducer: Reducer<AppState> = (state: AppState = initialState, action: Action) => { What’s neat about this is that the rest of our reducer stays the same! The last thing we need to do is create the store using the createStore helper method from Redux: let store: Store<AppState> = createStore<AppState>(reducer); After that, everything else just works! let store: Store<AppState> = createStore<AppState>(reducer);?' ] } Now that we have a handle on using Redux in isolation, the next step is to hook it up to our web app. Let’s do that now. Using Redux in Angular In the last section we walked through the core of Redux and showed how to create reducers and use stores to manage our data in isolation. Now it’s time to level-up and integrate Redux with our Angular components. In this section we’re going to create a minimal Angular app that contains just a counter which we can increment and decrement with a button. By using such a small app we can focus on the integration points between Redux and Angular and then we can move on to a larger app in the next section. But first, let’s see how to build this counter app! Here we are going to be integrating Redux directly with Angular without any helper libraries in-between. There are several open-source libraries with the goal of making this process easier, and you can find them in the references section below. That said, it can be much easier to use those libraries once you understand what is going on underneath the hood, which is what we work through here. Planning Our App If you recall, the three steps to planning our Redux apps are to: - Define the structure of our central app state - Define actions that will change that state and - Define a reducer that takes the old state and an action and returns a new state. For this app, we’re just going to increment and decrement a counter. We did this in the last section, and so our actions, store, and reducer will all be very familiar. The other thing we need to do when writing Angular apps is decide where we will create components. In this app, we’ll have a top-level AppComponent which will have one component, the AppComponent which contains the view we see in the screenshot. At a high level we’re going to do the following: - Create our Storeand make it accessible to our whole app via dependency injection Storeand display them in our components - When something changes (a button is pressed) we will dispatch an action to the Store. Enough planning, let’s look at how this works in practice! Setting Up Redux Defining the Application State Let’s take a look at our AppState: export interface AppState { counter: number; }; Here we are defining our core state structure as AppState – it is an object with one key, counter which is a number. In the next example (the chat app) we’ll talk about how to have more sophisticated states, but for now this will be fine. Defining the Reducers Next lets define the reducer which will handle incrementing and decrementing the counter in the application state: import { INCREMENT, DECREMENT } from './counter.actions'; const initialState: AppState = { counter: 0 }; // Create our reducer that will handle changes to the state export const counterReducer: Reducer<AppState> = (state: AppState = initialState, action: Action): AppState => { switch (action.type) { case INCREMENT: return Object.assign({}, state, { counter: state.counter + 1 }); case DECREMENT: return Object.assign({}, state, { counter: state.counter - 1 }); default: return state; } }; We start by importing the constants INCREMENT and DECREMENT, which are exported by our action creators. They’re just defined as the strings 'INCREMENT' and 'DECREMENT', but it’s nice to get the extra help from the compiler in case we make a typo. We’ll look at those action creators in a minute. The initialState is an AppState which sets the counter to 0. The counterReducer handles two actions: INCREMENT, which adds 1 to the current counter and DECREMENT, which subtracts 1. Both actions use Object.assign to ensure that we don’t mutate the old state, but instead create a new object that gets returned as the new state. Since we’re here, let’s look at the action creators Defining Action Creators Our action creators are functions which return objects that define the action to be taken. increment and decrement below return an object that defines the appropriate type. import { Action, ActionCreator } from 'redux'; export const INCREMENT: string = 'INCREMENT'; export const increment: ActionCreator<Action> = () => ({ type: INCREMENT }); export const DECREMENT: string = 'DECREMENT'; export const decrement: ActionCreator<Action> = () => ({ type: DECREMENT }); Notice that our action creator functions return the type ActionCreator<Action>. ActionCreator is a generic class defined by Redux that we use to define functions that create actions. In this case we’re using the concrete class Action, but we could use a more specific Action class, such as AddMessageAction that we defined in the last section. Creating the Store Now that we have our reducer and state, we could create our store like so: let store: Store<AppState> = createStore<AppState>(counterReducer); However, one of the awesome things about Redux is that it has a robust set of developer tools. Specifically, there is a Chrome extension that will let us monitor the state of our application and dispatch actions. What’s really neat about the Redux Devtools is that it gives us clear insight to every action that flows through the system and it’s affect on the state. Go ahead and install the Redux Devtools Chrome extension now! In order to use the Devtools we have to do one thing: add it to our store. const devtools: StoreEnhancer<AppState> = window['devToolsExtension'] ? window['devToolsExtension']() : f => f; Not everyone who uses our app will necessarily have the Redux Devtools installed. The code above will check for window.devToolsExtension, which is defined by Redux Devtools, and if it exists, we will use it. If it doesn’t exist, we’re just returning an identity function ( f => f) that will return whatever is passed to it. Middleware is a term for a function that enhances the functionality of another library. The Redux Devtools is one of many possible middleware libraries for Redux. Redux supports lots of interesting middleware and it’s easy to write our own. You can read more about Redux middleware here In order to use this devtools we pass it as middleware to our Redux store: export function createAppStore(): Store<AppState> { return createStore<AppState>( reducer, compose(devtools) ); } Now whenever we dispatch an action and change our state, we can inspect it in our browser! Providing the Store Now that we have the Redux core setup, let’s turn our attention to our Angular components. Let’s create our top-level app component, AppComponent. This will be the component we use to bootstrap Angular: We’re going to use the AppComponent as the root component. Remember that since this is a Redux app, we need to make our store instance accessible everywhere in our app. How should we do this? We’ll use dependency injection (DI). When we want to make something available via DI, then we use the providers configuration to add it to the list of providers in our NgModule. When we provide something to the DI system, we specify two things: - the token to use to refer this injectable dependency - the way to inject the dependency Oftentimes if we want to provide a singleton service we might use the useClass option as in: In the case above, we’re using the class SpotifyService as the token in the DI system. The useClass option tells Angular to create an instance of SpotifyService and reuse that instance whenever the SpotifyService injection is requested (e.g. maintain a Singleton). One problem with us using this method is that we don’t want Angular to create our store – we did it ourselves above with createStore. We just want to use the store we’ve already created. To do this we’ll use the useValue option of provide. We’ve done this before with configurable values like API_URL: The one thing we have left to figure out is what token we want to use to inject. Our store is of type Store<AppState>: export function createAppStore(): Store<AppState> { return createStore<AppState>( reducer, compose(devtools) ); } export const appStoreProviders = [ { provide: AppStore, useFactory: createAppStore } ]; Store is an interface, not a class and, unfortunately, we can’t use interfaces as a dependency injection key. If you’re interested in why we can’t use an interface as a DI key, it’s because TypeScript interfaces are removed after compilation and not available at runtime. If you’d like to read more, see here, here, and here. This means we need to create our own token that we’ll use for injecting the store. Thankfully, Angular makes this easy to do. Let’s create this token in it’s own file so that way we can import it from anywhere in our application; export const AppStore = new InjectionToken('App.store'); Here we have created a const AppStore which uses the OpaqueToken class from Angular. OpaqueToken is a better choice than injecting a string directly because it helps us avoid collisions. Now we can use this token AppStore with provide. Let’s do that now. Bootstrapping the App Back in app.module.ts, let’s create the NgModule we’ll use to bootstrap our app: import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { appStoreProviders } from './app.store'; import { AppComponent } from './app.component'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpModule ], providers: [ appStoreProviders ], bootstrap: [AppComponent] }) export class AppModule { } Now we are able to get a reference to our Redux store anywhere in our app by injecting AppStore. The place we need it most now is our AppComponent. Notice that we exported the function appStoreProvidersfrom app.store.tsand then used that function in providers. Why not use the { provide: ..., useFactory: ... }syntax directly? The answer is related to AOT – if we want to ahead-of-time compile a provider that uses a function, we must first export is as a function from another module. The AppComponent With our setup out of the way, we can start creating our component that actually displays the counter to the user and provides buttons for the user to change the state. imports Let’s start by looking at the imports: import { Component, Inject } from '@angular/core'; import { Store } from 'redux'; import { AppStore } from './app.store'; import { AppState } from './app.state'; import * as CounterActions from './counter.actions'; We import Store from Redux as well as our injector token AppStore, which will get us a reference to the singleton instance of our store. We also import the AppState type, which helps us know the structure of the central state. Lastly, we import our action creators with * as CounterActions. This syntax will let us call CounterActions.increment() to create an INCREMENT action. The template Let’s look at the template of our AppComponent. In this chapter we are adding some style using the CSS framework Bootstrap <div class="row"> <div class="col-sm-6 col-md-4"> <div class="thumbnail"> <div class="caption"> <h3>Counter</h3> <p>Custom Store</p> <p> The counter value is: <b>{{ counter }}</b> </p> <p> <button (click)="increment()" class="btn btn-primary"> Increment </button> <button (click)="decrement()" class="btn btn-default"> Decrement </button> </p> </div> </div> </div> </div> The three things to note here are that we’re: - displaying the value of the counter in {{ counter }} - calling the increment()function in a button and - calling the decrement()function in a button. The constructor Remember that we need this component depends on the Store, so we need to inject it in the constructor. This is how we use our custom AppStore token to inject a dependency: import { Component, Inject } from '@angular/core'; import { Store } from 'redux'; import { AppStore } from './app.store'; import { AppState } from './app.state'; import * as CounterActions from './counter.actions'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { counter: number; constructor(@Inject(AppStore) private store: Store<AppState>) { store.subscribe(() => this.readState()); this.readState(); } readState() { const state: AppState = this.store.getState() as AppState; this.counter = state.counter; } increment() { this.store.dispatch(CounterActions.increment()); } decrement() { this.store.dispatch(CounterActions.decrement()); } } We use the @Inject decorator to inject AppStore – notice that we define the type of the variable store to Store<AppState>. Having a different injection token than the type of the dependency injected is a little different than when we use the class as the injection token (and Angular infers what to inject). We set the store to an instance variable (with private store). Now that we have the store we can listen for changes. Here we call store.subscribe and call this.readState(), which we define below. The store will call subscribe only when a new action is dispatched, so in this case we need to make sure we manually call readState at least once to ensure that our component gets the initial data. The method readState reads from our store and updates this.counter to the current value. Because this.counter is a property on this class and bound in the view, Angular will detect when it changes and re-render this component. We define two helper methods: increment and decrement, each of which dispatch their respective actions to the store. Putting It All Together Try it out! cd code/redux/redux-chat/redux-counter npm install npm start open Congratulations! You’ve created your first Angular and Redux app! What’s Next Now that we’ve built a basic app using Redux and Angular, we should try building a more complicated app. When we build bigger apps we encounter new challenges like: - How do we combine reducers? - How do we extract data from different branches of the state? - How should we organize our Redux code? The next step is to build an intermediate Redux chat app. The code is open-source here and we go over how to build it step-by-step in the ng-book Intermediate Redux Chapter. If you found this book helpful, go grab a copy – you’ll become an Angular expert in no time. References If you want to learn more about Redux, here are some good resources: - Official Redux Website - This Video Tutorial by Redux’s Creator - Real World Redux (presentation slides) - The power of higher-order reducers To learn more about Redux and Angular checkout: Onward!
https://blog.ng-book.com/introduction-to-redux-with-typescript-and-angular-2/
CC-MAIN-2021-43
en
refinedweb
Windows Terminal Preview 1910 Release Kayla Another update to the Windows Terminal has just been released! As always, you can download the Terminal from the Microsoft Store, the Microsoft Store for Business, and GitHub. 👉 Note: In the About popup within the Terminal, this version will appear as v0.6. Updated UI The Terminal now has even better tabs! The WinUI TabView used in the Terminal has been updated to version 2.2. This version has better color contrast, rounded corners on the dropdown, and tab separators. Also, when too many tabs fill the screen, you can now scroll through them with buttons! Dynamic Profiles Windows Terminal now automatically detects any Windows Subsystem for Linux (WSL) distribution installed on your machine along with PowerShell Core. If you install any of these after this update of the Terminal, they will appear in your profiles.json file! 👉 Note: If you don’t want a profile to appear in your dropdown, you can set "hidden" to true in your profiles.json file. "hidden": true Cascading Settings The Terminal now has an improved settings model! It ships with a defaults.json file with all of the default settings included. If you’d like to see what’s included in the default settings file, you can hold down the Alt key and click on the settings button in the dropdown menu. This file is an auto-generated file and changes made to the file are ignored and overwritten. Your own profiles.json file is where you can add as many custom settings as you’d like. 😊 If you’d like to reset your settings, Scott Hanselman (@shanselman) has written an excellent blog post on how to do just that! If you add a new profile, scheme, key binding, or global setting in your profiles.json, it’ll be treated as an added setting. If you create a new profile whose GUID matches an existing one, then your new profile will override the old one. If there is a default key binding included in the defaults.json file that you would like to free up, you can set that key binding to null in your profiles.json. { "command": null, "keys": ["ctrl+shift+w"] } New Launch Settings You can now set the Terminal to launch as maximized or set its initial position! Setting the Terminal to launch as maximized can be done by adding the global setting "launchMode". This setting accepts either "default" or "maximized". "launchMode": "maximized" If you’d like to set the Terminal’s initial position, you can add "initialPosition" as a global setting. This property accepts a string with the X and Y coordinates separated by a comma. For example, if you’d like the Terminal to launch at the top left of your primary screen, you’d add the following to your profiles.json: "initialPosition": "0,0" 👉 Note: If you’re using multiple monitors and would like to set the Terminal to launch to the left or above your primary monitor, you will have to use negative coordinates. Bug Fixes 🐛 You can now double-click on the tab bar to maximize the window! 🐛 One of the main bugs causing newline issues with copy and paste has been fixed! 🐛 HTML copy doesn’t leave the clipboard open anymore! 🐛 You can now use font names longer than 32 characters! 🐛 There is no longer text corruption when running two tabs at the same time! 🐛 General stability improvements (less crashes)! Top Contributors We love working with our community and we’d like to call out those who have especially made an impact! Contributors Who Opened the Most Non-Duplicate Issues Contributors Who Created the Most Merged Pull Requests Contributors Who Provided the Most Comments on Pull Requests Until Next Time Feel free to reach out to Kayla (@cinnamon_msft) on Twitter if you have any questions or feedback! You can also file an issue on GitHub if you encounter any problems or have any feature requests. See you next month! Time to try it again… Nice! Hotly anticipating tab splitting… Can we run this on Windows server 2016 yet? How do you contribute? The terminal output performance is still about 10 times slower than the Windows console, at least on my machine. Is this normal behaviour, and if so, are there some plans to improve it? The questions I have… Does vim and emacs work well in terminal mode? Does it support xterm like mouse extensions? Any thoughts on regis , tnex or tex4014 graphic support? One click cut and paste? Is there any way to open a new tab in the same directory? ‘Settings’ opens the auto-generated profiles.json with: ‘// THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored.’ on the first line. This is the file in AppData. Why doesn’t ‘Settings’ open my editable profiles.json by default? Command line parameters, please! Really need this a while lot. I’m loving the improvements, but the Copy/Paste bug that remains is still killing me. Try copy/pasting any multi-line text with indentation from any text editor in Windows to the Terminal running Ubuntu. For a good example, try pasting this into an editor in the terminal (emacs, vim, nano), or even better, the ipython shell: from time import sleep for x in range(0, 5): sleep(x) y = True while y: print(“I slept for a few seconds.”) y = False You’ll see what I mean… it never gets to the y = False. This is the the bug that continues to keep me on PuTTy more than any other. Please report issues in the Terminal’s GitHub Repo.
https://devblogs.microsoft.com/commandline/windows-terminal-preview-1910-release/
CC-MAIN-2021-43
en
refinedweb